A response to the event. Required for voice and ussd events
- */
-type NotificationHandler = (notification: Notification, customer: Customer, appData?: Record, callback?: NotificationCallback) => void;
-
-/**
- * Reminder notification
- */
-type ReminderNotification = Notification & { reminder: Reminder };
-
-/**
- * Voice call notification
- */
-type VoiceCallNotification = Notification;
-
-/**
- * Message status notification
- * @property status - one of [queued, sent, delivered, read, received, session_initiated, failed, no_consent, no_capability, expired, no_session_in_progress, other_session_in_progress, invalid_reply_token, invalid_channel_number, not_supported, invalid_reply_to_message_id, invalid_customer_id, duplicate_request , tag_not_found, customer_number_not_found, decommissioned_customerid, rejected, invalid_request, insufficient_credits, application_error]
- */
-type MessageStatusNotification = Notification;
-
-/**
- * USSD session notification
- */
-type UssdSessionNotification = Notification;
-
-/**
- * SMS notification
- */
-type ReceivedSmsNotification = Notification;
-
-/**
- * Whatsapp, telegram or email notification
- */
-type ReceivedMediaNotification = Notification;
-
-/**
- * Payment status notification
- * @property status - one of [queued, pending_confirmation, pending_validation, validated, invalid_request, not_supported, insufficient_funds, application_error, not_allowed, duplicate_request, invalid_purse, invalid_wallet, decommissioned_customer_id, success, pass_through, failed, throttled, expired, rejected, reversed]
- */
-type PaymentStatusNotification = Notification;
-
-/**
- * Payment status notification
- * @property status - one of [queued, pending_confirmation, pending_validation, validated, invalid_request, not_supported, insufficient_funds, application_error, not_allowed, duplicate_request, invalid_purse, invalid_wallet, decommissioned_customer_id, success, pass_through, failed, throttled, expired, rejected, reversed]
- */
-type ReceivedPaymentNotification = Notification;
-
-/**
- * Wallet payment status notification
- * @property status - one of [queued, pending_confirmation, pending_validation, validated, invalid_request, not_supported, insufficient_funds, application_error, not_allowed, duplicate_request, invalid_purse, invalid_wallet, decommissioned_customer_id, success, pass_through, failed, throttled, expired, rejected, reversed]
- */
-type WalletPaymentStatusNotification = Notification;
-
-/**
- * Customer activity notification
- */
-type CustomerActivityNotification = Notification;
-
-/**
- * And object representing a customer activity
- */
-type Activity = {
- key: string;
- sessionId: string;
- properties: any;
- createdAt: number;
-};
-
-/**
- * Message reaction notification
- * @property reaction - one of [clicked, unsubscribed, complained]
- */
-type SentMessageReactionNotification = Notification;
-
-/**
- * Messaging session ended notification
- * @property duration - in seconds
- * @property reason - one of [normal_clearing, inactivity, failure]
- */
-type MessagingSessionEndedNotification = Notification;
-
-/**
- * Messaging session initialized notification
- * @property expiresAt - timestamp in seconds
- */
-type MessagingSessionInitializedNotification = Notification;
-
-/**
- * Messaging consent update notification
- * @property update - one of [allow, block]
- * @property status - one of [queued, completed, invalid_channel_number, decommissioned_customer_id, application_error]
- */
-type MessagingConsentUpdateNotification = Notification;
-
-/**
- * An string representing an event. Must be one of:
- *
- * - Connection Events:
- *
- * - error: Emitted on connection error
- * - closed: Emitted on connection closed
- * - pending: Emitted when not connected
- * - connected: Emitted on connection success
- * - connecting: Emitted when connecting
- *
- *
- * - App Events
- *
- * - reminder: @see {@link ReminderNotification}
- * - voiceCall: @see {@link VoiceCallNotification}
- * - messageStatus: @see {@link MessageStatusNotification}
- * - ussdSession: @see {@link UssdSessionNotification}
- * - receivedSms: @see {@link ReceivedSmsNotification}
- * - receivedEmail: @see {@link ReceivedMediaNotification}
- * - receivedFbMessenger: @see {@link ReceivedMediaNotification}
- * - receivedTelegram: @see {@link ReceivedMediaNotification}
- * - receivedWhatsapp: @see {@link ReceivedMediaNotification}
- * - paymentStatus: @see {@link PaymentStatusNotification}
- * - receivedPayment: @see {@link ReceivedPaymentNotification}
- * - customerActivity: @see {@link CustomerActivityNotification}
- * - walletPaymentStatus: @see {@link WalletPaymentStatusNotification}
- * - sentMessageReaction: @see {@link SentMessageReactionNotification}
- * - messagingSessionEnded: @see {@link MessagingSessionEndedNotification}
- * - messagingConsentUpdate: @see {@link MessagingConsentUpdateNotification}
- * - messagingSessionStarted: @see {@link MessagingSessionInitializedNotification}
- * - messagingSessionRenewed: @see {@link MessagingSessionInitializedNotification}
- *
- *
- * - Sandbox Events
- *
- * - sendMessage: @see {@link SendMessageSimulatorNotification}
- * - makeVoiceCall: @see {@link MakeVoiceCallSimulatorNotification}
- * - sendCustomerPayment: @see {@link CustomerPaymentSimulatorNotification}
- * - sendChannelPayment: @see {@link SendChannelPaymentSimulatorNotification}
- * - checkoutPayment: @see {@link CustomerPaymentSimulatorNotification}
- *
- *
- *
- */
-type Event = string;
-
-/**
- * An object representing a message body
- */
-type InboundMessageBody = {
- text?: string;
- media?: Media;
- location?: Location;
- email?: Email;
- ussd?: UssdInput;
- voice?: VoiceCallInput;
-};
-
-/**
- * An object representing a ussd input
- * @property status - one of [active, incomplete, completed, app_error]
- */
-type UssdInput = {
- text: string;
- status: string;
-};
-
-/**
- * An object representing a voice call input
- * @property direction - one of [outbound, inbound]
- * @property status - one of [queued, answered, ringing, active, dialing, dial_completed, bridged, enqueued, dequeued, transferred, transfer_completed, completed, insufficient_credit, not_answered, invalid_phone_number, destination_not_supported, decommissioned_customerid, expired, invalid_channel_number, application_error]
- * @property hangupCause - one of [unallocated_number, user_busy, normal_clearing, no_user_response, no_answer, subscriber_absent, call_rejected, normal_unspecified, normal_temporary_failure, service_unavailable, recovery_on_timer_expire, originator_cancel, lose_race, user_not_registered]
- */
-type VoiceCallInput = {
- direction: string;
- status: string;
- startedAt: number;
- hangupCause: string;
- dtmfDigits: string;
- recordingUrl: string;
- dialData: VoiceCallDialInput;
- queueData: VoiceCallQueueInput;
-};
-
-/**
- * An object representing a voice call dial input
- */
-type VoiceCallDialInput = {
- destinationNumber: string;
- startedAt: number;
- duration: number;
-};
-
-/**
- * An object representing a voice call queue input
- */
-type VoiceCallQueueInput = {
- destinationNumber: string;
- enqueuedAt: number;
- dequeuedAt: number;
- dequeuedToNumber: string;
- dequeuedToSessionId: string;
- queueDuration: number;
-};
-
-/**
- * An object representing a customer's payment source or destination
- */
-type CustomerPayment = {
- customerNumber: CustomerNumber;
- channelNumber: PaymentChannelNumber;
-};
-
-/**
- * An object representing a channel payment source or destination
- * @property channelCode - The telco's network code.
- */
-type ChannelPayment = {
- account: string;
- channelCode: NetworkCode;
- channelNumber: PaymentChannelNumber;
-};
-
-/**
- * An object representing wallet
- */
-type Wallet = {
- customerId: string;
- walletId: string;
-};
-
-/**
- * An object representing purse
- */
-type Purse = {
- purseId: string;
-};
-
-/**
- * An object representing a payment channel
- * @property channel - number provider. Must be one of ['cellular']
- */
-type PaymentChannelNumber = {
- number: string;
- channel: 'cellular';
-};
-
-/**
- * An object representing a messaging channel number
- * @property channel - one of [sms,telegram,whatsapp,email,messenger,voice]
- */
-type MessagingChannelNumber = {
- number: string;
- channel: 'sms' | 'telegram' | 'whatsapp' | 'email' | 'messenger' | 'voice';
-};
-
-/**
- * An object representing an activity channel number
- * @property channel - channel type. Must be one of ['web','mobile']
- */
-type ActivityChannelNumber = {
- number: string;
- channel: 'web' | 'mobile';
-};
-
-type CustomerStateUpdateReply = {
- customerId: string;
- status: boolean;
- description: string;
-};
-
-type ConsentUpdateReply = {
- status: string;
- description: string;
- customerId: string;
-};
-
-/**
- * @property status - one of [queued, sent, delivered, read, received, session_initiated, failed, no_consent, no_capability, expired, no_session_in_progress, other_session_in_progress, invalid_reply_token, invalid_channel_number, not_supported, invalid_reply_to_message_id, invalid_customer_id, duplicate_request , tag_not_found, customer_number_not_found, decommissioned_customerid, rejected, invalid_request, application_error]
- */
-type MessageReply = {
- status: string;
- description: string;
- customerId: string;
- sessionId: string;
- messageId: string;
-};
-
-/**
- * An number representing a network code. Examples include:
- * 62006
: AirtelTigo Ghana62002
: Vodafone Ghana62001
: MTN Ghana62120
: Airtel Nigeria62130
: MTN Nigeria62150
: Glo Nigeria62160
: Etisalat Nigeria63510
: MTN Rwanda63513
: Tigo Rwanda63514
: Airtel Rwanda63601
: EthioTelecom Ethiopia63902
: Safaricom Kenya63903
: Airtel Kenya63907
: Orange Kenya63999
: Equitel Kenya64002
: Tigo Tanzania64004
: Vodacom Tanzania64005
: Airtel Tanzania64101
: Airtel Uganda64110
: MTN Uganda64114
: Africell Uganda64501
: Airtel Zambia64502
: MTN Zambia65001
: TNM Malawi65010
: Airtel Malawi65501
: Vodacom South Africa65502
: Telkom South Africa65507
: CellC South Africa65510
: MTN South Africa99999
: Athena (This is a custom networkCode that only applies when working in the sandbox environment).
- */
-type NetworkCode = number;
diff --git a/web.js b/web.js
deleted file mode 100644
index 7cd26f9..0000000
--- a/web.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/*! For license information please see web.js.LICENSE.txt */
-!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(()=>(()=>{var __webpack_modules__={611:(e,t,r)=>{const o=r(236),{ElarianMessages:n}=r(666),{AppToServerCommand:a,AppToServerCommandReply:i,GenerateAuthTokenCommand:s}=n;o.prototype.generateAuthToken=function(){const e=this.getSocket(),t=new s,r=(new a).setGenerateAuthToken(t);return new Promise(((t,o)=>{e.requestResponse({data:Buffer.from(r.serializeBinary())}).subscribe({onComplete:e=>{try{const r=i.deserializeBinary(e.data).getGenerateAuthToken(),o={token:r.getToken(),lifetime:r.getLifetime().getSeconds()};t(o)}catch(e){o(e)}},onError:e=>o(e)})}))},e.exports=o},26:(e,t,r)=>{const o=r(765),{Single:n}=r(956),{ElarianMessages:a}=r(666),{DataMapValue:i,ServerToAppNotification:s,ServerToAppNotificationReply:p}=a,{connectRSocket:g}=r(666);function l(e){const t={...e,isSimulator:!0===e.isSimulator},r={appId:{type:"string",presence:!0},orgId:{type:"string",presence:!0},apiKey:{type:"string"},authToken:{type:"string",presence:this.platform.isBrowser},allowNotifications:{type:"boolean"},isSimulator:{type:"boolean"},options:{type:"object"}};if(!t.apiKey&&!t.authToken)throw new Error("Either one of apiKey or authToken is required");const n=o(t,r);if(n)throw n;this._client=null,this._socket=null,this.options=t;const a=t.options||{};this.configOptions={lifetime:a.lifetime||6e4,resumable:a.resumable||false,keepAlive:a.keepAlive||1e3,serializer:a.serializer||{type:"text",serialize:e=>JSON.stringify(e),deserialize:e=>{try{return JSON.parse(e)}catch(t){this.platform.log.warn(`Failed to deserialize ${e}: ${t.message}`)}return e}},notificationTimeout:a.notificationTimeout||5e3},this.eventListeners={data:null,error:null,closed:null,pending:null,connected:null,connecting:null},this.connect=function({host:e,port:t}={}){return g({...this.options,authToken:this.options.authToken,apiKey:this.options.authToken?null:this.options.apiKey},{host:e,port:t,...this.configOptions,platform:this.platform,setSocket:e=>{this._socket=e},getConnectionHandlers:()=>({error:e=>{this.eventListeners.error&&this.eventListeners.error(e)},closed:()=>{this.disconnect(),this.eventListeners.closed&&this.eventListeners.closed()},pending:this.eventListeners.pending,connecting:this.eventListeners.connecting}),notificationHandler:this._notificationHandler(this)}).then((({client:e})=>{this._client=e,this.eventListeners.connected&&this.eventListeners.connected(),this._lifetimeId=setInterval((()=>{}),1e4)})).catch((e=>{this.eventListeners.error&&this.eventListeners.error(e)})),this},this.getSocket=function(){if(!this._socket)throw new Error("Client is not connected");return this._socket},this.isConnected=function(){return null!==this._client&&null!==this._socket},this.disconnect=function(){this._client&&(this._client.close(),clearInterval(this._lifetimeId)),this._client=null,this._socket=null};const i=e=>{this.platform.log.warn(`Disconnecting from API server(${e})`),this.disconnect(),this.platform.isBrowser||process.exit(e)};this.platform.isBrowser?window.onbeforeunload=i:(process.on("SIGINT",i.bind(null)),process.on("SIGQUIT",i.bind(null)),process.on("SIGTERM",i.bind(null)))}l.prototype._notificationHandler=e=>t=>{let r;const{log:o}=e.platform,{notificationTimeout:a=5e3}=e.options;let g=new p;return new n((n=>{n.onSubscribe(),(async()=>{const o=s.deserializeBinary(t.data).toObject(),n=Object.keys(o);r=n.find((e=>!["orgId","appId","createdAt","humanId","state"].includes(e)&&o[e]));const p=((e,t)=>("reminder"===e&&(t.workId=t.workId.value,t.group={mapping:t.group.mapping,expiresAt:t.group.expiresAt.seconds},t.reminder={key:null,payload:t.reminder.payload.value,remindAt:t.reminder.remindAt.seconds,interval:t.reminder?.interval.seconds}),t))(r,{...o[r]});p.orgId=o.orgId,p.appId=o.appId,p.humanId=o.humanId,p.createdAt=o?.createdAt.seconds,p.state=o?.state;const l=e.eventListeners.data;l&&await l(r,p,o);const u=e.eventListeners[r];let c=o.state||{};const{serializer:d}=e.configOptions;c="text"===d.type?c.stringVal:c.bytesVal,c=c?d.deserialize(c):void 0;let f=c;if(u){const e=new Promise((async(e,t)=>{try{const t=t=>e(t);u(p,t)}catch(e){t(e)}})),t=await Promise.race([e,new Promise((e=>{setTimeout(e,a,{})}))]);t&&(f=t)}if(f){const e=new i,t=d.serialize(f);switch(d.type){case"text":e.setStringVal(t);break;case"binary":e.setBytesValue(t);break;default:throw new Error("Invalid serializer type")}g=g.setNextState(e)}return g})().then((e=>{try{n.onComplete({data:Buffer.from(e.serializeBinary())})}catch(e){o.error(`NotificationReplyError::${r}: `,e.message||e)}})).catch((e=>{try{o.error(`NotificationDefaultError::${r}: `,e.message||e),n.onComplete({data:Buffer.from(g.serializeBinary())})}catch(e){o.error(`NotificationError::${r}: `,e.message||e)}}))}))},l.prototype.registerNotificationHandler=function(e,t){const r=Object.keys(this.eventListeners);if(!r.includes(e))throw new Error(`Unexpected event ${e}. Must be one of ${r}`);return this.eventListeners[e]=t,this},l.prototype.on=function(e,t){return this.registerNotificationHandler(e,t)},e.exports=l},236:(e,t,r)=>{const o=r(26),{ElarianMessages:n}=r(666),{Duration:a,Reminder:i,Timestamp:s,GroupIndex:p,StringValue:g,DataMapValue:l,IndexMapping:u,AppToServerCommand:c,AppToServerCommandReply:d,AddReminderCommand:f,AddGroupReminderCommand:m,CancelReminderCommand:h,CancelGroupReminderCommand:y,UpdateGroupCommand:b,DeleteGroupCommand:_,UpdateMetadataCommand:E,DeleteMetadataCommand:S,LeaseAppStateCommand:T,UpdateAppStateCommand:A,DeleteAppStateCommand:R}=n;function M(e){o.call(this,e),this.eventListeners={...this.eventListeners,reminder:null}}M.prototype=Object.create(o.prototype,{constructor:M}),M.prototype.addReminder=function(e,t){const r=this.getSocket();if(!e||!t)throw new Error("An id and reminder are required");let o=new f;o=o.setHumanId(e);let n=(new i).setKey(t.key).setPayload((new g).setValue(t.payload)).setRemindAt((new s).setSeconds(Math.floor(t.remindAt)));t.interval&&(n=n.setInterval((new a).setSeconds(Math.floor(t.interval)))),o.setReminder(n);const p=(new c).setAddReminder(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(p.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.addGroupReminder=function(e,t){const r=this.getSocket();if(!e||!t)throw new Error("A group and reminder are required");const o=new m;let n=(new i).setKey(t.key).setPayload((new g).setValue(t.payload)).setRemindAt((new s).setSeconds(Math.floor(t.remindAt)));t.interval&&(n=n.setInterval((new a).setSeconds(Math.floor(t.interval)))),o.setReminder(n);const p=(new u).setKey(e.key).setValue((new g).setValue(e.value));o.setGroup(p);const l=(new c).setAddGroupReminder(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(l.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getGroupCommand(),o={status:t.getStatus(),description:t.getDescription(),workId:(t.getWorkId()||{getValue:()=>{}}).getValue()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.cancelReminder=function(e,t){const r=this.getSocket();if(!e||!t)throw new Error("A human id and reminder key are required");const o=(new h).setHumanId(e).setKey(t),n=(new c).setCancelReminder(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(n.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.cancelGroupReminder=function(e,t){const r=this.getSocket();if(!e||!t)throw new Error("A group and reminder key are required");const o=(new y).setGroup((new u).setKey(e.key).setValue((new g).setValue(e.value))).setKey(t),n=(new c).setCancelGroupReminder(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(n.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getGroupCommand(),o={status:t.getStatus(),description:t.getDescription(),workId:(t.getWorkId()||{getValue:()=>{}}).getValue()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.updateGroups=function(e,t){const r=this.getSocket();if(!t||!t.length||!e)throw new Error("A human id and group(s) are required");const o=(new b).setHumanId(e);t.forEach((e=>{o.addUpdates((new p).setExpiresAt((new s).setSeconds(Math.floor(e.expiresAt))).setMapping((new u).setKey(e.mapping.key).setValue((new g).setValue(e.mapping.value))))}));const n=(new c).setUpdateGroup(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(n.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.deleteGroups=function(e,t){const r=this.getSocket();if(!t||!t.length||!e)throw new Error("A human id and group(s) are required");const o=(new _).setHumanId(e);t.forEach((e=>{o.addDeletions(e)}));const n=(new c).setDeleteGroup(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(n.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.updateMetadata=function(e,t){const r=this.getSocket();if(!t||!e)throw new Error("A human id and group(s) are required");const o=(new E).setHumanId(e);Object.keys(t).forEach((e=>{const r=new l,n=t[e];n.stringVal&&r.setStringVal(n.stringVal),n.bytesVal&&r.setBytesVal(n.bytesVal),o.getUpdatesMap().set(e,r)}));const n=(new c).setUpdateMetadata(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(n.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.deleteMetadata=function(e,t){const r=this.getSocket();if(!t||!t.length||!e)throw new Error("A human id and keys(s) are required");const o=(new S).setHumanId(e);t.forEach((e=>{o.addDeletions(e)}));const n=(new c).setDeleteMetadata(o);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(n.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.leaseAppState=function(e){const t=this.getSocket();if(!e)throw new Error("A human id is required");const r=(new T).setHumanId(e),o=(new c).setLeaseAppState(r);return new Promise(((e,r)=>{t.requestResponse({data:Buffer.from(o.serializeBinary())}).subscribe({onComplete:t=>{try{const r=d.deserializeBinary(t.data).getLeaseAppState();let o=r.getState();o&&(o={stringVal:o.getStringVal(),bytesVal:o.getBytesVal()});const n={state:o,status:r.getStatus(),description:r.getDescription()};e(n)}catch(e){r(e)}},onError:e=>r(e)})}))},M.prototype.updateAppState=function(e,t){const r=this.getSocket();if(!e||!t)throw new Error("A human id and state are required");const o=new l;t.stringVal&&o.setStringVal(t.stringVal),t.bytesVal&&o.setBytesVal(t.bytesVal);const n=(new A).setHumanId(e).setUpdate(o),a=(new c).setUpdateAppState(n);return new Promise(((e,t)=>{r.requestResponse({data:Buffer.from(a.serializeBinary())}).subscribe({onComplete:r=>{try{const t=d.deserializeBinary(r.data).getUpdateState(),o={status:t.getStatus(),description:t.getDescription()};e(o)}catch(e){t(e)}},onError:e=>t(e)})}))},M.prototype.deleteAppState=function(e){const t=this.getSocket();if(!e)throw new Error("A human id is required");const r=(new R).setHumanId(e),o=(new c).setDeleteAppState(r);return new Promise(((e,r)=>{t.requestResponse({data:Buffer.from(o.serializeBinary())}).subscribe({onComplete:t=>{try{const r=d.deserializeBinary(t.data).getUpdateState(),o={status:r.getStatus(),description:r.getDescription()};e(o)}catch(e){r(e)}},onError:e=>r(e)})}))},e.exports=M},568:(e,t,r)=>{r(611);const o=r(26),n=r(236),a=(e,t={})=>new Promise(((r,o)=>{try{const a=new n(e);a.on("error",(e=>o(e))),a.on("connected",(()=>r(a))),a.connect(t)}catch(e){o(e)}}));e.exports=e=>(o.prototype.platform=e,{Elarian:n,initializeClient:a})},862:(e,t,r)=>{const{RSocketResumableTransport:o,BufferEncoders:n}=r(269),a=r(876).Z,i=r(568)({isBrowser:!0,log:window.DEBUG?window.console:{info:()=>{},debug:()=>{},warn:console.warn,error:console.error},getTransport:({port:e=443,resumeToken:t,bufferSize:r=16,host:i="web.elarian.com",sessionDurationSeconds:s=60})=>t?new o((()=>new a({url:`ws${443===e?"s":""}://${i}:${e}`},n)),{bufferSize:r,resumeToken:t,sessionDurationSeconds:s},n):new a({url:`ws${443===e?"s":""}://${i}:${e}`},n)});window.Buffer||(window.Buffer=Uint8Array),e.exports=i},666:(e,t,r)=>{const{RSocketClient:o}=r(269),{Duration:n}=r(867),{Timestamp:a}=r(134),{StringValue:i,Int32Value:s}=r(469),p=r(147),g={...r(427)};g.Duration=n,g.Timestamp=a,g.Int32Value=s,g.StringValue=i;const{AppConnectionMetadata:l}=g,u=(e,t)=>t?e._status.kind:e.getConnectionState().kind;e.exports={connectRSocket:(e,t)=>new Promise(((r,n)=>{const{orgId:a,appId:s,apiKey:g,authToken:c,isSimulator:d=!1,allowNotifications:f=!0}=e,{host:m,port:h,platform:y,setSocket:b,lifetime:_=6e4,keepAlive:E=1e3,reconnectTimeout:S=6e4,resumable:T=!0,notificationHandler:A,getConnectionHandlers:R}=t,{log:M,getTransport:O,isBrowser:C}=y;if(!A&&f)return void n(new Error("notificationHandler is required"));let I=(new l).setOrgId(a).setAppId(s).setSimulatorMode(d).setSimplexMode(!f);c?I=I.setAuthToken((new i).setValue(c)):g&&(I=I.setApiKey((new i).setValue(g))),I=Buffer.from(I.serializeBinary());const j=Buffer.from(JSON.stringify({agent:`javascript/${p.version}`})),w=O({host:m,port:h,resumeToken:T?Buffer.from(`${s}-${Date.now()}`):void 0,sessionDurationSeconds:_/1e3});M.debug(`Transport Initialized: ${m}:${h}`);const v=new o({transport:w,setup:{lifetime:_,keepAlive:E,metadataMimeType:"application/json",dataMimeType:"application/octet-stream",payload:{data:I,metadata:j}},responder:{metadataPush:e=>{M.debug("Got a metadataPush",e)},fireAndForget:e=>{M.debug("Got a fireAndForget",e)},requestStream:e=>{M.debug("Got a requestStream",e)},requestChannel:e=>{M.debug("Got a requestChannel",e)},requestResponse:e=>A(e)},errorHandler:e=>{M.debug("Connection Error",e),R().error&&R().error(e)}});let N=!1;const B=e=>{M.debug("Client connected"),b(e)};w.connectionStatus().subscribe({onNext:e=>{M.debug(`Transport: ${e.kind}`);const t=R()[(e=>{const t=e.toLowerCase().replace(/_/,"");return"notconnected"===t?"pending":t})(e.kind)];if(t)try{t(e.error)}catch(e){M.debug("Failed to call connection status handler")}"CONNECTED"!==e.kind?"ERROR"!==e.kind?["NOT_CONNECTED","CLOSED"].includes(e.kind)&&N&&(M.info(`Disconnected from Elarian server, will attempt to reconnect in ${S}ms...`),((e=S)=>{setTimeout((()=>{null!==v&&(M.info("Attempting to reconnect..."),v._connection=null,v.connect().subscribe({onComplete:e=>{setTimeout((()=>{const t=u(w,C);"CONNECTED"===t?B(e):M.error(new Error(`Failed to connect: ${t}`))}),1e3)},onError:e=>{M.debug("Client connection refused ",e)}}))}),e)})()):w.setConnectionStatus({kind:"NOT_CONNECTED"}):N=!0},onError:e=>{M.debug(`Transport error: ${e}`),R().error&&R().error(e)},onSubscribe:e=>{e.request(Number.MAX_SAFE_INTEGER)},onComplete:e=>{M.debug(`Transport closed: ${e}`)}}),v.connect().subscribe({onComplete:e=>{setTimeout((()=>{const t=u(w,C);"CONNECTED"===t?(B(e),r({client:v})):n(new Error(`Failed to connect: ${t}`))}),1e3)},onError:e=>{M.debug("Client connection refused ",e),n(e)},onSubscribe:()=>{},onNext:e=>{M.debug("Client data received ",e)}})})),ElarianMessages:g}},590:(e,t,r)=>{var o=r(19),n=o,a=Function("return this")(),i=r(469);n.object.extend(proto,i);var s=r(867);n.object.extend(proto,s);var p=r(134);n.object.extend(proto,p),n.exportSymbol("proto.com.elarian.hera.proto.Reminder",null,a),proto.com.elarian.hera.proto.Reminder=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.Reminder,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.Reminder.displayName="proto.com.elarian.hera.proto.Reminder"),o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.Reminder.prototype.toObject=function(e){return proto.com.elarian.hera.proto.Reminder.toObject(e,this)},proto.com.elarian.hera.proto.Reminder.toObject=function(e,t){var r,n={key:o.Message.getFieldWithDefault(t,1,""),remindAt:(r=t.getRemindAt())&&p.Timestamp.toObject(e,r),interval:(r=t.getInterval())&&s.Duration.toObject(e,r),payload:(r=t.getPayload())&&i.StringValue.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.Reminder.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.Reminder;return proto.com.elarian.hera.proto.Reminder.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.Reminder.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setKey(r);break;case 2:r=new p.Timestamp,t.readMessage(r,p.Timestamp.deserializeBinaryFromReader),e.setRemindAt(r);break;case 3:r=new s.Duration,t.readMessage(r,s.Duration.deserializeBinaryFromReader),e.setInterval(r);break;case 4:r=new i.StringValue,t.readMessage(r,i.StringValue.deserializeBinaryFromReader),e.setPayload(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.Reminder.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.Reminder.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.Reminder.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getKey()).length>0&&t.writeString(1,r),null!=(r=e.getRemindAt())&&t.writeMessage(2,r,p.Timestamp.serializeBinaryToWriter),null!=(r=e.getInterval())&&t.writeMessage(3,r,s.Duration.serializeBinaryToWriter),null!=(r=e.getPayload())&&t.writeMessage(4,r,i.StringValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.Reminder.prototype.getKey=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.Reminder.prototype.setKey=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.Reminder.prototype.getRemindAt=function(){return o.Message.getWrapperField(this,p.Timestamp,2)},proto.com.elarian.hera.proto.Reminder.prototype.setRemindAt=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.Reminder.prototype.clearRemindAt=function(){return this.setRemindAt(void 0)},proto.com.elarian.hera.proto.Reminder.prototype.hasRemindAt=function(){return null!=o.Message.getField(this,2)},proto.com.elarian.hera.proto.Reminder.prototype.getInterval=function(){return o.Message.getWrapperField(this,s.Duration,3)},proto.com.elarian.hera.proto.Reminder.prototype.setInterval=function(e){return o.Message.setWrapperField(this,3,e)},proto.com.elarian.hera.proto.Reminder.prototype.clearInterval=function(){return this.setInterval(void 0)},proto.com.elarian.hera.proto.Reminder.prototype.hasInterval=function(){return null!=o.Message.getField(this,3)},proto.com.elarian.hera.proto.Reminder.prototype.getPayload=function(){return o.Message.getWrapperField(this,i.StringValue,4)},proto.com.elarian.hera.proto.Reminder.prototype.setPayload=function(e){return o.Message.setWrapperField(this,4,e)},proto.com.elarian.hera.proto.Reminder.prototype.clearPayload=function(){return this.setPayload(void 0)},proto.com.elarian.hera.proto.Reminder.prototype.hasPayload=function(){return null!=o.Message.getField(this,4)},n.object.extend(t,proto.com.elarian.hera.proto)},427:(e,t,r)=>{var o=r(19),n=o,a=Function("return this")(),i=r(867);n.object.extend(proto,i);var s=r(134);n.object.extend(proto,s);var p=r(469);n.object.extend(proto,p);var g=r(893);n.object.extend(proto,g);var l=r(590);n.object.extend(proto,l),n.exportSymbol("proto.com.elarian.hera.proto.AddGroupReminderCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.AddReminderCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.AppConnectionMetadata",null,a),n.exportSymbol("proto.com.elarian.hera.proto.AppToServerCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.AppToServerCommand.EntryCase",null,a),n.exportSymbol("proto.com.elarian.hera.proto.AppToServerCommandReply",null,a),n.exportSymbol("proto.com.elarian.hera.proto.AppToServerCommandReply.EntryCase",null,a),n.exportSymbol("proto.com.elarian.hera.proto.CancelGroupReminderCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.CancelReminderCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.CreateHumanCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.DeleteAppStateCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.DeleteGroupCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.DeleteMetadataCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.GenerateAuthTokenCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.GenerateAuthTokenReply",null,a),n.exportSymbol("proto.com.elarian.hera.proto.GroupCommandReply",null,a),n.exportSymbol("proto.com.elarian.hera.proto.LeaseAppStateCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.LeaseAppStateReply",null,a),n.exportSymbol("proto.com.elarian.hera.proto.ReminderNotification",null,a),n.exportSymbol("proto.com.elarian.hera.proto.ServerToAppNotification",null,a),n.exportSymbol("proto.com.elarian.hera.proto.ServerToAppNotification.EntryCase",null,a),n.exportSymbol("proto.com.elarian.hera.proto.ServerToAppNotificationReply",null,a),n.exportSymbol("proto.com.elarian.hera.proto.UpdateAppStateCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.UpdateGroupCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.UpdateMetadataCommand",null,a),n.exportSymbol("proto.com.elarian.hera.proto.UpdateStateReply",null,a),proto.com.elarian.hera.proto.AppConnectionMetadata=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.AppConnectionMetadata,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.AppConnectionMetadata.displayName="proto.com.elarian.hera.proto.AppConnectionMetadata"),proto.com.elarian.hera.proto.AppToServerCommand=function(e){o.Message.initialize(this,e,0,-1,null,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_)},n.inherits(proto.com.elarian.hera.proto.AppToServerCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.AppToServerCommand.displayName="proto.com.elarian.hera.proto.AppToServerCommand"),proto.com.elarian.hera.proto.AppToServerCommandReply=function(e){o.Message.initialize(this,e,0,-1,null,proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_)},n.inherits(proto.com.elarian.hera.proto.AppToServerCommandReply,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.AppToServerCommandReply.displayName="proto.com.elarian.hera.proto.AppToServerCommandReply"),proto.com.elarian.hera.proto.GenerateAuthTokenCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.GenerateAuthTokenCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.GenerateAuthTokenCommand.displayName="proto.com.elarian.hera.proto.GenerateAuthTokenCommand"),proto.com.elarian.hera.proto.GenerateAuthTokenReply=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.GenerateAuthTokenReply,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.GenerateAuthTokenReply.displayName="proto.com.elarian.hera.proto.GenerateAuthTokenReply"),proto.com.elarian.hera.proto.CreateHumanCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.CreateHumanCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.CreateHumanCommand.displayName="proto.com.elarian.hera.proto.CreateHumanCommand"),proto.com.elarian.hera.proto.AddReminderCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.AddReminderCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.AddReminderCommand.displayName="proto.com.elarian.hera.proto.AddReminderCommand"),proto.com.elarian.hera.proto.AddGroupReminderCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.AddGroupReminderCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.AddGroupReminderCommand.displayName="proto.com.elarian.hera.proto.AddGroupReminderCommand"),proto.com.elarian.hera.proto.CancelReminderCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.CancelReminderCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.CancelReminderCommand.displayName="proto.com.elarian.hera.proto.CancelReminderCommand"),proto.com.elarian.hera.proto.CancelGroupReminderCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.CancelGroupReminderCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.CancelGroupReminderCommand.displayName="proto.com.elarian.hera.proto.CancelGroupReminderCommand"),proto.com.elarian.hera.proto.UpdateGroupCommand=function(e){o.Message.initialize(this,e,0,-1,proto.com.elarian.hera.proto.UpdateGroupCommand.repeatedFields_,null)},n.inherits(proto.com.elarian.hera.proto.UpdateGroupCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.UpdateGroupCommand.displayName="proto.com.elarian.hera.proto.UpdateGroupCommand"),proto.com.elarian.hera.proto.DeleteGroupCommand=function(e){o.Message.initialize(this,e,0,-1,proto.com.elarian.hera.proto.DeleteGroupCommand.repeatedFields_,null)},n.inherits(proto.com.elarian.hera.proto.DeleteGroupCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.DeleteGroupCommand.displayName="proto.com.elarian.hera.proto.DeleteGroupCommand"),proto.com.elarian.hera.proto.UpdateMetadataCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.UpdateMetadataCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.UpdateMetadataCommand.displayName="proto.com.elarian.hera.proto.UpdateMetadataCommand"),proto.com.elarian.hera.proto.DeleteMetadataCommand=function(e){o.Message.initialize(this,e,0,-1,proto.com.elarian.hera.proto.DeleteMetadataCommand.repeatedFields_,null)},n.inherits(proto.com.elarian.hera.proto.DeleteMetadataCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.DeleteMetadataCommand.displayName="proto.com.elarian.hera.proto.DeleteMetadataCommand"),proto.com.elarian.hera.proto.UpdateStateReply=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.UpdateStateReply,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.UpdateStateReply.displayName="proto.com.elarian.hera.proto.UpdateStateReply"),proto.com.elarian.hera.proto.UpdateAppStateCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.UpdateAppStateCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.UpdateAppStateCommand.displayName="proto.com.elarian.hera.proto.UpdateAppStateCommand"),proto.com.elarian.hera.proto.DeleteAppStateCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.DeleteAppStateCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.DeleteAppStateCommand.displayName="proto.com.elarian.hera.proto.DeleteAppStateCommand"),proto.com.elarian.hera.proto.LeaseAppStateCommand=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.LeaseAppStateCommand,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.LeaseAppStateCommand.displayName="proto.com.elarian.hera.proto.LeaseAppStateCommand"),proto.com.elarian.hera.proto.LeaseAppStateReply=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.LeaseAppStateReply,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.LeaseAppStateReply.displayName="proto.com.elarian.hera.proto.LeaseAppStateReply"),proto.com.elarian.hera.proto.GroupCommandReply=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.GroupCommandReply,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.GroupCommandReply.displayName="proto.com.elarian.hera.proto.GroupCommandReply"),proto.com.elarian.hera.proto.ServerToAppNotification=function(e){o.Message.initialize(this,e,0,-1,null,proto.com.elarian.hera.proto.ServerToAppNotification.oneofGroups_)},n.inherits(proto.com.elarian.hera.proto.ServerToAppNotification,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.ServerToAppNotification.displayName="proto.com.elarian.hera.proto.ServerToAppNotification"),proto.com.elarian.hera.proto.ServerToAppNotificationReply=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.ServerToAppNotificationReply,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.ServerToAppNotificationReply.displayName="proto.com.elarian.hera.proto.ServerToAppNotificationReply"),proto.com.elarian.hera.proto.ReminderNotification=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.ReminderNotification,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.ReminderNotification.displayName="proto.com.elarian.hera.proto.ReminderNotification"),o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.toObject=function(e){return proto.com.elarian.hera.proto.AppConnectionMetadata.toObject(e,this)},proto.com.elarian.hera.proto.AppConnectionMetadata.toObject=function(e,t){var r,n={orgId:o.Message.getFieldWithDefault(t,1,""),appId:o.Message.getFieldWithDefault(t,2,""),apiKey:(r=t.getApiKey())&&p.StringValue.toObject(e,r),authToken:(r=t.getAuthToken())&&p.StringValue.toObject(e,r),simplexMode:o.Message.getBooleanFieldWithDefault(t,5,!1),simulatorMode:o.Message.getBooleanFieldWithDefault(t,6,!1)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.AppConnectionMetadata.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.AppConnectionMetadata;return proto.com.elarian.hera.proto.AppConnectionMetadata.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.AppConnectionMetadata.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setOrgId(r);break;case 2:r=t.readString(),e.setAppId(r);break;case 3:r=new p.StringValue,t.readMessage(r,p.StringValue.deserializeBinaryFromReader),e.setApiKey(r);break;case 4:r=new p.StringValue,t.readMessage(r,p.StringValue.deserializeBinaryFromReader),e.setAuthToken(r);break;case 5:r=t.readBool(),e.setSimplexMode(r);break;case 6:r=t.readBool(),e.setSimulatorMode(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.AppConnectionMetadata.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.AppConnectionMetadata.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOrgId()).length>0&&t.writeString(1,r),(r=e.getAppId()).length>0&&t.writeString(2,r),null!=(r=e.getApiKey())&&t.writeMessage(3,r,p.StringValue.serializeBinaryToWriter),null!=(r=e.getAuthToken())&&t.writeMessage(4,r,p.StringValue.serializeBinaryToWriter),(r=e.getSimplexMode())&&t.writeBool(5,r),(r=e.getSimulatorMode())&&t.writeBool(6,r)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.getOrgId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.setOrgId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.getAppId=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.setAppId=function(e){return o.Message.setProto3StringField(this,2,e)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.getApiKey=function(){return o.Message.getWrapperField(this,p.StringValue,3)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.setApiKey=function(e){return o.Message.setWrapperField(this,3,e)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.clearApiKey=function(){return this.setApiKey(void 0)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.hasApiKey=function(){return null!=o.Message.getField(this,3)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.getAuthToken=function(){return o.Message.getWrapperField(this,p.StringValue,4)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.setAuthToken=function(e){return o.Message.setWrapperField(this,4,e)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.clearAuthToken=function(){return this.setAuthToken(void 0)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.hasAuthToken=function(){return null!=o.Message.getField(this,4)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.getSimplexMode=function(){return o.Message.getBooleanFieldWithDefault(this,5,!1)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.setSimplexMode=function(e){return o.Message.setProto3BooleanField(this,5,e)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.getSimulatorMode=function(){return o.Message.getBooleanFieldWithDefault(this,6,!1)},proto.com.elarian.hera.proto.AppConnectionMetadata.prototype.setSimulatorMode=function(e){return o.Message.setProto3BooleanField(this,6,e)},proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_=[[1,2,3,4,5,6,7,8,9,10,11,12,13]],proto.com.elarian.hera.proto.AppToServerCommand.EntryCase={ENTRY_NOT_SET:0,GENERATE_AUTH_TOKEN:1,CREATE_HUMAN:2,ADD_REMINDER:3,ADD_GROUP_REMINDER:4,CANCEL_REMINDER:5,CANCEL_GROUP_REMINDER:6,UPDATE_GROUP:7,DELETE_GROUP:8,UPDATE_METADATA:9,DELETE_METADATA:10,LEASE_APP_STATE:11,UPDATE_APP_STATE:12,DELETE_APP_STATE:13},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getEntryCase=function(){return o.Message.computeOneofCase(this,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0])},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.AppToServerCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.AppToServerCommand.toObject(e,this)},proto.com.elarian.hera.proto.AppToServerCommand.toObject=function(e,t){var r,o={generateAuthToken:(r=t.getGenerateAuthToken())&&proto.com.elarian.hera.proto.GenerateAuthTokenCommand.toObject(e,r),createHuman:(r=t.getCreateHuman())&&proto.com.elarian.hera.proto.CreateHumanCommand.toObject(e,r),addReminder:(r=t.getAddReminder())&&proto.com.elarian.hera.proto.AddReminderCommand.toObject(e,r),addGroupReminder:(r=t.getAddGroupReminder())&&proto.com.elarian.hera.proto.AddGroupReminderCommand.toObject(e,r),cancelReminder:(r=t.getCancelReminder())&&proto.com.elarian.hera.proto.CancelReminderCommand.toObject(e,r),cancelGroupReminder:(r=t.getCancelGroupReminder())&&proto.com.elarian.hera.proto.CancelGroupReminderCommand.toObject(e,r),updateGroup:(r=t.getUpdateGroup())&&proto.com.elarian.hera.proto.UpdateGroupCommand.toObject(e,r),deleteGroup:(r=t.getDeleteGroup())&&proto.com.elarian.hera.proto.DeleteGroupCommand.toObject(e,r),updateMetadata:(r=t.getUpdateMetadata())&&proto.com.elarian.hera.proto.UpdateMetadataCommand.toObject(e,r),deleteMetadata:(r=t.getDeleteMetadata())&&proto.com.elarian.hera.proto.DeleteMetadataCommand.toObject(e,r),leaseAppState:(r=t.getLeaseAppState())&&proto.com.elarian.hera.proto.LeaseAppStateCommand.toObject(e,r),updateAppState:(r=t.getUpdateAppState())&&proto.com.elarian.hera.proto.UpdateAppStateCommand.toObject(e,r),deleteAppState:(r=t.getDeleteAppState())&&proto.com.elarian.hera.proto.DeleteAppStateCommand.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.com.elarian.hera.proto.AppToServerCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.AppToServerCommand;return proto.com.elarian.hera.proto.AppToServerCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.AppToServerCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.com.elarian.hera.proto.GenerateAuthTokenCommand;t.readMessage(r,proto.com.elarian.hera.proto.GenerateAuthTokenCommand.deserializeBinaryFromReader),e.setGenerateAuthToken(r);break;case 2:r=new proto.com.elarian.hera.proto.CreateHumanCommand,t.readMessage(r,proto.com.elarian.hera.proto.CreateHumanCommand.deserializeBinaryFromReader),e.setCreateHuman(r);break;case 3:r=new proto.com.elarian.hera.proto.AddReminderCommand,t.readMessage(r,proto.com.elarian.hera.proto.AddReminderCommand.deserializeBinaryFromReader),e.setAddReminder(r);break;case 4:r=new proto.com.elarian.hera.proto.AddGroupReminderCommand,t.readMessage(r,proto.com.elarian.hera.proto.AddGroupReminderCommand.deserializeBinaryFromReader),e.setAddGroupReminder(r);break;case 5:r=new proto.com.elarian.hera.proto.CancelReminderCommand,t.readMessage(r,proto.com.elarian.hera.proto.CancelReminderCommand.deserializeBinaryFromReader),e.setCancelReminder(r);break;case 6:r=new proto.com.elarian.hera.proto.CancelGroupReminderCommand,t.readMessage(r,proto.com.elarian.hera.proto.CancelGroupReminderCommand.deserializeBinaryFromReader),e.setCancelGroupReminder(r);break;case 7:r=new proto.com.elarian.hera.proto.UpdateGroupCommand,t.readMessage(r,proto.com.elarian.hera.proto.UpdateGroupCommand.deserializeBinaryFromReader),e.setUpdateGroup(r);break;case 8:r=new proto.com.elarian.hera.proto.DeleteGroupCommand,t.readMessage(r,proto.com.elarian.hera.proto.DeleteGroupCommand.deserializeBinaryFromReader),e.setDeleteGroup(r);break;case 9:r=new proto.com.elarian.hera.proto.UpdateMetadataCommand,t.readMessage(r,proto.com.elarian.hera.proto.UpdateMetadataCommand.deserializeBinaryFromReader),e.setUpdateMetadata(r);break;case 10:r=new proto.com.elarian.hera.proto.DeleteMetadataCommand,t.readMessage(r,proto.com.elarian.hera.proto.DeleteMetadataCommand.deserializeBinaryFromReader),e.setDeleteMetadata(r);break;case 11:r=new proto.com.elarian.hera.proto.LeaseAppStateCommand,t.readMessage(r,proto.com.elarian.hera.proto.LeaseAppStateCommand.deserializeBinaryFromReader),e.setLeaseAppState(r);break;case 12:r=new proto.com.elarian.hera.proto.UpdateAppStateCommand,t.readMessage(r,proto.com.elarian.hera.proto.UpdateAppStateCommand.deserializeBinaryFromReader),e.setUpdateAppState(r);break;case 13:r=new proto.com.elarian.hera.proto.DeleteAppStateCommand,t.readMessage(r,proto.com.elarian.hera.proto.DeleteAppStateCommand.deserializeBinaryFromReader),e.setDeleteAppState(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.AppToServerCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.AppToServerCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.AppToServerCommand.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getGenerateAuthToken())&&t.writeMessage(1,r,proto.com.elarian.hera.proto.GenerateAuthTokenCommand.serializeBinaryToWriter),null!=(r=e.getCreateHuman())&&t.writeMessage(2,r,proto.com.elarian.hera.proto.CreateHumanCommand.serializeBinaryToWriter),null!=(r=e.getAddReminder())&&t.writeMessage(3,r,proto.com.elarian.hera.proto.AddReminderCommand.serializeBinaryToWriter),null!=(r=e.getAddGroupReminder())&&t.writeMessage(4,r,proto.com.elarian.hera.proto.AddGroupReminderCommand.serializeBinaryToWriter),null!=(r=e.getCancelReminder())&&t.writeMessage(5,r,proto.com.elarian.hera.proto.CancelReminderCommand.serializeBinaryToWriter),null!=(r=e.getCancelGroupReminder())&&t.writeMessage(6,r,proto.com.elarian.hera.proto.CancelGroupReminderCommand.serializeBinaryToWriter),null!=(r=e.getUpdateGroup())&&t.writeMessage(7,r,proto.com.elarian.hera.proto.UpdateGroupCommand.serializeBinaryToWriter),null!=(r=e.getDeleteGroup())&&t.writeMessage(8,r,proto.com.elarian.hera.proto.DeleteGroupCommand.serializeBinaryToWriter),null!=(r=e.getUpdateMetadata())&&t.writeMessage(9,r,proto.com.elarian.hera.proto.UpdateMetadataCommand.serializeBinaryToWriter),null!=(r=e.getDeleteMetadata())&&t.writeMessage(10,r,proto.com.elarian.hera.proto.DeleteMetadataCommand.serializeBinaryToWriter),null!=(r=e.getLeaseAppState())&&t.writeMessage(11,r,proto.com.elarian.hera.proto.LeaseAppStateCommand.serializeBinaryToWriter),null!=(r=e.getUpdateAppState())&&t.writeMessage(12,r,proto.com.elarian.hera.proto.UpdateAppStateCommand.serializeBinaryToWriter),null!=(r=e.getDeleteAppState())&&t.writeMessage(13,r,proto.com.elarian.hera.proto.DeleteAppStateCommand.serializeBinaryToWriter)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getGenerateAuthToken=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.GenerateAuthTokenCommand,1)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setGenerateAuthToken=function(e){return o.Message.setOneofWrapperField(this,1,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearGenerateAuthToken=function(){return this.setGenerateAuthToken(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasGenerateAuthToken=function(){return null!=o.Message.getField(this,1)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getCreateHuman=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.CreateHumanCommand,2)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setCreateHuman=function(e){return o.Message.setOneofWrapperField(this,2,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearCreateHuman=function(){return this.setCreateHuman(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasCreateHuman=function(){return null!=o.Message.getField(this,2)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getAddReminder=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.AddReminderCommand,3)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setAddReminder=function(e){return o.Message.setOneofWrapperField(this,3,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearAddReminder=function(){return this.setAddReminder(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasAddReminder=function(){return null!=o.Message.getField(this,3)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getAddGroupReminder=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.AddGroupReminderCommand,4)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setAddGroupReminder=function(e){return o.Message.setOneofWrapperField(this,4,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearAddGroupReminder=function(){return this.setAddGroupReminder(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasAddGroupReminder=function(){return null!=o.Message.getField(this,4)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getCancelReminder=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.CancelReminderCommand,5)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setCancelReminder=function(e){return o.Message.setOneofWrapperField(this,5,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearCancelReminder=function(){return this.setCancelReminder(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasCancelReminder=function(){return null!=o.Message.getField(this,5)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getCancelGroupReminder=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.CancelGroupReminderCommand,6)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setCancelGroupReminder=function(e){return o.Message.setOneofWrapperField(this,6,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearCancelGroupReminder=function(){return this.setCancelGroupReminder(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasCancelGroupReminder=function(){return null!=o.Message.getField(this,6)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getUpdateGroup=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.UpdateGroupCommand,7)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setUpdateGroup=function(e){return o.Message.setOneofWrapperField(this,7,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearUpdateGroup=function(){return this.setUpdateGroup(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasUpdateGroup=function(){return null!=o.Message.getField(this,7)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getDeleteGroup=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.DeleteGroupCommand,8)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setDeleteGroup=function(e){return o.Message.setOneofWrapperField(this,8,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearDeleteGroup=function(){return this.setDeleteGroup(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasDeleteGroup=function(){return null!=o.Message.getField(this,8)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getUpdateMetadata=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.UpdateMetadataCommand,9)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setUpdateMetadata=function(e){return o.Message.setOneofWrapperField(this,9,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearUpdateMetadata=function(){return this.setUpdateMetadata(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasUpdateMetadata=function(){return null!=o.Message.getField(this,9)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getDeleteMetadata=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.DeleteMetadataCommand,10)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setDeleteMetadata=function(e){return o.Message.setOneofWrapperField(this,10,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearDeleteMetadata=function(){return this.setDeleteMetadata(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasDeleteMetadata=function(){return null!=o.Message.getField(this,10)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getLeaseAppState=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.LeaseAppStateCommand,11)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setLeaseAppState=function(e){return o.Message.setOneofWrapperField(this,11,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearLeaseAppState=function(){return this.setLeaseAppState(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasLeaseAppState=function(){return null!=o.Message.getField(this,11)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getUpdateAppState=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.UpdateAppStateCommand,12)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setUpdateAppState=function(e){return o.Message.setOneofWrapperField(this,12,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearUpdateAppState=function(){return this.setUpdateAppState(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasUpdateAppState=function(){return null!=o.Message.getField(this,12)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.getDeleteAppState=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.DeleteAppStateCommand,13)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.setDeleteAppState=function(e){return o.Message.setOneofWrapperField(this,13,proto.com.elarian.hera.proto.AppToServerCommand.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.clearDeleteAppState=function(){return this.setDeleteAppState(void 0)},proto.com.elarian.hera.proto.AppToServerCommand.prototype.hasDeleteAppState=function(){return null!=o.Message.getField(this,13)},proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_=[[1,2,3,4]],proto.com.elarian.hera.proto.AppToServerCommandReply.EntryCase={ENTRY_NOT_SET:0,GENERATE_AUTH_TOKEN:1,UPDATE_STATE:2,LEASE_APP_STATE:3,GROUP_COMMAND:4},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.getEntryCase=function(){return o.Message.computeOneofCase(this,proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_[0])},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.toObject=function(e){return proto.com.elarian.hera.proto.AppToServerCommandReply.toObject(e,this)},proto.com.elarian.hera.proto.AppToServerCommandReply.toObject=function(e,t){var r,o={generateAuthToken:(r=t.getGenerateAuthToken())&&proto.com.elarian.hera.proto.GenerateAuthTokenReply.toObject(e,r),updateState:(r=t.getUpdateState())&&proto.com.elarian.hera.proto.UpdateStateReply.toObject(e,r),leaseAppState:(r=t.getLeaseAppState())&&proto.com.elarian.hera.proto.LeaseAppStateReply.toObject(e,r),groupCommand:(r=t.getGroupCommand())&&proto.com.elarian.hera.proto.GroupCommandReply.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.com.elarian.hera.proto.AppToServerCommandReply.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.AppToServerCommandReply;return proto.com.elarian.hera.proto.AppToServerCommandReply.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.AppToServerCommandReply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.com.elarian.hera.proto.GenerateAuthTokenReply;t.readMessage(r,proto.com.elarian.hera.proto.GenerateAuthTokenReply.deserializeBinaryFromReader),e.setGenerateAuthToken(r);break;case 2:r=new proto.com.elarian.hera.proto.UpdateStateReply,t.readMessage(r,proto.com.elarian.hera.proto.UpdateStateReply.deserializeBinaryFromReader),e.setUpdateState(r);break;case 3:r=new proto.com.elarian.hera.proto.LeaseAppStateReply,t.readMessage(r,proto.com.elarian.hera.proto.LeaseAppStateReply.deserializeBinaryFromReader),e.setLeaseAppState(r);break;case 4:r=new proto.com.elarian.hera.proto.GroupCommandReply,t.readMessage(r,proto.com.elarian.hera.proto.GroupCommandReply.deserializeBinaryFromReader),e.setGroupCommand(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.AppToServerCommandReply.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.AppToServerCommandReply.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getGenerateAuthToken())&&t.writeMessage(1,r,proto.com.elarian.hera.proto.GenerateAuthTokenReply.serializeBinaryToWriter),null!=(r=e.getUpdateState())&&t.writeMessage(2,r,proto.com.elarian.hera.proto.UpdateStateReply.serializeBinaryToWriter),null!=(r=e.getLeaseAppState())&&t.writeMessage(3,r,proto.com.elarian.hera.proto.LeaseAppStateReply.serializeBinaryToWriter),null!=(r=e.getGroupCommand())&&t.writeMessage(4,r,proto.com.elarian.hera.proto.GroupCommandReply.serializeBinaryToWriter)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.getGenerateAuthToken=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.GenerateAuthTokenReply,1)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.setGenerateAuthToken=function(e){return o.Message.setOneofWrapperField(this,1,proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.clearGenerateAuthToken=function(){return this.setGenerateAuthToken(void 0)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.hasGenerateAuthToken=function(){return null!=o.Message.getField(this,1)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.getUpdateState=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.UpdateStateReply,2)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.setUpdateState=function(e){return o.Message.setOneofWrapperField(this,2,proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.clearUpdateState=function(){return this.setUpdateState(void 0)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.hasUpdateState=function(){return null!=o.Message.getField(this,2)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.getLeaseAppState=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.LeaseAppStateReply,3)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.setLeaseAppState=function(e){return o.Message.setOneofWrapperField(this,3,proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.clearLeaseAppState=function(){return this.setLeaseAppState(void 0)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.hasLeaseAppState=function(){return null!=o.Message.getField(this,3)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.getGroupCommand=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.GroupCommandReply,4)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.setGroupCommand=function(e){return o.Message.setOneofWrapperField(this,4,proto.com.elarian.hera.proto.AppToServerCommandReply.oneofGroups_[0],e)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.clearGroupCommand=function(){return this.setGroupCommand(void 0)},proto.com.elarian.hera.proto.AppToServerCommandReply.prototype.hasGroupCommand=function(){return null!=o.Message.getField(this,4)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.GenerateAuthTokenCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.GenerateAuthTokenCommand.toObject(e,this)},proto.com.elarian.hera.proto.GenerateAuthTokenCommand.toObject=function(e,t){var r={};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.GenerateAuthTokenCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.GenerateAuthTokenCommand;return proto.com.elarian.hera.proto.GenerateAuthTokenCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.GenerateAuthTokenCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)t.getFieldNumber(),t.skipField();return e},proto.com.elarian.hera.proto.GenerateAuthTokenCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.GenerateAuthTokenCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.GenerateAuthTokenCommand.serializeBinaryToWriter=function(e,t){},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.toObject=function(e){return proto.com.elarian.hera.proto.GenerateAuthTokenReply.toObject(e,this)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.toObject=function(e,t){var r,n={token:o.Message.getFieldWithDefault(t,1,""),lifetime:(r=t.getLifetime())&&i.Duration.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.GenerateAuthTokenReply.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.GenerateAuthTokenReply;return proto.com.elarian.hera.proto.GenerateAuthTokenReply.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setToken(r);break;case 2:r=new i.Duration,t.readMessage(r,i.Duration.deserializeBinaryFromReader),e.setLifetime(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.GenerateAuthTokenReply.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.GenerateAuthTokenReply.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getToken()).length>0&&t.writeString(1,r),null!=(r=e.getLifetime())&&t.writeMessage(2,r,i.Duration.serializeBinaryToWriter)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.getToken=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.setToken=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.getLifetime=function(){return o.Message.getWrapperField(this,i.Duration,2)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.setLifetime=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.clearLifetime=function(){return this.setLifetime(void 0)},proto.com.elarian.hera.proto.GenerateAuthTokenReply.prototype.hasLifetime=function(){return null!=o.Message.getField(this,2)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.CreateHumanCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.CreateHumanCommand.toObject(e,this)},proto.com.elarian.hera.proto.CreateHumanCommand.toObject=function(e,t){var r={humanId:o.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.CreateHumanCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.CreateHumanCommand;return proto.com.elarian.hera.proto.CreateHumanCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.CreateHumanCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readString();e.setHumanId(r)}else t.skipField();return e},proto.com.elarian.hera.proto.CreateHumanCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.CreateHumanCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.CreateHumanCommand.serializeBinaryToWriter=function(e,t){var r;(r=e.getHumanId()).length>0&&t.writeString(1,r)},proto.com.elarian.hera.proto.CreateHumanCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.CreateHumanCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.AddReminderCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.AddReminderCommand.toObject(e,this)},proto.com.elarian.hera.proto.AddReminderCommand.toObject=function(e,t){var r,n={humanId:o.Message.getFieldWithDefault(t,1,""),reminder:(r=t.getReminder())&&l.Reminder.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.AddReminderCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.AddReminderCommand;return proto.com.elarian.hera.proto.AddReminderCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.AddReminderCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=new l.Reminder,t.readMessage(r,l.Reminder.deserializeBinaryFromReader),e.setReminder(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.AddReminderCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.AddReminderCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.AddReminderCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),null!=(r=e.getReminder())&&t.writeMessage(2,r,l.Reminder.serializeBinaryToWriter)},proto.com.elarian.hera.proto.AddReminderCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.AddReminderCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.AddReminderCommand.prototype.getReminder=function(){return o.Message.getWrapperField(this,l.Reminder,2)},proto.com.elarian.hera.proto.AddReminderCommand.prototype.setReminder=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.AddReminderCommand.prototype.clearReminder=function(){return this.setReminder(void 0)},proto.com.elarian.hera.proto.AddReminderCommand.prototype.hasReminder=function(){return null!=o.Message.getField(this,2)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.AddGroupReminderCommand.toObject(e,this)},proto.com.elarian.hera.proto.AddGroupReminderCommand.toObject=function(e,t){var r,o={group:(r=t.getGroup())&&g.IndexMapping.toObject(e,r),reminder:(r=t.getReminder())&&l.Reminder.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.com.elarian.hera.proto.AddGroupReminderCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.AddGroupReminderCommand;return proto.com.elarian.hera.proto.AddGroupReminderCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.AddGroupReminderCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new g.IndexMapping;t.readMessage(r,g.IndexMapping.deserializeBinaryFromReader),e.setGroup(r);break;case 2:r=new l.Reminder,t.readMessage(r,l.Reminder.deserializeBinaryFromReader),e.setReminder(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.AddGroupReminderCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.AddGroupReminderCommand.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getGroup())&&t.writeMessage(1,r,g.IndexMapping.serializeBinaryToWriter),null!=(r=e.getReminder())&&t.writeMessage(2,r,l.Reminder.serializeBinaryToWriter)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.getGroup=function(){return o.Message.getWrapperField(this,g.IndexMapping,1)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.setGroup=function(e){return o.Message.setWrapperField(this,1,e)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.clearGroup=function(){return this.setGroup(void 0)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.hasGroup=function(){return null!=o.Message.getField(this,1)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.getReminder=function(){return o.Message.getWrapperField(this,l.Reminder,2)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.setReminder=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.clearReminder=function(){return this.setReminder(void 0)},proto.com.elarian.hera.proto.AddGroupReminderCommand.prototype.hasReminder=function(){return null!=o.Message.getField(this,2)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.CancelReminderCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.CancelReminderCommand.toObject(e,this)},proto.com.elarian.hera.proto.CancelReminderCommand.toObject=function(e,t){var r={humanId:o.Message.getFieldWithDefault(t,1,""),key:o.Message.getFieldWithDefault(t,2,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.CancelReminderCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.CancelReminderCommand;return proto.com.elarian.hera.proto.CancelReminderCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.CancelReminderCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=t.readString(),e.setKey(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.CancelReminderCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.CancelReminderCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.CancelReminderCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),(r=e.getKey()).length>0&&t.writeString(2,r)},proto.com.elarian.hera.proto.CancelReminderCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.CancelReminderCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.CancelReminderCommand.prototype.getKey=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.CancelReminderCommand.prototype.setKey=function(e){return o.Message.setProto3StringField(this,2,e)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.CancelGroupReminderCommand.toObject(e,this)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.toObject=function(e,t){var r,n={group:(r=t.getGroup())&&g.IndexMapping.toObject(e,r),key:o.Message.getFieldWithDefault(t,2,"")};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.CancelGroupReminderCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.CancelGroupReminderCommand;return proto.com.elarian.hera.proto.CancelGroupReminderCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new g.IndexMapping;t.readMessage(r,g.IndexMapping.deserializeBinaryFromReader),e.setGroup(r);break;case 2:r=t.readString(),e.setKey(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.CancelGroupReminderCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.CancelGroupReminderCommand.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getGroup())&&t.writeMessage(1,r,g.IndexMapping.serializeBinaryToWriter),(r=e.getKey()).length>0&&t.writeString(2,r)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.getGroup=function(){return o.Message.getWrapperField(this,g.IndexMapping,1)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.setGroup=function(e){return o.Message.setWrapperField(this,1,e)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.clearGroup=function(){return this.setGroup(void 0)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.hasGroup=function(){return null!=o.Message.getField(this,1)},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.getKey=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.CancelGroupReminderCommand.prototype.setKey=function(e){return o.Message.setProto3StringField(this,2,e)},proto.com.elarian.hera.proto.UpdateGroupCommand.repeatedFields_=[2],o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.UpdateGroupCommand.toObject(e,this)},proto.com.elarian.hera.proto.UpdateGroupCommand.toObject=function(e,t){var r={humanId:o.Message.getFieldWithDefault(t,1,""),updatesList:o.Message.toObjectList(t.getUpdatesList(),g.GroupIndex.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.UpdateGroupCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.UpdateGroupCommand;return proto.com.elarian.hera.proto.UpdateGroupCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.UpdateGroupCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=new g.GroupIndex,t.readMessage(r,g.GroupIndex.deserializeBinaryFromReader),e.addUpdates(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.UpdateGroupCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.UpdateGroupCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),(r=e.getUpdatesList()).length>0&&t.writeRepeatedMessage(2,r,g.GroupIndex.serializeBinaryToWriter)},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.getUpdatesList=function(){return o.Message.getRepeatedWrapperField(this,g.GroupIndex,2)},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.setUpdatesList=function(e){return o.Message.setRepeatedWrapperField(this,2,e)},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.addUpdates=function(e,t){return o.Message.addToRepeatedWrapperField(this,2,e,proto.com.elarian.hera.proto.GroupIndex,t)},proto.com.elarian.hera.proto.UpdateGroupCommand.prototype.clearUpdatesList=function(){return this.setUpdatesList([])},proto.com.elarian.hera.proto.DeleteGroupCommand.repeatedFields_=[2],o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.DeleteGroupCommand.toObject(e,this)},proto.com.elarian.hera.proto.DeleteGroupCommand.toObject=function(e,t){var r,n={humanId:o.Message.getFieldWithDefault(t,1,""),deletionsList:null==(r=o.Message.getRepeatedField(t,2))?void 0:r};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.DeleteGroupCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.DeleteGroupCommand;return proto.com.elarian.hera.proto.DeleteGroupCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.DeleteGroupCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=t.readString(),e.addDeletions(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.DeleteGroupCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.DeleteGroupCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),(r=e.getDeletionsList()).length>0&&t.writeRepeatedString(2,r)},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.getDeletionsList=function(){return o.Message.getRepeatedField(this,2)},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.setDeletionsList=function(e){return o.Message.setField(this,2,e||[])},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.addDeletions=function(e,t){return o.Message.addToRepeatedField(this,2,e,t)},proto.com.elarian.hera.proto.DeleteGroupCommand.prototype.clearDeletionsList=function(){return this.setDeletionsList([])},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.UpdateMetadataCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.UpdateMetadataCommand.toObject(e,this)},proto.com.elarian.hera.proto.UpdateMetadataCommand.toObject=function(e,t){var r,n={humanId:o.Message.getFieldWithDefault(t,1,""),updatesMap:(r=t.getUpdatesMap())?r.toObject(e,proto.com.elarian.hera.proto.DataMapValue.toObject):[]};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.UpdateMetadataCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.UpdateMetadataCommand;return proto.com.elarian.hera.proto.UpdateMetadataCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.UpdateMetadataCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=e.getUpdatesMap(),t.readMessage(r,(function(e,t){o.Map.deserializeBinary(e,t,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readMessage,proto.com.elarian.hera.proto.DataMapValue.deserializeBinaryFromReader,"",new proto.com.elarian.hera.proto.DataMapValue)}));break;default:t.skipField()}return e},proto.com.elarian.hera.proto.UpdateMetadataCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.UpdateMetadataCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.UpdateMetadataCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),(r=e.getUpdatesMap(!0))&&r.getLength()>0&&r.serializeBinary(2,t,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeMessage,proto.com.elarian.hera.proto.DataMapValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.UpdateMetadataCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.UpdateMetadataCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.UpdateMetadataCommand.prototype.getUpdatesMap=function(e){return o.Message.getMapField(this,2,e,proto.com.elarian.hera.proto.DataMapValue)},proto.com.elarian.hera.proto.UpdateMetadataCommand.prototype.clearUpdatesMap=function(){return this.getUpdatesMap().clear(),this},proto.com.elarian.hera.proto.DeleteMetadataCommand.repeatedFields_=[2],o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.DeleteMetadataCommand.toObject(e,this)},proto.com.elarian.hera.proto.DeleteMetadataCommand.toObject=function(e,t){var r,n={humanId:o.Message.getFieldWithDefault(t,1,""),deletionsList:null==(r=o.Message.getRepeatedField(t,2))?void 0:r};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.DeleteMetadataCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.DeleteMetadataCommand;return proto.com.elarian.hera.proto.DeleteMetadataCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.DeleteMetadataCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=t.readString(),e.addDeletions(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.DeleteMetadataCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.DeleteMetadataCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),(r=e.getDeletionsList()).length>0&&t.writeRepeatedString(2,r)},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.getDeletionsList=function(){return o.Message.getRepeatedField(this,2)},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.setDeletionsList=function(e){return o.Message.setField(this,2,e||[])},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.addDeletions=function(e,t){return o.Message.addToRepeatedField(this,2,e,t)},proto.com.elarian.hera.proto.DeleteMetadataCommand.prototype.clearDeletionsList=function(){return this.setDeletionsList([])},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.UpdateStateReply.prototype.toObject=function(e){return proto.com.elarian.hera.proto.UpdateStateReply.toObject(e,this)},proto.com.elarian.hera.proto.UpdateStateReply.toObject=function(e,t){var r={status:o.Message.getBooleanFieldWithDefault(t,1,!1),description:o.Message.getFieldWithDefault(t,2,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.UpdateStateReply.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.UpdateStateReply;return proto.com.elarian.hera.proto.UpdateStateReply.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.UpdateStateReply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setStatus(r);break;case 2:r=t.readString(),e.setDescription(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.UpdateStateReply.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.UpdateStateReply.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.UpdateStateReply.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getStatus())&&t.writeBool(1,r),(r=e.getDescription()).length>0&&t.writeString(2,r)},proto.com.elarian.hera.proto.UpdateStateReply.prototype.getStatus=function(){return o.Message.getBooleanFieldWithDefault(this,1,!1)},proto.com.elarian.hera.proto.UpdateStateReply.prototype.setStatus=function(e){return o.Message.setProto3BooleanField(this,1,e)},proto.com.elarian.hera.proto.UpdateStateReply.prototype.getDescription=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.UpdateStateReply.prototype.setDescription=function(e){return o.Message.setProto3StringField(this,2,e)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.UpdateAppStateCommand.toObject(e,this)},proto.com.elarian.hera.proto.UpdateAppStateCommand.toObject=function(e,t){var r,n={humanId:o.Message.getFieldWithDefault(t,1,""),update:(r=t.getUpdate())&&g.DataMapValue.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.UpdateAppStateCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.UpdateAppStateCommand;return proto.com.elarian.hera.proto.UpdateAppStateCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.UpdateAppStateCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=new g.DataMapValue,t.readMessage(r,g.DataMapValue.deserializeBinaryFromReader),e.setUpdate(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.UpdateAppStateCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.UpdateAppStateCommand.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),null!=(r=e.getUpdate())&&t.writeMessage(2,r,g.DataMapValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.getUpdate=function(){return o.Message.getWrapperField(this,g.DataMapValue,2)},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.setUpdate=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.clearUpdate=function(){return this.setUpdate(void 0)},proto.com.elarian.hera.proto.UpdateAppStateCommand.prototype.hasUpdate=function(){return null!=o.Message.getField(this,2)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.DeleteAppStateCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.DeleteAppStateCommand.toObject(e,this)},proto.com.elarian.hera.proto.DeleteAppStateCommand.toObject=function(e,t){var r={humanId:o.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.DeleteAppStateCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.DeleteAppStateCommand;return proto.com.elarian.hera.proto.DeleteAppStateCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.DeleteAppStateCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readString();e.setHumanId(r)}else t.skipField();return e},proto.com.elarian.hera.proto.DeleteAppStateCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.DeleteAppStateCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.DeleteAppStateCommand.serializeBinaryToWriter=function(e,t){var r;(r=e.getHumanId()).length>0&&t.writeString(1,r)},proto.com.elarian.hera.proto.DeleteAppStateCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.DeleteAppStateCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.LeaseAppStateCommand.prototype.toObject=function(e){return proto.com.elarian.hera.proto.LeaseAppStateCommand.toObject(e,this)},proto.com.elarian.hera.proto.LeaseAppStateCommand.toObject=function(e,t){var r={humanId:o.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.LeaseAppStateCommand.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.LeaseAppStateCommand;return proto.com.elarian.hera.proto.LeaseAppStateCommand.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.LeaseAppStateCommand.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readString();e.setHumanId(r)}else t.skipField();return e},proto.com.elarian.hera.proto.LeaseAppStateCommand.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.LeaseAppStateCommand.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.LeaseAppStateCommand.serializeBinaryToWriter=function(e,t){var r;(r=e.getHumanId()).length>0&&t.writeString(1,r)},proto.com.elarian.hera.proto.LeaseAppStateCommand.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.LeaseAppStateCommand.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.toObject=function(e){return proto.com.elarian.hera.proto.LeaseAppStateReply.toObject(e,this)},proto.com.elarian.hera.proto.LeaseAppStateReply.toObject=function(e,t){var r,n={status:o.Message.getBooleanFieldWithDefault(t,1,!1),description:o.Message.getFieldWithDefault(t,2,""),state:(r=t.getState())&&g.DataMapValue.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.LeaseAppStateReply.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.LeaseAppStateReply;return proto.com.elarian.hera.proto.LeaseAppStateReply.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.LeaseAppStateReply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setStatus(r);break;case 2:r=t.readString(),e.setDescription(r);break;case 3:r=new g.DataMapValue,t.readMessage(r,g.DataMapValue.deserializeBinaryFromReader),e.setState(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.LeaseAppStateReply.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.LeaseAppStateReply.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getStatus())&&t.writeBool(1,r),(r=e.getDescription()).length>0&&t.writeString(2,r),null!=(r=e.getState())&&t.writeMessage(3,r,g.DataMapValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.getStatus=function(){return o.Message.getBooleanFieldWithDefault(this,1,!1)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.setStatus=function(e){return o.Message.setProto3BooleanField(this,1,e)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.getDescription=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.setDescription=function(e){return o.Message.setProto3StringField(this,2,e)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.getState=function(){return o.Message.getWrapperField(this,g.DataMapValue,3)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.setState=function(e){return o.Message.setWrapperField(this,3,e)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.clearState=function(){return this.setState(void 0)},proto.com.elarian.hera.proto.LeaseAppStateReply.prototype.hasState=function(){return null!=o.Message.getField(this,3)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.GroupCommandReply.prototype.toObject=function(e){return proto.com.elarian.hera.proto.GroupCommandReply.toObject(e,this)},proto.com.elarian.hera.proto.GroupCommandReply.toObject=function(e,t){var r,n={status:o.Message.getBooleanFieldWithDefault(t,1,!1),description:o.Message.getFieldWithDefault(t,2,""),workId:(r=t.getWorkId())&&p.StringValue.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.GroupCommandReply.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.GroupCommandReply;return proto.com.elarian.hera.proto.GroupCommandReply.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.GroupCommandReply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setStatus(r);break;case 2:r=t.readString(),e.setDescription(r);break;case 3:r=new p.StringValue,t.readMessage(r,p.StringValue.deserializeBinaryFromReader),e.setWorkId(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.GroupCommandReply.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.GroupCommandReply.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.GroupCommandReply.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getStatus())&&t.writeBool(1,r),(r=e.getDescription()).length>0&&t.writeString(2,r),null!=(r=e.getWorkId())&&t.writeMessage(3,r,p.StringValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.getStatus=function(){return o.Message.getBooleanFieldWithDefault(this,1,!1)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.setStatus=function(e){return o.Message.setProto3BooleanField(this,1,e)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.getDescription=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.GroupCommandReply.prototype.setDescription=function(e){return o.Message.setProto3StringField(this,2,e)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.getWorkId=function(){return o.Message.getWrapperField(this,p.StringValue,3)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.setWorkId=function(e){return o.Message.setWrapperField(this,3,e)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.clearWorkId=function(){return this.setWorkId(void 0)},proto.com.elarian.hera.proto.GroupCommandReply.prototype.hasWorkId=function(){return null!=o.Message.getField(this,3)},proto.com.elarian.hera.proto.ServerToAppNotification.oneofGroups_=[[6]],proto.com.elarian.hera.proto.ServerToAppNotification.EntryCase={ENTRY_NOT_SET:0,REMINDER:6},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getEntryCase=function(){return o.Message.computeOneofCase(this,proto.com.elarian.hera.proto.ServerToAppNotification.oneofGroups_[0])},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.ServerToAppNotification.prototype.toObject=function(e){return proto.com.elarian.hera.proto.ServerToAppNotification.toObject(e,this)},proto.com.elarian.hera.proto.ServerToAppNotification.toObject=function(e,t){var r,n={humanId:o.Message.getFieldWithDefault(t,1,""),orgId:o.Message.getFieldWithDefault(t,2,""),appId:o.Message.getFieldWithDefault(t,3,""),createdAt:(r=t.getCreatedAt())&&s.Timestamp.toObject(e,r),state:(r=t.getState())&&g.DataMapValue.toObject(e,r),reminder:(r=t.getReminder())&&proto.com.elarian.hera.proto.ReminderNotification.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.ServerToAppNotification.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.ServerToAppNotification;return proto.com.elarian.hera.proto.ServerToAppNotification.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.ServerToAppNotification.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setHumanId(r);break;case 2:r=t.readString(),e.setOrgId(r);break;case 3:r=t.readString(),e.setAppId(r);break;case 4:r=new s.Timestamp,t.readMessage(r,s.Timestamp.deserializeBinaryFromReader),e.setCreatedAt(r);break;case 5:r=new g.DataMapValue,t.readMessage(r,g.DataMapValue.deserializeBinaryFromReader),e.setState(r);break;case 6:r=new proto.com.elarian.hera.proto.ReminderNotification,t.readMessage(r,proto.com.elarian.hera.proto.ReminderNotification.deserializeBinaryFromReader),e.setReminder(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.ServerToAppNotification.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.ServerToAppNotification.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHumanId()).length>0&&t.writeString(1,r),(r=e.getOrgId()).length>0&&t.writeString(2,r),(r=e.getAppId()).length>0&&t.writeString(3,r),null!=(r=e.getCreatedAt())&&t.writeMessage(4,r,s.Timestamp.serializeBinaryToWriter),null!=(r=e.getState())&&t.writeMessage(5,r,g.DataMapValue.serializeBinaryToWriter),null!=(r=e.getReminder())&&t.writeMessage(6,r,proto.com.elarian.hera.proto.ReminderNotification.serializeBinaryToWriter)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getHumanId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.setHumanId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getOrgId=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.setOrgId=function(e){return o.Message.setProto3StringField(this,2,e)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getAppId=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.setAppId=function(e){return o.Message.setProto3StringField(this,3,e)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getCreatedAt=function(){return o.Message.getWrapperField(this,s.Timestamp,4)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.setCreatedAt=function(e){return o.Message.setWrapperField(this,4,e)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.clearCreatedAt=function(){return this.setCreatedAt(void 0)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.hasCreatedAt=function(){return null!=o.Message.getField(this,4)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getState=function(){return o.Message.getWrapperField(this,g.DataMapValue,5)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.setState=function(e){return o.Message.setWrapperField(this,5,e)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.clearState=function(){return this.setState(void 0)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.hasState=function(){return null!=o.Message.getField(this,5)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.getReminder=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.ReminderNotification,6)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.setReminder=function(e){return o.Message.setOneofWrapperField(this,6,proto.com.elarian.hera.proto.ServerToAppNotification.oneofGroups_[0],e)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.clearReminder=function(){return this.setReminder(void 0)},proto.com.elarian.hera.proto.ServerToAppNotification.prototype.hasReminder=function(){return null!=o.Message.getField(this,6)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.ServerToAppNotificationReply.prototype.toObject=function(e){return proto.com.elarian.hera.proto.ServerToAppNotificationReply.toObject(e,this)},proto.com.elarian.hera.proto.ServerToAppNotificationReply.toObject=function(e,t){var r,o={nextState:(r=t.getNextState())&&g.DataMapValue.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.com.elarian.hera.proto.ServerToAppNotificationReply.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.ServerToAppNotificationReply;return proto.com.elarian.hera.proto.ServerToAppNotificationReply.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.ServerToAppNotificationReply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=new g.DataMapValue;t.readMessage(r,g.DataMapValue.deserializeBinaryFromReader),e.setNextState(r)}else t.skipField();return e},proto.com.elarian.hera.proto.ServerToAppNotificationReply.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.ServerToAppNotificationReply.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.ServerToAppNotificationReply.serializeBinaryToWriter=function(e,t){var r;null!=(r=e.getNextState())&&t.writeMessage(1,r,g.DataMapValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.ServerToAppNotificationReply.prototype.getNextState=function(){return o.Message.getWrapperField(this,g.DataMapValue,1)},proto.com.elarian.hera.proto.ServerToAppNotificationReply.prototype.setNextState=function(e){return o.Message.setWrapperField(this,1,e)},proto.com.elarian.hera.proto.ServerToAppNotificationReply.prototype.clearNextState=function(){return this.setNextState(void 0)},proto.com.elarian.hera.proto.ServerToAppNotificationReply.prototype.hasNextState=function(){return null!=o.Message.getField(this,1)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.ReminderNotification.prototype.toObject=function(e){return proto.com.elarian.hera.proto.ReminderNotification.toObject(e,this)},proto.com.elarian.hera.proto.ReminderNotification.toObject=function(e,t){var r,o={reminder:(r=t.getReminder())&&l.Reminder.toObject(e,r),group:(r=t.getGroup())&&g.GroupIndex.toObject(e,r),workId:(r=t.getWorkId())&&p.StringValue.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.com.elarian.hera.proto.ReminderNotification.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.ReminderNotification;return proto.com.elarian.hera.proto.ReminderNotification.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.ReminderNotification.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new l.Reminder;t.readMessage(r,l.Reminder.deserializeBinaryFromReader),e.setReminder(r);break;case 2:r=new g.GroupIndex,t.readMessage(r,g.GroupIndex.deserializeBinaryFromReader),e.setGroup(r);break;case 3:r=new p.StringValue,t.readMessage(r,p.StringValue.deserializeBinaryFromReader),e.setWorkId(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.ReminderNotification.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.ReminderNotification.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.ReminderNotification.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getReminder())&&t.writeMessage(1,r,l.Reminder.serializeBinaryToWriter),null!=(r=e.getGroup())&&t.writeMessage(2,r,g.GroupIndex.serializeBinaryToWriter),null!=(r=e.getWorkId())&&t.writeMessage(3,r,p.StringValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.ReminderNotification.prototype.getReminder=function(){return o.Message.getWrapperField(this,l.Reminder,1)},proto.com.elarian.hera.proto.ReminderNotification.prototype.setReminder=function(e){return o.Message.setWrapperField(this,1,e)},proto.com.elarian.hera.proto.ReminderNotification.prototype.clearReminder=function(){return this.setReminder(void 0)},proto.com.elarian.hera.proto.ReminderNotification.prototype.hasReminder=function(){return null!=o.Message.getField(this,1)},proto.com.elarian.hera.proto.ReminderNotification.prototype.getGroup=function(){return o.Message.getWrapperField(this,g.GroupIndex,2)},proto.com.elarian.hera.proto.ReminderNotification.prototype.setGroup=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.ReminderNotification.prototype.clearGroup=function(){return this.setGroup(void 0)},proto.com.elarian.hera.proto.ReminderNotification.prototype.hasGroup=function(){return null!=o.Message.getField(this,2)},proto.com.elarian.hera.proto.ReminderNotification.prototype.getWorkId=function(){return o.Message.getWrapperField(this,p.StringValue,3)},proto.com.elarian.hera.proto.ReminderNotification.prototype.setWorkId=function(e){return o.Message.setWrapperField(this,3,e)},proto.com.elarian.hera.proto.ReminderNotification.prototype.clearWorkId=function(){return this.setWorkId(void 0)},proto.com.elarian.hera.proto.ReminderNotification.prototype.hasWorkId=function(){return null!=o.Message.getField(this,3)},n.object.extend(t,proto.com.elarian.hera.proto)},893:(e,t,r)=>{var o=r(19),n=o,a=Function("return this")(),i=r(469);n.object.extend(proto,i);var s=r(134);n.object.extend(proto,s),n.exportSymbol("proto.com.elarian.hera.proto.AppConnectionProps",null,a),n.exportSymbol("proto.com.elarian.hera.proto.DataMapValue",null,a),n.exportSymbol("proto.com.elarian.hera.proto.DataMapValue.ValueCase",null,a),n.exportSymbol("proto.com.elarian.hera.proto.GroupIndex",null,a),n.exportSymbol("proto.com.elarian.hera.proto.IndexMapping",null,a),proto.com.elarian.hera.proto.DataMapValue=function(e){o.Message.initialize(this,e,0,-1,null,proto.com.elarian.hera.proto.DataMapValue.oneofGroups_)},n.inherits(proto.com.elarian.hera.proto.DataMapValue,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.DataMapValue.displayName="proto.com.elarian.hera.proto.DataMapValue"),proto.com.elarian.hera.proto.IndexMapping=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.IndexMapping,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.IndexMapping.displayName="proto.com.elarian.hera.proto.IndexMapping"),proto.com.elarian.hera.proto.GroupIndex=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.GroupIndex,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.GroupIndex.displayName="proto.com.elarian.hera.proto.GroupIndex"),proto.com.elarian.hera.proto.AppConnectionProps=function(e){o.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.com.elarian.hera.proto.AppConnectionProps,o.Message),n.DEBUG&&!COMPILED&&(proto.com.elarian.hera.proto.AppConnectionProps.displayName="proto.com.elarian.hera.proto.AppConnectionProps"),proto.com.elarian.hera.proto.DataMapValue.oneofGroups_=[[2,3]],proto.com.elarian.hera.proto.DataMapValue.ValueCase={VALUE_NOT_SET:0,STRING_VAL:2,BYTES_VAL:3},proto.com.elarian.hera.proto.DataMapValue.prototype.getValueCase=function(){return o.Message.computeOneofCase(this,proto.com.elarian.hera.proto.DataMapValue.oneofGroups_[0])},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.DataMapValue.prototype.toObject=function(e){return proto.com.elarian.hera.proto.DataMapValue.toObject(e,this)},proto.com.elarian.hera.proto.DataMapValue.toObject=function(e,t){var r={stringVal:o.Message.getFieldWithDefault(t,2,""),bytesVal:t.getBytesVal_asB64()};return e&&(r.$jspbMessageInstance=t),r}),proto.com.elarian.hera.proto.DataMapValue.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.DataMapValue;return proto.com.elarian.hera.proto.DataMapValue.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.DataMapValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 2:var r=t.readString();e.setStringVal(r);break;case 3:r=t.readBytes(),e.setBytesVal(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.DataMapValue.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.DataMapValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.DataMapValue.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=o.Message.getField(e,2))&&t.writeString(2,r),null!=(r=o.Message.getField(e,3))&&t.writeBytes(3,r)},proto.com.elarian.hera.proto.DataMapValue.prototype.getStringVal=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.com.elarian.hera.proto.DataMapValue.prototype.setStringVal=function(e){return o.Message.setOneofField(this,2,proto.com.elarian.hera.proto.DataMapValue.oneofGroups_[0],e)},proto.com.elarian.hera.proto.DataMapValue.prototype.clearStringVal=function(){return o.Message.setOneofField(this,2,proto.com.elarian.hera.proto.DataMapValue.oneofGroups_[0],void 0)},proto.com.elarian.hera.proto.DataMapValue.prototype.hasStringVal=function(){return null!=o.Message.getField(this,2)},proto.com.elarian.hera.proto.DataMapValue.prototype.getBytesVal=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.com.elarian.hera.proto.DataMapValue.prototype.getBytesVal_asB64=function(){return o.Message.bytesAsB64(this.getBytesVal())},proto.com.elarian.hera.proto.DataMapValue.prototype.getBytesVal_asU8=function(){return o.Message.bytesAsU8(this.getBytesVal())},proto.com.elarian.hera.proto.DataMapValue.prototype.setBytesVal=function(e){return o.Message.setOneofField(this,3,proto.com.elarian.hera.proto.DataMapValue.oneofGroups_[0],e)},proto.com.elarian.hera.proto.DataMapValue.prototype.clearBytesVal=function(){return o.Message.setOneofField(this,3,proto.com.elarian.hera.proto.DataMapValue.oneofGroups_[0],void 0)},proto.com.elarian.hera.proto.DataMapValue.prototype.hasBytesVal=function(){return null!=o.Message.getField(this,3)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.IndexMapping.prototype.toObject=function(e){return proto.com.elarian.hera.proto.IndexMapping.toObject(e,this)},proto.com.elarian.hera.proto.IndexMapping.toObject=function(e,t){var r,n={key:o.Message.getFieldWithDefault(t,1,""),value:(r=t.getValue())&&i.StringValue.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.IndexMapping.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.IndexMapping;return proto.com.elarian.hera.proto.IndexMapping.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.IndexMapping.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setKey(r);break;case 2:r=new i.StringValue,t.readMessage(r,i.StringValue.deserializeBinaryFromReader),e.setValue(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.IndexMapping.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.IndexMapping.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.IndexMapping.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getKey()).length>0&&t.writeString(1,r),null!=(r=e.getValue())&&t.writeMessage(2,r,i.StringValue.serializeBinaryToWriter)},proto.com.elarian.hera.proto.IndexMapping.prototype.getKey=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.IndexMapping.prototype.setKey=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.IndexMapping.prototype.getValue=function(){return o.Message.getWrapperField(this,i.StringValue,2)},proto.com.elarian.hera.proto.IndexMapping.prototype.setValue=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.IndexMapping.prototype.clearValue=function(){return this.setValue(void 0)},proto.com.elarian.hera.proto.IndexMapping.prototype.hasValue=function(){return null!=o.Message.getField(this,2)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.GroupIndex.prototype.toObject=function(e){return proto.com.elarian.hera.proto.GroupIndex.toObject(e,this)},proto.com.elarian.hera.proto.GroupIndex.toObject=function(e,t){var r,o={mapping:(r=t.getMapping())&&proto.com.elarian.hera.proto.IndexMapping.toObject(e,r),expiresAt:(r=t.getExpiresAt())&&s.Timestamp.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.com.elarian.hera.proto.GroupIndex.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.GroupIndex;return proto.com.elarian.hera.proto.GroupIndex.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.GroupIndex.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.com.elarian.hera.proto.IndexMapping;t.readMessage(r,proto.com.elarian.hera.proto.IndexMapping.deserializeBinaryFromReader),e.setMapping(r);break;case 2:r=new s.Timestamp,t.readMessage(r,s.Timestamp.deserializeBinaryFromReader),e.setExpiresAt(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.GroupIndex.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.GroupIndex.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.GroupIndex.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getMapping())&&t.writeMessage(1,r,proto.com.elarian.hera.proto.IndexMapping.serializeBinaryToWriter),null!=(r=e.getExpiresAt())&&t.writeMessage(2,r,s.Timestamp.serializeBinaryToWriter)},proto.com.elarian.hera.proto.GroupIndex.prototype.getMapping=function(){return o.Message.getWrapperField(this,proto.com.elarian.hera.proto.IndexMapping,1)},proto.com.elarian.hera.proto.GroupIndex.prototype.setMapping=function(e){return o.Message.setWrapperField(this,1,e)},proto.com.elarian.hera.proto.GroupIndex.prototype.clearMapping=function(){return this.setMapping(void 0)},proto.com.elarian.hera.proto.GroupIndex.prototype.hasMapping=function(){return null!=o.Message.getField(this,1)},proto.com.elarian.hera.proto.GroupIndex.prototype.getExpiresAt=function(){return o.Message.getWrapperField(this,s.Timestamp,2)},proto.com.elarian.hera.proto.GroupIndex.prototype.setExpiresAt=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.GroupIndex.prototype.clearExpiresAt=function(){return this.setExpiresAt(void 0)},proto.com.elarian.hera.proto.GroupIndex.prototype.hasExpiresAt=function(){return null!=o.Message.getField(this,2)},o.Message.GENERATE_TO_OBJECT&&(proto.com.elarian.hera.proto.AppConnectionProps.prototype.toObject=function(e){return proto.com.elarian.hera.proto.AppConnectionProps.toObject(e,this)},proto.com.elarian.hera.proto.AppConnectionProps.toObject=function(e,t){var r,n={connectionId:o.Message.getFieldWithDefault(t,1,""),connectionTime:(r=t.getConnectionTime())&&s.Timestamp.toObject(e,r),ipAddress:(r=t.getIpAddress())&&i.StringValue.toObject(e,r),simplexMode:o.Message.getBooleanFieldWithDefault(t,4,!1)};return e&&(n.$jspbMessageInstance=t),n}),proto.com.elarian.hera.proto.AppConnectionProps.deserializeBinary=function(e){var t=new o.BinaryReader(e),r=new proto.com.elarian.hera.proto.AppConnectionProps;return proto.com.elarian.hera.proto.AppConnectionProps.deserializeBinaryFromReader(r,t)},proto.com.elarian.hera.proto.AppConnectionProps.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setConnectionId(r);break;case 2:r=new s.Timestamp,t.readMessage(r,s.Timestamp.deserializeBinaryFromReader),e.setConnectionTime(r);break;case 3:r=new i.StringValue,t.readMessage(r,i.StringValue.deserializeBinaryFromReader),e.setIpAddress(r);break;case 4:r=t.readBool(),e.setSimplexMode(r);break;default:t.skipField()}return e},proto.com.elarian.hera.proto.AppConnectionProps.prototype.serializeBinary=function(){var e=new o.BinaryWriter;return proto.com.elarian.hera.proto.AppConnectionProps.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.com.elarian.hera.proto.AppConnectionProps.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getConnectionId()).length>0&&t.writeString(1,r),null!=(r=e.getConnectionTime())&&t.writeMessage(2,r,s.Timestamp.serializeBinaryToWriter),null!=(r=e.getIpAddress())&&t.writeMessage(3,r,i.StringValue.serializeBinaryToWriter),(r=e.getSimplexMode())&&t.writeBool(4,r)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.getConnectionId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.com.elarian.hera.proto.AppConnectionProps.prototype.setConnectionId=function(e){return o.Message.setProto3StringField(this,1,e)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.getConnectionTime=function(){return o.Message.getWrapperField(this,s.Timestamp,2)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.setConnectionTime=function(e){return o.Message.setWrapperField(this,2,e)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.clearConnectionTime=function(){return this.setConnectionTime(void 0)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.hasConnectionTime=function(){return null!=o.Message.getField(this,2)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.getIpAddress=function(){return o.Message.getWrapperField(this,i.StringValue,3)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.setIpAddress=function(e){return o.Message.setWrapperField(this,3,e)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.clearIpAddress=function(){return this.setIpAddress(void 0)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.hasIpAddress=function(){return null!=o.Message.getField(this,3)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.getSimplexMode=function(){return o.Message.getBooleanFieldWithDefault(this,4,!1)},proto.com.elarian.hera.proto.AppConnectionProps.prototype.setSimplexMode=function(e){return o.Message.setProto3BooleanField(this,4,e)},n.object.extend(t,proto.com.elarian.hera.proto)},19:function(__unused_webpack_module,exports,__webpack_require__){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,r){e instanceof String&&(e=String(e));for(var o=e.length,n=0;n=o}}),"es6","es3"),$jscomp.polyfill("Array.prototype.find",(function(e){return e||function(e,t){return $jscomp.findInternal(this,e,t).v}}),"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",(function(e){return e||function(e,t){var r=$jscomp.checkStringArgs(this,e,"startsWith");e+="";var o=r.length,n=e.length;t=Math.max(0,Math.min(0|t,r.length));for(var a=0;a=n}}),"es6","es3"),$jscomp.polyfill("String.prototype.repeat",(function(e){return e||function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return r}}),"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(var o;e.length&&(o=e.shift());)e.length||void 0===t?r=r[o]&&r[o]!==Object.prototype[o]?r[o]:r[o]={}:r[o]=t},goog.define=function(e,t){if(!COMPILED){var r=goog.global.CLOSURE_UNCOMPILED_DEFINES,o=goog.global.CLOSURE_DEFINES;r&&void 0===r.nodeType&&Object.prototype.hasOwnProperty.call(r,e)?t=r[e]:o&&void 0===o.nodeType&&Object.prototype.hasOwnProperty.call(o,e)&&(t=o[e])}return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var r=e;(r=r.substring(0,r.lastIndexOf(".")))&&!goog.getObjectByName(r);)goog.implicitNamespaces_[r]=!0}goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if("string"!=typeof e||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){if(!COMPILED){if(e in goog.loadedModules_)return goog.loadedModules_[e].exports;if(!goog.implicitNamespaces_[e])return null!=(e=goog.getObjectByName(e))?e:null}return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&"function"==typeof e.getCurrentModulePath&&!!e.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(e in goog.loadedModules_)throw Error('Module with namespace "'+e+'" already exists.')}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||"function"!=typeof t.getCurrentModulePath)throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&null!=goog.getObjectByName(e)},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var r=0;r>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"==typeof e.clone)return e.clone();for(var r in t="array"==t?[]:{},e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e,t,r){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,r){if(!e)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(e,t){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var r=this.createRequiresTranspilation_();this.requiresTranspilation_=r.map,this.transpilationTarget_=this.transpilationTarget_||r.target}if(e in this.requiresTranspilation_)return!!this.requiresTranspilation_[e]||!(!goog.inHtmlDocument_()||"es6"!=t||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+e)},goog.Transpiler.prototype.transpile=function(e,t){return goog.transpile_(e,t,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(e){return e.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(e,t){function r(){o&&(goog.global.setTimeout(o,0),o=null)}var o=t;if(e.length){t=[];for(var n=0;n<\/script>",t.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(o):o)}else{var n=t.createElement("script");n.defer=goog.Dependency.defer_,n.async=!1,n.type="text/javascript",(o=goog.getScriptNonce())&&n.setAttribute("nonce",o),goog.DebugLoader_.IS_OLD_IE_?(e.pause(),n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(e.loaded(),e.resume())}):n.onload=function(){n.onload=null,e.loaded()},n.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,t.head.appendChild(n)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),e.loaded()):e.pause()},goog.Es6ModuleDependency=function(e,t,r,o,n){goog.Dependency.call(this,e,t,r,o,n)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(e){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?e.loaded():e.pause();else if(goog.inHtmlDocument_()){var t=goog.global.document,r=this;if(goog.isDocumentLoading_()){var o=function(e,r){e=r?'