(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.HelloRequest.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.HelloRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.HelloRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.HelloRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.HelloRequest} */ proto.hiddifyrpc.HelloRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.HelloRequest; return proto.hiddifyrpc.HelloRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.HelloRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.HelloRequest} */ proto.hiddifyrpc.HelloRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.HelloRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.HelloRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.HelloRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.HelloRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string name = 1; * @return {string} */ proto.hiddifyrpc.HelloRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.HelloRequest} returns this */ proto.hiddifyrpc.HelloRequest.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.HelloResponse.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.HelloResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.HelloResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.HelloResponse.toObject = function(includeInstance, msg) { var f, obj = { message: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.HelloResponse} */ proto.hiddifyrpc.HelloResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.HelloResponse; return proto.hiddifyrpc.HelloResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.HelloResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.HelloResponse} */ proto.hiddifyrpc.HelloResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.HelloResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.HelloResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.HelloResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.HelloResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMessage(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string message = 1; * @return {string} */ proto.hiddifyrpc.HelloResponse.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.HelloResponse} returns this */ proto.hiddifyrpc.HelloResponse.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.Empty.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.Empty.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.Empty} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.Empty.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.Empty} */ proto.hiddifyrpc.Empty.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.Empty; return proto.hiddifyrpc.Empty.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.Empty} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.Empty} */ proto.hiddifyrpc.Empty.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.Empty.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.Empty.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.Empty} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.Empty.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * @enum {number} */ proto.hiddifyrpc.ResponseCode = { OK: 0, FAILED: 1 }; goog.object.extend(exports, proto.hiddifyrpc); },{"google-protobuf":9}],2:[function(require,module,exports){ const extension = require("./extension_grpc_web_pb.js"); const grpcServerAddress = '/'; const client = new extension.ExtensionHostServicePromiseClient(grpcServerAddress, null, null); module.exports = { client ,extension}; },{"./extension_grpc_web_pb.js":6}],3:[function(require,module,exports){ const { listExtensions } = require('./extensionList.js'); window.onload = () => { listExtensions(); }; },{"./extensionList.js":4}],4:[function(require,module,exports){ const { client,extension } = require('./client.js'); async function listExtensions() { $("#extension-list-container").show(); $("#extension-page-container").hide(); try { const extensionListContainer = document.getElementById('extension-list-container'); extensionListContainer.innerHTML = ''; // Clear previous entries const response = await client.listExtensions(new extension.Empty(), {}); const header = document.createElement('h1'); header.classList.add('mb-4'); header.textContent = "Extension List"; extensionListContainer.appendChild(header); const extensionList = response.getExtensionsList(); extensionList.forEach(ext => { const listItem = createExtensionListItem(ext); extensionListContainer.appendChild(listItem); }); } catch (err) { console.error('Error listing extensions:', err); } } function createExtensionListItem(ext) { const listItem = document.createElement('li'); listItem.className = 'list-group-item d-flex justify-content-between align-items-center'; listItem.setAttribute('data-extension-id', ext.getId()); const contentDiv = document.createElement('div'); const titleElement = document.createElement('span'); titleElement.innerHTML = `${ext.getTitle()}`; contentDiv.appendChild(titleElement); const descriptionElement = document.createElement('p'); descriptionElement.className = 'mb-0'; descriptionElement.textContent = ext.getDescription(); contentDiv.appendChild(descriptionElement); listItem.appendChild(contentDiv); const switchDiv = createSwitchElement(ext); listItem.appendChild(switchDiv); const {openExtensionPage} = require('./extensionPage.js'); listItem.addEventListener('click', () => openExtensionPage(ext.getId())); return listItem; } function createSwitchElement(ext) { const switchDiv = document.createElement('div'); switchDiv.className = 'form-check form-switch'; const switchButton = document.createElement('input'); switchButton.type = 'checkbox'; switchButton.className = 'form-check-input'; switchButton.checked = ext.getEnable(); switchButton.addEventListener('change', () => toggleExtension(ext.getId(), switchButton.checked)); switchDiv.appendChild(switchButton); return switchDiv; } async function toggleExtension(extensionId, enable) { const request = new extension.EditExtensionRequest(); request.setExtensionId(extensionId); request.setEnable(enable); try { await client.editExtension(request, {}); console.log(`Extension ${extensionId} updated to ${enable ? 'enabled' : 'disabled'}`); } catch (err) { console.error('Error updating extension status:', err); } } module.exports = { listExtensions }; },{"./client.js":2,"./extensionPage.js":5}],5:[function(require,module,exports){ const { client,extension } = require('./client.js'); const { renderForm } = require('./formRenderer.js'); const { listExtensions } = require('./extensionList.js'); var currentExtensionId=undefined; function openExtensionPage(extensionId) { currentExtensionId=extensionId; $("#extension-list-container").hide(); $("#extension-page-container").show(); const request = new extension.ExtensionRequest(); request.setExtensionId(extensionId); const stream = client.connect(request, {}); stream.on('data', (response) => { if (response.getExtensionId() === currentExtensionId) { ui=JSON.parse(response.getJsonUi()) if(response.getType()== proto.hiddifyrpc.ExtensionResponseType.SHOW_DIALOG) { renderForm(ui, "dialog",handleSubmitButtonClick,handleCancelButtonClick,undefined); }else{ renderForm(ui, "",handleSubmitButtonClick,handleCancelButtonClick,handleStopButtonClick); } } }); stream.on('error', (err) => { console.error('Error opening extension page:', err); }); stream.on('end', () => { console.log('Stream ended'); }); } async function handleSubmitButtonClick(event) { event.preventDefault(); const formData = new FormData(event.target.closest('form')); const request = new extension.ExtensionRequest(); formData.forEach((value, key) => { request.getDataMap()[key] = value; }); request.setExtensionId(currentExtensionId); try { await client.submitForm(request, {}); console.log('Form submitted successfully.'); } catch (err) { console.error('Error submitting form:', err); } } async function handleCancelButtonClick(event) { event.preventDefault(); const request = new extension.ExtensionRequest(); request.setExtensionId(currentExtensionId); try { await client.cancel(request, {}); console.log('Extension cancelled successfully.'); } catch (err) { console.error('Error cancelling extension:', err); } } async function handleStopButtonClick(event) { event.preventDefault(); const request = new extension.ExtensionRequest(); request.setExtensionId(currentExtensionId); try { await client.stop(request, {}); console.log('Extension stopped successfully.'); currentExtensionId = undefined; listExtensions(); // Return to the extension list } catch (err) { console.error('Error stopping extension:', err); } } module.exports = { openExtensionPage }; },{"./client.js":2,"./extensionList.js":4,"./formRenderer.js":8}],6:[function(require,module,exports){ /** * @fileoverview gRPC-Web generated client stub for hiddifyrpc * @enhanceable * @public */ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.5.0 // protoc v5.28.0 // source: extension.proto /* eslint-disable */ // @ts-nocheck const grpc = {}; grpc.web = require('grpc-web'); var base_pb = require('./base_pb.js') const proto = {}; proto.hiddifyrpc = require('./extension_pb.js'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.hiddifyrpc.ExtensionHostServiceClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.hiddifyrpc.ExtensionHostServicePromiseClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.Empty, * !proto.hiddifyrpc.ExtensionList>} */ const methodDescriptor_ExtensionHostService_ListExtensions = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/ListExtensions', grpc.web.MethodType.UNARY, base_pb.Empty, proto.hiddifyrpc.ExtensionList, /** * @param {!proto.hiddifyrpc.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionList.deserializeBinary ); /** * @param {!proto.hiddifyrpc.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionList)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.listExtensions = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/ListExtensions', request, metadata || {}, methodDescriptor_ExtensionHostService_ListExtensions, callback); }; /** * @param {!proto.hiddifyrpc.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.listExtensions = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/ListExtensions', request, metadata || {}, methodDescriptor_ExtensionHostService_ListExtensions); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.ExtensionRequest, * !proto.hiddifyrpc.ExtensionResponse>} */ const methodDescriptor_ExtensionHostService_Connect = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/Connect', grpc.web.MethodType.SERVER_STREAMING, proto.hiddifyrpc.ExtensionRequest, proto.hiddifyrpc.ExtensionResponse, /** * @param {!proto.hiddifyrpc.ExtensionRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionResponse.deserializeBinary ); /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The request proto * @param {?Object=} metadata User defined * call metadata * @return {!grpc.web.ClientReadableStream} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.connect = function(request, metadata) { return this.client_.serverStreaming(this.hostname_ + '/hiddifyrpc.ExtensionHostService/Connect', request, metadata || {}, methodDescriptor_ExtensionHostService_Connect); }; /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The request proto * @param {?Object=} metadata User defined * call metadata * @return {!grpc.web.ClientReadableStream} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.connect = function(request, metadata) { return this.client_.serverStreaming(this.hostname_ + '/hiddifyrpc.ExtensionHostService/Connect', request, metadata || {}, methodDescriptor_ExtensionHostService_Connect); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.EditExtensionRequest, * !proto.hiddifyrpc.ExtensionActionResult>} */ const methodDescriptor_ExtensionHostService_EditExtension = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/EditExtension', grpc.web.MethodType.UNARY, proto.hiddifyrpc.EditExtensionRequest, proto.hiddifyrpc.ExtensionActionResult, /** * @param {!proto.hiddifyrpc.EditExtensionRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionActionResult.deserializeBinary ); /** * @param {!proto.hiddifyrpc.EditExtensionRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.editExtension = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/EditExtension', request, metadata || {}, methodDescriptor_ExtensionHostService_EditExtension, callback); }; /** * @param {!proto.hiddifyrpc.EditExtensionRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.editExtension = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/EditExtension', request, metadata || {}, methodDescriptor_ExtensionHostService_EditExtension); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.ExtensionRequest, * !proto.hiddifyrpc.ExtensionActionResult>} */ const methodDescriptor_ExtensionHostService_SubmitForm = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/SubmitForm', grpc.web.MethodType.UNARY, proto.hiddifyrpc.ExtensionRequest, proto.hiddifyrpc.ExtensionActionResult, /** * @param {!proto.hiddifyrpc.ExtensionRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionActionResult.deserializeBinary ); /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.submitForm = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/SubmitForm', request, metadata || {}, methodDescriptor_ExtensionHostService_SubmitForm, callback); }; /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.submitForm = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/SubmitForm', request, metadata || {}, methodDescriptor_ExtensionHostService_SubmitForm); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.ExtensionRequest, * !proto.hiddifyrpc.ExtensionActionResult>} */ const methodDescriptor_ExtensionHostService_Cancel = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/Cancel', grpc.web.MethodType.UNARY, proto.hiddifyrpc.ExtensionRequest, proto.hiddifyrpc.ExtensionActionResult, /** * @param {!proto.hiddifyrpc.ExtensionRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionActionResult.deserializeBinary ); /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.cancel = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/Cancel', request, metadata || {}, methodDescriptor_ExtensionHostService_Cancel, callback); }; /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.cancel = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/Cancel', request, metadata || {}, methodDescriptor_ExtensionHostService_Cancel); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.ExtensionRequest, * !proto.hiddifyrpc.ExtensionActionResult>} */ const methodDescriptor_ExtensionHostService_Stop = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/Stop', grpc.web.MethodType.UNARY, proto.hiddifyrpc.ExtensionRequest, proto.hiddifyrpc.ExtensionActionResult, /** * @param {!proto.hiddifyrpc.ExtensionRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionActionResult.deserializeBinary ); /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.stop = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/Stop', request, metadata || {}, methodDescriptor_ExtensionHostService_Stop, callback); }; /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.stop = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/Stop', request, metadata || {}, methodDescriptor_ExtensionHostService_Stop); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.hiddifyrpc.ExtensionRequest, * !proto.hiddifyrpc.ExtensionActionResult>} */ const methodDescriptor_ExtensionHostService_GetUI = new grpc.web.MethodDescriptor( '/hiddifyrpc.ExtensionHostService/GetUI', grpc.web.MethodType.UNARY, proto.hiddifyrpc.ExtensionRequest, proto.hiddifyrpc.ExtensionActionResult, /** * @param {!proto.hiddifyrpc.ExtensionRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.hiddifyrpc.ExtensionActionResult.deserializeBinary ); /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.hiddifyrpc.ExtensionHostServiceClient.prototype.getUI = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/GetUI', request, metadata || {}, methodDescriptor_ExtensionHostService_GetUI, callback); }; /** * @param {!proto.hiddifyrpc.ExtensionRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.getUI = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/hiddifyrpc.ExtensionHostService/GetUI', request, metadata || {}, methodDescriptor_ExtensionHostService_GetUI); }; module.exports = proto.hiddifyrpc; },{"./base_pb.js":1,"./extension_pb.js":7,"grpc-web":10}],7:[function(require,module,exports){ // source: extension.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (typeof globalThis !== 'undefined' && globalThis) || (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || (typeof self !== 'undefined' && self) || (function () { return this; }).call(null) || Function('return this')(); var base_pb = require('./base_pb.js'); goog.object.extend(proto, base_pb); goog.exportSymbol('proto.hiddifyrpc.EditExtensionRequest', null, global); goog.exportSymbol('proto.hiddifyrpc.Extension', null, global); goog.exportSymbol('proto.hiddifyrpc.ExtensionActionResult', null, global); goog.exportSymbol('proto.hiddifyrpc.ExtensionList', null, global); goog.exportSymbol('proto.hiddifyrpc.ExtensionRequest', null, global); goog.exportSymbol('proto.hiddifyrpc.ExtensionResponse', null, global); goog.exportSymbol('proto.hiddifyrpc.ExtensionResponseType', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.hiddifyrpc.ExtensionActionResult = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.hiddifyrpc.ExtensionActionResult, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.hiddifyrpc.ExtensionActionResult.displayName = 'proto.hiddifyrpc.ExtensionActionResult'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.hiddifyrpc.ExtensionList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.hiddifyrpc.ExtensionList.repeatedFields_, null); }; goog.inherits(proto.hiddifyrpc.ExtensionList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.hiddifyrpc.ExtensionList.displayName = 'proto.hiddifyrpc.ExtensionList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.hiddifyrpc.EditExtensionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.hiddifyrpc.EditExtensionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.hiddifyrpc.EditExtensionRequest.displayName = 'proto.hiddifyrpc.EditExtensionRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.hiddifyrpc.Extension = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.hiddifyrpc.Extension, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.hiddifyrpc.Extension.displayName = 'proto.hiddifyrpc.Extension'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.hiddifyrpc.ExtensionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.hiddifyrpc.ExtensionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.hiddifyrpc.ExtensionRequest.displayName = 'proto.hiddifyrpc.ExtensionRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.hiddifyrpc.ExtensionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.hiddifyrpc.ExtensionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.hiddifyrpc.ExtensionResponse.displayName = 'proto.hiddifyrpc.ExtensionResponse'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.ExtensionActionResult.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.ExtensionActionResult.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.ExtensionActionResult} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionActionResult.toObject = function(includeInstance, msg) { var f, obj = { extensionId: jspb.Message.getFieldWithDefault(msg, 1, ""), code: jspb.Message.getFieldWithDefault(msg, 2, 0), message: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.ExtensionActionResult} */ proto.hiddifyrpc.ExtensionActionResult.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.ExtensionActionResult; return proto.hiddifyrpc.ExtensionActionResult.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.ExtensionActionResult} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.ExtensionActionResult} */ proto.hiddifyrpc.ExtensionActionResult.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setExtensionId(value); break; case 2: var value = /** @type {!proto.hiddifyrpc.ResponseCode} */ (reader.readEnum()); msg.setCode(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.ExtensionActionResult.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.ExtensionActionResult.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.ExtensionActionResult} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionActionResult.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExtensionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getCode(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string extension_id = 1; * @return {string} */ proto.hiddifyrpc.ExtensionActionResult.prototype.getExtensionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.ExtensionActionResult} returns this */ proto.hiddifyrpc.ExtensionActionResult.prototype.setExtensionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional ResponseCode code = 2; * @return {!proto.hiddifyrpc.ResponseCode} */ proto.hiddifyrpc.ExtensionActionResult.prototype.getCode = function() { return /** @type {!proto.hiddifyrpc.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {!proto.hiddifyrpc.ResponseCode} value * @return {!proto.hiddifyrpc.ExtensionActionResult} returns this */ proto.hiddifyrpc.ExtensionActionResult.prototype.setCode = function(value) { return jspb.Message.setProto3EnumField(this, 2, value); }; /** * optional string message = 3; * @return {string} */ proto.hiddifyrpc.ExtensionActionResult.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.ExtensionActionResult} returns this */ proto.hiddifyrpc.ExtensionActionResult.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.hiddifyrpc.ExtensionList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.ExtensionList.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.ExtensionList.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.ExtensionList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionList.toObject = function(includeInstance, msg) { var f, obj = { extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), proto.hiddifyrpc.Extension.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.ExtensionList} */ proto.hiddifyrpc.ExtensionList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.ExtensionList; return proto.hiddifyrpc.ExtensionList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.ExtensionList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.ExtensionList} */ proto.hiddifyrpc.ExtensionList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.hiddifyrpc.Extension; reader.readMessage(value,proto.hiddifyrpc.Extension.deserializeBinaryFromReader); msg.addExtensions(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.ExtensionList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.ExtensionList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.ExtensionList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExtensionsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.hiddifyrpc.Extension.serializeBinaryToWriter ); } }; /** * repeated Extension extensions = 1; * @return {!Array} */ proto.hiddifyrpc.ExtensionList.prototype.getExtensionsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.hiddifyrpc.Extension, 1)); }; /** * @param {!Array} value * @return {!proto.hiddifyrpc.ExtensionList} returns this */ proto.hiddifyrpc.ExtensionList.prototype.setExtensionsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.hiddifyrpc.Extension=} opt_value * @param {number=} opt_index * @return {!proto.hiddifyrpc.Extension} */ proto.hiddifyrpc.ExtensionList.prototype.addExtensions = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.hiddifyrpc.Extension, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.hiddifyrpc.ExtensionList} returns this */ proto.hiddifyrpc.ExtensionList.prototype.clearExtensionsList = function() { return this.setExtensionsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.EditExtensionRequest.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.EditExtensionRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.EditExtensionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.EditExtensionRequest.toObject = function(includeInstance, msg) { var f, obj = { extensionId: jspb.Message.getFieldWithDefault(msg, 1, ""), enable: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.EditExtensionRequest} */ proto.hiddifyrpc.EditExtensionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.EditExtensionRequest; return proto.hiddifyrpc.EditExtensionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.EditExtensionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.EditExtensionRequest} */ proto.hiddifyrpc.EditExtensionRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setExtensionId(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setEnable(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.EditExtensionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.EditExtensionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.EditExtensionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.EditExtensionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExtensionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getEnable(); if (f) { writer.writeBool( 2, f ); } }; /** * optional string extension_id = 1; * @return {string} */ proto.hiddifyrpc.EditExtensionRequest.prototype.getExtensionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.EditExtensionRequest} returns this */ proto.hiddifyrpc.EditExtensionRequest.prototype.setExtensionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bool enable = 2; * @return {boolean} */ proto.hiddifyrpc.EditExtensionRequest.prototype.getEnable = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value * @return {!proto.hiddifyrpc.EditExtensionRequest} returns this */ proto.hiddifyrpc.EditExtensionRequest.prototype.setEnable = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.Extension.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.Extension.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.Extension} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.Extension.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), title: jspb.Message.getFieldWithDefault(msg, 2, ""), description: jspb.Message.getFieldWithDefault(msg, 3, ""), enable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.Extension} */ proto.hiddifyrpc.Extension.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.Extension; return proto.hiddifyrpc.Extension.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.Extension} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.Extension} */ proto.hiddifyrpc.Extension.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setTitle(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setEnable(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.Extension.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.Extension.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.Extension} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.Extension.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getTitle(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getEnable(); if (f) { writer.writeBool( 4, f ); } }; /** * optional string id = 1; * @return {string} */ proto.hiddifyrpc.Extension.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.Extension} returns this */ proto.hiddifyrpc.Extension.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string title = 2; * @return {string} */ proto.hiddifyrpc.Extension.prototype.getTitle = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.Extension} returns this */ proto.hiddifyrpc.Extension.prototype.setTitle = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string description = 3; * @return {string} */ proto.hiddifyrpc.Extension.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.Extension} returns this */ proto.hiddifyrpc.Extension.prototype.setDescription = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional bool enable = 4; * @return {boolean} */ proto.hiddifyrpc.Extension.prototype.getEnable = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.hiddifyrpc.Extension} returns this */ proto.hiddifyrpc.Extension.prototype.setEnable = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.ExtensionRequest.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.ExtensionRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.ExtensionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionRequest.toObject = function(includeInstance, msg) { var f, obj = { extensionId: jspb.Message.getFieldWithDefault(msg, 1, ""), dataMap: (f = msg.getDataMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.ExtensionRequest} */ proto.hiddifyrpc.ExtensionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.ExtensionRequest; return proto.hiddifyrpc.ExtensionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.ExtensionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.ExtensionRequest} */ proto.hiddifyrpc.ExtensionRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setExtensionId(value); break; case 2: var value = msg.getDataMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.ExtensionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.ExtensionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.ExtensionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExtensionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDataMap(true); if (f && f.getLength() > 0) { f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; /** * optional string extension_id = 1; * @return {string} */ proto.hiddifyrpc.ExtensionRequest.prototype.getExtensionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.ExtensionRequest} returns this */ proto.hiddifyrpc.ExtensionRequest.prototype.setExtensionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * map data = 2; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.hiddifyrpc.ExtensionRequest.prototype.getDataMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 2, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.hiddifyrpc.ExtensionRequest} returns this */ proto.hiddifyrpc.ExtensionRequest.prototype.clearDataMap = function() { this.getDataMap().clear(); return this; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.hiddifyrpc.ExtensionResponse.prototype.toObject = function(opt_includeInstance) { return proto.hiddifyrpc.ExtensionResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.hiddifyrpc.ExtensionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionResponse.toObject = function(includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, 0), extensionId: jspb.Message.getFieldWithDefault(msg, 2, ""), jsonUi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.hiddifyrpc.ExtensionResponse} */ proto.hiddifyrpc.ExtensionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.hiddifyrpc.ExtensionResponse; return proto.hiddifyrpc.ExtensionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.hiddifyrpc.ExtensionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.hiddifyrpc.ExtensionResponse} */ proto.hiddifyrpc.ExtensionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.hiddifyrpc.ExtensionResponseType} */ (reader.readEnum()); msg.setType(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setExtensionId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setJsonUi(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.hiddifyrpc.ExtensionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.hiddifyrpc.ExtensionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.hiddifyrpc.ExtensionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.hiddifyrpc.ExtensionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getType(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getExtensionId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getJsonUi(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional ExtensionResponseType type = 1; * @return {!proto.hiddifyrpc.ExtensionResponseType} */ proto.hiddifyrpc.ExtensionResponse.prototype.getType = function() { return /** @type {!proto.hiddifyrpc.ExtensionResponseType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.hiddifyrpc.ExtensionResponseType} value * @return {!proto.hiddifyrpc.ExtensionResponse} returns this */ proto.hiddifyrpc.ExtensionResponse.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string extension_id = 2; * @return {string} */ proto.hiddifyrpc.ExtensionResponse.prototype.getExtensionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.ExtensionResponse} returns this */ proto.hiddifyrpc.ExtensionResponse.prototype.setExtensionId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string json_ui = 3; * @return {string} */ proto.hiddifyrpc.ExtensionResponse.prototype.getJsonUi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.hiddifyrpc.ExtensionResponse} returns this */ proto.hiddifyrpc.ExtensionResponse.prototype.setJsonUi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * @enum {number} */ proto.hiddifyrpc.ExtensionResponseType = { NOTHING: 0, UPDATE_UI: 1, SHOW_DIALOG: 2, END: 3 }; goog.object.extend(exports, proto.hiddifyrpc); },{"./base_pb.js":1,"google-protobuf":9}],8:[function(require,module,exports){ const { client } = require('./client.js'); const extension = require("./extension_grpc_web_pb.js"); function renderForm(json, dialog, submitAction, cancelAction, stopAction) { const container = document.getElementById(`extension-page-container${dialog}`); const formId = `dynamicForm${json.id}${dialog}`; const existingForm = document.getElementById(formId); if (existingForm) { existingForm.remove(); } const form = document.createElement('form'); form.id = formId; if (dialog === "dialog") { document.getElementById("modalLabel").textContent = json.title; } else { const titleElement = createTitleElement(json); form.appendChild(titleElement); } addElementsToForm(form, json); const buttonGroup = createButtonGroup(json, submitAction, cancelAction, stopAction); if (dialog === "dialog") { document.getElementById("modal-footer").innerHTML = ''; document.getElementById("modal-footer").appendChild(buttonGroup); } else { form.appendChild(buttonGroup); } container.appendChild(form); } function addElementsToForm(form, json) { const description = document.createElement('p'); description.textContent = json.description; form.appendChild(description); json.fields.forEach(field => { const formGroup = createFormGroup(field); form.appendChild(formGroup); }); return form; } function createTitleElement(json) { const title = document.createElement('h1'); title.textContent = json.title; return title; } function createFormGroup(field) { const formGroup = document.createElement('div'); formGroup.classList.add('mb-3'); if (field.label && !field.labelHidden) { const label = document.createElement('label'); label.textContent = field.label; label.setAttribute('for', field.key); formGroup.appendChild(label); } const input = createInputElement(field); formGroup.appendChild(input); return formGroup; } function createInputElement(field) { let input; switch (field.type) { case "TextArea": input = document.createElement('textarea'); input.rows = field.lines || 3; input.textContent = field.value || ''; break; case "Checkbox": case "RadioButton": input = createCheckboxOrRadioGroup(field); break; case "Switch": input = createSwitchElement(field); break; case "Select": input = document.createElement('select'); field.items.forEach(item => { const option = document.createElement('option'); option.value = item.value; option.text = item.label; input.appendChild(option); }); break; default: input = document.createElement('input'); input.type = field.type.toLowerCase(); input.value = field.value; break; } input.id = field.key; input.name = field.key; if (field.readOnly) input.readOnly = true; if (field.type == "Checkbox" || field.type == "RadioButton" || field.type == "Switch") { } else { if (field.required) input.required = true; input.classList.add('form-control'); if (field.placeholder) input.placeholder = field.placeholder; } return input; } function createCheckboxOrRadioGroup(field) { const wrapper = document.createDocumentFragment(); field.items.forEach(item => { const inputWrapper = document.createElement('div'); inputWrapper.classList.add('form-check'); const input = document.createElement('input'); input.type = field.type === "Checkbox" ? 'checkbox' : 'radio'; input.classList.add('form-check-input'); input.id = `${field.key}_${item.value}`; input.name = field.key; // Grouping by name for radio buttons input.value = item.value; input.checked = field.value === item.value; const itemLabel = document.createElement('label'); itemLabel.classList.add('form-check-label'); itemLabel.setAttribute('for', input.id); itemLabel.textContent = item.label; inputWrapper.appendChild(input); inputWrapper.appendChild(itemLabel); wrapper.appendChild(inputWrapper); }); return wrapper; } function createSwitchElement(field) { const switchWrapper = document.createElement('div'); switchWrapper.classList.add('form-check', 'form-switch'); const input = document.createElement('input'); input.type = 'checkbox'; input.classList.add('form-check-input'); input.setAttribute('role', 'switch'); input.id = field.key; input.checked = field.value === "true"; const label = document.createElement('label'); label.classList.add('form-check-label'); label.setAttribute('for', field.key); label.textContent = field.label; switchWrapper.appendChild(input); switchWrapper.appendChild(label); return switchWrapper; } function createButtonGroup(json, submitAction, cancelAction, stopAction) { const buttonGroup = document.createElement('div'); buttonGroup.classList.add('btn-group'); const cancelButton = document.createElement('button'); cancelButton.textContent = "Cancel"; cancelButton.classList.add('btn', 'btn-secondary'); cancelButton.addEventListener('click', cancelAction); buttonGroup.appendChild(cancelButton); if (stopAction != undefined) { const stopButton = document.createElement('button'); stopButton.textContent = "Stop"; stopButton.classList.add('btn', 'btn-danger'); stopButton.addEventListener('click', stopAction); buttonGroup.appendChild(stopButton); } if (json.buttonMode === "SubmitCancel") { const submitButton = document.createElement('button'); submitButton.textContent = "Submit"; submitButton.classList.add('btn', 'btn-primary'); submitButton.addEventListener('click', submitAction); buttonGroup.appendChild(submitButton); } return buttonGroup; } module.exports = { renderForm }; },{"./client.js":2,"./extension_grpc_web_pb.js":6}],9:[function(require,module,exports){ (function (global){(function (){ /* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},e="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ba(a,b){if(b){var c=e;a=a.split(".");for(var d=0;d=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function sa(a,b,c,d){var f="Assertion failed";if(c){f+=": "+c;var h=d}else a&&(f+=": "+a,h=b);throw Error(f,h||[]);}function n(a,b,c){for(var d=[],f=2;f=a.length)return String.fromCharCode.apply(null,a);for(var b="",c=0;c>2;f=(f&3)<<4|m>>4;m=(m&15)<<2|B>>6;B&=63;t||(B=64,h||(m=64));c.push(b[M],b[f],b[m]||"",b[B]||"")}return c.join("")}function Da(a){var b=a.length,c=3*b/4;c%3?c=Math.floor(c):-1!="=.".indexOf(a[b-1])&&(c=-1!="=.".indexOf(a[b-2])?c-2:c-1);var d=new Uint8Array(c),f=0;Ea(a,function(h){d[f++]=h});return d.subarray(0,f)} function Ea(a,b){function c(B){for(;d>4);64!=m&&(b(h<<4&240|m>>2),64!=t&&b(m<<6&192|t))}} function Ca(){if(!x){x={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));Aa[c]=d;for(var f=0;f>>0;a=Math.floor((a-b)/4294967296)>>>0;y=b;z=a}g("jspb.utils.splitUint64",Fa,void 0);function A(a){var b=0>a;a=Math.abs(a);var c=a>>>0;a=Math.floor((a-c)/4294967296);a>>>=0;b&&(a=~a>>>0,c=(~c>>>0)+1,4294967295a;a=2*Math.abs(a);Fa(a);a=y;var c=z;b&&(0==a?0==c?c=a=4294967295:(c--,a=4294967295):a--);y=a;z=c}g("jspb.utils.splitZigzag64",Ga,void 0); function Ha(a){var b=0>a?1:0;a=b?-a:a;if(0===a)0<1/a?y=z=0:(z=0,y=2147483648);else if(isNaN(a))z=0,y=2147483647;else if(3.4028234663852886E38>>0;else if(1.1754943508222875E-38>a)a=Math.round(a/Math.pow(2,-149)),z=0,y=(b<<31|a)>>>0;else{var c=Math.floor(Math.log(a)/Math.LN2);a*=Math.pow(2,-c);a=Math.round(8388608*a);16777216<=a&&++c;z=0;y=(b<<31|c+127<<23|a&8388607)>>>0}}g("jspb.utils.splitFloat32",Ha,void 0); function Ia(a){var b=0>a?1:0;a=b?-a:a;if(0===a)z=0<1/a?0:2147483648,y=0;else if(isNaN(a))z=2147483647,y=4294967295;else if(1.7976931348623157E308>>0,y=0;else if(2.2250738585072014E-308>a)a/=Math.pow(2,-1074),z=(b<<31|a/4294967296)>>>0,y=a>>>0;else{var c=a,d=0;if(2<=c)for(;2<=c&&1023>d;)d++,c/=2;else for(;1>c&&-1022>>0;y=4503599627370496*a>>>0}}g("jspb.utils.splitFloat64",Ia,void 0); function C(a){var b=a.charCodeAt(4),c=a.charCodeAt(5),d=a.charCodeAt(6),f=a.charCodeAt(7);y=a.charCodeAt(0)+(a.charCodeAt(1)<<8)+(a.charCodeAt(2)<<16)+(a.charCodeAt(3)<<24)>>>0;z=b+(c<<8)+(d<<16)+(f<<24)>>>0}g("jspb.utils.splitHash64",C,void 0);function D(a,b){return 4294967296*b+(a>>>0)}g("jspb.utils.joinUint64",D,void 0);function E(a,b){var c=b&2147483648;c&&(a=~a+1>>>0,b=~b>>>0,0==a&&(b=b+1>>>0));a=D(a,b);return c?-a:a}g("jspb.utils.joinInt64",E,void 0); function Ja(a,b,c){var d=b>>31;return c(a<<1^d,(b<<1|a>>>31)^d)}g("jspb.utils.toZigzag64",Ja,void 0);function Ka(a,b){return Ma(a,b,E)}g("jspb.utils.joinZigzag64",Ka,void 0);function Ma(a,b,c){var d=-(a&1);return c((a>>>1|b<<31)^d,b>>>1^d)}g("jspb.utils.fromZigzag64",Ma,void 0);function Na(a){var b=2*(a>>31)+1,c=a>>>23&255;a&=8388607;return 255==c?a?NaN:Infinity*b:0==c?b*Math.pow(2,-149)*a:b*Math.pow(2,c-150)*(a+Math.pow(2,23))}g("jspb.utils.joinFloat32",Na,void 0); function Oa(a,b){var c=2*(b>>31)+1,d=b>>>20&2047;a=4294967296*(b&1048575)+a;return 2047==d?a?NaN:Infinity*c:0==d?c*Math.pow(2,-1074)*a:c*Math.pow(2,d-1075)*(a+4503599627370496)}g("jspb.utils.joinFloat64",Oa,void 0);function Pa(a,b){return String.fromCharCode(a>>>0&255,a>>>8&255,a>>>16&255,a>>>24&255,b>>>0&255,b>>>8&255,b>>>16&255,b>>>24&255)}g("jspb.utils.joinHash64",Pa,void 0);g("jspb.utils.DIGITS","0123456789abcdef".split(""),void 0); function F(a,b){function c(f,h){f=f?String(f):"";return h?"0000000".slice(f.length)+f:f}if(2097151>=b)return""+D(a,b);var d=(a>>>24|b<<8)>>>0&16777215;b=b>>16&65535;a=(a&16777215)+6777216*d+6710656*b;d+=8147497*b;b*=2;1E7<=a&&(d+=Math.floor(a/1E7),a%=1E7);1E7<=d&&(b+=Math.floor(d/1E7),d%=1E7);return c(b,0)+c(d,b)+c(a,1)}g("jspb.utils.joinUnsignedDecimalString",F,void 0);function G(a,b){var c=b&2147483648;c&&(a=~a+1>>>0,b=~b+(0==a?1:0)>>>0);a=F(a,b);return c?"-"+a:a} g("jspb.utils.joinSignedDecimalString",G,void 0);function Qa(a,b){C(a);a=y;var c=z;return b?G(a,c):F(a,c)}g("jspb.utils.hash64ToDecimalString",Qa,void 0);g("jspb.utils.hash64ArrayToDecimalStrings",function(a,b){for(var c=Array(a.length),d=0;dB&&(1!==m||0>>=8}function c(){for(var m=0;8>m;m++)f[m]=~f[m]&255}n(0a?48+a:87+a)} function Sa(a){return 97<=a?a-97+10:a-48}g("jspb.utils.hash64ToHexString",function(a){var b=Array(18);b[0]="0";b[1]="x";for(var c=0;8>c;c++){var d=a.charCodeAt(7-c);b[2*c+2]=Ra(d>>4);b[2*c+3]=Ra(d&15)}return b.join("")},void 0);g("jspb.utils.hexStringToHash64",function(a){a=a.toLowerCase();n(18==a.length);n("0"==a[0]);n("x"==a[1]);for(var b="",c=0;8>c;c++)b=String.fromCharCode(16*Sa(a.charCodeAt(2*c+2))+Sa(a.charCodeAt(2*c+3)))+b;return b},void 0); g("jspb.utils.hash64ToNumber",function(a,b){C(a);a=y;var c=z;return b?E(a,c):D(a,c)},void 0);g("jspb.utils.numberToHash64",function(a){A(a);return Pa(y,z)},void 0);g("jspb.utils.countVarints",function(a,b,c){for(var d=0,f=b;f>7;return c-b-d},void 0); g("jspb.utils.countVarintFields",function(a,b,c,d){var f=0;d*=8;if(128>d)for(;b>=7}if(a[b++]!=h)break;for(f++;h=a[b++],0!=(h&128););}return f},void 0);function Ta(a,b,c,d,f){var h=0;if(128>d)for(;b>=7}if(a[b++]!=m)break;h++;b+=f}return h} g("jspb.utils.countFixed32Fields",function(a,b,c,d){return Ta(a,b,c,8*d+5,4)},void 0);g("jspb.utils.countFixed64Fields",function(a,b,c,d){return Ta(a,b,c,8*d+1,8)},void 0);g("jspb.utils.countDelimitedFields",function(a,b,c,d){var f=0;for(d=8*d+2;b>=7}if(a[b++]!=h)break;f++;for(var m=0,t=1;h=a[b++],m+=(h&127)*t,t*=128,0!=(h&128););b+=m}return f},void 0); g("jspb.utils.debugBytesToTextFormat",function(a){var b='"';if(a){a=Ua(a);for(var c=0;ca[c]&&(b+="0"),b+=a[c].toString(16)}return b+'"'},void 0); g("jspb.utils.debugScalarToTextFormat",function(a){if("string"===typeof a){a=String(a);for(var b=['"'],c=0;cf))if(f=d,f in za)d=za[f];else if(f in ya)d=za[f]=ya[f];else{m=f.charCodeAt(0);if(31m)d=f;else{if(256>m){if(d="\\x",16>m||256m&&(d+="0");d+=m.toString(16).toUpperCase()}d=za[f]=d}m=d}b[h]=m}b.push('"');a=b.join("")}else a=a.toString();return a},void 0); g("jspb.utils.stringToByteArray",function(a){for(var b=new Uint8Array(a.length),c=0;cVa.length&&Va.push(this)};I.prototype.free=I.prototype.Ca;I.prototype.clone=function(){return Wa(this.b,this.h,this.c-this.h)};I.prototype.clone=I.prototype.clone; I.prototype.clear=function(){this.b=null;this.a=this.c=this.h=0;this.v=!1};I.prototype.clear=I.prototype.clear;I.prototype.Y=function(){return this.b};I.prototype.getBuffer=I.prototype.Y;I.prototype.H=function(a,b,c){this.b=Ua(a);this.h=void 0!==b?b:0;this.c=void 0!==c?this.h+c:this.b.length;this.a=this.h};I.prototype.setBlock=I.prototype.H;I.prototype.Db=function(){return this.c};I.prototype.getEnd=I.prototype.Db;I.prototype.setEnd=function(a){this.c=a};I.prototype.setEnd=I.prototype.setEnd; I.prototype.reset=function(){this.a=this.h};I.prototype.reset=I.prototype.reset;I.prototype.B=function(){return this.a};I.prototype.getCursor=I.prototype.B;I.prototype.Ma=function(a){this.a=a};I.prototype.setCursor=I.prototype.Ma;I.prototype.advance=function(a){this.a+=a;n(this.a<=this.c)};I.prototype.advance=I.prototype.advance;I.prototype.ya=function(){return this.a==this.c};I.prototype.atEnd=I.prototype.ya;I.prototype.Qb=function(){return this.a>this.c};I.prototype.pastEnd=I.prototype.Qb; I.prototype.getError=function(){return this.v||0>this.a||this.a>this.c};I.prototype.getError=I.prototype.getError;I.prototype.w=function(a){for(var b=128,c=0,d=0,f=0;4>f&&128<=b;f++)b=this.b[this.a++],c|=(b&127)<<7*f;128<=b&&(b=this.b[this.a++],c|=(b&127)<<28,d|=(b&127)>>4);if(128<=b)for(f=0;5>f&&128<=b;f++)b=this.b[this.a++],d|=(b&127)<<7*f+3;if(128>b)return a(c>>>0,d>>>0);p("Failed to read varint, encoding is invalid.");this.v=!0};I.prototype.readSplitVarint64=I.prototype.w; I.prototype.ea=function(a){return this.w(function(b,c){return Ma(b,c,a)})};I.prototype.readSplitZigzagVarint64=I.prototype.ea;I.prototype.ta=function(a){var b=this.b,c=this.a;this.a+=8;for(var d=0,f=0,h=c+7;h>=c;h--)d=d<<8|b[h],f=f<<8|b[h+4];return a(d,f)};I.prototype.readSplitFixed64=I.prototype.ta;I.prototype.kb=function(){for(;this.b[this.a]&128;)this.a++;this.a++};I.prototype.skipVarint=I.prototype.kb;I.prototype.mb=function(a){for(;128>>=7;this.a--};I.prototype.unskipVarint=I.prototype.mb; I.prototype.o=function(){var a=this.b;var b=a[this.a];var c=b&127;if(128>b)return this.a+=1,n(this.a<=this.c),c;b=a[this.a+1];c|=(b&127)<<7;if(128>b)return this.a+=2,n(this.a<=this.c),c;b=a[this.a+2];c|=(b&127)<<14;if(128>b)return this.a+=3,n(this.a<=this.c),c;b=a[this.a+3];c|=(b&127)<<21;if(128>b)return this.a+=4,n(this.a<=this.c),c;b=a[this.a+4];c|=(b&15)<<28;if(128>b)return this.a+=5,n(this.a<=this.c),c>>>0;this.a+=5;128<=a[this.a++]&&128<=a[this.a++]&&128<=a[this.a++]&&128<=a[this.a++]&&128<= a[this.a++]&&n(!1);n(this.a<=this.c);return c};I.prototype.readUnsignedVarint32=I.prototype.o;I.prototype.da=function(){return~~this.o()};I.prototype.readSignedVarint32=I.prototype.da;I.prototype.O=function(){return this.o().toString()};I.prototype.Ea=function(){return this.da().toString()};I.prototype.readSignedVarint32String=I.prototype.Ea;I.prototype.Ia=function(){var a=this.o();return a>>>1^-(a&1)};I.prototype.readZigzagVarint32=I.prototype.Ia;I.prototype.Ga=function(){return this.w(D)}; I.prototype.readUnsignedVarint64=I.prototype.Ga;I.prototype.Ha=function(){return this.w(F)};I.prototype.readUnsignedVarint64String=I.prototype.Ha;I.prototype.sa=function(){return this.w(E)};I.prototype.readSignedVarint64=I.prototype.sa;I.prototype.Fa=function(){return this.w(G)};I.prototype.readSignedVarint64String=I.prototype.Fa;I.prototype.Ja=function(){return this.w(Ka)};I.prototype.readZigzagVarint64=I.prototype.Ja;I.prototype.fb=function(){return this.ea(Pa)}; I.prototype.readZigzagVarintHash64=I.prototype.fb;I.prototype.Ka=function(){return this.ea(G)};I.prototype.readZigzagVarint64String=I.prototype.Ka;I.prototype.Gc=function(){var a=this.b[this.a];this.a+=1;n(this.a<=this.c);return a};I.prototype.readUint8=I.prototype.Gc;I.prototype.Ec=function(){var a=this.b[this.a],b=this.b[this.a+1];this.a+=2;n(this.a<=this.c);return a<<0|b<<8};I.prototype.readUint16=I.prototype.Ec; I.prototype.m=function(){var a=this.b[this.a],b=this.b[this.a+1],c=this.b[this.a+2],d=this.b[this.a+3];this.a+=4;n(this.a<=this.c);return(a<<0|b<<8|c<<16|d<<24)>>>0};I.prototype.readUint32=I.prototype.m;I.prototype.ga=function(){var a=this.m(),b=this.m();return D(a,b)};I.prototype.readUint64=I.prototype.ga;I.prototype.ha=function(){var a=this.m(),b=this.m();return F(a,b)};I.prototype.readUint64String=I.prototype.ha; I.prototype.Xb=function(){var a=this.b[this.a];this.a+=1;n(this.a<=this.c);return a<<24>>24};I.prototype.readInt8=I.prototype.Xb;I.prototype.Vb=function(){var a=this.b[this.a],b=this.b[this.a+1];this.a+=2;n(this.a<=this.c);return(a<<0|b<<8)<<16>>16};I.prototype.readInt16=I.prototype.Vb;I.prototype.P=function(){var a=this.b[this.a],b=this.b[this.a+1],c=this.b[this.a+2],d=this.b[this.a+3];this.a+=4;n(this.a<=this.c);return a<<0|b<<8|c<<16|d<<24};I.prototype.readInt32=I.prototype.P; I.prototype.ba=function(){var a=this.m(),b=this.m();return E(a,b)};I.prototype.readInt64=I.prototype.ba;I.prototype.ca=function(){var a=this.m(),b=this.m();return G(a,b)};I.prototype.readInt64String=I.prototype.ca;I.prototype.aa=function(){var a=this.m();return Na(a,0)};I.prototype.readFloat=I.prototype.aa;I.prototype.Z=function(){var a=this.m(),b=this.m();return Oa(a,b)};I.prototype.readDouble=I.prototype.Z;I.prototype.pa=function(){return!!this.b[this.a++]};I.prototype.readBool=I.prototype.pa; I.prototype.ra=function(){return this.da()};I.prototype.readEnum=I.prototype.ra; I.prototype.fa=function(a){var b=this.b,c=this.a;a=c+a;for(var d=[],f="";ch)d.push(h);else if(192>h)continue;else if(224>h){var m=b[c++];d.push((h&31)<<6|m&63)}else if(240>h){m=b[c++];var t=b[c++];d.push((h&15)<<12|(m&63)<<6|t&63)}else if(248>h){m=b[c++];t=b[c++];var B=b[c++];h=(h&7)<<18|(m&63)<<12|(t&63)<<6|B&63;h-=65536;d.push((h>>10&1023)+55296,(h&1023)+56320)}8192<=d.length&&(f+=String.fromCharCode.apply(null,d),d.length=0)}f+=xa(d);this.a=c;return f}; I.prototype.readString=I.prototype.fa;I.prototype.Dc=function(){var a=this.o();return this.fa(a)};I.prototype.readStringWithLength=I.prototype.Dc;I.prototype.qa=function(a){if(0>a||this.a+a>this.b.length)return this.v=!0,p("Invalid byte length!"),new Uint8Array(0);var b=this.b.subarray(this.a,this.a+a);this.a+=a;n(this.a<=this.c);return b};I.prototype.readBytes=I.prototype.qa;I.prototype.ia=function(){return this.w(Pa)};I.prototype.readVarintHash64=I.prototype.ia; I.prototype.$=function(){var a=this.b,b=this.a,c=a[b],d=a[b+1],f=a[b+2],h=a[b+3],m=a[b+4],t=a[b+5],B=a[b+6];a=a[b+7];this.a+=8;return String.fromCharCode(c,d,f,h,m,t,B,a)};I.prototype.readFixedHash64=I.prototype.$;function J(a,b,c){this.a=Wa(a,b,c);this.O=this.a.B();this.b=this.c=-1;this.h=!1;this.v=null}g("jspb.BinaryReader",J,void 0);var K=[];J.clearInstanceCache=function(){K=[]};J.getInstanceCacheLength=function(){return K.length};function Xa(a,b,c){if(K.length){var d=K.pop();a&&d.a.H(a,b,c);return d}return new J(a,b,c)}J.alloc=Xa;J.prototype.zb=Xa;J.prototype.alloc=J.prototype.zb;J.prototype.Ca=function(){this.a.clear();this.b=this.c=-1;this.h=!1;this.v=null;100>K.length&&K.push(this)}; J.prototype.free=J.prototype.Ca;J.prototype.Fb=function(){return this.O};J.prototype.getFieldCursor=J.prototype.Fb;J.prototype.B=function(){return this.a.B()};J.prototype.getCursor=J.prototype.B;J.prototype.Y=function(){return this.a.Y()};J.prototype.getBuffer=J.prototype.Y;J.prototype.Hb=function(){return this.c};J.prototype.getFieldNumber=J.prototype.Hb;J.prototype.Lb=function(){return this.b};J.prototype.getWireType=J.prototype.Lb;J.prototype.Mb=function(){return 2==this.b}; J.prototype.isDelimited=J.prototype.Mb;J.prototype.bb=function(){return 4==this.b};J.prototype.isEndGroup=J.prototype.bb;J.prototype.getError=function(){return this.h||this.a.getError()};J.prototype.getError=J.prototype.getError;J.prototype.H=function(a,b,c){this.a.H(a,b,c);this.b=this.c=-1};J.prototype.setBlock=J.prototype.H;J.prototype.reset=function(){this.a.reset();this.b=this.c=-1};J.prototype.reset=J.prototype.reset;J.prototype.advance=function(a){this.a.advance(a)};J.prototype.advance=J.prototype.advance; J.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return p("Decoder hit an error"),!1;this.O=this.a.B();var a=this.a.o(),b=a>>>3;a&=7;if(0!=a&&5!=a&&1!=a&&2!=a&&3!=a&&4!=a)return p("Invalid wire type: %s (at position %s)",a,this.O),this.h=!0,!1;this.c=b;this.b=a;return!0};J.prototype.nextField=J.prototype.oa;J.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)};J.prototype.unskipHeader=J.prototype.Oa; J.prototype.Lc=function(){var a=this.c;for(this.Oa();this.oa()&&this.c==a;)this.C();this.a.ya()||this.Oa()};J.prototype.skipMatchingFields=J.prototype.Lc;J.prototype.lb=function(){0!=this.b?(p("Invalid wire type for skipVarintField"),this.C()):this.a.kb()};J.prototype.skipVarintField=J.prototype.lb;J.prototype.gb=function(){if(2!=this.b)p("Invalid wire type for skipDelimitedField"),this.C();else{var a=this.a.o();this.a.advance(a)}};J.prototype.skipDelimitedField=J.prototype.gb; J.prototype.hb=function(){5!=this.b?(p("Invalid wire type for skipFixed32Field"),this.C()):this.a.advance(4)};J.prototype.skipFixed32Field=J.prototype.hb;J.prototype.ib=function(){1!=this.b?(p("Invalid wire type for skipFixed64Field"),this.C()):this.a.advance(8)};J.prototype.skipFixed64Field=J.prototype.ib;J.prototype.jb=function(){var a=this.c;do{if(!this.oa()){p("Unmatched start-group tag: stream EOF");this.h=!0;break}if(4==this.b){this.c!=a&&(p("Unmatched end-group tag"),this.h=!0);break}this.C()}while(1)}; J.prototype.skipGroup=J.prototype.jb;J.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:p("Invalid wire encoding for field.")}};J.prototype.skipField=J.prototype.C;J.prototype.Hc=function(a,b){null===this.v&&(this.v={});n(!this.v[a]);this.v[a]=b};J.prototype.registerReadCallback=J.prototype.Hc;J.prototype.Ic=function(a){n(null!==this.v);a=this.v[a];n(a);return a(this)}; J.prototype.runReadCallback=J.prototype.Ic;J.prototype.Yb=function(a,b){n(2==this.b);var c=this.a.c,d=this.a.o();d=this.a.B()+d;this.a.setEnd(d);b(a,this);this.a.Ma(d);this.a.setEnd(c)};J.prototype.readMessage=J.prototype.Yb;J.prototype.Ub=function(a,b,c){n(3==this.b);n(this.c==a);c(b,this);this.h||4==this.b||(p("Group submessage did not end with an END_GROUP tag"),this.h=!0)};J.prototype.readGroup=J.prototype.Ub; J.prototype.Gb=function(){n(2==this.b);var a=this.a.o(),b=this.a.B(),c=b+a;a=Wa(this.a.Y(),b,a);this.a.Ma(c);return a};J.prototype.getFieldDecoder=J.prototype.Gb;J.prototype.P=function(){n(0==this.b);return this.a.da()};J.prototype.readInt32=J.prototype.P;J.prototype.Wb=function(){n(0==this.b);return this.a.Ea()};J.prototype.readInt32String=J.prototype.Wb;J.prototype.ba=function(){n(0==this.b);return this.a.sa()};J.prototype.readInt64=J.prototype.ba;J.prototype.ca=function(){n(0==this.b);return this.a.Fa()}; J.prototype.readInt64String=J.prototype.ca;J.prototype.m=function(){n(0==this.b);return this.a.o()};J.prototype.readUint32=J.prototype.m;J.prototype.Fc=function(){n(0==this.b);return this.a.O()};J.prototype.readUint32String=J.prototype.Fc;J.prototype.ga=function(){n(0==this.b);return this.a.Ga()};J.prototype.readUint64=J.prototype.ga;J.prototype.ha=function(){n(0==this.b);return this.a.Ha()};J.prototype.readUint64String=J.prototype.ha;J.prototype.zc=function(){n(0==this.b);return this.a.Ia()}; J.prototype.readSint32=J.prototype.zc;J.prototype.Ac=function(){n(0==this.b);return this.a.Ja()};J.prototype.readSint64=J.prototype.Ac;J.prototype.Bc=function(){n(0==this.b);return this.a.Ka()};J.prototype.readSint64String=J.prototype.Bc;J.prototype.Rb=function(){n(5==this.b);return this.a.m()};J.prototype.readFixed32=J.prototype.Rb;J.prototype.Sb=function(){n(1==this.b);return this.a.ga()};J.prototype.readFixed64=J.prototype.Sb;J.prototype.Tb=function(){n(1==this.b);return this.a.ha()}; J.prototype.readFixed64String=J.prototype.Tb;J.prototype.vc=function(){n(5==this.b);return this.a.P()};J.prototype.readSfixed32=J.prototype.vc;J.prototype.wc=function(){n(5==this.b);return this.a.P().toString()};J.prototype.readSfixed32String=J.prototype.wc;J.prototype.xc=function(){n(1==this.b);return this.a.ba()};J.prototype.readSfixed64=J.prototype.xc;J.prototype.yc=function(){n(1==this.b);return this.a.ca()};J.prototype.readSfixed64String=J.prototype.yc; J.prototype.aa=function(){n(5==this.b);return this.a.aa()};J.prototype.readFloat=J.prototype.aa;J.prototype.Z=function(){n(1==this.b);return this.a.Z()};J.prototype.readDouble=J.prototype.Z;J.prototype.pa=function(){n(0==this.b);return!!this.a.o()};J.prototype.readBool=J.prototype.pa;J.prototype.ra=function(){n(0==this.b);return this.a.sa()};J.prototype.readEnum=J.prototype.ra;J.prototype.fa=function(){n(2==this.b);var a=this.a.o();return this.a.fa(a)};J.prototype.readString=J.prototype.fa; J.prototype.qa=function(){n(2==this.b);var a=this.a.o();return this.a.qa(a)};J.prototype.readBytes=J.prototype.qa;J.prototype.ia=function(){n(0==this.b);return this.a.ia()};J.prototype.readVarintHash64=J.prototype.ia;J.prototype.Cc=function(){n(0==this.b);return this.a.fb()};J.prototype.readSintHash64=J.prototype.Cc;J.prototype.w=function(a){n(0==this.b);return this.a.w(a)};J.prototype.readSplitVarint64=J.prototype.w; J.prototype.ea=function(a){n(0==this.b);return this.a.w(function(b,c){return Ma(b,c,a)})};J.prototype.readSplitZigzagVarint64=J.prototype.ea;J.prototype.$=function(){n(1==this.b);return this.a.$()};J.prototype.readFixedHash64=J.prototype.$;J.prototype.ta=function(a){n(1==this.b);return this.a.ta(a)};J.prototype.readSplitFixed64=J.prototype.ta;function L(a,b){n(2==a.b);var c=a.a.o();c=a.a.B()+c;for(var d=[];a.a.B()b.length?c.length:b.length;a.b&&(d[0]=a.b,f=1);for(;fa);for(n(0<=b&&4294967296>b);0>>7|b<<25)>>>0,b>>>=7;this.a.push(a)};S.prototype.writeSplitVarint64=S.prototype.l; S.prototype.A=function(a,b){n(a==Math.floor(a));n(b==Math.floor(b));n(0<=a&&4294967296>a);n(0<=b&&4294967296>b);this.s(a);this.s(b)};S.prototype.writeSplitFixed64=S.prototype.A;S.prototype.j=function(a){n(a==Math.floor(a));for(n(0<=a&&4294967296>a);127>>=7;this.a.push(a)};S.prototype.writeUnsignedVarint32=S.prototype.j;S.prototype.M=function(a){n(a==Math.floor(a));n(-2147483648<=a&&2147483648>a);if(0<=a)this.j(a);else{for(var b=0;9>b;b++)this.a.push(a&127|128),a>>=7;this.a.push(1)}}; S.prototype.writeSignedVarint32=S.prototype.M;S.prototype.va=function(a){n(a==Math.floor(a));n(0<=a&&1.8446744073709552E19>a);A(a);this.l(y,z)};S.prototype.writeUnsignedVarint64=S.prototype.va;S.prototype.ua=function(a){n(a==Math.floor(a));n(-9223372036854775808<=a&&0x7fffffffffffffff>a);A(a);this.l(y,z)};S.prototype.writeSignedVarint64=S.prototype.ua;S.prototype.wa=function(a){n(a==Math.floor(a));n(-2147483648<=a&&2147483648>a);this.j((a<<1^a>>31)>>>0)};S.prototype.writeZigzagVarint32=S.prototype.wa; S.prototype.xa=function(a){n(a==Math.floor(a));n(-9223372036854775808<=a&&0x7fffffffffffffff>a);Ga(a);this.l(y,z)};S.prototype.writeZigzagVarint64=S.prototype.xa;S.prototype.Ta=function(a){this.W(H(a))};S.prototype.writeZigzagVarint64String=S.prototype.Ta;S.prototype.W=function(a){var b=this;C(a);Ja(y,z,function(c,d){b.l(c>>>0,d>>>0)})};S.prototype.writeZigzagVarintHash64=S.prototype.W;S.prototype.be=function(a){n(a==Math.floor(a));n(0<=a&&256>a);this.a.push(a>>>0&255)};S.prototype.writeUint8=S.prototype.be; S.prototype.ae=function(a){n(a==Math.floor(a));n(0<=a&&65536>a);this.a.push(a>>>0&255);this.a.push(a>>>8&255)};S.prototype.writeUint16=S.prototype.ae;S.prototype.s=function(a){n(a==Math.floor(a));n(0<=a&&4294967296>a);this.a.push(a>>>0&255);this.a.push(a>>>8&255);this.a.push(a>>>16&255);this.a.push(a>>>24&255)};S.prototype.writeUint32=S.prototype.s;S.prototype.V=function(a){n(a==Math.floor(a));n(0<=a&&1.8446744073709552E19>a);Fa(a);this.s(y);this.s(z)};S.prototype.writeUint64=S.prototype.V; S.prototype.Qc=function(a){n(a==Math.floor(a));n(-128<=a&&128>a);this.a.push(a>>>0&255)};S.prototype.writeInt8=S.prototype.Qc;S.prototype.Pc=function(a){n(a==Math.floor(a));n(-32768<=a&&32768>a);this.a.push(a>>>0&255);this.a.push(a>>>8&255)};S.prototype.writeInt16=S.prototype.Pc;S.prototype.S=function(a){n(a==Math.floor(a));n(-2147483648<=a&&2147483648>a);this.a.push(a>>>0&255);this.a.push(a>>>8&255);this.a.push(a>>>16&255);this.a.push(a>>>24&255)};S.prototype.writeInt32=S.prototype.S; S.prototype.T=function(a){n(a==Math.floor(a));n(-9223372036854775808<=a&&0x7fffffffffffffff>a);A(a);this.A(y,z)};S.prototype.writeInt64=S.prototype.T;S.prototype.ka=function(a){n(a==Math.floor(a));n(-9223372036854775808<=+a&&0x7fffffffffffffff>+a);C(H(a));this.A(y,z)};S.prototype.writeInt64String=S.prototype.ka;S.prototype.L=function(a){n(Infinity===a||-Infinity===a||isNaN(a)||-3.4028234663852886E38<=a&&3.4028234663852886E38>=a);Ha(a);this.s(y)};S.prototype.writeFloat=S.prototype.L; S.prototype.J=function(a){n(Infinity===a||-Infinity===a||isNaN(a)||-1.7976931348623157E308<=a&&1.7976931348623157E308>=a);Ia(a);this.s(y);this.s(z)};S.prototype.writeDouble=S.prototype.J;S.prototype.I=function(a){n("boolean"===typeof a||"number"===typeof a);this.a.push(a?1:0)};S.prototype.writeBool=S.prototype.I;S.prototype.R=function(a){n(a==Math.floor(a));n(-2147483648<=a&&2147483648>a);this.M(a)};S.prototype.writeEnum=S.prototype.R;S.prototype.ja=function(a){this.a.push.apply(this.a,a)}; S.prototype.writeBytes=S.prototype.ja;S.prototype.N=function(a){C(a);this.l(y,z)};S.prototype.writeVarintHash64=S.prototype.N;S.prototype.K=function(a){C(a);this.s(y);this.s(z)};S.prototype.writeFixedHash64=S.prototype.K; S.prototype.U=function(a){var b=this.a.length;ta(a);for(var c=0;cd)this.a.push(d);else if(2048>d)this.a.push(d>>6|192),this.a.push(d&63|128);else if(65536>d)if(55296<=d&&56319>=d&&c+1=f&&(d=1024*(d-55296)+f-56320+65536,this.a.push(d>>18|240),this.a.push(d>>12&63|128),this.a.push(d>>6&63|128),this.a.push(d&63|128),c++)}else this.a.push(d>>12|224),this.a.push(d>>6&63|128),this.a.push(d&63|128)}return this.a.length- b};S.prototype.writeString=S.prototype.U;function T(a,b){this.lo=a;this.hi=b}g("jspb.arith.UInt64",T,void 0);T.prototype.cmp=function(a){return this.hi>>1|(this.hi&1)<<31)>>>0,this.hi>>>1>>>0)};T.prototype.rightShift=T.prototype.La;T.prototype.Da=function(){return new T(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)};T.prototype.leftShift=T.prototype.Da; T.prototype.cb=function(){return!!(this.hi&2147483648)};T.prototype.msb=T.prototype.cb;T.prototype.Ob=function(){return!!(this.lo&1)};T.prototype.lsb=T.prototype.Ob;T.prototype.Ua=function(){return 0==this.lo&&0==this.hi};T.prototype.zero=T.prototype.Ua;T.prototype.add=function(a){return new T((this.lo+a.lo&4294967295)>>>0>>>0,((this.hi+a.hi&4294967295)>>>0)+(4294967296<=this.lo+a.lo?1:0)>>>0)};T.prototype.add=T.prototype.add; T.prototype.sub=function(a){return new T((this.lo-a.lo&4294967295)>>>0>>>0,((this.hi-a.hi&4294967295)>>>0)-(0>this.lo-a.lo?1:0)>>>0)};T.prototype.sub=T.prototype.sub;function rb(a,b){var c=a&65535;a>>>=16;var d=b&65535,f=b>>>16;b=c*d+65536*(c*f&65535)+65536*(a*d&65535);for(c=a*f+(c*f>>>16)+(a*d>>>16);4294967296<=b;)b-=4294967296,c+=1;return new T(b>>>0,c>>>0)}T.mul32x32=rb;T.prototype.eb=function(a){var b=rb(this.lo,a);a=rb(this.hi,a);a.hi=a.lo;a.lo=0;return b.add(a)};T.prototype.mul=T.prototype.eb; T.prototype.Xa=function(a){if(0==a)return[];var b=new T(0,0),c=new T(this.lo,this.hi);a=new T(a,0);for(var d=new T(1,0);!a.cb();)a=a.Da(),d=d.Da();for(;!d.Ua();)0>=a.cmp(c)&&(b=b.add(d),c=c.sub(a)),a=a.La(),d=d.La();return[b,c]};T.prototype.div=T.prototype.Xa;T.prototype.toString=function(){for(var a="",b=this;!b.Ua();){b=b.Xa(10);var c=b[0];a=b[1].lo+a;b=c}""==a&&(a="0");return a};T.prototype.toString=T.prototype.toString; function U(a){for(var b=new T(0,0),c=new T(0,0),d=0;da[d]||"9">>0>>>0,((this.hi+a.hi&4294967295)>>>0)+(4294967296<=this.lo+a.lo?1:0)>>>0)};V.prototype.add=V.prototype.add; V.prototype.sub=function(a){return new V((this.lo-a.lo&4294967295)>>>0>>>0,((this.hi-a.hi&4294967295)>>>0)-(0>this.lo-a.lo?1:0)>>>0)};V.prototype.sub=V.prototype.sub;V.prototype.clone=function(){return new V(this.lo,this.hi)};V.prototype.clone=V.prototype.clone;V.prototype.toString=function(){var a=0!=(this.hi&2147483648),b=new T(this.lo,this.hi);a&&(b=(new T(0,0)).sub(b));return(a?"-":"")+b.toString()};V.prototype.toString=V.prototype.toString; function sb(a){var b=0>>=7,a.b++;b.push(c);a.b++}W.prototype.pb=function(a,b,c){tb(this,a.subarray(b,c))};W.prototype.writeSerializedMessage=W.prototype.pb; W.prototype.Pb=function(a,b,c){null!=a&&null!=b&&null!=c&&this.pb(a,b,c)};W.prototype.maybeWriteSerializedMessage=W.prototype.Pb;W.prototype.reset=function(){this.c=[];this.a.end();this.b=0;this.h=[]};W.prototype.reset=W.prototype.reset;W.prototype.ab=function(){n(0==this.h.length);for(var a=new Uint8Array(this.b+this.a.length()),b=this.c,c=b.length,d=0,f=0;fb),vb(this,a,b))};W.prototype.writeInt32=W.prototype.S; W.prototype.ob=function(a,b){null!=b&&(b=parseInt(b,10),n(-2147483648<=b&&2147483648>b),vb(this,a,b))};W.prototype.writeInt32String=W.prototype.ob;W.prototype.T=function(a,b){null!=b&&(n(-9223372036854775808<=b&&0x7fffffffffffffff>b),null!=b&&(Y(this,a,0),this.a.ua(b)))};W.prototype.writeInt64=W.prototype.T;W.prototype.ka=function(a,b){null!=b&&(b=sb(b),Y(this,a,0),this.a.l(b.lo,b.hi))};W.prototype.writeInt64String=W.prototype.ka; W.prototype.s=function(a,b){null!=b&&(n(0<=b&&4294967296>b),ub(this,a,b))};W.prototype.writeUint32=W.prototype.s;W.prototype.ub=function(a,b){null!=b&&(b=parseInt(b,10),n(0<=b&&4294967296>b),ub(this,a,b))};W.prototype.writeUint32String=W.prototype.ub;W.prototype.V=function(a,b){null!=b&&(n(0<=b&&1.8446744073709552E19>b),null!=b&&(Y(this,a,0),this.a.va(b)))};W.prototype.writeUint64=W.prototype.V;W.prototype.vb=function(a,b){null!=b&&(b=U(b),Y(this,a,0),this.a.l(b.lo,b.hi))}; W.prototype.writeUint64String=W.prototype.vb;W.prototype.rb=function(a,b){null!=b&&(n(-2147483648<=b&&2147483648>b),null!=b&&(Y(this,a,0),this.a.wa(b)))};W.prototype.writeSint32=W.prototype.rb;W.prototype.sb=function(a,b){null!=b&&(n(-9223372036854775808<=b&&0x7fffffffffffffff>b),null!=b&&(Y(this,a,0),this.a.xa(b)))};W.prototype.writeSint64=W.prototype.sb;W.prototype.$d=function(a,b){null!=b&&null!=b&&(Y(this,a,0),this.a.W(b))};W.prototype.writeSintHash64=W.prototype.$d; W.prototype.Zd=function(a,b){null!=b&&null!=b&&(Y(this,a,0),this.a.Ta(b))};W.prototype.writeSint64String=W.prototype.Zd;W.prototype.Pa=function(a,b){null!=b&&(n(0<=b&&4294967296>b),Y(this,a,5),this.a.s(b))};W.prototype.writeFixed32=W.prototype.Pa;W.prototype.Qa=function(a,b){null!=b&&(n(0<=b&&1.8446744073709552E19>b),Y(this,a,1),this.a.V(b))};W.prototype.writeFixed64=W.prototype.Qa;W.prototype.nb=function(a,b){null!=b&&(b=U(b),Y(this,a,1),this.a.A(b.lo,b.hi))};W.prototype.writeFixed64String=W.prototype.nb; W.prototype.Ra=function(a,b){null!=b&&(n(-2147483648<=b&&2147483648>b),Y(this,a,5),this.a.S(b))};W.prototype.writeSfixed32=W.prototype.Ra;W.prototype.Sa=function(a,b){null!=b&&(n(-9223372036854775808<=b&&0x7fffffffffffffff>b),Y(this,a,1),this.a.T(b))};W.prototype.writeSfixed64=W.prototype.Sa;W.prototype.qb=function(a,b){null!=b&&(b=sb(b),Y(this,a,1),this.a.A(b.lo,b.hi))};W.prototype.writeSfixed64String=W.prototype.qb;W.prototype.L=function(a,b){null!=b&&(Y(this,a,5),this.a.L(b))}; W.prototype.writeFloat=W.prototype.L;W.prototype.J=function(a,b){null!=b&&(Y(this,a,1),this.a.J(b))};W.prototype.writeDouble=W.prototype.J;W.prototype.I=function(a,b){null!=b&&(n("boolean"===typeof b||"number"===typeof b),Y(this,a,0),this.a.I(b))};W.prototype.writeBool=W.prototype.I;W.prototype.R=function(a,b){null!=b&&(n(-2147483648<=b&&2147483648>b),Y(this,a,0),this.a.M(b))};W.prototype.writeEnum=W.prototype.R;W.prototype.U=function(a,b){null!=b&&(a=X(this,a),this.a.U(b),Z(this,a))}; W.prototype.writeString=W.prototype.U;W.prototype.ja=function(a,b){null!=b&&(b=Ua(b),Y(this,a,2),this.a.j(b.length),tb(this,b))};W.prototype.writeBytes=W.prototype.ja;W.prototype.Rc=function(a,b,c){null!=b&&(a=X(this,a),c(b,this),Z(this,a))};W.prototype.writeMessage=W.prototype.Rc;W.prototype.Sc=function(a,b,c){null!=b&&(Y(this,1,3),Y(this,2,0),this.a.M(a),a=X(this,3),c(b,this),Z(this,a),Y(this,1,4))};W.prototype.writeMessageSet=W.prototype.Sc; W.prototype.Oc=function(a,b,c){null!=b&&(Y(this,a,3),c(b,this),Y(this,a,4))};W.prototype.writeGroup=W.prototype.Oc;W.prototype.K=function(a,b){null!=b&&(n(8==b.length),Y(this,a,1),this.a.K(b))};W.prototype.writeFixedHash64=W.prototype.K;W.prototype.N=function(a,b){null!=b&&(n(8==b.length),Y(this,a,0),this.a.N(b))};W.prototype.writeVarintHash64=W.prototype.N;W.prototype.A=function(a,b,c){Y(this,a,1);this.a.A(b,c)};W.prototype.writeSplitFixed64=W.prototype.A; W.prototype.l=function(a,b,c){Y(this,a,0);this.a.l(b,c)};W.prototype.writeSplitVarint64=W.prototype.l;W.prototype.tb=function(a,b,c){Y(this,a,0);var d=this.a;Ja(b,c,function(f,h){d.l(f>>>0,h>>>0)})};W.prototype.writeSplitZigzagVarint64=W.prototype.tb;W.prototype.Ed=function(a,b){if(null!=b)for(var c=0;c>>0,t>>>0)});Z(this,a)}}; W.prototype.writePackedSplitZigzagVarint64=W.prototype.od;W.prototype.dd=function(a,b){if(null!=b&&b.length){a=X(this,a);for(var c=0;cc&&(c=Math.max(c+f,0));c>>0),ua=0;function va(a,b,c){return a.call.apply(a.bind,arguments)} function wa(a,b,c){if(!a)throw Error();if(2b?1:0};var I;a:{var Ra=x.navigator;if(Ra){var Sa=Ra.userAgent;if(Sa){I=Sa;break a}}I=""};function Ta(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Ua(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}var Va="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Wa(a,b){for(var c,d,f=1;fparseFloat(gb)){fb=String(ib);break a}}fb=gb}var $a={}; function kb(){return Za(function(){for(var a=0,b=Pa(String(fb)).split("."),c=Pa("9").split("."),d=Math.max(b.length,c.length),f=0;0==a&&f>>0);function Bb(a){if("function"===typeof a)return a;a[Jb]||(a[Jb]=function(b){return a.handleEvent(b)});return a[Jb]};function N(){lb.call(this);this.f=new tb(this);this.U=this}B(N,lb);N.prototype[M]=!0;N.prototype.addEventListener=function(a,b,c,d){zb(this,a,b,c,d)};N.prototype.removeEventListener=function(a,b,c,d){Hb(this,a,b,c,d)};function O(a,b){a=a.U;var c=b.type||b;if("string"===typeof b)b=new J(b,a);else if(b instanceof J)b.target=b.target||a;else{var d=b;b=new J(c,a);Wa(b,d)}a=b.a=a;Kb(a,c,!0,b);Kb(a,c,!1,b)} function Kb(a,b,c,d){if(b=a.f.a[String(b)]){b=b.concat();for(var f=!0,g=0;g=f.value}d&&(b=b||Ob,d=ac(bc(),a.getName()),"function"===typeof c&&(c=c()),Ub||(Ub=new Tb),a=a.getName(),a=new Vb(b,c,a),Yb(d,a))}function P(a,b){a&&cc(a,Rb,b)};function dc(){}dc.prototype.a=null;function ec(a){var b;(b=a.a)||(b={},fc(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b};var gc;function hc(){}B(hc,dc);function ic(a){return(a=fc(a))?new ActiveXObject(a):new XMLHttpRequest}function fc(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c2*this.size&&pc(this),!0):!1};function pc(a){if(a.size!=a.j.length){for(var b=0,c=0;b=d.j.length)throw lc;var g=d.j[b++];return a?g:d.o[g]};f.next=f.a.bind(f);return f};function U(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var qc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function rc(a){N.call(this);this.headers=new oc;this.C=a||null;this.c=!1;this.J=this.a=null;this.P=this.v="";this.g=0;this.l="";this.i=this.N=this.s=this.L=!1;this.h=0;this.w=null;this.m=sc;this.I=this.M=!1}B(rc,N);var sc="";rc.prototype.b=ac(bc(),"goog.net.XhrIo",void 0).g;var tc=/^https?$/i,uc=["POST","PUT"]; function vc(a,b,c){if(a.a)throw Error("[goog.net.XhrIo] Object is active with another request="+a.v+"; newUri="+b);a.v=b;a.l="";a.g=0;a.P="POST";a.L=!1;a.c=!0;a.a=a.C?ic(a.C):ic(gc);a.J=a.C?ec(a.C):ec(gc);a.a.onreadystatechange=z(a.R,a);try{P(a.b,V(a,"Opening Xhr")),a.N=!0,a.a.open("POST",String(b),!0),a.N=!1}catch(g){P(a.b,V(a,"Error opening Xhr: "+g.message));wc(a,g);return}b=c||"";c=a.headers.clone();var d=c.G().find(function(g){return"content-type"==g.toLowerCase()}),f=x.FormData&&b instanceof x.FormData;!(0<=Oa(uc,"POST"))||d||f||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");c.forEach(function(g,e){this.a.setRequestHeader(e,g)},a);a.m&&(a.a.responseType=a.m);"withCredentials"in a.a&&a.a.withCredentials!==a.M&&(a.a.withCredentials=a.M);try{xc(a),0>4);64!=e&&(b(g<<4&240|e>>2),64!=h&&b(e<<6&192|h))}} function Ic(){if(!Fc){Fc={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));Ec[c]=d;for(var f=0;fh&&(h=f.length),e=f.indexOf("?"), 0>e||e>h?(e=h,k=""):k=f.substring(e+1,h),f=[f.substr(0,e),k,f.substr(h)],h=f[1],f[1]=m?h?h+"&"+m:m:h,f=f[0]+(f[1]?"?"+f[1]:"")+f[2]}else f.a("$httpHeaders",h)}b=(0,d.a)(b.getRequestMessage());d=b.length;m=[0,0,0,0];h=new Uint8Array(5+d);for(e=3;0<=e;e--)m[e]=d%256,d>>>=8;h.set(new Uint8Array(m),1);h.set(b,5);b=h;if("text"==a.a){a=b;var p;void 0===p&&(p=0);Ic();p=Ec[p];b=Array(Math.floor(a.length/3));d=p[64]||"";for(m=h=0;h>2];l=p[(l&3)<<4|q>>4]; q=p[(q&15)<<2|k>>6];k=p[k&63];b[m++]=e+l+q+k}e=0;k=d;switch(a.length-h){case 2:e=a[h+1],k=p[(e&15)<<2]||d;case 1:a=a[h],b[m]=p[a>>2]+p[(a&3)<<4|e>>4]+k+d}b=b.join("")}else"binary"==a.a&&(c.m="arraybuffer");vc(c,f,b);return g} function Qc(a,b,c){var d=!1,f=null,g=!1;a.on("data",function(e){d=!0;f=e});a.on("error",function(e){0==e.code||g||(g=!0,b(e,null))});a.on("status",function(e){0==e.code||g?c&&b(null,null,e):(g=!0,b({code:e.code,message:e.details,metadata:e.metadata},null))});if(c)a.on("metadata",function(e){b(null,null,null,e)});a.on("end",function(){g||(d?c?b(null,f,null,null,!0):b(null,f):b({code:2,message:"Incomplete response"}));c&&b(null,null)})} function Oc(a,b){var c=a;b.forEach(function(d){var f=c;c=function(g){return d.intercept(g,f)}});return c}Z.prototype.serverStreaming=Z.prototype.Y;Z.prototype.unaryCall=Z.prototype.unaryCall;Z.prototype.thenableCall=Z.prototype.S;Z.prototype.rpcCall=Z.prototype.X;module.exports.CallOptions=xa;module.exports.MethodDescriptor=ya;module.exports.GrpcWebClientBase=Z;module.exports.RpcError=E;module.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15};module.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming",BIDI_STREAMING:"bidi_streaming"}; Lb="undefined"!==typeof globalThis&&globalThis||self; }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}]},{},[3]);