diffusion
Version:
Diffusion JavaScript client
1 lines • 721 kB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).diffusion=e()}}((function(){var e=function(e){var t;return function(r){return t||e(t={exports:{},parent:r},t.exports),t.exports}},t=e((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.REMOVE_METRIC_ALERT=t.LIST_METRIC_ALERTS=t.SET_METRIC_ALERT=t.GET_METRICS=t.FETCH_JMX_VALUES=t.LIST_TOPIC_METRIC_COLLECTORS=t.REMOVE_TOPIC_METRIC_COLLECTOR=t.PUT_TOPIC_METRIC_COLLECTOR=t.GET_MEASURED_ENTITY_CLASS_METRICS=t.GET_SERVER_METRICS=t.LIST_SESSION_METRIC_COLLECTORS=t.REMOVE_SESSION_METRIC_COLLECTOR=t.PUT_SESSION_METRIC_COLLECTOR=void 0;var n=r({});t.PUT_SESSION_METRIC_COLLECTOR={id:135,request:YI.SessionMetricCollectorSerialiser,response:mw.ErrorReportListSerialiser},t.REMOVE_SESSION_METRIC_COLLECTOR={id:136,request:V_.StringSerialiser,response:cv.NullSerialiser},t.LIST_SESSION_METRIC_COLLECTORS={id:137,request:cv.NullSerialiser,response:KI.SessionMetricCollectorListSerialiser},t.GET_SERVER_METRICS={id:142,request:cv.NullSerialiser,response:Cb.ServerMetricsSerialiser},t.GET_MEASURED_ENTITY_CLASS_METRICS={id:145,request:Ib.MeasuredEntityClassRequestSerialiser,response:_b.MeasuredEntityClassMetricsSerialiser},t.PUT_TOPIC_METRIC_COLLECTOR={id:146,request:ZI.TopicMetricCollectorSerialiser,response:cv.NullSerialiser},t.REMOVE_TOPIC_METRIC_COLLECTOR={id:147,request:V_.StringSerialiser,response:cv.NullSerialiser},t.LIST_TOPIC_METRIC_COLLECTORS={id:148,request:cv.NullSerialiser,response:rb.TopicMetricCollectorListSerialiser},t.FETCH_JMX_VALUES={id:149,request:OI.JMXFetchRequestSerialiser,response:PI.JMXFetchResponseSerialiser},t.GET_METRICS={id:186,request:n.MetricsRequestSerialiser,response:UI.MetricsResultSerialiser},t.SET_METRIC_ALERT={id:187,request:Pb.SetMetricAlertRequestSerialiser,response:mw.ErrorReportListSerialiser},t.LIST_METRIC_ALERTS={id:188,request:cv.NullSerialiser,response:fb.ListMetricAlertsResultSerialiser},t.REMOVE_METRIC_ALERT={id:191,request:V_.StringSerialiser,response:cv.NullSerialiser}})),r=e((function(e,t){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},s=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsRequestSerialiser=void 0;var a=n({}),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.write=function(e,t){bu.writeCollection(e,s([],i(t.filters.values())),bu.writeString),bu.writeString(e,t.pattern),zh.write(e,t.requestType),t.requestType===a.RequestType.NAMED_SERVER&&bu.writeString(e,t.server)},t}(Gu.AbstractSerialiser);t.MetricsRequestSerialiser=new u})),n=e((function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MetricsRequestImpl=r.RequestType=void 0;var n,o=t({});!function(e){e[e.CURRENT_SERVER=0]="CURRENT_SERVER",e[e.ALL_SERVERS=1]="ALL_SERVERS",e[e.NAMED_SERVER=2]="NAMED_SERVER"}(n=r.RequestType||(r.RequestType={}));var i=function(){function e(e,t,r,n,o){this.theFilters=e,this.pattern=t,this.theServer=r,this.theRequestType=n,this.internal=o}return e.create=function(t){return new e(new Set,void 0,void 0,n.ALL_SERVERS,t)},e.prototype.filter=function(t){return Zl.requireNonNull(t,"filters"),"string"==typeof t||t instanceof RegExp?new e(new Set,t instanceof RegExp?t.source:t,this.theServer,this.theRequestType,this.internal):new e(new Set(t),void 0,this.theServer,this.theRequestType,this.internal)},e.prototype.server=function(t){if(Zl.requireNonNull(t,"server"),""===t)throw new va.IllegalArgumentError("server must not be empty");return new e(this.theFilters,this.pattern,t,n.NAMED_SERVER,this.internal)},e.prototype.currentServer=function(){return new e(this.theFilters,this.pattern,void 0,n.CURRENT_SERVER,this.internal)},e.prototype.fetch=function(){var e,t=this,r={filters:this.theFilters,pattern:null!==(e=this.pattern)&&void 0!==e?e:"",server:this.theServer,requestType:this.theRequestType};return new Promise((function(e,n){t.internal.checkConnected(n)&&t.internal.getServiceLocator().obtain(o.GET_METRICS).send(r,(function(t,r){t?n(t):e(r)}))}))},e}();r.MetricsRequestImpl=i})),o=e((function(e,t){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.GatewayControlImpl=t.ConfigurationMode=t.StatusLevel=void 0;var o=i({});!function(e){e[e.GREEN=0]="GREEN",e[e.AMBER=1]="AMBER",e[e.RED=2]="RED"}(t.StatusLevel||(t.StatusLevel={})),function(e){e[e.STATIC=0]="STATIC",e[e.DYNAMIC=1]="DYNAMIC"}(t.ConfigurationMode||(t.ConfigurationMode={}));var s=function(){function e(e){this.internal=e,this.clientRequestsService=e.getServiceLocator().obtain(o.GATEWAY_CLIENT_REQUEST),this.getClientsService=e.getServiceLocator().obtain(o.GET_GATEWAY_CLIENTS),this.getClientDetailsService=e.getServiceLocator().obtain(o.GET_GATEWAY_CLIENT_DETAILS),this.registerClientService=e.getServiceLocator().obtain(o.REGISTER_GATEWAY_CLIENT),this.removeClientService=e.getServiceLocator().obtain(o.REMOVE_GATEWAY_CLIENT)}return e.prototype.checkSessionId=function(e){if(e instanceof Vd.SessionId)return e;if("string"==typeof e)return Vd.SessionId.fromString(e);if(null===e)throw new va.IllegalArgumentError("Session ID must be a string or instance of SessionId, but was null");throw new va.IllegalArgumentError("Session ID must be a string or instance of SessionId, but was of type: "+typeof e)},e.prototype.checkClientKey=function(e){if(null==e||"object"!=typeof e)throw new va.IllegalArgumentError("clientKey must be a non-null object");if(null===e.type||void 0===e.type)throw new va.IllegalArgumentError("clientKey type must not be null or undefined");if(null===e.id||void 0===e.id)throw new va.IllegalArgumentError("clientKey id must not be null or undefined");return e},e.prototype.checkOperationName=function(e){return this.checkStringArgument(e,"Operation name")},e.prototype.checkStringArgument=function(e,t){if("string"==typeof e)return e;if(null===e)throw new va.IllegalArgumentError(t+" must be a string, but was null");throw new va.IllegalArgumentError(t+" must be a string, but was of type: "+typeof e)},e.prototype.checkServiceId=function(e){return{name:this.checkStringArgument(e.name,"Service ID name"),type:this.checkStringArgument(e.type,"Service ID type")}},e.prototype.checkServiceHandle=function(e){return r(r({},this.checkServiceId(e)),{sessionId:this.checkSessionId(e.sessionId)})},e.prototype.sessionContextTransformer=function(e){return function(t){return r(r({},t),{id:r(r({},t.id),{sessionId:e})})}},e.prototype.getConfiguration=function(e){var t=this,r=this.checkSessionId(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.clientRequestsService.send(new Fg.GatewayClientGetConfigurationRequest(r),(function(t,r){t?n(t):e(r)}))}))},e.prototype.getStatus=function(e){var t=this,r=this.checkSessionId(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.clientRequestsService.send(new $g.GatewayClientGetStatusRequest(r),(function(t,r){t?n(t):e(r)}))}))},e.prototype.getClients=function(){var e=this;return new Promise((function(t,r){e.internal.checkConnected(r)&&e.getClientsService.send(null,(function(e,n){e?r(e):t(n)}))}))},e.prototype.getClientDetailList=function(e){var t=this;return new Promise((function(r,n){t.internal.checkConnected(n)&&t.getClientDetailsService.send(e,(function(e,t){e?n(e):r(t)}))}))},e.prototype.registerClient=function(e){var t=this,r=this.checkClientKey(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.registerClientService.send(r,(function(t){t?n(t):e()}))}))},e.prototype.removeClient=function(e){var t=this,r=this.checkClientKey(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.removeClientService.send(r,(function(t){t?n(t):e()}))}))},e.prototype.getOperations=function(e){var t=this,r=this.checkSessionId(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.clientRequestsService.send(new sT.GatewayClientGetOperationsRequest(r),(function(t,r){t?n(t):e(r)}))}))},e.prototype.getOperationDetail=function(e,t){var r=this,n=this.checkSessionId(e),o=this.checkOperationName(t);return new Promise((function(e,t){r.internal.checkConnected(t)&&r.clientRequestsService.send(new nT.GatewayClientGetOperationDetailRequest(n,o),(function(r,n){r?t(r):e(n)}))}))},e.prototype.invokeOperation=function(e,t,r){var n=this,o=this.checkSessionId(e),i=this.checkOperationName(t),s=null===r?void 0:r;return new Promise((function(e,t){n.internal.checkConnected(t)&&n.clientRequestsService.send(new cT.GatewayClientInvokeOperationRequest(o,i,s),(function(r,n){r?t(r):e(n)}))}))},e.prototype.getServiceTypes=function(e){var t=this,r=this.checkSessionId(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.clientRequestsService.send(new Yg.GatewayClientGetServiceTypesRequest(r),(function(t,r){t?n(t):e(r.serviceTypes)}))}))},e.prototype.getServices=function(e){var t=this,r=this.checkSessionId(e);return new Promise((function(e,n){t.internal.checkConnected(n)&&t.clientRequestsService.send(new Kg.GatewayClientGetServicesRequest(r),(function(o,i){if(o)n(o);else{var s=t.sessionContextTransformer(r);e(i.services.map(s))}}))}))},e.prototype.addService=function(e,t,r,n){var o=this,i=this.checkSessionId(e),s={id:this.checkServiceId(t),description:this.checkStringArgument(r,"Service description"),configuration:this.checkStringArgument(n,"Service configuration")};return new Promise((function(e,t){o.internal.checkConnected(t)&&o.clientRequestsService.send(new Bg.GatewayClientAddServiceRequest(i,s),(function(r,n){if(r)t(r);else{var s=o.sessionContextTransformer(i);e(s(n.service))}}))}))},e.prototype.updateService=function(e,t,r){var o=this,i=this.checkServiceHandle(e),s=i.sessionId,a=n(i,["sessionId"]);if(null==t&&null==r)return Promise.reject(new Error("Missing parameter: you must provide configuration or description (or both) when calling updateService"));var u={id:a,description:t,configuration:r};return new Promise((function(e,t){o.internal.checkConnected(t)&&o.clientRequestsService.send(new eT.GatewayClientUpdateServiceRequest(s,u),(function(r,n){if(r)t(r);else{var i=o.sessionContextTransformer(s);e(i(n.service))}}))}))},e.prototype.removeService=function(e){var t=this,r=this.checkServiceHandle(e),o=r.sessionId,i=n(r,["sessionId"]);return new Promise((function(e,r){t.internal.checkConnected(r)&&t.clientRequestsService.send(new yT.GatewayClientRemoveServiceRequest(o,i),(function(t,n){t?r(t):e()}))}))},e.prototype.getServiceStatus=function(e){var t=this,r=this.checkServiceHandle(e),o=r.sessionId,i=n(r,["sessionId"]);return new Promise((function(e,r){t.internal.checkConnected(r)&&t.clientRequestsService.send(new RT.GatewayServiceGetStatusRequest(o,i),(function(t,n){t?r(t):e(n)}))}))},e.prototype.getServiceConfiguration=function(e){var t=this,r=this.checkServiceHandle(e),o=r.sessionId,i=n(r,["sessionId"]);return new Promise((function(e,r){t.internal.checkConnected(r)&&t.clientRequestsService.send(new _T.GatewayServiceGetConfigurationRequest(o,i),(function(t,n){t?r(t):e(n)}))}))},e.prototype.getServiceOperations=function(e){var t=this,r=this.checkServiceHandle(e),o=r.sessionId,i=n(r,["sessionId"]);return new Promise((function(e,r){t.internal.checkConnected(r)&&t.clientRequestsService.send(new OT.GatewayServiceGetOperationsRequest(o,i),(function(t,n){t?r(t):e(n)}))}))},e.prototype.getServiceOperationDetail=function(e,t){var r=this,o=this.checkServiceHandle(e),i=o.sessionId,s=n(o,["sessionId"]),a=this.checkOperationName(t);return new Promise((function(e,t){r.internal.checkConnected(t)&&r.clientRequestsService.send(new mT.GatewayServiceGetOperationDetailRequest(i,s,a),(function(r,n){r?t(r):e(n)}))}))},e.prototype.invokeServiceOperation=function(e,t,r){var o=this,i=this.checkServiceHandle(e),s=i.sessionId,a=n(i,["sessionId"]),u=this.checkOperationName(t),c=null===r?void 0:r;return new Promise((function(e,t){o.internal.checkConnected(t)&&o.clientRequestsService.send(new NT.GatewayServiceInvokeOperationRequest(s,a,u,c),(function(r,n){r?t(r):e(n)}))}))},e}();t.GatewayControlImpl=s})),i=e((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GET_GATEWAY_CLIENT_DETAILS=t.GET_GATEWAY_CLIENTS=t.REMOVE_GATEWAY_CLIENT=t.REGISTER_GATEWAY_CLIENT=t.GATEWAY_CLIENT_REQUEST=void 0;var r=u({}),n=s({});t.GATEWAY_CLIENT_REQUEST={id:170,request:KT.GatewayClientRequestSerialiser,response:n.GatewayResponseSerialiser},t.REGISTER_GATEWAY_CLIENT={id:173,request:xT.GatewayClientKeySerialiser,response:cv.NullSerialiser},t.REMOVE_GATEWAY_CLIENT={id:174,request:xT.GatewayClientKeySerialiser,response:cv.NullSerialiser},t.GET_GATEWAY_CLIENTS={id:175,request:cv.NullSerialiser,response:BT.GatewayClientListSerialiser},t.GET_GATEWAY_CLIENT_DETAILS={id:185,request:LT.GatewayClientDetailListRequestSerialiser,response:r.GatewayClientDetailListSerialiser}})),s=e((function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GatewayResponseSerialiser=void 0;var o=a({}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.read=function(e){var t=zh.read(e,qg.GatewayRequestType);switch(t){case qg.GatewayRequestType.GET_CONFIGURATION:case qg.GatewayRequestType.GET_SERVICE_CONFIGURATION:return new XT.GetConfigurationResponse(t,bu.readByte(e),bu.readString(e),bu.readString(e));case qg.GatewayRequestType.GET_STATUS:case qg.GatewayRequestType.GET_SERVICE_STATUS:return new eO.GetStatusResponse(t,bu.readCollection(e,o.StatusItemSerialiser.read));case qg.GatewayRequestType.GET_OPERATIONS:case qg.GatewayRequestType.GET_SERVICE_OPERATIONS:return new oO.GetOperationsResponse(t,bu.readCollection(e,uO.GatewayOperationSerialiser.read));case qg.GatewayRequestType.GET_OPERATION_DETAIL:case qg.GatewayRequestType.GET_SERVICE_OPERATION_DETAIL:return new rO.GetOperationDetailResponse(t,bu.readString(e),bu.readOptional(e,bu.readString),bu.readOptional(e,bu.readString));case qg.GatewayRequestType.INVOKE_OPERATION:case qg.GatewayRequestType.INVOKE_SERVICE_OPERATION:return new sO.InvokeOperationResponse(t,bu.readOptional(e,bu.readString));case qg.GatewayRequestType.ADD_SERVICE:case qg.GatewayRequestType.UPDATE_SERVICE:return new pO.AddUpdateServiceResponse(t,YT.GatewayServiceSerialiser.read(e));case qg.GatewayRequestType.GET_SERVICES:return new yO.GetServicesResponse(bu.readCollection(e,YT.GatewayServiceSerialiser.read));case qg.GatewayRequestType.GET_SERVICE_TYPES:return new hO.GetServiceTypesResponse(bu.readCollection(e,SO.GatewayServiceTypeSerialiser.read));case qg.GatewayRequestType.REMOVE_SERVICE:return{type:t};default:throw new KT.UnknownGatewayRequestTypeError(t)}},t}(Gu.AbstractSerialiser);t.GatewayResponseSerialiser=new i})),a=e((function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.StatusItemSerialiser=void 0;var i=o({}),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.read=function(e){return{level:zh.read(e,i.StatusLevel),timestamp:bu.readInt64(e),title:bu.readString(e),description:bu.readString(e)}},t}(Gu.AbstractSerialiser);t.StatusItemSerialiser=new s})),u=e((function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GatewayClientDetailListSerialiser=void 0;var o=c({}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.read=function(e){return{gatewayClientDetails:bu.readCollection(e,o.GatewayClientDetailSerialiser.read)}},t}(Gu.AbstractSerialiser);t.GatewayClientDetailListSerialiser=new i})),c=e((function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GatewayClientDetailSerialiser=void 0;var o=l({}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.read=function(e){return{key:xT.GatewayClientKeySerialiser.read(e),connectedClientDetails:bu.readOptional(e,o.GatewayClientConnectedClientDetailsSerialiser.read)}},t}(Gu.AbstractSerialiser);t.GatewayClientDetailSerialiser=new i})),l=e((function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GatewayClientConnectedClientDetailsSerialiser=void 0;var i=o({}),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.read=function(e){return{activeSessionId:bu.readOptional(e,bu.readString),passiveSessionIds:bu.readCollection(e,bu.readString),configurationMode:bu.readOptional(e,(function(e){return zh.read(e,i.ConfigurationMode)}))}},t}(Gu.AbstractSerialiser);t.GatewayClientConnectedClientDetailsSerialiser=new s})),p=e((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataTypes=void 0;var r=f({}),n=function(){function e(){this.recordv2Impl=new Vf.RecordV2DataTypeImpl,this.binaryImpl=new Gl.BinaryDataTypeImpl,this.stringImpl=new Vp.StringDataTypeImpl,this.doubleImpl=new Lp.DoubleDataTypeImpl,this.int64Impl=new Up.Int64DataTypeImpl,this.jsonImpl=new Ap.JSONDataTypeImpl,this.anyImpl=new Gc.AnyDataTypeImpl}return e.prototype.binary=function(){return this.binaryImpl},e.prototype.string=function(){return this.stringImpl},e.prototype.double=function(){return this.doubleImpl},e.prototype.int64=function(){return this.int64Impl},e.prototype.json=function(){return this.jsonImpl},e.prototype.recordv2=function(){return this.recordv2Impl},e.prototype.any=function(){return this.anyImpl},e.prototype.timeseries=function(e){return r.TimeSeriesEventDataType.create(e)},e.prototype.getByName=function(e){switch(e.toLowerCase()){case"json":return this.json();case"int64":return this.int64();case"binary":return this.binary();case"string":return this.string();case"double":return this.double();case"record_v2":return this.recordv2();default:return}},e.prototype.getByValue=function(e){return e===jc.TopicType.BINARY||e instanceof Fl.BinaryImpl||Iu.isUint8Array(e)?this.binary():e===jc.TopicType.JSON||e instanceof gp.JSONImpl||e.constructor===Object||"boolean"==typeof e?this.json():e===jc.TopicType.STRING||"string"==typeof e?this.string():e===jc.TopicType.INT64||e instanceof Yc.Int64Impl?this.int64():e===jc.TopicType.RECORD_V2||e instanceof _f.RecordV2Impl?this.recordv2():e===jc.TopicType.DOUBLE||"number"==typeof e?this.double():void 0},e.prototype.get=function(e){var t;return"string"==typeof e&&(t=this.getByName(e)),t||(t=this.getByValue(e)),t||(t=this.getByClassSafely(e)),t||null},e.prototype.getChecked=function(e){if(null==e)throw new va.IllegalArgumentError("No data type for "+e);if(e instanceof Vf.RecordV2DataTypeImpl||e instanceof Gl.BinaryDataTypeImpl||e instanceof Vp.StringDataTypeImpl||e instanceof Lp.DoubleDataTypeImpl||e instanceof Up.Int64DataTypeImpl||e instanceof Ap.JSONDataTypeImpl)return e;var t=this.get(e);if(null===t)throw new va.IllegalArgumentError("No data type for "+e);return t},e.prototype.getValueClassChecked=function(e){switch(this.getChecked(e)){case this.jsonImpl:return gp.JSONImpl;case this.binaryImpl:return Fl.BinaryImpl;case this.stringImpl:return String;case this.doubleImpl:return Number;case this.int64Impl:return Yc.Int64Impl;case this.recordv2Impl:return _f.RecordV2Impl;default:return}},e.prototype.getByClassSafely=function(e){switch(e){case gp.JSONImpl:return this.jsonImpl;case Fl.BinaryImpl:return this.binaryImpl;case String:return this.stringImpl;case Number:return this.doubleImpl;case Yc.Int64Impl:return this.int64Impl;case _f.RecordV2Impl:return this.recordv2Impl;default:return}},e.prototype.getByClass=function(e){var t=this.getByClassSafely(e);if(t)return t;throw new va.IllegalArgumentError("No data type for "+e)},e}(),o=new n;t.DataTypes=o})),f=e((function(e,t){(function(e){(function(){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TimeSeriesEventDataType=void 0;var o,i=p({});function s(e,t){var r=new oc.BufferOutputStream;t.isEditEvent?(bu.writeByte(r,o.EDIT_EVENT),Qf.EventMetadataImplSerialiser.write(r,t.originalEvent)):bu.writeByte(r,o.ORIGINAL_EVENT),Qf.EventMetadataImplSerialiser.write(r,t);var n=e(t.value);return bu.writeBytes(r,n.$buffer),r.getBuffer()}function a(e,t){var r=new rc.BufferInputStream(t.$buffer),n=bu.readByte(r);switch(n){case o.ORIGINAL_EVENT:return function(e,t){var r=Qf.EventMetadataImplSerialiser.read(t),n=e(bu.readBytes(t));return Yf.EventImpl.create(r,r,n)}(e,r);case o.EDIT_EVENT:return function(e,t){var r=Qf.EventMetadataImplSerialiser.read(t),n=Qf.EventMetadataImplSerialiser.read(t),o=e(bu.readBytes(t));return Yf.EventImpl.create(n,r,o)}(e,r);default:throw new va.InvalidDataError("Unrecognised event type: "+n)}}!function(e){e[e.ORIGINAL_EVENT=0]="ORIGINAL_EVENT",e[e.EDIT_EVENT=1]="EDIT_EVENT"}(o||(o={}));var u=function(t){function r(e,r,n,o){var u=this,c=i.DataTypes.getByName(r),l=void 0!==c?[{name:c.valueClass.toString(),convert:function(e,t,r){var o=new ql.BytesImpl(e,t,r);return a(n,o).value}}]:[];return(u=t.call(this,e,Yf.EventImpl,ql.BytesImpl,(function(e){return function(e,t){if(!t)throw new va.IllegalArgumentError("Cannot convert null event to Bytes");return new ql.BytesImpl(s(e,t))}(o,e)}),(function(e){return a(n,e)}),l,!0)||this).valueToBytes=o,u.valueTypeName=r,u}return n(r,t),r.create=function(e){return new r("timeseriesevent-"+e.name(),e.name(),e.readValue.bind(e),e.toBytes.bind(e))},r.prototype.writeValue=function(t){return e.from(s(this.valueToBytes,t))},r.prototype.writeValueToArray=function(e){return s(this.valueToBytes,e)},r.prototype.validate=function(){},r.prototype.from=function(e){return e instanceof sl.BufferSlice?e:this.valueToBytes(e.value)},r}(Bl.AbstractDataType);t.TimeSeriesEventDataType=u}).call(this)}).call(this,d({}).Buffer)})),h=e((function(e,t){(function(e){(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decompressSync=void 0;var r=require("zlib");t.decompressSync=function(t){var n=t instanceof Uint8Array?void 0===e?t:e.from(t):t;return r.inflateSync(n)}}).call(this)}).call(this,d({}).Buffer)})),d=e((function(e,t){(function(e){(function(){"use strict";t.Buffer=r,t.INSPECT_MAX_BYTES=50;function e(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=r.prototype,t}function r(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return i(e)}return n(e,t,r)}function n(t,n,o){if("string"==typeof t)return function(t,n){"string"==typeof n&&""!==n||(n="utf8");if(!r.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o=0|u(t,n),i=e(o),s=i.write(t,n);s!==o&&(i=i.slice(0,s));return i}(t,n);if(ArrayBuffer.isView(t))return s(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(D(t,ArrayBuffer)||t&&D(t.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var o;o=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return o.__proto__=r.prototype,o}(t,n,o);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return r.from(i,n,o);var c=function(t){if(r.isBuffer(t)){var n=0|a(t.length),o=e(n);return 0===o.length||t.copy(o,0,0,n),o}if(void 0!==t.length)return"number"!=typeof t.length||x(t.length)?e(0):s(t);if("Buffer"===t.type&&Array.isArray(t.data))return s(t.data)}(t);if(c)return c;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return r.from(t[Symbol.toPrimitive]("string"),n,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function i(t){return o(t),e(t<0?0:0|a(t))}function s(t){for(var r=t.length<0?0:0|a(t.length),n=e(r),o=0;o<r;o+=1)n[o]=255&t[o];return n}function a(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function u(e,t){if(r.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(i)return o?-1:M(e).length;t=(""+t).toLowerCase(),i=!0}}function c(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return m(this,t,r);case"latin1":case"binary":return g(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function l(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function p(e,t,n,o,i){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),x(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=r.from(t,o)),r.isBuffer(t))return 0===t.length?-1:f(e,t,n,o,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):f(e,[t],n,o,i);throw new TypeError("val must be string, number or Buffer")}function f(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var p=!0,f=0;f<u;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function h(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(x(a))return s;e[r+s]=a}return s}function d(e,t,r,n){return j(M(t,e.length-r),e,r,n)}function y(e,t,r,n){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return y(e,t,r,n)}function S(e,t,r,n){return j(L(t),e,r,n)}function _(e,t,r,n){return j(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?yu.fromByteArray(e):yu.fromByteArray(e.slice(t,r))}function w(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,u,c=e[o],l=null,p=c>239?4:c>223?3:c>191?2:1;if(o+p<=r)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}r.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),r.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=function(e,t,r){return n(e,t,r)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,r.alloc=function(t,r,n){return function(t,r,n){return o(t),t<=0?e(t):void 0!==r?"string"==typeof n?e(t).fill(r,n):e(t).fill(r):e(t)}(t,r,n)},r.allocUnsafe=function(e){return i(e)},r.allocUnsafeSlow=function(e){return i(e)},r.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==r.prototype},r.compare=function(e,t){if(D(e,Uint8Array)&&(e=r.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,o=t.length,i=0,s=Math.min(n,o);i<s;++i)if(e[i]!==t[i]){n=e[i],o=t[i];break}return n<o?-1:o<n?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return r.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=r.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(D(s,Uint8Array)&&(s=r.from(s)),!r.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,i),i+=s.length}return o},r.byteLength=u,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)l(this,t,t+1);return this},r.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)l(this,t,t+3),l(this,t+1,t+2);return this},r.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)l(this,t,t+7),l(this,t+1,t+6),l(this,t+2,t+5),l(this,t+3,t+4);return this},r.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):c.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===r.compare(this,e)},r.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r.prototype.compare=function(e,t,n,o,i){if(D(e,Uint8Array)&&(e=r.from(e,e.offset,e.byteLength)),!r.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=n)return 0;if(o>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(o>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(o,i),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){s=c[p],a=l[p];break}return s<a?-1:a<s?1:0},r.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},r.prototype.indexOf=function(e,t,r){return p(this,e,t,r,!0)},r.prototype.lastIndexOf=function(e,t,r){return p(this,e,t,r,!1)},r.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return h(this,e,t,r);case"utf8":case"utf-8":return d(this,e,t,r);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function g(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function T(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=P(e[i]);return o}function O(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function b(e,t,n,o,i,s){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,o){return t=+t,r>>>=0,o||R(e,0,r,4),Ou.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,o){return t=+t,r>>>=0,o||R(e,0,r,8),Ou.write(e,t,r,n,52,8),r+8}r.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var o=this.subarray(e,t);return o.__proto__=r.prototype,o},r.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},r.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},r.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},r.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},r.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},r.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},r.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),Ou.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),Ou.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),Ou.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),Ou.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||b(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},r.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||b(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},r.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,1,255,0),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},r.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},r.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},r.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},r.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);b(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},r.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);b(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},r.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},r.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},r.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},r.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},r.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},r.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},r.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},r.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},r.prototype.copy=function(e,t,n,o){if(!r.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var i=o-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,o);else if(this===e&&n<t&&t<o)for(var s=i-1;s>=0;--s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,o),t);return i},r.prototype.fill=function(e,t,n,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!r.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===e.length){var i=e.charCodeAt(0);("utf8"===o&&i<128||"latin1"===o)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=r.isBuffer(e)?e:r.from(e,o),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=a[s%u]}return this};var N=/[^+/0-9A-Za-z-_]/g;function P(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function L(e){return yu.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function x(e){return e!=e}}).call(this)}).call(this,d({}).Buffer)})),y={};(function(e){(function(){var t=function(e){return e&&e.Math==Math&&e};y=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var v=function(e){try{return!!e()}catch(e){return!0}},S=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_={},E={}.propertyIsEnumerable,w=Object.getOwnPropertyDescriptor,m=w&&!E.call({1:2},1);_.f=m?function(e){var t=w(this,e);return!!t&&t.enumerable}:E;var g,T,O=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I={}.toString,b=function(e){return I.call(e).slice(8,-1)},R="".split,C=v((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==b(e)?R.call(e,""):Object(e)}:Object,A=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},N=function(e){return C(A(e))},P=function(e){return"object"==typeof e?null!==e:"function"==typeof e},M=function(e){return"function"==typeof e?e:void 0},L=function(e,t){return arguments.length<2?M(y[e]):y[e]&&y[e][t]},j=L("navigator","userAgent")||"",D=y.process,x=y.Deno,U=D&&D.versions||x&&x.version,q=U&&U.v8;q?T=(g=q.split("."))[0]<4?1:g[0]+g[1]:j&&(!(g=j.match(/Edge\/(\d+)/))||g[1]>=74)&&(g=j.match(/Chrome\/(\d+)/))&&(T=g[1]);var B,k=T&&+T,V=!!Object.getOwnPropertySymbols&&!v((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&k&&k<41})),F=V&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=F?function(e){return"symbol"==typeof e}:function(e){var t=L("Symbol");return"function"==typeof t&&Object(e)instanceof t},H=function(e,t){try{Object.defineProperty(y,e,{value:t,configurable:!0,writable:!0})}catch(r){y[e]=t}return t},Y=y["__core-js_shared__"]||H("__core-js_shared__",{});(B=function(e,t){return Y[e]||(Y[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.16.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var W=function(e){return Object(A(e))},z={}.hasOwnProperty,K=Object.hasOwn||function(e,t){return z.call(W(e),t)},Q=0,J=Math.random(),$=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Q+J).toString(36)},X=B("wks"),Z=y.Symbol,ee=F?Z:Z&&Z.withoutSetter||$,te=function(e){return K(X,e)&&(V||"string"==typeof X[e])||(V&&K(Z,e)?X[e]=Z[e]:X[e]=ee("Symbol."+e)),X[e]},re=te("toPrimitive"),ne=function(e,t){if(!P(e)||G(e))return e;var r,n=e[re];if(void 0!==n){if(void 0===t&&(t="default"),r=n.call(e,t),!P(r)||G(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&"function"==typeof(r=e.toString)&&!P(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!P(n=r.call(e)))return n;if("string"!==t&&"function"==typeof(r=e.toString)&&!P(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")}(e,t)},oe=function(e){var t=ne(e,"string");return G(t)?t:String(t)},ie=y.document,se=P(ie)&&P(ie.createElement),ae=function(e){return se?ie.createElement(e):{}},ue=!S&&!v((function(){return 7!=Object.defineProperty(ae("div"),"a",{get:function(){return 7}}).a})),ce={},le=Object.getOwnPropertyDescriptor;ce.f=S?le:function(e,t){if(e=N(e),t=oe(t),ue)try{return le(e,t)}catch(e){}if(K(e,t))return O(!_.f.call(e,t),e[t])};var pe=function(e){if(!P(e))throw TypeError(String(e)+" is not an object");return e},fe={},he=Object.defineProperty;fe.f=S?he:function(e,t,r){if(pe(e),t=oe(t),pe(r),ue)try{return h