@ckeditor/ckeditor5-real-time-collaboration 47.2.0-alpha.6 → 47.2.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/real-time-collaboration.js +1 -1
- package/dist/index.js +6 -6
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +14 -14
- package/src/common-translations.js +1 -1
- package/src/index.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +2 -2
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +2 -2
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +2 -2
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +2 -2
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +2 -2
- package/src/realtimecollaborativetrackchanges.js +1 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var __webpack_modules__={2:(t,e,n)=>{"use strict";e.Service=n(626)},4:(t,e)=>{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,n){for(var s,o=null,i=[],a=0,c=0;e<n;){var u=t[e++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(t,e,n){for(var r,o=n,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:e[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},39:(t,e,n)=>{"use strict";t.exports=n(779)},63:(t,e,n)=>{"use strict";t.exports=o;var r=n(982);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(){r.call(this)}function i(t,e,n){t.length<40?s.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r<t.length;)e[n++]=t[r++]}},o.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(i,e,t),this},o._configure()},188:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise(function(s,i){n[r]=function(t){if(o)if(o=!1,t)i(t);else{for(var e=new Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];s.apply(null,e)}};try{t.apply(e||null,n)}catch(t){o&&(o=!1,i(t))}})}},190:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(453),s=n.n(r),o=n(374),i=n.n(o)()(s());i.push([t.id,'.ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:inline-flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;flex-direction:row;justify-content:flex-end;position:relative}.ck.ck-presence-list__list:after{background:transparent;bottom:-15px;content:"";height:15px;left:0;position:absolute;width:100%}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:1px solid transparent;color:inherit;font:inherit;margin-left:var(--ck-spacing-medium);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list__list-item:focus,.ck.ck-presence-list__list-item.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list__list-item .ck-label{height:0;overflow:hidden;width:0}.ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:5px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{border:1px solid transparent;min-width:calc(var(--ck-user-avatar-size)*2);padding-left:1px}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck-presence-list__list:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list--collapsed .ck-presence-list__list:focus,.ck.ck-presence-list--collapsed .ck-presence-list__list.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{border:0;margin-left:calc(var(--ck-user-avatar-size)*-.35);padding:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item .ck-user{--ck-presence-list-avatar-border-color:var(--ck-color-base-foreground);border:2px solid var(--ck-presence-list-avatar-border-color);margin-left:0;margin-right:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item.ck-presence-list__users-counter{margin-left:0;margin-right:0}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}@media (prefers-reduced-motion:reduce){.ck.ck-presence-list__balloon{animation:none}}.ck.ck-presence-list__balloon ul{background-color:var(--ck-color-presence-list-dropdown-background)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper.ck-presence-list__dropdown-list-wrapper_scrollable{max-height:80vh;overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:var(--ck-focus-ring);outline-offset:-1px;position:relative;z-index:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck.ck-presence-list__users-counter{--ck-presence-list-counter-border-color:var(--ck-user-avatar-background);--ck-presence-list-counter-background-color:var(--ck-user-avatar-color);align-items:center;background-color:var(--ck-presence-list-counter-background-color);border:2px solid var(--ck-presence-list-counter-border-color);border-radius:50%;box-sizing:border-box;display:flex;height:calc(var(--ck-user-avatar-size) - 4px);justify-content:center;line-height:100%;margin:4px 2px 2px;position:relative;width:calc(var(--ck-user-avatar-size) - 4px)}.ck.ck-presence-list__users-counter__text{--ck-presence-list-counter-text-color:var(--ck-user-avatar-background);color:var(--ck-presence-list-counter-text-color);cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}',""]);const a=i},204:t=>{"use strict";t.exports={}},211:(t,e,n)=>{t.exports=n(312)("./src/collaboration-core.js")},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},312:t=>{"use strict";t.exports=CKEditor5.collaborationDll},322:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var r,s=null,o=[],i=0;e<n;)(r=t[e++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(t,e,n){for(var r,s,o=n,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-o}},337:(t,e,n)=>{"use strict";var r=n(995),s=n(682),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return m(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(t=t||r);if("blob:"===t.protocol)s=new g(unescape(t.pathname),{});else if("string"===o)for(e in s=new g(t,{}),h)delete s[e];else if("object"===o){for(e in t)e in h||(s[e]=t[e]);void 0===s.slashes&&(s.slashes=a.test(t.href))}return s}function m(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function y(t,e){t=(t=l(t)).replace(i,""),e=e||{};var n,r=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 g(t,e,n){if(t=(t=l(t)).replace(i,""),!(this instanceof g))return new g(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=y(t||"",e=f(e))).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||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()}g.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||s.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";o[t]=e.charAt(0)!==i?i+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var 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}},g.extractProtocol=y,g.location=f,g.trimLeft=l,g.qs=s,t.exports=g},338:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return t(n);i+n>r&&(o=t(r),i=0);var a=e.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<t.length;u++){var d=[].concat(t[u]);r&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},i=[],a=0;a<t.length;a++){var c=t[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var 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}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},474:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):o},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===i?o:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},534:(t,e,n)=>{"use strict";t.exports=c;var r,s=n(641),o=s.LongBits,i=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return s.Buffer?function(t){return(c.create=function(t){return s.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function 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)}})}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},626:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(t,a,e,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(e,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,n){if(t)return a.emit("error",t,e),i(t);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return a.emit("error",t,e),i(t)}return a.emit("data",n,e),i(null,n)}a.end(!0)})}catch(t){return a.emit("error",t,e),void setTimeout(function(){i(t)},0)}else setTimeout(function(){i(Error("already ended"))},0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},641:function(t,e,n){"use strict";var r=e;function s(t,e,n){for(var r=Object.keys(e),s=0;s<r.length;++s)void 0!==t[r[s]]&&n||(t[r[s]]=e[r[s]]);return t}function o(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=n(188),r.base64=n(4),r.EventEmitter=n(730),r.float=n(791),r.inquire=n(706),r.utf8=n(322),r.pool=n(338),r.LongBits=n(474),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var n=t[e];return!(null==n||!t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=s,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},682:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,i=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?e+i.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,s={};e=n.exec(t);){var o=r(e[1]),i=r(e[2]);null===o||null===i||o in s||(s[o]=i)}return s}},706:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},730:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r<n.length;)n[r].fn===e?n.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,n)}return this}},763:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(453),s=n.n(r),o=n(374),i=n.n(o)()(s());i.push([t.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker-tooltip{color:#fff;display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker-tooltip{transition:none}}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-dot{width:0}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-tooltip{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-placeholder .ck-user__marker{display:none}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker,.ck .ck-user__marker *,.ck .ck-user__marker:after{animation:none!important}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const a=i},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,s){var o;if(r)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var i=void 0!==s.layer;i&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,i&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var a=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},779:(t,e,n)=>{"use strict";var r=e;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(982),r.BufferWriter=n(63),r.Reader=n(534),r.BufferReader=n(799),r.util=n(641),r.rpc=n(2),r.roots=n(204),r.configure=s,s()},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},791:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(t,r,s){e[0]=t,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function a(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?s:o,t.writeFloatBE=r?o:s,t.readFloatLE=r?i:a,t.readFloatBE=r?a:i}():function(){function e(t,e,n,r){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(e)/Math.LN2);t((s<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(t,e,n){var r=t(e,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=i.bind(null,s),t.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(t,r,s){e[0]=t,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function a(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?s:o,t.writeDoubleBE=r?o:s,t.readDoubleLE=r?i:a,t.readDoubleBE=r?a:i}():function(){function e(t,e,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)t(0,s,o+e),t(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))t(0,s,o+e),t(2146959360,s,o+n);else if(r>17976931348623157e292)t(0,s,o+e),t((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,s,o+e),t((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+e),t((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(t,e,n,r,s){var o=t(r,s+e),i=t(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=i.bind(null,s,0,4),t.readDoubleBE=i.bind(null,o,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},799:(t,e,n)=>{"use strict";t.exports=o;var r=n(534);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(t){r.call(this,t)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},982:(t,e,n)=>{"use strict";t.exports=l;var r,s=n(641),o=s.LongBits,i=s.base64,a=s.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(t,e,n){e[n]=255&t}function f(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function y(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}l.create=p(),l.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(m,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(m,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(m,e.length(),e)},l.prototype.bool=function(t){return this._push(h,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(y,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(y,4,e.lo)._push(y,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var g=s.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r<t.length;++r)e[n+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(h,1,0);if(s.isString(t)){var n=l.alloc(e=i.length(t));i.decode(t,n,0),t=n}return this.uint32(e)._push(g,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new 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:()=>Go,CloudServicesTrackChangesAdapter:()=>Eo,PresenceList:()=>xi,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>po,RealTimeCollaborativeComments:()=>Vo,RealTimeCollaborativeEditing:()=>bo,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Uo,Sessions:()=>Xn,WebSocketGateway:()=>Fn});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Decoder:()=>Dt,Encoder:()=>Et,PacketType:()=>Pt,protocol:()=>Ct});var e=__webpack_require__(782),n=__webpack_require__(584),r=__webpack_require__(311),s=__webpack_require__(783);class o{static DESCRIPTOR_NAME;static DESCRIPTOR;constructor(...t){}}class i extends o{static TYPE="1000";static READABLE_TYPE_NAME;constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}class a extends i{id;static TYPE="21";static READABLE_TYPE_NAME="getUser";static DESCRIPTOR_NAME="GetUserMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new a(t.id)}}class c extends i{attributes;static DESCRIPTOR_NAME="GetUserResponse";static DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}};constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map(t=>({key:t,value:JSON.stringify(this.attributes[t])}))}}static fromJSON(t){const e=t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{});return new c(e)}}var 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(y))}}function m(t){return{attributes:Object.keys(t).map(e=>({key:e,value:JSON.stringify(t[e])}))}}function y(t){return t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{})}class g{static _SERVICE=2;constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new g(t)}static async get(t,e){const n=new a(e);try{const e=await t._sendRequest(g._SERVICE,a.TYPE,l.encode(n)),r=l.decode(e,c);return new g(r.attributes)}catch(t){return new g({id:e})}}static async getMany(t,e){const n=new h(e);try{const e=await t._sendRequest(g._SERVICE,h.TYPE,l.encode(n));return l.decode(e,f).users.map(t=>new g(t))}catch(t){return e.map(t=>new g({id:t}))}}}const b=g,I=Object.create(null);I.open="0",I.close="1",I.ping="2",I.pong="3",I.message="4",I.upgrade="5",I.noop="6";const O=Object.create(null);Object.keys(I).forEach(t=>{O[I[t]]=t});const v={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),S="function"==typeof ArrayBuffer,k=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,A=({type:t,data:e},n,r)=>w&&e instanceof Blob?n?r(e):T(e,r):S&&(e instanceof ArrayBuffer||k(e))?n?r(e):T(new Blob([e]),r):r(I[t]+(e||"")),T=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function _(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let C;const P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)E[P.charCodeAt(t)]=t;const j="function"==typeof ArrayBuffer,D=(t,e)=>{if("string"!=typeof t)return{type:"message",data:R(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:x(t.substring(1),e)};return O[n]?t.length>1?{type:O[n],data:t.substring(1)}:{type:O[n]}:v},x=(t,e)=>{if(j){const n=(t=>{let e,n,r,s,o,i=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(i--,"="===t[t.length-2]&&i--);const 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 F(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,s=t.length;r<s;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}class z extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class K extends 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 z(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=D(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}const W="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),X={};let Q,Z=0,$=0;function tt(t){let e="";do{e=W[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function et(){const t=tt(+new Date);return t!==Q?(Z=0,Q=t):t+"."+tt(Z++)}for(;$<64;$++)X[W[$]]=$;let nt=!1;try{nt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const rt=nt;function st(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||rt))return new XMLHttpRequest}catch(t){}if(!e)try{return new(q[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function ot(){}const it=null!=new st({xdomain:!1}).responseType;class at extends U{constructor(t,e){super(),H(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=L(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const n=this.xhr=new st(e);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof n.status?n.status:0)},0))},n.send(this.data)}catch(t){return void this.setTimeoutFn(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=at.requestsCount++,at.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=ot,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete at.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(at.requestsCount=0,at.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",ct);else if("function"==typeof addEventListener){addEventListener("onpagehide"in q?"pagehide":"unload",ct,!1)}function ct(){for(let t in at.requests)at.requests.hasOwnProperty(t)&&at.requests[t].abort()}const ut="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),dt=q.WebSocket||q.MozWebSocket,lt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const 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 yt 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&&yt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(t){let e=this.createTransport(t),n=!1;yt.priorWebsocketSuccess=!1;const r=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;yt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(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",yt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=F(n)),e>0&&t>this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:t,data:e,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){yt.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}yt.protocol=4;yt.protocol;const gt="function"==typeof ArrayBuffer,bt=Object.prototype.toString,It="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),Ot="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function vt(t){return gt&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||It&&t instanceof Blob||Ot&&t instanceof File}function wt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(wt(t[e]))return!0;return!1}if(vt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return wt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&wt(t[e]))return!0;return!1}function St(t){const e=[],n=t.data,r=t;return r.data=kt(n,e),r.attachments=e.length,{packet:r,buffers:e}}function kt(t,e){if(!t)return t;if(vt(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=kt(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=kt(t[r],e));return n}return t}function At(t,e){return t.data=Tt(t.data,e),delete t.attachments,t}function Tt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Tt(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Tt(t[n],e));return t}const _t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ct=5;var Pt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Pt||(Pt={}));class Et{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!wt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=St(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}function jt(t){return"[object Object]"===Object.prototype.toString.call(t)}class Dt extends 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 yt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Rt(e,"open",function(){n.onopen(),t&&t()}),s=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Rt(e,"error",s);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Rt(t,"ping",this.onping.bind(this)),Rt(t,"data",this.ondata.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){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 Ft extends i{flags;rooms;except;static TYPE=11;static DESCRIPTOR_NAME="PacketOptionsMessage";static DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}};constructor(t,e=[],n=[]){super(),this.flags=t,this.rooms=e,this.except=n}toJSON(){return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:this.rooms?.length?this.rooms:void 0,except:this.except?.length?this.except:void 0}}static fromJSON(t){return new Ft(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}const zt=(()=>!("undefined"==typeof process||!process.versions?.node))(),Kt=1,Wt=2,Xt=3,Qt=4;class Zt{static getPacketType(...t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*Math.pow(10,t.length-n-1);return e}static getType(t){if(Zt.isBuffer(t))return Kt;const e=typeof t;return"string"===e?Wt:"number"===e?Xt:Qt}static isBuffer(t){return zt&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}class $t extends i{data;data1;static create(t,e){throw new TypeError("Must be implemented in a child class!")}}class te extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Kt))();static DESCRIPTOR_NAME="NumberBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new te(t.data,t.data1)}static create(t,e){return new te(t,e)}}class ee extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Kt))();static DESCRIPTOR_NAME="StringBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ee(t.data,t.data1)}static create(t,e){return new ee(t,e)}}class ne extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Kt,Kt))();static DESCRIPTOR_NAME="BytesBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ne(t.data,t.data1)}static create(t,e){return new ne(t,e)}}class re extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Qt))();static DESCRIPTOR_NAME="StringObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new re(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new re(t,e)}}class se extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Qt))();static DESCRIPTOR_NAME="NumberObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new se(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new se(t,e)}}class oe extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Qt))();static DESCRIPTOR_NAME="ObjectObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new oe(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new oe(t,e)}}class ie extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Kt))();static DESCRIPTOR_NAME="ObjectBufferPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new ie(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new ie(t,e)}}class ae extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Wt))();static DESCRIPTOR_NAME="StringStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ae(t.data,t.data1)}static create(t,e){return new ae(t,e)}}class ce extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Xt))();static DESCRIPTOR_NAME="StringNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ce(t.data,t.data1)}static create(t,e){return new ce(t,e)}}class ue extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Xt))();static DESCRIPTOR_NAME="NumberNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Wt))();static DESCRIPTOR_NAME="NumberStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new de(t.data,t.data1)}static create(t,e){return new de(t,e)}}const le=(()=>[te,ee,ne,re,se,oe,ie,ae,ce,ue,de].reduce((t,e)=>(t[e.TYPE]=e,t),{}))();class pe extends i{type;data;id;nsp;options;static TYPE=10;static DESCRIPTOR_NAME="PacketMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}};constructor(t,e,n,r="/",s){super(),this.type=t,this.data=e,this.id=n,this.nsp=r,this.options=s??new Ft}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const t=l.encode(this.options),e=l.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new pe(t.type-10*e,l.decode(t.data,le[e]),t.id,t.nsp,t.options?l.decode(t.options,Ft):new Ft)}static create(t,e={}){const n=Zt.getPacketType(Zt.getType(t.data[0]),Zt.getType(t.data[1]??t.data[0]));return new pe(t.type,le[n].create(t.data[0],t.data[1]),t.id,t.nsp,new Ft(e.flags,e.rooms,e.except))}}class he{encode(t,e,n,r="/",s={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const o={type:t,data:e,id:n,nsp:r};return l.encode(pe.create(o,s))}decode(t){const e=l.decode(t,pe);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}const fe=(()=>[Pt.EVENT,Pt.ACK,Pt.BINARY_ACK,Pt.BINARY_EVENT])();class me extends Et{_packetParser;constructor(t){super(),this._packetParser=t??new he}encode(t){if(fe.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}class ye extends Dt{_packetParser;constructor(t){super(),this._packetParser=t??new he}add(t){if(!Zt.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}class ge{_context;_deferredPromise=function(){let t,e;const n=new Promise((n,r)=>{t=n,e=r});return{resolve:t,reject:e,promise:n}}();timeout;constructor(t,e){this._context=t,this.timeout=setTimeout(()=>this.error(new 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 ge(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}async _waitForRequests(t=5e3,e=0){return!this._requests.size||e>=t/500?Promise.resolve():(await new Promise(t=>{setTimeout(t,500)}),this._waitForRequests(t,e++))}}const Ie={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected"};class Oe extends((0,n.ObservableMixin)()){_requestsManager;_url;_socket;_socketAuth;_channels;_connectionAttempt=0;_token;_options;_connectionProvider;_userFactory;static STATE_DISCONNECTED=(()=>Ie.DISCONNECTED)();static STATE_CONNECTING=(()=>Ie.CONNECTING)();static STATE_CONNECTED=(()=>Ie.CONNECTED)();static _CHANGE_STATE_EVENT_PRIORITY=(()=>n.priorities.get("highest")+999999)();constructor(t,e,n,r,s){if(super(),this._token=e,this._options=n??{},this._connectionProvider=r??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:ye},path:n+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:"53.0.1"},agent:this._options.agent??!1,closeOnBeforeunload:!1});return this.state=Ie.CONNECTING,r.on("connect",()=>{this._debugEvent("connect"),this.socketId=r.id}),r.on("connect_error",t=>{this._debugEvent("connect_error",t)}),r.on("disconnect",()=>{this._debugEvent("disconnect"),this._onDisconnect()}),r.io.on("reconnect",async()=>{this._debugEvent("reconnect"),await this._onReconnect()}),r.io.on("reconnect_attempt",t=>{this._debugEvent("reconnect_attempt",t),this.state=Ie.CONNECTING,this._connectionAttempt=t}),r.on("unauthorized",t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)}),r.on("authenticationRequest",async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()}),this._socket=r,r}_emit(t,e){const n=this._socket;return this._requestsManager.send(r=>{n.emit(t,e,(t,e)=>{if(t)return r.error(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 Fe extends i{documentId;static TYPE="105";static READABLE_TYPE_NAME="connectToSuggestions";static DESCRIPTOR_NAME="TrackChangesConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new Fe(t.documentId)}}class ze extends i{channel;_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=n,this.suggestions=n?.length?n:e}toJSON(){return{channel:this.channel,suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new ze(t.channel,t.suggestions?.map(t=>JSON.parse(t)),t.suggestionsV2?.map(Le.fromJSON))}}class Ke extends i{ids;documentId;state;static TYPE="106";static READABLE_TYPE_NAME="batchUpdateSuggestionsState";static DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage";static DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}};constructor(t,e,n){super(),this.ids=t,this.documentId=e,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new Ke(t.ids,t.documentId,t.state)}}class We extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;static _SERVICE=10;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new Yt("WebSocket Gateway is not connected.",t);const e=new Fe(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const n=await t._sendRequest(10,Fe.TYPE,l.encode(e)),r=l.decode(n,ze);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(t,e,n,r=null,s){const o=new Me(t,this._documentId,e,n,r,s),i=await this._sendRequest(Me.TYPE,o);return l.decode(i,Be)}async get(t,e=1){const n=new Je(t,this._documentId);try{const t=await this._sendRequest(Je.TYPE,n);return l.decode(t,Ue)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.get(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Ht.fromPublicError(n)}var r}async getAll(){const t=new qe(this._documentId),e=await this._sendRequest(qe.TYPE,t),{suggestions:n}=l.decode(e,Ge);return n}async update(t,e={}){const{hasComments:n,state:r,attributes:s}=e,o=void 0!==n,i=new He(t,this._documentId,n,o,r,s);await this._sendRequest(He.TYPE,i)}async batchUpdateState(t){const e=new Ke(t.ids,this._documentId,t.state);await this._sendRequest(Ke.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(We._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(He.TYPE),(t,e)=>{const n=l.decode(e,He);this.fire("suggestionUpdated",n)})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Track Changes",this);return this._wsGateway._sendRequest(10,t,l.encode(e))}}const Xe=We,Qe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ze;const $e=new Uint8Array(16);function tn(){if(!Ze&&(Ze="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ze))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ze($e)}const en=[];for(let t=0;t<256;++t)en.push((t+256).toString(16).slice(1));function nn(t,e=0){return en[t[e+0]]+en[t[e+1]]+en[t[e+2]]+en[t[e+3]]+"-"+en[t[e+4]]+en[t[e+5]]+"-"+en[t[e+6]]+en[t[e+7]]+"-"+en[t[e+8]]+en[t[e+9]]+"-"+en[t[e+10]]+en[t[e+11]]+en[t[e+12]]+en[t[e+13]]+en[t[e+14]]+en[t[e+15]]}const rn=function(t,e,n){if(Qe.randomUUID&&!e&&!t)return Qe.randomUUID();const r=(t=t||{}).random||(t.rng||tn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return nn(r)};class sn extends i{channel;sockets;static DESCRIPTOR_NAME="SessionsConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}};constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map(t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions}))}}static fromJSON(t){return new sn(t.channel,t.sockets.map(t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions})))}}class on extends i{id;sessionType;static TYPE="31";static READABLE_TYPE_NAME="getConnectedSockets";static DESCRIPTOR_NAME="SessionsConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}};constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new on(t.id,t.sessionType)}}class an extends i{id;userId;role;permissions;static TYPE="32";static READABLE_TYPE_NAME="connectSocket";static DESCRIPTOR_NAME="SocketConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}};constructor(t,e,n,r){super(),this.id=t,this.userId=e,this.role=n,this.permissions=r}toJSON(){return{id:this.id,userId:this.userId??void 0,role:this.role??void 0,permissions:this.permissions??void 0}}static fromJSON(t){return new an(t.id,t.userId,t.role,t.permissions)}}class cn extends i{id;static TYPE="33";static READABLE_TYPE_NAME="disconnectSocket";static DESCRIPTOR_NAME="SocketDisconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new cn(t.id)}}const un=class extends n.Collection{_id;_sessionType;_handlers=new Map;_channel;_wsGateway;_connected;_eventsQueue=[];_isRunning=!1;constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new on(this._id,this._sessionType);let n;try{const t=await this._wsGateway._sendRequest(3,on.TYPE,l.encode(e));n=l.decode(t,sn)}catch(t){n=new sn(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(t,e){const n=e.map(t=>t.userId),r=n.length?await b.getMany(t,n):[];return e.map(t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find(e=>e.id===t.userId)||new b,e})}(this._wsGateway,n.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,n){this._channel=t._getChannel(n,e),this._channel&&(this._addHandler(this._channel,an.TYPE,async e=>{const n=l.decode(e,an);if(-1===this.getIndex(n.id)){const e={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(e.user=await b.get(t,n.userId)),super.add(e)}}),this._addHandler(this._channel,cn.TYPE,t=>{const e=l.decode(t,cn);-1!==this.getIndex(e.id)&&super.remove(e.id)}))}async _onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect(!1),t===ve.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,n){const r=t.getEventName(e,!0);this.listenTo(t,r,async(t,e)=>{const n=t.name;this._eventsQueue.push({eventName:n,data:e}),await this._runQueue()}),this._handlers.set(r,n)}};class dn{static async getConnectedSessions(t,e,n){const r=new un(e,n);return await r.connect(t),r}}class ln extends i{id;buffers;types;bundleVersion;lastOperationId;static TYPE="11";static READABLE_TYPE_NAME="connectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}};constructor(t,e,n,r,s=""){super(),this.id=t,this.buffers=e,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new ln(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}class pn{static prepareMetadataForOperations(t,e){if(!t?.length||!e?.length)return[];const n=[];let r=0;for(const s of t)if(0!==s){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(t,e){if(!t?.length||!e?.length)return[];const n=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r])}return n}}class hn extends o{static DESCRIPTOR_NAME="OperationMetadataDescriptor";static DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}};static toJSON({createdAt:t,...e}){const n={...e};return t?.toISOString&&(n.createdAt=t.toISOString()),n}static fromJSON({createdAt:t,...e}){const n={...e};return t&&(n.createdAt=new Date(t)),n}}class fn extends i{id;buffers;types;baseVersion;metadata;lastOperationId;static TYPE="13";static READABLE_TYPE_NAME="updateDocument";static DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}};constructor(t,e,n,r,s=[],o=""){super(),this.id=t,this.buffers=e,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new fn(t.id,t.buffers,t.types,t.baseVersion,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId)}}class mn extends i{id;lastKnowVersion;bundleVersion;static TYPE="12";static READABLE_TYPE_NAME="reconnectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}};constructor(t,e,n){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new mn(t.id,t.lastKnowVersion,t.bundleVersion)}}class yn extends i{version;buffers;types;metadata;lastOperationId;lastOperationAcceptedAt;static DESCRIPTOR_NAME="CollaborativeEditingResponse";static DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}};constructor(t,e=[],n=[],r=[],s="",o=null){super(),this.version=t,this.buffers=e,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){return!this.types?.length}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new yn(t.version,t.buffers,t.types,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new yn(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}class gn extends i{channel;version;buffers;types;offset;metadata;initData;sessionId;lastOperationId;sessionCreatedAt;static DESCRIPTOR_NAME="CollaborativeEditingConnectResponse";static DESCRIPTOR=(()=>({fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:hn.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}))();constructor(t,e,n=[],r=[],s=0,o=[],i=null,a="",c="",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 gn(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){let e=null;return!0===t.isInitialized?e=t.initData??"":"boolean"!=typeof t.isInitialized&&t.initData&&(e=t.initData),gn.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),initData:e,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}class bn extends i{lastDocumentSession;currentDocumentSession;static DESCRIPTOR_NAME="GetDocumentDetailsResponse";static DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}};constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}toJSON(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,n=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new bn(e,n)}}class In extends i{documentId;static TYPE="14";static READABLE_TYPE_NAME="getDocumentDetails";static DESCRIPTOR_NAME="GetDocumentDetailsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}};constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new In(t.documentId)}}const On=class extends((0,n.EmitterMixin)()){static _SERVICE=1;_bundleVersion;_id;_isConnected;_wsGateway;_channel;_connectedSessions;constructor(t,e){if(super(),!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=e??rn(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},n){const r=new ln(this.getId(),e.buffers,e.types,this._bundleVersion,n);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new 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,yn)}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,gn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r}_connectToChannel(t,e){this._channel=t._getChannel(1,e),this.listenTo(this._channel,this._channel.getEventName(fn.TYPE),(t,e)=>{const n=l.decode(e,fn);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)})}_onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect()}};class vn extends o{static DESCRIPTOR_NAME="CommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}class wn extends o{static DESCRIPTOR_NAME="CommentsThreadDescriptor";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),deletedAt:t.deletedAt?.toISOString(),resolvedAt:t.resolvedAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null,context:t.context?JSON.stringify(t.context):t.context,comments:t.comments?.map(vn.toJSON),unlinkedAt:t.unlinkedAt?.toISOString()}}static fromJSON(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,deletedAt:t.deletedAt?new Date(t.deletedAt):void 0,resolvedAt:t.resolvedAt?new Date(t.resolvedAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):null,context:t.context?JSON.parse(t.context):void 0,comments:t.comments?.map(vn.fromJSON),unlinkedAt:t.unlinkedAt?new Date(t.unlinkedAt):void 0}}}class Sn extends i{documentId;commentThreadId;content;commentId;userId;attributes;commentThread;createdAt;static TYPE="91";static READABLE_TYPE_NAME="addComment";static DESCRIPTOR_NAME="CommentsV2AddCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}};constructor(t,e,n,r="",s,o="",i=null,a){super(),this.documentId=t,this.commentThreadId=e,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Sn(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{},t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class kn extends i{commentThreadId;commentId;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}};constructor(t,e,n){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new kn(t.commentThreadId,t.commentId,t.createdAt)}}class An extends i{documentId;static TYPE="92";static READABLE_TYPE_NAME="connectToComment";static DESCRIPTOR_NAME="CommentsV2ConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new An(t.documentId)}}class Tn extends i{channel;_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2ConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._threads=e,this._threadsV2=n,this.threads=n?.length?n:e}toJSON(){return{channel:this.channel,threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new Tn(t.channel,t.threads?.map(t=>JSON.parse(t)),t.threadsV2?.map(wn.fromJSON))}}class _n extends i{documentId;commentThreadId;commentId;static TYPE="95";static READABLE_TYPE_NAME="removeComment";static DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}};constructor(t,e,n){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new _n(t.documentId,t.commentThreadId,t.commentId)}}class Cn extends i{documentId;commentThreadId;static TYPE="97";static READABLE_TYPE_NAME="removeCommentThread";static DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Cn(t.documentId,t.commentThreadId)}}class Pn extends i{documentId;commentThreadId;commentId;content;attributes;isAttributesUpdated;commentThread;static TYPE="96";static READABLE_TYPE_NAME="updateComment";static DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}};constructor(t,e,n,r,s=null,o=!1,i){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Pn(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated,t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class En extends i{commentThreadId;documentId;static TYPE="93";static READABLE_TYPE_NAME="getComment";static DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new En(t.commentThreadId,t.documentId)}}class jn extends i{commentThreadId;_comments;_commentsV2;resolvedBy;comments;createdAt;deletedAt;resolvedAt;attributes;context;unlinkedAt;static DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}};constructor(t,e,n,r,s,o,i,a,c,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=["disconnect","function","cloudservices-init","478213RBPxGD","get","_isBrowserOffline","destroy","_domEmitter","offline","online","3707920PCUUXP","isOfficialPlugin","then","connected","1573209vltgPl","_reconnect","5rrsKRf","plugins","showWarning","Connected users limit exceeded","_shouldPluginsReconnect","requires","initialReconnectionInterval","delete","catch","init","reconnect","addToReconnectionStack","connect","stopListening","cloudServices.requestTimeout","constructor","webSocketUrl","websocketgateway-missing-websocket-url","WebSocketGateway","set","CONNECTING","isPremiumPlugin","6309429KiiMYp","add","limitExceeded","bind","code","state","has","cloudServices.connectionTimeout","CloudServices","websocketgateway-invalid-plugin-interface","connection","websocketgateway-missing-token","45vImKmU","137828yyhDTR","_reconnectionStack","removeFromReconnectionStack","from","context","define","cloudservices-reconnection-error","540538BnYSKm","token","DISCONNECTED","isInReconnectionStack","change:me","CONNECTED","100296imcgsw","all","listenTo","error","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.","pluginName","websocketgateway-plugin-already-registered","config","6iIHlza","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-=464]})(t,e)}!function(t){const e=Hn,n=t();for(;;)try{if(683148===parseInt(e(472))/1+-parseInt(e(527))/2+-parseInt(e(483))/3+-parseInt(e(520))/4*(-parseInt(e(485))/5)+parseInt(e(467))/6*(-parseInt(e(507))/7)+parseInt(e(533))/8+-parseInt(e(519))/9*(-parseInt(e(479))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Gn);class Fn extends e.ContextPlugin{static[Yn(503)]=(()=>ve)();static[Yn(491)]=1e3;[Yn(517)];[Yn(521)];[Yn(489)];[Yn(476)];static get[Yn(490)](){return[Yn(515),r.Notification]}static get[Yn(464)](){return Yn(503)}static get[Yn(480)](){return!0}static get[Yn(506)](){return!0}constructor(t){const e=Yn;super(t),this[e(504)](e(512),Ie[e(532)]),this[e(504)](e(474),!1),this[e(521)]=new Set,this[e(489)]=!1,this[e(476)]=new((0,n.DomEmitterMixin)())}[Yn(494)](){const t=Yn,e=this[t(524)],s=e[t(486)][t(473)](t(515)),o=e[t(486)][t(473)](r.Notification);if(!s[t(528)])throw new n.CKEditorError(t(518),this);if(!s[t(501)])throw new n.CKEditorError(t(502),this);return this[t(476)][t(535)](window,t(477),()=>this[t(474)]=!0),this[t(476)][t(535)](window,t(478),()=>this[t(474)]=!1),this[t(524)][t(466)][t(525)](t(514),10),this[t(524)][t(466)][t(525)](t(499),20),Fn[t(503)][t(497)](s[t(528)],s[t(501)],{timeout:1e3*this[t(524)][t(466)][t(473)](t(514)),requestTimeout:1e3*this[t(524)][t(466)][t(473)](t(499))})[t(481)](e=>{const r=t;if(this[r(517)]=e,this[r(510)](r(512)).to(e,r(512),this,r(474),(t,e)=>(r(482)!==t&&(this[r(489)]=!0),e||t!==Ie[r(532)]?Ie[r(529)]:this[r(512)]==Ie[r(529)]&&this[r(489)]?(this[r(489)]=!1,this[r(484)](),Ie[r(505)]):Ie[r(532)])),this[r(517)].on(r(536),(t,e)=>{const s=r;if(s(509)!==e[s(511)])throw console[s(536)](e),new n.CKEditorError(s(471),null,{originalError:e});o[s(487)](s(537),{title:s(488),namespace:s(468)})}),!e.me)return new Promise(t=>e.on(r(531),t))})[t(493)](e=>{const r=t;throw console[r(536)](e),new n.CKEditorError(r(471),null,{originalError:e})})}[Yn(496)](t){const e=Yn;if(e(470)!=typeof t[e(495)])throw new n.CKEditorError(e(516),this);if(this[e(530)](t))throw new n.CKEditorError(e(465),this,{name:t[e(500)][e(464)]});this[e(521)][e(508)](t)}[Yn(522)](t){const e=Yn;this[e(521)][e(492)](t)}[Yn(530)](t){const e=Yn;return this[e(521)][e(513)](t)}[Yn(484)](){const t=Yn;return this[t(517)][t(495)]()[t(481)](()=>Promise[t(534)](Array[t(523)](this[t(521)],e=>e[t(495)]())))[t(481)](()=>this[t(512)]=Ie[t(532)])[t(493)](e=>{const r=t;throw console[r(536)](e),new n.CKEditorError(r(526),this[r(524)])})}[Yn(469)](){const t=Yn;this[t(517)]&&this[t(517)][t(469)](),this[t(512)]=Ie[t(529)],this[t(476)][t(498)]()}[Yn(475)](){const t=Yn;this[t(469)](),super[t(475)]()}}var zn=__webpack_require__(211);const Kn=Wn;function Wn(t,e){const n=Qn();return(Wn=function(t,e){return n[t-=439]})(t,e)}!function(t){const e=Wn,n=t();for(;;)try{if(540970===parseInt(e(452))/1*(parseInt(e(442))/2)+parseInt(e(466))/3+parseInt(e(477))/4*(parseInt(e(467))/5)+-parseInt(e(494))/6+-parseInt(e(469))/7+-parseInt(e(474))/8*(-parseInt(e(450))/9)+-parseInt(e(449))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Qn);class Xn extends e.ContextPlugin{[Kn(490)];[Kn(459)];[Kn(478)];[Kn(470)];[Kn(444)];[Kn(495)];static get[Kn(453)](){return Kn(496)}static get[Kn(492)](){return!0}static get[Kn(484)](){return!0}static get[Kn(497)](){return[Fn,zn.Users]}constructor(t){const e=Kn;super(t),this[e(490)]=new Map,this[e(459)]=new Map,this[e(478)]=new n.Collection,this[e(470)]=new Map,this[e(444)]=0,this[e(495)]=this[e(472)][e(462)][e(480)](zn.Users)}[Kn(491)](){const t=Kn,e=this[t(472)][t(462)][t(480)](Fn);this[t(461)](e,t(487),(e,n,r)=>{const s=t;if(s(464)!==r)this[s(490)][s(475)](t=>t[s(489)]()),this[s(459)][s(475)](t=>t[s(489)]()),this[s(478)][s(489)]();else for(const[t,e]of this[s(470)])for(const n of e)this[s(446)](t,n)}),this[t(500)](e[t(481)].me,!0)}[Kn(447)](t,e){const r=Kn;if(this[r(470)][r(445)](t))throw new n.CKEditorError(r(448),null,{channelId:t});this[r(470)][r(440)](t,e),this[r(490)][r(440)](t,new n.Collection),this[r(459)][r(440)](t,new n.Collection),this[r(461)](e,r(456),(e,n)=>this[r(446)](t,n)),this[r(461)](e,r(499),(e,n)=>this[r(483)](t,n));for(const n of e)this[r(446)](t,n)}[Kn(471)](t){const e=Kn;if(!this[e(470)][e(445)](t))throw new n.CKEditorError(e(498),null,{channelId:t});const r=this[e(470)][e(480)](t);this[e(439)](r);for(const n of r)e(464)===this[e(472)][e(462)][e(480)](Fn)[e(443)]&&this[e(483)](t,n);this[e(470)][e(458)](t),this[e(490)][e(458)](t),this[e(459)][e(458)](t)}get[Kn(441)](){const t=Kn;return this[t(472)][t(462)][t(480)](Fn)[t(481)][t(463)]}[Kn(486)](t){const e=Kn;for(const n of this[e(490)][e(455)]())for(const r of n)if(r.id===t)return r[e(468)]}[Kn(460)](t,e){const n=Kn,r=e?[this[n(490)][n(480)](e)]:this[n(490)][n(455)](),s=new Set;for(const e of r)for(const r of e)r[n(468)].id===t.id&&s[n(456)](r.id);return s}[Kn(488)](t){const e=Kn;for(const n of this[e(490)][e(455)]())for(const r of n)if(r[e(468)]===t)return r[e(485)]}[Kn(446)](t,e){const n=Kn;if(n(464)!==this[n(472)][n(462)][n(480)](Fn)[n(443)])return;const r=e[n(468)],s=this[n(495)][n(501)](r.id)||this[n(500)](r),o=Object[n(454)]({},e,{user:s});if(this[n(490)][n(480)](t)[n(456)](o),!r[n(493)]){const e=this[n(459)][n(480)](t);e[n(445)](s.id)||e[n(456)](s),this[n(478)][n(445)](s.id)||r[n(493)]||this[n(478)][n(456)](s,s[n(473)]?0:void 0)}this[n(457)](n(476)+t,{channelId:t,session:o})}[Kn(483)](t,e){const n=Kn;if(n(464)!==this[n(472)][n(462)][n(480)](Fn)[n(443)])return;const r=this[n(459)][n(480)](t),s=e[n(468)];s.id&&(this[n(490)][n(480)](t)[n(499)](e.id),r[n(445)](s.id)&&!this[n(460)](s,t)[n(479)]&&r[n(499)](s.id),this[n(478)][n(480)](s.id)&&!this[n(460)](s)[n(479)]&&this[n(478)][n(499)](s.id))}[Kn(500)](t,e){const n=Kn,r=this[n(495)][n(482)](t);return e&&this[n(495)][n(451)](t.id),r[n(465)]=this[n(444)]++,r}}function Qn(){const t=["connection","addUser","_handleSessionRemove","isPremiumPlugin","role","getUserBySessionId","change:state","getUserRole","clear","channelSessions","init","isOfficialPlugin","hiddenInPresenceList","4701990SoKZbv","_users","Sessions","requires","sessions-unregister-not-exist","remove","_createUser","getUser","stopListening","set","mySessionId","2uvbiEU","state","_uniqueUsersCount","has","_handleSessionAdd","register","sessions-register-already-registered","10615240LtaFzI","9TZuOxp","defineMe","753631nrULHU","pluginName","assign","values","add","fire","delete","channelConnectedUsers","getUserSessions","listenTo","plugins","sessionId","connected","orderNumber","2656770VidZza","830atbXBU","user","4506096EYwKDs","_registeredSessions","unregister","context","isMe","3671264TElUIv","forEach","sessionAdd:","22452oXQjNC","allConnectedUsers","size","get"];return(Qn=function(){return t})()}var Zn=__webpack_require__(450),$n=__webpack_require__.n(Zn),tr=__webpack_require__(774),er=__webpack_require__.n(tr),nr=__webpack_require__(265),rr=__webpack_require__.n(nr),sr=__webpack_require__(410),or=__webpack_require__.n(sr),ir=__webpack_require__(238),ar=__webpack_require__.n(ir),cr=__webpack_require__(763),ur={attributes:{"data-cke":!0}};ur.setAttributes=or(),ur.insert=rr().bind(null,"head"),ur.domAPI=er(),ur.insertStyleElement=ar();$n()(cr.A,ur);cr.A&&cr.A.locals&&cr.A.locals;const dr=lr;function lr(t,e){const n=pr();return(lr=function(t,e){return n[t-=491]})(t,e)}function pr(){const t=["model","getContainedElement","markerRange","user:","getFirstRange","user:position:","parent","updateMarker","hasDomSelection","setCustomProperty","schema","removeClass","startsWith","update:user:range","createRange","highest","tableCell","ck-user__marker_hovered","addEventListener","newRange","color","ck-user__marker-tooltip",'<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"$graveyard","markers","enqueueChange","orderNumber","isCollapsed","checkChild","start","add","markerNameToElements","type","markerToElement","getNearestSelectionRange","528026bxZFuP","_createdBatches","false","editing","conversion","toRange","4412536ucFyOo","keydown","994645ONMmeA","rootName","createElement","getCustomProperty","for","root","document","getAttribute","markerToHighlight","data-session-id","mouseleave","user:position","commands","removeMarker","user:range:","getMarkerClass","outerHTML","getSelectionClass","setAttribute","selection","user:range","getUserBySessionId","clear","7230546AsvONn","marker","toDomElement","name","mySessionId","UserMarkers","element","Escape","92560qGeNUI","has","pluginName","editingDowncast","applyOperation","span","ck-user__selection","init","reconvertMarker","plugins","isLimit","listenTo","editor","_domEmitter","createUIElement","change","size","1wteAig","change:range","delete","detach","end","innerHTML","view","$text","userPositionMarker","split","markerName","requires","addMarker","render","26538tEnhma","set","stopListening","ck-user__marker ","destroy","isObject","mouseenter","createUserMarkerOperations","136053hCxMLY","getStart","remove","classList","mapper","batch","deletionPosition","nodeAfter","isDocumentOperation","154uYLCLc","isOfficialPlugin","textContent","isPremiumPlugin","isInline","hasContent","fromRange","get","spellcheck","undo","oldRange","getPositions","isSimilar","contenteditable","afterInit","getRange"];return(pr=function(){return t})()}!function(t){const e=lr,n=t();for(;;)try{if(306260===-parseInt(e(604))/1*(parseInt(e(548))/2)+parseInt(e(626))/3+-parseInt(e(587))/4+parseInt(e(556))/5+-parseInt(e(618))/6*(-parseInt(e(497))/7)+-parseInt(e(554))/8+parseInt(e(579))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(pr);class hr extends e.Plugin{[dr(600)]=new((0,n.DomEmitterMixin)());static get[dr(615)](){return[Xn]}static get[dr(589)](){return dr(584)}static get[dr(498)](){return!0}static get[dr(500)](){return!0}[dr(594)](){const t=dr,e=this[t(599)],r=e[t(596)][t(504)](Xn);e[t(552)][t(560)](t(590))[t(546)]({model:t(567),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(614)][o(613)](":")[2],a=r[o(577)](i);if(!a||i===r[o(583)])return;if(!s[o(513)][o(523)][o(541)](e[o(515)][o(542)],o(611)))return;const c={class:o(621)+a[o(533)][o(571)](),"data-name":a[o(582)],"data-session-id":i},u=s[o(513)][o(537)][o(504)](e[o(614)])[o(627)](),d=u[o(495)],l=s[o(513)][o(523)];if(d&&l[o(623)](d)&&l[o(501)](d)&&!s[o(513)][o(537)][o(504)](o(570)+i)[o(512)]()[o(540)])return;const p=u[o(519)];return s[o(513)][o(523)][o(597)](p)&&!s[o(513)][o(502)](p)&&(c[o(510)]=!1),function(t,e,n){const r=o,s=t[r(601)](r(592),e);return t[r(522)](r(612),!0,s),s[r(617)]=function(t){const e=r,s=this[e(581)](t),o=document[e(558)](e(592));return o[e(491)][e(543)](e(534)),o[e(574)](e(510),e(550)),o[e(574)](e(505),e(550)),o[e(499)]=n[e(582)],s[e(609)]=e(535)+o[e(572)]+"",s[e(531)](e(624),()=>{const t=e;s[t(491)][t(543)](t(530))}),s[e(531)](e(566),()=>{const t=e;s[t(491)][t(628)](t(530))}),s},s[r(509)]=function(t){const e=r;return!(!this[e(559)](e(612))||!t[e(559)](e(612))||this[e(563)](e(565))!=t[e(563)](e(565)))},s}(n,c,a)}(n,s,r,e)}),e[t(552)][t(560)](t(590))[t(564)]({model:t(576),view:e=>function(e,n){const r=t,s=e[r(614)][r(613)](":")[2];if(s===n[r(583)])return null;const o=n[r(577)](s);return o?{id:s,classes:[r(593),o[r(533)][r(573)]()],attributes:{"data-session-id":s},priority:2e3+o[r(539)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(513)],o=new Map,i=e[n(596)][n(504)](Xn);r[n(537)].on(n(526),(t,a,c,u)=>{const d=n;if(!u&&o[d(504)](a[d(582)]))return o[d(504)](a[d(582)])[d(607)](),void o[d(606)](a[d(582)]);const l=a[d(582)][d(613)](":")[2];if(l===i[d(583)])return;const p=d(518)+l;r[d(537)][d(588)](p)&&e[d(551)][d(595)](p),a.on(d(605),(t,e,n)=>{const i=d;if(i(536)!=e[i(561)][i(557)]&&i(536)==a[i(512)]()[i(561)][i(557)]&&!o[i(588)](a[i(582)])){const t=r[i(523)][i(547)](n[i(494)]);if(t){const e=s.ModelLiveRange[i(503)](t);o[i(619)](a[i(582)],e),e.on(i(605),(t,n,s)=>{const c=i;if(c(536)==e[c(561)][c(557)]){const t=r[c(523)][c(547)](s[c(494)]);t?(e[c(542)]=t[c(542)],e[c(608)]=t[c(608)]):(o[c(606)](a[c(582)]),e[c(607)]())}})}}})}),r[n(562)].on(n(602),()=>{const t=n;o[t(603)]>0&&r[t(538)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(536)==r[n(537)][n(504)](t)[n(512)]()[n(561)][n(557)]&&(fr(t[n(613)](":")[2],s[n(553)](),r,e),s[n(607)]());o[n(578)]()})})}(e),this[t(600)][t(598)](n.global[t(562)],t(555),(n,{key:r})=>{const s=t;s(586)===r&&function(t){const e=s;t[e(551)][e(610)][e(602)](n=>{const r=e;for(const e of t[r(513)][r(537)]){if(!e[r(582)][r(525)](r(567)))continue;const s=t[r(551)][r(492)][r(544)](e[r(582)]);if(s)for(const t of s)n[r(524)](r(530),t)}})}(e)},{useCapture:!0})}[dr(511)](){const t=dr,e=this[t(599)],n=e[t(568)][t(504)](t(506));n&&e[t(513)].on(t(591),(r,s)=>{const o=t,i=s[0];if(!i[o(496)])return;if(o(580)!=i[o(545)]||!i[o(582)][o(525)](o(516)))return;const a=i[o(493)];n[o(549)][o(588)](a)&&(i[o(532)]=i[o(507)]?e[o(513)][o(527)](i[o(507)][o(542)],i[o(507)][o(608)]):null)},{priority:t(528)})}[dr(622)](){const t=dr;return this[t(600)][t(620)](),super[t(622)]()}[dr(625)](){const t=dr,e=this[t(599)],n=e[t(513)][t(562)],r=e[t(596)][t(504)](Xn);e[t(513)][t(538)]({isUndoable:!1},s=>{const o=t,i=o(570)+r[o(583)],a=o(518)+r[o(583)],c=e[o(513)][o(537)][o(588)](i);e[o(551)][o(610)][o(521)]?fr(r[o(583)],n[o(575)][o(517)](),e[o(513)],s):c&&(s[o(569)](i),s[o(569)](a))})}}function fr(t,e,n,r){const s=dr,o=s(570)+t,i=s(518)+t,a=e[s(514)]();let c=e[s(542)];if(a&&a.is(s(585),s(529))){const t=function(t,e){const n=s;for(const r of t[n(508)]())if(e[n(523)][n(541)](r,n(611)))return r}(e,n);t&&(c=t,e=r[s(527)](c))}const u=r[s(527)](c);n[s(537)][s(588)](o)?(r[s(520)](o,{range:e}),r[s(520)](i,{range:u})):(r[s(616)](o,{range:e,usingOperation:!0}),r[s(616)](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 yr(){var t=["arrays","oldValueJson","type.googleapis.com",".AttributeOperation.range: object expected","name","2MiEyqi",".MoveOperation.targetPosition: object expected",".InsertOperation.nodes: array expected","rootMain: boolean expected","children","isArray",".Element.attributesBoolean: object expected","RenameOperation","boolean","wasUndone: boolean expected","/Position","/MergeOperation","nodes.","attributesBoolean",".Position.path: array expected","howMany","verify","sourcePosition","oldValueBoolean",".RenameOperation.position: object expected","insertionPosition.","end",".Range.end: object expected","howMany: integer expected","oldValueJson: string expected","shouldReceiveAttributes","newRange.","isObject","emptyObject","736552xKCJQw","newValueBoolean: boolean expected","9ASUbQd","getTypeUrl","/RootAttributeOperation","Writer","graveyardPosition.","encode","isString","uint32","name: string expected","keys","newValueJson: string expected","/Element","/InsertOperation","oldName: string expected","sourcePosition.","splitPosition.","objects","fromObject","newRange","stickiness: string expected","isInteger","1680980QpyiSM","path","RootAttributeOperation","471300ituruw","rootGraveyard: boolean expected","decode","range.",".InsertOperation.nodes: object expected","skipType","key","children.","oldRange","6bAkgfg","355579uMBUgA","path: integer[] expected","object","/MoveOperation","prototype","oldName","Range","defaults","elementName","RootOperation","util","decodeDelimited","attributesBoolean: object expected","ldelim","string","stickiness","MergeOperation",".SplitOperation.graveyardPosition: object expected","range","/MarkerOperation","SplitOperation","default","shouldReceiveAttributes: boolean expected","start",".MarkerOperation.oldRange: object expected","1427107qCKopK","/RootOperation","end.","MoveOperation","data","/RenameOperation","/Range","elementName: string expected","MarkerOperation","Reader",".InsertOperation.position: object expected",".MoveOperation.sourcePosition: object expected",".Element.children: object expected","rootGraveyard","root","push","object expected","affectsData","children: array expected","toObject","newValueBoolean","length","constructor","bool","nodes","InsertOperation","Position","targetPosition.","graveyardPosition","targetPosition",".Element.children: array expected","roots","toJSON","emptyArray",".MergeOperation.targetPosition: object expected","Element","affectsData: boolean expected","3TTuORV","2069712LOvJSe","create","116462tZnwNT","wasUndone","oldRange.","attributesJson: string expected","AttributeOperation","key: string expected","attributesJson","rootName: string expected","position","splitPosition",".SplitOperation.insertionPosition: object expected","isAdd: boolean expected","12KScKIT","rootName","toJSONOptions",".MergeOperation.sourcePosition: object expected","isAdd","/SplitOperation","insertionPosition",".MergeOperation.graveyardPosition: object expected","hasOwnProperty","/AttributeOperation",".Range.start: object expected","start.",".MarkerOperation.newRange: object expected","call","pos","newName","nodes: array expected","position.","len","encodeDelimited","rootMain","root: string expected","newValueJson","data: string expected","path: array expected","attributesBoolean: boolean{k:string} expected",".SplitOperation.splitPosition: object expected","fork","oldValueBoolean: boolean expected","newName: string expected"];return(yr=function(){return t})()}function gr(t,e){var n=yr();return(gr=function(t,e){return n[t-=110]})(t,e)}!function(t){for(var e=gr,n=t();;)try{if(142972===parseInt(e(169))/1*(-parseInt(e(216))/2)+parseInt(e(166))/3*(parseInt(e(245))/4)+-parseInt(e(271))/5+-parseInt(e(280))/6*(parseInt(e(281))/7)+parseInt(e(167))/8+-parseInt(e(247))/9*(parseInt(e(268))/10)+parseInt(e(129))/11*(parseInt(e(181))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yr);const br=(()=>{var t=gr,e=u[t(138)],n=u[t(250)],r=u[t(114)],s=u[t(160)][t(125)]||(u[t(160)][t(125)]={});return s[t(173)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(122)]=null,i[o(285)][o(277)]="",i[o(285)][o(234)]=!1,i[o(285)][o(212)]="",i[o(285)][o(149)]=!1,i[o(285)][o(203)]="",i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(122)]&&Object[r(189)][r(194)](t,r(122))&&s[r(110)][r(252)](t[r(122)],e[r(254)](10)[r(208)]())[r(117)](),null!=t[r(277)]&&Object[r(189)][r(194)](t,r(277))&&e[r(254)](18)[r(118)](t[r(277)]),null!=t[r(234)]&&Object[r(189)][r(194)](t,r(234))&&e[r(254)](24)[r(152)](t[r(234)]),null!=t[r(212)]&&Object[r(189)][r(194)](t,r(212))&&e[r(254)](34)[r(118)](t[r(212)]),null!=t[r(149)]&&Object[r(189)][r(194)](t,r(149))&&e[r(254)](40)[r(152)](t[r(149)]),null!=t[r(203)]&&Object[r(189)][r(194)](t,r(203))&&e[r(254)](50)[r(118)](t[r(203)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](56)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(173)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(122)]=s[r(110)][r(273)](t,t[r(254)]());break;case 2:a[r(277)]=t[r(118)]();break;case 3:a[r(234)]=t[r(152)]();break;case 4:a[r(212)]=t[r(118)]();break;case 5:a[r(149)]=t[r(152)]();break;case 6:a[r(203)]=t[r(118)]();break;case 7:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;if(e(283)!=typeof t||null===t)return e(145);if(null!=t[e(122)]&&t[e(189)](e(122))){var n=s[e(110)][e(232)](t[e(122)]);if(n)return e(274)+n}return null!=t[e(277)]&&t[e(189)](e(277))&&!r[e(253)](t[e(277)])?e(174):null!=t[e(234)]&&t[e(189)](e(234))&&e(224)!=typeof t[e(234)]?e(209):null!=t[e(212)]&&t[e(189)](e(212))&&!r[e(253)](t[e(212)])?e(240):null!=t[e(149)]&&t[e(189)](e(149))&&e(224)!=typeof t[e(149)]?e(246):null!=t[e(203)]&&t[e(189)](e(203))&&!r[e(253)](t[e(203)])?e(257):null!=t[e(170)]&&t[e(189)](e(170))&&e(224)!=typeof t[e(170)]?e(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(173)])return t;var n=new(s[e(173)]);if(null!=t[e(122)]){if(e(283)!=typeof t[e(122)])throw TypeError(e(214));n[e(122)]=s[e(110)][e(264)](t[e(122)])}return null!=t[e(277)]&&(n[e(277)]=String(t[e(277)])),null!=t[e(234)]&&(n[e(234)]=Boolean(t[e(234)])),null!=t[e(212)]&&(n[e(212)]=String(t[e(212)])),null!=t[e(149)]&&(n[e(149)]=Boolean(t[e(149)])),null!=t[e(203)]&&(n[e(203)]=String(t[e(203)])),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(122)]=null,r[n(277)]="",r[n(234)]=!1,r[n(212)]="",r[n(149)]=!1,r[n(203)]="",r[n(170)]=!1),null!=t[n(122)]&&t[n(189)](n(122))&&(r[n(122)]=s[n(110)][n(148)](t[n(122)],e)),null!=t[n(277)]&&t[n(189)](n(277))&&(r[n(277)]=t[n(277)]),null!=t[n(234)]&&t[n(189)](n(234))&&(r[n(234)]=t[n(234)]),null!=t[n(212)]&&t[n(189)](n(212))&&(r[n(212)]=t[n(212)]),null!=t[n(149)]&&t[n(189)](n(149))&&(r[n(149)]=t[n(149)]),null!=t[n(203)]&&t[n(189)](n(203))&&(r[n(203)]=t[n(203)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(190)},i}(),s[t(154)]=function(){var o=t;function i(t){var e=gr;if(this[e(153)]=[],t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(177)]=null,i[o(285)][o(153)]=r[o(162)],i[o(285)][o(241)]=!1,i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;if(e||(e=n[r(168)]()),null!=t[r(177)]&&Object[r(189)][r(194)](t,r(177))&&s[r(155)][r(252)](t[r(177)],e[r(254)](10)[r(208)]())[r(117)](),null!=t[r(153)]&&t[r(153)][r(150)])for(var i=0;i<t[r(153)][r(150)];++i)s[r(164)][r(252)](t[r(153)][i],e[r(254)](18)[r(208)]())[r(117)]();return null!=t[r(241)]&&Object[r(189)][r(194)](t,r(241))&&e[r(254)](24)[r(152)](t[r(241)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](32)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(154)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(177)]=s[r(155)][r(273)](t,t[r(254)]());break;case 2:a[r(153)]&&a[r(153)][r(150)]||(a[r(153)]=[]),a[r(153)][r(144)](s[r(164)][r(273)](t,t[r(254)]()));break;case 3:a[r(241)]=t[r(152)]();break;case 4:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;if(e(283)!=typeof t||null===t)return e(145);if(null!=t[e(177)]&&t[e(189)](e(177))&&(r=s[e(155)][e(232)](t[e(177)])))return e(198)+r;if(null!=t[e(153)]&&t[e(189)](e(153))){if(!Array[e(221)](t[e(153)]))return e(197);for(var n=0;n<t[e(153)][e(150)];++n){var r;if(r=s[e(164)][e(232)](t[e(153)][n]))return e(228)+r}}return null!=t[e(241)]&&t[e(189)](e(241))&&e(224)!=typeof t[e(241)]?e(126):null!=t[e(170)]&&t[e(189)](e(170))&&e(224)!=typeof t[e(170)]?e(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(154)])return t;var n=new(s[e(154)]);if(null!=t[e(177)]){if(e(283)!=typeof t[e(177)])throw TypeError(e(139));n[e(177)]=s[e(155)][e(264)](t[e(177)])}if(t[e(153)]){if(!Array[e(221)](t[e(153)]))throw TypeError(e(218));n[e(153)]=[];for(var r=0;r<t[e(153)][e(150)];++r){if(e(283)!=typeof t[e(153)][r])throw TypeError(e(275));n[e(153)][r]=s[e(164)][e(264)](t[e(153)][r])}}return null!=t[e(241)]&&(n[e(241)]=Boolean(t[e(241)])),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(211)]||e[n(111)])&&(r[n(153)]=[]),e[n(111)]&&(r[n(177)]=null,r[n(241)]=!1,r[n(170)]=!1),null!=t[n(177)]&&t[n(189)](n(177))&&(r[n(177)]=s[n(155)][n(148)](t[n(177)],e)),t[n(153)]&&t[n(153)][n(150)]){r[n(153)]=[];for(var i=0;i<t[n(153)][n(150)];++i)r[n(153)][i]=s[n(164)][n(148)](t[n(153)][i],e)}return null!=t[n(241)]&&t[n(189)](n(241))&&(r[n(241)]=t[n(241)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(259)},i}(),s[t(137)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(215)]="",i[o(285)][o(279)]=null,i[o(285)][o(265)]=null,i[o(285)][o(146)]=!1,i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(215)]&&Object[r(189)][r(194)](t,r(215))&&e[r(254)](10)[r(118)](t[r(215)]),null!=t[r(279)]&&Object[r(189)][r(194)](t,r(279))&&s[r(110)][r(252)](t[r(279)],e[r(254)](18)[r(208)]())[r(117)](),null!=t[r(265)]&&Object[r(189)][r(194)](t,r(265))&&s[r(110)][r(252)](t[r(265)],e[r(254)](26)[r(208)]())[r(117)](),null!=t[r(146)]&&Object[r(189)][r(194)](t,r(146))&&e[r(254)](32)[r(152)](t[r(146)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](40)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(137)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(215)]=t[r(118)]();break;case 2:a[r(279)]=s[r(110)][r(273)](t,t[r(254)]());break;case 3:a[r(265)]=s[r(110)][r(273)](t,t[r(254)]());break;case 4:a[r(146)]=t[r(152)]();break;case 5:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e,n=o;return n(283)!=typeof t||null===t?n(145):null!=t[n(215)]&&t[n(189)](n(215))&&!r[n(253)](t[n(215)])?n(255):null!=t[n(279)]&&t[n(189)](n(279))&&(e=s[n(110)][n(232)](t[n(279)]))?n(171)+e:null!=t[n(265)]&&t[n(189)](n(265))&&(e=s[n(110)][n(232)](t[n(265)]))?n(242)+e:null!=t[n(146)]&&t[n(189)](n(146))&&n(224)!=typeof t[n(146)]?n(165):null!=t[n(170)]&&t[n(189)](n(170))&&n(224)!=typeof t[n(170)]?n(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(137)])return t;var n=new(s[e(137)]);if(null!=t[e(215)]&&(n[e(215)]=String(t[e(215)])),null!=t[e(279)]){if(e(283)!=typeof t[e(279)])throw TypeError(e(128));n[e(279)]=s[e(110)][e(264)](t[e(279)])}if(null!=t[e(265)]){if(e(283)!=typeof t[e(265)])throw TypeError(e(193));n[e(265)]=s[e(110)][e(264)](t[e(265)])}return null!=t[e(146)]&&(n[e(146)]=Boolean(t[e(146)])),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(215)]="",r[n(279)]=null,r[n(265)]=null,r[n(146)]=!1,r[n(170)]=!1),null!=t[n(215)]&&t[n(189)](n(215))&&(r[n(215)]=t[n(215)]),null!=t[n(279)]&&t[n(189)](n(279))&&(r[n(279)]=s[n(110)][n(148)](t[n(279)],e)),null!=t[n(265)]&&t[n(189)](n(265))&&(r[n(265)]=s[n(110)][n(148)](t[n(265)],e)),null!=t[n(146)]&&t[n(189)](n(146))&&(r[n(146)]=t[n(146)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(123)},i}(),s[t(120)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(233)]=null,i[o(285)][o(158)]=null,i[o(285)][o(157)]=null,i[o(285)][o(231)]=0,i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(233)]&&Object[r(189)][r(194)](t,r(233))&&s[r(155)][r(252)](t[r(233)],e[r(254)](10)[r(208)]())[r(117)](),null!=t[r(158)]&&Object[r(189)][r(194)](t,r(158))&&s[r(155)][r(252)](t[r(158)],e[r(254)](18)[r(208)]())[r(117)](),null!=t[r(157)]&&Object[r(189)][r(194)](t,r(157))&&s[r(155)][r(252)](t[r(157)],e[r(254)](26)[r(208)]())[r(117)](),null!=t[r(231)]&&Object[r(189)][r(194)](t,r(231))&&e[r(254)](32)[r(254)](t[r(231)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](40)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(120)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(233)]=s[r(155)][r(273)](t,t[r(254)]());break;case 2:a[r(158)]=s[r(155)][r(273)](t,t[r(254)]());break;case 3:a[r(157)]=s[r(155)][r(273)](t,t[r(254)]());break;case 4:a[r(231)]=t[r(254)]();break;case 5:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e,n=o;return n(283)!=typeof t||null===t?n(145):null!=t[n(233)]&&t[n(189)](n(233))&&(e=s[n(155)][n(232)](t[n(233)]))?n(261)+e:null!=t[n(158)]&&t[n(189)](n(158))&&(e=s[n(155)][n(232)](t[n(158)]))?n(156)+e:null!=t[n(157)]&&t[n(189)](n(157))&&(e=s[n(155)][n(232)](t[n(157)]))?n(251)+e:null!=t[n(231)]&&t[n(189)](n(231))&&!r[n(267)](t[n(231)])?n(239):null!=t[n(170)]&&t[n(189)](n(170))&&n(224)!=typeof t[n(170)]?n(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(120)])return t;var n=new(s[e(120)]);if(null!=t[e(233)]){if(e(283)!=typeof t[e(233)])throw TypeError(e(184));n[e(233)]=s[e(155)][e(264)](t[e(233)])}if(null!=t[e(158)]){if(e(283)!=typeof t[e(158)])throw TypeError(e(163));n[e(158)]=s[e(155)][e(264)](t[e(158)])}if(null!=t[e(157)]){if(e(283)!=typeof t[e(157)])throw TypeError(e(188));n[e(157)]=s[e(155)][e(264)](t[e(157)])}return null!=t[e(231)]&&(n[e(231)]=t[e(231)]>>>0),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(233)]=null,r[n(158)]=null,r[n(157)]=null,r[n(231)]=0,r[n(170)]=!1),null!=t[n(233)]&&t[n(189)](n(233))&&(r[n(233)]=s[n(155)][n(148)](t[n(233)],e)),null!=t[n(158)]&&t[n(189)](n(158))&&(r[n(158)]=s[n(155)][n(148)](t[n(158)],e)),null!=t[n(157)]&&t[n(189)](n(157))&&(r[n(157)]=s[n(155)][n(148)](t[n(157)],e)),null!=t[n(231)]&&t[n(189)](n(231))&&(r[n(231)]=t[n(231)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(227)},i}(),s[t(132)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(233)]=null,i[o(285)][o(231)]=0,i[o(285)][o(158)]=null,i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(233)]&&Object[r(189)][r(194)](t,r(233))&&s[r(155)][r(252)](t[r(233)],e[r(254)](10)[r(208)]())[r(117)](),null!=t[r(231)]&&Object[r(189)][r(194)](t,r(231))&&e[r(254)](16)[r(254)](t[r(231)]),null!=t[r(158)]&&Object[r(189)][r(194)](t,r(158))&&s[r(155)][r(252)](t[r(158)],e[r(254)](26)[r(208)]())[r(117)](),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](32)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(132)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(233)]=s[r(155)][r(273)](t,t[r(254)]());break;case 2:a[r(231)]=t[r(254)]();break;case 3:a[r(158)]=s[r(155)][r(273)](t,t[r(254)]());break;case 4:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e,n=o;return n(283)!=typeof t||null===t?n(145):null!=t[n(233)]&&t[n(189)](n(233))&&(e=s[n(155)][n(232)](t[n(233)]))?n(261)+e:null!=t[n(231)]&&t[n(189)](n(231))&&!r[n(267)](t[n(231)])?n(239):null!=t[n(158)]&&t[n(189)](n(158))&&(e=s[n(155)][n(232)](t[n(158)]))?n(156)+e:null!=t[n(170)]&&t[n(189)](n(170))&&n(224)!=typeof t[n(170)]?n(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(132)])return t;var n=new(s[e(132)]);if(null!=t[e(233)]){if(e(283)!=typeof t[e(233)])throw TypeError(e(140));n[e(233)]=s[e(155)][e(264)](t[e(233)])}if(null!=t[e(231)]&&(n[e(231)]=t[e(231)]>>>0),null!=t[e(158)]){if(e(283)!=typeof t[e(158)])throw TypeError(e(217));n[e(158)]=s[e(155)][e(264)](t[e(158)])}return null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(233)]=null,r[n(231)]=0,r[n(158)]=null,r[n(170)]=!1),null!=t[n(233)]&&t[n(189)](n(233))&&(r[n(233)]=s[n(155)][n(148)](t[n(233)],e)),null!=t[n(231)]&&t[n(189)](n(231))&&(r[n(231)]=t[n(231)]),null!=t[n(158)]&&t[n(189)](n(158))&&(r[n(158)]=s[n(155)][n(148)](t[n(158)],e)),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(284)},i}(),s[t(223)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(177)]=null,i[o(285)][o(286)]="",i[o(285)][o(196)]="",i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(177)]&&Object[r(189)][r(194)](t,r(177))&&s[r(155)][r(252)](t[r(177)],e[r(254)](10)[r(208)]())[r(117)](),null!=t[r(286)]&&Object[r(189)][r(194)](t,r(286))&&e[r(254)](18)[r(118)](t[r(286)]),null!=t[r(196)]&&Object[r(189)][r(194)](t,r(196))&&e[r(254)](26)[r(118)](t[r(196)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](32)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(223)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(177)]=s[r(155)][r(273)](t,t[r(254)]());break;case 2:a[r(286)]=t[r(118)]();break;case 3:a[r(196)]=t[r(118)]();break;case 4:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;if(e(283)!=typeof t||null===t)return e(145);if(null!=t[e(177)]&&t[e(189)](e(177))){var n=s[e(155)][e(232)](t[e(177)]);if(n)return e(198)+n}return null!=t[e(286)]&&t[e(189)](e(286))&&!r[e(253)](t[e(286)])?e(260):null!=t[e(196)]&&t[e(189)](e(196))&&!r[e(253)](t[e(196)])?e(210):null!=t[e(170)]&&t[e(189)](e(170))&&e(224)!=typeof t[e(170)]?e(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(223)])return t;var n=new(s[e(223)]);if(null!=t[e(177)]){if(e(283)!=typeof t[e(177)])throw TypeError(e(235));n[e(177)]=s[e(155)][e(264)](t[e(177)])}return null!=t[e(286)]&&(n[e(286)]=String(t[e(286)])),null!=t[e(196)]&&(n[e(196)]=String(t[e(196)])),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(177)]=null,r[n(286)]="",r[n(196)]="",r[n(170)]=!1),null!=t[n(177)]&&t[n(189)](n(177))&&(r[n(177)]=s[n(155)][n(148)](t[n(177)],e)),null!=t[n(286)]&&t[n(189)](n(286))&&(r[n(286)]=t[n(286)]),null!=t[n(196)]&&t[n(189)](n(196))&&(r[n(196)]=t[n(196)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(134)},i}(),s[t(270)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(143)]="",i[o(285)][o(277)]="",i[o(285)][o(234)]=!1,i[o(285)][o(212)]="",i[o(285)][o(149)]=!1,i[o(285)][o(203)]="",i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(143)]&&Object[r(189)][r(194)](t,r(143))&&e[r(254)](10)[r(118)](t[r(143)]),null!=t[r(277)]&&Object[r(189)][r(194)](t,r(277))&&e[r(254)](18)[r(118)](t[r(277)]),null!=t[r(234)]&&Object[r(189)][r(194)](t,r(234))&&e[r(254)](24)[r(152)](t[r(234)]),null!=t[r(212)]&&Object[r(189)][r(194)](t,r(212))&&e[r(254)](34)[r(118)](t[r(212)]),null!=t[r(149)]&&Object[r(189)][r(194)](t,r(149))&&e[r(254)](40)[r(152)](t[r(149)]),null!=t[r(203)]&&Object[r(189)][r(194)](t,r(203))&&e[r(254)](50)[r(118)](t[r(203)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](56)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(270)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(143)]=t[r(118)]();break;case 2:a[r(277)]=t[r(118)]();break;case 3:a[r(234)]=t[r(152)]();break;case 4:a[r(212)]=t[r(118)]();break;case 5:a[r(149)]=t[r(152)]();break;case 6:a[r(203)]=t[r(118)]();break;case 7:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;return e(283)!=typeof t||null===t?e(145):null!=t[e(143)]&&t[e(189)](e(143))&&!r[e(253)](t[e(143)])?e(202):null!=t[e(277)]&&t[e(189)](e(277))&&!r[e(253)](t[e(277)])?e(174):null!=t[e(234)]&&t[e(189)](e(234))&&e(224)!=typeof t[e(234)]?e(209):null!=t[e(212)]&&t[e(189)](e(212))&&!r[e(253)](t[e(212)])?e(240):null!=t[e(149)]&&t[e(189)](e(149))&&e(224)!=typeof t[e(149)]?e(246):null!=t[e(203)]&&t[e(189)](e(203))&&!r[e(253)](t[e(203)])?e(257):null!=t[e(170)]&&t[e(189)](e(170))&&e(224)!=typeof t[e(170)]?e(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(270)])return t;var n=new(s[e(270)]);return null!=t[e(143)]&&(n[e(143)]=String(t[e(143)])),null!=t[e(277)]&&(n[e(277)]=String(t[e(277)])),null!=t[e(234)]&&(n[e(234)]=Boolean(t[e(234)])),null!=t[e(212)]&&(n[e(212)]=String(t[e(212)])),null!=t[e(149)]&&(n[e(149)]=Boolean(t[e(149)])),null!=t[e(203)]&&(n[e(203)]=String(t[e(203)])),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(143)]="",r[n(277)]="",r[n(234)]=!1,r[n(212)]="",r[n(149)]=!1,r[n(203)]="",r[n(170)]=!1),null!=t[n(143)]&&t[n(189)](n(143))&&(r[n(143)]=t[n(143)]),null!=t[n(277)]&&t[n(189)](n(277))&&(r[n(277)]=t[n(277)]),null!=t[n(234)]&&t[n(189)](n(234))&&(r[n(234)]=t[n(234)]),null!=t[n(212)]&&t[n(189)](n(212))&&(r[n(212)]=t[n(212)]),null!=t[n(149)]&&t[n(189)](n(149))&&(r[n(149)]=t[n(149)]),null!=t[n(203)]&&t[n(189)](n(203))&&(r[n(203)]=t[n(203)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(249)},i}(),s[t(113)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(182)]="",i[o(285)][o(112)]="",i[o(285)][o(185)]=!1,i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(182)]&&Object[r(189)][r(194)](t,r(182))&&e[r(254)](10)[r(118)](t[r(182)]),null!=t[r(112)]&&Object[r(189)][r(194)](t,r(112))&&e[r(254)](18)[r(118)](t[r(112)]),null!=t[r(185)]&&Object[r(189)][r(194)](t,r(185))&&e[r(254)](24)[r(152)](t[r(185)]),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](32)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(113)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(182)]=t[r(118)]();break;case 2:a[r(112)]=t[r(118)]();break;case 3:a[r(185)]=t[r(152)]();break;case 4:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;return e(283)!=typeof t||null===t?e(145):null!=t[e(182)]&&t[e(189)](e(182))&&!r[e(253)](t[e(182)])?e(176):null!=t[e(112)]&&t[e(189)](e(112))&&!r[e(253)](t[e(112)])?e(136):null!=t[e(185)]&&t[e(189)](e(185))&&e(224)!=typeof t[e(185)]?e(180):null!=t[e(170)]&&t[e(189)](e(170))&&e(224)!=typeof t[e(170)]?e(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(113)])return t;var n=new(s[e(113)]);return null!=t[e(182)]&&(n[e(182)]=String(t[e(182)])),null!=t[e(112)]&&(n[e(112)]=String(t[e(112)])),null!=t[e(185)]&&(n[e(185)]=Boolean(t[e(185)])),null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(182)]="",r[n(112)]="",r[n(185)]=!1,r[n(170)]=!1),null!=t[n(182)]&&t[n(189)](n(182))&&(r[n(182)]=t[n(182)]),null!=t[n(112)]&&t[n(189)](n(112))&&(r[n(112)]=t[n(112)]),null!=t[n(185)]&&t[n(189)](n(185))&&(r[n(185)]=t[n(185)]),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(130)},i}(),s[t(124)]=function(){var o=t;function i(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(178)]=null,i[o(285)][o(157)]=null,i[o(285)][o(231)]=0,i[o(285)][o(187)]=null,i[o(285)][o(170)]=!1,i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;return e||(e=n[r(168)]()),null!=t[r(178)]&&Object[r(189)][r(194)](t,r(178))&&s[r(155)][r(252)](t[r(178)],e[r(254)](10)[r(208)]())[r(117)](),null!=t[r(157)]&&Object[r(189)][r(194)](t,r(157))&&s[r(155)][r(252)](t[r(157)],e[r(254)](18)[r(208)]())[r(117)](),null!=t[r(231)]&&Object[r(189)][r(194)](t,r(231))&&e[r(254)](24)[r(254)](t[r(231)]),null!=t[r(187)]&&Object[r(189)][r(194)](t,r(187))&&s[r(155)][r(252)](t[r(187)],e[r(254)](34)[r(208)]())[r(117)](),null!=t[r(170)]&&Object[r(189)][r(194)](t,r(170))&&e[r(254)](40)[r(152)](t[r(170)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(124)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(178)]=s[r(155)][r(273)](t,t[r(254)]());break;case 2:a[r(157)]=s[r(155)][r(273)](t,t[r(254)]());break;case 3:a[r(231)]=t[r(254)]();break;case 4:a[r(187)]=s[r(155)][r(273)](t,t[r(254)]());break;case 5:a[r(170)]=t[r(152)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e,n=o;return n(283)!=typeof t||null===t?n(145):null!=t[n(178)]&&t[n(189)](n(178))&&(e=s[n(155)][n(232)](t[n(178)]))?n(262)+e:null!=t[n(157)]&&t[n(189)](n(157))&&(e=s[n(155)][n(232)](t[n(157)]))?n(251)+e:null!=t[n(231)]&&t[n(189)](n(231))&&!r[n(267)](t[n(231)])?n(239):null!=t[n(187)]&&t[n(189)](n(187))&&(e=s[n(155)][n(232)](t[n(187)]))?n(236)+e:null!=t[n(170)]&&t[n(189)](n(170))&&n(224)!=typeof t[n(170)]?n(225):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(124)])return t;var n=new(s[e(124)]);if(null!=t[e(178)]){if(e(283)!=typeof t[e(178)])throw TypeError(e(207));n[e(178)]=s[e(155)][e(264)](t[e(178)])}if(null!=t[e(157)]){if(e(283)!=typeof t[e(157)])throw TypeError(e(121));n[e(157)]=s[e(155)][e(264)](t[e(157)])}if(null!=t[e(231)]&&(n[e(231)]=t[e(231)]>>>0),null!=t[e(187)]){if(e(283)!=typeof t[e(187)])throw TypeError(e(179));n[e(187)]=s[e(155)][e(264)](t[e(187)])}return null!=t[e(170)]&&(n[e(170)]=Boolean(t[e(170)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};return e[n(111)]&&(r[n(178)]=null,r[n(157)]=null,r[n(231)]=0,r[n(187)]=null,r[n(170)]=!1),null!=t[n(178)]&&t[n(189)](n(178))&&(r[n(178)]=s[n(155)][n(148)](t[n(178)],e)),null!=t[n(157)]&&t[n(189)](n(157))&&(r[n(157)]=s[n(155)][n(148)](t[n(157)],e)),null!=t[n(231)]&&t[n(189)](n(231))&&(r[n(231)]=t[n(231)]),null!=t[n(187)]&&t[n(189)](n(187))&&(r[n(187)]=s[n(155)][n(148)](t[n(187)],e)),null!=t[n(170)]&&t[n(189)](n(170))&&(r[n(170)]=t[n(170)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(186)},i}(),s[t(155)]=function(){var o=t;function i(t){var e=gr;if(this[e(269)]=[],t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(143)]="",i[o(285)][o(201)]=!1,i[o(285)][o(142)]=!1,i[o(285)][o(269)]=r[o(162)],i[o(285)][o(119)]="",i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;if(e||(e=n[r(168)]()),null!=t[r(143)]&&Object[r(189)][r(194)](t,r(143))&&e[r(254)](10)[r(118)](t[r(143)]),null!=t[r(201)]&&Object[r(189)][r(194)](t,r(201))&&e[r(254)](16)[r(152)](t[r(201)]),null!=t[r(142)]&&Object[r(189)][r(194)](t,r(142))&&e[r(254)](24)[r(152)](t[r(142)]),null!=t[r(269)]&&t[r(269)][r(150)]){e[r(254)](34)[r(208)]();for(var s=0;s<t[r(269)][r(150)];++s)e[r(254)](t[r(269)][s]);e[r(117)]()}return null!=t[r(119)]&&Object[r(189)][r(194)](t,r(119))&&e[r(254)](42)[r(118)](t[r(119)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var r=o;t instanceof e||(t=e[r(168)](t));for(var i=void 0===n?t[r(199)]:t[r(195)]+n,a=new(s[r(155)]);t[r(195)]<i;){var c=t[r(254)]();switch(c>>>3){case 1:a[r(143)]=t[r(118)]();break;case 2:a[r(201)]=t[r(152)]();break;case 3:a[r(142)]=t[r(152)]();break;case 4:if(a[r(269)]&&a[r(269)][r(150)]||(a[r(269)]=[]),2==(7&c))for(var u=t[r(254)]()+t[r(195)];t[r(195)]<u;)a[r(269)][r(144)](t[r(254)]());else a[r(269)][r(144)](t[r(254)]());break;case 5:a[r(119)]=t[r(118)]();break;default:t[r(276)](7&c)}}return a},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;if(e(283)!=typeof t||null===t)return e(145);if(null!=t[e(143)]&&t[e(189)](e(143))&&!r[e(253)](t[e(143)]))return e(202);if(null!=t[e(201)]&&t[e(189)](e(201))&&e(224)!=typeof t[e(201)])return e(219);if(null!=t[e(142)]&&t[e(189)](e(142))&&e(224)!=typeof t[e(142)])return e(272);if(null!=t[e(269)]&&t[e(189)](e(269))){if(!Array[e(221)](t[e(269)]))return e(205);for(var n=0;n<t[e(269)][e(150)];++n)if(!r[e(267)](t[e(269)][n]))return e(282)}return null!=t[e(119)]&&t[e(189)](e(119))&&!r[e(253)](t[e(119)])?e(266):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(155)])return t;var n=new(s[e(155)]);if(null!=t[e(143)]&&(n[e(143)]=String(t[e(143)])),null!=t[e(201)]&&(n[e(201)]=Boolean(t[e(201)])),null!=t[e(142)]&&(n[e(142)]=Boolean(t[e(142)])),t[e(269)]){if(!Array[e(221)](t[e(269)]))throw TypeError(e(230));n[e(269)]=[];for(var r=0;r<t[e(269)][e(150)];++r)n[e(269)][r]=t[e(269)][r]>>>0}return null!=t[e(119)]&&(n[e(119)]=String(t[e(119)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(211)]||e[n(111)])&&(r[n(269)]=[]),e[n(111)]&&(r[n(143)]="",r[n(201)]=!1,r[n(142)]=!1,r[n(119)]=""),null!=t[n(143)]&&t[n(189)](n(143))&&(r[n(143)]=t[n(143)]),null!=t[n(201)]&&t[n(189)](n(201))&&(r[n(201)]=t[n(201)]),null!=t[n(142)]&&t[n(189)](n(142))&&(r[n(142)]=t[n(142)]),t[n(269)]&&t[n(269)][n(150)]){r[n(269)]=[];for(var s=0;s<t[n(269)][n(150)];++s)r[n(269)][s]=t[n(269)][s]}return null!=t[n(119)]&&t[n(189)](n(119))&&(r[n(119)]=t[n(119)]),r},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(226)},i}(),s[t(110)]=function(){var r=t;function o(t){var e=gr;if(t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(285)][r(127)]=null,o[r(285)][r(237)]=null,o[r(168)]=function(t){return new o(t)},o[r(252)]=function(t,e){var o=r;return e||(e=n[o(168)]()),null!=t[o(127)]&&Object[o(189)][o(194)](t,o(127))&&s[o(155)][o(252)](t[o(127)],e[o(254)](10)[o(208)]())[o(117)](),null!=t[o(237)]&&Object[o(189)][o(194)](t,o(237))&&s[o(155)][o(252)](t[o(237)],e[o(254)](18)[o(208)]())[o(117)](),e},o[r(200)]=function(t,e){var n=r;return this[n(252)](t,e)[n(117)]()},o[r(273)]=function(t,n){var o=r;t instanceof e||(t=e[o(168)](t));for(var i=void 0===n?t[o(199)]:t[o(195)]+n,a=new(s[o(110)]);t[o(195)]<i;){var c=t[o(254)]();switch(c>>>3){case 1:a[o(127)]=s[o(155)][o(273)](t,t[o(254)]());break;case 2:a[o(237)]=s[o(155)][o(273)](t,t[o(254)]());break;default:t[o(276)](7&c)}}return a},o[r(115)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},o[r(232)]=function(t){var e,n=r;return n(283)!=typeof t||null===t?n(145):null!=t[n(127)]&&t[n(189)](n(127))&&(e=s[n(155)][n(232)](t[n(127)]))?n(192)+e:null!=t[n(237)]&&t[n(189)](n(237))&&(e=s[n(155)][n(232)](t[n(237)]))?n(131)+e:null},o[r(264)]=function(t){var e=r;if(t instanceof s[e(110)])return t;var n=new(s[e(110)]);if(null!=t[e(127)]){if(e(283)!=typeof t[e(127)])throw TypeError(e(191));n[e(127)]=s[e(155)][e(264)](t[e(127)])}if(null!=t[e(237)]){if(e(283)!=typeof t[e(237)])throw TypeError(e(238));n[e(237)]=s[e(155)][e(264)](t[e(237)])}return n},o[r(148)]=function(t,e){var n=r;e||(e={});var o={};return e[n(111)]&&(o[n(127)]=null,o[n(237)]=null),null!=t[n(127)]&&t[n(189)](n(127))&&(o[n(127)]=s[n(155)][n(148)](t[n(127)],e)),null!=t[n(237)]&&t[n(189)](n(237))&&(o[n(237)]=s[n(155)][n(148)](t[n(237)],e)),o},o[r(285)][r(161)]=function(){var t=r;return this[t(151)][t(148)](this,u[t(114)][t(183)])},o[r(248)]=function(t){var e=r;return void 0===t&&(t=e(213)),t+e(135)},o}(),s[t(164)]=function(){var o=t;function i(t){var e=gr;if(this[e(220)]=[],this[e(229)]={},t)for(var n=Object[e(256)](t),r=0;r<n[e(150)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(285)][o(215)]="",i[o(285)][o(220)]=r[o(162)],i[o(285)][o(133)]="",i[o(285)][o(229)]=r[o(244)],i[o(285)][o(175)]="",i[o(168)]=function(t){return new i(t)},i[o(252)]=function(t,e){var r=o;if(e||(e=n[r(168)]()),null!=t[r(215)]&&Object[r(189)][r(194)](t,r(215))&&e[r(254)](10)[r(118)](t[r(215)]),null!=t[r(220)]&&t[r(220)][r(150)])for(var i=0;i<t[r(220)][r(150)];++i)s[r(164)][r(252)](t[r(220)][i],e[r(254)](18)[r(208)]())[r(117)]();if(null!=t[r(133)]&&Object[r(189)][r(194)](t,r(133))&&e[r(254)](26)[r(118)](t[r(133)]),null!=t[r(229)]&&Object[r(189)][r(194)](t,r(229))){var a=Object[r(256)](t[r(229)]);for(i=0;i<a[r(150)];++i)e[r(254)](34)[r(208)]()[r(254)](10)[r(118)](a[i])[r(254)](16)[r(152)](t[r(229)][a[i]])[r(117)]()}return null!=t[r(175)]&&Object[r(189)][r(194)](t,r(175))&&e[r(254)](42)[r(118)](t[r(175)]),e},i[o(200)]=function(t,e){var n=o;return this[n(252)](t,e)[n(117)]()},i[o(273)]=function(t,n){var i=o;t instanceof e||(t=e[i(168)](t));for(var a,c,u=void 0===n?t[i(199)]:t[i(195)]+n,d=new(s[i(164)]);t[i(195)]<u;){var l=t[i(254)]();switch(l>>>3){case 1:d[i(215)]=t[i(118)]();break;case 2:d[i(220)]&&d[i(220)][i(150)]||(d[i(220)]=[]),d[i(220)][i(144)](s[i(164)][i(273)](t,t[i(254)]()));break;case 3:d[i(133)]=t[i(118)]();break;case 4:d[i(229)]===r[i(244)]&&(d[i(229)]={});var p=t[i(254)]()+t[i(195)];for(a="",c=!1;t[i(195)]<p;){var h=t[i(254)]();switch(h>>>3){case 1:a=t[i(118)]();break;case 2:c=t[i(152)]();break;default:t[i(276)](7&h)}}d[i(229)][a]=c;break;case 5:d[i(175)]=t[i(118)]();break;default:t[i(276)](7&l)}}return d},i[o(115)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(273)](t,t[n(254)]())},i[o(232)]=function(t){var e=o;if(e(283)!=typeof t||null===t)return e(145);if(null!=t[e(215)]&&t[e(189)](e(215))&&!r[e(253)](t[e(215)]))return e(255);if(null!=t[e(220)]&&t[e(189)](e(220))){if(!Array[e(221)](t[e(220)]))return e(147);for(var n=0;n<t[e(220)][e(150)];++n){var i=s[e(164)][e(232)](t[e(220)][n]);if(i)return e(278)+i}}if(null!=t[e(133)]&&t[e(189)](e(133))&&!r[e(253)](t[e(133)]))return e(204);if(null!=t[e(229)]&&t[e(189)](e(229))){if(!r[e(243)](t[e(229)]))return e(116);var a=Object[e(256)](t[e(229)]);for(n=0;n<a[e(150)];++n)if(e(224)!=typeof t[e(229)][a[n]])return e(206)}return null!=t[e(175)]&&t[e(189)](e(175))&&!r[e(253)](t[e(175)])?e(172):null},i[o(264)]=function(t){var e=o;if(t instanceof s[e(164)])return t;var n=new(s[e(164)]);if(null!=t[e(215)]&&(n[e(215)]=String(t[e(215)])),t[e(220)]){if(!Array[e(221)](t[e(220)]))throw TypeError(e(159));n[e(220)]=[];for(var r=0;r<t[e(220)][e(150)];++r){if(e(283)!=typeof t[e(220)][r])throw TypeError(e(141));n[e(220)][r]=s[e(164)][e(264)](t[e(220)][r])}}if(null!=t[e(133)]&&(n[e(133)]=String(t[e(133)])),t[e(229)]){if(e(283)!=typeof t[e(229)])throw TypeError(e(222));n[e(229)]={};var i=Object[e(256)](t[e(229)]);for(r=0;r<i[e(150)];++r)n[e(229)][i[r]]=Boolean(t[e(229)][i[r]])}return null!=t[e(175)]&&(n[e(175)]=String(t[e(175)])),n},i[o(148)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(211)]||e[n(111)])&&(i[n(220)]=[]),(e[n(263)]||e[n(111)])&&(i[n(229)]={}),e[n(111)]&&(i[n(215)]="",i[n(133)]="",i[n(175)]=""),null!=t[n(215)]&&t[n(189)](n(215))&&(i[n(215)]=t[n(215)]),t[n(220)]&&t[n(220)][n(150)]){i[n(220)]=[];for(var a=0;a<t[n(220)][n(150)];++a)i[n(220)][a]=s[n(164)][n(148)](t[n(220)][a],e)}if(null!=t[n(133)]&&t[n(189)](n(133))&&(i[n(133)]=t[n(133)]),t[n(229)]&&(r=Object[n(256)](t[n(229)]))[n(150)])for(i[n(229)]={},a=0;a<r[n(150)];++a)i[n(229)][r[a]]=t[n(229)][r[a]];return null!=t[n(175)]&&t[n(189)](n(175))&&(i[n(175)]=t[n(175)]),i},i[o(285)][o(161)]=function(){var t=o;return this[t(151)][t(148)](this,u[t(114)][t(183)])},i[o(248)]=function(t){var e=o;return void 0===t&&(t=e(213)),t+e(258)},i}(),s})(),Ir=Or;function Or(t,e){const n=wr();return(Or=function(t,e){return n[t-=477]})(t,e)}!function(t){const e=Or,n=t();for(;;)try{if(933039===parseInt(e(486))/1+-parseInt(e(495))/2*(-parseInt(e(499))/3)+-parseInt(e(483))/4*(parseInt(e(482))/5)+parseInt(e(485))/6*(-parseInt(e(488))/7)+-parseInt(e(487))/8*(-parseInt(e(490))/9)+-parseInt(e(477))/10*(parseInt(e(498))/11)+parseInt(e(497))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(wr);class vr{[Ir(484)];constructor(){this[Ir(484)]=br}[Ir(492)](t){return new Sr(this[Ir(484)][t])}}function wr(){const t=["54rjKWXd","encode","getDescriptor","decompress","_protobuf","103216fwlcyN","compress","11739240LXnYkI","11478863FPWhci","33OWehLW","10kvNhQo","toObject","verify","decode","create","5JHhxDg","4281492bNPrwK","_protobufRoot","3732czktIO","1331977SkrLRG","1915528aZBdcw","14266iytiht","finish"];return(wr=function(){return t})()}class Sr{[Ir(494)];constructor(t){this[Ir(494)]=t}[Ir(496)](t){const e=Ir,n=this[e(494)][e(479)](t);if(n)throw Error(n);return this[e(494)][e(491)](this[e(494)][e(481)](t))[e(489)]()}[Ir(493)](t){const e=Ir;return this[e(494)][e(478)](this[e(494)][e(480)](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]",Fr="[object Float32Array]",zr="[object Float64Array]";function Kr(t,e,n,r=new Map,s=void 0){const o=s?.(t,e,n,r);if(null!=o)return o;if(function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);r.set(t,e);for(let o=0;o<t.length;o++)e[o]=Kr(t[o],o,n,r,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;r.set(t,e);for(const[o,i]of t)e.set(o,Kr(i,o,n,r,s));return e}if(t instanceof Set){const e=new Set;r.set(t,e);for(const o of t)e.add(Kr(o,void 0,n,r,s));return e}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(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 Fr:case zr:case Gr:case Yr:case Hr:case xr:case Cr:case Mr:case Tr:case Rr:case _r:case jr:case Jr:case Ur:case qr:case Lr:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return r.set(t,e),Wr(e,t,n,r,s),e}return t}function Wr(t,e,n=t,r,s){const o=[...Object.keys(e),...kr(e)];for(let i=0;i<o.length;i++){const a=o[i],c=Object.getOwnPropertyDescriptor(t,a);(null==c||c.writable)&&(t[a]=Kr(e[a],a,n,r,s))}}function Xr(t,e){return function(t,e){return Kr(t,void 0,t,new Map,e)}(t,(n,r,s,o)=>{const i=e?.(n,r,s,o);if(null!=i)return i;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case Cr:case _r:case Pr:{const e=new t.constructor(t?.valueOf());return Wr(e,t),e}case Er:{const e={};return Wr(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function Qr(t){return Xr(t)}function Zr(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function $r(t,e,n,r,s,o,i){const a=i(t,e,n,r,s,o);if(void 0!==a)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return ts(t,e,o,i)}return ts(t,e,o,i)}function ts(t,e,n,r){if(Object.is(t,e))return!0;let s=Ar(t),o=Ar(e);if(s===Er&&(s=Mr),o===Er&&(o=Mr),s!==o)return!1;switch(s){case _r:return t.toString()===e.toString();case Cr:return function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t.valueOf(),e.valueOf());case Pr:case Dr:case jr:return Object.is(t.valueOf(),e.valueOf());case Tr:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}const i=(n=n??new Map).get(t),a=n.get(e);if(null!=i&&null!=a)return i===e;n.set(t,e),n.set(e,t);try{switch(s){case xr:if(t.size!==e.size)return!1;for(const[s,o]of t.entries())if(!e.has(s)||!$r(o,e.get(s),s,t,e,n,r))return!1;return!0;case Rr:{if(t.size!==e.size)return!1;const s=Array.from(t.values()),o=Array.from(e.values());for(let i=0;i<s.length;i++){const a=s[i],c=o.findIndex(s=>$r(a,s,void 0,t,e,n,r));if(-1===c)return!1;o.splice(c,1)}return!0}case Nr:case Jr:case Ur:case qr:case Lr:case"[object BigUint64Array]":case Gr:case Yr:case Hr:case"[object BigInt64Array]":case Fr:case zr:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!$r(t[s],e[s],s,t,e,n,r))return!1;return!0;case Vr:return t.byteLength===e.byteLength&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case Br:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case"[object Error]":return t.name===e.name&&t.message===e.message;case Mr:{if(!(ts(t.constructor,e.constructor,n,r)||Zr(t)&&Zr(e)))return!1;const s=[...Object.keys(t),...kr(t)],o=[...Object.keys(e),...kr(e)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const i=s[o],a=t[i];if(!Object.hasOwn(e,i))return!1;if(!$r(a,e[i],i,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function es(){}function ns(t,e){return function(t,e,n){return $r(t,e,void 0,void 0,void 0,void 0,n)}(t,e,es)}function rs(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function ss(t,e){const n=as();return(ss=function(t,e){return n[t-=101]})(t,e)}function os(t,e){const n=ss,r=Qr(t);return r[n(115)][r[n(115)][n(106)]-1]+=e,r}function is(t,e){const n=ss;return t[n(114)]===e[n(114)]&&ns(t[n(115)],e[n(115)])}function as(){const t=["rootMain","root","path","4317735AvKMVy","4683301fLZgAf","main","$graveyard","nodes","20zJwbUl","8854368xBNPeS","length","rootGraveyard","2937880gOltAc","11098NqxUVt","6YZUfpz","2416047RZWVmO","16813980XrZWUV"];return(as=function(){return t})()}function cs(t){const e=ss;ds(t,t=>(e(101)==t[e(114)]?(t[e(113)]=!0,delete t[e(114)]):e(102)==t[e(114)]&&(t[e(107)]=!0,delete t[e(114)]),t))}function us(t){const e=ss;ds(t,t=>(t[e(113)]?(t[e(114)]=e(101),delete t[e(113)]):t[e(107)]&&(t[e(114)]=e(102),delete t[e(107)]),t))}function ds(t,e){const n=ss;for(const r in t){const s=t[r];n(103)!==r&&rs(s)&&(s[n(115)]&&(s[n(114)]||s[n(113)]||s[n(107)])?t[r]=e(s):ds(s,e))}return t}!function(t){const e=ss,n=t();for(;;)try{if(694871===parseInt(e(109))/1*(parseInt(e(104))/2)+parseInt(e(111))/3+parseInt(e(108))/4+-parseInt(e(116))/5*(parseInt(e(110))/6)+parseInt(e(117))/7+parseInt(e(105))/8+-parseInt(e(112))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(as);const ls=hs;!function(t){const e=hs,n=t();for(;;)try{if(742525===-parseInt(e(366))/1+parseInt(e(370))/2*(parseInt(e(374))/3)+-parseInt(e(380))/4*(parseInt(e(369))/5)+parseInt(e(362))/6*(parseInt(e(363))/7)+-parseInt(e(378))/8*(-parseInt(e(368))/9)+parseInt(e(367))/10+parseInt(e(381))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(fs);class ps{[ls(379)];[ls(382)];[ls(376)];constructor(t,e,n){const r=ls;this[r(379)]=t,this[r(382)]=e,this[r(376)]=n}[ls(371)](t,e){const n=ls,r=e[n(364)]();return cs(r),t[n(375)][n(372)](this[n(376)][n(371)](r)),t[n(373)][n(372)](this[n(379)]),!0}[ls(365)](t,e){const n=ls;e[n(373)][n(364)]();const r=this[n(376)][n(365)](e[n(375)][n(364)]());us(r),r[n(377)]=this[n(382)],t[n(372)](r)}}function hs(t,e){const n=fs();return(hs=function(t,e){return n[t-=362]})(t,e)}function fs(){const t=["22wMBNIT","compress","push","types","227043OiSBFz","buffers","_protobufDescriptor","__className","918960MxqBCk","_id","3776116IaYGYu","7347450YPKWof","_operationName","43866WzhbmO","119Xwbcno","shift","decompress","1443889rXjUds","2421450phbMNY","99obFdHA","5MbCImP"];return(fs=function(){return t})()}const ms=ys;function ys(t,e){const n=gs();return(ys=function(t,e){return n[t-=315]})(t,e)}function gs(){const t=["oldValue","decompress","812834RULvfO","1352708bjnHUJ","shift","_operationName","types","10FkUeTQ","751380nyoZhr","_serializeOneOf","1HMlRMf","2168616jywFWj","_protobufDescriptor","__className","7LKkkoU","Json","_id","5GsOHFl","buffers","stringify","boolean","newValue","compress","352017boHxcZ","Boolean","348252sSiLGu","16765991fmtDTS","parse","push","_deserializeOneOf"];return(gs=function(){return t})()}!function(t){const e=ys,n=t();for(;;)try{if(355205===-parseInt(e(330))/1*(parseInt(e(322))/2)+-parseInt(e(328))/3+parseInt(e(323))/4*(-parseInt(e(337))/5)+parseInt(e(315))/6+-parseInt(e(334))/7*(parseInt(e(331))/8)+parseInt(e(343))/9*(parseInt(e(327))/10)+parseInt(e(316))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gs);class bs extends ps{[ms(342)](t,e){const n=ms,r=e[n(324)]();return this[n(329)](n(320),r),this[n(329)](n(341),r),cs(r),t[n(338)][n(318)](this[n(332)][n(342)](r)),t[n(326)][n(318)](this[n(336)]),!0}[ms(321)](t,e){const n=ms,{types:r,buffers:s}=e,o=this[n(332)][n(321)](s[n(324)]());r[n(324)](),this[n(319)](n(320),o),this[n(319)](n(341),o),us(o),o[n(333)]=this[n(325)],t[n(318)](o)}[ms(329)](t,e){const n=ms,r=e[t];n(340)==typeof r?e[t+n(344)]=r:e[t+n(335)]=JSON[n(339)](r)}[ms(319)](t,e){const n=ms,r=t+n(335);e[r]?(e[t]=JSON[n(317)](e[r]),delete e[r]):(e[t]=e[t+n(344)],delete e[t+n(344)])}}function Is(){const t=["_areValuesBoolean","__className","678185iMZTgl","12ZxtQwd","attributes","1128501DvBkHY","40jRbFKs","296812ebXyDM","compress","7526XgtbBH","_serializeNodesAttributes","parse","push","types","buffers","_protobufDescriptor","4391860KpqtRQ","attributesJson","decompress","nodes","shift","keys","1080894TsxZck","_operationName","_id","stringify","65WzoxQl","boolean","attributesBoolean","children","5941100kaRxUc","_deserializeNodesAttributes","3CODBjT","every","28SfgOwI"];return(Is=function(){return t})()}const Os=vs;function vs(t,e){const n=Is();return(vs=function(t,e){return n[t-=291]})(t,e)}!function(t){const e=vs,n=t();for(;;)try{if(407228===-parseInt(e(309))/1*(-parseInt(e(292))/2)+-parseInt(e(315))/3*(parseInt(e(325))/4)+parseInt(e(320))/5+-parseInt(e(305))/6*(parseInt(e(317))/7)+-parseInt(e(324))/8*(-parseInt(e(323))/9)+parseInt(e(313))/10+parseInt(e(299))/11*(-parseInt(e(321))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Is);class ws extends ps{[Os(291)](t,e){const n=Os,r=e[n(303)]();return this[n(293)](r[n(302)]),cs(r),t[n(297)][n(295)](this[n(298)][n(291)](r)),t[n(296)][n(295)](this[n(307)]),!0}[Os(301)](t,e){const n=Os,{types:r,buffers:s}=e,o=this[n(298)][n(301)](s[n(303)]());r[n(303)](),o[n(302)]||(o[n(302)]=[]),this[n(314)](o[n(302)]),us(o),o[n(319)]=this[n(306)],t[n(295)](o)}[Os(293)](t){const e=Os;for(const n of t){if(n[e(322)]){const t=n[e(322)];this[e(318)](t)?n[e(311)]=t:n[e(300)]=JSON[e(308)](t)}n[e(312)]&&this[e(293)](n[e(312)])}}[Os(314)](t){const e=Os;for(const n of t)(n[e(311)]||n[e(300)])&&(n[e(311)]?(n[e(322)]=n[e(311)],delete n[e(311)]):(n[e(322)]=JSON[e(294)](n[e(300)]),delete n[e(300)])),n[e(312)]&&this[e(314)](n[e(312)])}[Os(318)](t){const e=Os;return Object[e(304)](t)[e(316)](n=>e(310)==typeof t[n])}}const Ss=As;function ks(){const t=["4091948BsoAVf","63398mMlrwj","newRange","decompress","11639040dHxUyd","3215mDGYRA","16LVLXDr","14760uFGRdI","12000571LpggKe","8MRpQPT","length","139611YBUuES","3444975KgyPbE","156CEMISr","oldRange"];return(ks=function(){return t})()}function As(t,e){const n=ks();return(As=function(t,e){return n[t-=235]})(t,e)}!function(t){const e=As,n=t();for(;;)try{if(992205===-parseInt(e(245))/1*(parseInt(e(238))/2)+-parseInt(e(240))/3*(parseInt(e(242))/4)+parseInt(e(249))/5*(parseInt(e(236))/6)+parseInt(e(244))/7*(parseInt(e(235))/8)+parseInt(e(241))/9+-parseInt(e(248))/10+parseInt(e(237))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ks);class Ts extends ps{[Ss(247)](t,e){const n=Ss;super[n(247)](t,e);const r=t[t[n(239)]-1];r[n(243)]||(r[n(243)]=null),r[n(246)]||(r[n(246)]=null)}}var _s=Ps;function Cs(){var t=["4KuaEbk","236335jUjDLv","types","_operationName","353776gfNyYg","28WfCKBM","shift","22961GmDimu","7615992UJUJHE","push","decompress","10PLYeRq","683469xakZqz","_id","compress","102rPnNaV","2EbPcnj","2652669kSfCWR","4316180poYhZl"];return(Cs=function(){return t})()}function Ps(t,e){var n=Cs();return(Ps=function(t,e){return n[t-=336]})(t,e)}!function(t){for(var e=Ps,n=t();;)try{if(546222===-parseInt(e(354))/1*(parseInt(e(344))/2)+-parseInt(e(340))/3*(-parseInt(e(347))/4)+-parseInt(e(348))/5*(parseInt(e(343))/6)+parseInt(e(352))/7*(-parseInt(e(351))/8)+parseInt(e(345))/9*(parseInt(e(339))/10)+parseInt(e(346))/11+parseInt(e(336))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Cs);class Es extends ps{[_s(342)](t,e){var n=_s;return e[n(353)](),t[n(349)][n(337)](this[n(341)]),!0}[_s(338)](t,e){var n=_s;e[n(349)][n(353)](),t[n(337)]({__className:this[n(350)]})}}function js(){const t=["MarkerOperation","8622936AQwxfo","length","5iJAPds","499506vEtPFe","12btgZmg","compress","_omittedNamespace","__className","293108mtNVLA","name","replace","decompress","42jtwGVP","2167986ELLTgR","2786103iLjrej","startsWith","7627960ElugUp","75540fEyUyo"];return(js=function(){return t})()}const Ds=xs;function xs(t,e){const n=js();return(xs=function(t,e){return n[t-=386]})(t,e)}!function(t){const e=xs,n=t();for(;;)try{if(548099===parseInt(e(399))/1*(-parseInt(e(386))/2)+-parseInt(e(395))/3+-parseInt(e(390))/4*(-parseInt(e(403))/5)+-parseInt(e(404))/6*(parseInt(e(394))/7)+parseInt(e(401))/8+parseInt(e(396))/9+parseInt(e(398))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(js);class Rs extends Ts{[Ds(388)];constructor(t,e,n,r){const s=Ds;super(t,e,n),this[s(388)]=r+":"}[Ds(387)](t,e){const n=Ds;return!(n(400)!=e[0][n(389)]||!e[0][n(391)][n(397)](this[n(388)])||(e[0][n(391)]=e[0][n(391)][n(392)](new RegExp("^"+this[n(388)]),""),super[n(387)](t,e),0))}[Ds(393)](t,e){const n=Ds;super[n(393)](t,e);const r=t[t[n(402)]-1];r[n(391)]=this[n(388)]+r[n(391)]}}const Ns=Vs;function Vs(t,e){const n=Ms();return(Vs=function(t,e){return n[t-=311]})(t,e)}function Ms(){const t=["decompress","types","2656785yJHgOo","buffers","_splitCurrent","push","_compressSingleOperation","344650zytaCG","_combineNext","537514tfqxEL","_id","compress","_decompressSingleOperation","1027083nHkGIq","2174080wopJXd","_compareOperations","length","shift","54oXpIlS","4xplnEj","3112578aBquCF","368621LzgzQB","_context","7iRBcDS"];return(Ms=function(){return t})()}!function(t){const e=Vs,n=t();for(;;)try{if(294873===-parseInt(e(320))/1+parseInt(e(332))/2+-parseInt(e(312))/3*(-parseInt(e(318))/4)+-parseInt(e(325))/5+parseInt(e(319))/6*(parseInt(e(322))/7)+parseInt(e(313))/8+parseInt(e(317))/9*(-parseInt(e(330))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ms);class Bs{[Ns(333)];[Ns(321)];constructor(t,e){const n=Ns;this[n(333)]=t,this[n(321)]=e}[Ns(334)](t,e){const n=Ns;let r;for(;e[n(315)]>1&&this[n(314)](e[0],e[1]);)r?(r=this[n(331)](e[n(316)](),r),t[n(324)][n(328)](0)):(r=Qr(e[n(316)]()),t[n(324)][n(328)](this[n(333)]));return!!r&&(r=this[n(331)](e[n(316)](),r),t[n(324)][n(328)](0),t[n(326)][n(328)](this[n(329)](r)),!0)}[Ns(323)](t,e){const n=Ns,r=this[n(311)](e);for(;0==e[n(324)][0];)e[n(324)][n(316)](),t[n(328)](this[n(327)](r));t[n(328)](r)}}function Js(t,e){const n=qs();return(Js=function(t,e){return n[t-=210]})(t,e)}const Us=Js;function qs(){const t=["every","keys","nodes","_compressSingleOperation","next","_checkOperation","1301304vAHCiS","length","decompress","7360452lHcRWm","680Ixfees","substr","data","_context","_compareAttributes","6395760AVmvWA","InsertOperation","attributes","8635158GXFYPg","compress","19377wUzpVj","2yFzZls","iterator","value","position","9015870ZMtdDr","_combineNext","__className","_compareOperations","buffers","_splitCurrent","_getCompressorByName","_decompressSingleOperation","from","6IyDfzW","wasUndone","1291308Jsibxd"];return(qs=function(){return t})()}!function(t){const e=Js,n=t();for(;;)try{if(978853===-parseInt(e(214))/1*(parseInt(e(229))/2)+parseInt(e(244))/3+-parseInt(e(217))/4+parseInt(e(233))/5+parseInt(e(242))/6*(parseInt(e(226))/7)+parseInt(e(223))/8+-parseInt(e(228))/9*(parseInt(e(218))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qs);class Ls extends Bs{[Us(234)](t,e){const n=Us;return e[n(210)][0][n(220)]+=t[n(210)][0][n(220)],e}[Us(238)](t){const e=Us,n=Qr(t),r=n[e(210)][0],s=t[e(210)][0],o=s[e(220)][Symbol[e(230)]]()[e(212)]()[e(231)],i=o[e(215)];return r[e(220)]=o,s[e(220)]=s[e(220)][e(219)](i),t[e(232)]=os(t[e(232)],i),n}[Us(236)](t,e){const n=Us;if(this[n(213)](t)&&this[n(213)](e)){const r=t[n(210)][0][n(220)][n(215)],s=is(os(t[n(232)],r),e[n(232)]),o=t[n(210)][0],i=e[n(210)][0];return s&&this[n(222)](o,i)}return!1}[Us(211)](t){const e=Us,n={types:[],buffers:[],baseVersion:0};return this[e(221)][e(239)](e(224))[e(227)](n,[t]),n[e(237)][0]}[Us(240)](t){const e=Us,n=[];return this[e(221)][e(239)](e(224))[e(216)](n,t),n[0]}[Us(213)](t){const e=Us;return e(224)==t[e(235)]&&1==t[e(210)][e(215)]&&t[e(210)][0][e(220)]&&!t[e(243)]&&1==Array[e(241)](t[e(210)][0][e(220)])[e(215)]}[Us(222)](t,e){const n=Us,r=Object[n(246)](t[n(225)]||{}),s=Object[n(246)](e[n(225)]||{});return r[n(215)]===s[n(215)]&&r[n(245)](r=>e[n(225)][r]&&e[n(225)][r]===t[n(225)][r])}}const Gs=Ys;function Ys(t,e){const n=Hs();return(Ys=function(t,e){return n[t-=488]})(t,e)}function Hs(){const t=["_splitCurrent","howMany","150695SPEnhs","$graveyard","buffers","decompress","MoveOperation","__className","33509RkdErX","216iKdMxW","9iXQGUx","wasUndone","_decompressSingleOperation","compress","27449169ymcDEO","_compareOperations","954502eCdZcn","sourcePosition","_compressSingleOperation","root","_combineNext","targetPosition","1195524nrHhxF","306DXUFVK","1JfWYOH","_getCompressorByName","_checkOperation","442424scKVKU","_context","12110710IzgCMy"];return(Hs=function(){return t})()}!function(t){const e=Ys,n=t();for(;;)try{if(862833===parseInt(e(515))/1*(parseInt(e(507))/2)+parseInt(e(513))/3+parseInt(e(488))/4+-parseInt(e(493))/5*(parseInt(e(514))/6)+parseInt(e(499))/7*(parseInt(e(500))/8)+-parseInt(e(501))/9*(parseInt(e(490))/10)+parseInt(e(505))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Hs);class Fs extends Bs{[Gs(511)](t,e){const n=Gs;return e[n(492)]++,e[n(508)]=Qr(t[n(508)]),e}[Gs(491)](t){const e=Gs,n=Qr(t);return t[e(492)]--,n[e(492)]=1,n[e(508)]=os(n[e(508)],t[e(492)]),n}[Gs(506)](t,e){const n=Gs;return!(!this[n(517)](t)||!this[n(517)](e))&&is(os(t[n(508)],-1),e[n(508)])&&is(t[n(512)],e[n(512)])}[Gs(509)](t){const e=Gs,n={types:[],buffers:[],baseVersion:0};return this[e(489)][e(516)](e(497))[e(504)](n,[t]),n[e(495)][0]}[Gs(503)](t){const e=Gs,n=[];return this[e(489)][e(516)](e(497))[e(496)](n,t),n[0]}[Gs(517)](t){const e=Gs;return e(497)==t[e(498)]&&e(494)==t[e(512)][e(510)]&&1==t[e(492)]&&!t[e(502)]}}const zs=Ks;function Ks(t,e){const n=Ws();return(Ks=function(t,e){return n[t-=280]})(t,e)}function Ws(){const t=["180117GrXrLZ","_checkOperation","decompress","_compressSingleOperation","root","sourcePosition","_context","9314559HnaXkW","42IGStaG","1890690lHJXxk","8HPiHGo","_getCompressorByName","howMany","6nojcEx","1302578VAERyI","$graveyard","_decompressSingleOperation","_compareOperations","compress","162625eVnVlm","__className","264445YFUcgK","MoveOperation","wasUndone","targetPosition","_splitCurrent","_combineNext","buffers","1271084Vdqwga"];return(Ws=function(){return t})()}!function(t){const e=Ks,n=t();for(;;)try{if(596806===parseInt(e(287))/1+-parseInt(e(282))/2+parseInt(e(281))/3*(parseInt(e(296))/4)+parseInt(e(289))/5*(-parseInt(e(305))/6)+-parseInt(e(297))/7+-parseInt(e(307))/8*(-parseInt(e(304))/9)+-parseInt(e(306))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ws);class Xs extends Bs{[zs(294)](t,e){return e[zs(280)]++,e}[zs(293)](t){const e=zs,n=Qr(t);return n[e(280)]=1,t[e(280)]--,n}[zs(285)](t,e){const n=zs;return!(!this[n(298)](t)||!this[n(298)](e))&&is(t[n(302)],e[n(302)])&&is(t[n(292)],e[n(292)])}[zs(300)](t){const e=zs,n={types:[],buffers:[],baseVersion:0};return this[e(303)][e(308)](e(290))[e(286)](n,[t]),n[e(295)][0]}[zs(284)](t){const e=zs,n=[];return this[e(303)][e(308)](e(290))[e(299)](n,t),n[0]}[zs(298)](t){const e=zs;return e(290)==t[e(288)]&&e(283)==t[e(292)][e(301)]&&1==t[e(280)]&&!t[e(291)]}}function Qs(){const t=["oldRange","user:","newRange","_compressSingleOperation","15ndKjCc","5056865YgIOOa","_id","1256AZEzHW","shift","5949FsCbpJ","10032nLgvVQ","_getCompressorByName","_compareOperations","buffers","_context","toNone","__className","startsWith","2855060adgsFM","name","start","_decompressSingleOperation","2512530nxGrRu","split","850801BmECOP","stickiness","decompress","635772uCZvxy","push","MarkerOperation","compress","user:position:","end","types"];return(Qs=function(){return t})()}function Zs(t,e){const n=Qs();return(Zs=function(t,e){return n[t-=449]})(t,e)}const $s=Zs;!function(t){const e=Zs,n=t();for(;;)try{if(799851===-parseInt(e(472))/1+parseInt(e(480))/2+-parseInt(e(466))/3*(-parseInt(e(455))/4)+-parseInt(e(467))/5+-parseInt(e(450))/6+parseInt(e(452))/7+parseInt(e(469))/8*(-parseInt(e(471))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Qs);class to extends Bs{[$s(458)](t,e){const n=$s;if(!this[n(474)](e[0],e[1]))return!1;const r=e[n(470)]();return r[n(462)]=null,r[n(464)]&&is(r[n(464)][n(482)],r[n(464)][n(460)])&&(r[n(464)][n(460)]=null),e[n(470)](),t[n(461)][n(456)](this[n(468)]),t[n(461)][n(456)](0),t[n(475)][n(456)](this[n(465)](r)),!0}[$s(454)](t,e){const n=$s,r=this[n(449)](e);r[n(464)]&&!r[n(464)][n(460)]&&(r[n(464)][n(460)]=Qr(r[n(464)][n(482)]));const s=Qr(r);s[n(464)]&&(s[n(464)][n(482)][n(453)]=n(477),s[n(464)][n(460)]=Qr(s[n(464)][n(482)])),s[n(481)]=n(459)+s[n(481)][n(451)](":")[2],e[n(461)][n(470)](),t[n(456)](r),t[n(456)](s)}[$s(465)](t){const e=$s,n={types:[],buffers:[],baseVersion:0};return this[e(476)][e(473)](e(457))[e(458)](n,[t]),n[e(475)][0]}[$s(449)](t){const e=$s,n=[];return this[e(476)][e(473)](e(457))[e(454)](n,t),n[0]}[$s(474)](t,e){const n=$s;return!!(t&&e&&n(457)==t[n(478)]&&n(457)==e[n(478)]&&t[n(481)][n(479)](n(463))&&e[n(481)][n(479)](n(463))&&t[n(481)]!=e[n(481)])}}const eo=ro;function no(){const t=["baseVersion","no-operations-provided","MarkerOperation","_getCompressorByName","125fxoynQ","MoveOperation","_compressorByName","compress","25880sfBKpP","18KrYXaJ","_registerActionCompressor","RenameOperation","getDescriptor","set","DeletingAction","5762570MCNpUx","InsertOperation","SplitOperation","1816292yLXbxc","length","350gvquIp","_protobufFactory","forEach","_registerCompressor","3eBdrzD","2461510AdtdgS","comment","16134CELMmz","_registerOperationCompressor","RootOperation","NoOperation","_compressorById","1871Qvlncr","TypingAction","CommentMarkerOperation","decompress-compressor-not-found","21230748heFdqA","get","decompress","__className","246MvXdfH","MergeOperation","UserSelectionAction","SuggestionMarkerOperation","AttributeOperation","suggestion","ForwardDeletingAction","RootAttributeOperation","types"];return(no=function(){return t})()}function ro(t,e){const n=no();return(ro=function(t,e){return n[t-=392]})(t,e)}!function(t){const e=ro,n=t();for(;;)try{if(300142===-parseInt(e(399))/1*(-parseInt(e(407))/2)+parseInt(e(440))/3*(-parseInt(e(434))/4)+parseInt(e(420))/5*(-parseInt(e(394))/6)+-parseInt(e(436))/7*(parseInt(e(424))/8)+-parseInt(e(425))/9*(parseInt(e(392))/10)+-parseInt(e(431))/11+parseInt(e(403))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(no);class so{[eo(398)];[eo(422)];[eo(437)];constructor(){const t=eo;this[t(398)]=new Map,this[t(422)]=new Map,this[t(437)]=new vr;const e=this[t(437)][t(428)](t(418));this[t(439)](1,t(397),new Es(1,t(397),void 0)),this[t(395)](10,t(411),bs),this[t(395)](11,t(432),ws),this[t(395)](12,t(418),Ts),this[t(395)](13,t(408),ps),this[t(395)](14,t(421),ps),this[t(395)](15,t(427),ps),this[t(395)](16,t(414),bs),this[t(395)](17,t(433),ps),this[t(439)](18,t(401),new Rs(18,t(418),e,t(393))),this[t(439)](19,t(410),new Rs(19,t(418),e,t(412))),this[t(395)](20,t(396),ps),this[t(426)](100,t(400),Ls),this[t(426)](101,t(430),Fs),this[t(426)](102,t(413),Xs),this[t(426)](103,t(409),to)}[eo(423)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(417),this);const r={types:[],buffers:[],baseVersion:t[0][e(416)]};for(;t[e(435)];)this[e(419)](e(409))[e(423)](r,t)||this[e(419)](e(400))[e(423)](r,t)||this[e(419)](e(430))[e(423)](r,t)||this[e(419)](e(413))[e(423)](r,t)||this[e(419)](e(401))[e(423)](r,t)||this[e(419)](e(410))[e(423)](r,t)||this[e(419)](t[0][e(406)])[e(423)](r,t);return r}[eo(405)](t){const e=eo,r=[];for(;t[e(415)][e(435)];){const s=this[e(398)][e(404)](t[e(415)][0]);if(!s)throw new n.CKEditorError(e(402),this,{type:t[e(415)][0]});s[e(405)](r,t)}return r[e(438)]((n,r)=>n[e(416)]=t[e(416)]+r),r}[eo(419)](t){const e=eo;return this[e(422)][e(404)](t)}[eo(395)](t,e,n){const r=eo,s=new n(t,e,this[r(437)][r(428)](e));this[r(439)](t,e,s)}[eo(426)](t,e,n){const r=eo,s=new n(t,this);this[r(439)](t,e,s)}[eo(439)](t,e,n){const r=eo;this[r(398)][r(429)](t,n),this[r(422)][r(429)](e,n)}}function oo(t,e){var n=io();return(oo=function(t,e){return n[t-=470]})(t,e)}function io(){var t=["507203AiNVrj","2886195fjzBJp","6177650ABFbTP","27jUboNS","6MJTNUB","5593720KeFVUa","3124145WTYqfw","958728jLVRvz","4fLVpZh","539329lTTMsf"];return(io=function(){return t})()}!function(t){for(var e=oo,n=t();;)try{if(482022===-parseInt(e(472))/1+parseInt(e(479))/2+parseInt(e(473))/3+parseInt(e(470))/4*(parseInt(e(478))/5)+-parseInt(e(476))/6*(-parseInt(e(471))/7)+parseInt(e(477))/8+-parseInt(e(475))/9*(parseInt(e(474))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(io);const ao=uo;function co(){const t=["getRoot","connect","sessionAdd:","getOperations","connection","permissions","lastSyncVersion","__className","plugins","_hasSelectionChanged","operationsReceived","_bufferedOperations","entries","_connectAfterSessionHasBeenFlushed","ready","disconnected","config","realtimecollaborationclient-sendbufferedoperations","differ","realtimecollaborationclient-init-non-existent-root","realtimecollaborationclient","404","_sendBufferedOperationsDelayId","suppressErrorInCollaboration","view","cloud-services-internal-error: Not connected.","rtc-offline","string","_setPendingAction","getConnectedSessions","path","_connectService","cs:removeUser","targetPosition","_updateServerHistory","_offset","map","root","compress","marker","Permissions","keys","slice","2xnhFmI","error","sessionCreatedAt","define","disableReadOnlyMode","disconnect","model","state","directChange","_handleReceivedOperations","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","isPremiumPlugin","_waitUntilSynced","rtc-destroyed","message","1200apVzuv","realtimecollaborationclient-init-session-connection-error","CommentsOnly","_currentBufferDelay","realtimecollaborationclient-error","high","loadRoot","rootName","_initThrowingOnDataSet","userId","_compressOperations","editing","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.","bind","getMany","getIdOfTheLastOperation","_setUpDataInit","removeFromReconnectionStack","_compressor","_isConnected","return","lastOperationId","forEach","getOperationAuthor","move","version","lastDocumentSession","listenTo","_baseBufferDelay","addRoot","change:range","_operationIdentifier","_document","_getOperationsFromInitData","createRange","_disconnectionOperations","88byjPTM","cloudServices.bundleVersion","roots","from","realtimecollaborationclient-init-service-incorrect-server-operation","fromJSON","reconnect","toJSON","rootsAttributes","_isAttached","_operationToId","153xlCHbc","currentDocumentSession","_shouldSendSelectionUpdate","_pendingAction","InsertOperation","_sendBufferedOperations","PENDING_ACTION_SENDING_DATA","24ANmjkW","stop","716709DbtlMJ","createPositionAt","locale","isOfficialPlugin","_decompressOperations","collaboration-missing-channelid","_handleExternalOperations","then","addToReconnectionStack","newRange","size","746545nqwArc","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.","_refreshUserSelectionMarkers","decompress","_knownOperations","isEnabled","editor","register","165095hzuede","realtimecollaborationclient-handleserverresponse","_handleSendingSelectionMarkers","cloud-services-internal-error: Request timeout.","createdAt","start","_handleServerResponse","type","_authorId","apply","position","requires","setIdForTheLastOperation","add","unregister","enableReadOnlyMode","_hasSynchronizationProblem","baseVersion","serverHistory","clone","isReadOnly","markers","_isDisconnection","setPermissions","realtimecollaborationclient-init-connection-failed","_handleInitialConnectionData","real-time-collaboration","2485668AwTJJn","isDocumentOperation","change:_isPendingUpdate","attributes","parse","_getAffectedRoot","document:write","addUser","lastOperationAcceptedAt","wasUndone","data","_service","_isEditingAllowed","80096lDPejb","change:hasDomSelection","_fetchMissingUsers","offset","catch","_disconnectService","push","_shouldSendUpdate","addRootAttribute","showWarning","includes","insert","startsWith","cloudDocumentVersion","round","affectedSelectable","409","connected","cloud-services-internal-error: Collaborative Editing Service is not connected.","collaboration","_applyOperationsSet","createRoot","realtimecollaborationclient-init-document-already-initialized","_crash","filter","reconnection: flushed session","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","code","affectsData","createUserMarkerOperations","batch","Notification","isUndoneOperation","CollaborativeEditingService","applyOperation","RealTimeCollaborationClient","createPositionFromPath","_knownRootNames","_addKnownRoot","wereChangesApplied","channelSessions","_bufferRootLoad","finally","_isPendingUpdate","getDocumentDetails","fire","sessionId","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","stopListening","_lastSyncedOperationId","sendOperations","_initSessionsHandling","$root","pluginName","document","mySessionId","history","_handleReconnectionError","_ignoredOperations","4742673bolqSu","set","off","enqueueChange","end","_clearPendingAction","initData","_loadRoot","109305OBzGyB","init","_handleReconnectionResponse","has","selection","length","reset","_sendBufferedOperationsDelayed","_channelId","realtimecollaborationclient-init-service-internal-error","change:_isEditingAllowed","remove","_isLoaded","_saveOperationInBuffer","multi-root-editor-root-attributes-no-root","11tuIHgt","destroy","_lastServerVersion","getUser","metadata","_isInit","collaboration.channelId","Synchronization issue","addOperation","get"];return(co=function(){return t})()}function uo(t,e){const n=co();return(uo=function(t,e){return n[t-=412]})(t,e)}!function(t){const e=uo,n=t();for(;;)try{if(776016===parseInt(e(517))/1*(parseInt(e(446))/2)+-parseInt(e(508))/3*(-parseInt(e(576))/4)+-parseInt(e(528))/5*(-parseInt(e(515))/6)+parseInt(e(536))/7*(-parseInt(e(497))/8)+-parseInt(e(643))/9*(parseInt(e(461))/10)+parseInt(e(658))/11*(-parseInt(e(563))/12)+parseInt(e(635))/13)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(co);let lo=1;class po extends e.Plugin{static[ao(609)]=(()=>On)();[ao(438)];[ao(622)];[ao(554)];[ao(651)];[ao(574)];[ao(493)];[ao(479)];[ao(414)];[ao(532)];[ao(613)];[ao(511)];[ao(412)];[ao(425)];[ao(489)];[ao(464)];[ao(625)];[ao(496)];[ao(492)];static get[ao(547)](){return[Fn,Xn,hr,e.PendingActions,zn.Users,r.Notification]}static get[ao(629)](){return ao(611)}static get[ao(520)](){return!0}static get[ao(457)](){return!0}get[ao(589)](){const t=ao;return this[t(660)]+this[t(438)]}get[ao(660)](){const t=ao;return this[t(554)][t(486)]-this[t(438)]}get[ao(674)](){const t=ao,e=this[t(554)][t(671)]();for(let n=e[t(648)]-1;n>=0;n--){const r=e[n];if(!this[t(496)][t(646)](r))return r[t(553)]+1-this[t(438)]}return 0}constructor(t){const e=ao;if(super(t),this[e(438)]=0,this[e(622)]=null,this[e(554)]=new s.History,this[e(534)][e(419)][e(449)](e(595),{}),this[e(651)]=this[e(534)][e(419)][e(667)](e(664)),!this[e(651)])throw new n.CKEditorError(e(522),this);const r=t[e(419)][e(667)](e(498))||n.version;this[e(574)]=new(po[e(609)])(r,this[e(651)]),this[e(493)]=this[e(534)][e(452)][e(630)],this[e(479)]=new so,this[e(414)]=[],this[e(532)]=new WeakSet,this[e(613)]=new Set,this[e(636)](e(619),!1),this[e(636)](e(552),!1),this[e(511)]=null,this[e(412)]=!1,this[e(425)]=null,this[e(489)]=300,this[e(464)]=this[e(489)],this[e(625)]=null,this[e(496)]=new WeakSet,this[e(492)]=new mo(this[e(496)])}[ao(644)](){const t=ao,e=this[t(534)],n=e[t(676)][t(667)](zn.Users),r=e[t(676)][t(667)](Fn);this[t(488)](n,t(484),(e,r)=>{const s=t,o=r[0];o[s(544)]&&(e[s(481)]=n[s(661)](o[s(544)]),e[s(516)]()),null===o[s(544)]&&(e[s(481)]=null,e[s(516)]())},{priority:t(466)}),this[t(488)](e[t(452)][t(630)][t(647)],t(491),(e,n)=>{const r=t;n[r(454)]&&this[r(530)]()}),this[t(488)](e[t(472)][t(427)],t(577),()=>{this[t(530)]()}),this[t(469)](),e[t(452)].on(t(610),(e,n)=>{const r=t,s=n[0];s[r(564)]&&(this[r(656)](s),this[r(583)]()&&this[r(650)]())}),this[t(477)](),this[t(474)](t(575)).to(r,t(453),this,t(552),(e,n)=>t(593)===e&&!n),this.on(t(653),()=>{const n=t;this[n(575)]?e[n(450)](n(429)):e[n(551)](n(429))}),this[t(575)]?e[t(450)](t(429)):e[t(551)](t(429)),this[t(636)](t(480),!1)}async[ao(503)](){const t=ao,e=this[t(534)][t(676)][t(667)](Xn),n=this[t(534)][t(676)][t(667)](Fn);try{this[t(619)]=!0,e[t(550)](this[t(651)]);const r=await this[t(574)][t(503)](n[t(672)],this[t(674)]);await this[t(645)](r)&&(this[t(619)]=!1,this[t(640)]());const s=await this[t(574)][t(432)]();e[t(535)](this[t(651)],s),this[t(538)](),this[t(480)]=!0}catch(e){if(function(e){const n=t;return n(424)===e[n(603)]}(e)&&this[t(622)])await this[t(416)]();else if(function(e){const n=t;return n(592)===e[n(603)]}(e)){const e=mr(this[t(534)][t(519)],t(623));this[t(633)](e)}else{if(!(e instanceof ho))throw e;this[t(633)]()}}}[ao(659)](){const t=ao,e=this[t(534)][t(676)][t(667)](Fn),n=this[t(534)][t(676)][t(667)](Xn);this[t(534)][t(551)](t(459)),n[t(616)][t(646)](this[t(651)])&&n[t(550)](this[t(651)]),e[t(478)](this),this[t(581)](),super[t(659)]()}async[ao(645)](t){const e=ao;if(this[e(622)]!==t[e(622)]&&this[e(625)]!==t[e(482)])throw new ho;return this[e(622)]=t[e(622)],this[e(542)]([],{...t,wereChangesApplied:!1,data:t[e(573)]},e(503))}async[ao(434)](t,e=!1){const n=ao,{connection:r}=this[n(534)][n(676)][n(667)](Fn);po[n(609)][n(432)](r,this[n(651)])[n(524)](t=>this[n(627)](t))[n(580)](t=>{const e=n;this[e(599)](e(462),t)}),this[n(488)](this[n(574)],n(413),this[n(455)][n(474)](this)),this[n(488)](this[n(574)],n(447),(t,e)=>{const r=n;this[r(599)](r(652),e)}),this[n(488)](this[n(574)],n(418),()=>{this[n(480)]=!1});const s=this[n(492)][n(476)](t);this[n(619)]=!0;const o=await this[n(574)][n(669)](r,this[n(471)](t),s);if(this[n(622)]=o[n(622)],e){if(!o[n(615)])return void this[n(633)]();this[n(619)]=!1,this[n(640)](),this[n(554)][n(649)](),this[n(438)]=o[n(579)],this[n(554)][n(486)]=this[n(438)],await this[n(542)](t,o,n(601))}else await this[n(561)](o,t);this[n(538)](),this[n(480)]=!0}[ao(538)](){const t=ao,e=this[t(534)][t(676)][t(667)](Xn),n=this[t(534)][t(676)][t(667)](hr),r=e[t(616)][t(667)](this[t(651)]);r&&r[t(648)]>1?n[t(605)]():this[t(488)](e,t(670)+this[t(651)],()=>{const r=t;2===e[r(616)][r(667)](this[r(651)])[r(648)]&&n[r(605)]()})}async[ao(455)](t,e,n,r){const s=ao;if(!this[s(619)]&&this[s(493)][s(486)]==e){const t=this[s(521)](n,r);await this[s(578)](t),this[s(523)](t,e,n[s(482)])||this[s(599)](s(501))}}async[ao(416)](){const t=ao;this[t(581)]();const{locale:e}=this[t(534)];let n;try{n=await this[t(574)][t(620)]()}catch{const n=mr(e,t(602));return void this[t(633)](n)}const r=n[t(509)]||n[t(487)];if(this[t(625)]!==r[t(482)]){const n=mr(e,t(473));return void this[t(633)](n)}await this[t(434)](this[t(534)][t(452)][t(630)][t(632)][t(671)](),!0)}[ao(581)](){const t=ao;this[t(574)][t(451)](),this[t(414)]=[],clearTimeout(this[t(425)]),this[t(624)](this[t(574)])}[ao(627)](t){const e=ao,n=this[e(534)][e(676)][e(667)](Xn);this[e(488)](n,e(670)+this[e(651)],(t,{session:r})=>{const s=e;if(r.id===n[s(631)]){t[s(637)]();const e=this[s(534)][s(676)][s(646)](s(463))&&this[s(534)][s(676)][s(667)](s(463));let n=r[s(673)];e&&e[s(533)]&&(n=n[s(600)](t=>s(569)!==t)),this[s(534)][s(676)][s(667)](s(443))[s(559)](n,this[s(651)])}}),n[e(535)](this[e(651)],t)}[ao(469)](){const t=ao,e=this[t(534)][t(573)][t(636)];this[t(534)][t(573)][t(636)]=(...r)=>{const s=t;if(!r[r[s(648)]-1][s(426)])throw new n.CKEditorError(s(456),this);e[s(545)](this[s(534)][s(573)],r)}}[ao(477)](){const t=ao;this[t(534)][t(573)].on(t(644),(e,[r])=>{const o=t;if(this[o(493)][o(486)])throw new n.CKEditorError(o(598),this);e[o(516)](),this[o(431)]();const i=this[o(534)][o(419)][o(667)](o(505)),a=this[o(494)](r,i);0==a[o(648)]&&a[o(582)](new s.NoOperation(0)),e[o(481)]=this[o(434)](a)[o(524)](()=>{const t=o;this[t(534)][t(676)][t(667)](Fn)[t(525)](this),this[t(534)][t(573)][t(621)](t(417))})[o(580)](t=>this[o(599)](o(560),t))[o(618)](()=>this[o(640)]())},{priority:t(466)}),this[t(534)].on(t(467),async(e,[n,r])=>{const s=t;e[s(516)]();const o=this[s(534)][s(452)][s(630)][s(668)](n);if(!this[s(613)][s(646)](n)){const t=r&&r[s(573)]?r[s(573)]:"",e=r&&r[s(566)]?r[s(566)]:{};await this[s(642)](n,t,e)}this[s(534)][s(452)][s(638)]({isUndoable:!1},()=>{const t=s;o[t(655)]=!0,this[t(534)][t(452)][t(630)][t(421)][t(617)](o)})},{priority:t(466)})}async[ao(578)](t){const e=ao,n=this[e(534)][e(676)][e(667)](zn.Users),{connection:r}=this[e(534)][e(676)][e(667)](Fn),s=new Set;for(const r of t){const t=r[e(544)];t&&!n[e(661)](t)&&s[e(549)](t)}if(0===s[e(527)])return;const o=await b[e(475)](r,Array[e(500)](s));for(const t of o)n[e(661)](t.id)||n[e(570)](t)}[ao(494)](t,e={}){const r=ao,o=this[r(534)][r(452)],i=[];let a=0;const c=r(430)==typeof t?{main:t}:t;for(const t of Object[r(444)](c)){if(!this[r(493)][r(499)][r(646)](t))throw new n.CKEditorError(r(422),this);const e=this[r(534)][r(573)][r(567)](c[t]),u=this[r(493)][r(668)](t),d=new s.InsertOperation(o[r(518)](u,0),e,a++);i[r(582)](d);for(const[t,n]of e[r(557)]){const e=o[r(495)](o[r(612)](u,n[r(541)][r(433)][r(445)]()),o[r(612)](u,n[r(639)][r(433)][r(445)]())),c=new s.MarkerOperation(t,null,e,o[r(557)],!0,a++);i[r(582)](c)}}if(e)for(const[t,c]of Object[r(415)](e)){const e=o[r(630)][r(668)](t);if(!e)throw new n.CKEditorError(r(657),null);for(const[t,n]of Object[r(415)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(582)](o)}}return i}async[ao(642)](t,e,n){const r=ao;this[r(494)]({[t]:e},{[t]:n})[r(483)]((t,e)=>{const n=r;t[n(553)]=this[n(493)][n(486)]+e,t[n(663)]=!0,this[n(656)](t)}),this[r(650)](),await this[r(458)]()}async[ao(561)](t,e){const n=ao;let r;this[n(438)]=t[n(579)];const s=t[n(615)]&&!t[n(641)],o=s?0:t[n(573)][n(553)];if(e[n(483)](e=>{const r=n;e[r(663)]=!0,e[r(540)]=t[r(448)],e[r(544)]=null}),s)r=e,this[n(596)](r,s);else{if(t[n(641)]){const e=this[n(494)](t[n(641)]);this[n(493)][n(632)][n(486)]=-e[n(648)],e[n(483)](r=>{const s=n;r[s(553)]-=e[s(648)],r[s(540)]=t[s(448)],r[s(663)]=!0,r[s(544)]=null}),this[n(596)](e,!0),this[n(554)][n(486)]=-e[n(648)]+this[n(438)],this[n(437)](e)}this[n(493)][n(632)][n(486)]=o,r=this[n(521)](t[n(573)],t[n(662)]),await this[n(578)](r),this[n(596)](r,s)}t[n(482)]&&(this[n(492)][n(548)](r,t[n(482)]),this[n(625)]=t[n(482)]),this[n(554)][n(486)]=o+this[n(438)],this[n(437)](r),e[n(600)](t=>{const e=n,r=this[e(568)](t);return r&&!this[e(613)][e(646)](r)})[n(483)]((t,e)=>{const r=n;t[r(553)]=this[r(493)][r(486)]+e,this[r(656)](t)}),this[n(583)]()?(this[n(464)]=0,this[n(650)](!0),await this[n(458)]()):(this[n(619)]=!1,this[n(640)]())}[ao(599)](t,e){const r=ao,s=e&&e[r(460)];if(s&&s[r(588)](r(423)))throw e;const o=this[r(534)][r(676)][r(667)](Fn);throw this[r(619)]=!0,o[r(451)](),this[r(534)][r(551)](r(465)),new n.CKEditorError(t,this[r(534)],s?{originalError:s}:void 0)}[ao(656)](t){const e=ao;this[e(532)][e(646)](t)||(this[e(532)][e(549)](t),this[e(414)][e(582)](t),this[e(511)]||e(442)==t[e(543)]&&!t[e(604)]||this[e(431)]())}[ao(650)](t=!1){const e=ao;!t&&this[e(619)]||(this[e(619)]=!0,clearTimeout(this[e(425)]),this[e(425)]=setTimeout(()=>{const t=e;this[t(513)]()[t(524)](e=>{const n=t;e&&(this[n(640)](),this[n(619)]=!1)})[t(580)](e=>{const n=t;this[n(640)](),this[n(619)]=!1,function(t){const e=n;return t[e(460)][e(588)](e(428))||t[e(460)][e(588)](e(594))||t[e(460)][e(588)](e(539))}(e)||this[n(599)](e[n(460)],e)})},this[e(464)]))}[ao(458)](){return new Promise(t=>{const e=uo;this.on(e(565),()=>{t()})})}async[ao(513)](){const t=ao,e=this[t(534)][t(676)][t(667)](hr);if(this[t(510)]()&&(e[t(605)](),this[t(412)]=!1),!this[t(583)]())return!0;const n=[...this[t(414)]];for(const e of n)e[t(572)]=this[t(493)][t(632)][t(608)](e);const r=this[t(492)][t(476)](n),s=lo++,o=this[t(471)](n),i=await this[t(574)][t(626)](o,o[t(553)],r);try{return await this[t(542)](n,i,s)}catch(e){return this[t(599)](t(420),e)}}async[ao(542)](t,e,n){const r=ao;if(r(447)in e)throw e[r(447)];let s=!1;if(e[r(615)]){e[r(482)]&&(this[r(625)]=e[r(482)]),this[r(414)]=this[r(414)][r(600)](e=>!t[r(586)](e));for(const n of t)n[r(540)]=r(571)in e&&e[r(571)]||void 0;fo(t,e[r(486)]-t[r(648)]),this[r(437)](t);const n=t[r(600)](t=>{const e=r;if(!t[e(663)])return!1;const n=this[e(568)](t);return n&&!this[e(613)][e(646)](n)});fo(n,this[r(493)][r(486)]),this[r(596)](n),s=!0,this[r(464)]=this[r(489)]}else{const t=this[r(521)](e[r(573)],e[r(662)])[r(600)](t=>t[r(553)]>=this[r(660)]);t[r(483)](t=>this[r(614)](t)),this[r(414)]=this[r(414)][r(600)](t=>!t[r(663)]||!this[r(613)][r(646)](this[r(568)](t))),this[r(414)][r(648)]&&fo(this[r(414)],this[r(414)][0][r(553)]),await this[r(578)](t),s=this[r(523)](t,e[r(486)],e[r(482)]),this[r(464)]=Math[r(590)](this[r(464)]/2)}return s?!this[r(583)]()||(this[r(650)](!0),!1):this[r(599)](r(537))}[ao(523)](t,e,n){const r=ao;try{const o={document:this[r(493)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(414)],o);fo(i,this[r(493)][r(486)]),fo(a,e);for(const t of i){const e=c[r(667)](t);t[r(544)]=e?e[r(544)]:null}n&&(this[r(492)][r(548)](t,n),this[r(625)]=n),this[r(414)]=[...a],this[r(596)](i),this[r(437)](t)}catch(t){return console[r(447)](t),!1}return!0}[ao(596)](t,e=!1){const n=ao;this[n(534)][n(452)][n(638)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(532)][r(549)](n),this[r(614)](n),e[r(606)][r(666)](n),this[r(534)][r(452)][r(610)](n)})}[ao(614)](t){const e=ao,n=this[e(568)](t);n&&this[e(613)][e(549)](n)}[ao(568)](t){const e=ao;let n,r;switch(t[e(543)]){case e(587):n=t[e(546)][e(440)];break;case e(442):if(r=t[e(526)],!r)return null;n=r[e(440)];break;case e(584):n=t[e(440)];break;case e(490):n=t[e(591)];break;case e(485):n=t[e(436)][e(440)];break;default:return null}return n[e(468)]}[ao(437)](t){const e=ao;t[e(483)](t=>{const n=e,r=t[n(555)]();r[n(544)]=t[n(544)],r[n(663)]=!!t[n(663)],r[n(540)]=t[n(540)],r[n(553)]+=this[n(438)],t[n(558)]&&this[n(496)][n(549)](r),this[n(554)][n(666)](r)})}[ao(633)](t){const e=ao,n=this[e(534)][e(676)][e(667)](e(607)),r=this[e(534)][e(519)];t||(t=mr(r,e(529))),n[e(585)](t,{title:mr(r,e(665)),namespace:e(562)}),this[e(552)]=!0,clearTimeout(this[e(425)]),this[e(414)]=[],this[e(534)][e(676)][e(667)](Fn)[e(451)]()}[ao(431)](){const t=ao;this[t(511)]||(this[t(511)]=this[t(534)][t(676)][t(667)](e.PendingActions)[t(549)](mr(this[t(534)][t(519)],t(514))))}[ao(640)](){const t=ao;this[t(511)]&&(this[t(534)][t(676)][t(667)](e.PendingActions)[t(654)](this[t(511)]),this[t(511)]=null)}[ao(471)](t){const e=ao,n=t[e(439)](t=>t[e(504)]());return this[e(479)][e(441)](n)}[ao(521)](t,e){const n=ao;return this[n(479)][n(531)](t)[n(439)]((t,r)=>{const o=n,i=o(644)==e[r][o(543)];if(o(512)==t[o(675)]){const e=t[o(546)][o(440)];!this[o(493)][o(668)](e)&&(this[o(493)][o(597)](o(628),e)[o(506)]=!1)}const a=s.OperationFactory[o(502)](t,this[o(493)]);return a[o(572)]=t[o(572)],a[o(663)]=i,a[o(544)]=i?null:e[r][o(470)],a[o(558)]=o(435)===e[r][o(543)],a[o(540)]=e[r][o(540)],a})}[ao(530)](){const t=ao;this[t(412)]=!0,this[t(510)]()?this[t(650)]():this[t(412)]=!1}[ao(510)](){const t=ao,e=this[t(534)][t(676)][t(667)](Xn)[t(616)][t(667)](this[t(651)]);return!this[t(534)][t(556)]&&!!e&&e[t(648)]>1&&this[t(412)]}[ao(583)](){const t=ao;return this[t(414)][t(648)]>0||this[t(510)]()}}class ho extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(553)]=e++}class mo{[ao(634)];[ao(507)];constructor(t){const e=ao;this[e(634)]=t,this[e(507)]=new WeakMap}[ao(476)](t){const e=ao;let r=t[e(648)];for(;r--;){const s=t[r];if(!this[e(634)][e(646)](s)){if(!this[e(507)][e(646)](s)){const t=(0,n.uid)()[e(445)](1,18);this[e(507)][e(636)](s,t)}return this[e(507)][e(667)](s)}}}[ao(548)](t,e){const n=ao;if(!e)return;let r=t[n(648)];for(;r--;){const s=t[r];this[n(634)][n(646)](s)||this[n(507)][n(636)](s,e)}}}function yo(t,e){var n=Io();return(yo=function(t,e){return n[t-=126]})(t,e)}var go=yo;!function(t){for(var e=yo,n=t();;)try{if(964048===parseInt(e(129))/1*(-parseInt(e(141))/2)+parseInt(e(138))/3*(-parseInt(e(142))/4)+parseInt(e(133))/5+-parseInt(e(130))/6*(-parseInt(e(140))/7)+parseInt(e(136))/8*(parseInt(e(132))/9)+-parseInt(e(126))/10*(parseInt(e(137))/11)+parseInt(e(139))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Io);class bo extends e.Plugin{static get[go(127)](){return[po]}static get[go(131)](){return go(134)}static get[go(128)](){return!0}static get[go(135)](){return!0}}function Io(){var t=["6xSoKSb","44587260dvhBtk","1526eaVxGw","2fJjnFk","3570240tdosDe","16880yxJciu","requires","isOfficialPlugin","1859075CbBosm","24192yKGCUW","pluginName","82233KLhLio","1530825plvXJs","RealTimeCollaborativeEditing","isPremiumPlugin","72jKTKHM","2442DDXXVk"];return(Io=function(){return t})()}const Oo=Ao;function vo(){const t=["commentThreadAdded","commentThreadReopened","_getService","permissions","keys","404","CommentsRepository","has","assign","context","init","collaboration.channelId","update","getComment","code","_fetchMissingUsersForThreads","getCommentThreads","connect","mySessionId","cloud-services-internal-error: Not connected.","delete","28535hEXGaD","remove","commentId","register","setPermissions","requires","CloudServicesCommentsAdapter","disconnect","isOfficialPlugin","from","getUser","CommentsService","52868JIWTVw","content","cloudservicescommentsadapter-connect-already-connected","startsWith","sessionAdd:","pluginName","666423FnfLnr","get","updateComment","10600soGrFT","size","12NTytxm","1183kadUkq","map","reopenCommentThread","getConnectedSessions","addToReconnectionStack","resolveCommentThread","isPremiumPlugin","cloudservicescommentsadapter-service-not-exist","cloud-services-internal-error: Comments Service is not connected.","4500834liWfyo","commentAdded","reconnect","off","destroy","deletedAt","getCommentThread","addUser","userId","authorId","22RTdvxo","_connectService","removeComment","commentRemoved","comments","listenTo","commentThreadRemoved","catch","config","500784LyyRLm","getMany","adapter","cloud-services-internal-error: Request timeout.","90UHbhKb","_setUpService","reopen","13774849mnkSmI","removeCommentThread","addComment","Permissions","message","unregister","resolvedAt","add","commentThreadResolved","resolvedBy","commentUpdated","set","resolve","_terminateService","_services","attributes","createdAt","plugins","commentThreadUpdated","cloudservicescommentsadapter-disconnect-not-exist","updateCommentThread","commentThreadId","addCommentThread"];return(vo=function(){return t})()}!function(t){const e=Ao,n=t();for(;;)try{if(377369===-parseInt(e(286))/1*(-parseInt(e(255))/2)+parseInt(e(295))/3+-parseInt(e(266))/4*(-parseInt(e(346))/5)+-parseInt(e(276))/6+-parseInt(e(267))/7*(parseInt(e(264))/8)+-parseInt(e(261))/9*(parseInt(e(299))/10)+parseInt(e(302))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vo);class wo extends e.ContextPlugin{static[Oo(254)]=(()=>Ln)();[Oo(316)];static get[Oo(248)](){return[Fn,Oo(331),Xn,zn.Users]}static get[Oo(260)](){return Oo(249)}static get[Oo(251)](){return!0}static get[Oo(273)](){return!0}constructor(t){const e=Oo;super(t),this[e(316)]=new Map}async[Oo(335)](){const t=Oo,n=this[t(334)],r=n[t(319)][t(262)](t(331));if(n[t(319)][t(262)](Fn)[t(271)](this),r[t(297)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(327)](e)[c(324)]({commentThreadId:n,comments:r[c(268)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(348)],userId:t[r(285)],content:t[r(256)],documentId:e,createdAt:t[r(318)],attributes:t[r(317)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(293)](ko);return{threadId:u[c(323)],comments:u[c(290)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(327)](e)[r(282)](n)[r(293)](So)[r(293)](ko);return s?s[r(281)]?null:(await this[r(340)]([s]),{threadId:s[r(323)],comments:s[r(290)][r(268)](To),context:s[r(334)],resolvedAt:s[r(308)],resolvedBy:s[r(311)],attributes:s[r(317)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(327)](e)[t(322)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(293)](So)[t(293)](ko),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(327)](e)[r(272)](n)[r(293)](So)[r(293)](ko);return{threadId:s[r(323)],resolvedAt:s[r(308)],resolvedBy:s[r(311)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(327)](e)[t(269)](n)[t(293)](So)[t(293)](ko),removeCommentThread:({channelId:e,threadId:n})=>this[t(327)](e)[t(303)](n)[t(293)](So)[t(293)](ko),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(327)](e)[t(304)](n,r,s,o)[t(293)](ko),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(327)](e)[t(263)](n,r,s,o)[t(293)](So)[t(293)](ko),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(327)](e)[t(288)](n,r)[t(293)](So)[t(293)](ko)},n instanceof e.Context){const e=n[t(294)][t(262)](t(336)),r=n[t(319)][t(262)](Xn);await this[t(300)](e);const s=await this[t(316)][t(262)](e)[t(270)]();this[t(291)](r,t(259)+e,(n,{session:s})=>{const o=t;s.id===r[o(343)]&&(n[o(279)](),this[o(334)][o(319)][o(262)](o(305))[o(247)](s[o(328)],e))}),r[t(349)](e,s)}}async[Oo(300)](t){const e=Oo;if(this[e(316)][e(332)](t))throw new n.CKEditorError(e(257),null,{channelId:t});const r=this[e(334)][e(319)][e(262)](e(331)),s=new(wo[e(254)])(t);this[e(316)][e(313)](t,s),this[e(291)](s,e(325),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(282)](o)||r[s(324)]({threadId:o,channelId:i,comments:l?l[s(268)](To):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(291)](s,e(320),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(282)](n)&&r[c(322)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(291)](s,e(310),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(282)](n);a&&a[i(314)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(291)](s,e(326),(t,{commentThreadId:n})=>{const s=e,o=r[s(282)](n);o&&o[s(301)]({isFromAdapter:!0})}),this[e(291)](s,e(292),(t,{commentThreadId:n})=>{const s=e,o=r[s(282)](n);o&&o[s(347)]({isFromAdapter:!0})}),this[e(291)](s,e(277),(t,n)=>{const s=e,o=n[s(323)],i=r[s(282)](o);i&&i[s(304)]({...To(n),isFromAdapter:!0})}),this[e(291)](s,e(312),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(282)](n);if(c){const t=c[a(338)](s);t&&t[a(337)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(291)](s,e(289),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(282)](n);if(i){const t=i[o(338)](s);t&&t[o(347)]({isFromAdapter:!0})}}),await this[e(287)](t)}[Oo(280)](){const t=Oo;if(this[t(334)]instanceof e.Context){const e=this[t(334)][t(294)][t(262)](t(336));this[t(315)](e)}}[Oo(315)](t){const e=Oo;if(!this[e(316)][e(332)](t))throw new n.CKEditorError(e(321),null,{channelId:t});this[e(327)](t)[e(250)](),this[e(316)][e(345)](t)}async[Oo(278)](){const t=Oo;for(const e of this[t(316)][t(329)]())await this[t(287)](e);if(this[t(334)]instanceof e.Context){const e=this[t(334)][t(294)][t(262)](t(336)),n=this[t(334)][t(319)][t(262)](Xn);n[t(307)](e);const r=await this[t(316)][t(262)](e)[t(270)]();n[t(349)](e,r)}}async[Oo(287)](t){const e=Oo,{connection:n}=this[e(334)][e(319)][e(262)](Fn),r=this[e(334)][e(319)][e(262)](e(331)),s=this[e(316)][e(262)](t),o=await s[e(342)](n);await this[e(340)](o);const i=new Set(Array[e(252)](r[e(341)]({channelId:t}),t=>t.id));for(const t of o)t[e(281)]||i[e(345)](t[e(323)]);for(const t of i)r[e(282)](t)[e(347)]({isFromAdapter:!0});for(const n of o){let s=r[e(282)](n[e(323)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(324)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[e(252)](s[e(290)],t=>t.id));for(const t of n[e(290)])p[e(345)](t[e(348)]);for(const t of p)s[e(338)](t)[e(347)]({isFromAdapter:!0});for(const t of n[e(290)]){const n=s[e(338)](t[e(348)]);n?n[e(256)]!==t[e(256)]&&n[e(337)]({content:t[e(256)],isFromAdapter:!0}):s[e(304)](Object[e(333)](To(t),{isFromAdapter:!0}))}}}[Oo(327)](t){const e=Oo;if(!this[e(316)][e(332)](t))throw new n.CKEditorError(e(274),null,{channelId:t});return this[e(316)][e(262)](t)}async[Oo(340)](t){const e=Oo,n=this[e(334)][e(319)][e(262)](zn.Users),{connection:r}=this[e(334)][e(319)][e(262)](Fn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(253)](r)&&s[e(309)](r);for(const{userId:t}of o)n[e(253)](t)||s[e(309)](t)}if(0===s[e(265)])return;const o=await b[e(296)](r,Array[e(252)](s));for(const t of o)n[e(253)](t.id)||n[e(283)](t)}}async function So(t){const e=Oo;if(e(330)!==t[e(339)])throw t}function ko(t){const e=Oo;if((n=t)[e(306)][e(258)](e(275))||n[e(306)][e(258)](e(344))||n[e(306)][e(258)](e(298)))return new Promise(()=>{});var n;throw t}function Ao(t,e){const n=vo();return(Ao=function(t,e){return n[t-=247]})(t,e)}function To(t){const e=Oo;return{threadId:t[e(323)],commentId:t[e(348)],content:t[e(256)],createdAt:t[e(318)],authorId:t[e(284)],attributes:t[e(317)]||{}}}const _o=Co;function Co(t,e){const n=Po();return(Co=function(t,e){return n[t-=398]})(t,e)}function Po(){const t=["open","CloudServicesTrackChangesAdapter","_waitForServiceReady","3949599qkCxgj","get","requires","402188lqMcJs","originalSuggestionId","message","plugins","catch","listenTo","connection","editor","state","25296732jGFjWu","add","type","TrackChangesService","getUser","config","attributes","cloud-services-internal-error: Not connected.","addUser","5573916qydYYV","TrackChangesEditing","then","_trackChangesService","hasSuggestion","2mQMDtR","connected","5921880DhfzyY","21PaIrkB","4701195YdJKPP","pluginName","isConnected","reconnect","values","addToReconnectionStack","off","isPremiumPlugin","isOfficialPlugin","collaboration.channelId","find","_fetchMissingUsersForThreads","adapter","delete","connect","init","startsWith","addSuggestionData","update","size","cloud-services-internal-error: Request timeout.","2108214MNIznS","data","suggestionUpdated","_saved","getMany","set","from","getSuggestion","_bufferedRequests"];return(Po=function(){return t})()}!function(t){const e=Co,n=t();for(;;)try{if(751187===-parseInt(e(447))/1+-parseInt(e(407))/2*(-parseInt(e(444))/3)+parseInt(e(402))/4+parseInt(e(411))/5+parseInt(e(432))/6*(parseInt(e(410))/7)+-parseInt(e(409))/8+-parseInt(e(456))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Po);class Eo extends e.Plugin{static[_o(459)]=(()=>Xe)();[_o(440)];[_o(405)];static get[_o(446)](){return[wo,_o(403),Fn]}static get[_o(412)](){return _o(442)}static get[_o(419)](){return!0}static get[_o(418)](){return!0}constructor(t){const e=_o;super(t);const n=this[e(454)][e(398)][e(445)](e(420));this[e(440)]=new Map,this[e(405)]=new(Eo[e(459)])(n)}[_o(426)](){const t=_o,e=this[t(454)][t(450)][t(445)](Fn),n=this[t(454)][t(450)][t(445)](t(403));return n[t(423)]={getSuggestion:async e=>{const n=t;await this[n(443)]();const r=await this[n(405)][n(445)](e)[n(451)](jo);return await this[n(422)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(443)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(405)][i(457)](e,n,r,s,o)[i(451)](t=>{if(Do(t))return new Promise(t=>{const n=Co;this[n(440)][n(437)](e,{resolve:t,suggestionData:a})});throw t});return this[i(440)][i(424)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(443)](),r(441)!==n[r(455)])return this[r(405)][r(429)](e,n)[r(451)](jo)}},this[t(452)](this[t(405)],t(434),(e,r)=>{const s=t;n[s(406)](r.id)&&(n[s(439)](r.id)[s(399)]=r[s(399)])}),this[t(405)][t(425)](e[t(453)])[t(404)](r=>(e[t(416)](this),this[t(422)](r)[t(404)](()=>{const e=t;for(const t of r)n[e(428)](t)[e(435)]=!0})))}async[_o(414)](){const t=_o,e=this[t(454)][t(450)][t(445)](t(403)),{connection:n}=this[t(454)][t(450)][t(445)](Fn),r=await this[t(405)][t(425)](n);await this[t(422)](r);for(const{suggestionData:e,resolve:n}of this[t(440)][t(415)]()){let s=r[t(421)](t=>t.id===e.id);s||(s=await this[t(405)][t(457)](e.id,e[t(458)],e[t(433)],e[t(448)])),n(s)}for(const n of r)e[t(406)](n.id)||e[t(428)](n)}async[_o(443)](){const t=_o;this[t(405)][t(413)]||await new Promise(e=>{const n=t;this[n(452)](this[n(405)],n(408),t=>{t[n(417)](),e()})})}async[_o(422)](t){const e=_o,n=this[e(454)][e(450)][e(445)](zn.Users),{connection:r}=this[e(454)][e(450)][e(445)](Fn),s=new Set;for(const{authorId:r}of t)n[e(460)](r)||s[e(457)](r);if(0===s[e(430)])return;const o=await b[e(436)](r,Array[e(438)](s));for(const t of o)n[e(460)](t.id)||n[e(401)](t)}}function jo(t){if(Do(t))return new Promise(()=>{});throw t}function Do(t){const e=_o;return t[e(449)][e(427)](e(400))||t[e(449)][e(427)](e(431))}const xo=Ro;function Ro(t,e){const n=No();return(Ro=function(t,e){return n[t-=307]})(t,e)}function No(){const t=["isOfficialPlugin","860wcEXjb","listenTo","2959131LymNHN","Comments","127752fYNSCx","destroy","pluginName","switchReadOnly","RealTimeCollaborativeComments","4629yGLzRk","29028gJznxC","isPremiumPlugin","init","connected","requires","config","change:state","2620824NtsNhl","data","5008395aBJhzL","editor","15536511lJSSlN","isThreadsLoadingPaused","32JyokVG","_setUpService","plugins","CommentsEditing","collaboration.channelId","ready","once","_terminateService","CommentsRepository","get"];return(No=function(){return t})()}!function(t){const e=Ro,n=t();for(;;)try{if(571076===parseInt(e(325))/1*(parseInt(e(339))/2)+-parseInt(e(318))/3+-parseInt(e(320))/4+-parseInt(e(316))/5*(-parseInt(e(326))/6)+-parseInt(e(335))/7+-parseInt(e(333))/8+parseInt(e(337))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(No);class Vo extends e.Plugin{static get[xo(330)](){return[xo(319),wo,bo,Fn]}static get[xo(322)](){return xo(324)}static get[xo(315)](){return!0}static get[xo(327)](){return!0}[xo(328)](){const t=xo,e=this[t(336)][t(307)][t(314)](Fn),n=this[t(336)][t(307)][t(314)](t(308)),r=this[t(336)][t(307)][t(314)](wo);return this[t(336)][t(334)][t(311)](t(310),()=>{const r=t;this[r(317)](e,r(332),(t,e,s)=>{const o=r;n[o(338)]=o(329)!==s})}),this[t(317)](e,t(332),(e,n,r)=>{const s=t;this[s(336)][s(307)][s(314)](s(313))[s(323)](s(329)!==r)}),r[t(340)](this[t(336)][t(331)][t(314)](t(309)))}[xo(321)](){const t=xo;this[t(336)][t(307)][t(314)](wo)[t(312)](this[t(336)][t(331)][t(314)](t(309))),super[t(321)]()}}var Mo=Bo;function Bo(t,e){var n=Jo();return(Bo=function(t,e){return n[t-=300]})(t,e)}function Jo(){var t=["10OrXvCT","49nqEjLc","236EPMzUW","39990YOmBqy","pluginName","isPremiumPlugin","250LHGcGw","RealTimeCollaborativeTrackChanges","31530CVZouB","92408RfcRZw","13163931QPwJrz","1194201AhNAkk","isOfficialPlugin","TrackChanges","3196400ZpBlfG","requires","3590FiYiVk"];return(Jo=function(){return t})()}!function(t){for(var e=Bo,n=t();;)try{if(425649===parseInt(e(305))/1*(parseInt(e(302))/2)+-parseInt(e(311))/3+-parseInt(e(300))/4+parseInt(e(309))/5*(-parseInt(e(306))/6)+-parseInt(e(304))/7*(-parseInt(e(312))/8)+parseInt(e(314))/9*(-parseInt(e(303))/10)+parseInt(e(313))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Jo);class Uo extends e.Plugin{static get[Mo(301)](){return[Vo,Eo,Mo(316)]}static get[Mo(307)](){return Mo(310)}static get[Mo(315)](){return!0}static get[Mo(308)](){return!0}}const qo=Yo;function Lo(){const t=["getOperations","_lastRequestId","authorsIds","fromVersion","reconnect","once","reInit","2361452yhVCRT","plugins","map","850188NqIBSk","updateRevisions","connect","requires","destroy","diffData","isBundleUploaded","_fixRevision","baseVersion","cloud-services-internal-error: Not connected.","_createCurrentRevision","_waitForServiceReady","isPremiumPlugin","cloudServices.bundleVersion","catch","21tinFWM","off","getRevisions","RevisionHistory","_handleRevisionsUpdate","getUser","creatorId","CONNECTED","buildRevisionData","_isPendingUpdate","7216020GRuqsr","addToReconnectionStack","affectsData","sessionId","1248336PDbGGB","345082lNnDcX","_revisions","getRevision","_startingVersion","_bufferedUpdates","_offset","_handleReconnectionError","isEmptyCurrent","_getLatestVersion","bind","listenTo","startsWith","_revisionTracker","isConnected","connected","5076248iCTlcj","_update","wrongRequestId","code","adapter","_fetchMissingUsers","RevisionTracker","cloud-services-internal-error: Revision History Service is not connected.","pluginName","message","setSource","reverse","setRevisionData","_getLatestVersionFromServerOperations","_revisionHistoryService","max","isEnabled","data","_isConnected","keys","size","from","CloudServicesRevisionHistoryAdapter","connection","400","then","toVersion","sendBufferedUpdates","authors","add","length","addUser","_bufferUpdate","get","3nEkAyS","remove","_revisionDataBuilder","serverHistory","_oldOffset","change:_isConnected","createdAt","type","marker","change:_isPendingUpdate","config","cloud-services-internal-error: Request timeout.","init","currentRevision","_preventResendingRevisionData","getMany","isOfficialPlugin","editor","has","collaboration.channelId","addRevisionData","repository","revisionsUpdated","RevisionHistoryService","12047848YZwfEQ","state"];return(Lo=function(){return t})()}!function(t){const e=Yo,n=t();for(;;)try{if(782585===parseInt(e(274))/1+-parseInt(e(241))/2+parseInt(e(208))/3*(parseInt(e(174))/4)+-parseInt(e(269))/5+parseInt(e(244))/6*(parseInt(e(259))/7)+parseInt(e(232))/8+-parseInt(e(273))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Lo);class Go extends e.Plugin{static[qo(231)]=(()=>Ve)();[qo(235)];[qo(171)];[qo(188)];[qo(212)];static get[qo(247)](){return[Fn,po,qo(262),Xn,zn.Users]}static get[qo(182)](){return qo(196)}static get[qo(224)](){return!0}static get[qo(256)](){return!0}constructor(t){const e=qo;super(t);const n=this[e(225)][e(218)][e(207)](e(227));this[e(235)]=null,this[e(171)]=this[e(225)][e(242)][e(207)](e(180)),this[e(188)]=new(Go[e(231)])(n)}async[qo(220)](){const t=qo,e=this[t(225)][t(242)][t(207)](po),r=e[t(211)],s=this[t(225)][t(242)][t(207)](Fn);this[t(171)][t(184)]({history:r,getLatestVersion:()=>this[t(167)](),getCurrentRevisionId:()=>e[t(272)]});const o=this[t(225)][t(218)][t(207)](t(257))||n.version,i=await Ae[t(250)](s[t(197)],o);this[t(225)][t(242)][t(207)](t(262))[t(178)]={getRevision:async({revisionId:e})=>(await this[t(255)](),await this[t(188)][t(276)](e)),updateRevisions:async e=>{const n=t;await this[n(255)]();const r=this[n(171)][n(221)];if(i&&1===e[n(204)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(166)]=t[n(237)]===t[n(200)]);return this[n(188)][n(245)](e,this[n(235)])[n(199)](t=>(this[n(235)]=t,e))[n(258)](t=>{const r=n;if(Ho(t)||r(198)===t[r(177)]&&void 0!==t[r(191)][r(176)]){for(const t of e)!this[r(171)][r(229)][r(276)](t.id)||this[r(171)][r(206)](t.id,t,!1);if(Ho(t))throw t;return e}throw t})}},this[t(169)](this[t(188)],t(230),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(189)](...n[s(243)](t=>t[s(200)]))>this[s(187)]()-1?this[s(167)]()[s(199)](()=>{this[s(263)](n,r)}):this[s(263)](n,r)});const{revisions:a,requestId:c}=await this[t(188)][t(246)](s[t(197)]);s[t(270)](this),this[t(235)]=c,await this[t(179)](a);for(const e of a)this[t(171)][t(228)](e);this[t(169)](e,t(213),(n,r,s)=>{const o=t;s&&(this[o(212)]=e[o(164)],n[o(260)]())}),this[t(171)][t(168)](t(190)).to(s,t(233),e=>e===Ie[t(266)])}async[qo(238)](){const t=qo,e=this[t(225)][t(242)][t(207)](Fn),n=this[t(225)][t(242)][t(207)](po),r=async()=>{const r=t,s=this[r(171)][r(221)],o=s.id,i=o!==n[r(272)];if(i){const t=n[r(164)]-this[r(212)],e=this[r(187)]();if(this[r(171)][r(210)][r(240)](),s[r(200)]+t!==e){const n=s[r(237)]+t,o=this[r(225)][r(242)][r(207)](zn.Users),i=this[r(171)][r(267)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(236)][r(243)](t=>o[r(264)](t));s[r(175)]({...i,authors:a},!0),this[r(171)][r(206)](s.id,i,!0)}this[r(171)][r(277)]=e,s[r(200)]===s[r(237)]&&!this[r(171)][r(163)][r(226)](o)&&this[r(171)][r(229)][r(275)][r(209)](o),this[r(171)][r(254)](e)}const{revisions:a,requestId:c}=await this[r(188)][r(238)](e[r(197)],this[r(235)]);i&&a[r(204)]>0?n[r(165)]():(await this[r(179)](a),this[r(263)](a,c),this[r(171)][r(201)]())};return n[t(192)]?r():new Promise((e,s)=>{const o=t;n[o(239)](o(213),()=>{const t=o;r()[t(199)](e)[t(258)](s)})})}[qo(248)](){super[qo(248)]()}async[qo(255)](){const t=qo;this[t(188)][t(172)]||await new Promise(e=>{const n=t;this[n(169)](this[n(188)],n(173),t=>{t[n(260)](),e()})})}[qo(187)](){const t=qo,e=this[t(225)][t(242)][t(207)](po)[t(211)][t(234)]()[t(185)]();for(const n of e)if(t(216)!==n[t(215)]||n[t(271)])return n[t(252)]+1}[qo(167)](){const t=qo,e=this[t(225)][t(242)][t(207)](po);return new Promise(n=>{const r=t;e[r(268)]?e[r(239)](r(217),()=>{n(this[r(187)]())}):n(this[r(187)]())})}[qo(263)](t,e){const n=qo,r=this[n(171)][n(229)];this[n(235)]=e;for(const e of t){const t=r[n(276)](e.id);if(t){if((e[n(237)]||e[n(200)])&&(e[n(249)]=null),t===this[n(171)][n(221)]){const r=Math[n(189)](t[n(200)],e[n(200)]),s=Math[n(189)](t[n(237)],e[n(237)]);let o;t[n(200)]===e[n(200)]&&t[n(237)]===e[n(237)]?(o=!0,this[n(222)](e)):e[n(200)]===r&&e[n(237)]===s?o=!1:(t[n(200)]===r&&t[n(237)]===s||this[n(251)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(237)],delete e[n(200)],delete e[n(249)],delete e[n(214)],delete e[n(236)])}this[n(171)][n(186)](e),this[n(222)](e)}else this[n(171)][n(228)](e)}const s=r[n(261)]();s[n(185)]();for(let t=0;t<s[n(204)]-1;t++){const e=s[t],r=s[t+1];if(e[n(237)]<r[n(200)]){const t=r[n(200)],s=Math[n(189)](t,e[n(200)]);this[n(251)]({revision:e,from:t,to:s})}}}[qo(251)]({revision:t,from:e,to:n}={}){const r=qo,s=this[r(225)][r(242)][r(207)](zn.Users),o=this[r(171)][r(267)]({revision:t,from:e,to:n});o[r(202)]=o[r(236)][r(243)](t=>s[r(264)](t)),t[r(175)](o)}[qo(222)](t){const e=qo,n={};n.id=t.id;for(const r of Object[e(193)](t))"id"!==r&&(n[r]=void 0);this[e(171)][e(206)](n.id,n,!0)}async[qo(179)](t){const e=qo,n=this[e(225)][e(242)][e(207)](zn.Users),{connection:r}=this[e(225)][e(242)][e(207)](Fn),s=new Set;for(const n of t){for(const t of n[e(236)])i(t);n[e(265)]&&i(n[e(265)])}if(0===s[e(194)])return;const o=await b[e(223)](r,Array[e(195)](s));for(const t of o)n[e(264)](t.id)||n[e(205)](t);function i(t){const r=e;n[r(264)](t)||s[r(203)](t)}}}function Yo(t,e){const n=Lo();return(Yo=function(t,e){return n[t-=163]})(t,e)}function Ho(t){const e=qo;return t[e(183)][e(170)](e(181))||t[e(183)][e(170)](e(253))||t[e(183)][e(170)](e(219))}var Fo=zo;function zo(t,e){var n=Ko();return(zo=function(t,e){return n[t-=207]})(t,e)}function Ko(){var t=["RealTimeCollaborativeRevisionHistory","3779876pIiRoA","pluginName","1783200CZEDMK","isPremiumPlugin","3382890zgJtRJ","3QtSDjH","21624jQJuFk","110Encjzl","7589gvpQOb","1431VCuCZF","requires","1606891fMSDmj","5032200nRwSXo","10wTpbdg","isOfficialPlugin","RevisionHistory"];return(Ko=function(){return t})()}!function(t){for(var e=zo,n=t();;)try{if(548966===parseInt(e(217))/1*(-parseInt(e(222))/2)+parseInt(e(214))/3*(parseInt(e(209))/4)+parseInt(e(211))/5+parseInt(e(221))/6+parseInt(e(213))/7+-parseInt(e(215))/8*(parseInt(e(218))/9)+parseInt(e(216))/10*(-parseInt(e(220))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ko);class Wo extends e.Plugin{static get[Fo(219)](){return[Fo(207),Go,bo]}static get[Fo(210)](){return Fo(208)}static get[Fo(223)](){return!0}static get[Fo(212)](){return!0}}function Xo(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}function Qo(t,e){const n=Zo();return(Qo=function(t,e){return n[t-=233]})(t,e)}function Zo(){const t=["isHidden","5010089ArZYQJ","bind","2063244HqBdbp","usersCount","ck-presence-list__counter--hidden","25UEFcyt","824546LQdOKt","div","set","ck-presence-list__users-counter","setTemplate","8zbtVOy","ck-presence-list__users-counter__text","ck-presence-list__list-item","toString","15LnnSZL","_collapseAt","listitem","10LNiPcr","7167094SceZMb","bindTemplate","11721303VflTvM","258872GFSGVE","5244IomFBy"];return(Zo=function(){return t})()}const $o=Qo;!function(t){const e=Qo,n=t();for(;;)try{if(895371===parseInt(e(253))/1+-parseInt(e(244))/2*(-parseInt(e(237))/3)+-parseInt(e(249))/4+parseInt(e(252))/5*(parseInt(e(245))/6)+parseInt(e(247))/7*(-parseInt(e(233))/8)+parseInt(e(243))/9+-parseInt(e(240))/10*(parseInt(e(241))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zo);class ti extends r.View{[$o(238)];constructor(t,e=6){const n=$o;super(t);const r=this[n(242)];this[n(255)](n(246),!0),this[n(255)](n(250),0),this[n(238)]=e,this[n(248)](n(246)).to(this,n(250),t=>t<e),this[n(257)]({tag:n(254),attributes:{class:["ck",n(235),r.if(n(246),n(251))],role:n(239)},children:[{tag:n(254),attributes:{class:["ck",n(256)]},children:[{tag:n(254),attributes:{class:["ck",n(234)]},children:[{text:r.to(n(250),t=>"+"+(t-this[n(238)]+2)[n(236)]())}]}]}]})}}const ei=ri;function ni(){const t=["bindTemplate","set",".ck-balloon-panel_with-arrow","querySelector","relatedTarget","7082236HiBDxb","739638GhKvqW","setTemplate","setAttribute","Collapsed connected users list (press ENTER to open it)",".ck-presence-list__dropdown-list","isExpanded","Connected users list","items","change:hasPopup","ck-presence-list__list","1395400FfxAdB","fire","list","keystrokes","presencelist:hide","contains","664535IPleEH","536040SIuHfD","aria-expanded","listenTo","removeAttribute","hasPopup","focus","1046499sxQqxf","createCollection","410801DDZrMW","element","presencelist:show","render","div"];return(ni=function(){return t})()}function ri(t,e){const n=ni();return(ri=function(t,e){return n[t-=218]})(t,e)}!function(t){const e=ri,n=t();for(;;)try{if(244308===parseInt(e(231))/1+parseInt(e(242))/2+parseInt(e(229))/3+parseInt(e(252))/4+-parseInt(e(222))/5+-parseInt(e(223))/6+-parseInt(e(241))/7)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ni);class si extends r.View{[ei(249)];[ei(219)];constructor(t){const e=ei;super(t);const r=this[e(236)];this[e(249)]=this[e(230)](),this[e(219)]=new n.KeystrokeHandler,this[e(237)]({hasPopup:!1,isExpanded:!1}),this[e(243)]({tag:e(235),attributes:{"aria-haspopup":r.if(e(227)),"aria-expanded":r.to(e(247),t=>this[e(227)]&&String(t)),"aria-label":r.to(e(227),n=>mr(t,e(n?245:248))),role:e(218),tabindex:r.to(e(227),t=>!!t&&0),class:["ck",e(251)]},children:this[e(249)],on:{mouseenter:r.to(()=>this[e(253)](e(233))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(239)](n(246)),o=document[n(239)](n(238));s?.[n(221)](r[n(240)])||o?.[n(221)](r[n(240)])||this[n(253)](n(220))})}}),this.on(e(250),(t,n,r)=>{const s=e;this[s(232)]&&(r?this[s(232)][s(244)](s(224),String(this[s(247)])):this[s(232)][s(226)](s(224)))})}[ei(228)](){const t=ei;this[t(232)][t(228)]()}[ei(234)](){const t=ei;super[t(234)](),this[t(219)][t(225)](this[t(232)])}}var oi=__webpack_require__(190),ii={attributes:{"data-cke":!0}};ii.setAttributes=or(),ii.insert=rr().bind(null,"head"),ii.domAPI=er(),ii.insertStyleElement=ar();$n()(oi.A,ii);oi.A&&oi.A.locals&&oi.A.locals;function ai(){const t=["items","listenTo","locale","ck-reset","set","301JdQsJq","hasPopup","ck-presence-list","42QSEhcI","tooltipPosition","bind","bindTemplate","4095500dYNXsB","3815073AbrEnQ","ck-presence-list--collapsed","inlineListView","change","354hVqUDv","counterView","first","ck-rounded-corners","isCollapsed","13481544FSPnZl","8524MaOoJg","157218NMOase","29212YTqWAW","setTemplate","5952235NYcarK","div"];return(ai=function(){return t})()}const ci=ui;function ui(t,e){const n=ai();return(ui=function(t,e){return n[t-=117]})(t,e)}!function(t){const e=ui,n=t();for(;;)try{if(884214===-parseInt(e(139))/1*(parseInt(e(125))/2)+-parseInt(e(119))/3*(-parseInt(e(127))/4)+-parseInt(e(129))/5+parseInt(e(126))/6*(-parseInt(e(136))/7)+parseInt(e(124))/8+parseInt(e(144))/9+parseInt(e(143))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ai);class di extends r.View{[ci(120)];[ci(117)];constructor(t,e=6){const n=ci;super(t);const r=this[n(142)];this[n(135)](n(123),!0),this[n(120)]=new ti(this[n(133)],e),this[n(117)]=new si(t),this[n(117)][n(141)](n(137)).to(this,n(123)),this[n(132)](this[n(117)][n(131)],n(118),()=>{const t=n;for(const e of this[t(117)][t(131)])e[t(140)]="s";this[t(117)][t(131)][t(121)]&&(this[t(117)][t(131)][t(121)][t(140)]="se")}),this[n(128)]({tag:n(130),attributes:{class:["ck",n(138),n(134),n(122),r.if(n(123),n(145))]},children:[this[n(117)]]})}}function li(){const t=["render","443710XHNaxO","ariaLabel","Connected users list dropdown menu","relatedTarget","1048QLvKIk","resize","ck-reset","querySelector","693931dwqEXl","ck-list","bindTemplate","setTemplate","max","innerHeight","checkIfScrollable","set","144hhUeDK","1397940LcKBFP","10444FKMcrX","contains","change","ck-presence-list__dropdown-list","window",".ck-presence-list__list","div","listWrapperView","ariaLabelledBy","role","items","6640947ztpoWt","element","scrollHeight",".ck-balloon-panel_with-arrow","listenTo","fire","application","ck-presence-list__dropdown-list-wrapper","_isScrollable","presencelist:hide","1555396gaZhXJ","ck-presence-list__dropdown-list-wrapper_scrollable","29649BNXxeA","clientHeight"];return(li=function(){return t})()}const pi=hi;function hi(t,e){const n=li();return(hi=function(t,e){return n[t-=202]})(t,e)}!function(t){const e=hi,n=t();for(;;)try{if(572350===parseInt(e(215))/1+parseInt(e(202))/2+parseInt(e(204))/3*(parseInt(e(223))/4)+-parseInt(e(207))/5+-parseInt(e(224))/6+-parseInt(e(225))/7*(parseInt(e(211))/8)+-parseInt(e(236))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(li);class fi extends r.View{[pi(232)];constructor(t,e){const n=pi;super(t);const r=this[n(217)];this[n(232)]=new mi(t,e),this[n(218)]({tag:n(231),attributes:{tabindex:-1,role:n(242),class:["ck",n(228)],"aria-label":mr(t,n(209))},children:[this[n(232)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(214)](e(230)),o=document[e(214)](e(239));s?.[e(226)](r[e(210)])||o?.[e(226)](r[e(210)])||this[e(241)](e(245))})}})}}class mi extends r.ListView{constructor(t,e){const r=pi;super(t);const s=this[r(217)];this[r(222)](r(244),!1),this[r(218)]({tag:e?r(231):"ul",attributes:{class:["ck",r(213),r(216),r(243),s.if(r(244),r(203))],role:s.to(r(234)),"aria-label":s.to(r(208)),"aria-labelledby":s.to(r(233))},children:this[r(235)]}),this[r(240)](n.global[r(229)],r(212),()=>this[r(221)]()),this[r(235)].on(r(227),()=>this[r(221)]())}[pi(206)](){const t=pi;super[t(206)](),this[t(221)]()}[pi(221)](){const t=pi,e=this[t(237)];e&&(this[t(244)]=Math[t(219)](e[t(238)],e[t(205)])>.8*window[t(220)])}}function yi(t,e){const n=gi();return(yi=function(t,e){return n[t-=273]})(t,e)}function gi(){const t=["6504468NdvMHI","presentation","setTemplate","button","931323sCfpJO","1394712lWAHAY","color","focus","bindTemplate","true","140fQNFfO","userView","21xXgmeX","7972461aFPjYQ","span","tag","getBackgroundColorClass","22745WHpqwn","3663060qNnzvE","fire","ck-presence-list__marker","2RfsYaK","17357390GjSptH","element","ck-presence-list__dropdown-list-item","11LjhgoD","execute","ck-user__full-name","name"];return(gi=function(){return t})()}const bi=yi;!function(t){const e=yi,n=t();for(;;)try{if(626703===parseInt(e(281))/1+-parseInt(e(298))/2*(parseInt(e(295))/3)+parseInt(e(287))/4*(parseInt(e(294))/5)+parseInt(e(277))/6+-parseInt(e(289))/7*(-parseInt(e(282))/8)+parseInt(e(290))/9+-parseInt(e(299))/10*(parseInt(e(273))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gi);class Ii extends r.ListItemView{[bi(288)];constructor(t,e,n){const r=bi;super(t);const s=this[r(285)];this[r(288)]=new zn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(301)],tabindex:-1,role:r(278),"aria-label":e[r(276)]},children:[this[r(288)],{tag:r(291),attributes:{class:["ck",r(275)]},children:[{text:e[r(276)]}]},{tag:r(291),attributes:{class:["ck",r(297),e[r(283)][r(293)]()],"aria-hidden":r(286)}}]};n&&(o[r(292)]=r(280),o.on={click:s.to(()=>this[r(296)](r(274)))}),this[r(279)](o)}[bi(284)](){const t=bi;this[t(300)][t(284)]()}}const Oi=wi;function vi(){const t=["listitem","1229515ehxveA","tooltipPosition","4gJWXTn","div","true","text","span","ck-presence-list__list-item__tooltip","button","ck-presence-list__marker","ck-presence-list__list-item","42ONJhfJ","bindTemplate","511337iQPoBx","hasTooltip","fire","3073704cKHbKo","528730ZiWkgb","tag","1056474pSOVgK","49510TeToMx","markerView","setTemplate","template","8LZEsAj","5064048frbIrd","color","99pURtBc","3lvoGxm","execute","name","set","isFocusable","userView","getBackgroundColorClass"];return(vi=function(){return t})()}function wi(t,e){const n=vi();return(wi=function(t,e){return n[t-=221]})(t,e)}!function(t){const e=wi,n=t();for(;;)try{if(530894===parseInt(e(251))/1*(parseInt(e(240))/2)+parseInt(e(230))/3*(parseInt(e(254))/4)+parseInt(e(222))/5*(-parseInt(e(249))/6)+-parseInt(e(238))/7+parseInt(e(226))/8*(-parseInt(e(221))/9)+parseInt(e(255))/10*(-parseInt(e(229))/11)+-parseInt(e(227))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vi);class Si extends r.View{[Oi(235)];[Oi(223)];constructor(t,e,n){const s=Oi;super(t);const o=this[s(250)];this[s(233)](s(234),!1),this[s(233)](s(252),!0),this[s(233)](s(239),""),this[s(235)]=new zn.UserView(t,e),this[s(223)]=new ki(t,e);const i=new r.LabelView(t);i[s(225)][s(256)]=s(244),i[s(243)]=e[s(232)];const a={tag:s(241),attributes:{class:["ck",s(248)],role:s(237),tabindex:o.to(s(234),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(235)][s(232)],"data-cke-tooltip-position":o.to(s(239)),"data-cke-tooltip-disabled":o.to(s(252),t=>!t),"data-cke-tooltip-class":s(245)},children:[this[s(235)],this[s(223)],i]};n&&(a[s(256)]=s(246),a.on={click:o.to(()=>this[s(253)](s(231)))}),this[s(224)](a)}}class ki extends r.View{constructor(t,e){const n=Oi;super(t),this[n(224)]({tag:n(244),attributes:{class:["ck",n(247),e[n(228)][n(236)]()],"aria-hidden":n(242)}})}}const Ai=Ti;function Ti(t,e){const n=_i();return(Ti=function(t,e){return n[t-=434]})(t,e)}function _i(){const t=["view","373184JhsgLd","offsetHeight","72VVaqHX","12tpEFnC","min","[contenteditable]","presenceList.displayMe","requires","pluginName","presenceDropdownView","presenceList.collapseAt","textarea","checkIfScrollable","number","querySelectorAll","pin","execute","isFocusable","167361qvXhkR","presenceList.container","showDropdown","unpin","activeElement","counterView","hideDropdown","using","96734VTnBGM","join","sort",':not([disabled]):not([tabindex="-1"])',"balloonPanelView","presencelist:show","isMe","_bodyCollection","indexOf","53375shIVrU","config","PresenceListUI","isCollapsed","class","element","allConnectedUsers","displayMe","input","_allConnectedUsers","presencelist-missing-container","get","2210076vaWxnj","filter","presencelist-collapseat-invalid-format","find","locale","Shift+Tab","tabIndex","_createView","1146vRFQeC","render","items","set","presenceList","[tabindex]","offsetWidth","appendChild","Esc","isRendered","40ITSkiN","length","_handleUserRemove","content","reverse","currentDisplayedUsers","attachToDom","7893305JKJsxo","from","isOfficialPlugin","ck ck-presence-list__balloon","body","bindTo","add","destroy","Tab","29035955phWnJw","16xusMKE","presencelist:hide","isVisible","inlineListView","define","map","hasTooltip","detachFromDom","_handleUserAdd","onClick","plugins","focus","usersCount","init","isPremiumPlugin","4jMoXZQ","focusTracker","change:isFocused","bind","keystrokes","listenTo","Enter","context","button","isExpanded","select","remove"];return(_i=function(){return t})()}!function(t){const e=Ti,n=t();for(;;)try{if(816667===-parseInt(e(537))/1*(parseInt(e(440))/2)+parseInt(e(458))/3*(-parseInt(e(442))/4)+-parseInt(e(512))/5+parseInt(e(495))/6*(parseInt(e(475))/7)+-parseInt(e(522))/8*(-parseInt(e(487))/9)+parseInt(e(505))/10*(-parseInt(e(466))/11)+-parseInt(e(443))/12*(-parseInt(e(521))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_i);const Ci={collapseAt:6,displayMe:!0};class Pi extends e.ContextPlugin{[Ai(510)];[Ai(470)];[Ai(439)];[Ai(449)];[Ai(473)]=null;static get[Ai(448)](){return Ai(477)}static get[Ai(514)](){return!0}static get[Ai(536)](){return!0}constructor(t){const e=Ai;super(t),this[e(434)][e(476)][e(526)](e(499),Ci);const s=t[e(476)][e(486)](e(450));if(e(453)!=typeof s)throw new n.CKEditorError(e(489),this);if(s<1)throw new n.CKEditorError(e(489),this);this[e(484)]=this[e(434)][e(532)][e(486)](Xn)[e(481)],this[e(498)](e(534),0),this[e(510)]=new n.Collection,this[e(470)]=new r.BalloonPanelView,this[e(470)][e(479)]=e(515),this[e(439)]=this[e(494)](),this[e(449)]=void 0}static get[Ai(447)](){return[Xn]}[Ai(535)](){const t=Ai;for(const e of this[t(484)])this[t(530)](e);this[t(542)](this[t(484)],t(518),(e,n)=>{this[t(530)](n)}),this[t(542)](this[t(484)],t(438),(e,n)=>{this[t(507)](n)})}[Ai(494)](){const t=Ai,e=this[t(434)],s=new di(this[t(434)][t(491)],this[t(434)][t(476)][t(486)](t(450))),o=this[t(470)];if(!Xo(e[t(476)][t(486)](t(459))))throw new n.CKEditorError(t(485),this);return s[t(463)][t(540)](t(534)).to(this),s[t(540)](t(478)).to(this,t(534),n=>{const r=t,{collapseAt:o}=e[r(476)][r(486)](r(499)),i=n>=o;if(i&&!s[r(525)][r(497)][r(490)](t=>t instanceof ti)){const t=this[r(434)][r(476)][r(486)](r(450))-1;this[r(510)][r(506)]==t&&this[r(510)][r(506)]>1&&this[r(510)][r(438)](this[r(510)][r(506)]-1),s[r(525)][r(497)][r(518)](s[r(463)])}return i||this[r(464)](),i}),s[t(525)][t(497)][t(517)](this[t(510)])[t(465)](n=>{const r=t,o=e[r(476)][r(486)](r(499)),i=new Si(e[r(491)],n,!!o[r(531)]);return i[r(540)](r(528)).to(s,r(478),t=>!t),i[r(540)](r(457)).to(s,r(478),t=>!t),o[r(531)]&&this[r(542)](i,r(456),()=>{const t=r;this[t(439)][t(478)]||o[t(531)](n,i[t(480)])}),i}),this[t(542)](s[t(525)],t(471),()=>{const e=t;this[e(439)][e(478)]&&this[e(460)]()}),this[t(542)](s[t(525)],t(523),()=>{const e=t;this[e(449)]&&this[e(464)]()}),s[t(525)][t(541)][t(498)](t(543),(e,n)=>{const r=t;this[r(439)][r(478)]&&(this[r(460)](),n())}),s[t(496)](),o[t(496)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(524)],contextElements:[o[t(480)],s[t(525)][t(480)]],callback:()=>this[t(464)]()}),e[t(476)][t(486)](t(459))[t(502)](s[t(480)]),this[t(473)]=new r.BodyCollection(this[t(434)][t(491)]),this[t(473)][t(511)](),this[t(473)][t(518)](this[t(470)]),s}[Ai(530)](t){const e=Ai;if(!this[e(434)][e(476)][e(486)](e(446))&&t[e(472)])return;const n=this[e(434)][e(476)][e(486)](e(450))-1;for(this[e(534)]++;this[e(510)][e(506)]>=n-(this[e(439)][e(478)]?1:0)&&this[e(510)][e(506)]>1;)this[e(510)][e(438)](1);const r=t[e(472)]?0:this[e(510)][e(506)];this[e(510)][e(518)](t,r)}[Ai(507)](t){const e=Ai;this[e(534)]--;const{collapseAt:n}=this[e(434)][e(476)][e(486)](e(499)),r=this[e(534)]>=n;if(this[e(510)][e(486)](t.id))this[e(510)][e(438)](t.id);else if(r&&this[e(510)][e(506)]+1===n-1)return;if(this[e(510)][e(506)]+(r?1:0)<this[e(534)])for(const t of Array[e(513)](this[e(484)])[e(509)]())if(!this[e(510)][e(486)](t.id)&&(this[e(510)][e(518)](t,Math[e(444)](this[e(510)][e(506)]-(r?1:0),1)),this[e(510)][e(506)]+(r?1:0)===n-1))return}[Ai(460)](){const t=Ai;if(this[t(449)])return;const e=this[t(434)][t(476)][t(486)](t(499));this[t(449)]=new fi(this[t(434)][t(491)],!!e[t(531)]),this[t(439)][t(525)][t(436)]=!0,this[t(542)](this[t(449)],t(523),()=>{const e=t;this[e(449)]&&this[e(464)]()});const{listWrapperView:n}=this[t(449)];n[t(497)][t(517)](this[t(484)])[t(465)](n=>{const r=t;if(!e[r(482)]&&n[r(472)])return null;const s=new Ii(this[r(434)][r(491)],n,!!e[r(531)]);return e[r(531)]&&this[r(542)](s,r(456),()=>{const t=r;e[t(531)](n,s[t(480)])}),s}),this[t(470)][t(508)][t(518)](this[t(449)]),this[t(470)][t(455)]({target:this[t(439)][t(525)][t(480)]}),n[t(533)](),n[t(452)]();const r=(e,n)=>{const r=t;this[r(464)](),this[r(439)][r(525)][r(533)](),n()};n[t(541)][t(498)](t(503),r),n[t(541)][t(498)](t(492),r),n[t(541)][t(498)](t(520),(e,n)=>{const r=t;!function(t){const e=Ti,n=["a",e(435),e(483),e(437),e(451),e(500),e(445)][e(527)](t=>t+e(469))[e(467)](","),r=[...document[e(516)][e(454)](n)][e(488)](t=>t===document[e(462)]||t[e(501)]+t[e(441)]>0)[e(468)]((t,n)=>(t[e(493)]||0)-(n[e(493)]||0)),s=r[e(474)](t),o=r[(s+1)%r[e(506)]];o&&o[e(533)]()}(this[r(439)][r(480)]),this[r(464)](),n()}),n[t(538)][t(518)](this[t(439)][t(480)]),n[t(538)].on(t(539),(e,n,r)=>{r||this[t(464)]()})}[Ai(464)](){const t=Ai;this[t(449)]&&(this[t(439)][t(525)][t(436)]=!1,this[t(470)][t(461)](),this[t(470)][t(508)][t(438)](this[t(449)]),this[t(449)][t(519)](),this[t(449)]=void 0)}[Ai(519)](){const t=Ai;super[t(519)](),this[t(439)]&&this[t(439)][t(504)]&&this[t(439)][t(519)](),this[t(473)]&&(this[t(473)][t(529)](),this[t(473)][t(519)](),this[t(473)]=null)}}function Ei(){var t=["PresenceList","322579pheqol","3773682VYaWdL","2vzCaRw","115512sDVanG","1515438UcgBVy","196mhmuDH","isOfficialPlugin","pluginName","isPremiumPlugin","1961632jZjhic","2387856IuwhzX","requires","561285uUHBVr"];return(Ei=function(){return t})()}var ji=Di;function Di(t,e){var n=Ei();return(Di=function(t,e){return n[t-=277]})(t,e)}!function(t){for(var e=Di,n=t();;)try{if(270850===parseInt(e(281))/1*(parseInt(e(283))/2)+parseInt(e(285))/3+-parseInt(e(290))/4+parseInt(e(279))/5+parseInt(e(284))/6*(parseInt(e(286))/7)+-parseInt(e(277))/8+-parseInt(e(282))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ei);class xi extends e.ContextPlugin{static get[ji(278)](){return[Xn,Pi]}static get[ji(288)](){return ji(280)}static get[ji(287)](){return!0}static get[ji(289)](){return!0}}function Ri(){var t=["4776425ZycnFe","1570uIClOu","204567FTfWOE","957618IpAvqH","48SYFRKp","8kXlCXF","319028BVuRGG","84080XXhpAt","6492087FAbuke","7UweAZi","2468932UsJVox"];return(Ri=function(){return t})()}function Ni(t,e){var n=Ri();return(Ni=function(t,e){return n[t-=257]})(t,e)}!function(t){for(var e=Ni,n=t();;)try{if(957772===-parseInt(e(260))/1+parseInt(e(263))/2+parseInt(e(257))/3*(-parseInt(e(259))/4)+-parseInt(e(264))/5+-parseInt(e(267))/6*(parseInt(e(262))/7)+-parseInt(e(258))/8*(parseInt(e(261))/9)+-parseInt(e(265))/10*(-parseInt(e(266))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ri)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
|
|
5
|
+
*/(()=>{var __webpack_modules__={2:(t,e,n)=>{"use strict";e.Service=n(626)},4:(t,e)=>{"use strict";var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,n){for(var s,o=null,i=[],a=0,c=0;e<n;){var u=t[e++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(t,e,n){for(var r,o=n,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:e[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},39:(t,e,n)=>{"use strict";t.exports=n(779)},63:(t,e,n)=>{"use strict";t.exports=o;var r=n(982);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(){r.call(this)}function i(t,e,n){t.length<40?s.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var r=0;r<t.length;)e[n++]=t[r++]}},o.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(i,e,t),this},o._configure()},188:t=>{"use strict";t.exports=function(t,e){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise(function(s,i){n[r]=function(t){if(o)if(o=!1,t)i(t);else{for(var e=new Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];s.apply(null,e)}};try{t.apply(e||null,n)}catch(t){o&&(o=!1,i(t))}})}},190:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(453),s=n.n(r),o=n(374),i=n.n(o)()(s());i.push([t.id,'.ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:inline-flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;flex-direction:row;justify-content:flex-end;position:relative}.ck.ck-presence-list__list:after{background:transparent;bottom:-15px;content:"";height:15px;left:0;position:absolute;width:100%}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:1px solid transparent;color:inherit;font:inherit;margin-left:var(--ck-spacing-medium);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list__list-item:focus,.ck.ck-presence-list__list-item.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list__list-item .ck-label{height:0;overflow:hidden;width:0}.ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:5px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{border:1px solid transparent;min-width:calc(var(--ck-user-avatar-size)*2);padding-left:1px}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck-presence-list__list:focus{border:var(--ck-focus-ring);border-radius:0;box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck-rounded-corners .ck.ck-presence-list--collapsed .ck-presence-list__list:focus,.ck.ck-presence-list--collapsed .ck-presence-list__list.ck-rounded-corners:focus{border-radius:var(--ck-border-radius)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{border:0;margin-left:calc(var(--ck-user-avatar-size)*-.35);padding:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:first-child{margin-left:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item .ck-user{--ck-presence-list-avatar-border-color:var(--ck-color-base-foreground);border:2px solid var(--ck-presence-list-avatar-border-color);margin-left:0;margin-right:0}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item.ck-presence-list__users-counter{margin-left:0;margin-right:0}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}@media (prefers-reduced-motion:reduce){.ck.ck-presence-list__balloon{animation:none}}.ck.ck-presence-list__balloon ul{background-color:var(--ck-color-presence-list-dropdown-background)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper.ck-presence-list__dropdown-list-wrapper_scrollable{max-height:80vh;overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:var(--ck-focus-ring);outline-offset:-1px;position:relative;z-index:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}.ck.ck-presence-list__users-counter{--ck-presence-list-counter-border-color:var(--ck-user-avatar-background);--ck-presence-list-counter-background-color:var(--ck-user-avatar-color);align-items:center;background-color:var(--ck-presence-list-counter-background-color);border:2px solid var(--ck-presence-list-counter-border-color);border-radius:50%;box-sizing:border-box;display:flex;height:calc(var(--ck-user-avatar-size) - 4px);justify-content:center;line-height:100%;margin:4px 2px 2px;position:relative;width:calc(var(--ck-user-avatar-size) - 4px)}.ck.ck-presence-list__users-counter__text{--ck-presence-list-counter-text-color:var(--ck-user-avatar-background);color:var(--ck-presence-list-counter-text-color);cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}',""]);const a=i},204:t=>{"use strict";t.exports={}},211:(t,e,n)=>{t.exports=n(312)("./src/collaboration-core.js")},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},312:t=>{"use strict";t.exports=CKEditor5.collaborationDll},322:(t,e)=>{"use strict";var n=e;n.length=function(t){for(var e=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?e+=1:n<2048?e+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var r,s=null,o=[],i=0;e<n;)(r=t[e++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(t,e,n){for(var r,s,o=n,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-o}},337:(t,e,n)=>{"use strict";var r=n(995),s=n(682),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return m(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(t=t||r);if("blob:"===t.protocol)s=new g(unescape(t.pathname),{});else if("string"===o)for(e in s=new g(t,{}),h)delete s[e];else if("object"===o){for(e in t)e in h||(s[e]=t[e]);void 0===s.slashes&&(s.slashes=a.test(t.href))}return s}function m(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function y(t,e){t=(t=l(t)).replace(i,""),e=e||{};var n,r=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 g(t,e,n){if(t=(t=l(t)).replace(i,""),!(this instanceof g))return new g(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=y(t||"",e=f(e))).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||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()}g.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||s.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";o[t]=e.charAt(0)!==i?i+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var 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}},g.extractProtocol=y,g.location=f,g.trimLeft=l,g.qs=s,t.exports=g},338:t=>{"use strict";t.exports=function(t,e,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return t(n);i+n>r&&(o=t(r),i=0);var a=e.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<t.length;u++){var d=[].concat(t[u]);r&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},i=[],a=0;a<t.length;a++){var c=t[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var 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}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},474:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return e&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):o},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===i?o:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},534:(t,e,n)=>{"use strict";t.exports=c;var r,s=n(641),o=s.LongBits,i=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return s.Buffer?function(t){return(c.create=function(t){return s.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function 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)}})}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},626:(t,e,n)=>{"use strict";t.exports=s;var r=n(641);function s(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(t,a,e,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(e,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,n){if(t)return a.emit("error",t,e),i(t);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return a.emit("error",t,e),i(t)}return a.emit("data",n,e),i(null,n)}a.end(!0)})}catch(t){return a.emit("error",t,e),void setTimeout(function(){i(t)},0)}else setTimeout(function(){i(Error("already ended"))},0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},641:function(t,e,n){"use strict";var r=e;function s(t,e,n){for(var r=Object.keys(e),s=0;s<r.length;++s)void 0!==t[r[s]]&&n||(t[r[s]]=e[r[s]]);return t}function o(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=n(188),r.base64=n(4),r.EventEmitter=n(730),r.float=n(791),r.inquire=n(706),r.utf8=n(322),r.pool=n(338),r.LongBits=n(474),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var n=t[e];return!(null==n||!t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},r.merge=s,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},682:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,i=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?e+i.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,s={};e=n.exec(t);){var o=r(e[1]),i=r(e[2]);null===o||null===i||o in s||(s[o]=i)}return s}},706:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},730:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],r=0;r<n.length;)n[r].fn===e?n.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,n)}return this}},763:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(453),s=n.n(r),o=n(374),i=n.n(o)()(s());i.push([t.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker-tooltip{color:#fff;display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker-tooltip{transition:none}}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-dot{width:0}.ck .ck-user__marker.ck-user__marker_hovered .ck-user__marker-tooltip{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-placeholder .ck-user__marker{display:none}@media (prefers-reduced-motion:reduce){.ck .ck-user__marker,.ck .ck-user__marker *,.ck .ck-user__marker:after{animation:none!important}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const a=i},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,s){var o;if(r)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var i=void 0!==s.layer;i&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,i&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var a=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},779:(t,e,n)=>{"use strict";var r=e;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(982),r.BufferWriter=n(63),r.Reader=n(534),r.BufferReader=n(799),r.util=n(641),r.rpc=n(2),r.roots=n(204),r.configure=s,s()},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},791:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),r=128===n[3];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(t,r,s){e[0]=t,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e[0]}function a(t,r){return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],e[0]}t.writeFloatLE=r?s:o,t.writeFloatBE=r?o:s,t.readFloatLE=r?i:a,t.readFloatBE=r?a:i}():function(){function e(t,e,n,r){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,n,r);else if(isNaN(e))t(2143289344,n,r);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,n,r);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(e)/Math.LN2);t((s<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(t,e,n){var r=t(e,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,r),t.readFloatLE=i.bind(null,s),t.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),r=128===n[7];function s(t,r,s){e[0]=t,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(t,r,s){e[0]=t,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(t,r){return n[0]=t[r],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],n[4]=t[r+4],n[5]=t[r+5],n[6]=t[r+6],n[7]=t[r+7],e[0]}function a(t,r){return n[7]=t[r],n[6]=t[r+1],n[5]=t[r+2],n[4]=t[r+3],n[3]=t[r+4],n[2]=t[r+5],n[1]=t[r+6],n[0]=t[r+7],e[0]}t.writeDoubleLE=r?s:o,t.writeDoubleBE=r?o:s,t.readDoubleLE=r?i:a,t.readDoubleBE=r?a:i}():function(){function e(t,e,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)t(0,s,o+e),t(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))t(0,s,o+e),t(2146959360,s,o+n);else if(r>17976931348623157e292)t(0,s,o+e),t((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,s,o+e),t((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+e),t((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(t,e,n,r,s){var o=t(r,s+e),i=t(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=i.bind(null,s,0,4),t.readDoubleBE=i.bind(null,o,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function r(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},799:(t,e,n)=>{"use strict";t.exports=o;var r=n(534);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(641);function o(t){r.call(this,t)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},982:(t,e,n)=>{"use strict";t.exports=l;var r,s=n(641),o=s.LongBits,i=s.base64,a=s.utf8;function c(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(t,e,n){e[n]=255&t}function f(t,e){this.len=t,this.next=void 0,this.val=e}function m(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function y(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}l.create=p(),l.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(t,e,n){return this.tail=this.tail.next=new c(t,e,n),this.len+=e,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(m,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(m,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(m,e.length(),e)},l.prototype.bool=function(t){return this._push(h,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(y,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(y,4,e.lo)._push(y,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var g=s.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r<t.length;++r)e[n+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(h,1,0);if(s.isString(t)){var n=l.alloc(e=i.length(t));i.decode(t,n,0),t=n}return this.uint32(e)._push(g,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new 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:()=>Eo,PresenceList:()=>xi,PresenceListUI:()=>Pi,RealTimeCollaborationClient:()=>po,RealTimeCollaborativeComments:()=>Vo,RealTimeCollaborativeEditing:()=>Io,RealTimeCollaborativeRevisionHistory:()=>Wo,RealTimeCollaborativeTrackChanges:()=>Jo,Sessions:()=>Qn,WebSocketGateway:()=>zn});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Decoder:()=>jt,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(y))}}function m(t){return{attributes:Object.keys(t).map(e=>({key:e,value:JSON.stringify(t[e])}))}}function y(t){return t.attributes.reduce((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t),{})}class g{static _SERVICE=2;constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new g(t)}static async get(t,e){const n=new a(e);try{const e=await t._sendRequest(g._SERVICE,a.TYPE,l.encode(n)),r=l.decode(e,c);return new g(r.attributes)}catch(t){return new g({id:e})}}static async getMany(t,e){const n=new h(e);try{const e=await t._sendRequest(g._SERVICE,h.TYPE,l.encode(n));return l.decode(e,f).users.map(t=>new g(t))}catch(t){return e.map(t=>new g({id:t}))}}}const b=g,I=Object.create(null);I.open="0",I.close="1",I.ping="2",I.pong="3",I.message="4",I.upgrade="5",I.noop="6";const O=Object.create(null);Object.keys(I).forEach(t=>{O[I[t]]=t});const v={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),S="function"==typeof ArrayBuffer,k=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,A=({type:t,data:e},n,r)=>w&&e instanceof Blob?n?r(e):T(e,r):S&&(e instanceof ArrayBuffer||k(e))?n?r(e):T(new Blob([e]),r):r(I[t]+(e||"")),T=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function _(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let C;const P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)E[P.charCodeAt(t)]=t;const D="function"==typeof ArrayBuffer,j=(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(D){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 U(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let s=0;s<e;s++)n[s]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function J(t){if(t)return function(t){for(var e in J.prototype)t[e]=J.prototype[e];return t}(t)}J.prototype.on=J.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},J.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},J.prototype.off=J.prototype.removeListener=J.prototype.removeAllListeners=J.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<r.length;s++)if((n=r[s])===e||n.fn===e){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},J.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,e)}return this},J.prototype.emitReserved=J.prototype.emit,J.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},J.prototype.hasListeners=function(t){return!!this.listeners(t).length};const q="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function L(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const G=q.setTimeout,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 J{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=j(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}const W="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),X={};let Q,Z=0,$=0;function tt(t){let e="";do{e=W[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function et(){const t=tt(+new Date);return t!==Q?(Z=0,Q=t):t+"."+tt(Z++)}for(;$<64;$++)X[W[$]]=$;let nt=!1;try{nt="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const rt=nt;function st(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||rt))return new XMLHttpRequest}catch(t){}if(!e)try{return new(q[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function ot(){}const it=null!=new st({xdomain:!1}).responseType;class at extends J{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=U(n,1);o=!(128&~t[0]),s=127&t[0],r=s<126?3:126===s?1:2}else if(1===r){if(B(n)<2)break;const t=U(n,2);s=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(B(n)<8)break;const t=U(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(v);break}s=o*Math.pow(2,32)+e.getUint32(4),r=3}else{if(B(n)<s)break;const t=U(n,s);a.enqueue(j(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=j(n[t],e);if(r.push(s),"error"===s.type)break}return r})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const n=t.length,r=new Array(n);let s=0;t.forEach((t,o)=>{A(t,!1,t=>{r[o]=t,++s===n&&e(r.join(N))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=et()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new at(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}},ht=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ft=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mt(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let s=ht.exec(t||""),o={},i=14;for(;i--;)o[ft[i]]=s[i]||"";return-1!=n&&-1!=r&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1);"/"==e.slice(-1)&&r.splice(r.length-1,1);return r}(0,o.path),o.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,r){e&&(n[e]=r)}),n}(0,o.query),o}class yt extends J{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=mt(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=mt(e.host).host),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&&yt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(t){let e=this.createTransport(t),n=!1;yt.priorWebsocketSuccess=!1;const r=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;yt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(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",yt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=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){yt.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}yt.protocol=4;yt.protocol;const gt="function"==typeof ArrayBuffer,bt=Object.prototype.toString,It="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),Ot="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function vt(t){return gt&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||It&&t instanceof Blob||Ot&&t instanceof File}function wt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(wt(t[e]))return!0;return!1}if(vt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return wt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&wt(t[e]))return!0;return!1}function St(t){const e=[],n=t.data,r=t;return r.data=kt(n,e),r.attachments=e.length,{packet:r,buffers:e}}function kt(t,e){if(!t)return t;if(vt(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=kt(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=kt(t[r],e));return n}return t}function At(t,e){return t.data=Tt(t.data,e),delete t.attachments,t}function Tt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Tt(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Tt(t[n],e));return t}const _t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ct=5;var Pt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Pt||(Pt={}));class Et{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!wt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=St(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}function Dt(t){return"[object Object]"===Object.prototype.toString.call(t)}class jt extends J{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===Pt.BINARY_EVENT;n||e.type===Pt.BINARY_ACK?(e.type=n?Pt.EVENT:Pt.ACK,this.reconstructor=new xt(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!vt(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===Pt[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Pt.BINARY_EVENT||n.type===Pt.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const s=t.substring(r,e);if(s!=Number(s)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!jt.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 Dt(e);case Pt.DISCONNECT:return void 0===e;case Pt.CONNECT_ERROR:return"string"==typeof e||Dt(e);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===_t.indexOf(e[0]));case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=At(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Rt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Nt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vt extends J{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Rt(t,"open",this.onopen.bind(this)),Rt(t,"packet",this.onpacket.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Nt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:Pt.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(s),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((r,s)=>{e.push((t,e)=>n?t?s(t):r(e):r(t)),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...r)=>{if(n!==this._queue[0])return;return null!==t?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,e.packet({type:Pt.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}function Mt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+n:t-n}return 0|Math.min(t,this.max)},Mt.prototype.reset=function(){this.attempts=0},Mt.prototype.setMin=function(t){this.ms=t},Mt.prototype.setMax=function(t){this.max=t},Mt.prototype.setJitter=function(t){this.jitter=t};class Bt extends J{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(n=e,e=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,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 yt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Rt(e,"open",function(){n.onopen(),t&&t()}),s=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Rt(e,"error",s);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Rt(t,"ping",this.onping.bind(this)),Rt(t,"data",this.ondata.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){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 Ut={};function Jt(t,e){"object"==typeof t&&(e=t,t=void 0);const n=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=mt(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}(t,(e=e||{}).path||"/socket.io"),r=n.source,s=n.id,o=n.path,i=Ut[s]&&o in Ut[s].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||i?a=new Bt(r,e):(Ut[s]||(Ut[s]=new Bt(r,e)),a=Ut[s]),n.query&&!e.query&&(e.query=n.queryKey),a.socket(n.path,e)}Object.assign(Jt,{Manager:Bt,Socket:Vt,io:Jt,connect:Jt});var qt=__webpack_require__(337);class Lt extends i{type;socketId;data;static DESCRIPTOR_NAME="ChannelMessage";static DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}};constructor(t,e,n){super(),this.type=t,this.socketId=e,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new Lt(t.type,t.socketId,t.data)}}const Gt=class extends((0,n.EmitterMixin)()){_channelName;_wsGateway;_socket;constructor(t,e,n){super(),this._channelName=t,this._wsGateway=e,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let n="";return e&&(n+="all:"),n+="event",t&&(n+=":"+t),n}_subscribeToChannel(){this._socket.on(this._channelName,t=>{const e=l.decode(t,Lt);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)})}};class Yt extends Error{context;code;data;constructor(t,e,n=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new Yt(function(t){let e="cloud-services-error: "+t.message;return t.data&&(e+="\nError data: "+JSON.stringify(t.data)),t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class Ht extends Error{code;traceId;data;constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new Ht(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}class zt extends i{flags;rooms;except;static TYPE=11;static DESCRIPTOR_NAME="PacketOptionsMessage";static DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}};constructor(t,e=[],n=[]){super(),this.flags=t,this.rooms=e,this.except=n}toJSON(){return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:this.rooms?.length?this.rooms:void 0,except:this.except?.length?this.except:void 0}}static fromJSON(t){return new zt(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}const Ft=(()=>!("undefined"==typeof process||!process.versions?.node))(),Kt=1,Wt=2,Xt=3,Qt=4;class Zt{static getPacketType(...t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*Math.pow(10,t.length-n-1);return e}static getType(t){if(Zt.isBuffer(t))return Kt;const e=typeof t;return"string"===e?Wt:"number"===e?Xt:Qt}static isBuffer(t){return Ft&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}class $t extends i{data;data1;static create(t,e){throw new TypeError("Must be implemented in a child class!")}}class te extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Kt))();static DESCRIPTOR_NAME="NumberBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new te(t.data,t.data1)}static create(t,e){return new te(t,e)}}class ee extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Kt))();static DESCRIPTOR_NAME="StringBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ee(t.data,t.data1)}static create(t,e){return new ee(t,e)}}class ne extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Kt,Kt))();static DESCRIPTOR_NAME="BytesBytesPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ne(t.data,t.data1)}static create(t,e){return new ne(t,e)}}class re extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Qt))();static DESCRIPTOR_NAME="StringObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new re(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new re(t,e)}}class se extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Qt))();static DESCRIPTOR_NAME="NumberObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new se(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new se(t,e)}}class oe extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Qt))();static DESCRIPTOR_NAME="ObjectObjectPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new oe(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new oe(t,e)}}class ie extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Qt,Kt))();static DESCRIPTOR_NAME="ObjectBufferPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new ie(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new ie(t,e)}}class ae extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Wt))();static DESCRIPTOR_NAME="StringStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ae(t.data,t.data1)}static create(t,e){return new ae(t,e)}}class ce extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Wt,Xt))();static DESCRIPTOR_NAME="StringNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ce(t.data,t.data1)}static create(t,e){return new ce(t,e)}}class ue extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Xt))();static DESCRIPTOR_NAME="NumberNumberPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new ue(t.data,t.data1)}static create(t,e){return new ue(t,e)}}class de extends $t{data;data1;static TYPE=(()=>Zt.getPacketType(Xt,Wt))();static DESCRIPTOR_NAME="NumberStringPacketDataMessage";static DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}};constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new de(t.data,t.data1)}static create(t,e){return new de(t,e)}}const le=(()=>[te,ee,ne,re,se,oe,ie,ae,ce,ue,de].reduce((t,e)=>(t[e.TYPE]=e,t),{}))();class 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 ye extends jt{_packetParser;constructor(t){super(),this._packetParser=t??new he}add(t){if(!Zt.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}class ge{_context;_deferredPromise=function(){let t,e;const n=new Promise((n,r)=>{t=n,e=r});return{resolve:t,reject:e,promise:n}}();timeout;constructor(t,e){this._context=t,this.timeout=setTimeout(()=>this.error(new 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 ge(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}async _waitForRequests(t=5e3,e=0){return!this._requests.size||e>=t/500?Promise.resolve():(await new Promise(t=>{setTimeout(t,500)}),this._waitForRequests(t,e++))}}const Ie={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected"};class Oe extends((0,n.ObservableMixin)()){_requestsManager;_url;_socket;_socketAuth;_channels;_connectionAttempt=0;_token;_options;_connectionProvider;_userFactory;static STATE_DISCONNECTED=(()=>Ie.DISCONNECTED)();static STATE_CONNECTING=(()=>Ie.CONNECTING)();static STATE_CONNECTED=(()=>Ie.CONNECTED)();static _CHANGE_STATE_EVENT_PRIORITY=(()=>n.priorities.get("highest")+999999)();constructor(t,e,n,r,s){if(super(),this._token=e,this._options=n??{},this._connectionProvider=r??Jt,this._userFactory=s??b.get,this._requestsManager=new be(this),this._channels=new Map,!t)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=qt(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",Ie.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",async(t,e,n)=>{if(this._debugEvent("ws-gw:change:state",n),n!==Oe.STATE_CONNECTED){if(n===Oe.STATE_DISCONNECTED)return this._requestsManager.errorAll(new 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=Jt,s=b.get){const o=new Oe(e,t,n,r,s);return await o._connect(),o}_sendRequest(t,e,n){if(!t)throw new 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:ye},path:n+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:"53.0.1"},agent:this._options.agent??!1,closeOnBeforeunload:!1});return this.state=Ie.CONNECTING,r.on("connect",()=>{this._debugEvent("connect"),this.socketId=r.id}),r.on("connect_error",t=>{this._debugEvent("connect_error",t)}),r.on("disconnect",()=>{this._debugEvent("disconnect"),this._onDisconnect()}),r.io.on("reconnect",async()=>{this._debugEvent("reconnect"),await this._onReconnect()}),r.io.on("reconnect_attempt",t=>{this._debugEvent("reconnect_attempt",t),this.state=Ie.CONNECTING,this._connectionAttempt=t}),r.on("unauthorized",t=>{this._debugEvent("unauthorized"),this._onUnauthorized(t)}),r.on("authenticationRequest",async t=>{this._debugEvent("authenticationRequest",t.attempt),await this._onReconnect()}),this._socket=r,r}_emit(t,e){const n=this._socket;return this._requestsManager.send(r=>{n.emit(t,e,(t,e)=>{if(t)return r.error(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 De 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 De(t.documentId)}}class je 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 je(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 De(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,je).toObject();return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:s}}_connectToChannel(t,e){this._channel=t._getChannel(Ne._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(Pe.TYPE),(t,e)=>{const{documentId:n,requestId:r,revisions:s}=l.decode(e,Pe).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Revision History",this);return this._wsGateway._sendRequest(12,t,l.encode(e))}}const Ve=Ne;class Me extends i{id;documentId;type;data;originalSuggestionId;attributes;static TYPE="101";static READABLE_TYPE_NAME="addSuggestion";static DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}};constructor(t,e,n,r={},s=null,o=null){super(),this.id=t,this.documentId=e,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Me(t.id,t.documentId,t.type,JSON.parse(t.data),t.originalSuggestionId??null,t.attributes?JSON.parse(t.attributes):null)}}class Be extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt?.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Be(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class Ue extends i{id;documentId;static TYPE="103";static READABLE_TYPE_NAME="getSuggestion";static DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new Ue(t.id,t.documentId)}}class Je extends i{id;authorId;type;hasComments;state;data;attributes;createdAt;static DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse";static DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}};constructor(t,e,n,r,s,o,i={},a=null){super(),this.id=t,this.authorId=e,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new Je(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}class qe extends i{documentId;static TYPE="102";static READABLE_TYPE_NAME="getAllSuggestions";static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new qe(t.documentId)}}class Le extends o{static DESCRIPTOR_NAME="SuggestionDescriptor";static DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}};static toJSON(t){return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}class Ge extends i{_suggestions;_suggestionsV2;suggestions;static DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse";static DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=e?.length?e:t}toJSON(){return{suggestions:this._suggestions?.map(t=>JSON.stringify(t)),suggestionsV2:this._suggestionsV2?.map(Le.toJSON)}}static fromJSON(t){return new Ge(t.suggestions?.map(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 Ue(t,this._documentId);try{const t=await this._sendRequest(Ue.TYPE,n);return l.decode(t,Je)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&e<5)return await(r=100*e,new Promise(t=>{setTimeout(t,r)})),this.get(t,e+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw Ht.fromPublicError(n)}var r}async getAll(){const t=new qe(this._documentId),e=await this._sendRequest(qe.TYPE,t),{suggestions:n}=l.decode(e,Ge);return n}async update(t,e={}){const{hasComments:n,state:r,attributes:s}=e,o=void 0!==n,i=new He(t,this._documentId,n,o,r,s);await this._sendRequest(He.TYPE,i)}async batchUpdateState(t){const e=new Ke(t.ids,this._documentId,t.state);await this._sendRequest(Ke.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(We._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(He.TYPE),(t,e)=>{const n=l.decode(e,He);this.fire("suggestionUpdated",n)})}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Track Changes",this);return this._wsGateway._sendRequest(10,t,l.encode(e))}}const Xe=We,Qe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ze;const $e=new Uint8Array(16);function tn(){if(!Ze&&(Ze="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ze))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ze($e)}const en=[];for(let t=0;t<256;++t)en.push((t+256).toString(16).slice(1));function nn(t,e=0){return en[t[e+0]]+en[t[e+1]]+en[t[e+2]]+en[t[e+3]]+"-"+en[t[e+4]]+en[t[e+5]]+"-"+en[t[e+6]]+en[t[e+7]]+"-"+en[t[e+8]]+en[t[e+9]]+"-"+en[t[e+10]]+en[t[e+11]]+en[t[e+12]]+en[t[e+13]]+en[t[e+14]]+en[t[e+15]]}const rn=function(t,e,n){if(Qe.randomUUID&&!e&&!t)return Qe.randomUUID();const r=(t=t||{}).random||(t.rng||tn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return nn(r)};class sn extends i{channel;sockets;static DESCRIPTOR_NAME="SessionsConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}};constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map(t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions}))}}static fromJSON(t){return new sn(t.channel,t.sockets.map(t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions})))}}class on extends i{id;sessionType;static TYPE="31";static READABLE_TYPE_NAME="getConnectedSockets";static DESCRIPTOR_NAME="SessionsConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}};constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new on(t.id,t.sessionType)}}class an extends i{id;userId;role;permissions;static TYPE="32";static READABLE_TYPE_NAME="connectSocket";static DESCRIPTOR_NAME="SocketConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}};constructor(t,e,n,r){super(),this.id=t,this.userId=e,this.role=n,this.permissions=r}toJSON(){return{id:this.id,userId:this.userId??void 0,role:this.role??void 0,permissions:this.permissions??void 0}}static fromJSON(t){return new an(t.id,t.userId,t.role,t.permissions)}}class cn extends i{id;static TYPE="33";static READABLE_TYPE_NAME="disconnectSocket";static DESCRIPTOR_NAME="SocketDisconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1}}};constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new cn(t.id)}}const un=class extends n.Collection{_id;_sessionType;_handlers=new Map;_channel;_wsGateway;_connected;_eventsQueue=[];_isRunning=!1;constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new on(this._id,this._sessionType);let n;try{const t=await this._wsGateway._sendRequest(3,on.TYPE,l.encode(e));n=l.decode(t,sn)}catch(t){n=new sn(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(t,e){const n=e.map(t=>t.userId),r=n.length?await b.getMany(t,n):[];return e.map(t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find(e=>e.id===t.userId)||new b,e})}(this._wsGateway,n.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,n){this._channel=t._getChannel(n,e),this._channel&&(this._addHandler(this._channel,an.TYPE,async e=>{const n=l.decode(e,an);if(-1===this.getIndex(n.id)){const e={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(e.user=await b.get(t,n.userId)),super.add(e)}}),this._addHandler(this._channel,cn.TYPE,t=>{const e=l.decode(t,cn);-1!==this.getIndex(e.id)&&super.remove(e.id)}))}async _onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect(!1),t===ve.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,n){const r=t.getEventName(e,!0);this.listenTo(t,r,async(t,e)=>{const n=t.name;this._eventsQueue.push({eventName:n,data:e}),await this._runQueue()}),this._handlers.set(r,n)}};class dn{static async getConnectedSessions(t,e,n){const r=new un(e,n);return await r.connect(t),r}}class ln extends i{id;buffers;types;bundleVersion;lastOperationId;static TYPE="11";static READABLE_TYPE_NAME="connectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingConnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}};constructor(t,e,n,r,s=""){super(),this.id=t,this.buffers=e,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new ln(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}class pn{static prepareMetadataForOperations(t,e){if(!t?.length||!e?.length)return[];const n=[];let r=0;for(const s of t)if(0!==s){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(t,e){if(!t?.length||!e?.length)return[];const n=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");n.push(e[r])}return n}}class hn extends o{static DESCRIPTOR_NAME="OperationMetadataDescriptor";static DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}};static toJSON({createdAt:t,...e}){const n={...e};return t?.toISOString&&(n.createdAt=t.toISOString()),n}static fromJSON({createdAt:t,...e}){const n={...e};return t&&(n.createdAt=new Date(t)),n}}class fn extends i{id;buffers;types;baseVersion;metadata;lastOperationId;static TYPE="13";static READABLE_TYPE_NAME="updateDocument";static DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}};constructor(t,e,n,r,s=[],o=""){super(),this.id=t,this.buffers=e,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new fn(t.id,t.buffers,t.types,t.baseVersion,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId)}}class mn extends i{id;lastKnowVersion;bundleVersion;static TYPE="12";static READABLE_TYPE_NAME="reconnectToDocument";static DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage";static DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}};constructor(t,e,n){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new mn(t.id,t.lastKnowVersion,t.bundleVersion)}}class yn extends i{version;buffers;types;metadata;lastOperationId;lastOperationAcceptedAt;static DESCRIPTOR_NAME="CollaborativeEditingResponse";static DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}};constructor(t,e=[],n=[],r=[],s="",o=null){super(),this.version=t,this.buffers=e,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){return!this.types?.length}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:pn.removeUnnecessaryMetadata(this.types,this.metadata).map(hn.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new yn(t.version,t.buffers,t.types,pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new yn(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}class gn extends i{channel;version;buffers;types;offset;metadata;initData;sessionId;lastOperationId;sessionCreatedAt;static DESCRIPTOR_NAME="CollaborativeEditingConnectResponse";static DESCRIPTOR=(()=>({fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:hn.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}))();constructor(t,e,n=[],r=[],s=0,o=[],i=null,a="",c="",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 gn(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){let e=null;return!0===t.isInitialized?e=t.initData??"":"boolean"!=typeof t.isInitialized&&t.initData&&(e=t.initData),gn.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:pn.prepareMetadataForOperations(t.types,t.metadata).map(hn.fromJSON),initData:e,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}class bn extends i{lastDocumentSession;currentDocumentSession;static DESCRIPTOR_NAME="GetDocumentDetailsResponse";static DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}};constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}toJSON(){return{lastDocumentSessionId:this.lastDocumentSession?.id,lastDocumentSessionOperationId:this.lastDocumentSession?.lastOperationId,currentDocumentSessionId:this.currentDocumentSession?.id,currentDocumentSessionVersion:this.currentDocumentSession?.version,currentDocumentSessionOperationId:this.currentDocumentSession?.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,n=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new bn(e,n)}}class In extends i{documentId;static TYPE="14";static READABLE_TYPE_NAME="getDocumentDetails";static DESCRIPTOR_NAME="GetDocumentDetailsMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}};constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new In(t.documentId)}}const On=class extends((0,n.EmitterMixin)()){static _SERVICE=1;_bundleVersion;_id;_isConnected;_wsGateway;_channel;_connectedSessions;constructor(t,e){if(super(),!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=e??rn(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},n){const r=new ln(this.getId(),e.buffers,e.types,this._bundleVersion,n);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new 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,yn)}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,gn);return this.listenTo(t,"change:state",(t,e,n)=>this._onWsGatewayStateChange(n),{priority:ve._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,r.channel),this._isConnected=!0,this.fire("connected"),r}_connectToChannel(t,e){this._channel=t._getChannel(1,e),this.listenTo(this._channel,this._channel.getEventName(fn.TYPE),(t,e)=>{const n=l.decode(e,fn);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)})}_onWsGatewayStateChange(t){t===ve.STATE_DISCONNECTED&&this.disconnect()}};class vn extends o{static DESCRIPTOR_NAME="CommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}class wn extends o{static DESCRIPTOR_NAME="CommentsThreadDescriptor";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}};static toJSON(t){return{...t,createdAt:t.createdAt?.toISOString(),deletedAt:t.deletedAt?.toISOString(),resolvedAt:t.resolvedAt?.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null,context:t.context?JSON.stringify(t.context):t.context,comments:t.comments?.map(vn.toJSON),unlinkedAt:t.unlinkedAt?.toISOString()}}static fromJSON(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,deletedAt:t.deletedAt?new Date(t.deletedAt):void 0,resolvedAt:t.resolvedAt?new Date(t.resolvedAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):null,context:t.context?JSON.parse(t.context):void 0,comments:t.comments?.map(vn.fromJSON),unlinkedAt:t.unlinkedAt?new Date(t.unlinkedAt):void 0}}}class Sn extends i{documentId;commentThreadId;content;commentId;userId;attributes;commentThread;createdAt;static TYPE="91";static READABLE_TYPE_NAME="addComment";static DESCRIPTOR_NAME="CommentsV2AddCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}};constructor(t,e,n,r="",s,o="",i=null,a){super(),this.documentId=t,this.commentThreadId=e,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Sn(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{},t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class kn extends i{commentThreadId;commentId;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}};constructor(t,e,n){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new kn(t.commentThreadId,t.commentId,t.createdAt)}}class An extends i{documentId;static TYPE="92";static READABLE_TYPE_NAME="connectToComment";static DESCRIPTOR_NAME="CommentsV2ConnectMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1}}};constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new An(t.documentId)}}class Tn extends i{channel;_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2ConnectResponse";static DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}};constructor(t,e,n){super(),this.channel=t,this._threads=e,this._threadsV2=n,this.threads=n?.length?n:e}toJSON(){return{channel:this.channel,threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new Tn(t.channel,t.threads?.map(t=>JSON.parse(t)),t.threadsV2?.map(wn.fromJSON))}}class _n extends i{documentId;commentThreadId;commentId;static TYPE="95";static READABLE_TYPE_NAME="removeComment";static DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}};constructor(t,e,n){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new _n(t.documentId,t.commentThreadId,t.commentId)}}class Cn extends i{documentId;commentThreadId;static TYPE="97";static READABLE_TYPE_NAME="removeCommentThread";static DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Cn(t.documentId,t.commentThreadId)}}class Pn extends i{documentId;commentThreadId;commentId;content;attributes;isAttributesUpdated;commentThread;static TYPE="96";static READABLE_TYPE_NAME="updateComment";static DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}};constructor(t,e,n,r,s=null,o=!1,i){super(),this.documentId=t,this.commentThreadId=e,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?wn.toJSON(this.commentThread):void 0}}static fromJSON(t){return new Pn(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated,t.commentThread?wn.fromJSON(t.commentThread):void 0)}}class En extends i{commentThreadId;documentId;static TYPE="93";static READABLE_TYPE_NAME="getComment";static DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new En(t.commentThreadId,t.documentId)}}class Dn 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 Dn(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 jn 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 jn(t.documentId)}}class xn extends i{_threads;_threadsV2;threads;static DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse";static DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}};constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=e?.length?e:t}toJSON(){return{threads:this._threads?.map(t=>JSON.stringify(t)),threadsV2:this._threadsV2?.map(wn.toJSON)}}static fromJSON(t){return new xn(t.threads?.map(t=>function(t){const e=JSON.parse(t),n={...e};return e.comments&&(n.comments=e.comments?.map(t=>({...t,createdAt:new Date(t.createdAt)}))),n}(t)),t.threadsV2?.map(wn.fromJSON))}}class Rn extends o{static DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor";static DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}};static toJSON(t){return{commentId:t.commentId,createdAt:t.createdAt?.toISOString()}}static fromJSON(t){return{commentId:t.commentId,createdAt:new Date(t.createdAt)}}}class Nn extends i{commentThreadId;comments;createdAt;static DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}};constructor(t,e,n=[]){super(),this.commentThreadId=t,this.comments=n,this.createdAt=new Date(e)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map(t=>Rn.toJSON(t))}}static fromJSON(t){return new Nn(t.commentThreadId,t.createdAt,t.comments.map(t=>Rn.fromJSON(t)))}}class Vn extends i{documentId;commentThreadId;comments;context;resolvedBy;attributes;createdAt;resolvedAt;deletedAt;static TYPE="140";static READABLE_TYPE_NAME="addCommentThread";static DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage";static DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}};constructor(t,e,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=t,this.commentThreadId=e,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:this.comments?.map(t=>vn.toJSON(t))}}static fromJSON(t){return new Vn(t.documentId,t.commentThreadId,t.comments?.map(e=>vn.fromJSON({...e,documentId:t.documentId,commentThreadId:t.commentThreadId})),t.context?JSON.parse(t.context):t.context,t.resolvedBy,t.createdAt?new Date(t.createdAt):void 0,t.resolvedAt?new Date(t.resolvedAt):void 0,t.deletedAt?new Date(t.deletedAt):void 0,t.attributes?JSON.parse(t.attributes):t.attributes)}}class Mn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static TYPE="142";static READABLE_TYPE_NAME="resolveCommentThread";static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt?.toISOString()}}static fromJSON(t){return new Mn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class Bn extends i{commentThreadId;documentId;static TYPE="141";static READABLE_TYPE_NAME="reopenCommentThread";static DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}};constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new Bn(t.commentThreadId,t.documentId)}}class Un extends i{commentThreadId;documentId;context;attributes;unlinkedAt;static TYPE="143";static READABLE_TYPE_NAME="updateCommentThread";static DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}};constructor(t,e,n,r=null,s=null){super(),this.commentThreadId=t,this.documentId=e,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(t){return new Un(t.commentThreadId,t.documentId,t.context?JSON.parse(t.context):t.context,t.attributes?JSON.parse(t.attributes):null,t.unlinkedAt?new Date(t.unlinkedAt):null)}}class Jn extends i{commentThreadId;documentId;resolvedBy;resolvedAt;static DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse";static DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}};constructor(t,e,n,r){super(),this.commentThreadId=t,this.documentId=e,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(t){return new Jn(t.commentThreadId,t.documentId,t.resolvedBy,t.resolvedAt)}}class qn extends((0,n.EmitterMixin)()){_documentId;_isConnected=!1;_wsGateway;_channel;_connectedSessions;static _SERVICE=9;constructor(t){super(),this._documentId=t}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==Ie.CONNECTED)throw new 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,Jn)}async reopenCommentThread(t){const e=new Bn(t,this._documentId);await this._sendRequest(Bn.TYPE,e)}async updateCommentThread(t){const e=new Un(t.commentThreadId,this._documentId,t.context,t.attributes,t.unlinkedAt);await this._sendRequest(Un.TYPE,e)}async getCommentThread(t,e=1){const n=new En(t,this._documentId);try{const t=await this._sendRequest(En.TYPE,n),e=l.decode(t,Dn);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 jn(this._documentId),e=await this._sendRequest(jn.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(Un.TYPE),(t,e)=>{const n=l.decode(e,Un);this.fire("commentThreadUpdated",n)}),this.listenTo(this._channel,this._channel.getEventName(Mn.TYPE),(t,e)=>{const n=l.decode(e,Mn);this.fire("commentThreadResolved",n)}),this.listenTo(this._channel,this._channel.getEventName(Bn.TYPE),(t,e)=>{const n=l.decode(e,Bn);this.fire("commentThreadReopened",n)}))}_onWsGatewayStateChange(t){t===Ie.DISCONNECTED&&this.disconnect()}_sendRequest(t,e){if(!this._wsGateway||!this._isConnected)throw new Re("Comments",this);return this._wsGateway._sendRequest(9,t,l.encode(e))}}const Ln=qn,Gn=Hn;function Yn(){const t=["3261357Ncsgpu","state","function","limitExceeded","token","_isBrowserOffline","reconnect","requires","set","has","2429632zRIqnu","_domEmitter","change:me","removeFromReconnectionStack","delete","cloudservices-reconnection-error","isOfficialPlugin","add","_shouldPluginsReconnect","_reconnect","CloudServices","from","cloudServices.requestTimeout","define","listenTo","connect","websocketgateway-missing-websocket-url","init","error","then","112iLxyht","12392ZMMZzz","offline","websocketgateway-plugin-already-registered","context","cloudServices.connectionTimeout","bind","_reconnectionStack","21SfsVhN","initialReconnectionInterval","DISCONNECTED","config","connection","connected","108xaitkN","816GklGeS","2183680cvkYhz","real-time-collaboration","WebSocketGateway","isPremiumPlugin","catch","cloudservices-init","CONNECTED","all","online","1454274iyrvQX","addToReconnectionStack","isInReconnectionStack","CONNECTING","10pYBAvL","destroy","websocketgateway-missing-token","plugins","get","constructor","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.","webSocketUrl","pluginName","Connected users limit exceeded","code","disconnect","websocketgateway-invalid-plugin-interface","showWarning","28728aUTTil","stopListening","193941TeyZXB"];return(Yn=function(){return t})()}function Hn(t,e){const n=Yn();return(Hn=function(t,e){return n[t-=149]})(t,e)}!function(t){const e=Hn,n=t();for(;;)try{if(878153===parseInt(e(199))/1*(-parseInt(e(200))/2)+-parseInt(e(168))/3+-parseInt(e(179))/4*(parseInt(e(152))/5)+-parseInt(e(224))/6*(-parseInt(e(207))/7)+-parseInt(e(214))/8*(parseInt(e(166))/9)+-parseInt(e(215))/10+-parseInt(e(169))/11*(-parseInt(e(213))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Yn);class zn extends e.ContextPlugin{static[Gn(217)]=(()=>ve)();static[Gn(208)]=1e3;[Gn(211)];[Gn(206)];[Gn(187)];[Gn(180)];static get[Gn(176)](){return[Gn(189),r.Notification]}static get[Gn(160)](){return Gn(217)}static get[Gn(185)](){return!0}static get[Gn(218)](){return!0}constructor(t){const e=Gn;super(t),this[e(177)](e(170),Ie[e(221)]),this[e(177)](e(174),!1),this[e(206)]=new Set,this[e(187)]=!1,this[e(180)]=new((0,n.DomEmitterMixin)())}[Gn(196)](){const t=Gn,e=this[t(203)],s=e[t(155)][t(156)](t(189)),o=e[t(155)][t(156)](r.Notification);if(!s[t(173)])throw new n.CKEditorError(t(154),this);if(!s[t(159)])throw new n.CKEditorError(t(195),this);return this[t(180)][t(193)](window,t(201),()=>this[t(174)]=!0),this[t(180)][t(193)](window,t(223),()=>this[t(174)]=!1),this[t(203)][t(210)][t(192)](t(204),10),this[t(203)][t(210)][t(192)](t(191),20),zn[t(217)][t(194)](s[t(173)],s[t(159)],{timeout:1e3*this[t(203)][t(210)][t(156)](t(204)),requestTimeout:1e3*this[t(203)][t(210)][t(156)](t(191))})[t(198)](e=>{const r=t;if(this[r(211)]=e,this[r(205)](r(170)).to(e,r(170),this,r(174),(t,e)=>(r(212)!==t&&(this[r(187)]=!0),e||t!==Ie[r(221)]?Ie[r(209)]:this[r(170)]==Ie[r(209)]&&this[r(187)]?(this[r(187)]=!1,this[r(188)](),Ie[r(151)]):Ie[r(221)])),this[r(211)].on(r(197),(t,e)=>{const s=r;if(s(172)!==e[s(162)])throw console[s(197)](e),new n.CKEditorError(s(220),null,{originalError:e});o[s(165)](s(158),{title:s(161),namespace:s(216)})}),!e.me)return new Promise(t=>e.on(r(181),t))})[t(219)](e=>{const r=t;throw console[r(197)](e),new n.CKEditorError(r(220),null,{originalError:e})})}[Gn(149)](t){const e=Gn;if(e(171)!=typeof t[e(175)])throw new n.CKEditorError(e(164),this);if(this[e(150)](t))throw new n.CKEditorError(e(202),this,{name:t[e(157)][e(160)]});this[e(206)][e(186)](t)}[Gn(182)](t){const e=Gn;this[e(206)][e(183)](t)}[Gn(150)](t){const e=Gn;return this[e(206)][e(178)](t)}[Gn(188)](){const t=Gn;return this[t(211)][t(175)]()[t(198)](()=>Promise[t(222)](Array[t(190)](this[t(206)],e=>e[t(175)]())))[t(198)](()=>this[t(170)]=Ie[t(221)])[t(219)](e=>{const r=t;throw console[r(197)](e),new n.CKEditorError(r(184),this[r(203)])})}[Gn(163)](){const t=Gn;this[t(211)]&&this[t(211)][t(163)](),this[t(170)]=Ie[t(209)],this[t(180)][t(167)]()}[Gn(153)](){const t=Gn;this[t(163)](),super[t(153)]()}}var Fn=__webpack_require__(211);function Kn(){const t=["set","clear","_createUser","3604181pWcIQw","delete","fire","change:state","26257272PDfGUK","size","remove","get","role","getUserSessions","5ozCudy","isOfficialPlugin","587256UVlqTz","24130WnaphM","unregister","channelSessions","_uniqueUsersCount","listenTo","4614212JbfFDN","4565VuUbFU","sessionId","sessionAdd:","register","forEach","defineMe","allConnectedUsers","add","plugins","_handleSessionRemove","sessions-register-already-registered","2985672SIhDBB","isPremiumPlugin","context","mySessionId","99VHKJBS","channelConnectedUsers","sessions-unregister-not-exist","Sessions","isMe","stopListening","2eovZeH","assign","user","getUser","state","_users","_registeredSessions","orderNumber","hiddenInPresenceList","6BQjqRr","559823oOusYt","connection","values","_handleSessionAdd","getUserBySessionId","connected","init","requires","pluginName","addUser","getUserRole","has"];return(Kn=function(){return t})()}const Wn=Xn;function Xn(t,e){const n=Kn();return(Xn=function(t,e){return n[t-=227]})(t,e)}!function(t){const e=Xn,n=t();for(;;)try{if(582503===-parseInt(e(272))/1*(-parseInt(e(262))/2)+-parseInt(e(252))/3+-parseInt(e(240))/4*(-parseInt(e(232))/5)+-parseInt(e(271))/6*(parseInt(e(287))/7)+parseInt(e(234))/8*(-parseInt(e(256))/9)+-parseInt(e(235))/10*(parseInt(e(241))/11)+parseInt(e(291))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Kn);class Qn extends e.ContextPlugin{[Wn(237)];[Wn(257)];[Wn(247)];[Wn(268)];[Wn(238)];[Wn(267)];static get[Wn(280)](){return Wn(259)}static get[Wn(233)](){return!0}static get[Wn(253)](){return!0}static get[Wn(279)](){return[zn,Fn.Users]}constructor(t){const e=Wn;super(t),this[e(237)]=new Map,this[e(257)]=new Map,this[e(247)]=new n.Collection,this[e(268)]=new Map,this[e(238)]=0,this[e(267)]=this[e(254)][e(249)][e(229)](Fn.Users)}[Wn(278)](){const t=Wn,e=this[t(254)][t(249)][t(229)](zn);this[t(239)](e,t(290),(e,n,r)=>{const s=t;if(s(277)!==r)this[s(237)][s(245)](t=>t[s(285)]()),this[s(257)][s(245)](t=>t[s(285)]()),this[s(247)][s(285)]();else for(const[t,e]of this[s(268)])for(const n of e)this[s(275)](t,n)}),this[t(286)](e[t(273)].me,!0)}[Wn(244)](t,e){const r=Wn;if(this[r(268)][r(283)](t))throw new n.CKEditorError(r(251),null,{channelId:t});this[r(268)][r(284)](t,e),this[r(237)][r(284)](t,new n.Collection),this[r(257)][r(284)](t,new n.Collection),this[r(239)](e,r(248),(e,n)=>this[r(275)](t,n)),this[r(239)](e,r(228),(e,n)=>this[r(250)](t,n));for(const n of e)this[r(275)](t,n)}[Wn(236)](t){const e=Wn;if(!this[e(268)][e(283)](t))throw new n.CKEditorError(e(258),null,{channelId:t});const r=this[e(268)][e(229)](t);this[e(261)](r);for(const n of r)e(277)===this[e(254)][e(249)][e(229)](zn)[e(266)]&&this[e(250)](t,n);this[e(268)][e(288)](t),this[e(237)][e(288)](t),this[e(257)][e(288)](t)}get[Wn(255)](){const t=Wn;return this[t(254)][t(249)][t(229)](zn)[t(273)][t(242)]}[Wn(276)](t){const e=Wn;for(const n of this[e(237)][e(274)]())for(const r of n)if(r.id===t)return r[e(264)]}[Wn(231)](t,e){const n=Wn,r=e?[this[n(237)][n(229)](e)]:this[n(237)][n(274)](),s=new Set;for(const e of r)for(const r of e)r[n(264)].id===t.id&&s[n(248)](r.id);return s}[Wn(282)](t){const e=Wn;for(const n of this[e(237)][e(274)]())for(const r of n)if(r[e(264)]===t)return r[e(230)]}[Wn(275)](t,e){const n=Wn;if(n(277)!==this[n(254)][n(249)][n(229)](zn)[n(266)])return;const r=e[n(264)],s=this[n(267)][n(265)](r.id)||this[n(286)](r),o=Object[n(263)]({},e,{user:s});if(this[n(237)][n(229)](t)[n(248)](o),!r[n(270)]){const e=this[n(257)][n(229)](t);e[n(283)](s.id)||e[n(248)](s),this[n(247)][n(283)](s.id)||r[n(270)]||this[n(247)][n(248)](s,s[n(260)]?0:void 0)}this[n(289)](n(243)+t,{channelId:t,session:o})}[Wn(250)](t,e){const n=Wn;if(n(277)!==this[n(254)][n(249)][n(229)](zn)[n(266)])return;const r=this[n(257)][n(229)](t),s=e[n(264)];s.id&&(this[n(237)][n(229)](t)[n(228)](e.id),r[n(283)](s.id)&&!this[n(231)](s,t)[n(227)]&&r[n(228)](s.id),this[n(247)][n(229)](s.id)&&!this[n(231)](s)[n(227)]&&this[n(247)][n(228)](s.id))}[Wn(286)](t,e){const n=Wn,r=this[n(267)][n(281)](t);return e&&this[n(267)][n(246)](t.id),r[n(269)]=this[n(238)]++,r}}var Zn=__webpack_require__(450),$n=__webpack_require__.n(Zn),tr=__webpack_require__(774),er=__webpack_require__.n(tr),nr=__webpack_require__(265),rr=__webpack_require__.n(nr),sr=__webpack_require__(410),or=__webpack_require__.n(sr),ir=__webpack_require__(238),ar=__webpack_require__.n(ir),cr=__webpack_require__(763),ur={attributes:{"data-cke":!0}};ur.setAttributes=or(),ur.insert=rr().bind(null,"head"),ur.domAPI=er(),ur.insertStyleElement=ar();$n()(cr.A,ur);cr.A&&cr.A.locals&&cr.A.locals;const dr=lr;function lr(t,e){const n=fr();return(lr=function(t,e){return n[t-=319]})(t,e)}!function(t){const e=lr,n=t();for(;;)try{if(769797===parseInt(e(457))/1*(-parseInt(e(333))/2)+-parseInt(e(420))/3+-parseInt(e(458))/4*(parseInt(e(446))/5)+parseInt(e(423))/6+parseInt(e(412))/7+-parseInt(e(395))/8*(parseInt(e(425))/9)+-parseInt(e(449))/10*(-parseInt(e(328))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(fr);class pr extends e.Plugin{[dr(445)]=new((0,n.DomEmitterMixin)());static get[dr(408)](){return[Qn]}static get[dr(321)](){return dr(349)}static get[dr(414)](){return!0}static get[dr(320)](){return!0}[dr(376)](){const t=dr,e=this[t(324)],r=e[t(345)][t(322)](Qn);e[t(353)][t(354)](t(427))[t(334)]({model:t(432),view:(n,{writer:s})=>function(e,n,r,s){const o=t,i=e[o(343)][o(439)](":")[2],a=r[o(330)](i);if(!a||i===r[o(361)])return;if(!s[o(362)][o(347)][o(402)](e[o(379)][o(455)],o(355)))return;const c={class:o(434)+a[o(331)][o(415)](),"data-name":a[o(386)],"data-session-id":i},u=s[o(362)][o(377)][o(322)](e[o(343)])[o(357)](),d=u[o(371)],l=s[o(362)][o(347)];if(d&&l[o(390)](d)&&l[o(364)](d)&&!s[o(362)][o(377)][o(322)](o(416)+i)[o(359)]()[o(338)])return;const p=u[o(422)];return s[o(362)][o(347)][o(380)](p)&&!s[o(362)][o(387)](p)&&(c[o(436)]=!1),function(t,e,n){const r=o,s=t[r(403)](r(418),e);return t[r(452)](r(394),!0,s),s[r(411)]=function(t){const e=r,s=this[e(453)](t),o=document[e(336)](e(418));return o[e(326)][e(400)](e(441)),o[e(404)](e(436),e(396)),o[e(404)](e(342),e(396)),o[e(319)]=n[e(386)],s[e(351)]=e(397)+o[e(344)]+"",s[e(363)](e(337),()=>{const t=e;s[t(326)][t(400)](t(405))}),s[e(363)](e(426),()=>{const t=e;s[t(326)][t(365)](t(405))}),s},s[r(388)]=function(t){const e=r;return!(!this[e(450)](e(394))||!t[e(450)](e(394))||this[e(358)](e(383))!=t[e(358)](e(383)))},s}(n,c,a)}(n,s,r,e)}),e[t(353)][t(354)](t(427))[t(356)]({model:t(352),view:e=>function(e,n){const r=t,s=e[r(343)][r(439)](":")[2];if(s===n[r(361)])return null;const o=n[r(330)](s);return o?{id:s,classes:[r(323),o[r(331)][r(424)]()],attributes:{"data-session-id":s},priority:2e3+o[r(454)]}:{id:s,classes:[]}}(e,r)}),function(e){const n=t,r=e[n(362)],o=new Map,i=e[n(345)][n(322)](Qn);r[n(377)].on(n(360),(t,a,c,u)=>{const d=n;if(!u&&o[d(322)](a[d(386)]))return o[d(322)](a[d(386)])[d(444)](),void o[d(372)](a[d(386)]);const l=a[d(386)][d(439)](":")[2];if(l===i[d(361)])return;const p=d(451)+l;r[d(377)][d(438)](p)&&e[d(385)][d(368)](p),a.on(d(346),(t,e,n)=>{const i=d;if(i(366)!=e[i(428)][i(327)]&&i(366)==a[i(359)]()[i(428)][i(327)]&&!o[i(438)](a[i(386)])){const t=r[i(347)][i(448)](n[i(375)]);if(t){const e=s.ModelLiveRange[i(340)](t);o[i(430)](a[i(386)],e),e.on(i(346),(t,n,s)=>{const c=i;if(c(366)==e[c(428)][c(327)]){const t=r[c(347)][c(448)](s[c(375)]);t?(e[c(455)]=t[c(455)],e[c(447)]=t[c(447)]):(o[c(372)](a[c(386)]),e[c(444)]())}})}}})}),r[n(381)].on(n(399),()=>{const t=n;o[t(341)]>0&&r[t(374)]({isUndoable:!1},e=>{const n=t;for(const[t,s]of o)n(366)==r[n(377)][n(322)](t)[n(359)]()[n(428)][n(327)]&&(hr(t[n(439)](":")[2],s[n(443)](),r,e),s[n(444)]());o[n(413)]()})})}(e),this[t(445)][t(421)](n.global[t(381)],t(384),(n,{key:r})=>{const s=t;s(335)===r&&function(t){const e=s;t[e(385)][e(437)][e(399)](n=>{const r=e;for(const e of t[r(362)][r(377)]){if(!e[r(386)][r(332)](r(432)))continue;const s=t[r(385)][r(392)][r(435)](e[r(386)]);if(s)for(const t of s)n[r(325)](r(405),t)}})}(e)},{useCapture:!0})}[dr(391)](){const t=dr,e=this[t(324)],n=e[t(370)][t(322)](t(389));n&&e[t(362)].on(t(369),(r,s)=>{const o=t,i=s[0];if(!i[o(442)])return;if(o(382)!=i[o(378)]||!i[o(386)][o(332)](o(393)))return;const a=i[o(409)];n[o(367)][o(438)](a)&&(i[o(417)]=i[o(373)]?e[o(362)][o(407)](i[o(373)][o(455)],i[o(373)][o(447)]):null)},{priority:t(339)})}[dr(429)](){const t=dr;return this[t(445)][t(329)](),super[t(429)]()}[dr(406)](){const t=dr,e=this[t(324)],n=e[t(362)][t(381)],r=e[t(345)][t(322)](Qn);e[t(362)][t(374)]({isUndoable:!1},s=>{const o=t,i=o(416)+r[o(361)],a=o(451)+r[o(361)],c=e[o(362)][o(377)][o(438)](i);e[o(385)][o(437)][o(398)]?hr(r[o(361)],n[o(456)][o(431)](),e[o(362)],s):c&&(s[o(350)](i),s[o(350)](a))})}}function hr(t,e,n,r){const s=dr,o=s(416)+t,i=s(451)+t,a=e[s(401)]();let c=e[s(455)];if(a&&a.is(s(440),s(433))){const t=function(t,e){const n=s;for(const r of t[n(348)]())if(e[n(347)][n(402)](r,n(355)))return r}(e,n);t&&(c=t,e=r[s(407)](c))}const u=r[s(407)](c);n[s(377)][s(438)](o)?(r[s(419)](o,{range:e}),r[s(419)](i,{range:u})):(r[s(410)](o,{range:e,usingOperation:!0}),r[s(410)](i,{range:u,usingOperation:!0}))}function fr(){const t=["marker","data-session-id","keydown","editing","name","hasContent","isSimilar","undo","isObject","afterInit","mapper","user:","userPositionMarker","853016aSPqlO","false",'<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>',"hasDomSelection","change","add","getContainedElement","checkChild","createUIElement","setAttribute","ck-user__marker_hovered","createUserMarkerOperations","createRange","requires","batch","addMarker","render","7924777NnmYbq","clear","isOfficialPlugin","getMarkerClass","user:range:","newRange","span","updateMarker","1559886DnMqpF","listenTo","parent","2615112iHrzoo","getSelectionClass","27pnIlNc","mouseleave","editingDowncast","root","destroy","set","getFirstRange","user:position","tableCell","ck-user__marker ","markerNameToElements","contenteditable","view","has","split","element","ck-user__marker-tooltip","isDocumentOperation","toRange","detach","_domEmitter","253245ILueai","end","getNearestSelectionRange","33410EoYOCI","getCustomProperty","user:position:","setCustomProperty","toDomElement","orderNumber","start","selection","198668ZxroSf","40rHsiZb","textContent","isPremiumPlugin","pluginName","get","ck-user__selection","editor","removeClass","classList","rootName","3113LhTYKU","stopListening","getUserBySessionId","color","startsWith","4Xaqtor","markerToElement","Escape","createElement","mouseenter","isCollapsed","highest","fromRange","size","spellcheck","markerName","outerHTML","plugins","change:range","schema","getPositions","UserMarkers","removeMarker","innerHTML","user:range","conversion","for","$text","markerToHighlight","getStart","getAttribute","getRange","update:user:range","mySessionId","model","addEventListener","isInline","remove","$graveyard","_createdBatches","reconvertMarker","applyOperation","commands","nodeAfter","delete","oldRange","enqueueChange","deletionPosition","init","markers","type","markerRange","isLimit","document"];return(fr=function(){return t})()}function mr(t,e,n){const r=t.t,s=t.t;switch(e){case"PENDING_ACTION_SENDING_DATA":return s({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return s("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return s("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return s("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return s("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return s("Synchronization issue");case"Connected users list dropdown menu":return s("Connected users list dropdown menu");case"Collapsed connected users list (press ENTER to open it)":return s("Collapsed connected users list (press ENTER to open it)");case"Connected users list":return s("Connected users list");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return s({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}function yr(t,e){var n=br();return(yr=function(t,e){return n[t-=195]})(t,e)}!function(t){for(var e=yr,n=t();;)try{if(527750===parseInt(e(251))/1*(parseInt(e(315))/2)+-parseInt(e(334))/3*(-parseInt(e(249))/4)+-parseInt(e(299))/5+-parseInt(e(353))/6+-parseInt(e(313))/7*(parseInt(e(246))/8)+parseInt(e(277))/9+-parseInt(e(227))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(br);const gr=(()=>{var t=yr,e=u[t(196)],n=u[t(291)],r=u[t(357)],s=u[t(340)][t(324)]||(u[t(340)][t(324)]={});return s[t(332)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(242)]=null,i[o(245)][o(232)]="",i[o(245)][o(235)]=!1,i[o(245)][o(325)]="",i[o(245)][o(363)]=!1,i[o(245)][o(202)]="",i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(242)]&&Object[r(254)][r(218)](t,r(242))&&s[r(318)][r(262)](t[r(242)],e[r(312)](10)[r(360)]())[r(198)](),null!=t[r(232)]&&Object[r(254)][r(218)](t,r(232))&&e[r(312)](18)[r(285)](t[r(232)]),null!=t[r(235)]&&Object[r(254)][r(218)](t,r(235))&&e[r(312)](24)[r(275)](t[r(235)]),null!=t[r(325)]&&Object[r(254)][r(218)](t,r(325))&&e[r(312)](34)[r(285)](t[r(325)]),null!=t[r(363)]&&Object[r(254)][r(218)](t,r(363))&&e[r(312)](40)[r(275)](t[r(363)]),null!=t[r(202)]&&Object[r(254)][r(218)](t,r(202))&&e[r(312)](50)[r(285)](t[r(202)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](56)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(332)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(242)]=s[r(318)][r(337)](t,t[r(312)]());break;case 2:a[r(232)]=t[r(285)]();break;case 3:a[r(235)]=t[r(275)]();break;case 4:a[r(325)]=t[r(285)]();break;case 5:a[r(363)]=t[r(275)]();break;case 6:a[r(202)]=t[r(285)]();break;case 7:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;if(e(260)!=typeof t||null===t)return e(209);if(null!=t[e(242)]&&t[e(254)](e(242))){var n=s[e(318)][e(259)](t[e(242)]);if(n)return e(326)+n}return null!=t[e(232)]&&t[e(254)](e(232))&&!r[e(281)](t[e(232)])?e(219):null!=t[e(235)]&&t[e(254)](e(235))&&e(236)!=typeof t[e(235)]?e(296):null!=t[e(325)]&&t[e(254)](e(325))&&!r[e(281)](t[e(325)])?e(323):null!=t[e(363)]&&t[e(254)](e(363))&&e(236)!=typeof t[e(363)]?e(336):null!=t[e(202)]&&t[e(254)](e(202))&&!r[e(281)](t[e(202)])?e(238):null!=t[e(358)]&&t[e(254)](e(358))&&e(236)!=typeof t[e(358)]?e(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(332)])return t;var n=new(s[e(332)]);if(null!=t[e(242)]){if(e(260)!=typeof t[e(242)])throw TypeError(e(264));n[e(242)]=s[e(318)][e(215)](t[e(242)])}return null!=t[e(232)]&&(n[e(232)]=String(t[e(232)])),null!=t[e(235)]&&(n[e(235)]=Boolean(t[e(235)])),null!=t[e(325)]&&(n[e(325)]=String(t[e(325)])),null!=t[e(363)]&&(n[e(363)]=Boolean(t[e(363)])),null!=t[e(202)]&&(n[e(202)]=String(t[e(202)])),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(242)]=null,r[n(232)]="",r[n(235)]=!1,r[n(325)]="",r[n(363)]=!1,r[n(202)]="",r[n(358)]=!1),null!=t[n(242)]&&t[n(254)](n(242))&&(r[n(242)]=s[n(318)][n(345)](t[n(242)],e)),null!=t[n(232)]&&t[n(254)](n(232))&&(r[n(232)]=t[n(232)]),null!=t[n(235)]&&t[n(254)](n(235))&&(r[n(235)]=t[n(235)]),null!=t[n(325)]&&t[n(254)](n(325))&&(r[n(325)]=t[n(325)]),null!=t[n(363)]&&t[n(254)](n(363))&&(r[n(363)]=t[n(363)]),null!=t[n(202)]&&t[n(254)](n(202))&&(r[n(202)]=t[n(202)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(338)},i}(),s[t(320)]=function(){var o=t;function i(t){var e=yr;if(this[e(270)]=[],t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(322)]=null,i[o(245)][o(270)]=r[o(224)],i[o(245)][o(295)]=!1,i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;if(e||(e=n[r(274)]()),null!=t[r(322)]&&Object[r(254)][r(218)](t,r(322))&&s[r(329)][r(262)](t[r(322)],e[r(312)](10)[r(360)]())[r(198)](),null!=t[r(270)]&&t[r(270)][r(271)])for(var i=0;i<t[r(270)][r(271)];++i)s[r(240)][r(262)](t[r(270)][i],e[r(312)](18)[r(360)]())[r(198)]();return null!=t[r(295)]&&Object[r(254)][r(218)](t,r(295))&&e[r(312)](24)[r(275)](t[r(295)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](32)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(320)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(322)]=s[r(329)][r(337)](t,t[r(312)]());break;case 2:a[r(270)]&&a[r(270)][r(271)]||(a[r(270)]=[]),a[r(270)][r(267)](s[r(240)][r(337)](t,t[r(312)]()));break;case 3:a[r(295)]=t[r(275)]();break;case 4:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;if(e(260)!=typeof t||null===t)return e(209);if(null!=t[e(322)]&&t[e(254)](e(322))&&(r=s[e(329)][e(259)](t[e(322)])))return e(203)+r;if(null!=t[e(270)]&&t[e(254)](e(270))){if(!Array[e(303)](t[e(270)]))return e(214);for(var n=0;n<t[e(270)][e(271)];++n){var r;if(r=s[e(240)][e(259)](t[e(270)][n]))return e(365)+r}}return null!=t[e(295)]&&t[e(254)](e(295))&&e(236)!=typeof t[e(295)]?e(268):null!=t[e(358)]&&t[e(254)](e(358))&&e(236)!=typeof t[e(358)]?e(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(320)])return t;var n=new(s[e(320)]);if(null!=t[e(322)]){if(e(260)!=typeof t[e(322)])throw TypeError(e(331));n[e(322)]=s[e(329)][e(215)](t[e(322)])}if(t[e(270)]){if(!Array[e(303)](t[e(270)]))throw TypeError(e(342));n[e(270)]=[];for(var r=0;r<t[e(270)][e(271)];++r){if(e(260)!=typeof t[e(270)][r])throw TypeError(e(197));n[e(270)][r]=s[e(240)][e(215)](t[e(270)][r])}}return null!=t[e(295)]&&(n[e(295)]=Boolean(t[e(295)])),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(255)]||e[n(351)])&&(r[n(270)]=[]),e[n(351)]&&(r[n(322)]=null,r[n(295)]=!1,r[n(358)]=!1),null!=t[n(322)]&&t[n(254)](n(322))&&(r[n(322)]=s[n(329)][n(345)](t[n(322)],e)),t[n(270)]&&t[n(270)][n(271)]){r[n(270)]=[];for(var i=0;i<t[n(270)][n(271)];++i)r[n(270)][i]=s[n(240)][n(345)](t[n(270)][i],e)}return null!=t[n(295)]&&t[n(254)](n(295))&&(r[n(295)]=t[n(295)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(368)},i}(),s[t(269)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(248)]="",i[o(245)][o(369)]=null,i[o(245)][o(289)]=null,i[o(245)][o(288)]=!1,i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(248)]&&Object[r(254)][r(218)](t,r(248))&&e[r(312)](10)[r(285)](t[r(248)]),null!=t[r(369)]&&Object[r(254)][r(218)](t,r(369))&&s[r(318)][r(262)](t[r(369)],e[r(312)](18)[r(360)]())[r(198)](),null!=t[r(289)]&&Object[r(254)][r(218)](t,r(289))&&s[r(318)][r(262)](t[r(289)],e[r(312)](26)[r(360)]())[r(198)](),null!=t[r(288)]&&Object[r(254)][r(218)](t,r(288))&&e[r(312)](32)[r(275)](t[r(288)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](40)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(269)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(248)]=t[r(285)]();break;case 2:a[r(369)]=s[r(318)][r(337)](t,t[r(312)]());break;case 3:a[r(289)]=s[r(318)][r(337)](t,t[r(312)]());break;case 4:a[r(288)]=t[r(275)]();break;case 5:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e,n=o;return n(260)!=typeof t||null===t?n(209):null!=t[n(248)]&&t[n(254)](n(248))&&!r[n(281)](t[n(248)])?n(341):null!=t[n(369)]&&t[n(254)](n(369))&&(e=s[n(318)][n(259)](t[n(369)]))?n(301)+e:null!=t[n(289)]&&t[n(254)](n(289))&&(e=s[n(318)][n(259)](t[n(289)]))?n(339)+e:null!=t[n(288)]&&t[n(254)](n(288))&&n(236)!=typeof t[n(288)]?n(199):null!=t[n(358)]&&t[n(254)](n(358))&&n(236)!=typeof t[n(358)]?n(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(269)])return t;var n=new(s[e(269)]);if(null!=t[e(248)]&&(n[e(248)]=String(t[e(248)])),null!=t[e(369)]){if(e(260)!=typeof t[e(369)])throw TypeError(e(261));n[e(369)]=s[e(318)][e(215)](t[e(369)])}if(null!=t[e(289)]){if(e(260)!=typeof t[e(289)])throw TypeError(e(294));n[e(289)]=s[e(318)][e(215)](t[e(289)])}return null!=t[e(288)]&&(n[e(288)]=Boolean(t[e(288)])),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(248)]="",r[n(369)]=null,r[n(289)]=null,r[n(288)]=!1,r[n(358)]=!1),null!=t[n(248)]&&t[n(254)](n(248))&&(r[n(248)]=t[n(248)]),null!=t[n(369)]&&t[n(254)](n(369))&&(r[n(369)]=s[n(318)][n(345)](t[n(369)],e)),null!=t[n(289)]&&t[n(254)](n(289))&&(r[n(289)]=s[n(318)][n(345)](t[n(289)],e)),null!=t[n(288)]&&t[n(254)](n(288))&&(r[n(288)]=t[n(288)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(321)},i}(),s[t(359)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(221)]=null,i[o(245)][o(366)]=null,i[o(245)][o(364)]=null,i[o(245)][o(226)]=0,i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(221)]&&Object[r(254)][r(218)](t,r(221))&&s[r(329)][r(262)](t[r(221)],e[r(312)](10)[r(360)]())[r(198)](),null!=t[r(366)]&&Object[r(254)][r(218)](t,r(366))&&s[r(329)][r(262)](t[r(366)],e[r(312)](18)[r(360)]())[r(198)](),null!=t[r(364)]&&Object[r(254)][r(218)](t,r(364))&&s[r(329)][r(262)](t[r(364)],e[r(312)](26)[r(360)]())[r(198)](),null!=t[r(226)]&&Object[r(254)][r(218)](t,r(226))&&e[r(312)](32)[r(312)](t[r(226)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](40)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(359)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(221)]=s[r(329)][r(337)](t,t[r(312)]());break;case 2:a[r(366)]=s[r(329)][r(337)](t,t[r(312)]());break;case 3:a[r(364)]=s[r(329)][r(337)](t,t[r(312)]());break;case 4:a[r(226)]=t[r(312)]();break;case 5:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e,n=o;return n(260)!=typeof t||null===t?n(209):null!=t[n(221)]&&t[n(254)](n(221))&&(e=s[n(329)][n(259)](t[n(221)]))?n(279)+e:null!=t[n(366)]&&t[n(254)](n(366))&&(e=s[n(329)][n(259)](t[n(366)]))?n(252)+e:null!=t[n(364)]&&t[n(254)](n(364))&&(e=s[n(329)][n(259)](t[n(364)]))?n(349)+e:null!=t[n(226)]&&t[n(254)](n(226))&&!r[n(350)](t[n(226)])?n(244):null!=t[n(358)]&&t[n(254)](n(358))&&n(236)!=typeof t[n(358)]?n(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(359)])return t;var n=new(s[e(359)]);if(null!=t[e(221)]){if(e(260)!=typeof t[e(221)])throw TypeError(e(356));n[e(221)]=s[e(329)][e(215)](t[e(221)])}if(null!=t[e(366)]){if(e(260)!=typeof t[e(366)])throw TypeError(e(302));n[e(366)]=s[e(329)][e(215)](t[e(366)])}if(null!=t[e(364)]){if(e(260)!=typeof t[e(364)])throw TypeError(e(195));n[e(364)]=s[e(329)][e(215)](t[e(364)])}return null!=t[e(226)]&&(n[e(226)]=t[e(226)]>>>0),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(221)]=null,r[n(366)]=null,r[n(364)]=null,r[n(226)]=0,r[n(358)]=!1),null!=t[n(221)]&&t[n(254)](n(221))&&(r[n(221)]=s[n(329)][n(345)](t[n(221)],e)),null!=t[n(366)]&&t[n(254)](n(366))&&(r[n(366)]=s[n(329)][n(345)](t[n(366)],e)),null!=t[n(364)]&&t[n(254)](n(364))&&(r[n(364)]=s[n(329)][n(345)](t[n(364)],e)),null!=t[n(226)]&&t[n(254)](n(226))&&(r[n(226)]=t[n(226)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(327)},i}(),s[t(201)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(221)]=null,i[o(245)][o(226)]=0,i[o(245)][o(366)]=null,i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(221)]&&Object[r(254)][r(218)](t,r(221))&&s[r(329)][r(262)](t[r(221)],e[r(312)](10)[r(360)]())[r(198)](),null!=t[r(226)]&&Object[r(254)][r(218)](t,r(226))&&e[r(312)](16)[r(312)](t[r(226)]),null!=t[r(366)]&&Object[r(254)][r(218)](t,r(366))&&s[r(329)][r(262)](t[r(366)],e[r(312)](26)[r(360)]())[r(198)](),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](32)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(201)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(221)]=s[r(329)][r(337)](t,t[r(312)]());break;case 2:a[r(226)]=t[r(312)]();break;case 3:a[r(366)]=s[r(329)][r(337)](t,t[r(312)]());break;case 4:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e,n=o;return n(260)!=typeof t||null===t?n(209):null!=t[n(221)]&&t[n(254)](n(221))&&(e=s[n(329)][n(259)](t[n(221)]))?n(279)+e:null!=t[n(226)]&&t[n(254)](n(226))&&!r[n(350)](t[n(226)])?n(244):null!=t[n(366)]&&t[n(254)](n(366))&&(e=s[n(329)][n(259)](t[n(366)]))?n(252)+e:null!=t[n(358)]&&t[n(254)](n(358))&&n(236)!=typeof t[n(358)]?n(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(201)])return t;var n=new(s[e(201)]);if(null!=t[e(221)]){if(e(260)!=typeof t[e(221)])throw TypeError(e(253));n[e(221)]=s[e(329)][e(215)](t[e(221)])}if(null!=t[e(226)]&&(n[e(226)]=t[e(226)]>>>0),null!=t[e(366)]){if(e(260)!=typeof t[e(366)])throw TypeError(e(231));n[e(366)]=s[e(329)][e(215)](t[e(366)])}return null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(221)]=null,r[n(226)]=0,r[n(366)]=null,r[n(358)]=!1),null!=t[n(221)]&&t[n(254)](n(221))&&(r[n(221)]=s[n(329)][n(345)](t[n(221)],e)),null!=t[n(226)]&&t[n(254)](n(226))&&(r[n(226)]=t[n(226)]),null!=t[n(366)]&&t[n(254)](n(366))&&(r[n(366)]=s[n(329)][n(345)](t[n(366)],e)),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(317)},i}(),s[t(287)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(322)]=null,i[o(245)][o(300)]="",i[o(245)][o(206)]="",i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(322)]&&Object[r(254)][r(218)](t,r(322))&&s[r(329)][r(262)](t[r(322)],e[r(312)](10)[r(360)]())[r(198)](),null!=t[r(300)]&&Object[r(254)][r(218)](t,r(300))&&e[r(312)](18)[r(285)](t[r(300)]),null!=t[r(206)]&&Object[r(254)][r(218)](t,r(206))&&e[r(312)](26)[r(285)](t[r(206)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](32)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(287)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(322)]=s[r(329)][r(337)](t,t[r(312)]());break;case 2:a[r(300)]=t[r(285)]();break;case 3:a[r(206)]=t[r(285)]();break;case 4:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;if(e(260)!=typeof t||null===t)return e(209);if(null!=t[e(322)]&&t[e(254)](e(322))){var n=s[e(329)][e(259)](t[e(322)]);if(n)return e(203)+n}return null!=t[e(300)]&&t[e(254)](e(300))&&!r[e(281)](t[e(300)])?e(272):null!=t[e(206)]&&t[e(254)](e(206))&&!r[e(281)](t[e(206)])?e(297):null!=t[e(358)]&&t[e(254)](e(358))&&e(236)!=typeof t[e(358)]?e(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(287)])return t;var n=new(s[e(287)]);if(null!=t[e(322)]){if(e(260)!=typeof t[e(322)])throw TypeError(e(257));n[e(322)]=s[e(329)][e(215)](t[e(322)])}return null!=t[e(300)]&&(n[e(300)]=String(t[e(300)])),null!=t[e(206)]&&(n[e(206)]=String(t[e(206)])),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(322)]=null,r[n(300)]="",r[n(206)]="",r[n(358)]=!1),null!=t[n(322)]&&t[n(254)](n(322))&&(r[n(322)]=s[n(329)][n(345)](t[n(322)],e)),null!=t[n(300)]&&t[n(254)](n(300))&&(r[n(300)]=t[n(300)]),null!=t[n(206)]&&t[n(254)](n(206))&&(r[n(206)]=t[n(206)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(362)},i}(),s[t(222)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(310)]="",i[o(245)][o(232)]="",i[o(245)][o(235)]=!1,i[o(245)][o(325)]="",i[o(245)][o(363)]=!1,i[o(245)][o(202)]="",i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(310)]&&Object[r(254)][r(218)](t,r(310))&&e[r(312)](10)[r(285)](t[r(310)]),null!=t[r(232)]&&Object[r(254)][r(218)](t,r(232))&&e[r(312)](18)[r(285)](t[r(232)]),null!=t[r(235)]&&Object[r(254)][r(218)](t,r(235))&&e[r(312)](24)[r(275)](t[r(235)]),null!=t[r(325)]&&Object[r(254)][r(218)](t,r(325))&&e[r(312)](34)[r(285)](t[r(325)]),null!=t[r(363)]&&Object[r(254)][r(218)](t,r(363))&&e[r(312)](40)[r(275)](t[r(363)]),null!=t[r(202)]&&Object[r(254)][r(218)](t,r(202))&&e[r(312)](50)[r(285)](t[r(202)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](56)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(222)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(310)]=t[r(285)]();break;case 2:a[r(232)]=t[r(285)]();break;case 3:a[r(235)]=t[r(275)]();break;case 4:a[r(325)]=t[r(285)]();break;case 5:a[r(363)]=t[r(275)]();break;case 6:a[r(202)]=t[r(285)]();break;case 7:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;return e(260)!=typeof t||null===t?e(209):null!=t[e(310)]&&t[e(254)](e(310))&&!r[e(281)](t[e(310)])?e(234):null!=t[e(232)]&&t[e(254)](e(232))&&!r[e(281)](t[e(232)])?e(219):null!=t[e(235)]&&t[e(254)](e(235))&&e(236)!=typeof t[e(235)]?e(296):null!=t[e(325)]&&t[e(254)](e(325))&&!r[e(281)](t[e(325)])?e(323):null!=t[e(363)]&&t[e(254)](e(363))&&e(236)!=typeof t[e(363)]?e(336):null!=t[e(202)]&&t[e(254)](e(202))&&!r[e(281)](t[e(202)])?e(238):null!=t[e(358)]&&t[e(254)](e(358))&&e(236)!=typeof t[e(358)]?e(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(222)])return t;var n=new(s[e(222)]);return null!=t[e(310)]&&(n[e(310)]=String(t[e(310)])),null!=t[e(232)]&&(n[e(232)]=String(t[e(232)])),null!=t[e(235)]&&(n[e(235)]=Boolean(t[e(235)])),null!=t[e(325)]&&(n[e(325)]=String(t[e(325)])),null!=t[e(363)]&&(n[e(363)]=Boolean(t[e(363)])),null!=t[e(202)]&&(n[e(202)]=String(t[e(202)])),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(310)]="",r[n(232)]="",r[n(235)]=!1,r[n(325)]="",r[n(363)]=!1,r[n(202)]="",r[n(358)]=!1),null!=t[n(310)]&&t[n(254)](n(310))&&(r[n(310)]=t[n(310)]),null!=t[n(232)]&&t[n(254)](n(232))&&(r[n(232)]=t[n(232)]),null!=t[n(235)]&&t[n(254)](n(235))&&(r[n(235)]=t[n(235)]),null!=t[n(325)]&&t[n(254)](n(325))&&(r[n(325)]=t[n(325)]),null!=t[n(363)]&&t[n(254)](n(363))&&(r[n(363)]=t[n(363)]),null!=t[n(202)]&&t[n(254)](n(202))&&(r[n(202)]=t[n(202)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(344)},i}(),s[t(314)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(217)]="",i[o(245)][o(290)]="",i[o(245)][o(216)]=!1,i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(217)]&&Object[r(254)][r(218)](t,r(217))&&e[r(312)](10)[r(285)](t[r(217)]),null!=t[r(290)]&&Object[r(254)][r(218)](t,r(290))&&e[r(312)](18)[r(285)](t[r(290)]),null!=t[r(216)]&&Object[r(254)][r(218)](t,r(216))&&e[r(312)](24)[r(275)](t[r(216)]),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](32)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(314)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(217)]=t[r(285)]();break;case 2:a[r(290)]=t[r(285)]();break;case 3:a[r(216)]=t[r(275)]();break;case 4:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;return e(260)!=typeof t||null===t?e(209):null!=t[e(217)]&&t[e(254)](e(217))&&!r[e(281)](t[e(217)])?e(239):null!=t[e(290)]&&t[e(254)](e(290))&&!r[e(281)](t[e(290)])?e(311):null!=t[e(216)]&&t[e(254)](e(216))&&e(236)!=typeof t[e(216)]?e(230):null!=t[e(358)]&&t[e(254)](e(358))&&e(236)!=typeof t[e(358)]?e(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(314)])return t;var n=new(s[e(314)]);return null!=t[e(217)]&&(n[e(217)]=String(t[e(217)])),null!=t[e(290)]&&(n[e(290)]=String(t[e(290)])),null!=t[e(216)]&&(n[e(216)]=Boolean(t[e(216)])),null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(217)]="",r[n(290)]="",r[n(216)]=!1,r[n(358)]=!1),null!=t[n(217)]&&t[n(254)](n(217))&&(r[n(217)]=t[n(217)]),null!=t[n(290)]&&t[n(254)](n(290))&&(r[n(290)]=t[n(290)]),null!=t[n(216)]&&t[n(254)](n(216))&&(r[n(216)]=t[n(216)]),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(258)},i}(),s[t(265)]=function(){var o=t;function i(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(278)]=null,i[o(245)][o(364)]=null,i[o(245)][o(226)]=0,i[o(245)][o(305)]=null,i[o(245)][o(358)]=!1,i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;return e||(e=n[r(274)]()),null!=t[r(278)]&&Object[r(254)][r(218)](t,r(278))&&s[r(329)][r(262)](t[r(278)],e[r(312)](10)[r(360)]())[r(198)](),null!=t[r(364)]&&Object[r(254)][r(218)](t,r(364))&&s[r(329)][r(262)](t[r(364)],e[r(312)](18)[r(360)]())[r(198)](),null!=t[r(226)]&&Object[r(254)][r(218)](t,r(226))&&e[r(312)](24)[r(312)](t[r(226)]),null!=t[r(305)]&&Object[r(254)][r(218)](t,r(305))&&s[r(329)][r(262)](t[r(305)],e[r(312)](34)[r(360)]())[r(198)](),null!=t[r(358)]&&Object[r(254)][r(218)](t,r(358))&&e[r(312)](40)[r(275)](t[r(358)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(265)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(278)]=s[r(329)][r(337)](t,t[r(312)]());break;case 2:a[r(364)]=s[r(329)][r(337)](t,t[r(312)]());break;case 3:a[r(226)]=t[r(312)]();break;case 4:a[r(305)]=s[r(329)][r(337)](t,t[r(312)]());break;case 5:a[r(358)]=t[r(275)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e,n=o;return n(260)!=typeof t||null===t?n(209):null!=t[n(278)]&&t[n(254)](n(278))&&(e=s[n(329)][n(259)](t[n(278)]))?n(307)+e:null!=t[n(364)]&&t[n(254)](n(364))&&(e=s[n(329)][n(259)](t[n(364)]))?n(349)+e:null!=t[n(226)]&&t[n(254)](n(226))&&!r[n(350)](t[n(226)])?n(244):null!=t[n(305)]&&t[n(254)](n(305))&&(e=s[n(329)][n(259)](t[n(305)]))?n(347)+e:null!=t[n(358)]&&t[n(254)](n(358))&&n(236)!=typeof t[n(358)]?n(293):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(265)])return t;var n=new(s[e(265)]);if(null!=t[e(278)]){if(e(260)!=typeof t[e(278)])throw TypeError(e(308));n[e(278)]=s[e(329)][e(215)](t[e(278)])}if(null!=t[e(364)]){if(e(260)!=typeof t[e(364)])throw TypeError(e(343));n[e(364)]=s[e(329)][e(215)](t[e(364)])}if(null!=t[e(226)]&&(n[e(226)]=t[e(226)]>>>0),null!=t[e(305)]){if(e(260)!=typeof t[e(305)])throw TypeError(e(243));n[e(305)]=s[e(329)][e(215)](t[e(305)])}return null!=t[e(358)]&&(n[e(358)]=Boolean(t[e(358)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};return e[n(351)]&&(r[n(278)]=null,r[n(364)]=null,r[n(226)]=0,r[n(305)]=null,r[n(358)]=!1),null!=t[n(278)]&&t[n(254)](n(278))&&(r[n(278)]=s[n(329)][n(345)](t[n(278)],e)),null!=t[n(364)]&&t[n(254)](n(364))&&(r[n(364)]=s[n(329)][n(345)](t[n(364)],e)),null!=t[n(226)]&&t[n(254)](n(226))&&(r[n(226)]=t[n(226)]),null!=t[n(305)]&&t[n(254)](n(305))&&(r[n(305)]=s[n(329)][n(345)](t[n(305)],e)),null!=t[n(358)]&&t[n(254)](n(358))&&(r[n(358)]=t[n(358)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(328)},i}(),s[t(329)]=function(){var o=t;function i(t){var e=yr;if(this[e(354)]=[],t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(310)]="",i[o(245)][o(223)]=!1,i[o(245)][o(247)]=!1,i[o(245)][o(354)]=r[o(224)],i[o(245)][o(304)]="",i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;if(e||(e=n[r(274)]()),null!=t[r(310)]&&Object[r(254)][r(218)](t,r(310))&&e[r(312)](10)[r(285)](t[r(310)]),null!=t[r(223)]&&Object[r(254)][r(218)](t,r(223))&&e[r(312)](16)[r(275)](t[r(223)]),null!=t[r(247)]&&Object[r(254)][r(218)](t,r(247))&&e[r(312)](24)[r(275)](t[r(247)]),null!=t[r(354)]&&t[r(354)][r(271)]){e[r(312)](34)[r(360)]();for(var s=0;s<t[r(354)][r(271)];++s)e[r(312)](t[r(354)][s]);e[r(198)]()}return null!=t[r(304)]&&Object[r(254)][r(218)](t,r(304))&&e[r(312)](42)[r(285)](t[r(304)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var r=o;t instanceof e||(t=e[r(274)](t));for(var i=void 0===n?t[r(266)]:t[r(361)]+n,a=new(s[r(329)]);t[r(361)]<i;){var c=t[r(312)]();switch(c>>>3){case 1:a[r(310)]=t[r(285)]();break;case 2:a[r(223)]=t[r(275)]();break;case 3:a[r(247)]=t[r(275)]();break;case 4:if(a[r(354)]&&a[r(354)][r(271)]||(a[r(354)]=[]),2==(7&c))for(var u=t[r(312)]()+t[r(361)];t[r(361)]<u;)a[r(354)][r(267)](t[r(312)]());else a[r(354)][r(267)](t[r(312)]());break;case 5:a[r(304)]=t[r(285)]();break;default:t[r(228)](7&c)}}return a},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;if(e(260)!=typeof t||null===t)return e(209);if(null!=t[e(310)]&&t[e(254)](e(310))&&!r[e(281)](t[e(310)]))return e(234);if(null!=t[e(223)]&&t[e(254)](e(223))&&e(236)!=typeof t[e(223)])return e(367);if(null!=t[e(247)]&&t[e(254)](e(247))&&e(236)!=typeof t[e(247)])return e(256);if(null!=t[e(354)]&&t[e(254)](e(354))){if(!Array[e(303)](t[e(354)]))return e(276);for(var n=0;n<t[e(354)][e(271)];++n)if(!r[e(350)](t[e(354)][n]))return e(273)}return null!=t[e(304)]&&t[e(254)](e(304))&&!r[e(281)](t[e(304)])?e(207):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(329)])return t;var n=new(s[e(329)]);if(null!=t[e(310)]&&(n[e(310)]=String(t[e(310)])),null!=t[e(223)]&&(n[e(223)]=Boolean(t[e(223)])),null!=t[e(247)]&&(n[e(247)]=Boolean(t[e(247)])),t[e(354)]){if(!Array[e(303)](t[e(354)]))throw TypeError(e(309));n[e(354)]=[];for(var r=0;r<t[e(354)][e(271)];++r)n[e(354)][r]=t[e(354)][r]>>>0}return null!=t[e(304)]&&(n[e(304)]=String(t[e(304)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r={};if((e[n(255)]||e[n(351)])&&(r[n(354)]=[]),e[n(351)]&&(r[n(310)]="",r[n(223)]=!1,r[n(247)]=!1,r[n(304)]=""),null!=t[n(310)]&&t[n(254)](n(310))&&(r[n(310)]=t[n(310)]),null!=t[n(223)]&&t[n(254)](n(223))&&(r[n(223)]=t[n(223)]),null!=t[n(247)]&&t[n(254)](n(247))&&(r[n(247)]=t[n(247)]),t[n(354)]&&t[n(354)][n(271)]){r[n(354)]=[];for(var s=0;s<t[n(354)][n(271)];++s)r[n(354)][s]=t[n(354)][s]}return null!=t[n(304)]&&t[n(254)](n(304))&&(r[n(304)]=t[n(304)]),r},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(280)},i}(),s[t(318)]=function(){var r=t;function o(t){var e=yr;if(t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return o[r(245)][r(205)]=null,o[r(245)][r(210)]=null,o[r(274)]=function(t){return new o(t)},o[r(262)]=function(t,e){var o=r;return e||(e=n[o(274)]()),null!=t[o(205)]&&Object[o(254)][o(218)](t,o(205))&&s[o(329)][o(262)](t[o(205)],e[o(312)](10)[o(360)]())[o(198)](),null!=t[o(210)]&&Object[o(254)][o(218)](t,o(210))&&s[o(329)][o(262)](t[o(210)],e[o(312)](18)[o(360)]())[o(198)](),e},o[r(306)]=function(t,e){var n=r;return this[n(262)](t,e)[n(198)]()},o[r(337)]=function(t,n){var o=r;t instanceof e||(t=e[o(274)](t));for(var i=void 0===n?t[o(266)]:t[o(361)]+n,a=new(s[o(318)]);t[o(361)]<i;){var c=t[o(312)]();switch(c>>>3){case 1:a[o(205)]=s[o(329)][o(337)](t,t[o(312)]());break;case 2:a[o(210)]=s[o(329)][o(337)](t,t[o(312)]());break;default:t[o(228)](7&c)}}return a},o[r(319)]=function(t){var n=r;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},o[r(259)]=function(t){var e,n=r;return n(260)!=typeof t||null===t?n(209):null!=t[n(205)]&&t[n(254)](n(205))&&(e=s[n(329)][n(259)](t[n(205)]))?n(250)+e:null!=t[n(210)]&&t[n(254)](n(210))&&(e=s[n(329)][n(259)](t[n(210)]))?n(352)+e:null},o[r(215)]=function(t){var e=r;if(t instanceof s[e(318)])return t;var n=new(s[e(318)]);if(null!=t[e(205)]){if(e(260)!=typeof t[e(205)])throw TypeError(e(211));n[e(205)]=s[e(329)][e(215)](t[e(205)])}if(null!=t[e(210)]){if(e(260)!=typeof t[e(210)])throw TypeError(e(241));n[e(210)]=s[e(329)][e(215)](t[e(210)])}return n},o[r(345)]=function(t,e){var n=r;e||(e={});var o={};return e[n(351)]&&(o[n(205)]=null,o[n(210)]=null),null!=t[n(205)]&&t[n(254)](n(205))&&(o[n(205)]=s[n(329)][n(345)](t[n(205)],e)),null!=t[n(210)]&&t[n(254)](n(210))&&(o[n(210)]=s[n(329)][n(345)](t[n(210)],e)),o},o[r(245)][r(292)]=function(){var t=r;return this[t(237)][t(345)](this,u[t(357)][t(200)])},o[r(355)]=function(t){var e=r;return void 0===t&&(t=e(348)),t+e(298)},o}(),s[t(240)]=function(){var o=t;function i(t){var e=yr;if(this[e(316)]=[],this[e(283)]={},t)for(var n=Object[e(282)](t),r=0;r<n[e(271)];++r)null!=t[n[r]]&&(this[n[r]]=t[n[r]])}return i[o(245)][o(248)]="",i[o(245)][o(316)]=r[o(224)],i[o(245)][o(225)]="",i[o(245)][o(283)]=r[o(208)],i[o(245)][o(233)]="",i[o(274)]=function(t){return new i(t)},i[o(262)]=function(t,e){var r=o;if(e||(e=n[r(274)]()),null!=t[r(248)]&&Object[r(254)][r(218)](t,r(248))&&e[r(312)](10)[r(285)](t[r(248)]),null!=t[r(316)]&&t[r(316)][r(271)])for(var i=0;i<t[r(316)][r(271)];++i)s[r(240)][r(262)](t[r(316)][i],e[r(312)](18)[r(360)]())[r(198)]();if(null!=t[r(225)]&&Object[r(254)][r(218)](t,r(225))&&e[r(312)](26)[r(285)](t[r(225)]),null!=t[r(283)]&&Object[r(254)][r(218)](t,r(283))){var a=Object[r(282)](t[r(283)]);for(i=0;i<a[r(271)];++i)e[r(312)](34)[r(360)]()[r(312)](10)[r(285)](a[i])[r(312)](16)[r(275)](t[r(283)][a[i]])[r(198)]()}return null!=t[r(233)]&&Object[r(254)][r(218)](t,r(233))&&e[r(312)](42)[r(285)](t[r(233)]),e},i[o(306)]=function(t,e){var n=o;return this[n(262)](t,e)[n(198)]()},i[o(337)]=function(t,n){var i=o;t instanceof e||(t=e[i(274)](t));for(var a,c,u=void 0===n?t[i(266)]:t[i(361)]+n,d=new(s[i(240)]);t[i(361)]<u;){var l=t[i(312)]();switch(l>>>3){case 1:d[i(248)]=t[i(285)]();break;case 2:d[i(316)]&&d[i(316)][i(271)]||(d[i(316)]=[]),d[i(316)][i(267)](s[i(240)][i(337)](t,t[i(312)]()));break;case 3:d[i(225)]=t[i(285)]();break;case 4:d[i(283)]===r[i(208)]&&(d[i(283)]={});var p=t[i(312)]()+t[i(361)];for(a="",c=!1;t[i(361)]<p;){var h=t[i(312)]();switch(h>>>3){case 1:a=t[i(285)]();break;case 2:c=t[i(275)]();break;default:t[i(228)](7&h)}}d[i(283)][a]=c;break;case 5:d[i(233)]=t[i(285)]();break;default:t[i(228)](7&l)}}return d},i[o(319)]=function(t){var n=o;return t instanceof e||(t=new e(t)),this[n(337)](t,t[n(312)]())},i[o(259)]=function(t){var e=o;if(e(260)!=typeof t||null===t)return e(209);if(null!=t[e(248)]&&t[e(254)](e(248))&&!r[e(281)](t[e(248)]))return e(341);if(null!=t[e(316)]&&t[e(254)](e(316))){if(!Array[e(303)](t[e(316)]))return e(333);for(var n=0;n<t[e(316)][e(271)];++n){var i=s[e(240)][e(259)](t[e(316)][n]);if(i)return e(220)+i}}if(null!=t[e(225)]&&t[e(254)](e(225))&&!r[e(281)](t[e(225)]))return e(213);if(null!=t[e(283)]&&t[e(254)](e(283))){if(!r[e(330)](t[e(283)]))return e(284);var a=Object[e(282)](t[e(283)]);for(n=0;n<a[e(271)];++n)if(e(236)!=typeof t[e(283)][a[n]])return e(204)}return null!=t[e(233)]&&t[e(254)](e(233))&&!r[e(281)](t[e(233)])?e(346):null},i[o(215)]=function(t){var e=o;if(t instanceof s[e(240)])return t;var n=new(s[e(240)]);if(null!=t[e(248)]&&(n[e(248)]=String(t[e(248)])),t[e(316)]){if(!Array[e(303)](t[e(316)]))throw TypeError(e(212));n[e(316)]=[];for(var r=0;r<t[e(316)][e(271)];++r){if(e(260)!=typeof t[e(316)][r])throw TypeError(e(335));n[e(316)][r]=s[e(240)][e(215)](t[e(316)][r])}}if(null!=t[e(225)]&&(n[e(225)]=String(t[e(225)])),t[e(283)]){if(e(260)!=typeof t[e(283)])throw TypeError(e(286));n[e(283)]={};var i=Object[e(282)](t[e(283)]);for(r=0;r<i[e(271)];++r)n[e(283)][i[r]]=Boolean(t[e(283)][i[r]])}return null!=t[e(233)]&&(n[e(233)]=String(t[e(233)])),n},i[o(345)]=function(t,e){var n=o;e||(e={});var r,i={};if((e[n(255)]||e[n(351)])&&(i[n(316)]=[]),(e[n(263)]||e[n(351)])&&(i[n(283)]={}),e[n(351)]&&(i[n(248)]="",i[n(225)]="",i[n(233)]=""),null!=t[n(248)]&&t[n(254)](n(248))&&(i[n(248)]=t[n(248)]),t[n(316)]&&t[n(316)][n(271)]){i[n(316)]=[];for(var a=0;a<t[n(316)][n(271)];++a)i[n(316)][a]=s[n(240)][n(345)](t[n(316)][a],e)}if(null!=t[n(225)]&&t[n(254)](n(225))&&(i[n(225)]=t[n(225)]),t[n(283)]&&(r=Object[n(282)](t[n(283)]))[n(271)])for(i[n(283)]={},a=0;a<r[n(271)];++a)i[n(283)][r[a]]=t[n(283)][r[a]];return null!=t[n(233)]&&t[n(254)](n(233))&&(i[n(233)]=t[n(233)]),i},i[o(245)][o(292)]=function(){var t=o;return this[t(237)][t(345)](this,u[t(357)][t(200)])},i[o(355)]=function(t){var e=o;return void 0===t&&(t=e(348)),t+e(229)},i}(),s})();function br(){var t=["oldName: string expected","path: integer[] expected","create","bool","path: array expected","6772365iXUnRO","splitPosition","sourcePosition.","/Position","isString","keys","attributesBoolean","attributesBoolean: object expected","string",".Element.attributesBoolean: object expected","RenameOperation","affectsData","newRange","elementName","Writer","toJSON","wasUndone: boolean expected",".MarkerOperation.newRange: object expected","shouldReceiveAttributes","oldValueBoolean: boolean expected","newName: string expected","/Range","146080XDpvRS","oldName","oldRange.",".MergeOperation.targetPosition: object expected","isArray","stickiness","insertionPosition","encodeDelimited","splitPosition.",".SplitOperation.splitPosition: object expected",".Position.path: array expected","root","elementName: string expected","uint32","1438038cYHxQr","RootOperation","28438nOSYJP","children","/MoveOperation","Range","decodeDelimited","InsertOperation","/MarkerOperation","position","oldValueJson: string expected","default","oldValueJson","range.","/MergeOperation","/SplitOperation","Position","isObject",".InsertOperation.position: object expected","AttributeOperation","children: array expected","12YUbxRy",".Element.children: object expected","newValueBoolean: boolean expected","decode","/AttributeOperation","newRange.","roots","name: string expected",".InsertOperation.nodes: array expected",".SplitOperation.graveyardPosition: object expected","/RootAttributeOperation","toObject","attributesJson: string expected","insertionPosition.","type.googleapis.com","graveyardPosition.","isInteger","defaults","end.","2064450bnfzSA","path","getTypeUrl",".MergeOperation.sourcePosition: object expected","util","wasUndone","MergeOperation","fork","pos","/RenameOperation","newValueBoolean","graveyardPosition","nodes.","targetPosition","rootMain: boolean expected","/InsertOperation","oldRange",".MergeOperation.graveyardPosition: object expected","Reader",".InsertOperation.nodes: object expected","ldelim","affectsData: boolean expected","toJSONOptions","MoveOperation","newValueJson","position.","attributesBoolean: boolean{k:string} expected","start","newName","stickiness: string expected","emptyObject","object expected","end",".Range.start: object expected",".Element.children: array expected","data: string expected","nodes: array expected","fromObject","isAdd","rootName","call","key: string expected","children.","sourcePosition","RootAttributeOperation","rootMain","emptyArray","data","howMany","11683830yclLek","skipType","/Element","isAdd: boolean expected",".MoveOperation.targetPosition: object expected","key","attributesJson","root: string expected","oldValueBoolean","boolean","constructor","newValueJson: string expected","rootName: string expected","Element",".Range.end: object expected","range",".SplitOperation.insertionPosition: object expected","howMany: integer expected","prototype","8IKgrIh","rootGraveyard","name","967832sRnWEZ","start.","39RGmEik","targetPosition.",".MoveOperation.sourcePosition: object expected","hasOwnProperty","arrays","rootGraveyard: boolean expected",".RenameOperation.position: object expected","/RootOperation","verify","object",".MarkerOperation.oldRange: object expected","encode","objects",".AttributeOperation.range: object expected","SplitOperation","len","push","shouldReceiveAttributes: boolean expected","MarkerOperation","nodes","length"];return(br=function(){return t})()}const Ir=vr;function Or(){const t=["decode","939474wNoctQ","_protobufRoot","finish","compress","verify","getDescriptor","218895Poostn","32264odZlCJ","1519476TCNyRq","_protobuf","toObject","encode","create","39WDkSzQ","2005241CEVWhw","170074GdYgUo","decompress","2osaiNn","1530528TwjRBk"];return(Or=function(){return t})()}function vr(t,e){const n=Or();return(vr=function(t,e){return n[t-=383]})(t,e)}!function(t){const e=vr,n=t();for(;;)try{if(162708===parseInt(e(389))/1*(parseInt(e(391))/2)+-parseInt(e(387))/3*(parseInt(e(401))/4)+parseInt(e(400))/5+parseInt(e(402))/6+-parseInt(e(388))/7+parseInt(e(392))/8+-parseInt(e(394))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Or);class wr{[Ir(395)];constructor(){this[Ir(395)]=gr}[Ir(399)](t){return new Sr(this[Ir(395)][t])}}class Sr{[Ir(383)];constructor(t){this[Ir(383)]=t}[Ir(397)](t){const e=Ir,n=this[e(383)][e(398)](t);if(n)throw Error(n);return this[e(383)][e(385)](this[e(383)][e(386)](t))[e(396)]()}[Ir(390)](t){const e=Ir;return this[e(383)][e(384)](this[e(383)][e(393)](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]",Dr="[object Symbol]",jr="[object Date]",xr="[object Map]",Rr="[object Set]",Nr="[object Array]",Vr="[object ArrayBuffer]",Mr="[object Object]",Br="[object DataView]",Ur="[object Uint8Array]",Jr="[object Uint8ClampedArray]",qr="[object Uint16Array]",Lr="[object Uint32Array]",Gr="[object Int8Array]",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 jr:case zr:case Fr:case Gr:case Yr:case Hr:case xr:case Cr:case Mr:case Tr:case Rr:case _r:case Dr:case Ur:case Jr:case qr:case Lr:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return r.set(t,e),Wr(e,t,n,r,s),e}return t}function Wr(t,e,n=t,r,s){const o=[...Object.keys(e),...kr(e)];for(let i=0;i<o.length;i++){const a=o[i],c=Object.getOwnPropertyDescriptor(t,a);(null==c||c.writable)&&(t[a]=Kr(e[a],a,n,r,s))}}function Xr(t,e){return function(t,e){return Kr(t,void 0,t,new Map,e)}(t,(n,r,s,o)=>{const i=e?.(n,r,s,o);if(null!=i)return i;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case Cr:case _r:case Pr:{const e=new t.constructor(t?.valueOf());return Wr(e,t),e}case Er:{const e={};return Wr(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function Qr(t){return Xr(t)}function Zr(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function $r(t,e,n,r,s,o,i){const a=i(t,e,n,r,s,o);if(void 0!==a)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return ts(t,e,o,i)}return ts(t,e,o,i)}function ts(t,e,n,r){if(Object.is(t,e))return!0;let s=Ar(t),o=Ar(e);if(s===Er&&(s=Mr),o===Er&&(o=Mr),s!==o)return!1;switch(s){case _r:return t.toString()===e.toString();case Cr:return function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(t.valueOf(),e.valueOf());case Pr:case jr:case Dr:return Object.is(t.valueOf(),e.valueOf());case Tr:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}const i=(n=n??new Map).get(t),a=n.get(e);if(null!=i&&null!=a)return i===e;n.set(t,e),n.set(e,t);try{switch(s){case xr:if(t.size!==e.size)return!1;for(const[s,o]of t.entries())if(!e.has(s)||!$r(o,e.get(s),s,t,e,n,r))return!1;return!0;case Rr:{if(t.size!==e.size)return!1;const s=Array.from(t.values()),o=Array.from(e.values());for(let i=0;i<s.length;i++){const a=s[i],c=o.findIndex(s=>$r(a,s,void 0,t,e,n,r));if(-1===c)return!1;o.splice(c,1)}return!0}case Nr:case Ur:case Jr:case qr:case Lr:case"[object BigUint64Array]":case Gr:case Yr:case Hr:case"[object BigInt64Array]":case zr:case Fr:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!$r(t[s],e[s],s,t,e,n,r))return!1;return!0;case Vr:return t.byteLength===e.byteLength&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case Br:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&ts(new Uint8Array(t),new Uint8Array(e),n,r);case"[object Error]":return t.name===e.name&&t.message===e.message;case Mr:{if(!(ts(t.constructor,e.constructor,n,r)||Zr(t)&&Zr(e)))return!1;const s=[...Object.keys(t),...kr(t)],o=[...Object.keys(e),...kr(e)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const i=s[o],a=t[i];if(!Object.hasOwn(e,i))return!1;if(!$r(a,e[i],i,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function es(){}function ns(t,e){return function(t,e,n){return $r(t,e,void 0,void 0,void 0,void 0,n)}(t,e,es)}function rs(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function ss(){const t=["rootMain","$graveyard","103465ETgGsv","12tyqWQM","1324815UdWaIf","length","8648654hquoOE","8wtphbM","36hAHhPE","rootGraveyard","7585602IlklHy","11070851WJvsKF","root","84vsEflf","8131112PjZdNC","nodes","2781490UkMywd","path","main","5EKXWNF"];return(ss=function(){return t})()}function os(t,e){const n=ss();return(os=function(t,e){return n[t-=339]})(t,e)}function is(t,e){const n=os,r=Qr(t);return r[n(340)][r[n(340)][n(348)]-1]+=e,r}function as(t,e){const n=os;return t[n(355)]===e[n(355)]&&ns(t[n(340)],e[n(340)])}function cs(t){const e=os;ds(t,t=>(e(341)==t[e(355)]?(t[e(343)]=!0,delete t[e(355)]):e(344)==t[e(355)]&&(t[e(352)]=!0,delete t[e(355)]),t))}function us(t){const e=os;ds(t,t=>(t[e(343)]?(t[e(355)]=e(341),delete t[e(343)]):t[e(352)]&&(t[e(355)]=e(344),delete t[e(352)]),t))}function ds(t,e){const n=os;for(const r in t){const s=t[r];n(358)!==r&&rs(s)&&(s[n(340)]&&(s[n(355)]||s[n(343)]||s[n(352)])?t[r]=e(s):ds(s,e))}return t}!function(t){const e=os,n=t();for(;;)try{if(677638===parseInt(e(345))/1*(-parseInt(e(350))/2)+-parseInt(e(347))/3*(parseInt(e(346))/4)+parseInt(e(342))/5*(-parseInt(e(353))/6)+-parseInt(e(349))/7+-parseInt(e(357))/8+parseInt(e(351))/9*(-parseInt(e(339))/10)+parseInt(e(354))/11*(parseInt(e(356))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ss);const ls=ps;function ps(t,e){const n=hs();return(ps=function(t,e){return n[t-=406]})(t,e)}function hs(){const t=["569225TchnwO","22844fOXZdr","90sZLNFT","__className","3317272Heqjrm","4227744KRPzDL","_protobufDescriptor","decompress","types","303DglfeI","shift","1547582VkIEFb","565340PEybid","_id","buffers","317712JAUZIl","push","_operationName","18uYKHIG","compress"];return(hs=function(){return t})()}!function(t){const e=ps,n=t();for(;;)try{if(399109===parseInt(e(414))/1+-parseInt(e(410))/2+parseInt(e(408))/3*(parseInt(e(420))/4)+-parseInt(e(419))/5*(parseInt(e(417))/6)+-parseInt(e(423))/7+parseInt(e(424))/8+-parseInt(e(421))/9*(-parseInt(e(411))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(hs);class fs{[ls(412)];[ls(416)];[ls(425)];constructor(t,e,n){const r=ls;this[r(412)]=t,this[r(416)]=e,this[r(425)]=n}[ls(418)](t,e){const n=ls,r=e[n(409)]();return cs(r),t[n(413)][n(415)](this[n(425)][n(418)](r)),t[n(407)][n(415)](this[n(412)]),!0}[ls(406)](t,e){const n=ls;e[n(407)][n(409)]();const r=this[n(425)][n(406)](e[n(413)][n(409)]());us(r),r[n(422)]=this[n(416)],t[n(415)](r)}}const ms=ys;function ys(t,e){const n=bs();return(ys=function(t,e){return n[t-=182]})(t,e)}!function(t){const e=ys,n=t();for(;;)try{if(636742===-parseInt(e(202))/1+parseInt(e(193))/2+-parseInt(e(198))/3*(parseInt(e(183))/4)+parseInt(e(185))/5*(-parseInt(e(200))/6)+parseInt(e(209))/7+parseInt(e(205))/8*(parseInt(e(204))/9)+-parseInt(e(186))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(bs);class gs extends fs{[ms(199)](t,e){const n=ms,r=e[n(194)]();return this[n(207)](n(187),r),this[n(207)](n(197),r),cs(r),t[n(208)][n(182)](this[n(191)][n(199)](r)),t[n(184)][n(182)](this[n(195)]),!0}[ms(201)](t,e){const n=ms,{types:r,buffers:s}=e,o=this[n(191)][n(201)](s[n(194)]());r[n(194)](),this[n(206)](n(187),o),this[n(206)](n(197),o),us(o),o[n(188)]=this[n(189)],t[n(182)](o)}[ms(207)](t,e){const n=ms,r=e[t];n(192)==typeof r?e[t+n(196)]=r:e[t+n(203)]=JSON[n(210)](r)}[ms(206)](t,e){const n=ms,r=t+n(203);e[r]?(e[t]=JSON[n(190)](e[r]),delete e[r]):(e[t]=e[t+n(196)],delete e[t+n(196)])}}function bs(){const t=["54520vJrtIc","shift","_id","Boolean","newValue","6xupybu","compress","748302tpDAqC","decompress","215486KGBDXZ","Json","145755RNXnpZ","608yfGgnQ","_deserializeOneOf","_serializeOneOf","buffers","7277753KqMCjd","stringify","push","2204132Hydjvh","types","5MRXsDY","2187480yljtUw","oldValue","__className","_operationName","parse","_protobufDescriptor","boolean"];return(bs=function(){return t})()}const Is=Os;function Os(t,e){const n=ws();return(Os=function(t,e){return n[t-=222]})(t,e)}!function(t){const e=Os,n=t();for(;;)try{if(925818===parseInt(e(241))/1*(-parseInt(e(230))/2)+parseInt(e(232))/3+parseInt(e(251))/4+-parseInt(e(247))/5+parseInt(e(227))/6+-parseInt(e(228))/7*(-parseInt(e(242))/8)+-parseInt(e(237))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ws);class vs extends fs{[Is(224)](t,e){const n=Is,r=e[n(226)]();return this[n(243)](r[n(222)]),cs(r),t[n(231)][n(252)](this[n(248)][n(224)](r)),t[n(235)][n(252)](this[n(238)]),!0}[Is(253)](t,e){const n=Is,{types:r,buffers:s}=e,o=this[n(248)][n(253)](s[n(226)]());r[n(226)](),o[n(222)]||(o[n(222)]=[]),this[n(236)](o[n(222)]),us(o),o[n(246)]=this[n(234)],t[n(252)](o)}[Is(243)](t){const e=Is;for(const n of t){if(n[e(244)]){const t=n[e(244)];this[e(229)](t)?n[e(245)]=t:n[e(225)]=JSON[e(223)](t)}n[e(240)]&&this[e(243)](n[e(240)])}}[Is(236)](t){const e=Is;for(const n of t)(n[e(245)]||n[e(225)])&&(n[e(245)]?(n[e(244)]=n[e(245)],delete n[e(245)]):(n[e(244)]=JSON[e(239)](n[e(225)]),delete n[e(225)])),n[e(240)]&&this[e(236)](n[e(240)])}[Is(229)](t){const e=Is;return Object[e(250)](t)[e(249)](n=>e(233)==typeof t[n])}}function ws(){const t=["_id","parse","children","1klKcEk","7827104UJqmmS","_serializeNodesAttributes","attributes","attributesBoolean","__className","4744925zgfJDT","_protobufDescriptor","every","keys","3769896MFttyL","push","decompress","nodes","stringify","compress","attributesJson","shift","2263386VXIcEd","7OGiLCC","_areValuesBoolean","1590494JjTtGI","buffers","4634910fEWCpG","boolean","_operationName","types","_deserializeNodesAttributes","10557117WImMET"];return(ws=function(){return t})()}const Ss=ks;function ks(t,e){const n=As();return(ks=function(t,e){return n[t-=286]})(t,e)}function As(){const t=["1215AQAepA","4GIHaHH","2616635UzZHYp","length","9525820TBYXoP","792XYoPsq","120127ZqneIv","33taarod","oldRange","1797732ZkMXhM","246JgjqfP","decompress","1646856cBZWOk","newRange","74174BTGJxZ"];return(As=function(){return t})()}!function(t){const e=ks,n=t();for(;;)try{if(767416===-parseInt(e(297))/1*(-parseInt(e(295))/2)+-parseInt(e(293))/3+-parseInt(e(290))/4+-parseInt(e(298))/5+parseInt(e(291))/6*(-parseInt(e(287))/7)+-parseInt(e(286))/8*(parseInt(e(296))/9)+-parseInt(e(300))/10*(-parseInt(e(288))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(As);class Ts extends fs{[Ss(292)](t,e){const n=Ss;super[n(292)](t,e);const r=t[t[n(299)]-1];r[n(289)]||(r[n(289)]=null),r[n(294)]||(r[n(294)]=null)}}function _s(){var t=["18iOHKgX","126jNylWH","_id","4672RmrNkR","types","shift","_operationName","43170thOIFt","25TgSofW","66828DjKcUs","169HMUvsG","compress","decompress","1072vVpVtA","138FJxIEC","492396hsGYga","755777sMRCRJ","3990790vLhxKV","5558ZaVtEC","push"];return(_s=function(){return t})()}var Cs=Ps;function Ps(t,e){var n=_s();return(Ps=function(t,e){return n[t-=296]})(t,e)}!function(t){for(var e=Ps,n=t();;)try{if(432977===-parseInt(e(312))/1*(parseInt(e(301))/2)+-parseInt(e(299))/3*(-parseInt(e(307))/4)+-parseInt(e(306))/5*(parseInt(e(305))/6)+parseInt(e(296))/7*(-parseInt(e(311))/8)+parseInt(e(298))/9*(parseInt(e(315))/10)+-parseInt(e(314))/11+-parseInt(e(313))/12*(parseInt(e(308))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_s);class Es extends fs{[Cs(309)](t,e){var n=Cs;return e[n(303)](),t[n(302)][n(297)](this[n(300)]),!0}[Cs(310)](t,e){var n=Cs;e[n(302)][n(303)](),t[n(297)]({__className:this[n(304)]})}}function Ds(t,e){const n=xs();return(Ds=function(t,e){return n[t-=409]})(t,e)}const js=Ds;function xs(){const t=["2UfANWU","3811722UlyqOR","568948KjXeOy","replace","compress","__className","MarkerOperation","name","_omittedNamespace","41217wPyKtg","length","4373990lWjMVU","56UzGHQm","startsWith","decompress","5787ZnrBKU","7wRjzId","9720koeNGo","5160gYVGKC","995811hqPgMU","160265ABkKBI"];return(xs=function(){return t})()}!function(t){const e=Ds,n=t();for(;;)try{if(443032===parseInt(e(425))/1+-parseInt(e(423))/2*(parseInt(e(421))/3)+-parseInt(e(414))/4*(-parseInt(e(422))/5)+-parseInt(e(424))/6*(parseInt(e(418))/7)+-parseInt(e(419))/8*(parseInt(e(417))/9)+-parseInt(e(413))/10+parseInt(e(411))/11*(parseInt(e(420))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(xs);class Rs extends Ts{[js(410)];constructor(t,e,n,r){const s=js;super(t,e,n),this[s(410)]=r+":"}[js(427)](t,e){const n=js;return!(n(429)!=e[0][n(428)]||!e[0][n(409)][n(415)](this[n(410)])||(e[0][n(409)]=e[0][n(409)][n(426)](new RegExp("^"+this[n(410)]),""),super[n(427)](t,e),0))}[js(416)](t,e){const n=js;super[n(416)](t,e);const r=t[t[n(412)]-1];r[n(409)]=this[n(410)]+r[n(409)]}}const Ns=Ms;function Vs(){const t=["37940XInjNk","78QhkrjL","_compressSingleOperation","decompress","16unFraF","_context","_combineNext","compress","10MxYcra","1147854dVHhci","buffers","_splitCurrent","types","_id","297282aeiLUY","shift","push","4118169liAsxO","477189iQexXc","length","4UUpEXa","781671pxrLTo","_compareOperations","_decompressSingleOperation","361417aUjpnK"];return(Vs=function(){return t})()}function Ms(t,e){const n=Vs();return(Ms=function(t,e){return n[t-=443]})(t,e)}!function(t){const e=Ms,n=t();for(;;)try{if(717292===parseInt(e(456))/1+-parseInt(e(444))/2+parseInt(e(449))/3*(parseInt(e(455))/4)+parseInt(e(460))/5+-parseInt(e(461))/6*(-parseInt(e(459))/7)+parseInt(e(464))/8*(parseInt(e(453))/9)+-parseInt(e(443))/10*(parseInt(e(452))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Vs);class Bs{[Ns(448)];[Ns(465)];constructor(t,e){const n=Ns;this[n(448)]=t,this[n(465)]=e}[Ns(467)](t,e){const n=Ns;let r;for(;e[n(454)]>1&&this[n(457)](e[0],e[1]);)r?(r=this[n(466)](e[n(450)](),r),t[n(447)][n(451)](0)):(r=Qr(e[n(450)]()),t[n(447)][n(451)](this[n(448)]));return!!r&&(r=this[n(466)](e[n(450)](),r),t[n(447)][n(451)](0),t[n(445)][n(451)](this[n(462)](r)),!0)}[Ns(463)](t,e){const n=Ns,r=this[n(458)](e);for(;0==e[n(447)][0];)e[n(447)][n(450)](),t[n(451)](this[n(446)](r));t[n(451)](r)}}const Us=Js;function Js(t,e){const n=qs();return(Js=function(t,e){return n[t-=332]})(t,e)}function qs(){const t=["78dLbOVG","_compressSingleOperation","next","buffers","nodes","_compareAttributes","_combineNext","position","from","4456695TxIyAp","compress","keys","8KKPZHZ","decompress","28645rtlMqq","85soiFRO","iterator","_decompressSingleOperation","7635690sDPArI","value","_checkOperation","10BNwbMk","length","InsertOperation","_compareOperations","data","_context","_splitCurrent","__className","102216udEEVq","wasUndone","attributes","_getCompressorByName","7828072OgPjVq","4118652tIfblH","every","17339531VvPEDa","substr"];return(qs=function(){return t})()}!function(t){const e=Js,n=t();for(;;)try{if(848870===parseInt(e(349))/1*(parseInt(e(335))/2)+parseInt(e(344))/3+-parseInt(e(364))/4*(-parseInt(e(350))/5)+-parseInt(e(353))/6+parseInt(e(368))/7+-parseInt(e(347))/8*(parseInt(e(369))/9)+-parseInt(e(356))/10*(parseInt(e(333))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(qs);class Ls extends Bs{[Us(341)](t,e){const n=Us;return e[n(339)][0][n(360)]+=t[n(339)][0][n(360)],e}[Us(362)](t){const e=Us,n=Qr(t),r=n[e(339)][0],s=t[e(339)][0],o=s[e(360)][Symbol[e(351)]]()[e(337)]()[e(354)],i=o[e(357)];return r[e(360)]=o,s[e(360)]=s[e(360)][e(334)](i),t[e(342)]=is(t[e(342)],i),n}[Us(359)](t,e){const n=Us;if(this[n(355)](t)&&this[n(355)](e)){const r=t[n(339)][0][n(360)][n(357)],s=as(is(t[n(342)],r),e[n(342)]),o=t[n(339)][0],i=e[n(339)][0];return s&&this[n(340)](o,i)}return!1}[Us(336)](t){const e=Us,n={types:[],buffers:[],baseVersion:0};return this[e(361)][e(367)](e(358))[e(345)](n,[t]),n[e(338)][0]}[Us(352)](t){const e=Us,n=[];return this[e(361)][e(367)](e(358))[e(348)](n,t),n[0]}[Us(355)](t){const e=Us;return e(358)==t[e(363)]&&1==t[e(339)][e(357)]&&t[e(339)][0][e(360)]&&!t[e(365)]&&1==Array[e(343)](t[e(339)][0][e(360)])[e(357)]}[Us(340)](t,e){const n=Us,r=Object[n(346)](t[n(366)]||{}),s=Object[n(346)](e[n(366)]||{});return r[n(357)]===s[n(357)]&&r[n(332)](r=>e[n(366)][r]&&e[n(366)][r]===t[n(366)][r])}}const Gs=Hs;function Ys(){const t=["_compareOperations","root","_decompressSingleOperation","sourcePosition","1785294aJYXQM","MoveOperation","howMany","decompress","buffers","11wmvYOA","5vGbQTI","94882GpgmgO","_context","3asnuTL","1226262YIJrcZ","compress","__className","$graveyard","_splitCurrent","3303240FWCjUZ","_compressSingleOperation","_getCompressorByName","_checkOperation","224119jZchzM","targetPosition","201193hhQBvp","24BJORUO","_combineNext","wasUndone","633920EKcRzz"];return(Ys=function(){return t})()}function Hs(t,e){const n=Ys();return(Hs=function(t,e){return n[t-=325]})(t,e)}!function(t){const e=Hs,n=t();for(;;)try{if(113786===parseInt(e(346))/1+parseInt(e(332))/2*(parseInt(e(334))/3)+-parseInt(e(350))/4+parseInt(e(331))/5*(-parseInt(e(335))/6)+parseInt(e(344))/7*(parseInt(e(347))/8)+-parseInt(e(325))/9+parseInt(e(340))/10*(parseInt(e(330))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ys);class zs extends Bs{[Gs(348)](t,e){const n=Gs;return e[n(327)]++,e[n(354)]=Qr(t[n(354)]),e}[Gs(339)](t){const e=Gs,n=Qr(t);return t[e(327)]--,n[e(327)]=1,n[e(354)]=is(n[e(354)],t[e(327)]),n}[Gs(351)](t,e){const n=Gs;return!(!this[n(343)](t)||!this[n(343)](e))&&as(is(t[n(354)],-1),e[n(354)])&&as(t[n(345)],e[n(345)])}[Gs(341)](t){const e=Gs,n={types:[],buffers:[],baseVersion:0};return this[e(333)][e(342)](e(326))[e(336)](n,[t]),n[e(329)][0]}[Gs(353)](t){const e=Gs,n=[];return this[e(333)][e(342)](e(326))[e(328)](n,t),n[0]}[Gs(343)](t){const e=Gs;return e(326)==t[e(337)]&&e(338)==t[e(345)][e(352)]&&1==t[e(327)]&&!t[e(349)]}}const Fs=Ws;function Ks(){const t=["buffers","_checkOperation","584672oiIsHG","2236304SAakCC","_combineNext","_splitCurrent","howMany","_compareOperations","sourcePosition","590CbQmcf","wasUndone","MoveOperation","29847oGWnvS","151062rMHfub","221496BZLXpM","_compressSingleOperation","45jZFnFh","root","6774hmfgfz","_getCompressorByName","_context","__className","targetPosition","22EMVdNM","decompress","$graveyard","618210mlrXIm","7MkbYNw","_decompressSingleOperation","compress"];return(Ks=function(){return t})()}function Ws(t,e){const n=Ks();return(Ws=function(t,e){return n[t-=387]})(t,e)}!function(t){const e=Ws,n=t();for(;;)try{if(238124===parseInt(e(393))/1+-parseInt(e(403))/2*(-parseInt(e(392))/3)+-parseInt(e(412))/4+parseInt(e(389))/5*(parseInt(e(398))/6)+-parseInt(e(407))/7*(-parseInt(e(413))/8)+parseInt(e(396))/9*(-parseInt(e(406))/10)+parseInt(e(394))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ks);class Xs extends Bs{[Fs(414)](t,e){return e[Fs(416)]++,e}[Fs(415)](t){const e=Fs,n=Qr(t);return n[e(416)]=1,t[e(416)]--,n}[Fs(387)](t,e){const n=Fs;return!(!this[n(411)](t)||!this[n(411)](e))&&as(t[n(388)],e[n(388)])&&as(t[n(402)],e[n(402)])}[Fs(395)](t){const e=Fs,n={types:[],buffers:[],baseVersion:0};return this[e(400)][e(399)](e(391))[e(409)](n,[t]),n[e(410)][0]}[Fs(408)](t){const e=Fs,n=[];return this[e(400)][e(399)](e(391))[e(404)](n,t),n[0]}[Fs(411)](t){const e=Fs;return e(391)==t[e(401)]&&e(405)==t[e(402)][e(397)]&&1==t[e(416)]&&!t[e(390)]}}const Qs=Zs;function Zs(t,e){const n=$s();return(Zs=function(t,e){return n[t-=222]})(t,e)}function $s(){const t=["2377970rEsQrF","__className","oldRange","_decompressSingleOperation","startsWith","name","29067xlmVwU","_id","_compressSingleOperation","_compareOperations","toNone","user:","buffers","_getCompressorByName","types","3264510YcmBLb","5273832YMBaLD","shift","split","compress","671923UlvaIL","stickiness","user:position:","push","end","newRange","148Getbwo","4221976hhEUVg","3744118lJymgm","_context","decompress","start","MarkerOperation"];return($s=function(){return t})()}!function(t){const e=Zs,n=t();for(;;)try{if(642358===-parseInt(e(223))/1+parseInt(e(236))/2+-parseInt(e(242))/3*(-parseInt(e(229))/4)+parseInt(e(251))/5+-parseInt(e(252))/6+-parseInt(e(231))/7+parseInt(e(230))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}($s);class to extends Bs{[Qs(222)](t,e){const n=Qs;if(!this[n(245)](e[0],e[1]))return!1;const r=e[n(253)]();return r[n(238)]=null,r[n(228)]&&as(r[n(228)][n(234)],r[n(228)][n(227)])&&(r[n(228)][n(227)]=null),e[n(253)](),t[n(250)][n(226)](this[n(243)]),t[n(250)][n(226)](0),t[n(248)][n(226)](this[n(244)](r)),!0}[Qs(233)](t,e){const n=Qs,r=this[n(239)](e);r[n(228)]&&!r[n(228)][n(227)]&&(r[n(228)][n(227)]=Qr(r[n(228)][n(234)]));const s=Qr(r);s[n(228)]&&(s[n(228)][n(234)][n(224)]=n(246),s[n(228)][n(227)]=Qr(s[n(228)][n(234)])),s[n(241)]=n(225)+s[n(241)][n(254)](":")[2],e[n(250)][n(253)](),t[n(226)](r),t[n(226)](s)}[Qs(244)](t){const e=Qs,n={types:[],buffers:[],baseVersion:0};return this[e(232)][e(249)](e(235))[e(222)](n,[t]),n[e(248)][0]}[Qs(239)](t){const e=Qs,n=[];return this[e(232)][e(249)](e(235))[e(233)](n,t),n[0]}[Qs(245)](t,e){const n=Qs;return!!(t&&e&&n(235)==t[n(237)]&&n(235)==e[n(237)]&&t[n(241)][n(240)](n(247))&&e[n(241)][n(240)](n(247))&&t[n(241)]!=e[n(241)])}}const eo=ro;function no(){const t=["length","get","InsertOperation","UserSelectionAction","_compressorByName","RootAttributeOperation","RootOperation","DeletingAction","18586RkfDWo","__className","39513710FlmKEw","comment","MergeOperation","compress","_getCompressorByName","6629688WgnvwY","types","CommentMarkerOperation","SplitOperation","698495woqEWi","NoOperation","ForwardDeletingAction","AttributeOperation","_compressorById","decompress-compressor-not-found","1890275gyOmpP","suggestion","MarkerOperation","_protobufFactory","no-operations-provided","forEach","RenameOperation","_registerActionCompressor","48tAAPgu","_registerOperationCompressor","SuggestionMarkerOperation","TypingAction","336uyXQJE","set","MoveOperation","getDescriptor","4BmChhu","27126NdeYOp","decompress","_registerCompressor","baseVersion","748986DPSiqd"];return(no=function(){return t})()}function ro(t,e){const n=no();return(ro=function(t,e){return n[t-=309]})(t,e)}!function(t){const e=ro,n=t();for(;;)try{if(596865===-parseInt(e(349))/1+parseInt(e(311))/2*(-parseInt(e(340))/3)+-parseInt(e(344))/4*(parseInt(e(328))/5)+-parseInt(e(318))/6+-parseInt(e(322))/7+-parseInt(e(336))/8*(-parseInt(e(345))/9)+parseInt(e(313))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(no);class so{[eo(326)];[eo(354)];[eo(331)];constructor(){const t=eo;this[t(326)]=new Map,this[t(354)]=new Map,this[t(331)]=new wr;const e=this[t(331)][t(343)](t(330));this[t(347)](1,t(323),new Es(1,t(323),void 0)),this[t(337)](10,t(325),gs),this[t(337)](11,t(352),vs),this[t(337)](12,t(330),Ts),this[t(337)](13,t(315),fs),this[t(337)](14,t(342),fs),this[t(337)](15,t(334),fs),this[t(337)](16,t(355),gs),this[t(337)](17,t(321),fs),this[t(347)](18,t(320),new Rs(18,t(330),e,t(314))),this[t(347)](19,t(338),new Rs(19,t(330),e,t(329))),this[t(337)](20,t(309),fs),this[t(335)](100,t(339),Ls),this[t(335)](101,t(310),zs),this[t(335)](102,t(324),Xs),this[t(335)](103,t(353),to)}[eo(316)](t){const e=eo;if(!t||!t[0])throw new n.CKEditorError(e(332),this);const r={types:[],buffers:[],baseVersion:t[0][e(348)]};for(;t[e(350)];)this[e(317)](e(353))[e(316)](r,t)||this[e(317)](e(339))[e(316)](r,t)||this[e(317)](e(310))[e(316)](r,t)||this[e(317)](e(324))[e(316)](r,t)||this[e(317)](e(320))[e(316)](r,t)||this[e(317)](e(338))[e(316)](r,t)||this[e(317)](t[0][e(312)])[e(316)](r,t);return r}[eo(346)](t){const e=eo,r=[];for(;t[e(319)][e(350)];){const s=this[e(326)][e(351)](t[e(319)][0]);if(!s)throw new n.CKEditorError(e(327),this,{type:t[e(319)][0]});s[e(346)](r,t)}return r[e(333)]((n,r)=>n[e(348)]=t[e(348)]+r),r}[eo(317)](t){const e=eo;return this[e(354)][e(351)](t)}[eo(337)](t,e,n){const r=eo,s=new n(t,e,this[r(331)][r(343)](e));this[r(347)](t,e,s)}[eo(335)](t,e,n){const r=eo,s=new n(t,this);this[r(347)](t,e,s)}[eo(347)](t,e,n){const r=eo;this[r(326)][r(341)](t,n),this[r(354)][r(341)](e,n)}}function oo(t,e){var n=io();return(oo=function(t,e){return n[t-=358]})(t,e)}function io(){var t=["466930YGHymw","7239488BYsFcz","65esCGIV","242aBrEhE","154233tSdEip","295464IsixoJ","12pvdcdh","42uPddxB","372323PEiqAO","414164AiZdMv","153AFjKxq","567984obgQii"];return(io=function(){return t})()}!function(t){for(var e=oo,n=t();;)try{if(752992===-parseInt(e(365))/1+parseInt(e(367))/2*(parseInt(e(366))/3)+parseInt(e(358))/4*(parseInt(e(363))/5)+-parseInt(e(368))/6*(parseInt(e(369))/7)+-parseInt(e(362))/8+-parseInt(e(359))/9*(parseInt(e(361))/10)+parseInt(e(364))/11*(parseInt(e(360))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(io);const ao=co;function co(t,e){const n=uo();return(co=function(t,e){return n[t-=144]})(t,e)}function uo(){const t=["createRange","cs:removeUser","collaboration-missing-channelid","4563184IecGfV","from","reconnect","disconnected","132GaMtEV","startsWith","size","addUser","_knownRootNames","requires","change:hasDomSelection","_operationIdentifier","_compressor","catch","keys","enableReadOnlyMode","move","define","_isAttached","attributes","then","getIdOfTheLastOperation","markers","insert","real-time-collaboration","_handleSendingSelectionMarkers","rootName","lastOperationId","cloud-services-internal-error: Not connected.","addToReconnectionStack","data","addOperation","error","filter","_sendBufferedOperationsDelayed","_handleInitialConnectionData","rtc-destroyed","stopListening","return","model","version","compress","isDocumentOperation","_initThrowingOnDataSet","__className","getRoot","fromJSON","newRange","getMany","_addKnownRoot","_hasSynchronizationProblem","connection","_initSessionsHandling","toJSON","rtc-offline","setIdForTheLastOperation","_getAffectedRoot","collaboration.channelId","differ","_connectService","createdAt","_offset","_handleReconnectionError","change:_isEditingAllowed","cloudDocumentVersion","$root","clone","channelSessions","lastOperationAcceptedAt","sendOperations","root","roots","baseVersion","document","reconnection: flushed session","serverHistory","view","_isConnected","enqueueChange","getConnectedSessions","_compressOperations","_channelId","change:_isPendingUpdate","_saveOperationInBuffer","length","has","297055hFAswr","_updateServerHistory","addRoot","realtimecollaborationclient-init-non-existent-root","round","PENDING_ACTION_SENDING_DATA","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","editing","isUndoneOperation","config","10YeRNPf","_applyOperationsSet","type","realtimecollaborationclient-init-session-connection-error","realtimecollaborationclient-init-service-incorrect-server-operation","position","string","change:range","1cyjfiz","createRoot","decompress","listenTo","affectsData","_lastSyncedOperationId","affectedSelectable","finally","includes","_waitUntilSynced","userId","removeFromReconnectionStack","code","high","isReadOnly","forEach","end","_setPendingAction","history","_setUpDataInit","_decompressOperations","path","_isEditingAllowed","document:write","set","state","connect","reset","mySessionId","operationsReceived","off","offset","createPositionFromPath","message","_bufferedOperations","initData","batch","1755488zfKgwO","createPositionAt","6095408ssCxHg","getOperations","connected","isOfficialPlugin","apply","map","disableReadOnlyMode","collaboration","InsertOperation","rootsAttributes","entries","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","_service","isPremiumPlugin","_handleServerResponse","1464382bwmRGq","marker","cloud-services-internal-error: Request timeout.","_handleReconnectionResponse","_loadRoot","multi-root-editor-root-attributes-no-root","plugins","_document","wasUndone","editor","_isPendingUpdate","_handleExternalOperations","applyOperation","register","_operationToId","realtimecollaborationclient","pluginName","_sendBufferedOperations","lastDocumentSession","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","_baseBufferDelay","_isInit","permissions","get","getUser","24065397EJTRya","add","_knownOperations","bind","ready","_handleReceivedOperations","_isLoaded","_lastServerVersion","realtimecollaborationclient-init-document-already-initialized","realtimecollaborationclient-sendbufferedoperations","_fetchMissingUsers","remove","CollaborativeEditingService","push","Notification","_disconnectionOperations","start","Synchronization issue","loadRoot","selection","addRootAttribute","404","_shouldSendUpdate","realtimecollaborationclient-handleserverresponse","disconnect","realtimecollaborationclient-init-connection-failed","lastSyncVersion","stop","realtimecollaborationclient-init-service-internal-error","getOperationAuthor","_disconnectService","suppressErrorInCollaboration","currentDocumentSession","destroy","_hasSelectionChanged","wereChangesApplied","cloudServices.bundleVersion","_sendBufferedOperationsDelayId","directChange","_connectAfterSessionHasBeenFlushed","sessionId","_authorId","sessionAdd:","realtimecollaborationclient-error","showWarning","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.","CommentsOnly","_pendingAction","409","_clearPendingAction","_ignoredOperations","cloud-services-internal-error: Collaborative Editing Service is not connected.","_refreshUserSelectionMarkers","metadata","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.","isEnabled","targetPosition","unregister","parse","_getOperationsFromInitData","createUserMarkerOperations","getDocumentDetails","_crash","_isDisconnection","_shouldSendSelectionUpdate","slice","1566291MwABBF","locale","_bufferRootLoad","fire","init","sessionCreatedAt","setPermissions","Permissions","_currentBufferDelay","RealTimeCollaborationClient"];return(uo=function(){return t})()}!function(t){const e=co,n=t();for(;;)try{if(969241===-parseInt(e(343))/1*(-parseInt(e(397))/2)+parseInt(e(226))/3+-parseInt(e(239))/4+-parseInt(e(325))/5*(parseInt(e(243))/6)+parseInt(e(380))/7+-parseInt(e(382))/8+-parseInt(e(160))/9*(-parseInt(e(335))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(uo);let lo=1;class po extends e.Plugin{static[ao(172)]=(()=>On)();[ao(300)];[ao(200)];[ao(314)];[ao(320)];[ao(394)];[ao(404)];[ao(251)];[ao(377)];[ao(162)];[ao(247)];[ao(207)];[ao(194)];[ao(197)];[ao(155)];[ao(234)];[ao(348)];[ao(175)];[ao(250)];static get[ao(248)](){return[zn,Qn,pr,e.PendingActions,Fn.Users,r.Notification]}static get[ao(151)](){return ao(235)}static get[ao(385)](){return!0}static get[ao(395)](){return!0}get[ao(303)](){const t=ao;return this[t(167)]+this[t(300)]}get[ao(167)](){const t=ao;return this[t(314)][t(279)]-this[t(300)]}get[ao(186)](){const t=ao,e=this[t(314)][t(383)]();for(let n=e[t(323)]-1;n>=0;n--){const r=e[n];if(!this[t(175)][t(324)](r))return r[t(311)]+1-this[t(300)]}return 0}constructor(t){const e=ao;if(super(t),this[e(300)]=0,this[e(200)]=null,this[e(314)]=new s.History,this[e(144)][e(334)][e(256)](e(389),{}),this[e(320)]=this[e(144)][e(334)][e(158)](e(296)),!this[e(320)])throw new n.CKEditorError(e(238),this);const r=t[e(334)][e(158)](e(196))||n.version;this[e(394)]=new(po[e(172)])(r,this[e(320)]),this[e(404)]=this[e(144)][e(278)][e(312)],this[e(251)]=new so,this[e(377)]=[],this[e(162)]=new WeakSet,this[e(247)]=new Set,this[e(367)](e(145),!1),this[e(367)](e(289),!1),this[e(207)]=null,this[e(194)]=!1,this[e(197)]=null,this[e(155)]=300,this[e(234)]=this[e(155)],this[e(348)]=null,this[e(175)]=new WeakSet,this[e(250)]=new mo(this[e(175)])}[ao(230)](){const t=ao,e=this[t(144)],n=e[t(403)][t(158)](Fn.Users),r=e[t(403)][t(158)](zn);this[t(346)](n,t(189),(e,r)=>{const s=t,o=r[0];o[s(201)]&&(e[s(277)]=n[s(159)](o[s(201)]),e[s(187)]()),null===o[s(201)]&&(e[s(277)]=null,e[s(187)]())},{priority:t(356)}),this[t(346)](e[t(278)][t(312)][t(179)],t(342),(e,n)=>{const r=t;n[r(198)]&&this[r(212)]()}),this[t(346)](e[t(332)][t(315)],t(249),()=>{this[t(212)]()}),this[t(282)](),e[t(278)].on(t(147),(e,n)=>{const r=t,s=n[0];s[r(281)]&&(this[r(322)](s),this[r(182)]()&&this[r(273)]())}),this[t(362)](),this[t(163)](t(365)).to(r,t(368),this,t(289),(e,n)=>t(384)===e&&!n),this.on(t(302),()=>{const n=t;this[n(365)]?e[n(388)](n(293)):e[n(254)](n(293))}),this[t(365)]?e[t(388)](t(293)):e[t(254)](t(293)),this[t(367)](t(316),!1)}async[ao(241)](){const t=ao,e=this[t(144)][t(403)][t(158)](Qn),n=this[t(144)][t(403)][t(158)](zn);try{this[t(145)]=!0,e[t(217)](this[t(320)]);const r=await this[t(394)][t(241)](n[t(290)],this[t(186)]);await this[t(400)](r)&&(this[t(145)]=!1,this[t(209)]());const s=await this[t(394)][t(318)]();e[t(148)](this[t(320)],s),this[t(264)](),this[t(316)]=!0}catch(e){if(function(e){const n=t;return n(181)===e[n(355)]}(e)&&this[t(200)])await this[t(199)]();else if(function(e){const n=t;return n(208)===e[n(355)]}(e)){const e=mr(this[t(144)][t(227)],t(331));this[t(301)](e)}else{if(!(e instanceof ho))throw e;this[t(301)]()}}}[ao(193)](){const t=ao,e=this[t(144)][t(403)][t(158)](zn),n=this[t(144)][t(403)][t(158)](Qn);this[t(144)][t(254)](t(275)),n[t(306)][t(324)](this[t(320)])&&n[t(217)](this[t(320)]),e[t(354)](this),this[t(190)](),super[t(193)]()}async[ao(400)](t){const e=ao;if(this[e(200)]!==t[e(200)]&&this[e(348)]!==t[e(266)])throw new ho;return this[e(200)]=t[e(200)],this[e(396)]([],{...t,wereChangesApplied:!1,data:t[e(269)]},e(241))}async[ao(298)](t,e=!1){const n=ao,{connection:r}=this[n(144)][n(403)][n(158)](zn);po[n(172)][n(318)](r,this[n(320)])[n(259)](t=>this[n(291)](t))[n(252)](t=>{const e=n;this[e(222)](e(338),t)}),this[n(346)](this[n(394)],n(372),this[n(165)][n(163)](this)),this[n(346)](this[n(394)],n(271),(t,e)=>{const r=n;this[r(222)](r(188),e)}),this[n(346)](this[n(394)],n(242),()=>{this[n(316)]=!1});const s=this[n(250)][n(260)](t);this[n(145)]=!0;const o=await this[n(394)][n(369)](r,this[n(319)](t),s);if(this[n(200)]=o[n(200)],e){if(!o[n(195)])return void this[n(301)]();this[n(145)]=!1,this[n(209)](),this[n(314)][n(370)](),this[n(300)]=o[n(374)],this[n(314)][n(279)]=this[n(300)],await this[n(396)](t,o,n(313))}else await this[n(274)](o,t);this[n(264)](),this[n(316)]=!0}[ao(264)](){const t=ao,e=this[t(144)][t(403)][t(158)](Qn),n=this[t(144)][t(403)][t(158)](pr),r=e[t(306)][t(158)](this[t(320)]);r&&r[t(323)]>1?n[t(220)]():this[t(346)](e,t(202)+this[t(320)],()=>{const r=t;2===e[r(306)][r(158)](this[r(320)])[r(323)]&&n[r(220)]()})}async[ao(165)](t,e,n,r){const s=ao;if(!this[s(145)]&&this[s(404)][s(279)]==e){const t=this[s(363)](n,r);await this[s(170)](t),this[s(146)](t,e,n[s(266)])||this[s(222)](s(339))}}async[ao(199)](){const t=ao;this[t(190)]();const{locale:e}=this[t(144)];let n;try{n=await this[t(394)][t(221)]()}catch{const n=mr(e,t(393));return void this[t(301)](n)}const r=n[t(192)]||n[t(153)];if(this[t(348)]!==r[t(266)]){const n=mr(e,t(205));return void this[t(301)](n)}await this[t(298)](this[t(144)][t(278)][t(312)][t(361)][t(383)](),!0)}[ao(190)](){const t=ao;this[t(394)][t(184)](),this[t(377)]=[],clearTimeout(this[t(197)]),this[t(276)](this[t(394)])}[ao(291)](t){const e=ao,n=this[e(144)][e(403)][e(158)](Qn);this[e(346)](n,e(202)+this[e(320)],(t,{session:r})=>{const s=e;if(r.id===n[s(371)]){t[s(373)]();const e=this[s(144)][s(403)][s(324)](s(206))&&this[s(144)][s(403)][s(158)](s(206));let n=r[s(157)];e&&e[s(215)]&&(n=n[s(272)](t=>s(366)!==t)),this[s(144)][s(403)][s(158)](s(233))[s(232)](n,this[s(320)])}}),n[e(148)](this[e(320)],t)}[ao(282)](){const t=ao,e=this[t(144)][t(269)][t(367)];this[t(144)][t(269)][t(367)]=(...r)=>{const s=t;if(!r[r[s(323)]-1][s(191)])throw new n.CKEditorError(s(154),this);e[s(386)](this[s(144)][s(269)],r)}}[ao(362)](){const t=ao;this[t(144)][t(269)].on(t(230),(e,[r])=>{const o=t;if(this[o(404)][o(279)])throw new n.CKEditorError(o(168),this);e[o(187)](),this[o(360)]();const i=this[o(144)][o(334)][o(158)](o(391)),a=this[o(219)](r,i);0==a[o(323)]&&a[o(173)](new s.NoOperation(0)),e[o(277)]=this[o(298)](a)[o(259)](()=>{const t=o;this[t(144)][t(403)][t(158)](zn)[t(268)](this),this[t(144)][t(269)][t(229)](t(164))})[o(252)](t=>this[o(222)](o(185),t))[o(350)](()=>this[o(209)]())},{priority:t(356)}),this[t(144)].on(t(178),async(e,[n,r])=>{const s=t;e[s(187)]();const o=this[s(144)][s(278)][s(312)][s(284)](n);if(!this[s(247)][s(324)](n)){const t=r&&r[s(269)]?r[s(269)]:"",e=r&&r[s(258)]?r[s(258)]:{};await this[s(401)](n,t,e)}this[s(144)][s(278)][s(317)]({isUndoable:!1},()=>{const t=s;o[t(166)]=!0,this[t(144)][t(278)][t(312)][t(297)][t(228)](o)})},{priority:t(356)})}async[ao(170)](t){const e=ao,n=this[e(144)][e(403)][e(158)](Fn.Users),{connection:r}=this[e(144)][e(403)][e(158)](zn),s=new Set;for(const r of t){const t=r[e(201)];t&&!n[e(159)](t)&&s[e(161)](t)}if(0===s[e(245)])return;const o=await b[e(287)](r,Array[e(240)](s));for(const t of o)n[e(159)](t.id)||n[e(246)](t)}[ao(219)](t,e={}){const r=ao,o=this[r(144)][r(278)],i=[];let a=0;const c=r(341)==typeof t?{main:t}:t;for(const t of Object[r(253)](c)){if(!this[r(404)][r(310)][r(324)](t))throw new n.CKEditorError(r(328),this);const e=this[r(144)][r(269)][r(218)](c[t]),u=this[r(404)][r(284)](t),d=new s.InsertOperation(o[r(381)](u,0),e,a++);i[r(173)](d);for(const[t,n]of e[r(261)]){const e=o[r(236)](o[r(375)](u,n[r(176)][r(364)][r(225)]()),o[r(375)](u,n[r(359)][r(364)][r(225)]())),c=new s.MarkerOperation(t,null,e,o[r(261)],!0,a++);i[r(173)](c)}}if(e)for(const[t,c]of Object[r(392)](e)){const e=o[r(312)][r(284)](t);if(!e)throw new n.CKEditorError(r(402),null);for(const[t,n]of Object[r(392)](c))if(null!==n){const o=new s.RootAttributeOperation(e,t,null,n,a++);i[r(173)](o)}}return i}async[ao(401)](t,e,n){const r=ao;this[r(219)]({[t]:e},{[t]:n})[r(358)]((t,e)=>{const n=r;t[n(311)]=this[n(404)][n(279)]+e,t[n(156)]=!0,this[n(322)](t)}),this[r(273)](),await this[r(352)]()}async[ao(274)](t,e){const n=ao;let r;this[n(300)]=t[n(374)];const s=t[n(195)]&&!t[n(378)],o=s?0:t[n(269)][n(311)];if(e[n(358)](e=>{const r=n;e[r(156)]=!0,e[r(299)]=t[r(231)],e[r(201)]=null}),s)r=e,this[n(336)](r,s);else{if(t[n(378)]){const e=this[n(219)](t[n(378)]);this[n(404)][n(361)][n(279)]=-e[n(323)],e[n(358)](r=>{const s=n;r[s(311)]-=e[s(323)],r[s(299)]=t[s(231)],r[s(156)]=!0,r[s(201)]=null}),this[n(336)](e,!0),this[n(314)][n(279)]=-e[n(323)]+this[n(300)],this[n(326)](e)}this[n(404)][n(361)][n(279)]=o,r=this[n(363)](t[n(269)],t[n(213)]),await this[n(170)](r),this[n(336)](r,s)}t[n(266)]&&(this[n(250)][n(294)](r,t[n(266)]),this[n(348)]=t[n(266)]),this[n(314)][n(279)]=o+this[n(300)],this[n(326)](r),e[n(272)](t=>{const e=n,r=this[e(295)](t);return r&&!this[e(247)][e(324)](r)})[n(358)]((t,e)=>{const r=n;t[r(311)]=this[r(404)][r(279)]+e,this[r(322)](t)}),this[n(182)]()?(this[n(234)]=0,this[n(273)](!0),await this[n(352)]()):(this[n(145)]=!1,this[n(209)]())}[ao(222)](t,e){const r=ao,s=e&&e[r(376)];if(s&&s[r(244)](r(150)))throw e;const o=this[r(144)][r(403)][r(158)](zn);throw this[r(145)]=!0,o[r(184)](),this[r(144)][r(254)](r(203)),new n.CKEditorError(t,this[r(144)],s?{originalError:s}:void 0)}[ao(322)](t){const e=ao;this[e(162)][e(324)](t)||(this[e(162)][e(161)](t),this[e(377)][e(173)](t),this[e(207)]||e(398)==t[e(337)]&&!t[e(347)]||this[e(360)]())}[ao(273)](t=!1){const e=ao;!t&&this[e(145)]||(this[e(145)]=!0,clearTimeout(this[e(197)]),this[e(197)]=setTimeout(()=>{const t=e;this[t(152)]()[t(259)](e=>{const n=t;e&&(this[n(209)](),this[n(145)]=!1)})[t(252)](e=>{const n=t;this[n(209)](),this[n(145)]=!1,function(t){const e=n;return t[e(376)][e(244)](e(267))||t[e(376)][e(244)](e(211))||t[e(376)][e(244)](e(399))}(e)||this[n(222)](e[n(376)],e)})},this[e(234)]))}[ao(352)](){return new Promise(t=>{const e=co;this.on(e(321),()=>{t()})})}async[ao(152)](){const t=ao,e=this[t(144)][t(403)][t(158)](pr);if(this[t(224)]()&&(e[t(220)](),this[t(194)]=!1),!this[t(182)]())return!0;const n=[...this[t(377)]];for(const e of n)e[t(405)]=this[t(404)][t(361)][t(333)](e);const r=this[t(250)][t(260)](n),s=lo++,o=this[t(319)](n),i=await this[t(394)][t(308)](o,o[t(311)],r);try{return await this[t(396)](n,i,s)}catch(e){return this[t(222)](t(169),e)}}async[ao(396)](t,e,n){const r=ao;if(r(271)in e)throw e[r(271)];let s=!1;if(e[r(195)]){e[r(266)]&&(this[r(348)]=e[r(266)]),this[r(377)]=this[r(377)][r(272)](e=>!t[r(351)](e));for(const n of t)n[r(299)]=r(307)in e&&e[r(307)]||void 0;fo(t,e[r(279)]-t[r(323)]),this[r(326)](t);const n=t[r(272)](t=>{const e=r;if(!t[e(156)])return!1;const n=this[e(295)](t);return n&&!this[e(247)][e(324)](n)});fo(n,this[r(404)][r(279)]),this[r(336)](n),s=!0,this[r(234)]=this[r(155)]}else{const t=this[r(363)](e[r(269)],e[r(213)])[r(272)](t=>t[r(311)]>=this[r(167)]);t[r(358)](t=>this[r(288)](t)),this[r(377)]=this[r(377)][r(272)](t=>!t[r(156)]||!this[r(247)][r(324)](this[r(295)](t))),this[r(377)][r(323)]&&fo(this[r(377)],this[r(377)][0][r(311)]),await this[r(170)](t),s=this[r(146)](t,e[r(279)],e[r(266)]),this[r(234)]=Math[r(329)](this[r(234)]/2)}return s?!this[r(182)]()||(this[r(273)](!0),!1):this[r(222)](r(183))}[ao(146)](t,e,n){const r=ao;try{const o={document:this[r(404)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformOperationSets)(t,this[r(377)],o);fo(i,this[r(404)][r(279)]),fo(a,e);for(const t of i){const e=c[r(158)](t);t[r(201)]=e?e[r(201)]:null}n&&(this[r(250)][r(294)](t,n),this[r(348)]=n),this[r(377)]=[...a],this[r(336)](i),this[r(326)](t)}catch(t){return console[r(271)](t),!1}return!0}[ao(336)](t,e=!1){const n=ao;this[n(144)][n(278)][n(317)]({isUndoable:!1,isLocal:!1},e=>{const r=n;for(const n of t)this[r(162)][r(161)](n),this[r(288)](n),e[r(379)][r(270)](n),this[r(144)][r(278)][r(147)](n)})}[ao(288)](t){const e=ao,n=this[e(295)](t);n&&this[e(247)][e(161)](n)}[ao(295)](t){const e=ao;let n,r;switch(t[e(337)]){case e(262):n=t[e(340)][e(309)];break;case e(398):if(r=t[e(286)],!r)return null;n=r[e(309)];break;case e(180):n=t[e(309)];break;case e(327):n=t[e(349)];break;case e(255):n=t[e(216)][e(309)];break;default:return null}return n[e(265)]}[ao(326)](t){const e=ao;t[e(358)](t=>{const n=e,r=t[n(305)]();r[n(201)]=t[n(201)],r[n(156)]=!!t[n(156)],r[n(299)]=t[n(299)],r[n(311)]+=this[n(300)],t[n(223)]&&this[n(175)][n(161)](r),this[n(314)][n(270)](r)})}[ao(301)](t){const e=ao,n=this[e(144)][e(403)][e(158)](e(174)),r=this[e(144)][e(227)];t||(t=mr(r,e(214))),n[e(204)](t,{title:mr(r,e(177)),namespace:e(263)}),this[e(289)]=!0,clearTimeout(this[e(197)]),this[e(377)]=[],this[e(144)][e(403)][e(158)](zn)[e(184)]()}[ao(360)](){const t=ao;this[t(207)]||(this[t(207)]=this[t(144)][t(403)][t(158)](e.PendingActions)[t(161)](mr(this[t(144)][t(227)],t(330))))}[ao(209)](){const t=ao;this[t(207)]&&(this[t(144)][t(403)][t(158)](e.PendingActions)[t(171)](this[t(207)]),this[t(207)]=null)}[ao(319)](t){const e=ao,n=t[e(387)](t=>t[e(292)]());return this[e(251)][e(280)](n)}[ao(363)](t,e){const n=ao;return this[n(251)][n(345)](t)[n(387)]((t,r)=>{const o=n,i=o(230)==e[r][o(337)];if(o(390)==t[o(283)]){const e=t[o(340)][o(309)];!this[o(404)][o(284)](e)&&(this[o(404)][o(344)](o(304),e)[o(257)]=!1)}const a=s.OperationFactory[o(285)](t,this[o(404)]);return a[o(405)]=t[o(405)],a[o(156)]=i,a[o(201)]=i?null:e[r][o(353)],a[o(223)]=o(237)===e[r][o(337)],a[o(299)]=e[r][o(299)],a})}[ao(212)](){const t=ao;this[t(194)]=!0,this[t(224)]()?this[t(273)]():this[t(194)]=!1}[ao(224)](){const t=ao,e=this[t(144)][t(403)][t(158)](Qn)[t(306)][t(158)](this[t(320)]);return!this[t(144)][t(357)]&&!!e&&e[t(323)]>1&&this[t(194)]}[ao(182)](){const t=ao;return this[t(377)][t(323)]>0||this[t(224)]()}}class ho extends Error{}function fo(t,e){const n=ao;for(const r of t)r[n(311)]=e++}class mo{[ao(210)];[ao(149)];constructor(t){const e=ao;this[e(210)]=t,this[e(149)]=new WeakMap}[ao(260)](t){const e=ao;let r=t[e(323)];for(;r--;){const s=t[r];if(!this[e(210)][e(324)](s)){if(!this[e(149)][e(324)](s)){const t=(0,n.uid)()[e(225)](1,18);this[e(149)][e(367)](s,t)}return this[e(149)][e(158)](s)}}}[ao(294)](t,e){const n=ao;if(!e)return;let r=t[n(323)];for(;r--;){const s=t[r];this[n(210)][n(324)](s)||this[n(149)][n(367)](s,e)}}}var yo=bo;function go(){var t=["RealTimeCollaborativeEditing","2680381VmldWS","10PZkOGz","188BnVRsk","7211652SxDRqc","4231TRiSrU","3851442KbOBOJ","42nMcIeg","requires","isOfficialPlugin","9099009FaBHzA","30432RIIfbh","26JLcbpI","315paNOVM","209012jXKMgm","8ICCgfK","isPremiumPlugin","pluginName"];return(go=function(){return t})()}function bo(t,e){var n=go();return(bo=function(t,e){return n[t-=179]})(t,e)}!function(t){for(var e=bo,n=t();;)try{if(588644===-parseInt(e(193))/1*(-parseInt(e(191))/2)+-parseInt(e(195))/3*(parseInt(e(184))/4)+-parseInt(e(183))/5*(-parseInt(e(181))/6)+parseInt(e(194))/7+-parseInt(e(185))/8*(-parseInt(e(180))/9)+-parseInt(e(190))/10*(-parseInt(e(189))/11)+-parseInt(e(192))/12*(parseInt(e(182))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(go);class Io extends e.Plugin{static get[yo(196)](){return[po]}static get[yo(187)](){return yo(188)}static get[yo(179)](){return!0}static get[yo(186)](){return!0}}const Oo=So;function vo(){const t=["commentThreadRemoved","resolveCommentThread","update","unregister","14izSSwN","mySessionId","_terminateService","disconnect","size","pluginName","getMany","_connectService","_fetchMissingUsersForThreads","cloudservicescommentsadapter-disconnect-not-exist","96904VOPVWL","commentThreadResolved","commentThreadUpdated","addComment","remove","cloud-services-internal-error: Request timeout.","startsWith","message","add","map","commentId","isPremiumPlugin","cloud-services-internal-error: Not connected.","delete","resolve","getComment","set","commentThreadAdded","commentThreadReopened","CommentsRepository","deletedAt","updateCommentThread","cloudservicescommentsadapter-connect-already-connected","attributes","404","getUser","isOfficialPlugin","reconnect","getCommentThread","init","updateComment","cloudservicescommentsadapter-service-not-exist","9311380DYZXlf","48kuXvUZ","CommentsService","sessionAdd:","reopen","setPermissions","destroy","get","assign","authorId","Permissions","_setUpService","comments","_services","23662neptrK","createdAt","205lGEaEg","adapter","catch","getCommentThreads","resolvedAt","has","connect","register","from","code","listenTo","keys","reopenCommentThread","commentRemoved","cloud-services-internal-error: Comments Service is not connected.","1572096pFrHuo","context","commentAdded","permissions","addToReconnectionStack","_getService","off","plugins","removeCommentThread","addUser","CloudServicesCommentsAdapter","content","commentThreadId","config","collaboration.channelId","removeComment","1692248PFCZZp","userId","resolvedBy","getConnectedSessions","1315440NuJQNW","454746qsTUmh","commentUpdated","requires","addCommentThread"];return(vo=function(){return t})()}!function(t){const e=So,n=t();for(;;)try{if(539029===-parseInt(e(338))/1*(parseInt(e(325))/2)+parseInt(e(355))/3+parseInt(e(292))/4*(-parseInt(e(340))/5)+parseInt(e(274))/6+-parseInt(e(282))/7*(-parseInt(e(269))/8)+parseInt(e(273))/9+parseInt(e(324))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(vo);class wo extends e.ContextPlugin{static[Oo(326)]=(()=>Ln)();[Oo(337)];static get[Oo(276)](){return[zn,Oo(311),Qn,Fn.Users]}static get[Oo(287)](){return Oo(365)}static get[Oo(318)](){return!0}static get[Oo(303)](){return!0}constructor(t){const e=Oo;super(t),this[e(337)]=new Map}async[Oo(321)](){const t=Oo,n=this[t(356)],r=n[t(362)][t(331)](t(311));if(n[t(362)][t(331)](zn)[t(359)](this),r[t(341)]={addCommentThread:async({channelId:e,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=t,u=await this[c(360)](e)[c(277)]({commentThreadId:n,comments:r[c(301)](t=>function(t,e,n){const r=c;return{commentThreadId:n,commentId:t[r(302)],userId:t[r(333)],content:t[r(366)],documentId:e,createdAt:t[r(339)],attributes:t[r(315)]||{}}}(t,e,n)),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(342)](Ao);return{threadId:u[c(367)],comments:u[c(336)]}},getCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(360)](e)[r(320)](n)[r(342)](ko)[r(342)](Ao);return s?s[r(312)]?null:(await this[r(290)]([s]),{threadId:s[r(367)],comments:s[r(336)][r(301)](To),context:s[r(356)],resolvedAt:s[r(344)],resolvedBy:s[r(271)],attributes:s[r(315)]||{}}):null},updateCommentThread:async({channelId:e,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[t(360)](e)[t(313)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[t(342)](ko)[t(342)](Ao),resolveCommentThread:async({channelId:e,threadId:n})=>{const r=t,s=await this[r(360)](e)[r(279)](n)[r(342)](ko)[r(342)](Ao);return{threadId:s[r(367)],resolvedAt:s[r(344)],resolvedBy:s[r(271)]}},reopenCommentThread:async({channelId:e,threadId:n})=>this[t(360)](e)[t(352)](n)[t(342)](ko)[t(342)](Ao),removeCommentThread:({channelId:e,threadId:n})=>this[t(360)](e)[t(363)](n)[t(342)](ko)[t(342)](Ao),addComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(360)](e)[t(295)](n,r,s,o)[t(342)](Ao),updateComment:({channelId:e,threadId:n,commentId:r,content:s,attributes:o})=>this[t(360)](e)[t(322)](n,r,s,o)[t(342)](ko)[t(342)](Ao),removeComment:({channelId:e,threadId:n,commentId:r})=>this[t(360)](e)[t(370)](n,r)[t(342)](ko)[t(342)](Ao)},n instanceof e.Context){const e=n[t(368)][t(331)](t(369)),r=n[t(362)][t(331)](Qn);await this[t(335)](e);const s=await this[t(337)][t(331)](e)[t(272)]();this[t(350)](r,t(327)+e,(n,{session:s})=>{const o=t;s.id===r[o(283)]&&(n[o(361)](),this[o(356)][o(362)][o(331)](o(334))[o(329)](s[o(358)],e))}),r[t(347)](e,s)}}async[Oo(335)](t){const e=Oo;if(this[e(337)][e(345)](t))throw new n.CKEditorError(e(314),null,{channelId:t});const r=this[e(356)][e(362)][e(331)](e(311)),s=new(wo[e(326)])(t);this[e(337)][e(308)](t,s),this[e(350)](s,e(309),(t,n)=>{const s=e,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(320)](o)||r[s(277)]({threadId:o,channelId:i,comments:l?l[s(301)](To):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})}),this[e(350)](s,e(294),(t,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=e;r[c(320)](n)&&r[c(313)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})}),this[e(350)](s,e(293),(t,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=e,a=r[i(320)](n);a&&a[i(306)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})}),this[e(350)](s,e(310),(t,{commentThreadId:n})=>{const s=e,o=r[s(320)](n);o&&o[s(328)]({isFromAdapter:!0})}),this[e(350)](s,e(278),(t,{commentThreadId:n})=>{const s=e,o=r[s(320)](n);o&&o[s(296)]({isFromAdapter:!0})}),this[e(350)](s,e(357),(t,n)=>{const s=e,o=n[s(367)],i=r[s(320)](o);i&&i[s(295)]({...To(n),isFromAdapter:!0})}),this[e(350)](s,e(275),(t,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=e,c=r[a(320)](n);if(c){const t=c[a(307)](s);t&&t[a(280)]({content:o,attributes:i,isFromAdapter:!0})}}),this[e(350)](s,e(353),(t,{commentThreadId:n,commentId:s})=>{const o=e,i=r[o(320)](n);if(i){const t=i[o(307)](s);t&&t[o(296)]({isFromAdapter:!0})}}),await this[e(289)](t)}[Oo(330)](){const t=Oo;if(this[t(356)]instanceof e.Context){const e=this[t(356)][t(368)][t(331)](t(369));this[t(284)](e)}}[Oo(284)](t){const e=Oo;if(!this[e(337)][e(345)](t))throw new n.CKEditorError(e(291),null,{channelId:t});this[e(360)](t)[e(285)](),this[e(337)][e(305)](t)}async[Oo(319)](){const t=Oo;for(const e of this[t(337)][t(351)]())await this[t(289)](e);if(this[t(356)]instanceof e.Context){const e=this[t(356)][t(368)][t(331)](t(369)),n=this[t(356)][t(362)][t(331)](Qn);n[t(281)](e);const r=await this[t(337)][t(331)](e)[t(272)]();n[t(347)](e,r)}}async[Oo(289)](t){const e=Oo,{connection:n}=this[e(356)][e(362)][e(331)](zn),r=this[e(356)][e(362)][e(331)](e(311)),s=this[e(337)][e(331)](t),o=await s[e(346)](n);await this[e(290)](o);const i=new Set(Array[e(348)](r[e(343)]({channelId:t}),t=>t.id));for(const t of o)t[e(312)]||i[e(305)](t[e(367)]);for(const t of i)r[e(320)](t)[e(296)]({isFromAdapter:!0});for(const n of o){let s=r[e(320)](n[e(367)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[e(277)]({channelId:t,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[e(348)](s[e(336)],t=>t.id));for(const t of n[e(336)])p[e(305)](t[e(302)]);for(const t of p)s[e(307)](t)[e(296)]({isFromAdapter:!0});for(const t of n[e(336)]){const n=s[e(307)](t[e(302)]);n?n[e(366)]!==t[e(366)]&&n[e(280)]({content:t[e(366)],isFromAdapter:!0}):s[e(295)](Object[e(332)](To(t),{isFromAdapter:!0}))}}}[Oo(360)](t){const e=Oo;if(!this[e(337)][e(345)](t))throw new n.CKEditorError(e(323),null,{channelId:t});return this[e(337)][e(331)](t)}async[Oo(290)](t){const e=Oo,n=this[e(356)][e(362)][e(331)](Fn.Users),{connection:r}=this[e(356)][e(362)][e(331)](zn),s=new Set;for(const{resolvedBy:r,comments:o}of t){r&&!n[e(317)](r)&&s[e(300)](r);for(const{userId:t}of o)n[e(317)](t)||s[e(300)](t)}if(0===s[e(286)])return;const o=await b[e(288)](r,Array[e(348)](s));for(const t of o)n[e(317)](t.id)||n[e(364)](t)}}function So(t,e){const n=vo();return(So=function(t,e){return n[t-=269]})(t,e)}async function ko(t){const e=Oo;if(e(316)!==t[e(349)])throw t}function Ao(t){const e=Oo;if((n=t)[e(299)][e(298)](e(354))||n[e(299)][e(298)](e(304))||n[e(299)][e(298)](e(297)))return new Promise(()=>{});var n;throw t}function To(t){const e=Oo;return{threadId:t[e(367)],commentId:t[e(302)],content:t[e(366)],createdAt:t[e(339)],authorId:t[e(270)],attributes:t[e(315)]||{}}}const _o=Po;function Co(){const t=["catch","suggestionUpdated","config","469646vWtcJa","listenTo","originalSuggestionId","168yclQeU","getMany","addToReconnectionStack","3751132lvCdQc","plugins","TrackChangesEditing","859613mfLCDl","7764745nAEXrP","10wYpzio","update","from","5872080HXbcni","connection","4swDSil","isConnected","addUser","size","CloudServicesTrackChangesAdapter","data","adapter","startsWith","get","then","attributes","set","delete","message","getUser","cloud-services-internal-error: Request timeout.","addSuggestionData","pluginName","24KXoWzL","off","values","connect","requires","state","1849644NLMfVL","editor","_fetchMissingUsersForThreads","hasSuggestion","type","_bufferedRequests","getSuggestion","9ObmTsr","cloud-services-internal-error: Not connected.","add","collaboration.channelId","connected","_saved","_trackChangesService","217752MrRHfp","find","open","_waitForServiceReady","init","TrackChangesService","isPremiumPlugin","isOfficialPlugin","reconnect"];return(Co=function(){return t})()}function Po(t,e){const n=Co();return(Po=function(t,e){return n[t-=168]})(t,e)}!function(t){const e=Po,n=t();for(;;)try{if(963697===parseInt(e(188))/1+-parseInt(e(179))/2*(parseInt(e(226))/3)+parseInt(e(195))/4*(parseInt(e(189))/5)+-parseInt(e(193))/6+-parseInt(e(182))/7*(parseInt(e(233))/8)+-parseInt(e(219))/9*(-parseInt(e(190))/10)+-parseInt(e(185))/11*(-parseInt(e(213))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Co);class Eo extends e.Plugin{static[_o(172)]=(()=>Xe)();[_o(224)];[_o(232)];static get[_o(217)](){return[wo,_o(187),zn]}static get[_o(212)](){return _o(199)}static get[_o(174)](){return!0}static get[_o(173)](){return!0}constructor(t){const e=_o;super(t);const n=this[e(220)][e(178)][e(203)](e(229));this[e(224)]=new Map,this[e(232)]=new(Eo[e(172)])(n)}[_o(171)](){const t=_o,e=this[t(220)][t(186)][t(203)](zn),n=this[t(220)][t(186)][t(203)](t(187));return n[t(201)]={getSuggestion:async e=>{const n=t;await this[n(170)]();const r=await this[n(232)][n(203)](e)[n(176)](Do);return await this[n(221)]([r]),r},addSuggestion:async({id:e,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=t;await this[i(170)]();const a={id:e,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(232)][i(228)](e,n,r,s,o)[i(176)](t=>{if(jo(t))return new Promise(t=>{const n=Po;this[n(224)][n(206)](e,{resolve:t,suggestionData:a})});throw t});return this[i(224)][i(207)](e),c},updateSuggestion:async(e,n)=>{const r=t;if(await this[r(170)](),r(169)!==n[r(218)])return this[r(232)][r(191)](e,n)[r(176)](Do)}},this[t(180)](this[t(232)],t(177),(e,r)=>{const s=t;n[s(222)](r.id)&&(n[s(225)](r.id)[s(205)]=r[s(205)])}),this[t(232)][t(216)](e[t(194)])[t(204)](r=>(e[t(184)](this),this[t(221)](r)[t(204)](()=>{const e=t;for(const t of r)n[e(211)](t)[e(231)]=!0})))}async[_o(175)](){const t=_o,e=this[t(220)][t(186)][t(203)](t(187)),{connection:n}=this[t(220)][t(186)][t(203)](zn),r=await this[t(232)][t(216)](n);await this[t(221)](r);for(const{suggestionData:e,resolve:n}of this[t(224)][t(215)]()){let s=r[t(168)](t=>t.id===e.id);s||(s=await this[t(232)][t(228)](e.id,e[t(223)],e[t(200)],e[t(181)])),n(s)}for(const n of r)e[t(222)](n.id)||e[t(211)](n)}async[_o(170)](){const t=_o;this[t(232)][t(196)]||await new Promise(e=>{const n=t;this[n(180)](this[n(232)],n(230),t=>{t[n(214)](),e()})})}async[_o(221)](t){const e=_o,n=this[e(220)][e(186)][e(203)](Fn.Users),{connection:r}=this[e(220)][e(186)][e(203)](zn),s=new Set;for(const{authorId:r}of t)n[e(209)](r)||s[e(228)](r);if(0===s[e(198)])return;const o=await b[e(183)](r,Array[e(192)](s));for(const t of o)n[e(209)](t.id)||n[e(197)](t)}}function Do(t){if(jo(t))return new Promise(()=>{});throw t}function jo(t){const e=_o;return t[e(208)][e(202)](e(227))||t[e(208)][e(202)](e(210))}const xo=Ro;function Ro(t,e){const n=No();return(Ro=function(t,e){return n[t-=474]})(t,e)}function No(){const t=["7rzAGKK","once","109367ZaykDE","340749awdtpG","ready","data","isPremiumPlugin","3806360SZBSJK","CommentsEditing","change:state","100kjadao","Comments","collaboration.channelId","get","switchReadOnly","plugins","init","connected","CommentsRepository","1591815RXXdAs","destroy","6230754EYjhsI","config","RealTimeCollaborativeComments","listenTo","isOfficialPlugin","4BcOeQw","_terminateService","isThreadsLoadingPaused","editor","_setUpService","requires","4883384YJIzDn","pluginName","3159745DgwLOI"];return(No=function(){return t})()}!function(t){const e=Ro,n=t();for(;;)try{if(625138===parseInt(e(482))/1*(-parseInt(e(506))/2)+parseInt(e(499))/3+parseInt(e(487))/4+parseInt(e(479))/5+-parseInt(e(501))/6+parseInt(e(480))/7*(-parseInt(e(477))/8)+-parseInt(e(483))/9*(-parseInt(e(490))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(No);class Vo extends e.Plugin{static get[xo(476)](){return[xo(491),wo,Io,zn]}static get[xo(478)](){return xo(503)}static get[xo(505)](){return!0}static get[xo(486)](){return!0}[xo(496)](){const t=xo,e=this[t(474)][t(495)][t(493)](zn),n=this[t(474)][t(495)][t(493)](t(488)),r=this[t(474)][t(495)][t(493)](wo);return this[t(474)][t(485)][t(481)](t(484),()=>{const r=t;this[r(504)](e,r(489),(t,e,s)=>{const o=r;n[o(508)]=o(497)!==s})}),this[t(504)](e,t(489),(e,n,r)=>{const s=t;this[s(474)][s(495)][s(493)](s(498))[s(494)](s(497)!==r)}),r[t(475)](this[t(474)][t(502)][t(493)](t(492)))}[xo(500)](){const t=xo;this[t(474)][t(495)][t(493)](wo)[t(507)](this[t(474)][t(502)][t(493)](t(492))),super[t(500)]()}}var Mo=Uo;function Bo(){var t=["2597016ujVIRO","8273700TACnFP","requires","TrackChanges","4991580wwUsvz","isPremiumPlugin","1744ZNKLsd","25649YgtSCw","isOfficialPlugin","3kdeQfD","6687329ibHPoE","pluginName","3748604upyRyq","5lREKfv","19439daLKlb","24jsRsDw","68DSfQXu","RealTimeCollaborativeTrackChanges"];return(Bo=function(){return t})()}function Uo(t,e){var n=Bo();return(Uo=function(t,e){return n[t-=402]})(t,e)}!function(t){for(var e=Uo,n=t();;)try{if(532713===parseInt(e(419))/1*(parseInt(e(410))/2)+parseInt(e(403))/3*(-parseInt(e(406))/4)+parseInt(e(407))/5*(-parseInt(e(412))/6)+-parseInt(e(408))/7*(parseInt(e(418))/8)+parseInt(e(413))/9+-parseInt(e(416))/10+parseInt(e(404))/11*(parseInt(e(409))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Bo);class Jo extends e.Plugin{static get[Mo(414)](){return[Vo,Eo,Mo(415)]}static get[Mo(405)](){return Mo(411)}static get[Mo(402)](){return!0}static get[Mo(417)](){return!0}}const qo=Lo;function Lo(t,e){const n=Go();return(Lo=function(t,e){return n[t-=278]})(t,e)}function Go(){const t=["624opaAXj","max","RevisionTracker","_waitForServiceReady","addUser","isOfficialPlugin","connection","once","CloudServicesRevisionHistoryAdapter","listenTo","marker","_getLatestVersionFromServerOperations","off","pluginName","type","repository","sessionId","cloudServices.bundleVersion","CONNECTED","buildRevisionData","_createCurrentRevision","_fetchMissingUsers","message","_handleReconnectionError","config","isConnected","1009017aUauMX","currentRevision","245vDtlbZ","adapter","isPremiumPlugin","7244451XFPRzf","setSource","has","plugins","_startingVersion","length","fromVersion","destroy","10190136KxAIbt","size","reInit","getRevisions","revisionsUpdated","_update","connected","map","_revisionHistoryService","140936GzAICu","getRevision","_preventResendingRevisionData","_oldOffset","add","isEnabled","authorsIds","_isConnected","117677yXGEBE","remove","_offset","_revisionDataBuilder","bind","RevisionHistoryService","_fixRevision","521780yarOlZ","isBundleUploaded","keys","requires","creatorId","RevisionHistory","cloud-services-internal-error: Not connected.","getUser","addToReconnectionStack","get","createdAt","addRevisionData","toVersion","catch","editor","_bufferedUpdates","from","reconnect","data","baseVersion","_revisions","cloud-services-internal-error: Revision History Service is not connected.","_isPendingUpdate","serverHistory","_revisionTracker","getOperations","_getLatestVersion","_handleRevisionsUpdate","code","change:_isPendingUpdate","affectsData","reverse","then","updateRevisions","wrongRequestId","init","change:_isConnected","startsWith","setRevisionData","collaboration.channelId","sendBufferedUpdates","diffData","authors","_bufferUpdate","state","getMany","cloud-services-internal-error: Request timeout.","400","connect","720830NfVIaD","_lastRequestId","isEmptyCurrent"];return(Go=function(){return t})()}!function(t){const e=Lo,n=t();for(;;)try{if(988410===parseInt(e(370))/1+-parseInt(e(304))/2+parseInt(e(333))/3+parseInt(e(355))/4*(-parseInt(e(335))/5)+parseInt(e(307))/6*(parseInt(e(363))/7)+parseInt(e(346))/8+-parseInt(e(338))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Go);class Yo extends e.Plugin{static[qo(368)]=(()=>Ve)();[qo(305)];[qo(279)];[qo(354)];[qo(358)];static get[qo(373)](){return[zn,po,qo(375),Qn,Fn.Users]}static get[qo(320)](){return qo(315)}static get[qo(312)](){return!0}static get[qo(337)](){return!0}constructor(t){const e=qo;super(t);const n=this[e(384)][e(331)][e(379)](e(294));this[e(305)]=null,this[e(279)]=this[e(384)][e(341)][e(379)](e(309)),this[e(354)]=new(Yo[e(368)])(n)}async[qo(290)](){const t=qo,e=this[t(384)][t(341)][t(379)](po),r=e[t(278)],s=this[t(384)][t(341)][t(379)](zn);this[t(279)][t(339)]({history:r,getLatestVersion:()=>this[t(281)](),getCurrentRevisionId:()=>e[t(323)]});const o=this[t(384)][t(331)][t(379)](t(324))||n.version,i=await Ae[t(371)](s[t(313)],o);this[t(384)][t(341)][t(379)](t(375))[t(336)]={getRevision:async({revisionId:e})=>(await this[t(310)](),await this[t(354)][t(356)](e)),updateRevisions:async e=>{const n=t;await this[n(310)]();const r=this[n(279)][n(334)];if(i&&1===e[n(343)]&&e[0].id===r.id)return e;for(const t of e)t.id===r.id&&(t[n(306)]=t[n(344)]===t[n(382)]);return this[n(354)][n(288)](e,this[n(305)])[n(287)](t=>(this[n(305)]=t,e))[n(383)](t=>{const r=n;if(Ho(t)||r(302)===t[r(283)]&&void 0!==t[r(388)][r(289)]){for(const t of e)!this[r(279)][r(322)][r(356)](t.id)||this[r(279)][r(298)](t.id,t,!1);if(Ho(t))throw t;return e}throw t})}},this[t(316)](this[t(354)],t(350),(e,{revisionsData:n,requestId:r})=>{const s=t;Math[s(308)](...n[s(353)](t=>t[s(382)]))>this[s(318)]()-1?this[s(281)]()[s(287)](()=>{this[s(282)](n,r)}):this[s(282)](n,r)});const{revisions:a,requestId:c}=await this[t(354)][t(303)](s[t(313)]);s[t(378)](this),this[t(305)]=c,await this[t(328)](a);for(const e of a)this[t(279)][t(381)](e);this[t(316)](e,t(291),(n,r,s)=>{const o=t;s&&(this[o(358)]=e[o(365)],n[o(319)]())}),this[t(279)][t(367)](t(360)).to(s,t(299),e=>e===Ie[t(325)])}async[qo(387)](){const t=qo,e=this[t(384)][t(341)][t(379)](zn),n=this[t(384)][t(341)][t(379)](po),r=async()=>{const r=t,s=this[r(279)][r(334)],o=s.id,i=o!==n[r(323)];if(i){const t=n[r(365)]-this[r(358)],e=this[r(318)]();if(this[r(279)][r(366)][r(348)](),s[r(382)]+t!==e){const n=s[r(344)]+t,o=this[r(384)][r(341)][r(379)](Fn.Users),i=this[r(279)][r(326)]({revision:s,from:n,to:e});i.id=s.id;const a=i[r(361)][r(353)](t=>o[r(377)](t));s[r(351)]({...i,authors:a},!0),this[r(279)][r(298)](s.id,i,!0)}this[r(279)][r(342)]=e,s[r(382)]===s[r(344)]&&!this[r(279)][r(385)][r(340)](o)&&this[r(279)][r(322)][r(390)][r(364)](o),this[r(279)][r(327)](e)}const{revisions:a,requestId:c}=await this[r(354)][r(387)](e[r(313)],this[r(305)]);i&&a[r(343)]>0?n[r(330)]():(await this[r(328)](a),this[r(282)](a,c),this[r(279)][r(295)]())};return n[t(362)]?r():new Promise((e,s)=>{const o=t;n[o(314)](o(291),()=>{const t=o;r()[t(287)](e)[t(383)](s)})})}[qo(345)](){super[qo(345)]()}async[qo(310)](){const t=qo;this[t(354)][t(332)]||await new Promise(e=>{const n=t;this[n(316)](this[n(354)],n(352),t=>{t[n(319)](),e()})})}[qo(318)](){const t=qo,e=this[t(384)][t(341)][t(379)](po)[t(278)][t(280)]()[t(286)]();for(const n of e)if(t(317)!==n[t(321)]||n[t(285)])return n[t(389)]+1}[qo(281)](){const t=qo,e=this[t(384)][t(341)][t(379)](po);return new Promise(n=>{const r=t;e[r(392)]?e[r(314)](r(284),()=>{n(this[r(318)]())}):n(this[r(318)]())})}[qo(282)](t,e){const n=qo,r=this[n(279)][n(322)];this[n(305)]=e;for(const e of t){const t=r[n(356)](e.id);if(t){if((e[n(344)]||e[n(382)])&&(e[n(296)]=null),t===this[n(279)][n(334)]){const r=Math[n(308)](t[n(382)],e[n(382)]),s=Math[n(308)](t[n(344)],e[n(344)]);let o;t[n(382)]===e[n(382)]&&t[n(344)]===e[n(344)]?(o=!0,this[n(357)](e)):e[n(382)]===r&&e[n(344)]===s?o=!1:(t[n(382)]===r&&t[n(344)]===s||this[n(369)]({revision:t,from:s,to:r}),o=!0),o&&(delete e[n(344)],delete e[n(382)],delete e[n(296)],delete e[n(380)],delete e[n(361)])}this[n(279)][n(293)](e),this[n(357)](e)}else this[n(279)][n(381)](e)}const s=r[n(349)]();s[n(286)]();for(let t=0;t<s[n(343)]-1;t++){const e=s[t],r=s[t+1];if(e[n(344)]<r[n(382)]){const t=r[n(382)],s=Math[n(308)](t,e[n(382)]);this[n(369)]({revision:e,from:t,to:s})}}}[qo(369)]({revision:t,from:e,to:n}={}){const r=qo,s=this[r(384)][r(341)][r(379)](Fn.Users),o=this[r(279)][r(326)]({revision:t,from:e,to:n});o[r(297)]=o[r(361)][r(353)](t=>s[r(377)](t)),t[r(351)](o)}[qo(357)](t){const e=qo,n={};n.id=t.id;for(const r of Object[e(372)](t))"id"!==r&&(n[r]=void 0);this[e(279)][e(298)](n.id,n,!0)}async[qo(328)](t){const e=qo,n=this[e(384)][e(341)][e(379)](Fn.Users),{connection:r}=this[e(384)][e(341)][e(379)](zn),s=new Set;for(const n of t){for(const t of n[e(361)])i(t);n[e(374)]&&i(n[e(374)])}if(0===s[e(347)])return;const o=await b[e(300)](r,Array[e(386)](s));for(const t of o)n[e(377)](t.id)||n[e(311)](t);function i(t){const r=e;n[r(377)](t)||s[r(359)](t)}}}function Ho(t){const e=qo;return t[e(329)][e(292)](e(391))||t[e(329)][e(292)](e(376))||t[e(329)][e(292)](e(301))}var zo=Fo;function Fo(t,e){var n=Ko();return(Fo=function(t,e){return n[t-=118]})(t,e)}function Ko(){var t=["5347512WTkDKf","RevisionHistory","isPremiumPlugin","11014020EynqUB","6090GqTGFz","11247WkXBmq","536sNQtyi","isOfficialPlugin","RealTimeCollaborativeRevisionHistory","pluginName","464160nbNyok","147840OljvUi","6ypVETK","523368zBMSwL","requires"];return(Ko=function(){return t})()}!function(t){for(var e=Fo,n=t();;)try{if(370537===parseInt(e(129))/1+parseInt(e(131))/2+parseInt(e(123))/3*(-parseInt(e(124))/4)+parseInt(e(128))/5*(-parseInt(e(130))/6)+parseInt(e(122))/7+-parseInt(e(118))/8+parseInt(e(121))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ko);class Wo extends e.Plugin{static get[zo(132)](){return[zo(119),Yo,Io]}static get[zo(127)](){return zo(126)}static get[zo(125)](){return!0}static get[zo(120)](){return!0}}function Xo(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}const Qo=$o;function Zo(){const t=["3882270APLdHk","bindTemplate","usersCount","isHidden","43506TtrRXS","set","647998somMFf","ck-presence-list__users-counter__text","toString","listitem","setTemplate","_collapseAt","2727245AFUwsb","div","24354RGHAac","945978YcifOY","ck-presence-list__list-item","bind","ck-presence-list__counter--hidden","ck-presence-list__users-counter","2445472PXaKdX"];return(Zo=function(){return t})()}function $o(t,e){const n=Zo();return($o=function(t,e){return n[t-=342]})(t,e)}!function(t){const e=$o,n=t();for(;;)try{if(325101===parseInt(e(349))/1+-parseInt(e(347))/2+parseInt(e(358))/3+-parseInt(e(342))/4+parseInt(e(355))/5+parseInt(e(357))/6+-parseInt(e(343))/7)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Zo);class ti extends r.View{[Qo(354)];constructor(t,e=6){const n=Qo;super(t);const r=this[n(344)];this[n(348)](n(346),!0),this[n(348)](n(345),0),this[n(354)]=e,this[n(360)](n(346)).to(this,n(345),t=>t<e),this[n(353)]({tag:n(356),attributes:{class:["ck",n(359),r.if(n(346),n(361))],role:n(352)},children:[{tag:n(356),attributes:{class:["ck",n(362)]},children:[{tag:n(356),attributes:{class:["ck",n(350)]},children:[{text:r.to(n(345),t=>"+"+(t-this[n(354)]+2)[n(351)]())}]}]}]})}}const ei=ni;function ni(t,e){const n=si();return(ni=function(t,e){return n[t-=171]})(t,e)}!function(t){const e=ni,n=t();for(;;)try{if(521510===parseInt(e(195))/1+-parseInt(e(181))/2+-parseInt(e(180))/3+parseInt(e(207))/4*(parseInt(e(186))/5)+parseInt(e(184))/6+-parseInt(e(200))/7+parseInt(e(190))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(si);class ri extends r.View{[ei(178)];[ei(185)];constructor(t){const e=ei;super(t);const r=this[e(187)];this[e(178)]=this[e(189)](),this[e(185)]=new n.KeystrokeHandler,this[e(174)]({hasPopup:!1,isExpanded:!1}),this[e(173)]({tag:e(183),attributes:{"aria-haspopup":r.if(e(192)),"aria-expanded":r.to(e(182),t=>this[e(192)]&&String(t)),"aria-label":r.to(e(192),n=>mr(t,e(n?199:188))),role:e(202),tabindex:r.to(e(192),t=>!!t&&0),class:["ck",e(201)]},children:this[e(178)],on:{mouseenter:r.to(()=>this[e(191)](e(172))),mouseleave:r.to(t=>{const n=e,r=t,s=document[n(203)](n(179)),o=document[n(203)](n(204));s?.[n(197)](r[n(196)])||o?.[n(197)](r[n(196)])||this[n(191)](n(205))})}}),this.on(e(206),(t,n,r)=>{const s=e;this[s(171)]&&(r?this[s(171)][s(194)](s(177),String(this[s(182)])):this[s(171)][s(176)](s(177)))})}[ei(198)](){const t=ei;this[t(171)][t(198)]()}[ei(175)](){const t=ei;super[t(175)](),this[t(185)][t(193)](this[t(171)])}}function si(){const t=["items",".ck-presence-list__dropdown-list","1655739zQLDRK","1631674yzrEpw","isExpanded","div","83676OUTseU","keystrokes","80yriwim","bindTemplate","Connected users list","createCollection","9425752kkjSXH","fire","hasPopup","listenTo","setAttribute","550638MTbqWk","relatedTarget","contains","focus","Collapsed connected users list (press ENTER to open it)","490721Eubume","ck-presence-list__list","list","querySelector",".ck-balloon-panel_with-arrow","presencelist:hide","change:hasPopup","54140mbJQAX","element","presencelist:show","setTemplate","set","render","removeAttribute","aria-expanded"];return(si=function(){return t})()}var oi=__webpack_require__(190),ii={attributes:{"data-cke":!0}};ii.setAttributes=or(),ii.insert=rr().bind(null,"head"),ii.domAPI=er(),ii.insertStyleElement=ar();$n()(oi.A,ii);oi.A&&oi.A.locals&&oi.A.locals;const ai=ui;function ci(){const t=["36wGVHhI","div","ck-presence-list","bindTemplate","tooltipPosition","bind","567322nQYiRT","ck-presence-list--collapsed","ck-rounded-corners","counterView","listenTo","change","24870cmbFdf","2558584VilaWJ","ck-reset","4681990ImiFvA","3487636fkmtRo","1239274NaoLBV","inlineListView","locale","177474voQbAd","setTemplate","first","items","27qvHSdZ","isCollapsed","hasPopup","1075QCoror","set"];return(ci=function(){return t})()}function ui(t,e){const n=ci();return(ui=function(t,e){return n[t-=322]})(t,e)}!function(t){const e=ui,n=t();for(;;)try{if(680010===parseInt(e(339))/1+parseInt(e(322))/2*(parseInt(e(342))/3)+-parseInt(e(338))/4+-parseInt(e(349))/5*(-parseInt(e(334))/6)+parseInt(e(328))/7+-parseInt(e(335))/8+parseInt(e(346))/9*(-parseInt(e(337))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ci);class di extends r.View{[ai(331)];[ai(340)];constructor(t,e=6){const n=ai;super(t);const r=this[n(325)];this[n(350)](n(347),!0),this[n(331)]=new ti(this[n(341)],e),this[n(340)]=new ri(t),this[n(340)][n(327)](n(348)).to(this,n(347)),this[n(332)](this[n(340)][n(345)],n(333),()=>{const t=n;for(const e of this[t(340)][t(345)])e[t(326)]="s";this[t(340)][t(345)][t(344)]&&(this[t(340)][t(345)][t(344)][t(326)]="se")}),this[n(343)]({tag:n(323),attributes:{class:["ck",n(324),n(336),n(330),r.if(n(347),n(329))]},children:[this[n(340)]]})}}const li=hi;!function(t){const e=hi,n=t();for(;;)try{if(538217===parseInt(e(233))/1+-parseInt(e(244))/2*(-parseInt(e(228))/3)+-parseInt(e(241))/4*(parseInt(e(232))/5)+parseInt(e(251))/6*(parseInt(e(258))/7)+parseInt(e(245))/8*(parseInt(e(253))/9)+-parseInt(e(242))/10*(-parseInt(e(255))/11)+-parseInt(e(225))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(fi);class pi extends r.View{[li(243)];constructor(t,e){const n=li;super(t);const r=this[n(260)];this[n(243)]=new mi(t,e),this[n(239)]({tag:n(230),attributes:{tabindex:-1,role:n(222),class:["ck",n(263)],"aria-label":mr(t,n(248))},children:[this[n(243)]],on:{mouseleave:r.to(t=>{const e=n,r=t,s=document[e(246)](e(218)),o=document[e(246)](e(224));s?.[e(231)](r[e(229)])||o?.[e(231)](r[e(229)])||this[e(254)](e(250))})}})}}function hi(t,e){const n=fi();return(hi=function(t,e){return n[t-=217]})(t,e)}function fi(){const t=["resize","render","setTemplate","change","1617012oqlRYt","830570mQzEEy","listWrapperView","580658cbMBCA","16kpyXht","querySelector","clientHeight","Connected users list dropdown menu","element","presencelist:hide","432yKNFOp","listenTo","190134KWfOeE","fire","121iNlrwv","ariaLabelledBy","max","72310gXsuYH","items","bindTemplate","ck-reset","_isScrollable","ck-presence-list__dropdown-list","ck-list",".ck-presence-list__list","ck-presence-list__dropdown-list-wrapper_scrollable","set","checkIfScrollable","application","innerHeight",".ck-balloon-panel_with-arrow","11980080BddRLv","window","role","3DAuzLw","relatedTarget","div","contains","10CqPHbx","355095EXJVZv","scrollHeight","ariaLabel","ck-presence-list__dropdown-list-wrapper"];return(fi=function(){return t})()}class mi extends r.ListView{constructor(t,e){const r=li;super(t);const s=this[r(260)];this[r(220)](r(262),!1),this[r(239)]({tag:e?r(230):"ul",attributes:{class:["ck",r(261),r(217),r(236),s.if(r(262),r(219))],role:s.to(r(227)),"aria-label":s.to(r(235)),"aria-labelledby":s.to(r(256))},children:this[r(259)]}),this[r(252)](n.global[r(226)],r(237),()=>this[r(221)]()),this[r(259)].on(r(240),()=>this[r(221)]())}[li(238)](){const t=li;super[t(238)](),this[t(221)]()}[li(221)](){const t=li,e=this[t(249)];e&&(this[t(262)]=Math[t(257)](e[t(234)],e[t(247)])>.8*window[t(223)])}}function yi(){const t=["532839AWdrZB","userView","true","ck-user__full-name","element","button","24WLltTK","fire","ck-presence-list__dropdown-list-item","getBackgroundColorClass","15WRaCBp","tag","bindTemplate","8672450GBoqoH","name","execute","1112985knWDQl","span","setTemplate","8mNmJpq","ck-presence-list__marker","focus","presentation","405186qlktvI","58188LJRQyE","color","137472vBaMih","4093250bgxjpC"];return(yi=function(){return t})()}function gi(t,e){const n=yi();return(gi=function(t,e){return n[t-=186]})(t,e)}const bi=gi;!function(t){const e=gi,n=t();for(;;)try{if(302352===-parseInt(e(186))/1+-parseInt(e(205))/2*(parseInt(e(210))/3)+parseInt(e(212))/4+parseInt(e(196))/5*(-parseInt(e(209))/6)+parseInt(e(213))/7+parseInt(e(192))/8*(-parseInt(e(202))/9)+parseInt(e(199))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yi);class Ii extends r.ListItemView{[bi(187)];constructor(t,e,n){const r=bi;super(t);const s=this[r(198)];this[r(187)]=new Fn.UserView(t,e);const o={tag:"li",attributes:{class:["ck",r(194)],tabindex:-1,role:r(208),"aria-label":e[r(200)]},children:[this[r(187)],{tag:r(203),attributes:{class:["ck",r(189)]},children:[{text:e[r(200)]}]},{tag:r(203),attributes:{class:["ck",r(206),e[r(211)][r(195)]()],"aria-hidden":r(188)}}]};n&&(o[r(197)]=r(191),o.on={click:s.to(()=>this[r(193)](r(201)))}),this[r(204)](o)}[bi(207)](){const t=bi;this[t(190)][t(207)]()}}const Oi=vi;function vi(t,e){const n=wi();return(vi=function(t,e){return n[t-=142]})(t,e)}function wi(){const t=["listitem","execute","1646841oTIxvu","546eMKUPx","3737180FTDSJJ","ck-presence-list__list-item","template","markerView","fire","getBackgroundColorClass","2aIDcZh","text","ck-presence-list__marker","set","userView","isFocusable","name","325PVbRvf","bindTemplate","4062819fdspQq","tag","42440HSVvHu","41711076mNvVtE","2098020SWCqPA","color","button","ck-presence-list__list-item__tooltip","hasTooltip","setTemplate","104868KPbWvr","9JDtEvY","true","span","tooltipPosition","div"];return(wi=function(){return t})()}!function(t){const e=vi,n=t();for(;;)try{if(966745===-parseInt(e(162))/1*(parseInt(e(170))/2)+-parseInt(e(144))/3+parseInt(e(148))/4+parseInt(e(142))/5*(-parseInt(e(154))/6)+parseInt(e(163))/7*(parseInt(e(146))/8)+-parseInt(e(155))/9*(-parseInt(e(164))/10)+parseInt(e(147))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(wi);class Si extends r.View{[Oi(174)];[Oi(167)];constructor(t,e,n){const s=Oi;super(t);const o=this[s(143)];this[s(173)](s(175),!1),this[s(173)](s(152),!0),this[s(173)](s(158),""),this[s(174)]=new Fn.UserView(t,e),this[s(167)]=new ki(t,e);const i=new r.LabelView(t);i[s(166)][s(145)]=s(157),i[s(171)]=e[s(176)];const a={tag:s(159),attributes:{class:["ck",s(165)],role:s(160),tabindex:o.to(s(175),t=>!!t&&0),"aria-labelledby":i.id,"data-cke-tooltip-text":this[s(174)][s(176)],"data-cke-tooltip-position":o.to(s(158)),"data-cke-tooltip-disabled":o.to(s(152),t=>!t),"data-cke-tooltip-class":s(151)},children:[this[s(174)],this[s(167)],i]};n&&(a[s(145)]=s(150),a.on={click:o.to(()=>this[s(168)](s(161)))}),this[s(153)](a)}}class ki extends r.View{constructor(t,e){const n=Oi;super(t),this[n(153)]({tag:n(157),attributes:{class:["ck",n(172),e[n(149)][n(169)]()],"aria-hidden":n(156)}})}}const Ai=_i;function Ti(){const t=["368665bNobma","_handleUserAdd","querySelectorAll","destroy","785164ZlbfqG","isPremiumPlugin","allConnectedUsers","locale","from","attachToDom","unpin","bind","_createView","pluginName","reverse","ck ck-presence-list__balloon","6533672hPMwpg","content","presenceDropdownView","707946lXMZOU","isExpanded","pin","inlineListView","detachFromDom","onClick","presencelist-collapseat-invalid-format","Esc","hasTooltip","define","config","textarea","bindTo","sort","displayMe","hideDropdown","isOfficialPlugin","input","appendChild","presencelist-missing-container","select","length","628GpnTir","plugins","7jTzAxP","body","button","486TiCZOC","activeElement","offsetHeight","change:isFocused","_bodyCollection","isMe","execute","listenTo","presenceList.displayMe","isCollapsed","offsetWidth","showDropdown","view","get","class","[tabindex]","focusTracker","counterView","35eEIFNO","isFocusable","Enter","add","_allConnectedUsers","currentDisplayedUsers","Shift+Tab","min","presenceList.container","5410JqzIpx","keystrokes","tabIndex","join","map","balloonPanelView","render","7366546FOMSWy","presencelist:hide","items","using","4329LerSXI","presencelist:show","init","context","find","set","isRendered","_handleUserRemove","focus","PresenceListUI","presenceList.collapseAt","requires","element","isVisible","remove","number","presenceList","usersCount","Tab","filter","checkIfScrollable","indexOf","[contenteditable]",':not([disabled]):not([tabindex="-1"])'];return(Ti=function(){return t})()}function _i(t,e){const n=Ti();return(_i=function(t,e){return n[t-=195]})(t,e)}!function(t){const e=_i,n=t();for(;;)try{if(617357===-parseInt(e(212))/1+parseInt(e(253))/2*(-parseInt(e(258))/3)+-parseInt(e(216))/4+parseInt(e(276))/5*(parseInt(e(231))/6)+-parseInt(e(255))/7*(-parseInt(e(228))/8)+parseInt(e(296))/9*(parseInt(e(285))/10)+-parseInt(e(292))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ti);const Ci={collapseAt:6,displayMe:!0};class Pi extends e.ContextPlugin{[Ai(281)];[Ai(290)];[Ai(270)];[Ai(230)];[Ai(262)]=null;static get[Ai(225)](){return Ai(197)}static get[Ai(247)](){return!0}static get[Ai(217)](){return!0}constructor(t){const e=Ai;super(t),this[e(299)][e(241)][e(240)](e(204),Ci);const s=t[e(241)][e(271)](e(198));if(e(203)!=typeof s)throw new n.CKEditorError(e(237),this);if(s<1)throw new n.CKEditorError(e(237),this);this[e(280)]=this[e(299)][e(254)][e(271)](Qn)[e(218)],this[e(301)](e(205),0),this[e(281)]=new n.Collection,this[e(290)]=new r.BalloonPanelView,this[e(290)][e(272)]=e(227),this[e(270)]=this[e(224)](),this[e(230)]=void 0}static get[Ai(199)](){return[Qn]}[Ai(298)](){const t=Ai;for(const e of this[t(280)])this[t(213)](e);this[t(265)](this[t(280)],t(279),(e,n)=>{this[t(213)](n)}),this[t(265)](this[t(280)],t(202),(e,n)=>{this[t(195)](n)})}[Ai(224)](){const t=Ai,e=this[t(299)],s=new di(this[t(299)][t(219)],this[t(299)][t(241)][t(271)](t(198))),o=this[t(290)];if(!Xo(e[t(241)][t(271)](t(284))))throw new n.CKEditorError(t(250),this);return s[t(275)][t(223)](t(205)).to(this),s[t(223)](t(267)).to(this,t(205),n=>{const r=t,{collapseAt:o}=e[r(241)][r(271)](r(204)),i=n>=o;if(i&&!s[r(234)][r(294)][r(300)](t=>t instanceof ti)){const t=this[r(299)][r(241)][r(271)](r(198))-1;this[r(281)][r(252)]==t&&this[r(281)][r(252)]>1&&this[r(281)][r(202)](this[r(281)][r(252)]-1),s[r(234)][r(294)][r(279)](s[r(275)])}return i||this[r(246)](),i}),s[t(234)][t(294)][t(243)](this[t(281)])[t(295)](n=>{const r=t,o=e[r(241)][r(271)](r(204)),i=new Si(e[r(219)],n,!!o[r(236)]);return i[r(223)](r(239)).to(s,r(267),t=>!t),i[r(223)](r(277)).to(s,r(267),t=>!t),o[r(236)]&&this[r(265)](i,r(264),()=>{const t=r;this[t(270)][t(267)]||o[t(236)](n,i[t(200)])}),i}),this[t(265)](s[t(234)],t(297),()=>{const e=t;this[e(270)][e(267)]&&this[e(269)]()}),this[t(265)](s[t(234)],t(293),()=>{const e=t;this[e(230)]&&this[e(246)]()}),s[t(234)][t(286)][t(301)](t(278),(e,n)=>{const r=t;this[r(270)][r(267)]&&(this[r(269)](),n())}),s[t(291)](),o[t(291)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[t(201)],contextElements:[o[t(200)],s[t(234)][t(200)]],callback:()=>this[t(246)]()}),e[t(241)][t(271)](t(284))[t(249)](s[t(200)]),this[t(262)]=new r.BodyCollection(this[t(299)][t(219)]),this[t(262)][t(221)](),this[t(262)][t(279)](this[t(290)]),s}[Ai(213)](t){const e=Ai;if(!this[e(299)][e(241)][e(271)](e(266))&&t[e(263)])return;const n=this[e(299)][e(241)][e(271)](e(198))-1;for(this[e(205)]++;this[e(281)][e(252)]>=n-(this[e(270)][e(267)]?1:0)&&this[e(281)][e(252)]>1;)this[e(281)][e(202)](1);const r=t[e(263)]?0:this[e(281)][e(252)];this[e(281)][e(279)](t,r)}[Ai(195)](t){const e=Ai;this[e(205)]--;const{collapseAt:n}=this[e(299)][e(241)][e(271)](e(204)),r=this[e(205)]>=n;if(this[e(281)][e(271)](t.id))this[e(281)][e(202)](t.id);else if(r&&this[e(281)][e(252)]+1===n-1)return;if(this[e(281)][e(252)]+(r?1:0)<this[e(205)])for(const t of Array[e(220)](this[e(280)])[e(226)]())if(!this[e(281)][e(271)](t.id)&&(this[e(281)][e(279)](t,Math[e(283)](this[e(281)][e(252)]-(r?1:0),1)),this[e(281)][e(252)]+(r?1:0)===n-1))return}[Ai(269)](){const t=Ai;if(this[t(230)])return;const e=this[t(299)][t(241)][t(271)](t(204));this[t(230)]=new pi(this[t(299)][t(219)],!!e[t(236)]),this[t(270)][t(234)][t(232)]=!0,this[t(265)](this[t(230)],t(293),()=>{const e=t;this[e(230)]&&this[e(246)]()});const{listWrapperView:n}=this[t(230)];n[t(294)][t(243)](this[t(280)])[t(295)](n=>{const r=t;if(!e[r(245)]&&n[r(263)])return null;const s=new Ii(this[r(299)][r(219)],n,!!e[r(236)]);return e[r(236)]&&this[r(265)](s,r(264),()=>{const t=r;e[t(236)](n,s[t(200)])}),s}),this[t(290)][t(229)][t(279)](this[t(230)]),this[t(290)][t(233)]({target:this[t(270)][t(234)][t(200)]}),n[t(196)](),n[t(208)]();const r=(e,n)=>{const r=t;this[r(246)](),this[r(270)][r(234)][r(196)](),n()};n[t(286)][t(301)](t(238),r),n[t(286)][t(301)](t(282),r),n[t(286)][t(301)](t(206),(e,n)=>{const r=t;!function(t){const e=_i,n=["a",e(257),e(248),e(251),e(242),e(273),e(210)][e(289)](t=>t+e(211))[e(288)](","),r=[...document[e(256)][e(214)](n)][e(207)](t=>t===document[e(259)]||t[e(268)]+t[e(260)]>0)[e(244)]((t,n)=>(t[e(287)]||0)-(n[e(287)]||0)),s=r[e(209)](t),o=r[(s+1)%r[e(252)]];o&&o[e(196)]()}(this[r(270)][r(200)]),this[r(246)](),n()}),n[t(274)][t(279)](this[t(270)][t(200)]),n[t(274)].on(t(261),(e,n,r)=>{r||this[t(246)]()})}[Ai(246)](){const t=Ai;this[t(230)]&&(this[t(270)][t(234)][t(232)]=!1,this[t(290)][t(222)](),this[t(290)][t(229)][t(202)](this[t(230)]),this[t(230)][t(215)](),this[t(230)]=void 0)}[Ai(215)](){const t=Ai;super[t(215)](),this[t(270)]&&this[t(270)][t(302)]&&this[t(270)][t(215)](),this[t(262)]&&(this[t(262)][t(235)](),this[t(262)][t(215)](),this[t(262)]=null)}}var Ei=ji;function Di(){var t=["pluginName","318453fObguN","requires","1295OsIOms","2567870qhXEQs","PresenceList","2dTuWDe","isPremiumPlugin","10652koiTGr","isOfficialPlugin","615ukopVk","1392840LtdmHH","188972UVYFQB","1110753suXDSe","8472dSSvoJ","11XGHYDo"];return(Di=function(){return t})()}function ji(t,e){var n=Di();return(ji=function(t,e){return n[t-=315]})(t,e)}!function(t){for(var e=ji,n=t();;)try{if(189885===-parseInt(e(317))/1*(-parseInt(e(323))/2)+-parseInt(e(328))/3+-parseInt(e(319))/4*(-parseInt(e(321))/5)+parseInt(e(325))/6*(-parseInt(e(330))/7)+parseInt(e(322))/8+parseInt(e(324))/9+-parseInt(e(315))/10*(parseInt(e(326))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Di);class xi extends e.ContextPlugin{static get[Ei(329)](){return[Qn,Pi]}static get[Ei(327)](){return Ei(316)}static get[Ei(320)](){return!0}static get[Ei(318)](){return!0}}function Ri(t,e){var n=Ni();return(Ri=function(t,e){return n[t-=144]})(t,e)}function Ni(){var t=["5175126MadwIs","48gNSnmq","4965310hrubdP","376695KIEvFj","12301176WspkRB","10349178dfLoOC","44620mkhznu","1911878IqNOxW"];return(Ni=function(){return t})()}!function(t){for(var e=Ri,n=t();;)try{if(829072===-parseInt(e(147))/1+parseInt(e(151))/2+parseInt(e(145))/3*(parseInt(e(150))/4)+parseInt(e(146))/5+-parseInt(e(144))/6+parseInt(e(149))/7+-parseInt(e(148))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ni)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
|