@formant/data-sdk 0.0.135 → 0.0.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/data-sdk.es.js +18564 -14924
  2. package/dist/data-sdk.umd.js +53 -39
  3. package/dist/types/data-sdk/src/Authentication.d.ts +23 -0
  4. package/dist/types/data-sdk/src/Device.d.ts +2 -0
  5. package/dist/types/data-sdk/src/Fleet.d.ts +139 -2
  6. package/dist/types/data-sdk/src/main.d.ts +13 -0
  7. package/dist/types/data-sdk/src/model/AggregateLevel.d.ts +1 -1
  8. package/dist/types/data-sdk/src/model/AnalyticsAggregateType.d.ts +2 -0
  9. package/dist/types/data-sdk/src/model/AnalyticsChartType.d.ts +2 -0
  10. package/dist/types/data-sdk/src/model/IAggregateRow.d.ts +8 -0
  11. package/dist/types/data-sdk/src/model/IAnalyticsModule.d.ts +15 -0
  12. package/dist/types/data-sdk/src/model/IAnalyticsModuleConfiguration.d.ts +6 -0
  13. package/dist/types/data-sdk/src/model/IScopeFilter.d.ts +6 -0
  14. package/dist/types/data-sdk/src/model/IShare.d.ts +16 -0
  15. package/dist/types/data-sdk/src/model/ISqlColumn.d.ts +6 -0
  16. package/dist/types/data-sdk/src/model/ISqlQuery.d.ts +21 -0
  17. package/dist/types/data-sdk/src/model/ISqlResult.d.ts +12 -0
  18. package/dist/types/data-sdk/src/model/ISqlRow.d.ts +5 -0
  19. package/dist/types/data-sdk/src/model/IStreamColumn.d.ts +7 -0
  20. package/dist/types/data-sdk/src/model/ITaskReportColumn.d.ts +7 -0
  21. package/dist/types/data-sdk/src/model/analyticsAggregteTypes.d.ts +1 -0
  22. package/dist/types/data-sdk/src/model/analyticsChartTypes.d.ts +1 -0
  23. package/dist/types/data-sdk/src/utils/aggregateFunctionUtils.d.ts +4 -3
  24. package/dist/types/data-sdk/src/utils/index.d.ts +2 -0
  25. package/dist/types/data-sdk/src/utils/serializeHash.d.ts +2 -0
  26. package/dist/types/data-sdk/src/utils/timeout.d.ts +1 -0
  27. package/package.json +7 -3
@@ -1,44 +1,58 @@
1
- (function(Pe,ze){typeof exports=="object"&&typeof module!="undefined"?ze(exports,require("date-fns")):typeof define=="function"&&define.amd?define(["exports","date-fns"],ze):(Pe=typeof globalThis!="undefined"?globalThis:Pe||self,ze(Pe.FormantDataSDK={},Pe.dateFns))})(this,function(exports,dateFns){"use strict";var sn=Object.defineProperty;var an=(Pe,ze,e)=>ze in Pe?sn(Pe,ze,{enumerable:!0,configurable:!0,writable:!0,value:e}):Pe[ze]=e;var Ae=(Pe,ze,e)=>(an(Pe,typeof ze!="symbol"?ze+"":ze,e),e);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var dateFns__namespace=_interopNamespace(dateFns),dist={exports:{}};/*! For license information please see index.js.LICENSE.txt */(function(module,exports){(function(e,t){module.exports=t()})(window,function(){return function(e){function t(u){for(var m,R,E=u[0],y=u[1],g=0,_=[];g<E.length;g++)R=E[g],Object.prototype.hasOwnProperty.call(r,R)&&r[R]&&_.push(r[R][0]),r[R]=0;for(m in y)Object.prototype.hasOwnProperty.call(y,m)&&(e[m]=y[m]);for(c&&c(u);_.length;)_.shift()()}var n={},r={0:0};function o(u){if(n[u])return n[u].exports;var m=n[u]={i:u,l:!1,exports:{}};return e[u].call(m.exports,m,m.exports,o),m.l=!0,m.exports}o.e=function(){return Promise.resolve()},o.m=e,o.c=n,o.d=function(u,m,R){o.o(u,m)||Object.defineProperty(u,m,{enumerable:!0,get:R})},o.r=function(u){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},o.t=function(u,m){if(1&m&&(u=o(u)),8&m||4&m&&typeof u=="object"&&u&&u.__esModule)return u;var R=Object.create(null);if(o.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:u}),2&m&&typeof u!="string")for(var E in u)o.d(R,E,function(y){return u[y]}.bind(null,E));return R},o.n=function(u){var m=u&&u.__esModule?function(){return u.default}:function(){return u};return o.d(m,"a",m),m},o.o=function(u,m){return Object.prototype.hasOwnProperty.call(u,m)},o.p="",o.oe=function(u){throw console.error(u),u};var l=window.webpackJsonpFormantRealtimeSDK=window.webpackJsonpFormantRealtimeSDK||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var i=0;i<l.length;i++)t(l[i]);var c=s;return o(o.s=228)}([function(e,t,n){n.d(t,"a",function(){return H});var r=n(14),o=n.n(r),l=n(18),s=n(56),i=n(19);const c=Math.pow(2,20),u=c;function m(S,U){if(U.length<S)throw new TypeError(S+" argument"+(S>1?"s":"")+" required, but only "+U.length+" present")}function R(S){if(S===null||S===!0||S===!1)return NaN;var U=Number(S);return isNaN(U)?U:U<0?Math.ceil(U):Math.floor(U)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},y=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,g=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function T(S){var U,J={},$=S.split(E.dateTimeDelimiter);if($.length>2)return J;if(/:/.test($[0])?U=$[0]:(J.date=$[0],U=$[1],E.timeZoneDelimiter.test(J.date)&&(J.date=S.split(E.timeZoneDelimiter)[0],U=S.substr(J.date.length,S.length))),U){var ne=E.timezone.exec(U);ne?(J.time=U.replace(ne[1],""),J.timezone=ne[1]):J.time=U}return J}function L(S,U){var J=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+U)+"})|(\\d{2}|[+-]\\d{"+(2+U)+"})$)"),$=S.match(J);if(!$)return{year:NaN,restDateString:""};var ne=$[1]?parseInt($[1]):null,se=$[2]?parseInt($[2]):null;return{year:se===null?ne:100*se,restDateString:S.slice(($[1]||$[2]).length)}}function V(S,U){if(U===null)return new Date(NaN);var J=S.match(y);if(!J)return new Date(NaN);var $=!!J[4],ne=M(J[1]),se=M(J[2])-1,ge=M(J[3]),ve=M(J[4]),Oe=M(J[5])-1;if($)return function(Ce,Ee,Te){return Ee>=1&&Ee<=53&&Te>=0&&Te<=6}(0,ve,Oe)?function(Ce,Ee,Te){var De=new Date(0);De.setUTCFullYear(Ce,0,4);var qe=De.getUTCDay()||7,Qe=7*(Ee-1)+Te+1-qe;return De.setUTCDate(De.getUTCDate()+Qe),De}(U,ve,Oe):new Date(NaN);var Se=new Date(0);return function(Ce,Ee,Te){return Ee>=0&&Ee<=11&&Te>=1&&Te<=(Y[Ee]||(Z(Ce)?29:28))}(U,se,ge)&&function(Ce,Ee){return Ee>=1&&Ee<=(Z(Ce)?366:365)}(U,ne)?(Se.setUTCFullYear(U,se,Math.max(ne,ge)),Se):new Date(NaN)}function M(S){return S?parseInt(S):1}function A(S){var U=S.match(g);if(!U)return NaN;var J=f(U[1]),$=f(U[2]),ne=f(U[3]);return function(se,ge,ve){return se===24?ge===0&&ve===0:ve>=0&&ve<60&&ge>=0&&ge<60&&se>=0&&se<25}(J,$,ne)?36e5*J+6e4*$+1e3*ne:NaN}function f(S){return S&&parseFloat(S.replace(",","."))||0}function O(S){if(S==="Z")return 0;var U=S.match(_);if(!U)return 0;var J=U[1]==="+"?-1:1,$=parseInt(U[2]),ne=U[3]&&parseInt(U[3])||0;return function(se,ge){return ge>=0&&ge<=59}(0,ne)?J*(36e5*$+6e4*ne):NaN}var Y=[31,null,31,30,31,30,31,31,30,31,30,31];function Z(S){return S%400==0||S%4==0&&S%100!=0}function d(S){return m(1,arguments),S instanceof Date||typeof S=="object"&&Object.prototype.toString.call(S)==="[object Date]"}function p(S){m(1,arguments);var U=Object.prototype.toString.call(S);return S instanceof Date||typeof S=="object"&&U==="[object Date]"?new Date(S.getTime()):typeof S=="number"||U==="[object Number]"?new Date(S):(typeof S!="string"&&U!=="[object String]"||typeof console=="undefined"||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function C(S){const U=function(J,$){var ne;m(1,arguments);var se=R((ne=$==null?void 0:$.additionalDigits)!==null&&ne!==void 0?ne:2);if(se!==2&&se!==1&&se!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(typeof J!="string"&&Object.prototype.toString.call(J)!=="[object String]")return new Date(NaN);var ge,ve=T(J);if(ve.date){var Oe=L(ve.date,se);ge=V(Oe.restDateString,Oe.year)}if(!ge||isNaN(ge.getTime()))return new Date(NaN);var Se,Ce=ge.getTime(),Ee=0;if(ve.time&&(Ee=A(ve.time),isNaN(Ee)))return new Date(NaN);if(!ve.timezone){var Te=new Date(Ce+Ee),De=new Date(0);return De.setFullYear(Te.getUTCFullYear(),Te.getUTCMonth(),Te.getUTCDate()),De.setHours(Te.getUTCHours(),Te.getUTCMinutes(),Te.getUTCSeconds(),Te.getUTCMilliseconds()),De}return Se=O(ve.timezone),isNaN(Se)?new Date(NaN):new Date(Ce+Ee+Se)}(S);if(!function(J){if(m(1,arguments),!d(J)&&typeof J!="number")return!1;var $=p(J);return!isNaN(Number($))}(U))throw new Error(`Invalid ISO 8601 date string (${S})`);return U}var b=n(4),P=n(34);function F(S){return o()(S,{cycles:!0})}var D=function(S,U){var J={};for(var $ in S)Object.prototype.hasOwnProperty.call(S,$)&&U.indexOf($)<0&&(J[$]=S[$]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function"){var ne=0;for($=Object.getOwnPropertySymbols(S);ne<$.length;ne++)U.indexOf($[ne])<0&&Object.prototype.propertyIsEnumerable.call(S,$[ne])&&(J[$[ne]]=S[$[ne]])}return J};function I(S,U={}){const J=ve=>U.redacted!==!1?Object(P.a)(ve):ve;if(!S.stack)return{message:F(J(S))};const{name:$,message:ne,stack:se}=S,ge=D(S,["name","message","stack"]);return{name:$,message:ne!==void 0?ne:F(J(S)),stack:se,meta:ge&&Object.keys(ge).length===0?void 0:J(ge)}}function N(S,U={}){const{message:J,stack:$,meta:ne}=I(S,U);return`${$||J||""}${ne&&Object.keys(ne).length>0?` -- ${F(ne)}`:""}`}var k=n(39),w=n(103),h=n.n(w),B=function(S,U,J,$){return new(J||(J=Promise))(function(ne,se){function ge(Se){try{Oe($.next(Se))}catch(Ce){se(Ce)}}function ve(Se){try{Oe($.throw(Se))}catch(Ce){se(Ce)}}function Oe(Se){var Ce;Se.done?ne(Se.value):(Ce=Se.value,Ce instanceof J?Ce:new J(function(Ee){Ee(Ce)})).then(ge,ve)}Oe(($=$.apply(S,U||[])).next())})},z=function(S,U){var J={};for(var $ in S)Object.prototype.hasOwnProperty.call(S,$)&&U.indexOf($)<0&&(J[$]=S[$]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function"){var ne=0;for($=Object.getOwnPropertySymbols(S);ne<$.length;ne++)U.indexOf($[ne])<0&&Object.prototype.propertyIsEnumerable.call(S,$[ne])&&(J[$[ne]]=S[$[ne]])}return J};class X extends h.a{constructor(U,J){super(),this.endpoint=U,this.metadata=J,this.logClient=this.getLogClient()}getLogClient(){return B(this,void 0,void 0,function*(){const{LogClient:U}=yield Promise.resolve().then(n.bind(null,231));return new U(this.endpoint)})}log(U,J){return B(this,void 0,void 0,function*(){const{level:$,message:ne,error:se}=U,ge=z(U,["level","message","error"]);this.emit("logged");try{yield(yield this.logClient).log([{timestamp:new Date().toISOString(),level:$,message:`${ne}`.substring(0,1e3),error:se!==void 0?I(se):void 0,meta:Object.assign(Object.assign({},ge),this.metadata)}])}catch(ve){console.error(`Failed to log to log-api: ${N(ve)}`)}J()})}}var Q=function(S,U){var J={};for(var $ in S)Object.prototype.hasOwnProperty.call(S,$)&&U.indexOf($)<0&&(J[$]=S[$]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function"){var ne=0;for($=Object.getOwnPropertySymbols(S);ne<$.length;ne++)U.indexOf($[ne])<0&&Object.prototype.propertyIsEnumerable.call(S,$[ne])&&(J[$[ne]]=S[$[ne]])}return J};const te={app:b.a,namespace:b.i,buildTag:b.b,instanceId:k.a},q=b.e?i.format.printf(S=>{var{timestamp:U,level:J,message:$,error:ne}=S,se=Q(S,["timestamp","level","message","error"]);const ge=Object.assign(Object.assign({timestamp:U?C(U).getTime():new Date().getTime(),level:J.toUpperCase(),message:$},ne?{error:I(ne)}:{}),{meta:Object.assign(Object.assign({},te),se)});return o()(ge,{cycles:!0})}):i.format.printf(S=>{var{timestamp:U,level:J,message:$,error:ne}=S,se=Q(S,["timestamp","level","message","error"]);let ge=`${U||new Date().toISOString()} ${J.toUpperCase()}: ${$} `;return Object.keys(se).length>0&&(ge+=o()(se,{cycles:!0})),ne&&(ge+=`
2
- ${N(ne)}`),ge}),H=Object(i.createLogger)({level:b.f});if(b.g&&H.add(new i.transports.Console({format:q,level:"debug"})),b.d&&H.add(new X(b.d,te)),b.h){const S=s.resolve(l.tmpdir(),`silly-${b.a}.log`);H.debug("Logging silly logs to file",{filename:S}),H.add(new i.transports.File({filename:S,maxsize:1*u,maxFiles:10,format:i.format.combine((v="silly",Object(i.format)(U=>U.level===v&&U)()),q),level:"silly"}))}var v},function(e,t,n){n.d(t,"a",function(){return r});const r={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},function(e,t){var n,r,o=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(T){if(n===setTimeout)return setTimeout(T,0);if((n===l||!n)&&setTimeout)return n=setTimeout,setTimeout(T,0);try{return n(T,0)}catch{try{return n.call(null,T,0)}catch{return n.call(this,T,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:l}catch{n=l}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var c,u=[],m=!1,R=-1;function E(){m&&c&&(m=!1,c.length?u=c.concat(u):R=-1,u.length&&y())}function y(){if(!m){var T=i(E);m=!0;for(var L=u.length;L;){for(c=u,u=[];++R<L;)c&&c[R].run();R=-1,L=u.length}c=null,m=!1,function(V){if(r===clearTimeout)return clearTimeout(V);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(V);try{r(V)}catch{try{return r.call(null,V)}catch{return r.call(this,V)}}}(T)}}function g(T,L){this.fun=T,this.array=L}function _(){}o.nextTick=function(T){var L=new Array(arguments.length-1);if(arguments.length>1)for(var V=1;V<arguments.length;V++)L[V-1]=arguments[V];u.push(new g(T,L)),u.length!==1||m||i(y)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=_,o.addListener=_,o.once=_,o.off=_,o.removeListener=_,o.removeAllListeners=_,o.emit=_,o.prependListener=_,o.prependOnceListener=_,o.listeners=function(T){return[]},o.binding=function(T){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(T){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:n(118)})},function(e,t,n){(function(r){n.d(t,"a",function(){return s}),n.d(t,"i",function(){return i}),n.d(t,"j",function(){return c}),n.d(t,"b",function(){return u}),n.d(t,"f",function(){return m}),n.d(t,"e",function(){return R}),n.d(t,"g",function(){return E}),n.d(t,"d",function(){return y}),n.d(t,"c",function(){return g}),n.d(t,"h",function(){return _});var o=n(102);const l=o.from({ENVIRONMENT:r.env.ENV,API_ENDPOINT:r.env.API_ENDPOINT,APP:"realtime-sdk",APP_PATH:r.env.APP_PATH,BUILD_TAG:r.env.BUILD_TAG,ENABLE_SELF_SERVE:r.env.ENABLE_SELF_SERVE,ENABLE_SENTRY:r.env.ENABLE_SENTRY,ENABLE_SENTRY_PROFILING:r.env.ENABLE_SENTRY_PROFILING,GIT_COMMIT:r.env.GIT_COMMIT,JEST_WORKER_ID:r.env.JEST_WORKER_ID,LOG_API_ENDPOINT:r.env.LOG_API_ENDPOINT,LOG_JSON:"false",LOG_LEVEL:r.env.LOG_LEVEL,LOG_TO_CONSOLE:r.env.LOG_TO_CONSOLE,LOG_TO_FILE:r.env.LOG_TO_FILE,NAMESPACE:"production",SENTRY_DSN:r.env.SENTRY_DSN,SHEET_EXPORT_MAX_ROW_COUNT:r.env.SHEET_EXPORT_MAX_ROW_COUNT,STABLE_AGENT_VERSION:r.env.STABLE_AGENT_VERSION,VERSION:r.env.VERSION}),s=(l.get("ENVIRONMENT").default("").asString(),l.get("APP").default("").asString()),i=(l.get("APP_PATH").default("").asString(),l.get("API_ENDPOINT").default("").asString(),l.get("NAMESPACE").default("").asString()),c=l.get("VERSION").default("").asString(),u=l.get("BUILD_TAG").default("").asString(),m=(l.get("GIT_COMMIT").default("").asString(),l.get("ENABLE_SENTRY").default("false").asBool(),l.get("ENABLE_SENTRY_PROFILING").default("false").asBool(),l.get("SENTRY_DSN").default("").asString(),l.get("LOG_LEVEL").default("debug").asString()),R=l.get("LOG_JSON").default("true").asBool(),E=l.get("LOG_TO_CONSOLE").default("true").asBool(),y=(l.get("STABLE_AGENT_VERSION").default("").asString(),l.get("LOG_API_ENDPOINT").asString()),g=l.get("JEST_WORKER_ID").asString(),_=(l.get("SHEET_EXPORT_MAX_ROW_COUNT").default("10000").asIntPositive(),l.get("LOG_TO_FILE").default("false").asBoolStrict());l.get("ENABLE_SELF_SERVE").default("true").asBoolStrict()}).call(this,n(2))},function(e,t,n){(function(r){var o=n(126),l=n(127),s=n(42);function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(v,S){if(i()<S)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(v=new Uint8Array(S)).__proto__=u.prototype:(v===null&&(v=new u(S)),v.length=S),v}function u(v,S,U){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(v,S,U);if(typeof v=="number"){if(typeof S=="string")throw new Error("If encoding is specified then the first argument must be a string");return E(this,v)}return m(this,v,S,U)}function m(v,S,U,J){if(typeof S=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&S instanceof ArrayBuffer?function($,ne,se,ge){if(ne.byteLength,se<0||ne.byteLength<se)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<se+(ge||0))throw new RangeError("'length' is out of bounds");return ne=se===void 0&&ge===void 0?new Uint8Array(ne):ge===void 0?new Uint8Array(ne,se):new Uint8Array(ne,se,ge),u.TYPED_ARRAY_SUPPORT?($=ne).__proto__=u.prototype:$=y($,ne),$}(v,S,U,J):typeof S=="string"?function($,ne,se){if(typeof se=="string"&&se!==""||(se="utf8"),!u.isEncoding(se))throw new TypeError('"encoding" must be a valid string encoding');var ge=0|_(ne,se),ve=($=c($,ge)).write(ne,se);return ve!==ge&&($=$.slice(0,ve)),$}(v,S,U):function($,ne){if(u.isBuffer(ne)){var se=0|g(ne.length);return($=c($,se)).length===0||ne.copy($,0,0,se),$}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||(ge=ne.length)!=ge?c($,0):y($,ne);if(ne.type==="Buffer"&&s(ne.data))return y($,ne.data)}var ge;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(v,S)}function R(v){if(typeof v!="number")throw new TypeError('"size" argument must be a number');if(v<0)throw new RangeError('"size" argument must not be negative')}function E(v,S){if(R(S),v=c(v,S<0?0:0|g(S)),!u.TYPED_ARRAY_SUPPORT)for(var U=0;U<S;++U)v[U]=0;return v}function y(v,S){var U=S.length<0?0:0|g(S.length);v=c(v,U);for(var J=0;J<U;J+=1)v[J]=255&S[J];return v}function g(v){if(v>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|v}function _(v,S){if(u.isBuffer(v))return v.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(v)||v instanceof ArrayBuffer))return v.byteLength;typeof v!="string"&&(v=""+v);var U=v.length;if(U===0)return 0;for(var J=!1;;)switch(S){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":case void 0:return te(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return q(v).length;default:if(J)return te(v).length;S=(""+S).toLowerCase(),J=!0}}function T(v,S,U){var J=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0)<=(S>>>=0))return"";for(v||(v="utf8");;)switch(v){case"hex":return F(this,S,U);case"utf8":case"utf-8":return C(this,S,U);case"ascii":return b(this,S,U);case"latin1":case"binary":return P(this,S,U);case"base64":return p(this,S,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,S,U);default:if(J)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),J=!0}}function L(v,S,U){var J=v[S];v[S]=v[U],v[U]=J}function V(v,S,U,J,$){if(v.length===0)return-1;if(typeof U=="string"?(J=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,isNaN(U)&&(U=$?0:v.length-1),U<0&&(U=v.length+U),U>=v.length){if($)return-1;U=v.length-1}else if(U<0){if(!$)return-1;U=0}if(typeof S=="string"&&(S=u.from(S,J)),u.isBuffer(S))return S.length===0?-1:M(v,S,U,J,$);if(typeof S=="number")return S&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(v,S,U):Uint8Array.prototype.lastIndexOf.call(v,S,U):M(v,[S],U,J,$);throw new TypeError("val must be string, number or Buffer")}function M(v,S,U,J,$){var ne,se=1,ge=v.length,ve=S.length;if(J!==void 0&&((J=String(J).toLowerCase())==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(v.length<2||S.length<2)return-1;se=2,ge/=2,ve/=2,U/=2}function Oe(Te,De){return se===1?Te[De]:Te.readUInt16BE(De*se)}if($){var Se=-1;for(ne=U;ne<ge;ne++)if(Oe(v,ne)===Oe(S,Se===-1?0:ne-Se)){if(Se===-1&&(Se=ne),ne-Se+1===ve)return Se*se}else Se!==-1&&(ne-=ne-Se),Se=-1}else for(U+ve>ge&&(U=ge-ve),ne=U;ne>=0;ne--){for(var Ce=!0,Ee=0;Ee<ve;Ee++)if(Oe(v,ne+Ee)!==Oe(S,Ee)){Ce=!1;break}if(Ce)return ne}return-1}function A(v,S,U,J){U=Number(U)||0;var $=v.length-U;J?(J=Number(J))>$&&(J=$):J=$;var ne=S.length;if(ne%2!=0)throw new TypeError("Invalid hex string");J>ne/2&&(J=ne/2);for(var se=0;se<J;++se){var ge=parseInt(S.substr(2*se,2),16);if(isNaN(ge))return se;v[U+se]=ge}return se}function f(v,S,U,J){return H(te(S,v.length-U),v,U,J)}function O(v,S,U,J){return H(function($){for(var ne=[],se=0;se<$.length;++se)ne.push(255&$.charCodeAt(se));return ne}(S),v,U,J)}function Y(v,S,U,J){return O(v,S,U,J)}function Z(v,S,U,J){return H(q(S),v,U,J)}function d(v,S,U,J){return H(function($,ne){for(var se,ge,ve,Oe=[],Se=0;Se<$.length&&!((ne-=2)<0);++Se)se=$.charCodeAt(Se),ge=se>>8,ve=se%256,Oe.push(ve),Oe.push(ge);return Oe}(S,v.length-U),v,U,J)}function p(v,S,U){return S===0&&U===v.length?o.fromByteArray(v):o.fromByteArray(v.slice(S,U))}function C(v,S,U){U=Math.min(v.length,U);for(var J=[],$=S;$<U;){var ne,se,ge,ve,Oe=v[$],Se=null,Ce=Oe>239?4:Oe>223?3:Oe>191?2:1;if($+Ce<=U)switch(Ce){case 1:Oe<128&&(Se=Oe);break;case 2:(192&(ne=v[$+1]))==128&&(ve=(31&Oe)<<6|63&ne)>127&&(Se=ve);break;case 3:ne=v[$+1],se=v[$+2],(192&ne)==128&&(192&se)==128&&(ve=(15&Oe)<<12|(63&ne)<<6|63&se)>2047&&(ve<55296||ve>57343)&&(Se=ve);break;case 4:ne=v[$+1],se=v[$+2],ge=v[$+3],(192&ne)==128&&(192&se)==128&&(192&ge)==128&&(ve=(15&Oe)<<18|(63&ne)<<12|(63&se)<<6|63&ge)>65535&&ve<1114112&&(Se=ve)}Se===null?(Se=65533,Ce=1):Se>65535&&(Se-=65536,J.push(Se>>>10&1023|55296),Se=56320|1023&Se),J.push(Se),$+=Ce}return function(Ee){var Te=Ee.length;if(Te<=4096)return String.fromCharCode.apply(String,Ee);for(var De="",qe=0;qe<Te;)De+=String.fromCharCode.apply(String,Ee.slice(qe,qe+=4096));return De}(J)}t.Buffer=u,t.SlowBuffer=function(v){return+v!=v&&(v=0),u.alloc(+v)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=r.TYPED_ARRAY_SUPPORT!==void 0?r.TYPED_ARRAY_SUPPORT:function(){try{var v=new Uint8Array(1);return v.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},v.foo()===42&&typeof v.subarray=="function"&&v.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=i(),u.poolSize=8192,u._augment=function(v){return v.__proto__=u.prototype,v},u.from=function(v,S,U){return m(null,v,S,U)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(v,S,U){return function(J,$,ne,se){return R($),$<=0?c(J,$):ne!==void 0?typeof se=="string"?c(J,$).fill(ne,se):c(J,$).fill(ne):c(J,$)}(null,v,S,U)},u.allocUnsafe=function(v){return E(null,v)},u.allocUnsafeSlow=function(v){return E(null,v)},u.isBuffer=function(v){return!(v==null||!v._isBuffer)},u.compare=function(v,S){if(!u.isBuffer(v)||!u.isBuffer(S))throw new TypeError("Arguments must be Buffers");if(v===S)return 0;for(var U=v.length,J=S.length,$=0,ne=Math.min(U,J);$<ne;++$)if(v[$]!==S[$]){U=v[$],J=S[$];break}return U<J?-1:J<U?1:0},u.isEncoding=function(v){switch(String(v).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}},u.concat=function(v,S){if(!s(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return u.alloc(0);var U;if(S===void 0)for(S=0,U=0;U<v.length;++U)S+=v[U].length;var J=u.allocUnsafe(S),$=0;for(U=0;U<v.length;++U){var ne=v[U];if(!u.isBuffer(ne))throw new TypeError('"list" argument must be an Array of Buffers');ne.copy(J,$),$+=ne.length}return J},u.byteLength=_,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var v=this.length;if(v%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var S=0;S<v;S+=2)L(this,S,S+1);return this},u.prototype.swap32=function(){var v=this.length;if(v%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var S=0;S<v;S+=4)L(this,S,S+3),L(this,S+1,S+2);return this},u.prototype.swap64=function(){var v=this.length;if(v%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var S=0;S<v;S+=8)L(this,S,S+7),L(this,S+1,S+6),L(this,S+2,S+5),L(this,S+3,S+4);return this},u.prototype.toString=function(){var v=0|this.length;return v===0?"":arguments.length===0?C(this,0,v):T.apply(this,arguments)},u.prototype.equals=function(v){if(!u.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v||u.compare(this,v)===0},u.prototype.inspect=function(){var v="",S=t.INSPECT_MAX_BYTES;return this.length>0&&(v=this.toString("hex",0,S).match(/.{2}/g).join(" "),this.length>S&&(v+=" ... ")),"<Buffer "+v+">"},u.prototype.compare=function(v,S,U,J,$){if(!u.isBuffer(v))throw new TypeError("Argument must be a Buffer");if(S===void 0&&(S=0),U===void 0&&(U=v?v.length:0),J===void 0&&(J=0),$===void 0&&($=this.length),S<0||U>v.length||J<0||$>this.length)throw new RangeError("out of range index");if(J>=$&&S>=U)return 0;if(J>=$)return-1;if(S>=U)return 1;if(this===v)return 0;for(var ne=($>>>=0)-(J>>>=0),se=(U>>>=0)-(S>>>=0),ge=Math.min(ne,se),ve=this.slice(J,$),Oe=v.slice(S,U),Se=0;Se<ge;++Se)if(ve[Se]!==Oe[Se]){ne=ve[Se],se=Oe[Se];break}return ne<se?-1:se<ne?1:0},u.prototype.includes=function(v,S,U){return this.indexOf(v,S,U)!==-1},u.prototype.indexOf=function(v,S,U){return V(this,v,S,U,!0)},u.prototype.lastIndexOf=function(v,S,U){return V(this,v,S,U,!1)},u.prototype.write=function(v,S,U,J){if(S===void 0)J="utf8",U=this.length,S=0;else if(U===void 0&&typeof S=="string")J=S,U=this.length,S=0;else{if(!isFinite(S))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");S|=0,isFinite(U)?(U|=0,J===void 0&&(J="utf8")):(J=U,U=void 0)}var $=this.length-S;if((U===void 0||U>$)&&(U=$),v.length>0&&(U<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");for(var ne=!1;;)switch(J){case"hex":return A(this,v,S,U);case"utf8":case"utf-8":return f(this,v,S,U);case"ascii":return O(this,v,S,U);case"latin1":case"binary":return Y(this,v,S,U);case"base64":return Z(this,v,S,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,v,S,U);default:if(ne)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),ne=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(v,S,U){var J="";U=Math.min(v.length,U);for(var $=S;$<U;++$)J+=String.fromCharCode(127&v[$]);return J}function P(v,S,U){var J="";U=Math.min(v.length,U);for(var $=S;$<U;++$)J+=String.fromCharCode(v[$]);return J}function F(v,S,U){var J=v.length;(!S||S<0)&&(S=0),(!U||U<0||U>J)&&(U=J);for(var $="",ne=S;ne<U;++ne)$+=Q(v[ne]);return $}function D(v,S,U){for(var J=v.slice(S,U),$="",ne=0;ne<J.length;ne+=2)$+=String.fromCharCode(J[ne]+256*J[ne+1]);return $}function I(v,S,U){if(v%1!=0||v<0)throw new RangeError("offset is not uint");if(v+S>U)throw new RangeError("Trying to access beyond buffer length")}function N(v,S,U,J,$,ne){if(!u.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>$||S<ne)throw new RangeError('"value" argument is out of bounds');if(U+J>v.length)throw new RangeError("Index out of range")}function k(v,S,U,J){S<0&&(S=65535+S+1);for(var $=0,ne=Math.min(v.length-U,2);$<ne;++$)v[U+$]=(S&255<<8*(J?$:1-$))>>>8*(J?$:1-$)}function w(v,S,U,J){S<0&&(S=4294967295+S+1);for(var $=0,ne=Math.min(v.length-U,4);$<ne;++$)v[U+$]=S>>>8*(J?$:3-$)&255}function h(v,S,U,J,$,ne){if(U+J>v.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function B(v,S,U,J,$){return $||h(v,0,U,4),l.write(v,S,U,J,23,4),U+4}function z(v,S,U,J,$){return $||h(v,0,U,8),l.write(v,S,U,J,52,8),U+8}u.prototype.slice=function(v,S){var U,J=this.length;if((v=~~v)<0?(v+=J)<0&&(v=0):v>J&&(v=J),(S=S===void 0?J:~~S)<0?(S+=J)<0&&(S=0):S>J&&(S=J),S<v&&(S=v),u.TYPED_ARRAY_SUPPORT)(U=this.subarray(v,S)).__proto__=u.prototype;else{var $=S-v;U=new u($,void 0);for(var ne=0;ne<$;++ne)U[ne]=this[ne+v]}return U},u.prototype.readUIntLE=function(v,S,U){v|=0,S|=0,U||I(v,S,this.length);for(var J=this[v],$=1,ne=0;++ne<S&&($*=256);)J+=this[v+ne]*$;return J},u.prototype.readUIntBE=function(v,S,U){v|=0,S|=0,U||I(v,S,this.length);for(var J=this[v+--S],$=1;S>0&&($*=256);)J+=this[v+--S]*$;return J},u.prototype.readUInt8=function(v,S){return S||I(v,1,this.length),this[v]},u.prototype.readUInt16LE=function(v,S){return S||I(v,2,this.length),this[v]|this[v+1]<<8},u.prototype.readUInt16BE=function(v,S){return S||I(v,2,this.length),this[v]<<8|this[v+1]},u.prototype.readUInt32LE=function(v,S){return S||I(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+16777216*this[v+3]},u.prototype.readUInt32BE=function(v,S){return S||I(v,4,this.length),16777216*this[v]+(this[v+1]<<16|this[v+2]<<8|this[v+3])},u.prototype.readIntLE=function(v,S,U){v|=0,S|=0,U||I(v,S,this.length);for(var J=this[v],$=1,ne=0;++ne<S&&($*=256);)J+=this[v+ne]*$;return J>=($*=128)&&(J-=Math.pow(2,8*S)),J},u.prototype.readIntBE=function(v,S,U){v|=0,S|=0,U||I(v,S,this.length);for(var J=S,$=1,ne=this[v+--J];J>0&&($*=256);)ne+=this[v+--J]*$;return ne>=($*=128)&&(ne-=Math.pow(2,8*S)),ne},u.prototype.readInt8=function(v,S){return S||I(v,1,this.length),128&this[v]?-1*(255-this[v]+1):this[v]},u.prototype.readInt16LE=function(v,S){S||I(v,2,this.length);var U=this[v]|this[v+1]<<8;return 32768&U?4294901760|U:U},u.prototype.readInt16BE=function(v,S){S||I(v,2,this.length);var U=this[v+1]|this[v]<<8;return 32768&U?4294901760|U:U},u.prototype.readInt32LE=function(v,S){return S||I(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},u.prototype.readInt32BE=function(v,S){return S||I(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},u.prototype.readFloatLE=function(v,S){return S||I(v,4,this.length),l.read(this,v,!0,23,4)},u.prototype.readFloatBE=function(v,S){return S||I(v,4,this.length),l.read(this,v,!1,23,4)},u.prototype.readDoubleLE=function(v,S){return S||I(v,8,this.length),l.read(this,v,!0,52,8)},u.prototype.readDoubleBE=function(v,S){return S||I(v,8,this.length),l.read(this,v,!1,52,8)},u.prototype.writeUIntLE=function(v,S,U,J){v=+v,S|=0,U|=0,J||N(this,v,S,U,Math.pow(2,8*U)-1,0);var $=1,ne=0;for(this[S]=255&v;++ne<U&&($*=256);)this[S+ne]=v/$&255;return S+U},u.prototype.writeUIntBE=function(v,S,U,J){v=+v,S|=0,U|=0,J||N(this,v,S,U,Math.pow(2,8*U)-1,0);var $=U-1,ne=1;for(this[S+$]=255&v;--$>=0&&(ne*=256);)this[S+$]=v/ne&255;return S+U},u.prototype.writeUInt8=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,1,255,0),u.TYPED_ARRAY_SUPPORT||(v=Math.floor(v)),this[S]=255&v,S+1},u.prototype.writeUInt16LE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[S]=255&v,this[S+1]=v>>>8):k(this,v,S,!0),S+2},u.prototype.writeUInt16BE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[S]=v>>>8,this[S+1]=255&v):k(this,v,S,!1),S+2},u.prototype.writeUInt32LE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[S+3]=v>>>24,this[S+2]=v>>>16,this[S+1]=v>>>8,this[S]=255&v):w(this,v,S,!0),S+4},u.prototype.writeUInt32BE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[S]=v>>>24,this[S+1]=v>>>16,this[S+2]=v>>>8,this[S+3]=255&v):w(this,v,S,!1),S+4},u.prototype.writeIntLE=function(v,S,U,J){if(v=+v,S|=0,!J){var $=Math.pow(2,8*U-1);N(this,v,S,U,$-1,-$)}var ne=0,se=1,ge=0;for(this[S]=255&v;++ne<U&&(se*=256);)v<0&&ge===0&&this[S+ne-1]!==0&&(ge=1),this[S+ne]=(v/se>>0)-ge&255;return S+U},u.prototype.writeIntBE=function(v,S,U,J){if(v=+v,S|=0,!J){var $=Math.pow(2,8*U-1);N(this,v,S,U,$-1,-$)}var ne=U-1,se=1,ge=0;for(this[S+ne]=255&v;--ne>=0&&(se*=256);)v<0&&ge===0&&this[S+ne+1]!==0&&(ge=1),this[S+ne]=(v/se>>0)-ge&255;return S+U},u.prototype.writeInt8=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,1,127,-128),u.TYPED_ARRAY_SUPPORT||(v=Math.floor(v)),v<0&&(v=255+v+1),this[S]=255&v,S+1},u.prototype.writeInt16LE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[S]=255&v,this[S+1]=v>>>8):k(this,v,S,!0),S+2},u.prototype.writeInt16BE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[S]=v>>>8,this[S+1]=255&v):k(this,v,S,!1),S+2},u.prototype.writeInt32LE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[S]=255&v,this[S+1]=v>>>8,this[S+2]=v>>>16,this[S+3]=v>>>24):w(this,v,S,!0),S+4},u.prototype.writeInt32BE=function(v,S,U){return v=+v,S|=0,U||N(this,v,S,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),u.TYPED_ARRAY_SUPPORT?(this[S]=v>>>24,this[S+1]=v>>>16,this[S+2]=v>>>8,this[S+3]=255&v):w(this,v,S,!1),S+4},u.prototype.writeFloatLE=function(v,S,U){return B(this,v,S,!0,U)},u.prototype.writeFloatBE=function(v,S,U){return B(this,v,S,!1,U)},u.prototype.writeDoubleLE=function(v,S,U){return z(this,v,S,!0,U)},u.prototype.writeDoubleBE=function(v,S,U){return z(this,v,S,!1,U)},u.prototype.copy=function(v,S,U,J){if(U||(U=0),J||J===0||(J=this.length),S>=v.length&&(S=v.length),S||(S=0),J>0&&J<U&&(J=U),J===U||v.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("sourceStart out of bounds");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),v.length-S<J-U&&(J=v.length-S+U);var $,ne=J-U;if(this===v&&U<S&&S<J)for($=ne-1;$>=0;--$)v[$+S]=this[$+U];else if(ne<1e3||!u.TYPED_ARRAY_SUPPORT)for($=0;$<ne;++$)v[$+S]=this[$+U];else Uint8Array.prototype.set.call(v,this.subarray(U,U+ne),S);return ne},u.prototype.fill=function(v,S,U,J){if(typeof v=="string"){if(typeof S=="string"?(J=S,S=0,U=this.length):typeof U=="string"&&(J=U,U=this.length),v.length===1){var $=v.charCodeAt(0);$<256&&(v=$)}if(J!==void 0&&typeof J!="string")throw new TypeError("encoding must be a string");if(typeof J=="string"&&!u.isEncoding(J))throw new TypeError("Unknown encoding: "+J)}else typeof v=="number"&&(v&=255);if(S<0||this.length<S||this.length<U)throw new RangeError("Out of range index");if(U<=S)return this;var ne;if(S>>>=0,U=U===void 0?this.length:U>>>0,v||(v=0),typeof v=="number")for(ne=S;ne<U;++ne)this[ne]=v;else{var se=u.isBuffer(v)?v:te(new u(v,J).toString()),ge=se.length;for(ne=0;ne<U-S;++ne)this[ne+S]=se[ne%ge]}return this};var X=/[^+\/0-9A-Za-z-_]/g;function Q(v){return v<16?"0"+v.toString(16):v.toString(16)}function te(v,S){var U;S=S||1/0;for(var J=v.length,$=null,ne=[],se=0;se<J;++se){if((U=v.charCodeAt(se))>55295&&U<57344){if(!$){if(U>56319){(S-=3)>-1&&ne.push(239,191,189);continue}if(se+1===J){(S-=3)>-1&&ne.push(239,191,189);continue}$=U;continue}if(U<56320){(S-=3)>-1&&ne.push(239,191,189),$=U;continue}U=65536+($-55296<<10|U-56320)}else $&&(S-=3)>-1&&ne.push(239,191,189);if($=null,U<128){if((S-=1)<0)break;ne.push(U)}else if(U<2048){if((S-=2)<0)break;ne.push(U>>6|192,63&U|128)}else if(U<65536){if((S-=3)<0)break;ne.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((S-=4)<0)break;ne.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return ne}function q(v){return o.toByteArray(function(S){if((S=function(U){return U.trim?U.trim():U.replace(/^\s+|\s+$/g,"")}(S).replace(X,"")).length<2)return"";for(;S.length%4!=0;)S+="=";return S}(v))}function H(v,S,U,J){for(var $=0;$<J&&!($+U>=S.length||$>=v.length);++$)S[$+U]=v[$];return $}}).call(this,n(6))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){r&&(n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(n,r){if(r){n.super_=r;var o=function(){};o.prototype=r.prototype,n.prototype=new o,n.prototype.constructor=n}}},function(e,t,n){n.d(t,"a",function(){return r});const r=o=>new Promise(l=>setTimeout(l,o||0))},function(e,t,n){var r=n(99),o=r,l=Function("return this")(),s=n(98);o.object.extend(proto,s),o.exportSymbol("proto.v1.signaling.api.CreatePeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.CreatePeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.DeletePeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.DeletePeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetHealthRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetHealthResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetIceServersRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetIceServersResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetPeersRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetPeersResponse",null,l),o.exportSymbol("proto.v1.signaling.api.Peer",null,l),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamRequest",null,l),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamResponse",null,l),o.exportSymbol("proto.v1.signaling.api.RefreshPeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.RefreshPeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.SendSignalRequest",null,l),o.exportSymbol("proto.v1.signaling.api.SendSignalResponse",null,l),o.exportSymbol("proto.v1.signaling.api.SessionType",null,l),o.exportSymbol("proto.v1.signaling.api.Signal",null,l),proto.v1.signaling.api.Peer=function(i){r.Message.initialize(this,i,0,-1,proto.v1.signaling.api.Peer.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.Peer,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Peer.displayName="proto.v1.signaling.api.Peer"),proto.v1.signaling.api.Signal=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.Signal,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Signal.displayName="proto.v1.signaling.api.Signal"),proto.v1.signaling.api.GetHealthRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetHealthRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetHealthRequest.displayName="proto.v1.signaling.api.GetHealthRequest"),proto.v1.signaling.api.GetHealthResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetHealthResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetHealthResponse.displayName="proto.v1.signaling.api.GetHealthResponse"),proto.v1.signaling.api.CreatePeerRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerRequest.displayName="proto.v1.signaling.api.CreatePeerRequest"),proto.v1.signaling.api.CreatePeerResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerResponse.displayName="proto.v1.signaling.api.CreatePeerResponse"),proto.v1.signaling.api.DeletePeerRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerRequest.displayName="proto.v1.signaling.api.DeletePeerRequest"),proto.v1.signaling.api.DeletePeerResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerResponse.displayName="proto.v1.signaling.api.DeletePeerResponse"),proto.v1.signaling.api.RefreshPeerRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerRequest.displayName="proto.v1.signaling.api.RefreshPeerRequest"),proto.v1.signaling.api.RefreshPeerResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerResponse.displayName="proto.v1.signaling.api.RefreshPeerResponse"),proto.v1.signaling.api.GetPeersRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetPeersRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersRequest.displayName="proto.v1.signaling.api.GetPeersRequest"),proto.v1.signaling.api.GetPeersResponse=function(i){r.Message.initialize(this,i,0,-1,proto.v1.signaling.api.GetPeersResponse.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.GetPeersResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersResponse.displayName="proto.v1.signaling.api.GetPeersResponse"),proto.v1.signaling.api.GetIceServersRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersRequest.displayName="proto.v1.signaling.api.GetIceServersRequest"),proto.v1.signaling.api.GetIceServersResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersResponse.displayName="proto.v1.signaling.api.GetIceServersResponse"),proto.v1.signaling.api.SendSignalRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalRequest.displayName="proto.v1.signaling.api.SendSignalRequest"),proto.v1.signaling.api.SendSignalResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalResponse.displayName="proto.v1.signaling.api.SendSignalResponse"),proto.v1.signaling.api.ReceiveSignalStreamRequest=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamRequest,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.displayName="proto.v1.signaling.api.ReceiveSignalStreamRequest"),proto.v1.signaling.api.ReceiveSignalStreamResponse=function(i){r.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamResponse,r.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.displayName="proto.v1.signaling.api.ReceiveSignalStreamResponse"),proto.v1.signaling.api.Peer.repeatedFields_=[5],r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Peer.prototype.toObject=function(i){return proto.v1.signaling.api.Peer.toObject(i,this)},proto.v1.signaling.api.Peer.toObject=function(i,c){var u,m={peerId:r.Message.getFieldWithDefault(c,1,""),organizationId:r.Message.getFieldWithDefault(c,2,""),userId:(u=c.getUserId())&&s.StringValue.toObject(i,u),deviceId:(u=c.getDeviceId())&&s.StringValue.toObject(i,u),sessionIdsList:(u=r.Message.getRepeatedField(c,5))==null?void 0:u,peerCreatedTimestamp:(u=c.getPeerCreatedTimestamp())&&s.Int64Value.toObject(i,u)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.Peer.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.Peer;return proto.v1.signaling.api.Peer.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Peer.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;case 2:u=c.readString(),i.setOrganizationId(u);break;case 3:u=new s.StringValue,c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setUserId(u);break;case 4:u=new s.StringValue,c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setDeviceId(u);break;case 5:u=c.readString(),i.addSessionIds(u);break;case 6:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setPeerCreatedTimestamp(u);break;default:c.skipField()}return i},proto.v1.signaling.api.Peer.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.Peer.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.Peer.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getPeerId()).length>0&&c.writeString(1,u),(u=i.getOrganizationId()).length>0&&c.writeString(2,u),(u=i.getUserId())!=null&&c.writeMessage(3,u,s.StringValue.serializeBinaryToWriter),(u=i.getDeviceId())!=null&&c.writeMessage(4,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionIdsList()).length>0&&c.writeRepeatedString(5,u),(u=i.getPeerCreatedTimestamp())!=null&&c.writeMessage(6,u,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.Peer.prototype.getPeerId=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.Peer.prototype.setPeerId=function(i){return r.Message.setProto3StringField(this,1,i)},proto.v1.signaling.api.Peer.prototype.getOrganizationId=function(){return r.Message.getFieldWithDefault(this,2,"")},proto.v1.signaling.api.Peer.prototype.setOrganizationId=function(i){return r.Message.setProto3StringField(this,2,i)},proto.v1.signaling.api.Peer.prototype.getUserId=function(){return r.Message.getWrapperField(this,s.StringValue,3)},proto.v1.signaling.api.Peer.prototype.setUserId=function(i){return r.Message.setWrapperField(this,3,i)},proto.v1.signaling.api.Peer.prototype.clearUserId=function(){return this.setUserId(void 0)},proto.v1.signaling.api.Peer.prototype.hasUserId=function(){return r.Message.getField(this,3)!=null},proto.v1.signaling.api.Peer.prototype.getDeviceId=function(){return r.Message.getWrapperField(this,s.StringValue,4)},proto.v1.signaling.api.Peer.prototype.setDeviceId=function(i){return r.Message.setWrapperField(this,4,i)},proto.v1.signaling.api.Peer.prototype.clearDeviceId=function(){return this.setDeviceId(void 0)},proto.v1.signaling.api.Peer.prototype.hasDeviceId=function(){return r.Message.getField(this,4)!=null},proto.v1.signaling.api.Peer.prototype.getSessionIdsList=function(){return r.Message.getRepeatedField(this,5)},proto.v1.signaling.api.Peer.prototype.setSessionIdsList=function(i){return r.Message.setField(this,5,i||[])},proto.v1.signaling.api.Peer.prototype.addSessionIds=function(i,c){return r.Message.addToRepeatedField(this,5,i,c)},proto.v1.signaling.api.Peer.prototype.clearSessionIdsList=function(){return this.setSessionIdsList([])},proto.v1.signaling.api.Peer.prototype.getPeerCreatedTimestamp=function(){return r.Message.getWrapperField(this,s.Int64Value,6)},proto.v1.signaling.api.Peer.prototype.setPeerCreatedTimestamp=function(i){return r.Message.setWrapperField(this,6,i)},proto.v1.signaling.api.Peer.prototype.clearPeerCreatedTimestamp=function(){return this.setPeerCreatedTimestamp(void 0)},proto.v1.signaling.api.Peer.prototype.hasPeerCreatedTimestamp=function(){return r.Message.getField(this,6)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Signal.prototype.toObject=function(i){return proto.v1.signaling.api.Signal.toObject(i,this)},proto.v1.signaling.api.Signal.toObject=function(i,c){var u,m={sessionId:(u=c.getSessionId())&&s.StringValue.toObject(i,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&s.Int64Value.toObject(i,u),senderId:r.Message.getFieldWithDefault(c,3,""),receiverId:r.Message.getFieldWithDefault(c,4,""),payload:r.Message.getFieldWithDefault(c,5,""),iceServers:r.Message.getFieldWithDefault(c,6,""),iceTransportPolicy:r.Message.getFieldWithDefault(c,7,""),sessionType:r.Message.getFieldWithDefault(c,8,0)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.Signal.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.Signal;return proto.v1.signaling.api.Signal.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Signal.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new s.StringValue;c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setSessionId(u);break;case 2:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setSessionCreatedTimestamp(u);break;case 3:u=c.readString(),i.setSenderId(u);break;case 4:u=c.readString(),i.setReceiverId(u);break;case 5:u=c.readString(),i.setPayload(u);break;case 6:u=c.readString(),i.setIceServers(u);break;case 7:u=c.readString(),i.setIceTransportPolicy(u);break;case 8:u=c.readEnum(),i.setSessionType(u);break;default:c.skipField()}return i},proto.v1.signaling.api.Signal.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.Signal.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.Signal.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getSessionId())!=null&&c.writeMessage(1,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,s.Int64Value.serializeBinaryToWriter),(u=i.getSenderId()).length>0&&c.writeString(3,u),(u=i.getReceiverId()).length>0&&c.writeString(4,u),(u=i.getPayload()).length>0&&c.writeString(5,u),(u=i.getIceServers()).length>0&&c.writeString(6,u),(u=i.getIceTransportPolicy()).length>0&&c.writeString(7,u),(u=i.getSessionType())!==0&&c.writeEnum(8,u)},proto.v1.signaling.api.Signal.prototype.getSessionId=function(){return r.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.Signal.prototype.setSessionId=function(i){return r.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.Signal.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionId=function(){return r.Message.getField(this,1)!=null},proto.v1.signaling.api.Signal.prototype.getSessionCreatedTimestamp=function(){return r.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.Signal.prototype.setSessionCreatedTimestamp=function(i){return r.Message.setWrapperField(this,2,i)},proto.v1.signaling.api.Signal.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionCreatedTimestamp=function(){return r.Message.getField(this,2)!=null},proto.v1.signaling.api.Signal.prototype.getSenderId=function(){return r.Message.getFieldWithDefault(this,3,"")},proto.v1.signaling.api.Signal.prototype.setSenderId=function(i){return r.Message.setProto3StringField(this,3,i)},proto.v1.signaling.api.Signal.prototype.getReceiverId=function(){return r.Message.getFieldWithDefault(this,4,"")},proto.v1.signaling.api.Signal.prototype.setReceiverId=function(i){return r.Message.setProto3StringField(this,4,i)},proto.v1.signaling.api.Signal.prototype.getPayload=function(){return r.Message.getFieldWithDefault(this,5,"")},proto.v1.signaling.api.Signal.prototype.setPayload=function(i){return r.Message.setProto3StringField(this,5,i)},proto.v1.signaling.api.Signal.prototype.getIceServers=function(){return r.Message.getFieldWithDefault(this,6,"")},proto.v1.signaling.api.Signal.prototype.setIceServers=function(i){return r.Message.setProto3StringField(this,6,i)},proto.v1.signaling.api.Signal.prototype.getIceTransportPolicy=function(){return r.Message.getFieldWithDefault(this,7,"")},proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy=function(i){return r.Message.setProto3StringField(this,7,i)},proto.v1.signaling.api.Signal.prototype.getSessionType=function(){return r.Message.getFieldWithDefault(this,8,0)},proto.v1.signaling.api.Signal.prototype.setSessionType=function(i){return r.Message.setProto3EnumField(this,8,i)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetHealthRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetHealthRequest.toObject(i,this)},proto.v1.signaling.api.GetHealthRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetHealthRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.GetHealthRequest;return proto.v1.signaling.api.GetHealthRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetHealthRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetHealthRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.GetHealthRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetHealthRequest.serializeBinaryToWriter=function(i,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetHealthResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetHealthResponse.toObject(i,this)},proto.v1.signaling.api.GetHealthResponse.toObject=function(i,c){var u={version:r.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetHealthResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.GetHealthResponse;return proto.v1.signaling.api.GetHealthResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetHealthResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setVersion(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetHealthResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.GetHealthResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetHealthResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getVersion()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.GetHealthResponse.prototype.getVersion=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetHealthResponse.prototype.setVersion=function(i){return r.Message.setProto3StringField(this,1,i)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.CreatePeerRequest.toObject(i,this)},proto.v1.signaling.api.CreatePeerRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.CreatePeerRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.CreatePeerRequest;return proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.CreatePeerRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter=function(i,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.CreatePeerResponse.toObject(i,this)},proto.v1.signaling.api.CreatePeerResponse.toObject=function(i,c){var u,m={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(i,u)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.CreatePeerResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.CreatePeerResponse;return proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.setPeer(u);break;default:c.skipField()}return i},proto.v1.signaling.api.CreatePeerResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.CreatePeerResponse.prototype.getPeer=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.CreatePeerResponse.prototype.setPeer=function(i){return r.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.CreatePeerResponse.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.CreatePeerResponse.prototype.hasPeer=function(){return r.Message.getField(this,1)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.DeletePeerRequest.toObject(i,this)},proto.v1.signaling.api.DeletePeerRequest.toObject=function(i,c){var u={peerId:r.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.DeletePeerRequest;return proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;default:c.skipField()}return i},proto.v1.signaling.api.DeletePeerRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.DeletePeerRequest.prototype.getPeerId=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.DeletePeerRequest.prototype.setPeerId=function(i){return r.Message.setProto3StringField(this,1,i)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.DeletePeerResponse.toObject(i,this)},proto.v1.signaling.api.DeletePeerResponse.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.DeletePeerResponse;return proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.DeletePeerResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter=function(i,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.RefreshPeerRequest.toObject(i,this)},proto.v1.signaling.api.RefreshPeerRequest.toObject=function(i,c){var u,m={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(i,u)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.RefreshPeerRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.RefreshPeerRequest;return proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.setPeer(u);break;default:c.skipField()}return i},proto.v1.signaling.api.RefreshPeerRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.RefreshPeerRequest.prototype.getPeer=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.RefreshPeerRequest.prototype.setPeer=function(i){return r.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.RefreshPeerRequest.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.RefreshPeerRequest.prototype.hasPeer=function(){return r.Message.getField(this,1)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.RefreshPeerResponse.toObject(i,this)},proto.v1.signaling.api.RefreshPeerResponse.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.RefreshPeerResponse;return proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.RefreshPeerResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter=function(i,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetPeersRequest.toObject(i,this)},proto.v1.signaling.api.GetPeersRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.GetPeersRequest;return proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetPeersRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter=function(i,c){},proto.v1.signaling.api.GetPeersResponse.repeatedFields_=[1],r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetPeersResponse.toObject(i,this)},proto.v1.signaling.api.GetPeersResponse.toObject=function(i,c){var u={peersList:r.Message.toObjectList(c.getPeersList(),proto.v1.signaling.api.Peer.toObject,i)};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.GetPeersResponse;return proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.addPeers(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetPeersResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeersList()).length>0&&c.writeRepeatedMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.GetPeersResponse.prototype.getPeersList=function(){return r.Message.getRepeatedWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.GetPeersResponse.prototype.setPeersList=function(i){return r.Message.setRepeatedWrapperField(this,1,i)},proto.v1.signaling.api.GetPeersResponse.prototype.addPeers=function(i,c){return r.Message.addToRepeatedWrapperField(this,1,i,proto.v1.signaling.api.Peer,c)},proto.v1.signaling.api.GetPeersResponse.prototype.clearPeersList=function(){return this.setPeersList([])},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetIceServersRequest.toObject(i,this)},proto.v1.signaling.api.GetIceServersRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.GetIceServersRequest;return proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetIceServersRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter=function(i,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetIceServersResponse.toObject(i,this)},proto.v1.signaling.api.GetIceServersResponse.toObject=function(i,c){var u={iceServers:r.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.GetIceServersResponse;return proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setIceServers(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetIceServersResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getIceServers()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.GetIceServersResponse.prototype.getIceServers=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetIceServersResponse.prototype.setIceServers=function(i){return r.Message.setProto3StringField(this,1,i)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalRequest.prototype.toObject=function(i){return proto.v1.signaling.api.SendSignalRequest.toObject(i,this)},proto.v1.signaling.api.SendSignalRequest.toObject=function(i,c){var u,m={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(i,u)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.SendSignalRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.SendSignalRequest;return proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),i.setSignal(u);break;default:c.skipField()}return i},proto.v1.signaling.api.SendSignalRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalRequest.prototype.getSignal=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.SendSignalRequest.prototype.setSignal=function(i){return r.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.SendSignalRequest.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.SendSignalRequest.prototype.hasSignal=function(){return r.Message.getField(this,1)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalResponse.prototype.toObject=function(i){return proto.v1.signaling.api.SendSignalResponse.toObject(i,this)},proto.v1.signaling.api.SendSignalResponse.toObject=function(i,c){var u,m={sessionId:(u=c.getSessionId())&&s.StringValue.toObject(i,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&s.Int64Value.toObject(i,u)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.SendSignalResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.SendSignalResponse;return proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new s.StringValue;c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setSessionId(u);break;case 2:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setSessionCreatedTimestamp(u);break;default:c.skipField()}return i},proto.v1.signaling.api.SendSignalResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getSessionId())!=null&&c.writeMessage(1,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionId=function(){return r.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionId=function(i){return r.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionId=function(){return r.Message.getField(this,1)!=null},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionCreatedTimestamp=function(){return r.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionCreatedTimestamp=function(i){return r.Message.setWrapperField(this,2,i)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionCreatedTimestamp=function(){return r.Message.getField(this,2)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.toObject=function(i){return proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject(i,this)},proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject=function(i,c){var u={peerId:r.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.ReceiveSignalStreamRequest;return proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;default:c.skipField()}return i},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.getPeerId=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.setPeerId=function(i){return r.Message.setProto3StringField(this,1,i)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.toObject=function(i){return proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject(i,this)},proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject=function(i,c){var u,m={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(i,u)};return i&&(m.$jspbMessageInstance=c),m}),proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary=function(i){var c=new r.BinaryReader(i),u=new proto.v1.signaling.api.ReceiveSignalStreamResponse;return proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),i.setSignal(u);break;default:c.skipField()}return i},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.serializeBinary=function(){var i=new r.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.getSignal=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.setSignal=function(i){return r.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal=function(){return r.Message.getField(this,1)!=null},proto.v1.signaling.api.SessionType={UNKNOWN:0,TELEOP:1,PORT_FORWARD:2,OBSERVE:3},o.object.extend(t,proto.v1.signaling.api)},function(e,t,n){function r(o,l,s=()=>!0){if(o instanceof l&&s(o))return o;throw o}n.d(t,"a",function(){return r})},function(e,t,n){n.d(t,"a",function(){return o});var r=n(34);class o extends Error{constructor(s,i,c,u,m={},R){super(`Unexpected response (${c}) for ${s} ${i}: ${JSON.stringify(R?Object(r.a)([...R.entries()].reduce((E,[y,g])=>(E[y]=g,E),{})):{})} -- ${JSON.stringify(Object(r.a)(u))}`),this.method=s,this.url=i,this.statusCode=c,this.body=u,this.validationErrors=m,this.headers=R}}},function(e,t,n){function r(E){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(E)}function o(E,y){return!y||r(y)!=="object"&&typeof y!="function"?l(E):y}function l(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function s(E){var y=typeof Map=="function"?new Map:void 0;return(s=function(g){if(g===null||(_=g,Function.toString.call(_).indexOf("[native code]")===-1))return g;var _;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(y!==void 0){if(y.has(g))return y.get(g);y.set(g,T)}function T(){return i(g,arguments,m(this).constructor)}return T.prototype=Object.create(g.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),u(T,g)})(E)}function i(E,y,g){return(i=c()?Reflect.construct:function(_,T,L){var V=[null];V.push.apply(V,T);var M=new(Function.bind.apply(_,V));return L&&u(M,L.prototype),M}).apply(null,arguments)}function c(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function u(E,y){return(u=Object.setPrototypeOf||function(g,_){return g.__proto__=_,g})(E,y)}function m(E){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(E)}var R=function(E){(function(L,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(V&&V.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),V&&u(L,V)})(T,E);var y,g,_=(y=T,g=c(),function(){var L,V=m(y);if(g){var M=m(this).constructor;L=Reflect.construct(V,arguments,M)}else L=V.apply(this,arguments);return o(this,L)});function T(L){var V;return function(M,A){if(!(M instanceof A))throw new TypeError("Cannot call a class as a function")}(this,T),V=_.call(this,`Format functions must be synchronous taking a two arguments: (info, opts)
3
- Found: `.concat(L.toString().split(`
1
+ (function(je,Ve){typeof exports=="object"&&typeof module<"u"?Ve(exports,require("date-fns")):typeof define=="function"&&define.amd?define(["exports","date-fns"],Ve):(je=typeof globalThis<"u"?globalThis:je||self,Ve(je.FormantDataSDK={},je.dateFns))})(this,function(exports,dateFns){"use strict";var ln=Object.defineProperty;var un=(je,Ve,e)=>Ve in je?ln(je,Ve,{enumerable:!0,configurable:!0,writable:!0,value:e}):je[Ve]=e;var Oe=(je,Ve,e)=>(un(je,typeof Ve!="symbol"?Ve+"":Ve,e),e);function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const dateFns__namespace=_interopNamespaceDefault(dateFns),global$1=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,inited=!1;function init(){inited=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)lookup[t]=e[t],revLookup[e.charCodeAt(t)]=t;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63}function toByteArray(e){inited||init();var t,n,r,i,s,l,o=e.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=e[o-2]==="="?2:e[o-1]==="="?1:0,l=new Arr(o*3/4-s),r=s>0?o-4:o;var c=0;for(t=0,n=0;t<r;t+=4,n+=3)i=revLookup[e.charCodeAt(t)]<<18|revLookup[e.charCodeAt(t+1)]<<12|revLookup[e.charCodeAt(t+2)]<<6|revLookup[e.charCodeAt(t+3)],l[c++]=i>>16&255,l[c++]=i>>8&255,l[c++]=i&255;return s===2?(i=revLookup[e.charCodeAt(t)]<<2|revLookup[e.charCodeAt(t+1)]>>4,l[c++]=i&255):s===1&&(i=revLookup[e.charCodeAt(t)]<<10|revLookup[e.charCodeAt(t+1)]<<4|revLookup[e.charCodeAt(t+2)]>>2,l[c++]=i>>8&255,l[c++]=i&255),l}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[e&63]}function encodeChunk(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(tripletToBase64(r));return i.join("")}function fromByteArray(e){inited||init();for(var t,n=e.length,r=n%3,i="",s=[],l=16383,o=0,c=n-r;o<c;o+=l)s.push(encodeChunk(e,o,o+l>c?c:o+l));return r===1?(t=e[n-1],i+=lookup[t>>2],i+=lookup[t<<4&63],i+="=="):r===2&&(t=(e[n-2]<<8)+e[n-1],i+=lookup[t>>10],i+=lookup[t>>4&63],i+=lookup[t<<2&63],i+="="),s.push(i),s.join("")}function read(e,t,n,r,i){var s,l,o=i*8-r-1,c=(1<<o)-1,u=c>>1,f=-7,E=n?i-1:0,w=n?-1:1,h=e[t+E];for(E+=w,s=h&(1<<-f)-1,h>>=-f,f+=o;f>0;s=s*256+e[t+E],E+=w,f-=8);for(l=s&(1<<-f)-1,s>>=-f,f+=r;f>0;l=l*256+e[t+E],E+=w,f-=8);if(s===0)s=1-u;else{if(s===c)return l?NaN:(h?-1:1)*(1/0);l=l+Math.pow(2,r),s=s-u}return(h?-1:1)*l*Math.pow(2,s-r)}function write(e,t,n,r,i,s){var l,o,c,u=s*8-i-1,f=(1<<u)-1,E=f>>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:s-1,g=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,l=f):(l=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-l))<1&&(l--,c*=2),l+E>=1?t+=w/c:t+=w*Math.pow(2,1-E),t*c>=2&&(l++,c/=2),l+E>=f?(o=0,l=f):l+E>=1?(o=(t*c-1)*Math.pow(2,i),l=l+E):(o=t*Math.pow(2,E-1)*Math.pow(2,i),l=0));i>=8;e[n+h]=o&255,h+=g,o/=256,i-=8);for(l=l<<i|o,u+=i;u>0;e[n+h]=l&255,h+=g,l/=256,u-=8);e[n+h-g]|=b*128}var toString={}.toString,isArray$1=Array.isArray||function(e){return toString.call(e)=="[object Array]"};/*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
5
+ * @license MIT
6
+ */var INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global$1.TYPED_ARRAY_SUPPORT!==void 0?global$1.TYPED_ARRAY_SUPPORT:!0,kMaxLength();function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()<t)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=Buffer.prototype):(e===null&&(e=new Buffer(t)),e.length=t),e}function Buffer(e,t,n){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer))return new Buffer(e,t,n);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,e)}return from(this,e,t,n)}Buffer.poolSize=8192,Buffer._augment=function(e){return e.__proto__=Buffer.prototype,e};function from(e,t,n,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?fromArrayBuffer(e,t,n,r):typeof t=="string"?fromString(e,t,n):fromObject(e,t)}Buffer.from=function(e,t,n){return from(null,e,t,n)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array);function assertSize(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function alloc(e,t,n,r){return assertSize(t),t<=0?createBuffer(e,t):n!==void 0?typeof r=="string"?createBuffer(e,t).fill(n,r):createBuffer(e,t).fill(n):createBuffer(e,t)}Buffer.alloc=function(e,t,n){return alloc(null,e,t,n)};function allocUnsafe(e,t){if(assertSize(t),e=createBuffer(e,t<0?0:checked(t)|0),!Buffer.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}Buffer.allocUnsafe=function(e){return allocUnsafe(null,e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(null,e)};function fromString(e,t,n){if((typeof n!="string"||n==="")&&(n="utf8"),!Buffer.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=byteLength(t,n)|0;e=createBuffer(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function fromArrayLike(e,t){var n=t.length<0?0:checked(t.length)|0;e=createBuffer(e,n);for(var r=0;r<n;r+=1)e[r]=t[r]&255;return e}function fromArrayBuffer(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return n===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,n):t=new Uint8Array(t,n,r),Buffer.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=Buffer.prototype):e=fromArrayLike(e,t),e}function fromObject(e,t){if(internalIsBuffer(t)){var n=checked(t.length)|0;return e=createBuffer(e,n),e.length===0||t.copy(e,0,0,n),e}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||isnan(t.length)?createBuffer(e,0):fromArrayLike(e,t);if(t.type==="Buffer"&&isArray$1(t.data))return fromArrayLike(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(e){if(e>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return e|0}Buffer.isBuffer=isBuffer;function internalIsBuffer(e){return!!(e!=null&&e._isBuffer)}Buffer.compare=function(t,n){if(!internalIsBuffer(t)||!internalIsBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,i=n.length,s=0,l=Math.min(r,i);s<l;++s)if(t[s]!==n[s]){r=t[s],i=n[s];break}return r<i?-1:i<r?1:0},Buffer.isEncoding=function(t){switch(String(t).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}},Buffer.concat=function(t,n){if(!isArray$1(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Buffer.alloc(0);var r;if(n===void 0)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var i=Buffer.allocUnsafe(n),s=0;for(r=0;r<t.length;++r){var l=t[r];if(!internalIsBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(i,s),s+=l.length}return i};function byteLength(e,t){if(internalIsBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return base64ToBytes(e).length;default:if(r)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),r=!0}}Buffer.byteLength=byteLength;function slowToString(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,n);case"utf8":case"utf-8":return utf8Slice(this,t,n);case"ascii":return asciiSlice(this,t,n);case"latin1":case"binary":return latin1Slice(this,t,n);case"base64":return base64Slice(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Buffer.prototype._isBuffer=!0;function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}Buffer.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)swap(this,n,n+1);return this},Buffer.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)swap(this,n,n+3),swap(this,n+1,n+2);return this},Buffer.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)swap(this,n,n+7),swap(this,n+1,n+6),swap(this,n+2,n+5),swap(this,n+3,n+4);return this},Buffer.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(t){if(!internalIsBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Buffer.compare(this,t)===0},Buffer.prototype.inspect=function(){var t="",n=INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function(t,n,r,i,s){if(!internalIsBuffer(t))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),n<0||r>t.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&n>=r)return 0;if(i>=s)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,s>>>=0,this===t)return 0;for(var l=s-i,o=r-n,c=Math.min(l,o),u=this.slice(i,s),f=t.slice(n,r),E=0;E<c;++E)if(u[E]!==f[E]){l=u[E],o=f[E];break}return l<o?-1:o<l?1:0};function bidirectionalIndexOf(e,t,n,r,i){if(e.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(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)n=0;else return-1;if(typeof t=="string"&&(t=Buffer.from(t,r)),internalIsBuffer(t))return t.length===0?-1:arrayIndexOf(e,t,n,r,i);if(typeof t=="number")return t=t&255,Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):arrayIndexOf(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,n,r,i){var s=1,l=e.length,o=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(e.length<2||t.length<2)return-1;s=2,l/=2,o/=2,n/=2}function c(h,g){return s===1?h[g]:h.readUInt16BE(g*s)}var u;if(i){var f=-1;for(u=n;u<l;u++)if(c(e,u)===c(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===o)return f*s}else f!==-1&&(u-=u-f),f=-1}else for(n+o>l&&(n=l-o),u=n;u>=0;u--){for(var E=!0,w=0;w<o;w++)if(c(e,u+w)!==c(t,w)){E=!1;break}if(E)return u}return-1}Buffer.prototype.includes=function(t,n,r){return this.indexOf(t,n,r)!==-1},Buffer.prototype.indexOf=function(t,n,r){return bidirectionalIndexOf(this,t,n,r,!0)},Buffer.prototype.lastIndexOf=function(t,n,r){return bidirectionalIndexOf(this,t,n,r,!1)};function hexWrite(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var l=0;l<r;++l){var o=parseInt(t.substr(l*2,2),16);if(isNaN(o))return l;e[n+l]=o}return l}function utf8Write(e,t,n,r){return blitBuffer(utf8ToBytes(t,e.length-n),e,n,r)}function asciiWrite(e,t,n,r){return blitBuffer(asciiToBytes(t),e,n,r)}function latin1Write(e,t,n,r){return asciiWrite(e,t,n,r)}function base64Write(e,t,n,r){return blitBuffer(base64ToBytes(t),e,n,r)}function ucs2Write(e,t,n,r){return blitBuffer(utf16leToBytes(t,e.length-n),e,n,r)}Buffer.prototype.write=function(t,n,r,i){if(n===void 0)i="utf8",r=this.length,n=0;else if(r===void 0&&typeof n=="string")i=n,r=this.length,n=0;else if(isFinite(n))n=n|0,isFinite(r)?(r=r|0,i===void 0&&(i="utf8")):(i=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-n;if((r===void 0||r>s)&&(r=s),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var l=!1;;)switch(i){case"hex":return hexWrite(this,t,n,r);case"utf8":case"utf-8":return utf8Write(this,t,n,r);case"ascii":return asciiWrite(this,t,n,r);case"latin1":case"binary":return latin1Write(this,t,n,r);case"base64":return base64Write(this,t,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,n,r);default:if(l)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),l=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(e,t,n){return t===0&&n===e.length?fromByteArray(e):fromByteArray(e.slice(t,n))}function utf8Slice(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s=e[i],l=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=n){var c,u,f,E;switch(o){case 1:s<128&&(l=s);break;case 2:c=e[i+1],(c&192)===128&&(E=(s&31)<<6|c&63,E>127&&(l=E));break;case 3:c=e[i+1],u=e[i+2],(c&192)===128&&(u&192)===128&&(E=(s&15)<<12|(c&63)<<6|u&63,E>2047&&(E<55296||E>57343)&&(l=E));break;case 4:c=e[i+1],u=e[i+2],f=e[i+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(E=(s&15)<<18|(c&63)<<12|(u&63)<<6|f&63,E>65535&&E<1114112&&(l=E))}}l===null?(l=65533,o=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|l&1023),r.push(l),i+=o}return decodeCodePointsArray(r)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=MAX_ARGUMENTS_LENGTH));return n}function asciiSlice(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function latin1Slice(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function hexSlice(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=toHex(e[s]);return i}function utf16leSlice(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+r[s+1]*256);return i}Buffer.prototype.slice=function(t,n){var r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t);var i;if(Buffer.TYPED_ARRAY_SUPPORT)i=this.subarray(t,n),i.__proto__=Buffer.prototype;else{var s=n-t;i=new Buffer(s,void 0);for(var l=0;l<s;++l)i[l]=this[l+t]}return i};function checkOffset(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function(t,n,r){t=t|0,n=n|0,r||checkOffset(t,n,this.length);for(var i=this[t],s=1,l=0;++l<n&&(s*=256);)i+=this[t+l]*s;return i},Buffer.prototype.readUIntBE=function(t,n,r){t=t|0,n=n|0,r||checkOffset(t,n,this.length);for(var i=this[t+--n],s=1;n>0&&(s*=256);)i+=this[t+--n]*s;return i},Buffer.prototype.readUInt8=function(t,n){return n||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function(t,n){return n||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function(t,n){return n||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function(t,n){return n||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},Buffer.prototype.readUInt32BE=function(t,n){return n||checkOffset(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function(t,n,r){t=t|0,n=n|0,r||checkOffset(t,n,this.length);for(var i=this[t],s=1,l=0;++l<n&&(s*=256);)i+=this[t+l]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*n)),i},Buffer.prototype.readIntBE=function(t,n,r){t=t|0,n=n|0,r||checkOffset(t,n,this.length);for(var i=n,s=1,l=this[t+--i];i>0&&(s*=256);)l+=this[t+--i]*s;return s*=128,l>=s&&(l-=Math.pow(2,8*n)),l},Buffer.prototype.readInt8=function(t,n){return n||checkOffset(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},Buffer.prototype.readInt16LE=function(t,n){n||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r},Buffer.prototype.readInt16BE=function(t,n){n||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r},Buffer.prototype.readInt32LE=function(t,n){return n||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function(t,n){return n||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function(t,n){return n||checkOffset(t,4,this.length),read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function(t,n){return n||checkOffset(t,4,this.length),read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function(t,n){return n||checkOffset(t,8,this.length),read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function(t,n){return n||checkOffset(t,8,this.length),read(this,t,!1,52,8)};function checkInt(e,t,n,r,i,s){if(!internalIsBuffer(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+r>e.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function(t,n,r,i){if(t=+t,n=n|0,r=r|0,!i){var s=Math.pow(2,8*r)-1;checkInt(this,t,n,r,s,0)}var l=1,o=0;for(this[n]=t&255;++o<r&&(l*=256);)this[n+o]=t/l&255;return n+r},Buffer.prototype.writeUIntBE=function(t,n,r,i){if(t=+t,n=n|0,r=r|0,!i){var s=Math.pow(2,8*r)-1;checkInt(this,t,n,r,s,0)}var l=r-1,o=1;for(this[n+l]=t&255;--l>=0&&(o*=256);)this[n+l]=t/o&255;return n+r},Buffer.prototype.writeUInt8=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=t&255,n+1};function objectWriteUInt16(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i<s;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}Buffer.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):objectWriteUInt16(this,t,n,!0),n+2},Buffer.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):objectWriteUInt16(this,t,n,!1),n+2};function objectWriteUInt32(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i<s;++i)e[n+i]=t>>>(r?i:3-i)*8&255}Buffer.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255):objectWriteUInt32(this,t,n,!0),n+4},Buffer.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):objectWriteUInt32(this,t,n,!1),n+4},Buffer.prototype.writeIntLE=function(t,n,r,i){if(t=+t,n=n|0,!i){var s=Math.pow(2,8*r-1);checkInt(this,t,n,r,s-1,-s)}var l=0,o=1,c=0;for(this[n]=t&255;++l<r&&(o*=256);)t<0&&c===0&&this[n+l-1]!==0&&(c=1),this[n+l]=(t/o>>0)-c&255;return n+r},Buffer.prototype.writeIntBE=function(t,n,r,i){if(t=+t,n=n|0,!i){var s=Math.pow(2,8*r-1);checkInt(this,t,n,r,s-1,-s)}var l=r-1,o=1,c=0;for(this[n+l]=t&255;--l>=0&&(o*=256);)t<0&&c===0&&this[n+l+1]!==0&&(c=1),this[n+l]=(t/o>>0)-c&255;return n+r},Buffer.prototype.writeInt8=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=t&255,n+1},Buffer.prototype.writeInt16LE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):objectWriteUInt16(this,t,n,!0),n+2},Buffer.prototype.writeInt16BE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):objectWriteUInt16(this,t,n,!1),n+2},Buffer.prototype.writeInt32LE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):objectWriteUInt32(this,t,n,!0),n+4},Buffer.prototype.writeInt32BE=function(t,n,r){return t=+t,n=n|0,r||checkInt(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):objectWriteUInt32(this,t,n,!1),n+4};function checkIEEE754(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function writeFloat(e,t,n,r,i){return i||checkIEEE754(e,t,n,4),write(e,t,n,r,23,4),n+4}Buffer.prototype.writeFloatLE=function(t,n,r){return writeFloat(this,t,n,!0,r)},Buffer.prototype.writeFloatBE=function(t,n,r){return writeFloat(this,t,n,!1,r)};function writeDouble(e,t,n,r,i){return i||checkIEEE754(e,t,n,8),write(e,t,n,r,52,8),n+8}Buffer.prototype.writeDoubleLE=function(t,n,r){return writeDouble(this,t,n,!0,r)},Buffer.prototype.writeDoubleBE=function(t,n,r){return writeDouble(this,t,n,!1,r)},Buffer.prototype.copy=function(t,n,r,i){if(r||(r=0),!i&&i!==0&&(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&i<r&&(i=r),i===r||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-n<i-r&&(i=t.length-n+r);var s=i-r,l;if(this===t&&r<n&&n<i)for(l=s-1;l>=0;--l)t[l+n]=this[l+r];else if(s<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(l=0;l<s;++l)t[l+n]=this[l+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),n);return s},Buffer.prototype.fill=function(t,n,r,i){if(typeof t=="string"){if(typeof n=="string"?(i=n,n=0,r=this.length):typeof r=="string"&&(i=r,r=this.length),t.length===1){var s=t.charCodeAt(0);s<256&&(t=s)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;n=n>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var l;if(typeof t=="number")for(l=n;l<r;++l)this[l]=t;else{var o=internalIsBuffer(t)?t:utf8ToBytes(new Buffer(t,i).toString()),c=o.length;for(l=0;l<r-n;++l)this[l+n]=o[l%c]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(e){if(e=stringtrim(e).replace(INVALID_BASE64_RE,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function stringtrim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],l=0;l<r;++l){if(n=e.charCodeAt(l),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}else if(l+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return s}function asciiToBytes(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function utf16leToBytes(e,t){for(var n,r,i,s=[],l=0;l<e.length&&!((t-=2)<0);++l)n=e.charCodeAt(l),r=n>>8,i=n%256,s.push(i),s.push(r);return s}function base64ToBytes(e){return toByteArray(base64clean(e))}function blitBuffer(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function isnan(e){return e!==e}function isBuffer(e){return e!=null&&(!!e._isBuffer||isFastBuffer(e)||isSlowBuffer(e))}function isFastBuffer(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&isFastBuffer(e.slice(0,0))}var distExports={},dist={get exports(){return distExports},set exports(e){distExports=e}};/*! For license information please see index.js.LICENSE.txt */(function(module,exports){(function(e,t){module.exports=t()})(window,function(){return function(e){function t(u){for(var f,E,w=u[0],h=u[1],g=0,b=[];g<w.length;g++)E=w[g],Object.prototype.hasOwnProperty.call(r,E)&&r[E]&&b.push(r[E][0]),r[E]=0;for(f in h)Object.prototype.hasOwnProperty.call(h,f)&&(e[f]=h[f]);for(c&&c(u);b.length;)b.shift()()}var n={},r={0:0};function i(u){if(n[u])return n[u].exports;var f=n[u]={i:u,l:!1,exports:{}};return e[u].call(f.exports,f,f.exports,i),f.l=!0,f.exports}i.e=function(){return Promise.resolve()},i.m=e,i.c=n,i.d=function(u,f,E){i.o(u,f)||Object.defineProperty(u,f,{enumerable:!0,get:E})},i.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},i.t=function(u,f){if(1&f&&(u=i(u)),8&f||4&f&&typeof u=="object"&&u&&u.__esModule)return u;var E=Object.create(null);if(i.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:u}),2&f&&typeof u!="string")for(var w in u)i.d(E,w,function(h){return u[h]}.bind(null,w));return E},i.n=function(u){var f=u&&u.__esModule?function(){return u.default}:function(){return u};return i.d(f,"a",f),f},i.o=function(u,f){return Object.prototype.hasOwnProperty.call(u,f)},i.p="",i.oe=function(u){throw console.error(u),u};var s=window.webpackJsonpFormantRealtimeSDK=window.webpackJsonpFormantRealtimeSDK||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var o=0;o<s.length;o++)t(s[o]);var c=l;return i(i.s=228)}([function(e,t,n){n.d(t,"a",function(){return G});var r=n(14),i=n.n(r),s=n(18),l=n(56),o=n(19);const c=Math.pow(2,20),u=c;function f(T,k){if(k.length<T)throw new TypeError(T+" argument"+(T>1?"s":"")+" required, but only "+k.length+" present")}function E(T){if(T===null||T===!0||T===!1)return NaN;var k=Number(T);return isNaN(k)?k:k<0?Math.ceil(k):Math.floor(k)}var w={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},h=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,g=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,b=/^([+-])(\d{2})(?::?(\d{2}))?$/;function R(T){var k,J={},K=T.split(w.dateTimeDelimiter);if(K.length>2)return J;if(/:/.test(K[0])?k=K[0]:(J.date=K[0],k=K[1],w.timeZoneDelimiter.test(J.date)&&(J.date=T.split(w.timeZoneDelimiter)[0],k=T.substr(J.date.length,T.length))),k){var re=w.timezone.exec(k);re?(J.time=k.replace(re[1],""),J.timezone=re[1]):J.time=k}return J}function x(T,k){var J=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+k)+"})|(\\d{2}|[+-]\\d{"+(2+k)+"})$)"),K=T.match(J);if(!K)return{year:NaN,restDateString:""};var re=K[1]?parseInt(K[1]):null,se=K[2]?parseInt(K[2]):null;return{year:se===null?re:100*se,restDateString:T.slice((K[1]||K[2]).length)}}function F(T,k){if(k===null)return new Date(NaN);var J=T.match(h);if(!J)return new Date(NaN);var K=!!J[4],re=M(J[1]),se=M(J[2])-1,fe=M(J[3]),ve=M(J[4]),Ie=M(J[5])-1;if(K)return function(Ce,Te,Re){return Te>=1&&Te<=53&&Re>=0&&Re<=6}(0,ve,Ie)?function(Ce,Te,Re){var Be=new Date(0);Be.setUTCFullYear(Ce,0,4);var Ze=Be.getUTCDay()||7,et=7*(Te-1)+Re+1-Ze;return Be.setUTCDate(Be.getUTCDate()+et),Be}(k,ve,Ie):new Date(NaN);var Se=new Date(0);return function(Ce,Te,Re){return Te>=0&&Te<=11&&Re>=1&&Re<=($[Te]||(q(Ce)?29:28))}(k,se,fe)&&function(Ce,Te){return Te>=1&&Te<=(q(Ce)?366:365)}(k,re)?(Se.setUTCFullYear(k,se,Math.max(re,fe)),Se):new Date(NaN)}function M(T){return T?parseInt(T):1}function A(T){var k=T.match(g);if(!k)return NaN;var J=d(k[1]),K=d(k[2]),re=d(k[3]);return function(se,fe,ve){return se===24?fe===0&&ve===0:ve>=0&&ve<60&&fe>=0&&fe<60&&se>=0&&se<25}(J,K,re)?36e5*J+6e4*K+1e3*re:NaN}function d(T){return T&&parseFloat(T.replace(",","."))||0}function I(T){if(T==="Z")return 0;var k=T.match(b);if(!k)return 0;var J=k[1]==="+"?-1:1,K=parseInt(k[2]),re=k[3]&&parseInt(k[3])||0;return function(se,fe){return fe>=0&&fe<=59}(0,re)?J*(36e5*K+6e4*re):NaN}var $=[31,null,31,30,31,30,31,31,30,31,30,31];function q(T){return T%400==0||T%4==0&&T%100!=0}function m(T){return f(1,arguments),T instanceof Date||typeof T=="object"&&Object.prototype.toString.call(T)==="[object Date]"}function y(T){f(1,arguments);var k=Object.prototype.toString.call(T);return T instanceof Date||typeof T=="object"&&k==="[object Date]"?new Date(T.getTime()):typeof T=="number"||k==="[object Number]"?new Date(T):(typeof T!="string"&&k!=="[object String]"||typeof console>"u"||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function C(T){const k=function(J,K){var re;f(1,arguments);var se=E((re=K==null?void 0:K.additionalDigits)!==null&&re!==void 0?re:2);if(se!==2&&se!==1&&se!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(typeof J!="string"&&Object.prototype.toString.call(J)!=="[object String]")return new Date(NaN);var fe,ve=R(J);if(ve.date){var Ie=x(ve.date,se);fe=F(Ie.restDateString,Ie.year)}if(!fe||isNaN(fe.getTime()))return new Date(NaN);var Se,Ce=fe.getTime(),Te=0;if(ve.time&&(Te=A(ve.time),isNaN(Te)))return new Date(NaN);if(!ve.timezone){var Re=new Date(Ce+Te),Be=new Date(0);return Be.setFullYear(Re.getUTCFullYear(),Re.getUTCMonth(),Re.getUTCDate()),Be.setHours(Re.getUTCHours(),Re.getUTCMinutes(),Re.getUTCSeconds(),Re.getUTCMilliseconds()),Be}return Se=I(ve.timezone),isNaN(Se)?new Date(NaN):new Date(Ce+Te+Se)}(T);if(!function(J){if(f(1,arguments),!m(J)&&typeof J!="number")return!1;var K=y(J);return!isNaN(Number(K))}(k))throw new Error(`Invalid ISO 8601 date string (${T})`);return k}var _=n(4),L=n(34);function z(T){return i()(T,{cycles:!0})}var B=function(T,k){var J={};for(var K in T)Object.prototype.hasOwnProperty.call(T,K)&&k.indexOf(K)<0&&(J[K]=T[K]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function"){var re=0;for(K=Object.getOwnPropertySymbols(T);re<K.length;re++)k.indexOf(K[re])<0&&Object.prototype.propertyIsEnumerable.call(T,K[re])&&(J[K[re]]=T[K[re]])}return J};function N(T,k={}){const J=ve=>k.redacted!==!1?Object(L.a)(ve):ve;if(!T.stack)return{message:z(J(T))};const{name:K,message:re,stack:se}=T,fe=B(T,["name","message","stack"]);return{name:K,message:re!==void 0?re:z(J(T)),stack:se,meta:fe&&Object.keys(fe).length===0?void 0:J(fe)}}function P(T,k={}){const{message:J,stack:K,meta:re}=N(T,k);return`${K||J||""}${re&&Object.keys(re).length>0?` -- ${z(re)}`:""}`}var W=n(39),O=n(103),p=n.n(O),U=function(T,k,J,K){return new(J||(J=Promise))(function(re,se){function fe(Se){try{Ie(K.next(Se))}catch(Ce){se(Ce)}}function ve(Se){try{Ie(K.throw(Se))}catch(Ce){se(Ce)}}function Ie(Se){var Ce;Se.done?re(Se.value):(Ce=Se.value,Ce instanceof J?Ce:new J(function(Te){Te(Ce)})).then(fe,ve)}Ie((K=K.apply(T,k||[])).next())})},V=function(T,k){var J={};for(var K in T)Object.prototype.hasOwnProperty.call(T,K)&&k.indexOf(K)<0&&(J[K]=T[K]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function"){var re=0;for(K=Object.getOwnPropertySymbols(T);re<K.length;re++)k.indexOf(K[re])<0&&Object.prototype.propertyIsEnumerable.call(T,K[re])&&(J[K[re]]=T[K[re]])}return J};class Q extends p.a{constructor(k,J){super(),this.endpoint=k,this.metadata=J,this.logClient=this.getLogClient()}getLogClient(){return U(this,void 0,void 0,function*(){const{LogClient:k}=yield Promise.resolve().then(n.bind(null,231));return new k(this.endpoint)})}log(k,J){return U(this,void 0,void 0,function*(){const{level:K,message:re,error:se}=k,fe=V(k,["level","message","error"]);this.emit("logged");try{yield(yield this.logClient).log([{timestamp:new Date().toISOString(),level:K,message:`${re}`.substring(0,1e3),error:se!==void 0?N(se):void 0,meta:Object.assign(Object.assign({},fe),this.metadata)}])}catch(ve){console.error(`Failed to log to log-api: ${P(ve)}`)}J()})}}var ee=function(T,k){var J={};for(var K in T)Object.prototype.hasOwnProperty.call(T,K)&&k.indexOf(K)<0&&(J[K]=T[K]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function"){var re=0;for(K=Object.getOwnPropertySymbols(T);re<K.length;re++)k.indexOf(K[re])<0&&Object.prototype.propertyIsEnumerable.call(T,K[re])&&(J[K[re]]=T[K[re]])}return J};const ne={app:_.a,namespace:_.i,buildTag:_.b,instanceId:W.a},Y=_.e?o.format.printf(T=>{var{timestamp:k,level:J,message:K,error:re}=T,se=ee(T,["timestamp","level","message","error"]);const fe=Object.assign(Object.assign({timestamp:k?C(k).getTime():new Date().getTime(),level:J.toUpperCase(),message:K},re?{error:N(re)}:{}),{meta:Object.assign(Object.assign({},ne),se)});return i()(fe,{cycles:!0})}):o.format.printf(T=>{var{timestamp:k,level:J,message:K,error:re}=T,se=ee(T,["timestamp","level","message","error"]);let fe=`${k||new Date().toISOString()} ${J.toUpperCase()}: ${K} `;return Object.keys(se).length>0&&(fe+=i()(se,{cycles:!0})),re&&(fe+=`
7
+ ${P(re)}`),fe}),G=Object(o.createLogger)({level:_.f});if(_.g&&G.add(new o.transports.Console({format:Y,level:"debug"})),_.d&&G.add(new Q(_.d,ne)),_.h){const T=l.resolve(s.tmpdir(),`silly-${_.a}.log`);G.debug("Logging silly logs to file",{filename:T}),G.add(new o.transports.File({filename:T,maxsize:1*u,maxFiles:10,format:o.format.combine((S="silly",Object(o.format)(k=>k.level===S&&k)()),Y),level:"silly"}))}var S},function(e,t,n){n.d(t,"a",function(){return r});const r={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},function(e,t){var n,r,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function o(R){if(n===setTimeout)return setTimeout(R,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(R,0);try{return n(R,0)}catch{try{return n.call(null,R,0)}catch{return n.call(this,R,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:s}catch{n=s}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,u=[],f=!1,E=-1;function w(){f&&c&&(f=!1,c.length?u=c.concat(u):E=-1,u.length&&h())}function h(){if(!f){var R=o(w);f=!0;for(var x=u.length;x;){for(c=u,u=[];++E<x;)c&&c[E].run();E=-1,x=u.length}c=null,f=!1,function(F){if(r===clearTimeout)return clearTimeout(F);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(F);try{r(F)}catch{try{return r.call(null,F)}catch{return r.call(this,F)}}}(R)}}function g(R,x){this.fun=R,this.array=x}function b(){}i.nextTick=function(R){var x=new Array(arguments.length-1);if(arguments.length>1)for(var F=1;F<arguments.length;F++)x[F-1]=arguments[F];u.push(new g(R,x)),u.length!==1||f||o(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=b,i.addListener=b,i.once=b,i.off=b,i.removeListener=b,i.removeAllListeners=b,i.emit=b,i.prependListener=b,i.prependOnceListener=b,i.listeners=function(R){return[]},i.binding=function(R){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(R){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:n(118)})},function(e,t,n){(function(r){n.d(t,"a",function(){return l}),n.d(t,"i",function(){return o}),n.d(t,"j",function(){return c}),n.d(t,"b",function(){return u}),n.d(t,"f",function(){return f}),n.d(t,"e",function(){return E}),n.d(t,"g",function(){return w}),n.d(t,"d",function(){return h}),n.d(t,"c",function(){return g}),n.d(t,"h",function(){return b});var i=n(102);const s=i.from({ENVIRONMENT:r.env.ENV,API_ENDPOINT:r.env.API_ENDPOINT,APP:"realtime-sdk",APP_PATH:r.env.APP_PATH,BUILD_TAG:r.env.BUILD_TAG,ENABLE_SELF_SERVE:r.env.ENABLE_SELF_SERVE,ENABLE_SENTRY:r.env.ENABLE_SENTRY,ENABLE_SENTRY_PROFILING:r.env.ENABLE_SENTRY_PROFILING,GIT_COMMIT:r.env.GIT_COMMIT,JEST_WORKER_ID:r.env.JEST_WORKER_ID,LOG_API_ENDPOINT:r.env.LOG_API_ENDPOINT,LOG_JSON:"false",LOG_LEVEL:r.env.LOG_LEVEL,LOG_TO_CONSOLE:r.env.LOG_TO_CONSOLE,LOG_TO_FILE:r.env.LOG_TO_FILE,NAMESPACE:"production",SENTRY_DSN:r.env.SENTRY_DSN,SHEET_EXPORT_MAX_ROW_COUNT:r.env.SHEET_EXPORT_MAX_ROW_COUNT,STABLE_AGENT_VERSION:r.env.STABLE_AGENT_VERSION,VERSION:r.env.VERSION}),l=(s.get("ENVIRONMENT").default("").asString(),s.get("APP").default("").asString()),o=(s.get("APP_PATH").default("").asString(),s.get("API_ENDPOINT").default("").asString(),s.get("NAMESPACE").default("").asString()),c=s.get("VERSION").default("").asString(),u=s.get("BUILD_TAG").default("").asString(),f=(s.get("GIT_COMMIT").default("").asString(),s.get("ENABLE_SENTRY").default("false").asBool(),s.get("ENABLE_SENTRY_PROFILING").default("false").asBool(),s.get("SENTRY_DSN").default("").asString(),s.get("LOG_LEVEL").default("debug").asString()),E=s.get("LOG_JSON").default("true").asBool(),w=s.get("LOG_TO_CONSOLE").default("true").asBool(),h=(s.get("STABLE_AGENT_VERSION").default("").asString(),s.get("LOG_API_ENDPOINT").asString()),g=s.get("JEST_WORKER_ID").asString(),b=(s.get("SHEET_EXPORT_MAX_ROW_COUNT").default("10000").asIntPositive(),s.get("LOG_TO_FILE").default("false").asBoolStrict());s.get("ENABLE_SELF_SERVE").default("true").asBoolStrict()}).call(this,n(2))},function(e,t,n){(function(r){var i=n(126),s=n(127),l=n(42);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(S,T){if(o()<T)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(S=new Uint8Array(T)).__proto__=u.prototype:(S===null&&(S=new u(T)),S.length=T),S}function u(S,T,k){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(S,T,k);if(typeof S=="number"){if(typeof T=="string")throw new Error("If encoding is specified then the first argument must be a string");return w(this,S)}return f(this,S,T,k)}function f(S,T,k,J){if(typeof T=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&T instanceof ArrayBuffer?function(K,re,se,fe){if(re.byteLength,se<0||re.byteLength<se)throw new RangeError("'offset' is out of bounds");if(re.byteLength<se+(fe||0))throw new RangeError("'length' is out of bounds");return re=se===void 0&&fe===void 0?new Uint8Array(re):fe===void 0?new Uint8Array(re,se):new Uint8Array(re,se,fe),u.TYPED_ARRAY_SUPPORT?(K=re).__proto__=u.prototype:K=h(K,re),K}(S,T,k,J):typeof T=="string"?function(K,re,se){if(typeof se=="string"&&se!==""||(se="utf8"),!u.isEncoding(se))throw new TypeError('"encoding" must be a valid string encoding');var fe=0|b(re,se),ve=(K=c(K,fe)).write(re,se);return ve!==fe&&(K=K.slice(0,ve)),K}(S,T,k):function(K,re){if(u.isBuffer(re)){var se=0|g(re.length);return(K=c(K,se)).length===0||re.copy(K,0,0,se),K}if(re){if(typeof ArrayBuffer<"u"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||(fe=re.length)!=fe?c(K,0):h(K,re);if(re.type==="Buffer"&&l(re.data))return h(K,re.data)}var fe;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(S,T)}function E(S){if(typeof S!="number")throw new TypeError('"size" argument must be a number');if(S<0)throw new RangeError('"size" argument must not be negative')}function w(S,T){if(E(T),S=c(S,T<0?0:0|g(T)),!u.TYPED_ARRAY_SUPPORT)for(var k=0;k<T;++k)S[k]=0;return S}function h(S,T){var k=T.length<0?0:0|g(T.length);S=c(S,k);for(var J=0;J<k;J+=1)S[J]=255&T[J];return S}function g(S){if(S>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|S}function b(S,T){if(u.isBuffer(S))return S.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(S)||S instanceof ArrayBuffer))return S.byteLength;typeof S!="string"&&(S=""+S);var k=S.length;if(k===0)return 0;for(var J=!1;;)switch(T){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":case void 0:return ne(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*k;case"hex":return k>>>1;case"base64":return Y(S).length;default:if(J)return ne(S).length;T=(""+T).toLowerCase(),J=!0}}function R(S,T,k){var J=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0)<=(T>>>=0))return"";for(S||(S="utf8");;)switch(S){case"hex":return z(this,T,k);case"utf8":case"utf-8":return C(this,T,k);case"ascii":return _(this,T,k);case"latin1":case"binary":return L(this,T,k);case"base64":return y(this,T,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,T,k);default:if(J)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),J=!0}}function x(S,T,k){var J=S[T];S[T]=S[k],S[k]=J}function F(S,T,k,J,K){if(S.length===0)return-1;if(typeof k=="string"?(J=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,isNaN(k)&&(k=K?0:S.length-1),k<0&&(k=S.length+k),k>=S.length){if(K)return-1;k=S.length-1}else if(k<0){if(!K)return-1;k=0}if(typeof T=="string"&&(T=u.from(T,J)),u.isBuffer(T))return T.length===0?-1:M(S,T,k,J,K);if(typeof T=="number")return T&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(S,T,k):Uint8Array.prototype.lastIndexOf.call(S,T,k):M(S,[T],k,J,K);throw new TypeError("val must be string, number or Buffer")}function M(S,T,k,J,K){var re,se=1,fe=S.length,ve=T.length;if(J!==void 0&&((J=String(J).toLowerCase())==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(S.length<2||T.length<2)return-1;se=2,fe/=2,ve/=2,k/=2}function Ie(Re,Be){return se===1?Re[Be]:Re.readUInt16BE(Be*se)}if(K){var Se=-1;for(re=k;re<fe;re++)if(Ie(S,re)===Ie(T,Se===-1?0:re-Se)){if(Se===-1&&(Se=re),re-Se+1===ve)return Se*se}else Se!==-1&&(re-=re-Se),Se=-1}else for(k+ve>fe&&(k=fe-ve),re=k;re>=0;re--){for(var Ce=!0,Te=0;Te<ve;Te++)if(Ie(S,re+Te)!==Ie(T,Te)){Ce=!1;break}if(Ce)return re}return-1}function A(S,T,k,J){k=Number(k)||0;var K=S.length-k;J?(J=Number(J))>K&&(J=K):J=K;var re=T.length;if(re%2!=0)throw new TypeError("Invalid hex string");J>re/2&&(J=re/2);for(var se=0;se<J;++se){var fe=parseInt(T.substr(2*se,2),16);if(isNaN(fe))return se;S[k+se]=fe}return se}function d(S,T,k,J){return G(ne(T,S.length-k),S,k,J)}function I(S,T,k,J){return G(function(K){for(var re=[],se=0;se<K.length;++se)re.push(255&K.charCodeAt(se));return re}(T),S,k,J)}function $(S,T,k,J){return I(S,T,k,J)}function q(S,T,k,J){return G(Y(T),S,k,J)}function m(S,T,k,J){return G(function(K,re){for(var se,fe,ve,Ie=[],Se=0;Se<K.length&&!((re-=2)<0);++Se)se=K.charCodeAt(Se),fe=se>>8,ve=se%256,Ie.push(ve),Ie.push(fe);return Ie}(T,S.length-k),S,k,J)}function y(S,T,k){return T===0&&k===S.length?i.fromByteArray(S):i.fromByteArray(S.slice(T,k))}function C(S,T,k){k=Math.min(S.length,k);for(var J=[],K=T;K<k;){var re,se,fe,ve,Ie=S[K],Se=null,Ce=Ie>239?4:Ie>223?3:Ie>191?2:1;if(K+Ce<=k)switch(Ce){case 1:Ie<128&&(Se=Ie);break;case 2:(192&(re=S[K+1]))==128&&(ve=(31&Ie)<<6|63&re)>127&&(Se=ve);break;case 3:re=S[K+1],se=S[K+2],(192&re)==128&&(192&se)==128&&(ve=(15&Ie)<<12|(63&re)<<6|63&se)>2047&&(ve<55296||ve>57343)&&(Se=ve);break;case 4:re=S[K+1],se=S[K+2],fe=S[K+3],(192&re)==128&&(192&se)==128&&(192&fe)==128&&(ve=(15&Ie)<<18|(63&re)<<12|(63&se)<<6|63&fe)>65535&&ve<1114112&&(Se=ve)}Se===null?(Se=65533,Ce=1):Se>65535&&(Se-=65536,J.push(Se>>>10&1023|55296),Se=56320|1023&Se),J.push(Se),K+=Ce}return function(Te){var Re=Te.length;if(Re<=4096)return String.fromCharCode.apply(String,Te);for(var Be="",Ze=0;Ze<Re;)Be+=String.fromCharCode.apply(String,Te.slice(Ze,Ze+=4096));return Be}(J)}t.Buffer=u,t.SlowBuffer=function(S){return+S!=S&&(S=0),u.alloc(+S)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=r.TYPED_ARRAY_SUPPORT!==void 0?r.TYPED_ARRAY_SUPPORT:function(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42&&typeof S.subarray=="function"&&S.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(S){return S.__proto__=u.prototype,S},u.from=function(S,T,k){return f(null,S,T,k)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(S,T,k){return function(J,K,re,se){return E(K),K<=0?c(J,K):re!==void 0?typeof se=="string"?c(J,K).fill(re,se):c(J,K).fill(re):c(J,K)}(null,S,T,k)},u.allocUnsafe=function(S){return w(null,S)},u.allocUnsafeSlow=function(S){return w(null,S)},u.isBuffer=function(S){return!(S==null||!S._isBuffer)},u.compare=function(S,T){if(!u.isBuffer(S)||!u.isBuffer(T))throw new TypeError("Arguments must be Buffers");if(S===T)return 0;for(var k=S.length,J=T.length,K=0,re=Math.min(k,J);K<re;++K)if(S[K]!==T[K]){k=S[K],J=T[K];break}return k<J?-1:J<k?1:0},u.isEncoding=function(S){switch(String(S).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}},u.concat=function(S,T){if(!l(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return u.alloc(0);var k;if(T===void 0)for(T=0,k=0;k<S.length;++k)T+=S[k].length;var J=u.allocUnsafe(T),K=0;for(k=0;k<S.length;++k){var re=S[k];if(!u.isBuffer(re))throw new TypeError('"list" argument must be an Array of Buffers');re.copy(J,K),K+=re.length}return J},u.byteLength=b,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var S=this.length;if(S%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var T=0;T<S;T+=2)x(this,T,T+1);return this},u.prototype.swap32=function(){var S=this.length;if(S%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var T=0;T<S;T+=4)x(this,T,T+3),x(this,T+1,T+2);return this},u.prototype.swap64=function(){var S=this.length;if(S%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var T=0;T<S;T+=8)x(this,T,T+7),x(this,T+1,T+6),x(this,T+2,T+5),x(this,T+3,T+4);return this},u.prototype.toString=function(){var S=0|this.length;return S===0?"":arguments.length===0?C(this,0,S):R.apply(this,arguments)},u.prototype.equals=function(S){if(!u.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S||u.compare(this,S)===0},u.prototype.inspect=function(){var S="",T=t.INSPECT_MAX_BYTES;return this.length>0&&(S=this.toString("hex",0,T).match(/.{2}/g).join(" "),this.length>T&&(S+=" ... ")),"<Buffer "+S+">"},u.prototype.compare=function(S,T,k,J,K){if(!u.isBuffer(S))throw new TypeError("Argument must be a Buffer");if(T===void 0&&(T=0),k===void 0&&(k=S?S.length:0),J===void 0&&(J=0),K===void 0&&(K=this.length),T<0||k>S.length||J<0||K>this.length)throw new RangeError("out of range index");if(J>=K&&T>=k)return 0;if(J>=K)return-1;if(T>=k)return 1;if(this===S)return 0;for(var re=(K>>>=0)-(J>>>=0),se=(k>>>=0)-(T>>>=0),fe=Math.min(re,se),ve=this.slice(J,K),Ie=S.slice(T,k),Se=0;Se<fe;++Se)if(ve[Se]!==Ie[Se]){re=ve[Se],se=Ie[Se];break}return re<se?-1:se<re?1:0},u.prototype.includes=function(S,T,k){return this.indexOf(S,T,k)!==-1},u.prototype.indexOf=function(S,T,k){return F(this,S,T,k,!0)},u.prototype.lastIndexOf=function(S,T,k){return F(this,S,T,k,!1)},u.prototype.write=function(S,T,k,J){if(T===void 0)J="utf8",k=this.length,T=0;else if(k===void 0&&typeof T=="string")J=T,k=this.length,T=0;else{if(!isFinite(T))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");T|=0,isFinite(k)?(k|=0,J===void 0&&(J="utf8")):(J=k,k=void 0)}var K=this.length-T;if((k===void 0||k>K)&&(k=K),S.length>0&&(k<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");for(var re=!1;;)switch(J){case"hex":return A(this,S,T,k);case"utf8":case"utf-8":return d(this,S,T,k);case"ascii":return I(this,S,T,k);case"latin1":case"binary":return $(this,S,T,k);case"base64":return q(this,S,T,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,S,T,k);default:if(re)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),re=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(S,T,k){var J="";k=Math.min(S.length,k);for(var K=T;K<k;++K)J+=String.fromCharCode(127&S[K]);return J}function L(S,T,k){var J="";k=Math.min(S.length,k);for(var K=T;K<k;++K)J+=String.fromCharCode(S[K]);return J}function z(S,T,k){var J=S.length;(!T||T<0)&&(T=0),(!k||k<0||k>J)&&(k=J);for(var K="",re=T;re<k;++re)K+=ee(S[re]);return K}function B(S,T,k){for(var J=S.slice(T,k),K="",re=0;re<J.length;re+=2)K+=String.fromCharCode(J[re]+256*J[re+1]);return K}function N(S,T,k){if(S%1!=0||S<0)throw new RangeError("offset is not uint");if(S+T>k)throw new RangeError("Trying to access beyond buffer length")}function P(S,T,k,J,K,re){if(!u.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>K||T<re)throw new RangeError('"value" argument is out of bounds');if(k+J>S.length)throw new RangeError("Index out of range")}function W(S,T,k,J){T<0&&(T=65535+T+1);for(var K=0,re=Math.min(S.length-k,2);K<re;++K)S[k+K]=(T&255<<8*(J?K:1-K))>>>8*(J?K:1-K)}function O(S,T,k,J){T<0&&(T=4294967295+T+1);for(var K=0,re=Math.min(S.length-k,4);K<re;++K)S[k+K]=T>>>8*(J?K:3-K)&255}function p(S,T,k,J,K,re){if(k+J>S.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function U(S,T,k,J,K){return K||p(S,0,k,4),s.write(S,T,k,J,23,4),k+4}function V(S,T,k,J,K){return K||p(S,0,k,8),s.write(S,T,k,J,52,8),k+8}u.prototype.slice=function(S,T){var k,J=this.length;if((S=~~S)<0?(S+=J)<0&&(S=0):S>J&&(S=J),(T=T===void 0?J:~~T)<0?(T+=J)<0&&(T=0):T>J&&(T=J),T<S&&(T=S),u.TYPED_ARRAY_SUPPORT)(k=this.subarray(S,T)).__proto__=u.prototype;else{var K=T-S;k=new u(K,void 0);for(var re=0;re<K;++re)k[re]=this[re+S]}return k},u.prototype.readUIntLE=function(S,T,k){S|=0,T|=0,k||N(S,T,this.length);for(var J=this[S],K=1,re=0;++re<T&&(K*=256);)J+=this[S+re]*K;return J},u.prototype.readUIntBE=function(S,T,k){S|=0,T|=0,k||N(S,T,this.length);for(var J=this[S+--T],K=1;T>0&&(K*=256);)J+=this[S+--T]*K;return J},u.prototype.readUInt8=function(S,T){return T||N(S,1,this.length),this[S]},u.prototype.readUInt16LE=function(S,T){return T||N(S,2,this.length),this[S]|this[S+1]<<8},u.prototype.readUInt16BE=function(S,T){return T||N(S,2,this.length),this[S]<<8|this[S+1]},u.prototype.readUInt32LE=function(S,T){return T||N(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},u.prototype.readUInt32BE=function(S,T){return T||N(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},u.prototype.readIntLE=function(S,T,k){S|=0,T|=0,k||N(S,T,this.length);for(var J=this[S],K=1,re=0;++re<T&&(K*=256);)J+=this[S+re]*K;return J>=(K*=128)&&(J-=Math.pow(2,8*T)),J},u.prototype.readIntBE=function(S,T,k){S|=0,T|=0,k||N(S,T,this.length);for(var J=T,K=1,re=this[S+--J];J>0&&(K*=256);)re+=this[S+--J]*K;return re>=(K*=128)&&(re-=Math.pow(2,8*T)),re},u.prototype.readInt8=function(S,T){return T||N(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},u.prototype.readInt16LE=function(S,T){T||N(S,2,this.length);var k=this[S]|this[S+1]<<8;return 32768&k?4294901760|k:k},u.prototype.readInt16BE=function(S,T){T||N(S,2,this.length);var k=this[S+1]|this[S]<<8;return 32768&k?4294901760|k:k},u.prototype.readInt32LE=function(S,T){return T||N(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},u.prototype.readInt32BE=function(S,T){return T||N(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},u.prototype.readFloatLE=function(S,T){return T||N(S,4,this.length),s.read(this,S,!0,23,4)},u.prototype.readFloatBE=function(S,T){return T||N(S,4,this.length),s.read(this,S,!1,23,4)},u.prototype.readDoubleLE=function(S,T){return T||N(S,8,this.length),s.read(this,S,!0,52,8)},u.prototype.readDoubleBE=function(S,T){return T||N(S,8,this.length),s.read(this,S,!1,52,8)},u.prototype.writeUIntLE=function(S,T,k,J){S=+S,T|=0,k|=0,J||P(this,S,T,k,Math.pow(2,8*k)-1,0);var K=1,re=0;for(this[T]=255&S;++re<k&&(K*=256);)this[T+re]=S/K&255;return T+k},u.prototype.writeUIntBE=function(S,T,k,J){S=+S,T|=0,k|=0,J||P(this,S,T,k,Math.pow(2,8*k)-1,0);var K=k-1,re=1;for(this[T+K]=255&S;--K>=0&&(re*=256);)this[T+K]=S/re&255;return T+k},u.prototype.writeUInt8=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,1,255,0),u.TYPED_ARRAY_SUPPORT||(S=Math.floor(S)),this[T]=255&S,T+1},u.prototype.writeUInt16LE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[T]=255&S,this[T+1]=S>>>8):W(this,S,T,!0),T+2},u.prototype.writeUInt16BE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[T]=S>>>8,this[T+1]=255&S):W(this,S,T,!1),T+2},u.prototype.writeUInt32LE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[T+3]=S>>>24,this[T+2]=S>>>16,this[T+1]=S>>>8,this[T]=255&S):O(this,S,T,!0),T+4},u.prototype.writeUInt32BE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=255&S):O(this,S,T,!1),T+4},u.prototype.writeIntLE=function(S,T,k,J){if(S=+S,T|=0,!J){var K=Math.pow(2,8*k-1);P(this,S,T,k,K-1,-K)}var re=0,se=1,fe=0;for(this[T]=255&S;++re<k&&(se*=256);)S<0&&fe===0&&this[T+re-1]!==0&&(fe=1),this[T+re]=(S/se>>0)-fe&255;return T+k},u.prototype.writeIntBE=function(S,T,k,J){if(S=+S,T|=0,!J){var K=Math.pow(2,8*k-1);P(this,S,T,k,K-1,-K)}var re=k-1,se=1,fe=0;for(this[T+re]=255&S;--re>=0&&(se*=256);)S<0&&fe===0&&this[T+re+1]!==0&&(fe=1),this[T+re]=(S/se>>0)-fe&255;return T+k},u.prototype.writeInt8=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,1,127,-128),u.TYPED_ARRAY_SUPPORT||(S=Math.floor(S)),S<0&&(S=255+S+1),this[T]=255&S,T+1},u.prototype.writeInt16LE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[T]=255&S,this[T+1]=S>>>8):W(this,S,T,!0),T+2},u.prototype.writeInt16BE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[T]=S>>>8,this[T+1]=255&S):W(this,S,T,!1),T+2},u.prototype.writeInt32LE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[T]=255&S,this[T+1]=S>>>8,this[T+2]=S>>>16,this[T+3]=S>>>24):O(this,S,T,!0),T+4},u.prototype.writeInt32BE=function(S,T,k){return S=+S,T|=0,k||P(this,S,T,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),u.TYPED_ARRAY_SUPPORT?(this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=255&S):O(this,S,T,!1),T+4},u.prototype.writeFloatLE=function(S,T,k){return U(this,S,T,!0,k)},u.prototype.writeFloatBE=function(S,T,k){return U(this,S,T,!1,k)},u.prototype.writeDoubleLE=function(S,T,k){return V(this,S,T,!0,k)},u.prototype.writeDoubleBE=function(S,T,k){return V(this,S,T,!1,k)},u.prototype.copy=function(S,T,k,J){if(k||(k=0),J||J===0||(J=this.length),T>=S.length&&(T=S.length),T||(T=0),J>0&&J<k&&(J=k),J===k||S.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=this.length)throw new RangeError("sourceStart out of bounds");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),S.length-T<J-k&&(J=S.length-T+k);var K,re=J-k;if(this===S&&k<T&&T<J)for(K=re-1;K>=0;--K)S[K+T]=this[K+k];else if(re<1e3||!u.TYPED_ARRAY_SUPPORT)for(K=0;K<re;++K)S[K+T]=this[K+k];else Uint8Array.prototype.set.call(S,this.subarray(k,k+re),T);return re},u.prototype.fill=function(S,T,k,J){if(typeof S=="string"){if(typeof T=="string"?(J=T,T=0,k=this.length):typeof k=="string"&&(J=k,k=this.length),S.length===1){var K=S.charCodeAt(0);K<256&&(S=K)}if(J!==void 0&&typeof J!="string")throw new TypeError("encoding must be a string");if(typeof J=="string"&&!u.isEncoding(J))throw new TypeError("Unknown encoding: "+J)}else typeof S=="number"&&(S&=255);if(T<0||this.length<T||this.length<k)throw new RangeError("Out of range index");if(k<=T)return this;var re;if(T>>>=0,k=k===void 0?this.length:k>>>0,S||(S=0),typeof S=="number")for(re=T;re<k;++re)this[re]=S;else{var se=u.isBuffer(S)?S:ne(new u(S,J).toString()),fe=se.length;for(re=0;re<k-T;++re)this[re+T]=se[re%fe]}return this};var Q=/[^+\/0-9A-Za-z-_]/g;function ee(S){return S<16?"0"+S.toString(16):S.toString(16)}function ne(S,T){var k;T=T||1/0;for(var J=S.length,K=null,re=[],se=0;se<J;++se){if((k=S.charCodeAt(se))>55295&&k<57344){if(!K){if(k>56319){(T-=3)>-1&&re.push(239,191,189);continue}if(se+1===J){(T-=3)>-1&&re.push(239,191,189);continue}K=k;continue}if(k<56320){(T-=3)>-1&&re.push(239,191,189),K=k;continue}k=65536+(K-55296<<10|k-56320)}else K&&(T-=3)>-1&&re.push(239,191,189);if(K=null,k<128){if((T-=1)<0)break;re.push(k)}else if(k<2048){if((T-=2)<0)break;re.push(k>>6|192,63&k|128)}else if(k<65536){if((T-=3)<0)break;re.push(k>>12|224,k>>6&63|128,63&k|128)}else{if(!(k<1114112))throw new Error("Invalid code point");if((T-=4)<0)break;re.push(k>>18|240,k>>12&63|128,k>>6&63|128,63&k|128)}}return re}function Y(S){return i.toByteArray(function(T){if((T=function(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}(T).replace(Q,"")).length<2)return"";for(;T.length%4!=0;)T+="=";return T}(S))}function G(S,T,k,J){for(var K=0;K<J&&!(K+k>=T.length||K>=S.length);++K)T[K+k]=S[K];return K}}).call(this,n(6))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){r&&(n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(n,r){if(r){n.super_=r;var i=function(){};i.prototype=r.prototype,n.prototype=new i,n.prototype.constructor=n}}},function(e,t,n){n.d(t,"a",function(){return r});const r=i=>new Promise(s=>setTimeout(s,i||0))},function(e,t,n){var r=n(99),i=r,s=Function("return this")(),l=n(98);i.object.extend(proto,l),i.exportSymbol("proto.v1.signaling.api.CreatePeerRequest",null,s),i.exportSymbol("proto.v1.signaling.api.CreatePeerResponse",null,s),i.exportSymbol("proto.v1.signaling.api.DeletePeerRequest",null,s),i.exportSymbol("proto.v1.signaling.api.DeletePeerResponse",null,s),i.exportSymbol("proto.v1.signaling.api.GetHealthRequest",null,s),i.exportSymbol("proto.v1.signaling.api.GetHealthResponse",null,s),i.exportSymbol("proto.v1.signaling.api.GetIceServersRequest",null,s),i.exportSymbol("proto.v1.signaling.api.GetIceServersResponse",null,s),i.exportSymbol("proto.v1.signaling.api.GetPeersRequest",null,s),i.exportSymbol("proto.v1.signaling.api.GetPeersResponse",null,s),i.exportSymbol("proto.v1.signaling.api.Peer",null,s),i.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamRequest",null,s),i.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamResponse",null,s),i.exportSymbol("proto.v1.signaling.api.RefreshPeerRequest",null,s),i.exportSymbol("proto.v1.signaling.api.RefreshPeerResponse",null,s),i.exportSymbol("proto.v1.signaling.api.SendSignalRequest",null,s),i.exportSymbol("proto.v1.signaling.api.SendSignalResponse",null,s),i.exportSymbol("proto.v1.signaling.api.SessionType",null,s),i.exportSymbol("proto.v1.signaling.api.Signal",null,s),proto.v1.signaling.api.Peer=function(o){r.Message.initialize(this,o,0,-1,proto.v1.signaling.api.Peer.repeatedFields_,null)},i.inherits(proto.v1.signaling.api.Peer,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Peer.displayName="proto.v1.signaling.api.Peer"),proto.v1.signaling.api.Signal=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.Signal,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Signal.displayName="proto.v1.signaling.api.Signal"),proto.v1.signaling.api.GetHealthRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetHealthRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetHealthRequest.displayName="proto.v1.signaling.api.GetHealthRequest"),proto.v1.signaling.api.GetHealthResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetHealthResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetHealthResponse.displayName="proto.v1.signaling.api.GetHealthResponse"),proto.v1.signaling.api.CreatePeerRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.CreatePeerRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerRequest.displayName="proto.v1.signaling.api.CreatePeerRequest"),proto.v1.signaling.api.CreatePeerResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.CreatePeerResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerResponse.displayName="proto.v1.signaling.api.CreatePeerResponse"),proto.v1.signaling.api.DeletePeerRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.DeletePeerRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerRequest.displayName="proto.v1.signaling.api.DeletePeerRequest"),proto.v1.signaling.api.DeletePeerResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.DeletePeerResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerResponse.displayName="proto.v1.signaling.api.DeletePeerResponse"),proto.v1.signaling.api.RefreshPeerRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.RefreshPeerRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerRequest.displayName="proto.v1.signaling.api.RefreshPeerRequest"),proto.v1.signaling.api.RefreshPeerResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.RefreshPeerResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerResponse.displayName="proto.v1.signaling.api.RefreshPeerResponse"),proto.v1.signaling.api.GetPeersRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetPeersRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersRequest.displayName="proto.v1.signaling.api.GetPeersRequest"),proto.v1.signaling.api.GetPeersResponse=function(o){r.Message.initialize(this,o,0,-1,proto.v1.signaling.api.GetPeersResponse.repeatedFields_,null)},i.inherits(proto.v1.signaling.api.GetPeersResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersResponse.displayName="proto.v1.signaling.api.GetPeersResponse"),proto.v1.signaling.api.GetIceServersRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetIceServersRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersRequest.displayName="proto.v1.signaling.api.GetIceServersRequest"),proto.v1.signaling.api.GetIceServersResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetIceServersResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersResponse.displayName="proto.v1.signaling.api.GetIceServersResponse"),proto.v1.signaling.api.SendSignalRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.SendSignalRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalRequest.displayName="proto.v1.signaling.api.SendSignalRequest"),proto.v1.signaling.api.SendSignalResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.SendSignalResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalResponse.displayName="proto.v1.signaling.api.SendSignalResponse"),proto.v1.signaling.api.ReceiveSignalStreamRequest=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.ReceiveSignalStreamRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.displayName="proto.v1.signaling.api.ReceiveSignalStreamRequest"),proto.v1.signaling.api.ReceiveSignalStreamResponse=function(o){r.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.ReceiveSignalStreamResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.displayName="proto.v1.signaling.api.ReceiveSignalStreamResponse"),proto.v1.signaling.api.Peer.repeatedFields_=[5],r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Peer.prototype.toObject=function(o){return proto.v1.signaling.api.Peer.toObject(o,this)},proto.v1.signaling.api.Peer.toObject=function(o,c){var u,f={peerId:r.Message.getFieldWithDefault(c,1,""),organizationId:r.Message.getFieldWithDefault(c,2,""),userId:(u=c.getUserId())&&l.StringValue.toObject(o,u),deviceId:(u=c.getDeviceId())&&l.StringValue.toObject(o,u),sessionIdsList:(u=r.Message.getRepeatedField(c,5))==null?void 0:u,peerCreatedTimestamp:(u=c.getPeerCreatedTimestamp())&&l.Int64Value.toObject(o,u)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.Peer.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.Peer;return proto.v1.signaling.api.Peer.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Peer.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();o.setPeerId(u);break;case 2:u=c.readString(),o.setOrganizationId(u);break;case 3:u=new l.StringValue,c.readMessage(u,l.StringValue.deserializeBinaryFromReader),o.setUserId(u);break;case 4:u=new l.StringValue,c.readMessage(u,l.StringValue.deserializeBinaryFromReader),o.setDeviceId(u);break;case 5:u=c.readString(),o.addSessionIds(u);break;case 6:u=new l.Int64Value,c.readMessage(u,l.Int64Value.deserializeBinaryFromReader),o.setPeerCreatedTimestamp(u);break;default:c.skipField()}return o},proto.v1.signaling.api.Peer.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.Peer.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.Peer.serializeBinaryToWriter=function(o,c){var u=void 0;(u=o.getPeerId()).length>0&&c.writeString(1,u),(u=o.getOrganizationId()).length>0&&c.writeString(2,u),(u=o.getUserId())!=null&&c.writeMessage(3,u,l.StringValue.serializeBinaryToWriter),(u=o.getDeviceId())!=null&&c.writeMessage(4,u,l.StringValue.serializeBinaryToWriter),(u=o.getSessionIdsList()).length>0&&c.writeRepeatedString(5,u),(u=o.getPeerCreatedTimestamp())!=null&&c.writeMessage(6,u,l.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.Peer.prototype.getPeerId=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.Peer.prototype.setPeerId=function(o){return r.Message.setProto3StringField(this,1,o)},proto.v1.signaling.api.Peer.prototype.getOrganizationId=function(){return r.Message.getFieldWithDefault(this,2,"")},proto.v1.signaling.api.Peer.prototype.setOrganizationId=function(o){return r.Message.setProto3StringField(this,2,o)},proto.v1.signaling.api.Peer.prototype.getUserId=function(){return r.Message.getWrapperField(this,l.StringValue,3)},proto.v1.signaling.api.Peer.prototype.setUserId=function(o){return r.Message.setWrapperField(this,3,o)},proto.v1.signaling.api.Peer.prototype.clearUserId=function(){return this.setUserId(void 0)},proto.v1.signaling.api.Peer.prototype.hasUserId=function(){return r.Message.getField(this,3)!=null},proto.v1.signaling.api.Peer.prototype.getDeviceId=function(){return r.Message.getWrapperField(this,l.StringValue,4)},proto.v1.signaling.api.Peer.prototype.setDeviceId=function(o){return r.Message.setWrapperField(this,4,o)},proto.v1.signaling.api.Peer.prototype.clearDeviceId=function(){return this.setDeviceId(void 0)},proto.v1.signaling.api.Peer.prototype.hasDeviceId=function(){return r.Message.getField(this,4)!=null},proto.v1.signaling.api.Peer.prototype.getSessionIdsList=function(){return r.Message.getRepeatedField(this,5)},proto.v1.signaling.api.Peer.prototype.setSessionIdsList=function(o){return r.Message.setField(this,5,o||[])},proto.v1.signaling.api.Peer.prototype.addSessionIds=function(o,c){return r.Message.addToRepeatedField(this,5,o,c)},proto.v1.signaling.api.Peer.prototype.clearSessionIdsList=function(){return this.setSessionIdsList([])},proto.v1.signaling.api.Peer.prototype.getPeerCreatedTimestamp=function(){return r.Message.getWrapperField(this,l.Int64Value,6)},proto.v1.signaling.api.Peer.prototype.setPeerCreatedTimestamp=function(o){return r.Message.setWrapperField(this,6,o)},proto.v1.signaling.api.Peer.prototype.clearPeerCreatedTimestamp=function(){return this.setPeerCreatedTimestamp(void 0)},proto.v1.signaling.api.Peer.prototype.hasPeerCreatedTimestamp=function(){return r.Message.getField(this,6)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Signal.prototype.toObject=function(o){return proto.v1.signaling.api.Signal.toObject(o,this)},proto.v1.signaling.api.Signal.toObject=function(o,c){var u,f={sessionId:(u=c.getSessionId())&&l.StringValue.toObject(o,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&l.Int64Value.toObject(o,u),senderId:r.Message.getFieldWithDefault(c,3,""),receiverId:r.Message.getFieldWithDefault(c,4,""),payload:r.Message.getFieldWithDefault(c,5,""),iceServers:r.Message.getFieldWithDefault(c,6,""),iceTransportPolicy:r.Message.getFieldWithDefault(c,7,""),sessionType:r.Message.getFieldWithDefault(c,8,0)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.Signal.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.Signal;return proto.v1.signaling.api.Signal.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Signal.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new l.StringValue;c.readMessage(u,l.StringValue.deserializeBinaryFromReader),o.setSessionId(u);break;case 2:u=new l.Int64Value,c.readMessage(u,l.Int64Value.deserializeBinaryFromReader),o.setSessionCreatedTimestamp(u);break;case 3:u=c.readString(),o.setSenderId(u);break;case 4:u=c.readString(),o.setReceiverId(u);break;case 5:u=c.readString(),o.setPayload(u);break;case 6:u=c.readString(),o.setIceServers(u);break;case 7:u=c.readString(),o.setIceTransportPolicy(u);break;case 8:u=c.readEnum(),o.setSessionType(u);break;default:c.skipField()}return o},proto.v1.signaling.api.Signal.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.Signal.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.Signal.serializeBinaryToWriter=function(o,c){var u=void 0;(u=o.getSessionId())!=null&&c.writeMessage(1,u,l.StringValue.serializeBinaryToWriter),(u=o.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,l.Int64Value.serializeBinaryToWriter),(u=o.getSenderId()).length>0&&c.writeString(3,u),(u=o.getReceiverId()).length>0&&c.writeString(4,u),(u=o.getPayload()).length>0&&c.writeString(5,u),(u=o.getIceServers()).length>0&&c.writeString(6,u),(u=o.getIceTransportPolicy()).length>0&&c.writeString(7,u),(u=o.getSessionType())!==0&&c.writeEnum(8,u)},proto.v1.signaling.api.Signal.prototype.getSessionId=function(){return r.Message.getWrapperField(this,l.StringValue,1)},proto.v1.signaling.api.Signal.prototype.setSessionId=function(o){return r.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.Signal.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionId=function(){return r.Message.getField(this,1)!=null},proto.v1.signaling.api.Signal.prototype.getSessionCreatedTimestamp=function(){return r.Message.getWrapperField(this,l.Int64Value,2)},proto.v1.signaling.api.Signal.prototype.setSessionCreatedTimestamp=function(o){return r.Message.setWrapperField(this,2,o)},proto.v1.signaling.api.Signal.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionCreatedTimestamp=function(){return r.Message.getField(this,2)!=null},proto.v1.signaling.api.Signal.prototype.getSenderId=function(){return r.Message.getFieldWithDefault(this,3,"")},proto.v1.signaling.api.Signal.prototype.setSenderId=function(o){return r.Message.setProto3StringField(this,3,o)},proto.v1.signaling.api.Signal.prototype.getReceiverId=function(){return r.Message.getFieldWithDefault(this,4,"")},proto.v1.signaling.api.Signal.prototype.setReceiverId=function(o){return r.Message.setProto3StringField(this,4,o)},proto.v1.signaling.api.Signal.prototype.getPayload=function(){return r.Message.getFieldWithDefault(this,5,"")},proto.v1.signaling.api.Signal.prototype.setPayload=function(o){return r.Message.setProto3StringField(this,5,o)},proto.v1.signaling.api.Signal.prototype.getIceServers=function(){return r.Message.getFieldWithDefault(this,6,"")},proto.v1.signaling.api.Signal.prototype.setIceServers=function(o){return r.Message.setProto3StringField(this,6,o)},proto.v1.signaling.api.Signal.prototype.getIceTransportPolicy=function(){return r.Message.getFieldWithDefault(this,7,"")},proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy=function(o){return r.Message.setProto3StringField(this,7,o)},proto.v1.signaling.api.Signal.prototype.getSessionType=function(){return r.Message.getFieldWithDefault(this,8,0)},proto.v1.signaling.api.Signal.prototype.setSessionType=function(o){return r.Message.setProto3EnumField(this,8,o)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetHealthRequest.prototype.toObject=function(o){return proto.v1.signaling.api.GetHealthRequest.toObject(o,this)},proto.v1.signaling.api.GetHealthRequest.toObject=function(o,c){var u={};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetHealthRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.GetHealthRequest;return proto.v1.signaling.api.GetHealthRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetHealthRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return o},proto.v1.signaling.api.GetHealthRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.GetHealthRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetHealthRequest.serializeBinaryToWriter=function(o,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetHealthResponse.prototype.toObject=function(o){return proto.v1.signaling.api.GetHealthResponse.toObject(o,this)},proto.v1.signaling.api.GetHealthResponse.toObject=function(o,c){var u={version:r.Message.getFieldWithDefault(c,1,"")};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetHealthResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.GetHealthResponse;return proto.v1.signaling.api.GetHealthResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetHealthResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();o.setVersion(u);break;default:c.skipField()}return o},proto.v1.signaling.api.GetHealthResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.GetHealthResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetHealthResponse.serializeBinaryToWriter=function(o,c){var u;(u=o.getVersion()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.GetHealthResponse.prototype.getVersion=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetHealthResponse.prototype.setVersion=function(o){return r.Message.setProto3StringField(this,1,o)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerRequest.prototype.toObject=function(o){return proto.v1.signaling.api.CreatePeerRequest.toObject(o,this)},proto.v1.signaling.api.CreatePeerRequest.toObject=function(o,c){var u={};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.CreatePeerRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.CreatePeerRequest;return proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return o},proto.v1.signaling.api.CreatePeerRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter=function(o,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerResponse.prototype.toObject=function(o){return proto.v1.signaling.api.CreatePeerResponse.toObject(o,this)},proto.v1.signaling.api.CreatePeerResponse.toObject=function(o,c){var u,f={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(o,u)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.CreatePeerResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.CreatePeerResponse;return proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),o.setPeer(u);break;default:c.skipField()}return o},proto.v1.signaling.api.CreatePeerResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter=function(o,c){var u;(u=o.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.CreatePeerResponse.prototype.getPeer=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.CreatePeerResponse.prototype.setPeer=function(o){return r.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.CreatePeerResponse.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.CreatePeerResponse.prototype.hasPeer=function(){return r.Message.getField(this,1)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerRequest.prototype.toObject=function(o){return proto.v1.signaling.api.DeletePeerRequest.toObject(o,this)},proto.v1.signaling.api.DeletePeerRequest.toObject=function(o,c){var u={peerId:r.Message.getFieldWithDefault(c,1,"")};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.DeletePeerRequest;return proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();o.setPeerId(u);break;default:c.skipField()}return o},proto.v1.signaling.api.DeletePeerRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter=function(o,c){var u;(u=o.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.DeletePeerRequest.prototype.getPeerId=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.DeletePeerRequest.prototype.setPeerId=function(o){return r.Message.setProto3StringField(this,1,o)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerResponse.prototype.toObject=function(o){return proto.v1.signaling.api.DeletePeerResponse.toObject(o,this)},proto.v1.signaling.api.DeletePeerResponse.toObject=function(o,c){var u={};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.DeletePeerResponse;return proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return o},proto.v1.signaling.api.DeletePeerResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter=function(o,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerRequest.prototype.toObject=function(o){return proto.v1.signaling.api.RefreshPeerRequest.toObject(o,this)},proto.v1.signaling.api.RefreshPeerRequest.toObject=function(o,c){var u,f={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(o,u)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.RefreshPeerRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.RefreshPeerRequest;return proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),o.setPeer(u);break;default:c.skipField()}return o},proto.v1.signaling.api.RefreshPeerRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter=function(o,c){var u;(u=o.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.RefreshPeerRequest.prototype.getPeer=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.RefreshPeerRequest.prototype.setPeer=function(o){return r.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.RefreshPeerRequest.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.RefreshPeerRequest.prototype.hasPeer=function(){return r.Message.getField(this,1)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerResponse.prototype.toObject=function(o){return proto.v1.signaling.api.RefreshPeerResponse.toObject(o,this)},proto.v1.signaling.api.RefreshPeerResponse.toObject=function(o,c){var u={};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.RefreshPeerResponse;return proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return o},proto.v1.signaling.api.RefreshPeerResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter=function(o,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersRequest.prototype.toObject=function(o){return proto.v1.signaling.api.GetPeersRequest.toObject(o,this)},proto.v1.signaling.api.GetPeersRequest.toObject=function(o,c){var u={};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.GetPeersRequest;return proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return o},proto.v1.signaling.api.GetPeersRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter=function(o,c){},proto.v1.signaling.api.GetPeersResponse.repeatedFields_=[1],r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersResponse.prototype.toObject=function(o){return proto.v1.signaling.api.GetPeersResponse.toObject(o,this)},proto.v1.signaling.api.GetPeersResponse.toObject=function(o,c){var u={peersList:r.Message.toObjectList(c.getPeersList(),proto.v1.signaling.api.Peer.toObject,o)};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.GetPeersResponse;return proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),o.addPeers(u);break;default:c.skipField()}return o},proto.v1.signaling.api.GetPeersResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter=function(o,c){var u;(u=o.getPeersList()).length>0&&c.writeRepeatedMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.GetPeersResponse.prototype.getPeersList=function(){return r.Message.getRepeatedWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.GetPeersResponse.prototype.setPeersList=function(o){return r.Message.setRepeatedWrapperField(this,1,o)},proto.v1.signaling.api.GetPeersResponse.prototype.addPeers=function(o,c){return r.Message.addToRepeatedWrapperField(this,1,o,proto.v1.signaling.api.Peer,c)},proto.v1.signaling.api.GetPeersResponse.prototype.clearPeersList=function(){return this.setPeersList([])},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersRequest.prototype.toObject=function(o){return proto.v1.signaling.api.GetIceServersRequest.toObject(o,this)},proto.v1.signaling.api.GetIceServersRequest.toObject=function(o,c){var u={};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.GetIceServersRequest;return proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return o},proto.v1.signaling.api.GetIceServersRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter=function(o,c){},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersResponse.prototype.toObject=function(o){return proto.v1.signaling.api.GetIceServersResponse.toObject(o,this)},proto.v1.signaling.api.GetIceServersResponse.toObject=function(o,c){var u={iceServers:r.Message.getFieldWithDefault(c,1,"")};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.GetIceServersResponse;return proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();o.setIceServers(u);break;default:c.skipField()}return o},proto.v1.signaling.api.GetIceServersResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter=function(o,c){var u;(u=o.getIceServers()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.GetIceServersResponse.prototype.getIceServers=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetIceServersResponse.prototype.setIceServers=function(o){return r.Message.setProto3StringField(this,1,o)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalRequest.prototype.toObject=function(o){return proto.v1.signaling.api.SendSignalRequest.toObject(o,this)},proto.v1.signaling.api.SendSignalRequest.toObject=function(o,c){var u,f={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(o,u)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.SendSignalRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.SendSignalRequest;return proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),o.setSignal(u);break;default:c.skipField()}return o},proto.v1.signaling.api.SendSignalRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter=function(o,c){var u;(u=o.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalRequest.prototype.getSignal=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.SendSignalRequest.prototype.setSignal=function(o){return r.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.SendSignalRequest.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.SendSignalRequest.prototype.hasSignal=function(){return r.Message.getField(this,1)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalResponse.prototype.toObject=function(o){return proto.v1.signaling.api.SendSignalResponse.toObject(o,this)},proto.v1.signaling.api.SendSignalResponse.toObject=function(o,c){var u,f={sessionId:(u=c.getSessionId())&&l.StringValue.toObject(o,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&l.Int64Value.toObject(o,u)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.SendSignalResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.SendSignalResponse;return proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new l.StringValue;c.readMessage(u,l.StringValue.deserializeBinaryFromReader),o.setSessionId(u);break;case 2:u=new l.Int64Value,c.readMessage(u,l.Int64Value.deserializeBinaryFromReader),o.setSessionCreatedTimestamp(u);break;default:c.skipField()}return o},proto.v1.signaling.api.SendSignalResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter=function(o,c){var u=void 0;(u=o.getSessionId())!=null&&c.writeMessage(1,u,l.StringValue.serializeBinaryToWriter),(u=o.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,l.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionId=function(){return r.Message.getWrapperField(this,l.StringValue,1)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionId=function(o){return r.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionId=function(){return r.Message.getField(this,1)!=null},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionCreatedTimestamp=function(){return r.Message.getWrapperField(this,l.Int64Value,2)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionCreatedTimestamp=function(o){return r.Message.setWrapperField(this,2,o)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionCreatedTimestamp=function(){return r.Message.getField(this,2)!=null},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.toObject=function(o){return proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject(o,this)},proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject=function(o,c){var u={peerId:r.Message.getFieldWithDefault(c,1,"")};return o&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.ReceiveSignalStreamRequest;return proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();o.setPeerId(u);break;default:c.skipField()}return o},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter=function(o,c){var u;(u=o.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.getPeerId=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.setPeerId=function(o){return r.Message.setProto3StringField(this,1,o)},r.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.toObject=function(o){return proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject(o,this)},proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject=function(o,c){var u,f={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(o,u)};return o&&(f.$jspbMessageInstance=c),f}),proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary=function(o){var c=new r.BinaryReader(o),u=new proto.v1.signaling.api.ReceiveSignalStreamResponse;return proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader=function(o,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),o.setSignal(u);break;default:c.skipField()}return o},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.serializeBinary=function(){var o=new r.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter=function(o,c){var u;(u=o.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.getSignal=function(){return r.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.setSignal=function(o){return r.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal=function(){return r.Message.getField(this,1)!=null},proto.v1.signaling.api.SessionType={UNKNOWN:0,TELEOP:1,PORT_FORWARD:2,OBSERVE:3},i.object.extend(t,proto.v1.signaling.api)},function(e,t,n){function r(i,s,l=()=>!0){if(i instanceof s&&l(i))return i;throw i}n.d(t,"a",function(){return r})},function(e,t,n){n.d(t,"a",function(){return i});var r=n(34);class i extends Error{constructor(l,o,c,u,f={},E){super(`Unexpected response (${c}) for ${l} ${o}: ${JSON.stringify(E?Object(r.a)([...E.entries()].reduce((w,[h,g])=>(w[h]=g,w),{})):{})} -- ${JSON.stringify(Object(r.a)(u))}`),this.method=l,this.url=o,this.statusCode=c,this.body=u,this.validationErrors=f,this.headers=E}}},function(e,t,n){function r(w){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(w)}function i(w,h){return!h||r(h)!=="object"&&typeof h!="function"?s(w):h}function s(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function l(w){var h=typeof Map=="function"?new Map:void 0;return(l=function(g){if(g===null||(b=g,Function.toString.call(b).indexOf("[native code]")===-1))return g;var b;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(h!==void 0){if(h.has(g))return h.get(g);h.set(g,R)}function R(){return o(g,arguments,f(this).constructor)}return R.prototype=Object.create(g.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),u(R,g)})(w)}function o(w,h,g){return(o=c()?Reflect.construct:function(b,R,x){var F=[null];F.push.apply(F,R);var M=new(Function.bind.apply(b,F));return x&&u(M,x.prototype),M}).apply(null,arguments)}function c(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function u(w,h){return(u=Object.setPrototypeOf||function(g,b){return g.__proto__=b,g})(w,h)}function f(w){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)})(w)}var E=function(w){(function(x,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(F&&F.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),F&&u(x,F)})(R,w);var h,g,b=(h=R,g=c(),function(){var x,F=f(h);if(g){var M=f(this).constructor;x=Reflect.construct(F,arguments,M)}else x=F.apply(this,arguments);return i(this,x)});function R(x){var F;return function(M,A){if(!(M instanceof A))throw new TypeError("Cannot call a class as a function")}(this,R),F=b.call(this,`Format functions must be synchronous taking a two arguments: (info, opts)
8
+ Found: `.concat(x.toString().split(`
4
9
  `)[0],`
5
- `)),Error.captureStackTrace(l(V),T),V}return T}(s(Error));e.exports=function(E){if(E.length>2)throw new R(E);function y(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=_}function g(_){return new y(_)}return y.prototype.transform=E,g.Format=y,g}},function(e,t,n){(function(r){var o=Object.getOwnPropertyDescriptors||function(I){for(var N=Object.keys(I),k={},w=0;w<N.length;w++)k[N[w]]=Object.getOwnPropertyDescriptor(I,N[w]);return k},l=/%[sdj%]/g;t.format=function(I){if(!V(I)){for(var N=[],k=0;k<arguments.length;k++)N.push(c(arguments[k]));return N.join(" ")}k=1;for(var w=arguments,h=w.length,B=String(I).replace(l,function(X){if(X==="%%")return"%";if(k>=h)return X;switch(X){case"%s":return String(w[k++]);case"%d":return Number(w[k++]);case"%j":try{return JSON.stringify(w[k++])}catch{return"[Circular]"}default:return X}}),z=w[k];k<h;z=w[++k])T(z)||!f(z)?B+=" "+z:B+=" "+c(z);return B},t.deprecate=function(I,N){if(r!==void 0&&r.noDeprecation===!0)return I;if(r===void 0)return function(){return t.deprecate(I,N).apply(this,arguments)};var k=!1;return function(){if(!k){if(r.throwDeprecation)throw new Error(N);r.traceDeprecation?console.trace(N):console.error(N),k=!0}return I.apply(this,arguments)}};var s,i={};function c(I,N){var k={seen:[],stylize:m};return arguments.length>=3&&(k.depth=arguments[2]),arguments.length>=4&&(k.colors=arguments[3]),_(N)?k.showHidden=N:N&&t._extend(k,N),M(k.showHidden)&&(k.showHidden=!1),M(k.depth)&&(k.depth=2),M(k.colors)&&(k.colors=!1),M(k.customInspect)&&(k.customInspect=!0),k.colors&&(k.stylize=u),R(k,I,k.depth)}function u(I,N){var k=c.styles[N];return k?"\x1B["+c.colors[k][0]+"m"+I+"\x1B["+c.colors[k][1]+"m":I}function m(I,N){return I}function R(I,N,k){if(I.customInspect&&N&&Z(N.inspect)&&N.inspect!==t.inspect&&(!N.constructor||N.constructor.prototype!==N)){var w=N.inspect(k,I);return V(w)||(w=R(I,w,k)),w}var h=function(v,S){if(M(S))return v.stylize("undefined","undefined");if(V(S)){var U="'"+JSON.stringify(S).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return v.stylize(U,"string")}if(L(S))return v.stylize(""+S,"number");if(_(S))return v.stylize(""+S,"boolean");if(T(S))return v.stylize("null","null")}(I,N);if(h)return h;var B=Object.keys(N),z=function(v){var S={};return v.forEach(function(U,J){S[U]=!0}),S}(B);if(I.showHidden&&(B=Object.getOwnPropertyNames(N)),Y(N)&&(B.indexOf("message")>=0||B.indexOf("description")>=0))return E(N);if(B.length===0){if(Z(N)){var X=N.name?": "+N.name:"";return I.stylize("[Function"+X+"]","special")}if(A(N))return I.stylize(RegExp.prototype.toString.call(N),"regexp");if(O(N))return I.stylize(Date.prototype.toString.call(N),"date");if(Y(N))return E(N)}var Q,te="",q=!1,H=["{","}"];return g(N)&&(q=!0,H=["[","]"]),Z(N)&&(te=" [Function"+(N.name?": "+N.name:"")+"]"),A(N)&&(te=" "+RegExp.prototype.toString.call(N)),O(N)&&(te=" "+Date.prototype.toUTCString.call(N)),Y(N)&&(te=" "+E(N)),B.length!==0||q&&N.length!=0?k<0?A(N)?I.stylize(RegExp.prototype.toString.call(N),"regexp"):I.stylize("[Object]","special"):(I.seen.push(N),Q=q?function(v,S,U,J,$){for(var ne=[],se=0,ge=S.length;se<ge;++se)P(S,String(se))?ne.push(y(v,S,U,J,String(se),!0)):ne.push("");return $.forEach(function(ve){ve.match(/^\d+$/)||ne.push(y(v,S,U,J,ve,!0))}),ne}(I,N,k,z,B):B.map(function(v){return y(I,N,k,z,v,q)}),I.seen.pop(),function(v,S,U){return v.reduce(function(J,$){return $.indexOf(`
6
- `)>=0,J+$.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?U[0]+(S===""?"":S+`
7
- `)+" "+v.join(`,
8
- `)+" "+U[1]:U[0]+S+" "+v.join(", ")+" "+U[1]}(Q,te,H)):H[0]+te+H[1]}function E(I){return"["+Error.prototype.toString.call(I)+"]"}function y(I,N,k,w,h,B){var z,X,Q;if((Q=Object.getOwnPropertyDescriptor(N,h)||{value:N[h]}).get?X=Q.set?I.stylize("[Getter/Setter]","special"):I.stylize("[Getter]","special"):Q.set&&(X=I.stylize("[Setter]","special")),P(w,h)||(z="["+h+"]"),X||(I.seen.indexOf(Q.value)<0?(X=T(k)?R(I,Q.value,null):R(I,Q.value,k-1)).indexOf(`
9
- `)>-1&&(X=B?X.split(`
10
- `).map(function(te){return" "+te}).join(`
10
+ `)),Error.captureStackTrace(s(F),R),F}return R}(l(Error));e.exports=function(w){if(w.length>2)throw new E(w);function h(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=b}function g(b){return new h(b)}return h.prototype.transform=w,g.Format=h,g}},function(e,t,n){(function(r){var i=Object.getOwnPropertyDescriptors||function(N){for(var P=Object.keys(N),W={},O=0;O<P.length;O++)W[P[O]]=Object.getOwnPropertyDescriptor(N,P[O]);return W},s=/%[sdj%]/g;t.format=function(N){if(!F(N)){for(var P=[],W=0;W<arguments.length;W++)P.push(c(arguments[W]));return P.join(" ")}W=1;for(var O=arguments,p=O.length,U=String(N).replace(s,function(Q){if(Q==="%%")return"%";if(W>=p)return Q;switch(Q){case"%s":return String(O[W++]);case"%d":return Number(O[W++]);case"%j":try{return JSON.stringify(O[W++])}catch{return"[Circular]"}default:return Q}}),V=O[W];W<p;V=O[++W])R(V)||!d(V)?U+=" "+V:U+=" "+c(V);return U},t.deprecate=function(N,P){if(r!==void 0&&r.noDeprecation===!0)return N;if(r===void 0)return function(){return t.deprecate(N,P).apply(this,arguments)};var W=!1;return function(){if(!W){if(r.throwDeprecation)throw new Error(P);r.traceDeprecation?console.trace(P):console.error(P),W=!0}return N.apply(this,arguments)}};var l,o={};function c(N,P){var W={seen:[],stylize:f};return arguments.length>=3&&(W.depth=arguments[2]),arguments.length>=4&&(W.colors=arguments[3]),b(P)?W.showHidden=P:P&&t._extend(W,P),M(W.showHidden)&&(W.showHidden=!1),M(W.depth)&&(W.depth=2),M(W.colors)&&(W.colors=!1),M(W.customInspect)&&(W.customInspect=!0),W.colors&&(W.stylize=u),E(W,N,W.depth)}function u(N,P){var W=c.styles[P];return W?"\x1B["+c.colors[W][0]+"m"+N+"\x1B["+c.colors[W][1]+"m":N}function f(N,P){return N}function E(N,P,W){if(N.customInspect&&P&&q(P.inspect)&&P.inspect!==t.inspect&&(!P.constructor||P.constructor.prototype!==P)){var O=P.inspect(W,N);return F(O)||(O=E(N,O,W)),O}var p=function(S,T){if(M(T))return S.stylize("undefined","undefined");if(F(T)){var k="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return S.stylize(k,"string")}if(x(T))return S.stylize(""+T,"number");if(b(T))return S.stylize(""+T,"boolean");if(R(T))return S.stylize("null","null")}(N,P);if(p)return p;var U=Object.keys(P),V=function(S){var T={};return S.forEach(function(k,J){T[k]=!0}),T}(U);if(N.showHidden&&(U=Object.getOwnPropertyNames(P)),$(P)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return w(P);if(U.length===0){if(q(P)){var Q=P.name?": "+P.name:"";return N.stylize("[Function"+Q+"]","special")}if(A(P))return N.stylize(RegExp.prototype.toString.call(P),"regexp");if(I(P))return N.stylize(Date.prototype.toString.call(P),"date");if($(P))return w(P)}var ee,ne="",Y=!1,G=["{","}"];return g(P)&&(Y=!0,G=["[","]"]),q(P)&&(ne=" [Function"+(P.name?": "+P.name:"")+"]"),A(P)&&(ne=" "+RegExp.prototype.toString.call(P)),I(P)&&(ne=" "+Date.prototype.toUTCString.call(P)),$(P)&&(ne=" "+w(P)),U.length!==0||Y&&P.length!=0?W<0?A(P)?N.stylize(RegExp.prototype.toString.call(P),"regexp"):N.stylize("[Object]","special"):(N.seen.push(P),ee=Y?function(S,T,k,J,K){for(var re=[],se=0,fe=T.length;se<fe;++se)L(T,String(se))?re.push(h(S,T,k,J,String(se),!0)):re.push("");return K.forEach(function(ve){ve.match(/^\d+$/)||re.push(h(S,T,k,J,ve,!0))}),re}(N,P,W,V,U):U.map(function(S){return h(N,P,W,V,S,Y)}),N.seen.pop(),function(S,T,k){return S.reduce(function(J,K){return K.indexOf(`
11
+ `)>=0,J+K.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?k[0]+(T===""?"":T+`
12
+ `)+" "+S.join(`,
13
+ `)+" "+k[1]:k[0]+T+" "+S.join(", ")+" "+k[1]}(ee,ne,G)):G[0]+ne+G[1]}function w(N){return"["+Error.prototype.toString.call(N)+"]"}function h(N,P,W,O,p,U){var V,Q,ee;if((ee=Object.getOwnPropertyDescriptor(P,p)||{value:P[p]}).get?Q=ee.set?N.stylize("[Getter/Setter]","special"):N.stylize("[Getter]","special"):ee.set&&(Q=N.stylize("[Setter]","special")),L(O,p)||(V="["+p+"]"),Q||(N.seen.indexOf(ee.value)<0?(Q=R(W)?E(N,ee.value,null):E(N,ee.value,W-1)).indexOf(`
14
+ `)>-1&&(Q=U?Q.split(`
15
+ `).map(function(ne){return" "+ne}).join(`
11
16
  `).substr(2):`
12
- `+X.split(`
13
- `).map(function(te){return" "+te}).join(`
14
- `)):X=I.stylize("[Circular]","special")),M(z)){if(B&&h.match(/^\d+$/))return X;(z=JSON.stringify(""+h)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.substr(1,z.length-2),z=I.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=I.stylize(z,"string"))}return z+": "+X}function g(I){return Array.isArray(I)}function _(I){return typeof I=="boolean"}function T(I){return I===null}function L(I){return typeof I=="number"}function V(I){return typeof I=="string"}function M(I){return I===void 0}function A(I){return f(I)&&d(I)==="[object RegExp]"}function f(I){return typeof I=="object"&&I!==null}function O(I){return f(I)&&d(I)==="[object Date]"}function Y(I){return f(I)&&(d(I)==="[object Error]"||I instanceof Error)}function Z(I){return typeof I=="function"}function d(I){return Object.prototype.toString.call(I)}function p(I){return I<10?"0"+I.toString(10):I.toString(10)}t.debuglog=function(I){if(M(s)&&(s=r.env.NODE_DEBUG||""),I=I.toUpperCase(),!i[I])if(new RegExp("\\b"+I+"\\b","i").test(s)){var N=r.pid;i[I]=function(){var k=t.format.apply(t,arguments);console.error("%s %d: %s",I,N,k)}}else i[I]=function(){};return i[I]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=g,t.isBoolean=_,t.isNull=T,t.isNullOrUndefined=function(I){return I==null},t.isNumber=L,t.isString=V,t.isSymbol=function(I){return typeof I=="symbol"},t.isUndefined=M,t.isRegExp=A,t.isObject=f,t.isDate=O,t.isError=Y,t.isFunction=Z,t.isPrimitive=function(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||typeof I=="symbol"||I===void 0},t.isBuffer=n(107);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b(){var I=new Date,N=[p(I.getHours()),p(I.getMinutes()),p(I.getSeconds())].join(":");return[I.getDate(),C[I.getMonth()],N].join(" ")}function P(I,N){return Object.prototype.hasOwnProperty.call(I,N)}t.log=function(){console.log("%s - %s",b(),t.format.apply(t,arguments))},t.inherits=n(108),t._extend=function(I,N){if(!N||!f(N))return I;for(var k=Object.keys(N),w=k.length;w--;)I[k[w]]=N[k[w]];return I};var F=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;function D(I,N){if(!I){var k=new Error("Promise was rejected with a falsy value");k.reason=I,I=k}return N(I)}t.promisify=function(I){if(typeof I!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&I[F]){var N;if(typeof(N=I[F])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(N,F,{value:N,enumerable:!1,writable:!1,configurable:!0}),N}function N(){for(var k,w,h=new Promise(function(X,Q){k=X,w=Q}),B=[],z=0;z<arguments.length;z++)B.push(arguments[z]);B.push(function(X,Q){X?w(X):k(Q)});try{I.apply(this,B)}catch(X){w(X)}return h}return Object.setPrototypeOf(N,Object.getPrototypeOf(I)),F&&Object.defineProperty(N,F,{value:N,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(N,o(I))},t.promisify.custom=F,t.callbackify=function(I){if(typeof I!="function")throw new TypeError('The "original" argument must be of type Function');function N(){for(var k=[],w=0;w<arguments.length;w++)k.push(arguments[w]);var h=k.pop();if(typeof h!="function")throw new TypeError("The last argument must be of type Function");var B=this,z=function(){return h.apply(B,arguments)};I.apply(this,k).then(function(X){r.nextTick(z,null,X)},function(X){r.nextTick(D,X,z)})}return Object.setPrototypeOf(N,Object.getPrototypeOf(I)),Object.defineProperties(N,o(I)),N}}).call(this,n(2))},function(e,t,n){e.exports=function(r,o){o||(o={}),typeof o=="function"&&(o={cmp:o});var l,s=typeof o.cycles=="boolean"&&o.cycles,i=o.cmp&&(l=o.cmp,function(u){return function(m,R){var E={key:m,value:u[m]},y={key:R,value:u[R]};return l(E,y)}}),c=[];return function u(m){if(m&&m.toJSON&&typeof m.toJSON=="function"&&(m=m.toJSON()),m!==void 0){if(typeof m=="number")return isFinite(m)?""+m:"null";if(typeof m!="object")return JSON.stringify(m);var R,E;if(Array.isArray(m)){for(E="[",R=0;R<m.length;R++)R&&(E+=","),E+=u(m[R])||"null";return E+"]"}if(m===null)return"null";if(c.indexOf(m)!==-1){if(s)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var y=c.push(m)-1,g=Object.keys(m).sort(i&&i(m));for(E="",R=0;R<g.length;R++){var _=g[R],T=u(m[_]);T&&(E&&(E+=","),E+=JSON.stringify(_)+":"+T)}return c.splice(y,1),"{"+E+"}"}}(r)}},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self!="undefined"&&self||window,l=Function.prototype.apply;function s(i,c){this._id=i,this._clearFn=c}t.setTimeout=function(){return new s(l.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new s(l.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(i){i&&i.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(i,c){clearTimeout(i._idleTimeoutId),i._idleTimeout=c},t.unenroll=function(i){clearTimeout(i._idleTimeoutId),i._idleTimeout=-1},t._unrefActive=t.active=function(i){clearTimeout(i._idleTimeoutId);var c=i._idleTimeout;c>=0&&(i._idleTimeoutId=setTimeout(function(){i._onTimeout&&i._onTimeout()},c))},n(141),t.setImmediate=typeof self!="undefined"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self!="undefined"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(6))},function(e,t,n){(function(r){r===void 0||!r.version||r.version.indexOf("v0.")===0||r.version.indexOf("v1.")===0&&r.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(o,l,s,i){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var c,u,m=arguments.length;switch(m){case 0:case 1:return r.nextTick(o);case 2:return r.nextTick(function(){o.call(null,l)});case 3:return r.nextTick(function(){o.call(null,l,s)});case 4:return r.nextTick(function(){o.call(null,l,s,i)});default:for(c=new Array(m-1),u=0;u<c.length;)c[u++]=arguments[u];return r.nextTick(function(){o.apply(null,c)})}}}:e.exports=r}).call(this,n(2))},function(e,t,n){(function(r){function o(l){return Object.prototype.toString.call(l)}t.isArray=function(l){return Array.isArray?Array.isArray(l):o(l)==="[object Array]"},t.isBoolean=function(l){return typeof l=="boolean"},t.isNull=function(l){return l===null},t.isNullOrUndefined=function(l){return l==null},t.isNumber=function(l){return typeof l=="number"},t.isString=function(l){return typeof l=="string"},t.isSymbol=function(l){return typeof l=="symbol"},t.isUndefined=function(l){return l===void 0},t.isRegExp=function(l){return o(l)==="[object RegExp]"},t.isObject=function(l){return typeof l=="object"&&l!==null},t.isDate=function(l){return o(l)==="[object Date]"},t.isError=function(l){return o(l)==="[object Error]"||l instanceof Error},t.isFunction=function(l){return typeof l=="function"},t.isPrimitive=function(l){return l===null||typeof l=="boolean"||typeof l=="number"||typeof l=="string"||typeof l=="symbol"||l===void 0},t.isBuffer=r.isBuffer}).call(this,n(5).Buffer)},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return typeof location!="undefined"?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return typeof navigator!="undefined"?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL=`
15
- `,t.homedir=function(){return"/"}},function(e,t,n){var r=n(58),o=n(61).warn,l=t;l.version=n(138).version,l.transports=n(139),l.config=n(50),l.addColors=r.levels,l.format=r.format,l.createLogger=n(88),l.ExceptionHandler=n(89),l.RejectionHandler=n(93),l.Container=n(210),l.Transport=n(20),l.loggers=new l.Container;var s=l.createLogger();Object.keys(l.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(function(i){return l[i]=function(){return s[i].apply(s,arguments)}}),Object.defineProperty(l,"level",{get:function(){return s.level},set:function(i){s.level=i}}),Object.defineProperty(l,"exceptions",{get:function(){return s.exceptions}}),["exitOnError"].forEach(function(i){Object.defineProperty(l,i,{get:function(){return s[i]},set:function(c){s[i]=c}})}),Object.defineProperty(l,"default",{get:function(){return{exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports}}}),o.deprecated(l,"setLevels"),o.forFunctions(l,"useFormat",["cli"]),o.forProperties(l,"useFormat",["padLevels","stripColors"]),o.forFunctions(l,"deprecated",["addRewriter","addFilter","clone","extend"]),o.forProperties(l,"deprecated",["emitErrs","levelLength"]),o.moved(l,"createLogger","Logger")},function(e,t,n){var r=n(13),o=n(142),l=n(3).LEVEL,s=e.exports=function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.handleRejections=c.handleRejections,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){i.levels=u.levels,i.parent=u}),this.once("unpipe",function(u){u===i.parent&&(i.parent=null,i.close&&i.close())})};r.inherits(s,o),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);var m=this.level||this.parent&&this.parent.level;if(!m||this.levels[m]>=this.levels[i[l]]){if(i&&!this.format)return this.log(i,u);var R=void 0,E=void 0;try{E=this.format.transform(Object.assign({},i),this.format.options)}catch(y){R=y}if(R||!E){if(u(),R)throw R;return}return this.log(E,u)}return u(null)},s.prototype._writev=function(i,c){if(this.logv){var u=i.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var m=0;m<i.length;m++)if(this._accept(i[m]))if(!i[m].chunk||this.format){var R=void 0,E=void 0;try{E=this.format.transform(Object.assign({},i[m].chunk),this.format.options)}catch(y){R=y}if(R||!E){if(i[m].callback(),R)throw c(null),R}else this.log(E,i[m].callback)}else this.log(i[m].chunk,i[m].callback);return c(null)},s.prototype._accept=function(i){var c=i.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[l]])||!this.handleExceptions&&c.exception===!0)},s.prototype._nop=function(){},e.exports.LegacyTransportStream=n(148)},function(e,t,n){var r,o=typeof Reflect=="object"?Reflect:null,l=o&&typeof o.apply=="function"?o.apply:function(T,L,V){return Function.prototype.apply.call(T,L,V)};r=o&&typeof o.ownKeys=="function"?o.ownKeys:Object.getOwnPropertySymbols?function(T){return Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T))}:function(T){return Object.getOwnPropertyNames(T)};var s=Number.isNaN||function(T){return T!=T};function i(){i.init.call(this)}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var c=10;function u(T){return T._maxListeners===void 0?i.defaultMaxListeners:T._maxListeners}function m(T,L,V,M){var A,f,O,Y;if(typeof V!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof V);if((f=T._events)===void 0?(f=T._events=Object.create(null),T._eventsCount=0):(f.newListener!==void 0&&(T.emit("newListener",L,V.listener?V.listener:V),f=T._events),O=f[L]),O===void 0)O=f[L]=V,++T._eventsCount;else if(typeof O=="function"?O=f[L]=M?[V,O]:[O,V]:M?O.unshift(V):O.push(V),(A=u(T))>0&&O.length>A&&!O.warned){O.warned=!0;var Z=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");Z.name="MaxListenersExceededWarning",Z.emitter=T,Z.type=L,Z.count=O.length,Y=Z,console&&console.warn&&console.warn(Y)}return T}function R(){for(var T=[],L=0;L<arguments.length;L++)T.push(arguments[L]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,l(this.listener,this.target,T))}function E(T,L,V){var M={fired:!1,wrapFn:void 0,target:T,type:L,listener:V},A=R.bind(M);return A.listener=V,M.wrapFn=A,A}function y(T,L,V){var M=T._events;if(M===void 0)return[];var A=M[L];return A===void 0?[]:typeof A=="function"?V?[A.listener||A]:[A]:V?function(f){for(var O=new Array(f.length),Y=0;Y<O.length;++Y)O[Y]=f[Y].listener||f[Y];return O}(A):_(A,A.length)}function g(T){var L=this._events;if(L!==void 0){var V=L[T];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}function _(T,L){for(var V=new Array(L),M=0;M<L;++M)V[M]=T[M];return V}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(T){if(typeof T!="number"||T<0||s(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");c=T}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(T){if(typeof T!="number"||T<0||s(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(T){for(var L=[],V=1;V<arguments.length;V++)L.push(arguments[V]);var M=T==="error",A=this._events;if(A!==void 0)M=M&&A.error===void 0;else if(!M)return!1;if(M){var f;if(L.length>0&&(f=L[0]),f instanceof Error)throw f;var O=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw O.context=f,O}var Y=A[T];if(Y===void 0)return!1;if(typeof Y=="function")l(Y,this,L);else{var Z=Y.length,d=_(Y,Z);for(V=0;V<Z;++V)l(d[V],this,L)}return!0},i.prototype.addListener=function(T,L){return m(this,T,L,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(T,L){return m(this,T,L,!0)},i.prototype.once=function(T,L){if(typeof L!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof L);return this.on(T,E(this,T,L)),this},i.prototype.prependOnceListener=function(T,L){if(typeof L!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof L);return this.prependListener(T,E(this,T,L)),this},i.prototype.removeListener=function(T,L){var V,M,A,f,O;if(typeof L!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof L);if((M=this._events)===void 0)return this;if((V=M[T])===void 0)return this;if(V===L||V.listener===L)--this._eventsCount==0?this._events=Object.create(null):(delete M[T],M.removeListener&&this.emit("removeListener",T,V.listener||L));else if(typeof V!="function"){for(A=-1,f=V.length-1;f>=0;f--)if(V[f]===L||V[f].listener===L){O=V[f].listener,A=f;break}if(A<0)return this;A===0?V.shift():function(Y,Z){for(;Z+1<Y.length;Z++)Y[Z]=Y[Z+1];Y.pop()}(V,A),V.length===1&&(M[T]=V[0]),M.removeListener!==void 0&&this.emit("removeListener",T,O||L)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(T){var L,V,M;if((V=this._events)===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[T]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete V[T]),this;if(arguments.length===0){var A,f=Object.keys(V);for(M=0;M<f.length;++M)(A=f[M])!=="removeListener"&&this.removeAllListeners(A);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(L=V[T])=="function")this.removeListener(T,L);else if(L!==void 0)for(M=L.length-1;M>=0;M--)this.removeListener(T,L[M]);return this},i.prototype.listeners=function(T){return y(this,T,!0)},i.prototype.rawListeners=function(T){return y(this,T,!1)},i.listenerCount=function(T,L){return typeof T.listenerCount=="function"?T.listenerCount(L):g.call(T,L)},i.prototype.listenerCount=g,i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(147).Buffer,o=r.isEncoding||function(g){switch((g=""+g)&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l(g){var _;switch(this.encoding=function(T){var L=function(V){if(!V)return"utf8";for(var M;;)switch(V){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return V;default:if(M)return;V=(""+V).toLowerCase(),M=!0}}(T);if(typeof L!="string"&&(r.isEncoding===o||!o(T)))throw new Error("Unknown encoding: "+T);return L||T}(g),this.encoding){case"utf16le":this.text=c,this.end=u,_=4;break;case"utf8":this.fillLast=i,_=4;break;case"base64":this.text=m,this.end=R,_=3;break;default:return this.write=E,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(_)}function s(g){return g<=127?0:g>>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function i(g){var _=this.lastTotal-this.lastNeed,T=function(L,V,M){if((192&V[0])!=128)return L.lastNeed=0,"\uFFFD";if(L.lastNeed>1&&V.length>1){if((192&V[1])!=128)return L.lastNeed=1,"\uFFFD";if(L.lastNeed>2&&V.length>2&&(192&V[2])!=128)return L.lastNeed=2,"\uFFFD"}}(this,g);return T!==void 0?T:this.lastNeed<=g.length?(g.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,_,0,g.length),void(this.lastNeed-=g.length))}function c(g,_){if((g.length-_)%2==0){var T=g.toString("utf16le",_);if(T){var L=T.charCodeAt(T.length-1);if(L>=55296&&L<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",_,g.length-1)}function u(g){var _=g&&g.length?this.write(g):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,T)}return _}function m(g,_){var T=(g.length-_)%3;return T===0?g.toString("base64",_):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",_,g.length-T))}function R(g){var _=g&&g.length?this.write(g):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function E(g){return g.toString(this.encoding)}function y(g){return g&&g.length?this.write(g):""}t.StringDecoder=l,l.prototype.write=function(g){if(g.length===0)return"";var _,T;if(this.lastNeed){if((_=this.fillLast(g))===void 0)return"";T=this.lastNeed,this.lastNeed=0}else T=0;return T<g.length?_?_+this.text(g,T):this.text(g,T):_||""},l.prototype.end=function(g){var _=g&&g.length?this.write(g):"";return this.lastNeed?_+"\uFFFD":_},l.prototype.text=function(g,_){var T=function(V,M,A){var f=M.length-1;if(f<A)return 0;var O=s(M[f]);return O>=0?(O>0&&(V.lastNeed=O-1),O):--f<A||O===-2?0:(O=s(M[f]))>=0?(O>0&&(V.lastNeed=O-2),O):--f<A||O===-2?0:(O=s(M[f]))>=0?(O>0&&(O===2?O=0:V.lastNeed=O-3),O):0}(this,g,_);if(!this.lastNeed)return g.toString("utf8",_);this.lastTotal=T;var L=g.length-(T-this.lastNeed);return g.copy(this.lastChar,0,L),g.toString("utf8",_,L)},l.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},function(e,t,n){var r=n(16),o=Object.keys||function(g){var _=[];for(var T in g)_.push(T);return _};e.exports=R;var l=n(17);l.inherits=n(7);var s=n(69),i=n(48);l.inherits(R,s);for(var c=o(i.prototype),u=0;u<c.length;u++){var m=c[u];R.prototype[m]||(R.prototype[m]=i.prototype[m])}function R(g){if(!(this instanceof R))return new R(g);s.call(this,g),i.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",E)}function E(){this.allowHalfOpen||this._writableState.ended||r.nextTick(y,this)}function y(g){g.end()}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),R.prototype._destroy=function(g,_){this.push(null),this.end(),r.nextTick(_,g)}},function(e,t,n){(function(r){function o(j){var G=0;return function(){return G<j.length?{done:!1,value:j[G++]}:{done:!0}}}var l=typeof Object.defineProperties=="function"?Object.defineProperty:function(j,G,ee){j!=Array.prototype&&j!=Object.prototype&&(j[G]=ee.value)},s=function(j){j=[typeof window=="object"&&window,typeof self=="object"&&self,typeof r=="object"&&r,j];for(var G=0;G<j.length;++G){var ee=j[G];if(ee&&ee.Math==Math)return ee}throw Error("Cannot find global object")}(this);function i(j,G){if(G){var ee=s;j=j.split(".");for(var ie=0;ie<j.length-1;ie++){var ce=j[ie];ce in ee||(ee[ce]={}),ee=ee[ce]}(G=G(ie=ee[j=j[j.length-1]]))!=ie&&G!=null&&l(ee,j,{configurable:!0,writable:!0,value:G})}}function c(j){var G=typeof Symbol!="undefined"&&Symbol.iterator&&j[Symbol.iterator];return G?G.call(j):{next:o(j)}}i("Object.is",function(j){return j||function(G,ee){return G===ee?G!==0||1/G==1/ee:G!=G&&ee!=ee}}),i("Array.prototype.includes",function(j){return j||function(G,ee){var ie=this;ie instanceof String&&(ie=String(ie));var ce=ie.length;for(0>(ee=ee||0)&&(ee=Math.max(ee+ce,0));ee<ce;ee++){var de=ie[ee];if(de===G||Object.is(de,G))return!0}return!1}}),i("Promise",function(j){function G(ae){this.b=0,this.c=void 0,this.a=[];var fe=this.f();try{ae(fe.resolve,fe.reject)}catch(_e){fe.reject(_e)}}function ee(){this.a=null}function ie(ae){return ae instanceof G?ae:new G(function(fe){fe(ae)})}if(j)return j;ee.prototype.b=function(ae){if(this.a==null){this.a=[];var fe=this;this.c(function(){fe.g()})}this.a.push(ae)};var ce=s.setTimeout;ee.prototype.c=function(ae){ce(ae,0)},ee.prototype.g=function(){for(;this.a&&this.a.length;){var ae=this.a;this.a=[];for(var fe=0;fe<ae.length;++fe){var _e=ae[fe];ae[fe]=null;try{_e()}catch(be){this.f(be)}}}this.a=null},ee.prototype.f=function(ae){this.c(function(){throw ae})},G.prototype.f=function(){function ae(be){return function(we){_e||(_e=!0,be.call(fe,we))}}var fe=this,_e=!1;return{resolve:ae(this.m),reject:ae(this.g)}},G.prototype.m=function(ae){if(ae===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(ae instanceof G)this.o(ae);else{e:switch(typeof ae){case"object":var fe=ae!=null;break e;case"function":fe=!0;break e;default:fe=!1}fe?this.l(ae):this.h(ae)}},G.prototype.l=function(ae){var fe=void 0;try{fe=ae.then}catch(_e){return void this.g(_e)}typeof fe=="function"?this.u(fe,ae):this.h(ae)},G.prototype.g=function(ae){this.i(2,ae)},G.prototype.h=function(ae){this.i(1,ae)},G.prototype.i=function(ae,fe){if(this.b!=0)throw Error("Cannot settle("+ae+", "+fe+"): Promise already settled in state"+this.b);this.b=ae,this.c=fe,this.j()},G.prototype.j=function(){if(this.a!=null){for(var ae=0;ae<this.a.length;++ae)de.b(this.a[ae]);this.a=null}};var de=new ee;return G.prototype.o=function(ae){var fe=this.f();ae.w(fe.resolve,fe.reject)},G.prototype.u=function(ae,fe){var _e=this.f();try{ae.call(fe,_e.resolve,_e.reject)}catch(be){_e.reject(be)}},G.prototype.then=function(ae,fe){function _e(Ne,We){return typeof Ne=="function"?function(Fe){try{be(Ne(Fe))}catch(Ve){we(Ve)}}:We}var be,we,xe=new G(function(Ne,We){be=Ne,we=We});return this.w(_e(ae,be),_e(fe,we)),xe},G.prototype.catch=function(ae){return this.then(void 0,ae)},G.prototype.w=function(ae,fe){function _e(){switch(be.b){case 1:ae(be.c);break;case 2:fe(be.c);break;default:throw Error("Unexpected state: "+be.b)}}var be=this;this.a==null?de.b(_e):this.a.push(_e)},G.resolve=ie,G.reject=function(ae){return new G(function(fe,_e){_e(ae)})},G.race=function(ae){return new G(function(fe,_e){for(var be=c(ae),we=be.next();!we.done;we=be.next())ie(we.value).w(fe,_e)})},G.all=function(ae){var fe=c(ae),_e=fe.next();return _e.done?ie([]):new G(function(be,we){function xe(Fe){return function(Ve){Ne[Fe]=Ve,--We==0&&be(Ne)}}var Ne=[],We=0;do Ne.push(void 0),We++,ie(_e.value).w(xe(Ne.length-1),we),_e=fe.next();while(!_e.done)})},G});var u=u||{},m=this||self;function R(j,G){j=j.split("."),G=G||m;for(var ee=0;ee<j.length;ee++)if((G=G[j[ee]])==null)return null;return G}function E(){}function y(j){var G=typeof j;if(G=="object"){if(!j)return"null";if(j instanceof Array)return"array";if(j instanceof Object)return G;var ee=Object.prototype.toString.call(j);if(ee=="[object Window]")return"object";if(ee=="[object Array]"||typeof j.length=="number"&&j.splice!==void 0&&j.propertyIsEnumerable!==void 0&&!j.propertyIsEnumerable("splice"))return"array";if(ee=="[object Function]"||j.call!==void 0&&j.propertyIsEnumerable!==void 0&&!j.propertyIsEnumerable("call"))return"function"}else if(G=="function"&&j.call===void 0)return"object";return G}function g(j){var G=typeof j;return G=="object"&&j!=null||G=="function"}function _(j,G,ee){return j.call.apply(j.bind,arguments)}function T(j,G,ee){if(!j)throw Error();if(2<arguments.length){var ie=Array.prototype.slice.call(arguments,2);return function(){var ce=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(ce,ie),j.apply(G,ce)}}return function(){return j.apply(G,arguments)}}function L(j,G,ee){return(L=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?_:T).apply(null,arguments)}function V(j,G){function ee(){}ee.prototype=G.prototype,j.S=G.prototype,j.prototype=new ee,j.prototype.constructor=j}function M(){this.a={}}function A(j,G,ee,ie){this.f=j,this.c=G,this.b=ee,this.a=ie}function f(j,G,ee,ie){ee=ee===void 0?{}:ee,this.c=j,this.a=ee,this.b=G,this.f=ie===void 0?null:ie}function O(j,G,ee,ie,ce,de){this.name=j,this.a=ce,this.b=de}function Y(j,G,ee){ee=ee===void 0?{}:ee;var ie=ie===void 0?new M:ie;return new A(G,j,ee,ie)}function Z(j,G,ee,ie){return ie instanceof O?ie:new O(j,ee,ie.b||G.constructor,ie.f,ie.a,ie.c)}function d(j){this.a=j}function p(j){switch(j){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function C(j){if(Error.captureStackTrace)Error.captureStackTrace(this,C);else{var G=Error().stack;G&&(this.stack=G)}j&&(this.message=String(j))}function b(j,G){for(var ee="",ie=(j=j.split("%s")).length-1,ce=0;ce<ie;ce++)ee+=j[ce]+(ce<G.length?G[ce]:"%s");C.call(this,ee+j[ie])}function P(){this.j=null,this.i=[],this.l=0,this.b=F,this.f=this.a=this.h=0,this.c=null,this.g=0}M.prototype.get=function(j){return this.a[j]},M.prototype.f=function(){return Object.keys(this.a)},A.prototype.getRequestMessage=function(){return this.f},A.prototype.getMethodDescriptor=function(){return this.c},A.prototype.getMetadata=function(){return this.b},A.prototype.getCallOptions=function(){return this.a},f.prototype.getResponseMessage=function(){return this.c},f.prototype.getMetadata=function(){return this.a},f.prototype.getMethodDescriptor=function(){return this.b},f.prototype.getStatus=function(){return this.f},d.prototype.on=function(j,G){return j=="data"||j=="error"?this:this.a.on(j,G)},d.prototype.removeListener=function(j,G){return this.a.removeListener(j,G)},d.prototype.cancel=function(){this.a.cancel()},V(C,Error),C.prototype.name="CustomError",V(b,C),b.prototype.name="AssertionError";var F=0,D=1,I=2,N=3,k=0,w=128;function h(j,G,ee,ie){throw j.b=N,j.j="The stream is broken @"+j.l+"/"+ee+". Error: "+ie+`. With input:
16
- `+G,Error(j.j)}var B=Array.prototype.indexOf?function(j,G){return Array.prototype.indexOf.call(j,G,void 0)}:function(j,G){if(typeof j=="string")return typeof G!="string"||G.length!=1?-1:j.indexOf(G,0);for(var ee=0;ee<j.length;ee++)if(ee in j&&j[ee]===G)return ee;return-1},z,X=String.prototype.trim?function(j){return j.trim()}:function(j){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(j)[1]};function Q(j,G){return j.indexOf(G)!=-1}function te(j,G){return j<G?-1:j>G?1:0}e:{var q=m.navigator;if(q){var H=q.userAgent;if(H){z=H;break e}}z=""}var v="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function S(j){var G=1;j=j.split(":");for(var ee=[];0<G&&j.length;)ee.push(j.shift()),G--;return j.length&&ee.push(j.join(":")),ee}function U(j){return U[" "](j),j}U[" "]=E;var J,$,ne=Q(z,"Opera"),se=Q(z,"Trident")||Q(z,"MSIE"),ge=Q(z,"Edge"),ve=Q(z,"Gecko")&&!(Q(z.toLowerCase(),"webkit")&&!Q(z,"Edge"))&&!(Q(z,"Trident")||Q(z,"MSIE"))&&!Q(z,"Edge"),Oe=Q(z.toLowerCase(),"webkit")&&!Q(z,"Edge");function Se(){var j=m.document;return j?j.documentMode:void 0}e:{var Ce="",Ee=($=z,ve?/rv:([^\);]+)(\)|;)/.exec($):ge?/Edge\/([\d\.]+)/.exec($):se?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec($):Oe?/WebKit\/(\S+)/.exec($):ne?/(?:Version)[ \/]?(\S+)/.exec($):void 0);if(Ee&&(Ce=Ee?Ee[1]:""),se){var Te=Se();if(Te!=null&&Te>parseFloat(Ce)){J=String(Te);break e}}J=Ce}var De,qe={};function Qe(j){return function(G,ee){var ie=qe;return Object.prototype.hasOwnProperty.call(ie,G)?ie[G]:ie[G]=ee(G)}(j,function(){for(var G=0,ee=X(String(J)).split("."),ie=X(String(j)).split("."),ce=Math.max(ee.length,ie.length),de=0;G==0&&de<ce;de++){var ae=ee[de]||"",fe=ie[de]||"";do{if(ae=/(\d*)(\D*)(.*)/.exec(ae)||["","","",""],fe=/(\d*)(\D*)(.*)/.exec(fe)||["","","",""],ae[0].length==0&&fe[0].length==0)break;G=te(ae[1].length==0?0:parseInt(ae[1],10),fe[1].length==0?0:parseInt(fe[1],10))||te(ae[2].length==0,fe[2].length==0)||te(ae[2],fe[2]),ae=ae[3],fe=fe[3]}while(G==0)}return 0<=G})}if(m.document&&se){var tt=Se();De=tt||parseInt(J,10)||void 0}else De=void 0;var Tt=De;function Le(){this.F=this.F}Le.prototype.F=!1;var vt,gt=Object.freeze||function(j){return j};(vt=!se)||(vt=9<=Number(Tt));var lt=vt,At=se&&!Qe("9"),Ot=function(){if(!m.addEventListener||!Object.defineProperty)return!1;var j=!1,G=Object.defineProperty({},"passive",{get:function(){j=!0}});try{m.addEventListener("test",E,G),m.removeEventListener("test",E,G)}catch{}return j}();function ut(j,G){this.type=j,this.a=this.target=G,this.defaultPrevented=!1}function et(j,G){if(ut.call(this,j?j.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,j){var ee=this.type=j.type,ie=j.changedTouches&&j.changedTouches.length?j.changedTouches[0]:null;if(this.target=j.target||j.srcElement,this.a=G,G=j.relatedTarget){if(ve){e:{try{U(G.nodeName);var ce=!0;break e}catch{}ce=!1}ce||(G=null)}}else ee=="mouseover"?G=j.fromElement:ee=="mouseout"&&(G=j.toElement);this.relatedTarget=G,ie?(this.clientX=ie.clientX!==void 0?ie.clientX:ie.pageX,this.clientY=ie.clientY!==void 0?ie.clientY:ie.pageY,this.screenX=ie.screenX||0,this.screenY=ie.screenY||0):(this.clientX=j.clientX!==void 0?j.clientX:j.pageX,this.clientY=j.clientY!==void 0?j.clientY:j.pageY,this.screenX=j.screenX||0,this.screenY=j.screenY||0),this.button=j.button,this.key=j.key||"",this.ctrlKey=j.ctrlKey,this.altKey=j.altKey,this.shiftKey=j.shiftKey,this.metaKey=j.metaKey,this.pointerId=j.pointerId||0,this.pointerType=typeof j.pointerType=="string"?j.pointerType:Ct[j.pointerType]||"",this.c=j,j.defaultPrevented&&this.b()}}ut.prototype.b=function(){this.defaultPrevented=!0},V(et,ut);var Ct=gt({2:"touch",3:"pen",4:"mouse"});et.prototype.b=function(){et.S.b.call(this);var j=this.c;if(j.preventDefault)j.preventDefault();else if(j.returnValue=!1,At)try{(j.ctrlKey||112<=j.keyCode&&123>=j.keyCode)&&(j.keyCode=-1)}catch{}};var Ue="closure_listenable_"+(1e6*Math.random()|0),It=0;function ye(j,G,ee,ie,ce){this.listener=j,this.proxy=null,this.src=G,this.type=ee,this.capture=!!ie,this.A=ce,this.key=++It,this.s=this.v=!1}function x(j){j.s=!0,j.listener=null,j.proxy=null,j.src=null,j.A=null}function W(j){this.src=j,this.a={},this.b=0}function K(j,G){var ee=G.type;if(ee in j.a){var ie,ce=j.a[ee],de=B(ce,G);(ie=0<=de)&&Array.prototype.splice.call(ce,de,1),ie&&(x(G),j.a[ee].length==0&&(delete j.a[ee],j.b--))}}function re(j,G,ee,ie){for(var ce=0;ce<j.length;++ce){var de=j[ce];if(!de.s&&de.listener==G&&de.capture==!!ee&&de.A==ie)return ce}return-1}W.prototype.add=function(j,G,ee,ie,ce){var de=j.toString();(j=this.a[de])||(j=this.a[de]=[],this.b++);var ae=re(j,G,ie,ce);return-1<ae?(G=j[ae],ee||(G.v=!1)):((G=new ye(G,this.src,de,!!ie,ce)).v=ee,j.push(G)),G};var oe="closure_lm_"+(1e6*Math.random()|0),he={};function me(j,G,ee,ie,ce){if(ie&&ie.once)(function ae(fe,_e,be,we,xe){if(Array.isArray(_e))for(var Ne=0;Ne<_e.length;Ne++)ae(fe,_e[Ne],be,we,xe);else be=Ye(be),fe&&fe[Ue]?fe.f.add(String(_e),be,!0,g(we)?!!we.capture:!!we,xe):pe(fe,_e,be,!0,we,xe)})(j,G,ee,ie,ce);else if(Array.isArray(G))for(var de=0;de<G.length;de++)me(j,G[de],ee,ie,ce);else ee=Ye(ee),j&&j[Ue]?j.f.add(String(G),ee,!1,g(ie)?!!ie.capture:!!ie,ce):pe(j,G,ee,!1,ie,ce)}function pe(j,G,ee,ie,ce,de){if(!G)throw Error("Invalid event type");var ae=g(ce)?!!ce.capture:!!ce,fe=He(j);if(fe||(j[oe]=fe=new W(j)),!(ee=fe.add(G,ee,ie,ae,de)).proxy)if(ie=function(){var _e=Be,be=lt?function(we){return _e.call(be.src,be.listener,we)}:function(we){if(!(we=_e.call(be.src,be.listener,we)))return we};return be}(),ee.proxy=ie,ie.src=j,ie.listener=ee,j.addEventListener)Ot||(ce=ae),ce===void 0&&(ce=!1),j.addEventListener(G.toString(),ie,ce);else if(j.attachEvent)j.attachEvent(le(G.toString()),ie);else{if(!j.addListener||!j.removeListener)throw Error("addEventListener and attachEvent are unavailable.");j.addListener(ie)}}function ue(j){if(typeof j!="number"&&j&&!j.s){var G=j.src;if(G&&G[Ue])K(G.f,j);else{var ee=j.type,ie=j.proxy;G.removeEventListener?G.removeEventListener(ee,ie,j.capture):G.detachEvent?G.detachEvent(le(ee),ie):G.addListener&&G.removeListener&&G.removeListener(ie),(ee=He(G))?(K(ee,j),ee.b==0&&(ee.src=null,G[oe]=null)):x(j)}}}function le(j){return j in he?he[j]:he[j]="on"+j}function Re(j,G,ee,ie){var ce=!0;if((j=He(j))&&(G=j.a[G.toString()]))for(G=G.concat(),j=0;j<G.length;j++){var de=G[j];de&&de.capture==ee&&!de.s&&(de=Ie(de,ie),ce=ce&&de!==!1)}return ce}function Ie(j,G){var ee=j.listener,ie=j.A||j.src;return j.v&&ue(j),ee.call(ie,G)}function Be(j,G){if(j.s)return!0;if(!lt){var ee=G||R("window.event");G=new et(ee,this);var ie=!0;if(!(0>ee.keyCode||ee.returnValue!=null)){e:{var ce=!1;if(ee.keyCode==0)try{ee.keyCode=-1;break e}catch{ce=!0}(ce||ee.returnValue==null)&&(ee.returnValue=!0)}for(ee=[],ce=G.a;ce;ce=ce.parentNode)ee.push(ce);for(j=j.type,ce=ee.length-1;0<=ce;ce--){G.a=ee[ce];var de=Re(ee[ce],j,!0,G);ie=ie&&de}for(ce=0;ce<ee.length;ce++)G.a=ee[ce],de=Re(ee[ce],j,!1,G),ie=ie&&de}return ie}return Ie(j,new et(G,this))}function He(j){return(j=j[oe])instanceof W?j:null}var Xe="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ye(j){return y(j)=="function"?j:(j[Xe]||(j[Xe]=function(G){return j.handleEvent(G)}),j[Xe])}function Ge(){Le.call(this),this.f=new W(this),this.N=this}function je(j,G){j=j.N;var ee=G.type||G;if(typeof G=="string")G=new ut(G,j);else if(G instanceof ut)G.target=G.target||j;else{var ie=G;(function(ce,de){for(var ae,fe,_e=1;_e<arguments.length;_e++){for(ae in fe=arguments[_e])ce[ae]=fe[ae];for(var be=0;be<v.length;be++)ae=v[be],Object.prototype.hasOwnProperty.call(fe,ae)&&(ce[ae]=fe[ae])}})(G=new ut(ee,j),ie)}ke(j=G.a=j,ee,!0,G),ke(j,ee,!1,G)}function ke(j,G,ee,ie){if(G=j.f.a[String(G)]){G=G.concat();for(var ce=!0,de=0;de<G.length;++de){var ae=G[de];if(ae&&!ae.s&&ae.capture==ee){var fe=ae.listener,_e=ae.A||ae.src;ae.v&&K(j.f,ae),ce=fe.call(_e,ie)!==!1&&ce}}}}function $e(j,G,ee){if(y(j)=="function")ee&&(j=L(j,ee));else{if(!j||typeof j.handleEvent!="function")throw Error("Invalid listener argument");j=L(j.handleEvent,j)}return 2147483647<Number(G)?-1:m.setTimeout(j,G||0)}function Ze(j,G,ee){this.reset(j,G,ee,void 0,void 0)}V(Ge,Le),Ge.prototype[Ue]=!0,Ge.prototype.addEventListener=function(j,G,ee,ie){me(this,j,G,ee,ie)},Ge.prototype.removeEventListener=function(j,G,ee,ie){(function ce(de,ae,fe,_e,be){if(Array.isArray(ae))for(var we=0;we<ae.length;we++)ce(de,ae[we],fe,_e,be);else _e=g(_e)?!!_e.capture:!!_e,fe=Ye(fe),de&&de[Ue]?(de=de.f,(ae=String(ae).toString())in de.a&&-1<(fe=re(we=de.a[ae],fe,_e,be))&&(x(we[fe]),Array.prototype.splice.call(we,fe,1),we.length==0&&(delete de.a[ae],de.b--))):de&&(de=He(de))&&(ae=de.a[ae.toString()],de=-1,ae&&(de=re(ae,fe,_e,be)),(fe=-1<de?ae[de]:null)&&ue(fe))})(this,j,G,ee,ie)},Ze.prototype.a=null;function Ke(j){this.f=j,this.b=this.c=this.a=null}function Je(j,G){this.name=j,this.value=G}Ze.prototype.reset=function(j,G,ee,ie,ce){delete this.a},Je.prototype.toString=function(){return this.name};var ot=new Je("SEVERE",1e3),it=new Je("CONFIG",700),ht=new Je("FINE",500);function _t(j){return j.c?j.c:j.a?_t(j.a):(function(G,ee){throw new b("Failure"+(G?": "+G:""),Array.prototype.slice.call(arguments,1))}("Root logger has no level set."),null)}Ke.prototype.log=function(j,G,ee){if(j.value>=_t(this).value)for(y(G)=="function"&&(G=G()),j=new Ze(j,String(G),this.f),ee&&(j.a=ee),ee=this;ee;)ee=ee.a};var St,jt={},Rt=null;function rt(j,G){j&&j.log(ht,G,void 0)}function xt(){}function Dt(j){var G;return(G=j.a)||(G={},kt(j)&&(G[0]=!0,G[1]=!0),G=j.a=G),G}function Ut(){}function Bt(j){return(j=kt(j))?new ActiveXObject(j):new XMLHttpRequest}function kt(j){if(!j.b&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var G=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],ee=0;ee<G.length;ee++){var ie=G[ee];try{return new ActiveXObject(ie),j.b=ie}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return j.b}function dt(j,G){this.b={},this.a=[],this.c=0;var ee=arguments.length;if(1<ee){if(ee%2)throw Error("Uneven number of arguments");for(var ie=0;ie<ee;ie+=2)this.set(arguments[ie],arguments[ie+1])}else j&&Ft(this,j)}function Mt(j){if(j.c!=j.a.length){for(var G=0,ee=0;G<j.a.length;){var ie=j.a[G];mt(j.b,ie)&&(j.a[ee++]=ie),G++}j.a.length=ee}if(j.c!=j.a.length){var ce={};for(ee=G=0;G<j.a.length;)mt(ce,ie=j.a[G])||(j.a[ee++]=ie,ce[ie]=1),G++;j.a.length=ee}}function Ft(j,G){if(G instanceof dt)for(var ee=G.f(),ie=0;ie<ee.length;ie++)j.set(ee[ie],G.get(ee[ie]));else for(ee in G)j.set(ee,G[ee])}function mt(j,G){return Object.prototype.hasOwnProperty.call(j,G)}xt.prototype.a=null,V(Ut,xt),St=new Ut,dt.prototype.f=function(){return Mt(this),this.a.concat()},dt.prototype.get=function(j,G){return mt(this.b,j)?this.b[j]:G},dt.prototype.set=function(j,G){mt(this.b,j)||(this.c++,this.a.push(j)),this.b[j]=G},dt.prototype.forEach=function(j,G){for(var ee=this.f(),ie=0;ie<ee.length;ie++){var ce=ee[ie],de=this.get(ce);j.call(G,de,ce,this)}};var Kt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function ft(j){Ge.call(this),this.headers=new dt,this.D=j||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=Wt,this.B=this.H=!1}V(ft,Ge);var Wt="",Jt=ft.prototype,Xt=function j(G){var ee;if(Rt||(Rt=new Ke(""),jt[""]=Rt,Rt.c=it),!(ee=jt[G])){ee=new Ke(G);var ie=G.lastIndexOf("."),ce=G.substr(ie+1);(ie=j(G.substr(0,ie))).b||(ie.b={}),ie.b[ce]=ee,ee.a=ie,jt[G]=ee}return ee}("goog.net.XhrIo");Jt.b=Xt;var Qt=/^https?$/i,en=["POST","PUT"];function tn(j,G,ee){if(j.a)throw Error("[goog.net.XhrIo] Object is active with another request="+j.o+"; newUri="+G);j.o=G,j.i="",j.g=0,j.J="POST",j.G=!1,j.c=!0,j.a=j.D?Bt(j.D):Bt(St),j.C=j.D?Dt(j.D):Dt(St),j.a.onreadystatechange=L(j.K,j);try{rt(j.b,ct(j,"Opening Xhr")),j.I=!0,j.a.open("POST",String(G),!0),j.I=!1}catch(de){return rt(j.b,ct(j,"Error opening Xhr: "+de.message)),void Vt(j,de)}G=ee||"";var ie=function(de){e:{for(var ae=nn,fe=de.length,_e=typeof de=="string"?de.split(""):de,be=0;be<fe;be++)if(be in _e&&ae.call(void 0,_e[be],be,de)){ae=be;break e}ae=-1}return 0>ae?null:typeof de=="string"?de.charAt(ae):de[ae]}((ee=new dt(j.headers)).f()),ce=m.FormData&&G instanceof m.FormData;!(0<=B(en,"POST"))||ie||ce||ee.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),ee.forEach(function(de,ae){this.a.setRequestHeader(ae,de)},j),j.j&&(j.a.responseType=j.j),"withCredentials"in j.a&&j.a.withCredentials!==j.H&&(j.a.withCredentials=j.H);try{Gt(j),0<j.l&&(j.B=function(de){return se&&Qe(9)&&typeof de.timeout=="number"&&de.ontimeout!==void 0}(j.a),rt(j.b,ct(j,"Will abort after "+j.l+"ms if incomplete, xhr2 "+j.B)),j.B?(j.a.timeout=j.l,j.a.ontimeout=L(j.L,j)):j.u=$e(j.L,j.l,j)),rt(j.b,ct(j,"Sending request")),j.m=!0,j.a.send(G),j.m=!1}catch(de){rt(j.b,ct(j,"Send error: "+de.message)),Vt(j,de)}}function nn(j){return j.toLowerCase()=="content-type"}function Vt(j,G){j.c=!1,j.a&&(j.h=!0,j.a.abort(),j.h=!1),j.i=G,j.g=5,zt(j),Pt(j)}function zt(j){j.G||(j.G=!0,je(j,"complete"),je(j,"error"))}function Ht(j){if(j.c&&u!==void 0){if(j.C[1]&&pt(j)==4&&j.getStatus()==2)rt(j.b,ct(j,"Local request error detected and ignored"));else if(j.m&&pt(j)==4)$e(j.K,0,j);else if(je(j,"readystatechange"),pt(j)==4){rt(j.b,ct(j,"Request complete")),j.c=!1;try{var G,ee=j.getStatus();e:switch(ee){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var ie=!0;break e;default:ie=!1}if(!(G=ie)){var ce;if(ce=ee===0){var de=String(j.o).match(Kt)[1]||null;if(!de&&m.self&&m.self.location){var ae=m.self.location.protocol;de=ae.substr(0,ae.length-1)}ce=!Qt.test(de?de.toLowerCase():"")}G=ce}if(G)je(j,"complete"),je(j,"success");else{j.g=6;try{var fe=2<pt(j)?j.a.statusText:""}catch(_e){rt(j.b,"Can not get status: "+_e.message),fe=""}j.i=fe+" ["+j.getStatus()+"]",zt(j)}}finally{Pt(j)}}}}function Pt(j){if(j.a){Gt(j);var G=j.a,ee=j.C[0]?E:null;j.a=null,j.C=null,je(j,"ready");try{G.onreadystatechange=ee}catch(ie){(j=j.b)&&j.log(ot,"Problem encountered resetting onreadystatechange: "+ie.message,void 0)}}}function Gt(j){j.a&&j.B&&(j.a.ontimeout=null),j.u&&(m.clearTimeout(j.u),j.u=null)}function pt(j){return j.a?j.a.readyState:0}function qt(j,G){if(j.a&&pt(j)==4)return(j=j.a.getResponseHeader(G))===null?void 0:j}function ct(j,G){return G+" ["+j.J+" "+j.o+" "+j.getStatus()+"]"}ft.prototype.L=function(){u!==void 0&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,rt(this.b,ct(this,this.i)),je(this,"timeout"),this.abort(8))},ft.prototype.abort=function(j){this.a&&this.c&&(rt(this.b,ct(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=j||7,je(this,"complete"),je(this,"abort"),Pt(this))},ft.prototype.K=function(){this.F||(this.I||this.m||this.h?Ht(this):this.O())},ft.prototype.O=function(){Ht(this)},ft.prototype.getStatus=function(){try{return 2<pt(this)?this.a.status:-1}catch{return-1}};var Yt={},wt=null;function rn(j){var G=j.length,ee=3*G/4;ee%3?ee=Math.floor(ee):Q("=.",j[G-1])&&(ee=Q("=.",j[G-2])?ee-2:ee-1);var ie=new Uint8Array(ee),ce=0;return function(de,ae){function fe(We){for(;_e<de.length;){var Fe=de.charAt(_e++),Ve=wt[Fe];if(Ve!=null)return Ve;if(!/^[\s\xa0]*$/.test(Fe))throw Error("Unknown base64 encoding at char: "+Fe)}return We}$t();for(var _e=0;;){var be=fe(-1),we=fe(0),xe=fe(64),Ne=fe(64);if(Ne===64&&be===-1)break;ae(be<<2|we>>4),xe!=64&&(ae(we<<4&240|xe>>2),Ne!=64&&ae(xe<<6&192|Ne))}}(j,function(de){ie[ce++]=de}),ie.subarray(0,ce)}function $t(){if(!wt){wt={};for(var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),G=["+/=","+/","-_=","-_.","-_"],ee=0;5>ee;ee++){var ie=j.concat(G[ee].split(""));Yt[ee]=ie;for(var ce=0;ce<ie.length;ce++){var de=ie[ce];wt[de]===void 0&&(wt[de]=ce)}}}}var on=["content-type","grpc-status","grpc-message"];function st(j){this.a=j.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new P;var G=this;me(this.a,"readystatechange",function(){var ee=G.a;if(ee=ee.a?ee.a.getResponseHeader("Content-Type"):null){if((ee=ee.toLowerCase()).lastIndexOf("application/grpc-web-text",0)==0){ee=G.a;try{var ie=ee.a?ee.a.responseText:""}catch(be){rt(ee.b,"Can not get responseText: "+be.message),ie=""}if(ie=(ee=ie||"").length-ee.length%4,(ee=ee.substr(G.i,ie-G.i)).length==0)return;G.i=ie,ee=rn(ee)}else{if(ee.lastIndexOf("application/grpc",0)!=0)return void yt(G,{code:2,message:"Unknown Content-type received.",metadata:{}});ee=new Uint8Array(function(be){try{if(!be.a)return null;if("response"in be.a)return be.a.response;switch(be.j){case Wt:case"text":return be.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in be.a)return be.a.mozResponseArrayBuffer}var we=be.b;return we&&we.log(ot,"Response type "+be.j+" is not supported on this browser",void 0),null}catch(xe){return rt(be.b,"Can not get response: "+xe.message),null}}(G.a))}ie=null;try{ie=function(be,we){function xe(bt){Me.f++,Me.a=(Me.a<<8)+bt,Me.f==4&&(Me.b=I,Me.g=0,typeof Uint8Array!="undefined"?Me.c=new Uint8Array(Me.a):Me.c=Array(Me.a),Me.a==0&&We())}function Ne(bt){Me.c[Me.g++]=bt,Me.g==Me.a&&We()}function We(){var bt={};bt[Me.h]=Me.c,Me.i.push(bt),Me.b=F}var Fe,Ve,Me=be,at=0;for(Fe=we instanceof Uint8Array||we instanceof Array?we:new Uint8Array(we);at<Fe.length;){switch(Me.b){case N:h(Me,Fe,at,"stream already broken");break;case F:(Ve=Fe[at])==k||Ve==w?Me.h=Ve:h(Me,Fe,at,"invalid frame byte"),Me.b=D,Me.a=0,Me.f=0;break;case D:xe(Fe[at]);break;case I:Ne(Fe[at]);break;default:throw Error("unexpected parser state: "+Me.b)}Me.l++,at++}return be=Me.i,Me.i=[],0<be.length?be:null}(G.m,ee)}catch{yt(G,{code:2,message:"Error in parsing response body",metadata:{}})}if(ie)for(ee=0;ee<ie.length;ee++){if(k in ie[ee]){var ce=ie[ee][k];if(ce)try{var de=G.l(ce);if(de){ce=G;for(var ae=de,fe=0;fe<ce.b.length;fe++)ce.b[fe](ae)}}catch{yt(G,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(w in ie[ee]&&0<ie[ee][w].length){for(ce="",ae=0;ae<ie[ee][w].length;ae++)ce+=String.fromCharCode(ie[ee][w][ae]);for(ce=ce.trim().split(`\r
17
- `),ae={},fe=0;fe<ce.length;fe++){var _e=ce[fe].indexOf(":");ae[ce[fe].substring(0,_e).trim()]=ce[fe].substring(_e+1).trim()}ce=ae,ae=0,fe="","grpc-status"in ce&&(ae=ce["grpc-status"],delete ce["grpc-status"]),"grpc-message"in ce&&(fe=ce["grpc-message"],delete ce["grpc-message"]),yt(G,{code:Number(ae),message:fe,metadata:ce})}}}}),me(this.a,"complete",function(){var ee=G.a.g,ie="",ce={},de=function(fe){var _e={};fe=(fe.a&&pt(fe)==4&&fe.a.getAllResponseHeaders()||"").split(`\r
18
- `);for(var be=0;be<fe.length;be++)if(!/^[\s\xa0]*$/.test(fe[be])){var we=S(fe[be]),xe=we[0];if(typeof(we=we[1])=="string"){we=we.trim();var Ne=_e[xe]||[];_e[xe]=Ne,Ne.push(we)}}return function(We,Fe){var Ve,Me={};for(Ve in We)Me[Ve]=Fe.call(void 0,We[Ve],Ve,We);return Me}(_e,function(We){return We.join(", ")})}(G.a);if(Object.keys(de).forEach(function(fe){on.includes(fe)||(ce[fe]=de[fe])}),function(fe,_e){for(var be=0;be<fe.g.length;be++)fe.g[be](_e)}(G,ce),ee!=0){switch(ee){case 7:var ae=10;break;case 8:ae=4;break;case 6:ae=function(fe){switch(fe){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}}(G.a.getStatus());break;default:ae=14}ae==10&&G.j||yt(G,{code:ae,message:p(ee),metadata:{}})}else ee=!1,"grpc-status"in de&&(ae=qt(G.a,"grpc-status"),"grpc-message"in de&&(ie=qt(G.a,"grpc-message")),Number(ae)!=0&&(yt(G,{code:Number(ae),message:ie,metadata:de}),ee=!0)),ee||function(fe){for(var _e=0;_e<fe.c.length;_e++)fe.c[_e]()}(G)})}function Et(j,G){-1<(G=j.indexOf(G))&&j.splice(G,1)}function yt(j,G){if(G.code!=0)for(var ee={code:G.code,message:decodeURIComponent(G.message||""),metadata:G.metadata},ie=0;ie<j.f.length;ie++)j.f[ie](ee);for(G={code:G.code,details:decodeURIComponent(G.message||""),metadata:G.metadata},ee=0;ee<j.h.length;ee++)j.h[ee](G)}function nt(j){this.a=R("format",j)||"text",this.f=R("suppressCorsPreflight",j)||!1,this.c=R("withCredentials",j)||!1,this.b=R("streamInterceptors",j)||[],this.g=R("unaryInterceptors",j)||[]}function Nt(j,G,ee){var ie=G.getMethodDescriptor(),ce=ee+ie.name;(ee=new ft).H=j.c;var de=new st({T:ee});if(de.l=ie.b,Ft(ee.headers,G.getMetadata()),j.a=="text"?(ee.headers.set("Content-Type","application/grpc-web-text"),ee.headers.set("Accept","application/grpc-web-text")):ee.headers.set("Content-Type","application/grpc-web+proto"),ee.headers.set("X-User-Agent","grpc-web-javascript/0.1"),ee.headers.set("X-Grpc-Web","1"),mt(ee.headers.b,"deadline")){var ae=ee.headers.get("deadline");ae=Math.round(ae-new Date().getTime());var fe=ee.headers;mt(fe.b,"deadline")&&(delete fe.b.deadline,fe.c--,fe.a.length>2*fe.c&&Mt(fe)),1/0===ae&&(ae=0),0<ae&&ee.headers.set("grpc-timeout",ae+"m")}if(j.f){Mt(fe=ee.headers),ae={};for(var _e=0;_e<fe.a.length;_e++){var be=fe.a[_e];ae[be]=fe.b[be]}(fe=ee.headers).b={},fe.a.length=0,fe.c=0;e:{for(we in ae){var we=!1;break e}we=!0}we||(ae=function(We){var Fe="";return function(Ve,Me){for(var at in Ve)Me.call(void 0,Ve[at],at,Ve)}(We,function(Ve,Me){Fe+=Me,Fe+=":",Fe+=Ve,Fe+=`\r
19
- `}),Fe}(ae),typeof ce=="string"?(we=encodeURIComponent("$httpHeaders"),(we+=ae=ae!=null?"="+encodeURIComponent(String(ae)):"")&&(0>(ae=ce.indexOf("#"))&&(ae=ce.length),0>(fe=ce.indexOf("?"))||fe>ae?(fe=ae,_e=""):_e=ce.substring(fe+1,ae),ae=(ce=[ce.substr(0,fe),_e,ce.substr(ae)])[1],ce[1]=we?ae?ae+"&"+we:we:ae,ce=ce[0]+(ce[1]?"?"+ce[1]:"")+ce[2])):ce.a("$httpHeaders",ae))}for(ie=(G=(0,ie.a)(G.getRequestMessage())).length,we=[0,0,0,0],ae=new Uint8Array(5+ie),fe=3;0<=fe;fe--)we[fe]=ie%256,ie>>>=8;if(ae.set(new Uint8Array(we),1),ae.set(G,5),G=ae,j.a=="text"){var xe;for(j=G,xe===void 0&&(xe=0),$t(),xe=Yt[xe],G=[],ie=0;ie<j.length;ie+=3){be=j[ie];var Ne=(we=ie+1<j.length)?j[ie+1]:0;fe=be>>2,be=(3&be)<<4|Ne>>4,Ne=(15&Ne)<<2|(_e=(ae=ie+2<j.length)?j[ie+2]:0)>>6,_e&=63,ae||(_e=64,we||(Ne=64)),G.push(xe[fe],xe[be],xe[Ne]||"",xe[_e]||"")}G=G.join("")}else j.a=="binary"&&(ee.j="arraybuffer");return tn(ee,ce,G),de}function Zt(j,G,ee){var ie=null,ce=!1;j.on("data",function(de){ie=de}),j.on("error",function(de){de.code==0||ce||(ce=!0,G(de,null))}),j.on("status",function(de){de.code==0||ce?ee&&G(null,null,de):(ce=!0,G({code:de.code,message:de.details,metadata:de.metadata},null))}),ee&&j.on("metadata",function(de){G(null,null,null,de)}),j.on("end",function(){ce||(ie==null?G({code:2,message:"Incomplete response"}):G(null,ie)),ee&&G(null,null)})}function Lt(j,G){var ee=j;return G.forEach(function(ie){var ce=ee;ee=function(de){return ie.intercept(de,ce)}}),ee}st.prototype.on=function(j,G){return j=="data"?this.b.push(G):j=="status"?this.h.push(G):j=="metadata"?this.g.push(G):j=="end"?this.c.push(G):j=="error"&&this.f.push(G),this},st.prototype.removeListener=function(j,G){return j=="data"?Et(this.b,G):j=="status"?Et(this.h,G):j=="metadata"?Et(this.g,G):j=="end"?Et(this.c,G):j=="error"&&Et(this.f,G),this},st.prototype.cancel=function(){this.j=!0,this.a.abort()},st.prototype.cancel=st.prototype.cancel,st.prototype.removeListener=st.prototype.removeListener,st.prototype.on=st.prototype.on,nt.prototype.P=function(j,G,ee,ie,ce){var de=this;ie=Z(j,G,"unary",ie);var ae=j.substr(0,j.length-ie.name.length);return Zt(j=Lt(function(fe){return Nt(de,fe,ae)},this.b).call(this,Y(ie,G,ee)),ce,!1),new d(j)},nt.prototype.M=function(j,G,ee,ie){var ce=this;ie=Z(j,G,"unary",ie);var de=j.substr(0,j.length-ie.name.length);return Lt(function(ae){return new Promise(function(fe,_e){var be,we,xe;Zt(Nt(ce,ae,de),function(Ne,We,Fe,Ve){Ne?_e(Ne):We?xe=We:Fe?we=Fe:Ve?be=Ve:(Ne=ae.getMethodDescriptor(),fe(new f(xe,Ne,We=(We=be)===void 0?{}:We,we===void 0?null:we)))},!0)})},this.g).call(this,Y(ie,G,ee)).then(function(ae){return ae.getResponseMessage()})},nt.prototype.unaryCall=function(j,G,ee,ie){return this.M(j,G,ee,ie)},nt.prototype.R=function(j,G,ee,ie){var ce=this;ie=Z(j,G,"server_streaming",ie);var de=j.substr(0,j.length-ie.name.length);return Lt(function(ae){return Nt(ce,ae,de)},this.b).call(this,Y(ie,G,ee))},nt.prototype.serverStreaming=nt.prototype.R,nt.prototype.unaryCall=nt.prototype.unaryCall,nt.prototype.thenableCall=nt.prototype.M,nt.prototype.rpcCall=nt.prototype.P,e.exports.AbstractClientBase={MethodInfo:function(j,G,ee,ie,ce){this.name=ie,this.b=ce,this.f=j,this.a=G,this.c=ee}},e.exports.GrpcWebClientBase=nt,e.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},e.exports.MethodDescriptor=O,e.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}}).call(this,n(6))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var r,o=n(152),l=(r=o)&&r.__esModule?r:{default:r};function s(i){return i[Symbol.toStringTag]==="AsyncFunction"}t.default=function(i){if(typeof i!="function")throw new Error("expected a function");return s(i)?(0,l.default)(i):i},t.isAsync=s,t.isAsyncGenerator=function(i){return i[Symbol.toStringTag]==="AsyncGenerator"},t.isAsyncIterable=function(i){return typeof i[Symbol.asyncIterator]=="function"}},function(e,t,n){var r={};function o(s,i,c){c||(c=Error);var u=function(m){var R,E;function y(g,_,T){return m.call(this,function(L,V,M){return typeof i=="string"?i:i(L,V,M)}(g,_,T))||this}return E=m,(R=y).prototype=Object.create(E.prototype),R.prototype.constructor=R,R.__proto__=E,y}(c);u.prototype.name=c.name,u.prototype.code=s,r[s]=u}function l(s,i){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(i," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(i," ").concat(s[0]," or ").concat(s[1]):"of ".concat(i," ").concat(s[0])}return"of ".concat(i," ").concat(String(s))}o("ERR_INVALID_OPT_VALUE",function(s,i){return'The value "'+i+'" is invalid for option "'+s+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(s,i,c){var u,m,R;if(typeof i=="string"&&(m="not ",i.substr(0,m.length)===m)?(u="must not be",i=i.replace(/^not /,"")):u="must be",function(y,g,_){return(_===void 0||_>y.length)&&(_=y.length),y.substring(_-g.length,_)===g}(s," argument"))R="The ".concat(s," ").concat(u," ").concat(l(i,"type"));else{var E=function(y,g,_){return typeof _!="number"&&(_=0),!(_+g.length>y.length)&&y.indexOf(g,_)!==-1}(s,".")?"property":"argument";R='The "'.concat(s,'" ').concat(E," ").concat(u," ").concat(l(i,"type"))}return R+=". Received type ".concat(typeof c)},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){(function(r){var o=Object.keys||function(y){var g=[];for(var _ in y)g.push(_);return g};e.exports=m;var l=n(77),s=n(81);n(7)(m,l);for(var i=o(s.prototype),c=0;c<i.length;c++){var u=i[c];m.prototype[u]||(m.prototype[u]=s.prototype[u])}function m(y){if(!(this instanceof m))return new m(y);l.call(this,y),s.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",R)))}function R(){this._writableState.ended||r.nextTick(E,this)}function E(y){y.end()}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(y){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=y,this._writableState.destroyed=y)}})}).call(this,n(2))},function(e,t,n){n.d(t,"a",function(){return s});var r=n(40),o=n(4);const l={"app-id":["app-id must match formant/*"]};class s extends r.a{constructor(c,u={}){super(c,Object.assign({validateHeaders:m=>`${m.get("app-id")}`.startsWith("formant/")?{}:l},u)),this.endpoint=c}getHeaders(){return Object.assign(Object.assign({},s.headers),{"App-ID":`formant/${o.a}`,"App-Version":o.j})}}s.headers={}},function(e,t,n){n(227),e.exports={encode:r=>new TextEncoder().encode(r),decode:r=>new TextDecoder().decode(r)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,o=r.length){if(!o)throw new Error("arity is undefined");return function(...l){return typeof l[o-1]=="function"?r.apply(this,l):new Promise((s,i)=>{l[o-1]=(c,...u)=>{if(c)return i(c);s(u.length>1?u:u[0])},r.apply(this,l)})}},e.exports=t.default},function(e,t,n){(t=e.exports=n(69)).Stream=t,t.Readable=t,t.Writable=n(48),t.Duplex=n(23),t.Transform=n(72),t.PassThrough=n(165)},function(e,t,n){(t=e.exports=n(77)).Stream=t,t.Readable=t,t.Writable=n(81),t.Duplex=n(27),t.Transform=n(82),t.PassThrough=n(184),t.finished=n(49),t.pipeline=n(185)},function(e,t,n){e.exports=function(r){return r}},function(e,t,n){n.d(t,"a",function(){return o});const r=["password","secret","token","key","buffer"];function o(l,s=new Set){return s.has(l)?"[ RECURSIVE ]":!(i=l)||typeof i!="object"&&typeof i!="function"?l:(s.add(l),Object.keys(l).reduce((c,u)=>(c[u]=r.some(m=>u.toLowerCase().includes(m.toLowerCase()))?"[ REDACTED ]":o(l[u],s),c),{}));var i}},function(e,t){e.exports=r,r.default=r,r.stable=l,r.stableStringify=l;var n=[];function r(s,i,c){(function R(E,y,g,_){var T;if(typeof E=="object"&&E!==null){for(T=0;T<g.length;T++)if(g[T]===E)return _[y]="[Circular]",void n.push([_,y,E]);if(g.push(E),Array.isArray(E))for(T=0;T<E.length;T++)R(E[T],T,g,E);else{var L=Object.keys(E);for(T=0;T<L.length;T++){var V=L[T];R(E[V],V,g,E)}}g.pop()}})(s,"",[],void 0);for(var u=JSON.stringify(s,i,c);n.length!==0;){var m=n.pop();m[0][m[1]]=m[2]}return u}function o(s,i){return s<i?-1:s>i?1:0}function l(s,i,c){for(var u=function E(y,g,_,T){var L;if(typeof y=="object"&&y!==null){for(L=0;L<_.length;L++)if(_[L]===y)return T[g]="[Circular]",void n.push([T,g,y]);if(typeof y.toJSON=="function")return;if(_.push(y),Array.isArray(y))for(L=0;L<y.length;L++)E(y[L],L,_,y);else{var V={},M=Object.keys(y).sort(o);for(L=0;L<M.length;L++){var A=M[L];E(y[A],A,_,y),V[A]=y[A]}if(T===void 0)return V;n.push([T,g,y]),T[g]=V}_.pop()}}(s,"",[],void 0)||s,m=JSON.stringify(u,i,c);n.length!==0;){var R=n.pop();R[0][R[1]]=R[2]}return m}},function(e,t,n){var r=n(16),o=Object.keys||function(g){var _=[];for(var T in g)_.push(T);return _};e.exports=R;var l=Object.create(n(17));l.inherits=n(7);var s=n(143),i=n(62);l.inherits(R,s);for(var c=o(i.prototype),u=0;u<c.length;u++){var m=c[u];R.prototype[m]||(R.prototype[m]=i.prototype[m])}function R(g){if(!(this instanceof R))return new R(g);s.call(this,g),i.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",E)}function E(){this.allowHalfOpen||this._writableState.ended||r.nextTick(y,this)}function y(g){g.end()}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),R.prototype._destroy=function(g,_){this.push(null),this.end(),r.nextTick(_,g)}},function(e,t,n){var r=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function o(i,c){return Object.prototype.hasOwnProperty.call(i,c)}t.assign=function(i){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var m in u)o(u,m)&&(i[m]=u[m])}}return i},t.shrinkBuf=function(i,c){return i.length===c?i:i.subarray?i.subarray(0,c):(i.length=c,i)};var l={arraySet:function(i,c,u,m,R){if(c.subarray&&i.subarray)i.set(c.subarray(u,u+m),R);else for(var E=0;E<m;E++)i[R+E]=c[u+E]},flattenChunks:function(i){var c,u,m,R,E,y;for(m=0,c=0,u=i.length;c<u;c++)m+=i[c].length;for(y=new Uint8Array(m),R=0,c=0,u=i.length;c<u;c++)E=i[c],y.set(E,R),R+=E.length;return y}},s={arraySet:function(i,c,u,m,R){for(var E=0;E<m;E++)i[R+E]=c[u+E]},flattenChunks:function(i){return[].concat.apply([],i)}};t.setTyped=function(i){i?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,l)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(r)},function(e,t,n){e.exports=n(186)},function(e,t,n){n.d(t,"a",function(){return o});var r=n(229);const o=Object(r.a)()},function(e,t,n){n.d(t,"a",function(){return L});var r=n(1),o=n(100),l=n.n(o),s=n(101),i=n.n(s);class c extends Error{constructor(M,A,f){super(`Connection failure: ${M.message}`),this.cause=M,this.url=A,this.retryable=f}}var u=n(8),m=n(0),R=n(10),E=n(11);class y extends Error{constructor(M,A){super(`Invalid headers (${JSON.stringify(M)}) for response: ${A.message}`),this.validationErrors=M,this.responseError=A}}var g=function(V,M,A,f){return new(A||(A=Promise))(function(O,Y){function Z(C){try{p(f.next(C))}catch(b){Y(b)}}function d(C){try{p(f.throw(C))}catch(b){Y(b)}}function p(C){var b;C.done?O(C.value):(b=C.value,b instanceof A?b:new A(function(P){P(b)})).then(Z,d)}p((f=f.apply(V,M||[])).next())})},_=function(V,M){var A={};for(var f in V)Object.prototype.hasOwnProperty.call(V,f)&&M.indexOf(f)<0&&(A[f]=V[f]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function"){var O=0;for(f=Object.getOwnPropertySymbols(V);O<f.length;O++)M.indexOf(f[O])<0&&Object.prototype.propertyIsEnumerable.call(V,f[O])&&(A[f[O]]=V[f[O]])}return A};const T=new Set(["GET","HEAD","PUT","QUERY","DELETE","OPTIONS","TRACE"]);class L{constructor(M,A={}){if(this.endpoint=M,this.validateHeaders=f=>A.validateHeaders?A.validateHeaders(f):{},this.verbose=A.verbose!==!1,A.retries!==void 0&&!(A.retries>=0))throw new Error("retries must be positive or zero");if(this.configuredRetries=A.retries,A.timeoutMs!==void 0&&!(A.timeoutMs>0))throw new Error("timeoutMs must be positive");if(this.timeoutMs=A.timeoutMs,A.maxBackoffDelayMs!==void 0&&!(A.maxBackoffDelayMs>0))throw new Error("maxBackoffDelayMs must be positive");this.maxBackoffDelayMs=A.maxBackoffDelayMs||30*r.a.second}getRetries(){return this.configuredRetries!==void 0?this.configuredRetries:this.getConstructor().retries}getHeaders(){return{}}fetch(M,A={}){return g(this,void 0,void 0,function*(){return(yield this.fetchVerbose(M,A)).body})}fetchVerbose(M,A={}){return g(this,void 0,void 0,function*(){let f=100*r.a.millisecond,O=0;const Y=this.timeoutMs!==void 0?new Date().getTime()+this.timeoutMs:void 0,Z=Y?()=>Math.max(Y-new Date().getTime(),0):void 0;for(;;)try{return yield this.doFetch(M,A,Z)}catch(d){const p=Object(R.a)(d,c);if((Z==null?void 0:Z())===0||O===this.getRetries()||!p.retryable)throw p;O++,f=Math.min(...Z?[Z()]:[],f*(2+.1*(Math.random()-.5)),this.maxBackoffDelayMs),yield Object(u.a)(f),this.verbose&&m.a.warn(`Connection failure, retrying. Error: ${d.cause.message}`,{url:d.url,error:d.cause,attempt:O})}})}doFetch(M,A,f){return g(this,void 0,void 0,function*(){const{token:O,json:Y,allowUnsafeRetries:Z}=A,d=_(A,["token","json","allowUnsafeRetries"]),p=(d.method||"GET").toUpperCase(),C=this.endpoint!==void 0?`${this.endpoint}${M?`/${M}`:""}`:M,b=new l.a;let P;if(f){const F=f();F>0?P=setTimeout(()=>{b.abort()},F):b.abort()}try{let F;yield Promise.race([this.getConstructor().waitForConnectivity(),new Promise(B=>{F=setTimeout(B,f?Math.min(r.a.minute,f()):r.a.minute)})]),F&&clearTimeout(F);const D=yield i()(C,Object.assign(Object.assign({},d),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},Y!==!1?{"Content-Type":"application/json"}:{}),this.getHeaders()),d.headers||{}),O!==void 0?{Authorization:`Bearer ${O}`}:{}),signal:b.signal})),I=D.headers.get("content-type")||"",N=I&&I.startsWith("application/json"),k=N?yield D.json():yield D.text(),w=()=>new E.a(p,C,D.status,k,k&&k.validationErrors||{},D.headers);if(!D.ok)throw this.verbose&&m.a[D.status>=500?"warn":"info"]("Response error",{method:p,url:C,statusCode:D.status}),w();const h=this.validateHeaders(D.headers);if(Object.keys(h).length!==0)throw new y(h,w());if(D.status===204)return{body:void 0,headers:D.headers};if(Y&&!N)throw new Error(`Response is not JSON: ${JSON.stringify(k)}`);return{body:k,headers:D.headers}}catch(F){const D=Z||T.has(p);if(F.message==="Network request failed")throw new c(F,C,D);if(F.type==="system"&&["EAI_AGAIN","ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].find(w=>w===F.code))throw new c(F,C,!0);if(F.type==="system"&&["ETIMEDOUT","ECONNRESET","ESOCKETTIMEDOUT","EPIPE"].find(w=>w===F.code))throw new c(F,C,D);if(F.name==="AbortError")throw new c(F,C,D);const I=Object(R.a)(F,E.a),{statusCode:N}=I;if(N===408||N===429||N===502||N===503||N===504)throw this.verbose&&!D&&m.a.warn("Potentially unsafe retry"),new c(F,C,!0);const k=this.validateHeaders(I.headers);throw Object.keys(k).length!==0?new y(k,I):(yield this.getConstructor().onResponseError(I),F)}finally{P&&clearTimeout(P)}})}getConstructor(){return Object.getPrototypeOf(this).constructor}}L.retries=8,L.waitForConnectivity=()=>g(void 0,void 0,void 0,function*(){}),L.onResponseError=()=>g(void 0,void 0,void 0,function*(){})},function(e,t,n){function r(R,E){if(!(R instanceof E))throw new TypeError("Cannot call a class as a function")}function o(R,E){for(var y=0;y<E.length;y++){var g=E[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(R,g.key,g)}}var l=n(59),s=n(3),i=s.LEVEL,c=s.MESSAGE;l.enabled=!0;var u=/\s+/,m=function(){function R(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,R),_.colors&&this.addColors(_.colors),this.options=_}var E,y,g;return E=R,g=[{key:"addColors",value:function(_){var T=Object.keys(_).reduce(function(L,V){return L[V]=u.test(_[V])?_[V].split(u):_[V],L},{});return R.allColors=Object.assign({},R.allColors||{},T),R.allColors}}],(y=[{key:"addColors",value:function(_){return R.addColors(_)}},{key:"colorize",value:function(_,T,L){if(L===void 0&&(L=T),!Array.isArray(R.allColors[_]))return l[R.allColors[_]](L);for(var V=0,M=R.allColors[_].length;V<M;V++)L=l[R.allColors[_][V]](L);return L}},{key:"transform",value:function(_,T){return T.all&&typeof _[c]=="string"&&(_[c]=this.colorize(_[i],_.level,_[c])),(T.level||T.all||!T.message)&&(_.level=this.colorize(_[i],_.level)),(T.all||T.message)&&(_.message=this.colorize(_[i],_.level,_.message)),_}}])&&o(E.prototype,y),g&&o(E,g),R}();e.exports=function(R){return new m(R)},e.exports.Colorizer=e.exports.Format=m},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){(function(r){function o(l){try{if(!r.localStorage)return!1}catch{return!1}var s=r.localStorage[l];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(l,s){if(o("noDeprecation"))return l;var i=!1;return function(){if(!i){if(o("throwDeprecation"))throw new Error(s);o("traceDeprecation")?console.trace(s):console.warn(s),i=!0}return l.apply(this,arguments)}}}).call(this,n(6))},function(e,t,n){var r=n(5),o=r.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(l(r,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var m=o(i);return c!==void 0?typeof u=="string"?m.fill(c,u):m.fill(c):m.fill(0),m},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(i)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return r&&typeof r.length=="number"&&r.length>=0&&r.length%1==0},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,n){var r=n(5),o=r.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(l(r,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var m=o(i);return c!==void 0?typeof u=="string"?m.fill(c,u):m.fill(c):m.fill(0),m},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(i)}},function(e,t,n){(function(r,o,l){var s=n(16);function i(p){var C=this;this.next=null,this.entry=null,this.finish=function(){(function(b,P,F){var D=b.entry;for(b.entry=null;D;){var I=D.callback;P.pendingcb--,I(F),D=D.next}P.corkedRequestsFree?P.corkedRequestsFree.next=b:P.corkedRequestsFree=b})(C,p)}}e.exports=M;var c,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?o:s.nextTick;M.WritableState=V;var m=n(17);m.inherits=n(7);var R={deprecate:n(43)},E=n(70),y=n(47).Buffer,g=l.Uint8Array||function(){},_,T=n(71);function L(){}function V(p,C){c=c||n(23),p=p||{};var b=C instanceof c;this.objectMode=!!p.objectMode,b&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var P=p.highWaterMark,F=p.writableHighWaterMark,D=this.objectMode?16:16384;this.highWaterMark=P||P===0?P:b&&(F||F===0)?F:D,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=p.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){(function(k,w){var h=k._writableState,B=h.sync,z=h.writecb;if(function(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}(h),w)(function(Q,te,q,H,v){--te.pendingcb,q?(s.nextTick(v,H),s.nextTick(d,Q,te),Q._writableState.errorEmitted=!0,Q.emit("error",H)):(v(H),Q._writableState.errorEmitted=!0,Q.emit("error",H),d(Q,te))})(k,h,B,w,z);else{var X=Y(h);X||h.corked||h.bufferProcessing||!h.bufferedRequest||O(k,h),B?u(f,k,h,X,z):f(k,h,X,z)}})(C,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function M(p){if(c=c||n(23),!(_.call(M,this)||this instanceof c))return new M(p);this._writableState=new V(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),E.call(this)}function A(p,C,b,P,F,D,I){C.writelen=P,C.writecb=I,C.writing=!0,C.sync=!0,b?p._writev(F,C.onwrite):p._write(F,D,C.onwrite),C.sync=!1}function f(p,C,b,P){b||function(F,D){D.length===0&&D.needDrain&&(D.needDrain=!1,F.emit("drain"))}(p,C),C.pendingcb--,P(),d(p,C)}function O(p,C){C.bufferProcessing=!0;var b=C.bufferedRequest;if(p._writev&&b&&b.next){var P=C.bufferedRequestCount,F=new Array(P),D=C.corkedRequestsFree;D.entry=b;for(var I=0,N=!0;b;)F[I]=b,b.isBuf||(N=!1),b=b.next,I+=1;F.allBuffers=N,A(p,C,!0,C.length,F,"",D.finish),C.pendingcb++,C.lastBufferedRequest=null,D.next?(C.corkedRequestsFree=D.next,D.next=null):C.corkedRequestsFree=new i(C),C.bufferedRequestCount=0}else{for(;b;){var k=b.chunk,w=b.encoding,h=b.callback;if(A(p,C,!1,C.objectMode?1:k.length,k,w,h),b=b.next,C.bufferedRequestCount--,C.writing)break}b===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=b,C.bufferProcessing=!1}function Y(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function Z(p,C){p._final(function(b){C.pendingcb--,b&&p.emit("error",b),C.prefinished=!0,p.emit("prefinish"),d(p,C)})}function d(p,C){var b=Y(C);return b&&(function(P,F){F.prefinished||F.finalCalled||(typeof P._final=="function"?(F.pendingcb++,F.finalCalled=!0,s.nextTick(Z,P,F)):(F.prefinished=!0,P.emit("prefinish")))}(p,C),C.pendingcb===0&&(C.finished=!0,p.emit("finish"))),b}m.inherits(M,E),V.prototype.getBuffer=function(){for(var p=this.bufferedRequest,C=[];p;)C.push(p),p=p.next;return C},function(){try{Object.defineProperty(V.prototype,"buffer",{get:R.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(p){return!!_.call(this,p)||this===M&&p&&p._writableState instanceof V}})):_=function(p){return p instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(p,C,b){var P,F=this._writableState,D=!1,I=!F.objectMode&&(P=p,y.isBuffer(P)||P instanceof g);return I&&!y.isBuffer(p)&&(p=function(N){return y.from(N)}(p)),typeof C=="function"&&(b=C,C=null),I?C="buffer":C||(C=F.defaultEncoding),typeof b!="function"&&(b=L),F.ended?function(N,k){var w=new Error("write after end");N.emit("error",w),s.nextTick(k,w)}(this,b):(I||function(N,k,w,h){var B=!0,z=!1;return w===null?z=new TypeError("May not write null values to stream"):typeof w=="string"||w===void 0||k.objectMode||(z=new TypeError("Invalid non-string/buffer chunk")),z&&(N.emit("error",z),s.nextTick(h,z),B=!1),B}(this,F,p,b))&&(F.pendingcb++,D=function(N,k,w,h,B,z){if(!w){var X=function(H,v,S){return H.objectMode||H.decodeStrings===!1||typeof v!="string"||(v=y.from(v,S)),v}(k,h,B);h!==X&&(w=!0,B="buffer",h=X)}var Q=k.objectMode?1:h.length;k.length+=Q;var te=k.length<k.highWaterMark;if(te||(k.needDrain=!0),k.writing||k.corked){var q=k.lastBufferedRequest;k.lastBufferedRequest={chunk:h,encoding:B,isBuf:w,callback:z,next:null},q?q.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else A(N,k,!1,Q,h,B,z);return te}(this,F,I,p,C,b)),D},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||O(this,p))},M.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(p,C,b){b(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(p,C,b){var P=this._writableState;typeof p=="function"?(b=p,p=null,C=null):typeof C=="function"&&(b=C,C=null),p!=null&&this.write(p,C),P.corked&&(P.corked=1,this.uncork()),P.ending||P.finished||function(F,D,I){D.ending=!0,d(F,D),I&&(D.finished?s.nextTick(I):F.once("finish",I)),D.ended=!0,F.writable=!1}(this,P,b)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),M.prototype.destroy=T.destroy,M.prototype._undestroy=T.undestroy,M.prototype._destroy=function(p,C){this.end(),C(p)}}).call(this,n(2),n(15).setImmediate,n(6))},function(e,t,n){var r=n(26).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function l(s,i,c){if(typeof i=="function")return l(s,null,i);i||(i={}),c=function(M){var A=!1;return function(){if(!A){A=!0;for(var f=arguments.length,O=new Array(f),Y=0;Y<f;Y++)O[Y]=arguments[Y];M.apply(this,O)}}}(c||o);var u=i.readable||i.readable!==!1&&s.readable,m=i.writable||i.writable!==!1&&s.writable,R=function(){s.writable||y()},E=s._writableState&&s._writableState.finished,y=function(){m=!1,E=!0,u||c.call(s)},g=s._readableState&&s._readableState.endEmitted,_=function(){u=!1,g=!0,m||c.call(s)},T=function(M){c.call(s,M)},L=function(){var M;return u&&!g?(s._readableState&&s._readableState.ended||(M=new r),c.call(s,M)):m&&!E?(s._writableState&&s._writableState.ended||(M=new r),c.call(s,M)):void 0},V=function(){s.req.on("finish",y)};return function(M){return M.setHeader&&typeof M.abort=="function"}(s)?(s.on("complete",y),s.on("abort",L),s.req?V():s.on("request",V)):m&&!s._writableState&&(s.on("end",R),s.on("close",R)),s.on("end",_),s.on("finish",y),i.error!==!1&&s.on("error",T),s.on("close",L),function(){s.removeListener("complete",y),s.removeListener("abort",L),s.removeListener("request",V),s.req&&s.req.removeListener("finish",y),s.removeListener("end",R),s.removeListener("close",R),s.removeListener("finish",y),s.removeListener("end",_),s.removeListener("error",T),s.removeListener("close",L)}}},function(e,t,n){var r=n(58),o=n(3).configs;t.cli=r.levels(o.cli),t.npm=r.levels(o.npm),t.syslog=r.levels(o.syslog),t.addColors=r.levels},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(203)),o=i(n(204)),l=i(n(25)),s=i(n(30));function i(c){return c&&c.__esModule?c:{default:c}}t.default=(0,s.default)(function(c,u,m){return(0,r.default)(c,(0,o.default)((0,l.default)(u)),m)},3),e.exports=t.default},function(e,t,n){class r extends Error{constructor(l,...s){super(`env-var: ${l}`,...s),Error.captureStackTrace&&Error.captureStackTrace(this,r),this.name="EnvVarError"}}e.exports=r},function(e,t,n){e.exports=function(r){const o=parseInt(r,10);if(isNaN(o)||o.toString(10)!==r)throw new Error("should be a valid integer");return o}},function(e,t,n){e.exports=function(r){const o=parseFloat(r);if(isNaN(o)||o.toString()!==r)throw new Error("should be a valid float");return o}},function(e,t,n){e.exports=function(r){try{return JSON.parse(r)}catch{throw new Error("should be valid (parseable) JSON")}}},function(e,t,n){(function(r){function o(i,c){for(var u=0,m=i.length-1;m>=0;m--){var R=i[m];R==="."?i.splice(m,1):R===".."?(i.splice(m,1),u++):u&&(i.splice(m,1),u--)}if(c)for(;u--;u)i.unshift("..");return i}function l(i,c){if(i.filter)return i.filter(c);for(var u=[],m=0;m<i.length;m++)c(i[m],m,i)&&u.push(i[m]);return u}t.resolve=function(){for(var i="",c=!1,u=arguments.length-1;u>=-1&&!c;u--){var m=u>=0?arguments[u]:r.cwd();if(typeof m!="string")throw new TypeError("Arguments to path.resolve must be strings");m&&(i=m+"/"+i,c=m.charAt(0)==="/")}return(c?"/":"")+(i=o(l(i.split("/"),function(R){return!!R}),!c).join("/"))||"."},t.normalize=function(i){var c=t.isAbsolute(i),u=s(i,-1)==="/";return(i=o(l(i.split("/"),function(m){return!!m}),!c).join("/"))||c||(i="."),i&&u&&(i+="/"),(c?"/":"")+i},t.isAbsolute=function(i){return i.charAt(0)==="/"},t.join=function(){var i=Array.prototype.slice.call(arguments,0);return t.normalize(l(i,function(c,u){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(i,c){function u(T){for(var L=0;L<T.length&&T[L]==="";L++);for(var V=T.length-1;V>=0&&T[V]==="";V--);return L>V?[]:T.slice(L,V-L+1)}i=t.resolve(i).substr(1),c=t.resolve(c).substr(1);for(var m=u(i.split("/")),R=u(c.split("/")),E=Math.min(m.length,R.length),y=E,g=0;g<E;g++)if(m[g]!==R[g]){y=g;break}var _=[];for(g=y;g<m.length;g++)_.push("..");return(_=_.concat(R.slice(y))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(i){if(typeof i!="string"&&(i+=""),i.length===0)return".";for(var c=i.charCodeAt(0),u=c===47,m=-1,R=!0,E=i.length-1;E>=1;--E)if((c=i.charCodeAt(E))===47){if(!R){m=E;break}}else R=!1;return m===-1?u?"/":".":u&&m===1?"/":i.slice(0,m)},t.basename=function(i,c){var u=function(m){typeof m!="string"&&(m+="");var R,E=0,y=-1,g=!0;for(R=m.length-1;R>=0;--R)if(m.charCodeAt(R)===47){if(!g){E=R+1;break}}else y===-1&&(g=!1,y=R+1);return y===-1?"":m.slice(E,y)}(i);return c&&u.substr(-1*c.length)===c&&(u=u.substr(0,u.length-c.length)),u},t.extname=function(i){typeof i!="string"&&(i+="");for(var c=-1,u=0,m=-1,R=!0,E=0,y=i.length-1;y>=0;--y){var g=i.charCodeAt(y);if(g!==47)m===-1&&(R=!1,m=y+1),g===46?c===-1?c=y:E!==1&&(E=1):c!==-1&&(E=-1);else if(!R){u=y+1;break}}return c===-1||m===-1||E===0||E===1&&c===m-1&&c===u+1?"":i.slice(c,m)};var s="ab".substr(-1)==="b"?function(i,c,u){return i.substr(c,u)}:function(i,c,u){return c<0&&(c=i.length+c),i.substr(c,u)}}).call(this,n(2))},,function(e,t,n){var r=t.format=n(12);t.levels=n(105),Object.defineProperty(r,"align",{value:n(122)}),Object.defineProperty(r,"cli",{value:n(123)}),Object.defineProperty(r,"combine",{value:n(124)}),Object.defineProperty(r,"colorize",{value:n(41)}),Object.defineProperty(r,"json",{value:n(125)}),Object.defineProperty(r,"label",{value:n(128)}),Object.defineProperty(r,"logstash",{value:n(129)}),Object.defineProperty(r,"metadata",{value:n(130)}),Object.defineProperty(r,"padLevels",{value:n(60)}),Object.defineProperty(r,"prettyPrint",{value:n(131)}),Object.defineProperty(r,"printf",{value:n(132)}),Object.defineProperty(r,"simple",{value:n(133)}),Object.defineProperty(r,"splat",{value:n(134)}),Object.defineProperty(r,"timestamp",{value:n(135)}),Object.defineProperty(r,"uncolorize",{value:n(137)})},function(e,t,n){var r=n(106);e.exports=r},function(e,t,n){function r(E){return function(y){if(Array.isArray(y))return o(y)}(E)||function(y){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(y))return Array.from(y)}(E)||function(y,g){if(!!y){if(typeof y=="string")return o(y,g);var _=Object.prototype.toString.call(y).slice(8,-1);if(_==="Object"&&y.constructor&&(_=y.constructor.name),_==="Map"||_==="Set")return Array.from(y);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return o(y,g)}}(E)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(E,y){(y==null||y>E.length)&&(y=E.length);for(var g=0,_=new Array(y);g<y;g++)_[g]=E[g];return _}function l(E,y){if(!(E instanceof y))throw new TypeError("Cannot call a class as a function")}function s(E,y){for(var g=0;g<y.length;g++){var _=y[g];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(E,_.key,_)}}var i=n(3),c=i.configs,u=i.LEVEL,m=i.MESSAGE,R=function(){function E(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{levels:c.npm.levels};l(this,E),this.paddings=E.paddingForLevels(T.levels,T.filler),this.options=T}var y,g,_;return y=E,_=[{key:"getLongestLevel",value:function(T){var L=Object.keys(T).map(function(V){return V.length});return Math.max.apply(Math,r(L))}},{key:"paddingForLevel",value:function(T,L,V){var M=V+1-T.length,A=Math.floor(M/L.length);return"".concat(L).concat(L.repeat(A)).slice(0,M)}},{key:"paddingForLevels",value:function(T){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ",V=E.getLongestLevel(T);return Object.keys(T).reduce(function(M,A){return M[A]=E.paddingForLevel(A,L,V),M},{})}}],(g=[{key:"transform",value:function(T,L){return T.message="".concat(this.paddings[T[u]]).concat(T.message),T[m]&&(T[m]="".concat(this.paddings[T[u]]).concat(T[m])),T}}])&&s(y.prototype,g),_&&s(y,_),E}();e.exports=function(E){return new R(E)},e.exports.Padder=e.exports.Format=R},function(e,t,n){var r=n(13).format;t.warn={deprecated:function(o){return function(){throw new Error(r("{ %s } was removed in winston@3.0.0.",o))}},useFormat:function(o){return function(){throw new Error([r("{ %s } was removed in winston@3.0.0.",o),"Use a custom winston.format = winston.format(function) instead."].join(`
21
- `))}},forFunctions:function(o,l,s){s.forEach(function(i){o[i]=t.warn[l](i)})},moved:function(o,l,s){function i(){return function(){throw new Error([r("winston.%s was moved in winston@3.0.0.",s),r("Use a winston.%s instead.",l)].join(`
22
- `))}}Object.defineProperty(o,s,{get:i,set:i})},forProperties:function(o,l,s){s.forEach(function(i){var c=t.warn[l](i);Object.defineProperty(o,i,{get:c,set:c})})}}},function(e,t,n){(function(r,o,l){var s=n(16);function i(p){var C=this;this.next=null,this.entry=null,this.finish=function(){(function(b,P,F){var D=b.entry;for(b.entry=null;D;){var I=D.callback;P.pendingcb--,I(F),D=D.next}P.corkedRequestsFree?P.corkedRequestsFree.next=b:P.corkedRequestsFree=b})(C,p)}}e.exports=M;var c,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?o:s.nextTick;M.WritableState=V;var m=Object.create(n(17));m.inherits=n(7);var R={deprecate:n(43)},E=n(63),y=n(44).Buffer,g=l.Uint8Array||function(){},_,T=n(64);function L(){}function V(p,C){c=c||n(36),p=p||{};var b=C instanceof c;this.objectMode=!!p.objectMode,b&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var P=p.highWaterMark,F=p.writableHighWaterMark,D=this.objectMode?16:16384;this.highWaterMark=P||P===0?P:b&&(F||F===0)?F:D,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=p.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){(function(k,w){var h=k._writableState,B=h.sync,z=h.writecb;if(function(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}(h),w)(function(Q,te,q,H,v){--te.pendingcb,q?(s.nextTick(v,H),s.nextTick(d,Q,te),Q._writableState.errorEmitted=!0,Q.emit("error",H)):(v(H),Q._writableState.errorEmitted=!0,Q.emit("error",H),d(Q,te))})(k,h,B,w,z);else{var X=Y(h);X||h.corked||h.bufferProcessing||!h.bufferedRequest||O(k,h),B?u(f,k,h,X,z):f(k,h,X,z)}})(C,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function M(p){if(c=c||n(36),!(_.call(M,this)||this instanceof c))return new M(p);this._writableState=new V(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),E.call(this)}function A(p,C,b,P,F,D,I){C.writelen=P,C.writecb=I,C.writing=!0,C.sync=!0,b?p._writev(F,C.onwrite):p._write(F,D,C.onwrite),C.sync=!1}function f(p,C,b,P){b||function(F,D){D.length===0&&D.needDrain&&(D.needDrain=!1,F.emit("drain"))}(p,C),C.pendingcb--,P(),d(p,C)}function O(p,C){C.bufferProcessing=!0;var b=C.bufferedRequest;if(p._writev&&b&&b.next){var P=C.bufferedRequestCount,F=new Array(P),D=C.corkedRequestsFree;D.entry=b;for(var I=0,N=!0;b;)F[I]=b,b.isBuf||(N=!1),b=b.next,I+=1;F.allBuffers=N,A(p,C,!0,C.length,F,"",D.finish),C.pendingcb++,C.lastBufferedRequest=null,D.next?(C.corkedRequestsFree=D.next,D.next=null):C.corkedRequestsFree=new i(C),C.bufferedRequestCount=0}else{for(;b;){var k=b.chunk,w=b.encoding,h=b.callback;if(A(p,C,!1,C.objectMode?1:k.length,k,w,h),b=b.next,C.bufferedRequestCount--,C.writing)break}b===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=b,C.bufferProcessing=!1}function Y(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function Z(p,C){p._final(function(b){C.pendingcb--,b&&p.emit("error",b),C.prefinished=!0,p.emit("prefinish"),d(p,C)})}function d(p,C){var b=Y(C);return b&&(function(P,F){F.prefinished||F.finalCalled||(typeof P._final=="function"?(F.pendingcb++,F.finalCalled=!0,s.nextTick(Z,P,F)):(F.prefinished=!0,P.emit("prefinish")))}(p,C),C.pendingcb===0&&(C.finished=!0,p.emit("finish"))),b}m.inherits(M,E),V.prototype.getBuffer=function(){for(var p=this.bufferedRequest,C=[];p;)C.push(p),p=p.next;return C},function(){try{Object.defineProperty(V.prototype,"buffer",{get:R.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(p){return!!_.call(this,p)||this===M&&p&&p._writableState instanceof V}})):_=function(p){return p instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(p,C,b){var P,F=this._writableState,D=!1,I=!F.objectMode&&(P=p,y.isBuffer(P)||P instanceof g);return I&&!y.isBuffer(p)&&(p=function(N){return y.from(N)}(p)),typeof C=="function"&&(b=C,C=null),I?C="buffer":C||(C=F.defaultEncoding),typeof b!="function"&&(b=L),F.ended?function(N,k){var w=new Error("write after end");N.emit("error",w),s.nextTick(k,w)}(this,b):(I||function(N,k,w,h){var B=!0,z=!1;return w===null?z=new TypeError("May not write null values to stream"):typeof w=="string"||w===void 0||k.objectMode||(z=new TypeError("Invalid non-string/buffer chunk")),z&&(N.emit("error",z),s.nextTick(h,z),B=!1),B}(this,F,p,b))&&(F.pendingcb++,D=function(N,k,w,h,B,z){if(!w){var X=function(H,v,S){return H.objectMode||H.decodeStrings===!1||typeof v!="string"||(v=y.from(v,S)),v}(k,h,B);h!==X&&(w=!0,B="buffer",h=X)}var Q=k.objectMode?1:h.length;k.length+=Q;var te=k.length<k.highWaterMark;if(te||(k.needDrain=!0),k.writing||k.corked){var q=k.lastBufferedRequest;k.lastBufferedRequest={chunk:h,encoding:B,isBuf:w,callback:z,next:null},q?q.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else A(N,k,!1,Q,h,B,z);return te}(this,F,I,p,C,b)),D},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||O(this,p))},M.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(p,C,b){b(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(p,C,b){var P=this._writableState;typeof p=="function"?(b=p,p=null,C=null):typeof C=="function"&&(b=C,C=null),p!=null&&this.write(p,C),P.corked&&(P.corked=1,this.uncork()),P.ending||P.finished||function(F,D,I){D.ending=!0,d(F,D),I&&(D.finished?s.nextTick(I):F.once("finish",I)),D.ended=!0,F.writable=!1}(this,P,b)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),M.prototype.destroy=T.destroy,M.prototype._undestroy=T.undestroy,M.prototype._destroy=function(p,C){this.end(),C(p)}}).call(this,n(2),n(15).setImmediate,n(6))},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){var r=n(16);function o(l,s){l.emit("error",s)}e.exports={destroy:function(l,s){var i=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(l):!l||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(m){!s&&m?(r.nextTick(o,i,m),i._writableState&&(i._writableState.errorEmitted=!0)):s&&s(m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t){},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(156)),o=s(n(25)),l=s(n(30));function s(i){return i&&i.__esModule?i:{default:i}}t.default=(0,l.default)(function(i,c,u,m){return(0,r.default)(c)(i,(0,o.default)(u),m)},4),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){function o(...l){if(r!==null){var s=r;r=null,s.apply(this,l)}}return Object.assign(o,r),o},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return function(...o){if(r===null)throw new Error("Callback was already called.");var l=r;r=null,l.apply(this,o)}},e.exports=t.default},function(e,t,n){(function(r,o){var l=n(16);e.exports=A;var s,i=n(42);A.ReadableState=M,n(21).EventEmitter;var c=function(w,h){return w.listeners(h).length},u=n(70),m=n(47).Buffer,R=r.Uint8Array||function(){},E=n(17);E.inherits=n(7);var y=n(162),g=void 0;g=y&&y.debuglog?y.debuglog("stream"):function(){};var _,T=n(163),L=n(71);E.inherits(A,u);var V=["error","close","destroy","pause","resume"];function M(w,h){w=w||{};var B=h instanceof(s=s||n(23));this.objectMode=!!w.objectMode,B&&(this.objectMode=this.objectMode||!!w.readableObjectMode);var z=w.highWaterMark,X=w.readableHighWaterMark,Q=this.objectMode?16:16384;this.highWaterMark=z||z===0?z:B&&(X||X===0)?X:Q,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(_||(_=n(22).StringDecoder),this.decoder=new _(w.encoding),this.encoding=w.encoding)}function A(w){if(s=s||n(23),!(this instanceof A))return new A(w);this._readableState=new M(w,this),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),u.call(this)}function f(w,h,B,z,X){var Q,te=w._readableState;return h===null?(te.reading=!1,function(q,H){if(!H.ended){if(H.decoder){var v=H.decoder.end();v&&v.length&&(H.buffer.push(v),H.length+=H.objectMode?1:v.length)}H.ended=!0,Z(q)}}(w,te)):(X||(Q=function(q,H){var v;S=H,m.isBuffer(S)||S instanceof R||typeof H=="string"||H===void 0||q.objectMode||(v=new TypeError("Invalid non-string/buffer chunk"));var S;return v}(te,h)),Q?w.emit("error",Q):te.objectMode||h&&h.length>0?(typeof h=="string"||te.objectMode||Object.getPrototypeOf(h)===m.prototype||(h=function(q){return m.from(q)}(h)),z?te.endEmitted?w.emit("error",new Error("stream.unshift() after end event")):O(w,te,h,!0):te.ended?w.emit("error",new Error("stream.push() after EOF")):(te.reading=!1,te.decoder&&!B?(h=te.decoder.write(h),te.objectMode||h.length!==0?O(w,te,h,!1):p(w,te)):O(w,te,h,!1))):z||(te.reading=!1)),function(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}(te)}function O(w,h,B,z){h.flowing&&h.length===0&&!h.sync?(w.emit("data",B),w.read(0)):(h.length+=h.objectMode?1:B.length,z?h.buffer.unshift(B):h.buffer.push(B),h.needReadable&&Z(w)),p(w,h)}Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(w){this._readableState&&(this._readableState.destroyed=w)}}),A.prototype.destroy=L.destroy,A.prototype._undestroy=L.undestroy,A.prototype._destroy=function(w,h){this.push(null),h(w)},A.prototype.push=function(w,h){var B,z=this._readableState;return z.objectMode?B=!0:typeof w=="string"&&((h=h||z.defaultEncoding)!==z.encoding&&(w=m.from(w,h),h=""),B=!0),f(this,w,h,!1,B)},A.prototype.unshift=function(w){return f(this,w,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(w){return _||(_=n(22).StringDecoder),this._readableState.decoder=new _(w),this._readableState.encoding=w,this};function Y(w,h){return w<=0||h.length===0&&h.ended?0:h.objectMode?1:w!=w?h.flowing&&h.length?h.buffer.head.data.length:h.length:(w>h.highWaterMark&&(h.highWaterMark=function(B){return B>=8388608?B=8388608:(B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++),B}(w)),w<=h.length?w:h.ended?h.length:(h.needReadable=!0,0))}function Z(w){var h=w._readableState;h.needReadable=!1,h.emittedReadable||(g("emitReadable",h.flowing),h.emittedReadable=!0,h.sync?l.nextTick(d,w):d(w))}function d(w){g("emit readable"),w.emit("readable"),F(w)}function p(w,h){h.readingMore||(h.readingMore=!0,l.nextTick(C,w,h))}function C(w,h){for(var B=h.length;!h.reading&&!h.flowing&&!h.ended&&h.length<h.highWaterMark&&(g("maybeReadMore read 0"),w.read(0),B!==h.length);)B=h.length;h.readingMore=!1}function b(w){g("readable nexttick read 0"),w.read(0)}function P(w,h){h.reading||(g("resume read 0"),w.read(0)),h.resumeScheduled=!1,h.awaitDrain=0,w.emit("resume"),F(w),h.flowing&&!h.reading&&w.read(0)}function F(w){var h=w._readableState;for(g("flow",h.flowing);h.flowing&&w.read()!==null;);}function D(w,h){return h.length===0?null:(h.objectMode?B=h.buffer.shift():!w||w>=h.length?(B=h.decoder?h.buffer.join(""):h.buffer.length===1?h.buffer.head.data:h.buffer.concat(h.length),h.buffer.clear()):B=function(z,X,Q){var te;return z<X.head.data.length?(te=X.head.data.slice(0,z),X.head.data=X.head.data.slice(z)):te=z===X.head.data.length?X.shift():Q?function(q,H){var v=H.head,S=1,U=v.data;for(q-=U.length;v=v.next;){var J=v.data,$=q>J.length?J.length:q;if($===J.length?U+=J:U+=J.slice(0,q),(q-=$)===0){$===J.length?(++S,v.next?H.head=v.next:H.head=H.tail=null):(H.head=v,v.data=J.slice($));break}++S}return H.length-=S,U}(z,X):function(q,H){var v=m.allocUnsafe(q),S=H.head,U=1;for(S.data.copy(v),q-=S.data.length;S=S.next;){var J=S.data,$=q>J.length?J.length:q;if(J.copy(v,v.length-q,0,$),(q-=$)===0){$===J.length?(++U,S.next?H.head=S.next:H.head=H.tail=null):(H.head=S,S.data=J.slice($));break}++U}return H.length-=U,v}(z,X),te}(w,h.buffer,h.decoder),B);var B}function I(w){var h=w._readableState;if(h.length>0)throw new Error('"endReadable()" called on non-empty stream');h.endEmitted||(h.ended=!0,l.nextTick(N,h,w))}function N(w,h){w.endEmitted||w.length!==0||(w.endEmitted=!0,h.readable=!1,h.emit("end"))}function k(w,h){for(var B=0,z=w.length;B<z;B++)if(w[B]===h)return B;return-1}A.prototype.read=function(w){g("read",w),w=parseInt(w,10);var h=this._readableState,B=w;if(w!==0&&(h.emittedReadable=!1),w===0&&h.needReadable&&(h.length>=h.highWaterMark||h.ended))return g("read: emitReadable",h.length,h.ended),h.length===0&&h.ended?I(this):Z(this),null;if((w=Y(w,h))===0&&h.ended)return h.length===0&&I(this),null;var z,X=h.needReadable;return g("need readable",X),(h.length===0||h.length-w<h.highWaterMark)&&g("length less than watermark",X=!0),h.ended||h.reading?g("reading or ended",X=!1):X&&(g("do read"),h.reading=!0,h.sync=!0,h.length===0&&(h.needReadable=!0),this._read(h.highWaterMark),h.sync=!1,h.reading||(w=Y(B,h))),(z=w>0?D(w,h):null)===null?(h.needReadable=!0,w=0):h.length-=w,h.length===0&&(h.ended||(h.needReadable=!0),B!==w&&h.ended&&I(this)),z!==null&&this.emit("data",z),z},A.prototype._read=function(w){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(w,h){var B=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=w;break;case 1:z.pipes=[z.pipes,w];break;default:z.pipes.push(w)}z.pipesCount+=1,g("pipe count=%d opts=%j",z.pipesCount,h);var X=(!h||h.end!==!1)&&w!==o.stdout&&w!==o.stderr?te:ne;function Q(se,ge){g("onunpipe"),se===B&&ge&&ge.hasUnpiped===!1&&(ge.hasUnpiped=!0,g("cleanup"),w.removeListener("close",J),w.removeListener("finish",$),w.removeListener("drain",q),w.removeListener("error",U),w.removeListener("unpipe",Q),B.removeListener("end",te),B.removeListener("end",ne),B.removeListener("data",S),H=!0,!z.awaitDrain||w._writableState&&!w._writableState.needDrain||q())}function te(){g("onend"),w.end()}z.endEmitted?l.nextTick(X):B.once("end",X),w.on("unpipe",Q);var q=function(se){return function(){var ge=se._readableState;g("pipeOnDrain",ge.awaitDrain),ge.awaitDrain&&ge.awaitDrain--,ge.awaitDrain===0&&c(se,"data")&&(ge.flowing=!0,F(se))}}(B);w.on("drain",q);var H=!1,v=!1;function S(se){g("ondata"),v=!1,w.write(se)!==!1||v||((z.pipesCount===1&&z.pipes===w||z.pipesCount>1&&k(z.pipes,w)!==-1)&&!H&&(g("false write response, pause",B._readableState.awaitDrain),B._readableState.awaitDrain++,v=!0),B.pause())}function U(se){g("onerror",se),ne(),w.removeListener("error",U),c(w,"error")===0&&w.emit("error",se)}function J(){w.removeListener("finish",$),ne()}function $(){g("onfinish"),w.removeListener("close",J),ne()}function ne(){g("unpipe"),B.unpipe(w)}return B.on("data",S),function(se,ge,ve){if(typeof se.prependListener=="function")return se.prependListener(ge,ve);se._events&&se._events[ge]?i(se._events[ge])?se._events[ge].unshift(ve):se._events[ge]=[ve,se._events[ge]]:se.on(ge,ve)}(w,"error",U),w.once("close",J),w.once("finish",$),w.emit("pipe",B),z.flowing||(g("pipe resume"),B.resume()),w},A.prototype.unpipe=function(w){var h=this._readableState,B={hasUnpiped:!1};if(h.pipesCount===0)return this;if(h.pipesCount===1)return w&&w!==h.pipes||(w||(w=h.pipes),h.pipes=null,h.pipesCount=0,h.flowing=!1,w&&w.emit("unpipe",this,B)),this;if(!w){var z=h.pipes,X=h.pipesCount;h.pipes=null,h.pipesCount=0,h.flowing=!1;for(var Q=0;Q<X;Q++)z[Q].emit("unpipe",this,B);return this}var te=k(h.pipes,w);return te===-1||(h.pipes.splice(te,1),h.pipesCount-=1,h.pipesCount===1&&(h.pipes=h.pipes[0]),w.emit("unpipe",this,B)),this},A.prototype.on=function(w,h){var B=u.prototype.on.call(this,w,h);if(w==="data")this._readableState.flowing!==!1&&this.resume();else if(w==="readable"){var z=this._readableState;z.endEmitted||z.readableListening||(z.readableListening=z.needReadable=!0,z.emittedReadable=!1,z.reading?z.length&&Z(this):l.nextTick(b,this))}return B},A.prototype.addListener=A.prototype.on,A.prototype.resume=function(){var w=this._readableState;return w.flowing||(g("resume"),w.flowing=!0,function(h,B){B.resumeScheduled||(B.resumeScheduled=!0,l.nextTick(P,h,B))}(this,w)),this},A.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(w){var h=this,B=this._readableState,z=!1;for(var X in w.on("end",function(){if(g("wrapped end"),B.decoder&&!B.ended){var te=B.decoder.end();te&&te.length&&h.push(te)}h.push(null)}),w.on("data",function(te){g("wrapped data"),B.decoder&&(te=B.decoder.write(te)),B.objectMode&&te==null||(B.objectMode||te&&te.length)&&(h.push(te)||(z=!0,w.pause()))}),w)this[X]===void 0&&typeof w[X]=="function"&&(this[X]=function(te){return function(){return w[te].apply(w,arguments)}}(X));for(var Q=0;Q<V.length;Q++)w.on(V[Q],this.emit.bind(this,V[Q]));return this._read=function(te){g("wrapped _read",te),z&&(z=!1,w.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=D}).call(this,n(6),n(2))},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){var r=n(16);function o(l,s){l.emit("error",s)}e.exports={destroy:function(l,s){var i=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(l):!l||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(m){!s&&m?(r.nextTick(o,i,m),i._writableState&&(i._writableState.errorEmitted=!0)):s&&s(m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){e.exports=s;var r=n(23),o=n(17);function l(u,m){var R=this._transformState;R.transforming=!1;var E=R.writecb;if(!E)return this.emit("error",new Error("write callback called multiple times"));R.writechunk=null,R.writecb=null,m!=null&&this.push(m),E(u);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);r.call(this,u),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",i)}function i(){var u=this;typeof this._flush=="function"?this._flush(function(m,R){c(u,m,R)}):c(this,null,null)}function c(u,m,R){if(m)return u.emit("error",m);if(R!=null&&u.push(R),u._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(u._transformState.transforming)throw new Error("Calling transform done when still transforming");return u.push(null)}o.inherits=n(7),o.inherits(s,r),s.prototype.push=function(u,m){return this._transformState.needTransform=!1,r.prototype.push.call(this,u,m)},s.prototype._transform=function(u,m,R){throw new Error("_transform() is not implemented")},s.prototype._write=function(u,m,R){var E=this._transformState;if(E.writecb=R,E.writechunk=u,E.writeencoding=m,!E.transforming){var y=this._readableState;(E.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},s.prototype._read=function(u){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},s.prototype._destroy=function(u,m){var R=this;r.prototype._destroy.call(this,u,function(E){m(E),R.emit("close")})}},function(e,t,n){e.exports=n(48)},function(e,t,n){(function(r){var o=n(170);function l(d,p){if(d===p)return 0;for(var C=d.length,b=p.length,P=0,F=Math.min(C,b);P<F;++P)if(d[P]!==p[P]){C=d[P],b=p[P];break}return C<b?-1:b<C?1:0}function s(d){return r.Buffer&&typeof r.Buffer.isBuffer=="function"?r.Buffer.isBuffer(d):!(d==null||!d._isBuffer)}var i=n(13),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,m=function(){}.name==="foo";function R(d){return Object.prototype.toString.call(d)}function E(d){return!s(d)&&typeof r.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(d):!!d&&(d instanceof DataView||!!(d.buffer&&d.buffer instanceof ArrayBuffer)))}var y=e.exports=M,g=/\s*function\s+([^\(\s]*)\s*/;function _(d){if(i.isFunction(d)){if(m)return d.name;var p=d.toString().match(g);return p&&p[1]}}function T(d,p){return typeof d=="string"?d.length<p?d:d.slice(0,p):d}function L(d){if(m||!i.isFunction(d))return i.inspect(d);var p=_(d);return"[Function"+(p?": "+p:"")+"]"}function V(d,p,C,b,P){throw new y.AssertionError({message:C,actual:d,expected:p,operator:b,stackStartFunction:P})}function M(d,p){d||V(d,!0,p,"==",y.ok)}function A(d,p,C,b){if(d===p)return!0;if(s(d)&&s(p))return l(d,p)===0;if(i.isDate(d)&&i.isDate(p))return d.getTime()===p.getTime();if(i.isRegExp(d)&&i.isRegExp(p))return d.source===p.source&&d.global===p.global&&d.multiline===p.multiline&&d.lastIndex===p.lastIndex&&d.ignoreCase===p.ignoreCase;if(d!==null&&typeof d=="object"||p!==null&&typeof p=="object"){if(E(d)&&E(p)&&R(d)===R(p)&&!(d instanceof Float32Array||d instanceof Float64Array))return l(new Uint8Array(d.buffer),new Uint8Array(p.buffer))===0;if(s(d)!==s(p))return!1;var P=(b=b||{actual:[],expected:[]}).actual.indexOf(d);return P!==-1&&P===b.expected.indexOf(p)||(b.actual.push(d),b.expected.push(p),function(F,D,I,N){if(F==null||D==null)return!1;if(i.isPrimitive(F)||i.isPrimitive(D))return F===D;if(I&&Object.getPrototypeOf(F)!==Object.getPrototypeOf(D))return!1;var k=f(F),w=f(D);if(k&&!w||!k&&w)return!1;if(k)return F=u.call(F),D=u.call(D),A(F,D,I);var h,B,z=Z(F),X=Z(D);if(z.length!==X.length)return!1;for(z.sort(),X.sort(),B=z.length-1;B>=0;B--)if(z[B]!==X[B])return!1;for(B=z.length-1;B>=0;B--)if(h=z[B],!A(F[h],D[h],I,N))return!1;return!0}(d,p,C,b))}return C?d===p:d==p}function f(d){return Object.prototype.toString.call(d)=="[object Arguments]"}function O(d,p){if(!d||!p)return!1;if(Object.prototype.toString.call(p)=="[object RegExp]")return p.test(d);try{if(d instanceof p)return!0}catch{}return!Error.isPrototypeOf(p)&&p.call({},d)===!0}function Y(d,p,C,b){var P;if(typeof p!="function")throw new TypeError('"block" argument must be a function');typeof C=="string"&&(b=C,C=null),P=function(I){var N;try{I()}catch(k){N=k}return N}(p),b=(C&&C.name?" ("+C.name+").":".")+(b?" "+b:"."),d&&!P&&V(P,C,"Missing expected exception"+b);var F=typeof b=="string",D=!d&&P&&!C;if((!d&&i.isError(P)&&F&&O(P,C)||D)&&V(P,C,"Got unwanted exception"+b),d&&P&&C&&!O(P,C)||!d&&P)throw P}y.AssertionError=function(d){this.name="AssertionError",this.actual=d.actual,this.expected=d.expected,this.operator=d.operator,d.message?(this.message=d.message,this.generatedMessage=!1):(this.message=function(I){return T(L(I.actual),128)+" "+I.operator+" "+T(L(I.expected),128)}(this),this.generatedMessage=!0);var p=d.stackStartFunction||V;if(Error.captureStackTrace)Error.captureStackTrace(this,p);else{var C=new Error;if(C.stack){var b=C.stack,P=_(p),F=b.indexOf(`
23
- `+P);if(F>=0){var D=b.indexOf(`
24
- `,F+1);b=b.substring(D+1)}this.stack=b}}},i.inherits(y.AssertionError,Error),y.fail=V,y.ok=M,y.equal=function(d,p,C){d!=p&&V(d,p,C,"==",y.equal)},y.notEqual=function(d,p,C){d==p&&V(d,p,C,"!=",y.notEqual)},y.deepEqual=function(d,p,C){A(d,p,!1)||V(d,p,C,"deepEqual",y.deepEqual)},y.deepStrictEqual=function(d,p,C){A(d,p,!0)||V(d,p,C,"deepStrictEqual",y.deepStrictEqual)},y.notDeepEqual=function(d,p,C){A(d,p,!1)&&V(d,p,C,"notDeepEqual",y.notDeepEqual)},y.notDeepStrictEqual=function d(p,C,b){A(p,C,!0)&&V(p,C,b,"notDeepStrictEqual",d)},y.strictEqual=function(d,p,C){d!==p&&V(d,p,C,"===",y.strictEqual)},y.notStrictEqual=function(d,p,C){d===p&&V(d,p,C,"!==",y.notStrictEqual)},y.throws=function(d,p,C){Y(!0,d,p,C)},y.doesNotThrow=function(d,p,C){Y(!1,d,p,C)},y.ifError=function(d){if(d)throw d},y.strict=o(function d(p,C){p||V(p,!0,C,"==",d)},y,{equal:y.strictEqual,deepEqual:y.deepStrictEqual,notEqual:y.notStrictEqual,notDeepEqual:y.notDeepStrictEqual}),y.strict.strict=y.strict;var Z=Object.keys||function(d){var p=[];for(var C in d)c.call(d,C)&&p.push(C);return p}}).call(this,n(6))},function(e,t,n){e.exports=function(r,o,l,s){for(var i=65535&r|0,c=r>>>16&65535|0,u=0;l!==0;){l-=u=l>2e3?2e3:l;do c=c+(i=i+o[s++]|0)|0;while(--u);i%=65521,c%=65521}return i|c<<16|0}},function(e,t,n){var r=function(){for(var o,l=[],s=0;s<256;s++){o=s;for(var i=0;i<8;i++)o=1&o?3988292384^o>>>1:o>>>1;l[s]=o}return l}();e.exports=function(o,l,s,i){var c=r,u=i+s;o^=-1;for(var m=i;m<u;m++)o=o>>>8^c[255&(o^l[m])];return-1^o}},function(e,t,n){(function(r,o){var l;e.exports=p,p.ReadableState=d,n(21).EventEmitter;var s=function(q,H){return q.listeners(H).length},i=n(78),c=n(5).Buffer,u=r.Uint8Array||function(){},m,R=n(179);m=R&&R.debuglog?R.debuglog("stream"):function(){};var E,y,g,_=n(180),T=n(79),L=n(80).getHighWaterMark,V=n(26).codes,M=V.ERR_INVALID_ARG_TYPE,A=V.ERR_STREAM_PUSH_AFTER_EOF,f=V.ERR_METHOD_NOT_IMPLEMENTED,O=V.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(7)(p,i);var Y=T.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function d(q,H,v){l=l||n(27),q=q||{},typeof v!="boolean"&&(v=H instanceof l),this.objectMode=!!q.objectMode,v&&(this.objectMode=this.objectMode||!!q.readableObjectMode),this.highWaterMark=L(this,q,"readableHighWaterMark",v),this.buffer=new _,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(E||(E=n(22).StringDecoder),this.decoder=new E(q.encoding),this.encoding=q.encoding)}function p(q){if(l=l||n(27),!(this instanceof p))return new p(q);var H=this instanceof l;this._readableState=new d(q,this,H),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),i.call(this)}function C(q,H,v,S,U){m("readableAddChunk",H);var J,$=q._readableState;if(H===null)$.reading=!1,function(ne,se){if(m("onEofChunk"),!se.ended){if(se.decoder){var ge=se.decoder.end();ge&&ge.length&&(se.buffer.push(ge),se.length+=se.objectMode?1:ge.length)}se.ended=!0,se.sync?F(ne):(se.needReadable=!1,se.emittedReadable||(se.emittedReadable=!0,D(ne)))}}(q,$);else if(U||(J=function(ne,se){var ge;ve=se,c.isBuffer(ve)||ve instanceof u||typeof se=="string"||se===void 0||ne.objectMode||(ge=new M("chunk",["string","Buffer","Uint8Array"],se));var ve;return ge}($,H)),J)Y(q,J);else if($.objectMode||H&&H.length>0)if(typeof H=="string"||$.objectMode||Object.getPrototypeOf(H)===c.prototype||(H=function(ne){return c.from(ne)}(H)),S)$.endEmitted?Y(q,new O):b(q,$,H,!0);else if($.ended)Y(q,new A);else{if($.destroyed)return!1;$.reading=!1,$.decoder&&!v?(H=$.decoder.write(H),$.objectMode||H.length!==0?b(q,$,H,!1):I(q,$)):b(q,$,H,!1)}else S||($.reading=!1,I(q,$));return!$.ended&&($.length<$.highWaterMark||$.length===0)}function b(q,H,v,S){H.flowing&&H.length===0&&!H.sync?(H.awaitDrain=0,q.emit("data",v)):(H.length+=H.objectMode?1:v.length,S?H.buffer.unshift(v):H.buffer.push(v),H.needReadable&&F(q)),I(q,H)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),p.prototype.destroy=T.destroy,p.prototype._undestroy=T.undestroy,p.prototype._destroy=function(q,H){H(q)},p.prototype.push=function(q,H){var v,S=this._readableState;return S.objectMode?v=!0:typeof q=="string"&&((H=H||S.defaultEncoding)!==S.encoding&&(q=c.from(q,H),H=""),v=!0),C(this,q,H,!1,v)},p.prototype.unshift=function(q){return C(this,q,null,!0,!1)},p.prototype.isPaused=function(){return this._readableState.flowing===!1},p.prototype.setEncoding=function(q){E||(E=n(22).StringDecoder);var H=new E(q);this._readableState.decoder=H,this._readableState.encoding=this._readableState.decoder.encoding;for(var v=this._readableState.buffer.head,S="";v!==null;)S+=H.write(v.data),v=v.next;return this._readableState.buffer.clear(),S!==""&&this._readableState.buffer.push(S),this._readableState.length=S.length,this};function P(q,H){return q<=0||H.length===0&&H.ended?0:H.objectMode?1:q!=q?H.flowing&&H.length?H.buffer.head.data.length:H.length:(q>H.highWaterMark&&(H.highWaterMark=function(v){return v>=1073741824?v=1073741824:(v--,v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v++),v}(q)),q<=H.length?q:H.ended?H.length:(H.needReadable=!0,0))}function F(q){var H=q._readableState;m("emitReadable",H.needReadable,H.emittedReadable),H.needReadable=!1,H.emittedReadable||(m("emitReadable",H.flowing),H.emittedReadable=!0,o.nextTick(D,q))}function D(q){var H=q._readableState;m("emitReadable_",H.destroyed,H.length,H.ended),H.destroyed||!H.length&&!H.ended||(q.emit("readable"),H.emittedReadable=!1),H.needReadable=!H.flowing&&!H.ended&&H.length<=H.highWaterMark,B(q)}function I(q,H){H.readingMore||(H.readingMore=!0,o.nextTick(N,q,H))}function N(q,H){for(;!H.reading&&!H.ended&&(H.length<H.highWaterMark||H.flowing&&H.length===0);){var v=H.length;if(m("maybeReadMore read 0"),q.read(0),v===H.length)break}H.readingMore=!1}function k(q){var H=q._readableState;H.readableListening=q.listenerCount("readable")>0,H.resumeScheduled&&!H.paused?H.flowing=!0:q.listenerCount("data")>0&&q.resume()}function w(q){m("readable nexttick read 0"),q.read(0)}function h(q,H){m("resume",H.reading),H.reading||q.read(0),H.resumeScheduled=!1,q.emit("resume"),B(q),H.flowing&&!H.reading&&q.read(0)}function B(q){var H=q._readableState;for(m("flow",H.flowing);H.flowing&&q.read()!==null;);}function z(q,H){return H.length===0?null:(H.objectMode?v=H.buffer.shift():!q||q>=H.length?(v=H.decoder?H.buffer.join(""):H.buffer.length===1?H.buffer.first():H.buffer.concat(H.length),H.buffer.clear()):v=H.buffer.consume(q,H.decoder),v);var v}function X(q){var H=q._readableState;m("endReadable",H.endEmitted),H.endEmitted||(H.ended=!0,o.nextTick(Q,H,q))}function Q(q,H){if(m("endReadableNT",q.endEmitted,q.length),!q.endEmitted&&q.length===0&&(q.endEmitted=!0,H.readable=!1,H.emit("end"),q.autoDestroy)){var v=H._writableState;(!v||v.autoDestroy&&v.finished)&&H.destroy()}}function te(q,H){for(var v=0,S=q.length;v<S;v++)if(q[v]===H)return v;return-1}p.prototype.read=function(q){m("read",q),q=parseInt(q,10);var H=this._readableState,v=q;if(q!==0&&(H.emittedReadable=!1),q===0&&H.needReadable&&((H.highWaterMark!==0?H.length>=H.highWaterMark:H.length>0)||H.ended))return m("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?X(this):F(this),null;if((q=P(q,H))===0&&H.ended)return H.length===0&&X(this),null;var S,U=H.needReadable;return m("need readable",U),(H.length===0||H.length-q<H.highWaterMark)&&m("length less than watermark",U=!0),H.ended||H.reading?m("reading or ended",U=!1):U&&(m("do read"),H.reading=!0,H.sync=!0,H.length===0&&(H.needReadable=!0),this._read(H.highWaterMark),H.sync=!1,H.reading||(q=P(v,H))),(S=q>0?z(q,H):null)===null?(H.needReadable=H.length<=H.highWaterMark,q=0):(H.length-=q,H.awaitDrain=0),H.length===0&&(H.ended||(H.needReadable=!0),v!==q&&H.ended&&X(this)),S!==null&&this.emit("data",S),S},p.prototype._read=function(q){Y(this,new f("_read()"))},p.prototype.pipe=function(q,H){var v=this,S=this._readableState;switch(S.pipesCount){case 0:S.pipes=q;break;case 1:S.pipes=[S.pipes,q];break;default:S.pipes.push(q)}S.pipesCount+=1,m("pipe count=%d opts=%j",S.pipesCount,H);var U=(!H||H.end!==!1)&&q!==o.stdout&&q!==o.stderr?$:Ce;function J(Ee,Te){m("onunpipe"),Ee===v&&Te&&Te.hasUnpiped===!1&&(Te.hasUnpiped=!0,m("cleanup"),q.removeListener("close",Oe),q.removeListener("finish",Se),q.removeListener("drain",ne),q.removeListener("error",ve),q.removeListener("unpipe",J),v.removeListener("end",$),v.removeListener("end",Ce),v.removeListener("data",ge),se=!0,!S.awaitDrain||q._writableState&&!q._writableState.needDrain||ne())}function $(){m("onend"),q.end()}S.endEmitted?o.nextTick(U):v.once("end",U),q.on("unpipe",J);var ne=function(Ee){return function(){var Te=Ee._readableState;m("pipeOnDrain",Te.awaitDrain),Te.awaitDrain&&Te.awaitDrain--,Te.awaitDrain===0&&s(Ee,"data")&&(Te.flowing=!0,B(Ee))}}(v);q.on("drain",ne);var se=!1;function ge(Ee){m("ondata");var Te=q.write(Ee);m("dest.write",Te),Te===!1&&((S.pipesCount===1&&S.pipes===q||S.pipesCount>1&&te(S.pipes,q)!==-1)&&!se&&(m("false write response, pause",S.awaitDrain),S.awaitDrain++),v.pause())}function ve(Ee){m("onerror",Ee),Ce(),q.removeListener("error",ve),s(q,"error")===0&&Y(q,Ee)}function Oe(){q.removeListener("finish",Se),Ce()}function Se(){m("onfinish"),q.removeListener("close",Oe),Ce()}function Ce(){m("unpipe"),v.unpipe(q)}return v.on("data",ge),function(Ee,Te,De){if(typeof Ee.prependListener=="function")return Ee.prependListener(Te,De);Ee._events&&Ee._events[Te]?Array.isArray(Ee._events[Te])?Ee._events[Te].unshift(De):Ee._events[Te]=[De,Ee._events[Te]]:Ee.on(Te,De)}(q,"error",ve),q.once("close",Oe),q.once("finish",Se),q.emit("pipe",v),S.flowing||(m("pipe resume"),v.resume()),q},p.prototype.unpipe=function(q){var H=this._readableState,v={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return q&&q!==H.pipes||(q||(q=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,q&&q.emit("unpipe",this,v)),this;if(!q){var S=H.pipes,U=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var J=0;J<U;J++)S[J].emit("unpipe",this,{hasUnpiped:!1});return this}var $=te(H.pipes,q);return $===-1||(H.pipes.splice($,1),H.pipesCount-=1,H.pipesCount===1&&(H.pipes=H.pipes[0]),q.emit("unpipe",this,v)),this},p.prototype.on=function(q,H){var v=i.prototype.on.call(this,q,H),S=this._readableState;return q==="data"?(S.readableListening=this.listenerCount("readable")>0,S.flowing!==!1&&this.resume()):q==="readable"&&(S.endEmitted||S.readableListening||(S.readableListening=S.needReadable=!0,S.flowing=!1,S.emittedReadable=!1,m("on readable",S.length,S.reading),S.length?F(this):S.reading||o.nextTick(w,this))),v},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(q,H){var v=i.prototype.removeListener.call(this,q,H);return q==="readable"&&o.nextTick(k,this),v},p.prototype.removeAllListeners=function(q){var H=i.prototype.removeAllListeners.apply(this,arguments);return q!=="readable"&&q!==void 0||o.nextTick(k,this),H},p.prototype.resume=function(){var q=this._readableState;return q.flowing||(m("resume"),q.flowing=!q.readableListening,function(H,v){v.resumeScheduled||(v.resumeScheduled=!0,o.nextTick(h,H,v))}(this,q)),q.paused=!1,this},p.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},p.prototype.wrap=function(q){var H=this,v=this._readableState,S=!1;for(var U in q.on("end",function(){if(m("wrapped end"),v.decoder&&!v.ended){var $=v.decoder.end();$&&$.length&&H.push($)}H.push(null)}),q.on("data",function($){m("wrapped data"),v.decoder&&($=v.decoder.write($)),v.objectMode&&$==null||(v.objectMode||$&&$.length)&&(H.push($)||(S=!0,q.pause()))}),q)this[U]===void 0&&typeof q[U]=="function"&&(this[U]=function($){return function(){return q[$].apply(q,arguments)}}(U));for(var J=0;J<Z.length;J++)q.on(Z[J],this.emit.bind(this,Z[J]));return this._read=function($){m("wrapped _read",$),S&&(S=!1,q.resume())},this},typeof Symbol=="function"&&(p.prototype[Symbol.asyncIterator]=function(){return y===void 0&&(y=n(182)),y(this)}),Object.defineProperty(p.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(p.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(p.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(q){this._readableState&&(this._readableState.flowing=q)}}),p._fromList=z,Object.defineProperty(p.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(p.from=function(q,H){return g===void 0&&(g=n(183)),g(p,q,H)})}).call(this,n(6),n(2))},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){(function(r){function o(i,c){s(i,c),l(i)}function l(i){i._writableState&&!i._writableState.emitClose||i._readableState&&!i._readableState.emitClose||i.emit("close")}function s(i,c){i.emit("error",c)}e.exports={destroy:function(i,c){var u=this,m=this._readableState&&this._readableState.destroyed,R=this._writableState&&this._writableState.destroyed;return m||R?(c?c(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(s,this,i)):r.nextTick(s,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,function(E){!c&&E?u._writableState?u._writableState.errorEmitted?r.nextTick(l,u):(u._writableState.errorEmitted=!0,r.nextTick(o,u,E)):r.nextTick(o,u,E):c?(r.nextTick(l,u),c(E)):r.nextTick(l,u)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(i,c){var u=i._readableState,m=i._writableState;u&&u.autoDestroy||m&&m.autoDestroy?i.destroy(c):i.emit("error",c)}}}).call(this,n(2))},function(e,t,n){var r=n(26).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(o,l,s,i){var c=function(u,m,R){return u.highWaterMark!=null?u.highWaterMark:m?u[R]:null}(l,i,s);if(c!=null){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new r(i?s:"highWaterMark",c);return Math.floor(c)}return o.objectMode?16:16384}}},function(e,t,n){(function(r,o){function l(N){var k=this;this.next=null,this.entry=null,this.finish=function(){(function(w,h,B){var z=w.entry;for(w.entry=null;z;){var X=z.callback;h.pendingcb--,X(B),z=z.next}h.corkedRequestsFree.next=w})(k,N)}}var s;e.exports=p,p.WritableState=d;var i={deprecate:n(43)},c=n(78),u=n(5).Buffer,m=r.Uint8Array||function(){},R,E=n(79),y=n(80).getHighWaterMark,g=n(26).codes,_=g.ERR_INVALID_ARG_TYPE,T=g.ERR_METHOD_NOT_IMPLEMENTED,L=g.ERR_MULTIPLE_CALLBACK,V=g.ERR_STREAM_CANNOT_PIPE,M=g.ERR_STREAM_DESTROYED,A=g.ERR_STREAM_NULL_VALUES,f=g.ERR_STREAM_WRITE_AFTER_END,O=g.ERR_UNKNOWN_ENCODING,Y=E.errorOrDestroy;function Z(){}function d(N,k,w){s=s||n(27),N=N||{},typeof w!="boolean"&&(w=k instanceof s),this.objectMode=!!N.objectMode,w&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=y(this,N,"writableHighWaterMark",w),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=N.decodeStrings===!1;this.decodeStrings=!h,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(B){(function(z,X){var Q=z._writableState,te=Q.sync,q=Q.writecb;if(typeof q!="function")throw new L;if(function(v){v.writing=!1,v.writecb=null,v.length-=v.writelen,v.writelen=0}(Q),X)(function(v,S,U,J,$){--S.pendingcb,U?(o.nextTick($,J),o.nextTick(I,v,S),v._writableState.errorEmitted=!0,Y(v,J)):($(J),v._writableState.errorEmitted=!0,Y(v,J),I(v,S))})(z,Q,te,X,q);else{var H=F(Q)||z.destroyed;H||Q.corked||Q.bufferProcessing||!Q.bufferedRequest||P(z,Q),te?o.nextTick(b,z,Q,H,q):b(z,Q,H,q)}})(k,B)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new l(this)}function p(N){var k=this instanceof(s=s||n(27));if(!k&&!R.call(p,this))return new p(N);this._writableState=new d(N,this,k),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),c.call(this)}function C(N,k,w,h,B,z,X){k.writelen=h,k.writecb=X,k.writing=!0,k.sync=!0,k.destroyed?k.onwrite(new M("write")):w?N._writev(B,k.onwrite):N._write(B,z,k.onwrite),k.sync=!1}function b(N,k,w,h){w||function(B,z){z.length===0&&z.needDrain&&(z.needDrain=!1,B.emit("drain"))}(N,k),k.pendingcb--,h(),I(N,k)}function P(N,k){k.bufferProcessing=!0;var w=k.bufferedRequest;if(N._writev&&w&&w.next){var h=k.bufferedRequestCount,B=new Array(h),z=k.corkedRequestsFree;z.entry=w;for(var X=0,Q=!0;w;)B[X]=w,w.isBuf||(Q=!1),w=w.next,X+=1;B.allBuffers=Q,C(N,k,!0,k.length,B,"",z.finish),k.pendingcb++,k.lastBufferedRequest=null,z.next?(k.corkedRequestsFree=z.next,z.next=null):k.corkedRequestsFree=new l(k),k.bufferedRequestCount=0}else{for(;w;){var te=w.chunk,q=w.encoding,H=w.callback;if(C(N,k,!1,k.objectMode?1:te.length,te,q,H),w=w.next,k.bufferedRequestCount--,k.writing)break}w===null&&(k.lastBufferedRequest=null)}k.bufferedRequest=w,k.bufferProcessing=!1}function F(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function D(N,k){N._final(function(w){k.pendingcb--,w&&Y(N,w),k.prefinished=!0,N.emit("prefinish"),I(N,k)})}function I(N,k){var w=F(k);if(w&&(function(B,z){z.prefinished||z.finalCalled||(typeof B._final!="function"||z.destroyed?(z.prefinished=!0,B.emit("prefinish")):(z.pendingcb++,z.finalCalled=!0,o.nextTick(D,B,z)))}(N,k),k.pendingcb===0&&(k.finished=!0,N.emit("finish"),k.autoDestroy))){var h=N._readableState;(!h||h.autoDestroy&&h.endEmitted)&&N.destroy()}return w}n(7)(p,c),d.prototype.getBuffer=function(){for(var N=this.bufferedRequest,k=[];N;)k.push(N),N=N.next;return k},function(){try{Object.defineProperty(d.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(N){return!!R.call(this,N)||this===p&&N&&N._writableState instanceof d}})):R=function(N){return N instanceof this},p.prototype.pipe=function(){Y(this,new V)},p.prototype.write=function(N,k,w){var h,B=this._writableState,z=!1,X=!B.objectMode&&(h=N,u.isBuffer(h)||h instanceof m);return X&&!u.isBuffer(N)&&(N=function(Q){return u.from(Q)}(N)),typeof k=="function"&&(w=k,k=null),X?k="buffer":k||(k=B.defaultEncoding),typeof w!="function"&&(w=Z),B.ending?function(Q,te){var q=new f;Y(Q,q),o.nextTick(te,q)}(this,w):(X||function(Q,te,q,H){var v;return q===null?v=new A:typeof q=="string"||te.objectMode||(v=new _("chunk",["string","Buffer"],q)),!v||(Y(Q,v),o.nextTick(H,v),!1)}(this,B,N,w))&&(B.pendingcb++,z=function(Q,te,q,H,v,S){if(!q){var U=function(se,ge,ve){return se.objectMode||se.decodeStrings===!1||typeof ge!="string"||(ge=u.from(ge,ve)),ge}(te,H,v);H!==U&&(q=!0,v="buffer",H=U)}var J=te.objectMode?1:H.length;te.length+=J;var $=te.length<te.highWaterMark;if($||(te.needDrain=!0),te.writing||te.corked){var ne=te.lastBufferedRequest;te.lastBufferedRequest={chunk:H,encoding:v,isBuf:q,callback:S,next:null},ne?ne.next=te.lastBufferedRequest:te.bufferedRequest=te.lastBufferedRequest,te.bufferedRequestCount+=1}else C(Q,te,!1,J,H,v,S);return $}(this,B,X,N,k,w)),z},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var N=this._writableState;N.corked&&(N.corked--,N.writing||N.corked||N.bufferProcessing||!N.bufferedRequest||P(this,N))},p.prototype.setDefaultEncoding=function(N){if(typeof N=="string"&&(N=N.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((N+"").toLowerCase())>-1))throw new O(N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(N,k,w){w(new T("_write()"))},p.prototype._writev=null,p.prototype.end=function(N,k,w){var h=this._writableState;return typeof N=="function"?(w=N,N=null,k=null):typeof k=="function"&&(w=k,k=null),N!=null&&this.write(N,k),h.corked&&(h.corked=1,this.uncork()),h.ending||function(B,z,X){z.ending=!0,I(B,z),X&&(z.finished?o.nextTick(X):B.once("finish",X)),z.ended=!0,B.writable=!1}(this,h,w),this},Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),p.prototype.destroy=E.destroy,p.prototype._undestroy=E.undestroy,p.prototype._destroy=function(N,k){k(N)}}).call(this,n(6),n(2))},function(e,t,n){e.exports=m;var r=n(26).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,l=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(27);function u(y,g){var _=this._transformState;_.transforming=!1;var T=_.writecb;if(T===null)return this.emit("error",new l);_.writechunk=null,_.writecb=null,g!=null&&this.push(g),T(y);var L=this._readableState;L.reading=!1,(L.needReadable||L.length<L.highWaterMark)&&this._read(L.highWaterMark)}function m(y){if(!(this instanceof m))return new m(y);c.call(this,y),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",R)}function R(){var y=this;typeof this._flush!="function"||this._readableState.destroyed?E(this,null,null):this._flush(function(g,_){E(y,g,_)})}function E(y,g,_){if(g)return y.emit("error",g);if(_!=null&&y.push(_),y._writableState.length)throw new i;if(y._transformState.transforming)throw new s;return y.push(null)}n(7)(m,c),m.prototype.push=function(y,g){return this._transformState.needTransform=!1,c.prototype.push.call(this,y,g)},m.prototype._transform=function(y,g,_){_(new o("_transform()"))},m.prototype._write=function(y,g,_){var T=this._transformState;if(T.writecb=_,T.writechunk=y,T.writeencoding=g,!T.transforming){var L=this._readableState;(T.needTransform||L.needReadable||L.length<L.highWaterMark)&&this._read(L.highWaterMark)}},m.prototype._read=function(y){var g=this._transformState;g.writechunk===null||g.transforming?g.needTransform=!0:(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform))},m.prototype._destroy=function(y,g){c.prototype._destroy.call(this,y,function(_){g(_)})}},function(e,t,n){(function(r){var o=n(190),l=n(85),s=n(192),i=n(193),c=n(86),u=t;u.request=function(m,R){m=typeof m=="string"?c.parse(m):s(m);var E=r.location.protocol.search(/^https?:$/)===-1?"http:":"",y=m.protocol||E,g=m.hostname||m.host,_=m.port,T=m.path||"/";g&&g.indexOf(":")!==-1&&(g="["+g+"]"),m.url=(g?y+"//"+g:"")+(_?":"+_:"")+T,m.method=(m.method||"GET").toUpperCase(),m.headers=m.headers||{};var L=new o(m);return R&&L.on("response",R),L},u.get=function(m,R){var E=u.request(m,R);return E.end(),E},u.ClientRequest=o,u.IncomingMessage=l.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=i,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(6))},function(e,t,n){(function(r){t.fetch=u(r.fetch)&&u(r.ReadableStream),t.writableStream=u(r.WritableStream),t.abortController=u(r.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch{}var o;function l(){if(o!==void 0)return o;if(r.XMLHttpRequest){o=new r.XMLHttpRequest;try{o.open("GET",r.XDomainRequest?"/":"https://example.com")}catch{o=null}}else o=null;return o}function s(m){var R=l();if(!R)return!1;try{return R.responseType=m,R.responseType===m}catch{}return!1}var i=r.ArrayBuffer!==void 0,c=i&&u(r.ArrayBuffer.prototype.slice);function u(m){return typeof m=="function"}t.arraybuffer=t.fetch||i&&s("arraybuffer"),t.msstream=!t.fetch&&c&&s("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&s("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!l()&&u(l().overrideMimeType),t.vbArray=u(r.VBArray),o=null}).call(this,n(6))},function(e,t,n){(function(r,o,l){var s=n(84),i=n(7),c=n(31),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},m=t.IncomingMessage=function(R,E,y,g){var _=this;if(c.Readable.call(_),_._mode=y,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){r.nextTick(function(){_.emit("close")})}),y==="fetch"){if(_._fetchResponse=E,_.url=E.url,_.statusCode=E.status,_.statusMessage=E.statusText,E.headers.forEach(function(A,f){_.headers[f.toLowerCase()]=A,_.rawHeaders.push(f,A)}),s.writableStream){var T=new WritableStream({write:function(A){return new Promise(function(f,O){_._destroyed?O():_.push(new o(A))?f():_._resumeFetch=f})},close:function(){l.clearTimeout(g),_._destroyed||_.push(null)},abort:function(A){_._destroyed||_.emit("error",A)}});try{return void E.body.pipeTo(T).catch(function(A){l.clearTimeout(g),_._destroyed||_.emit("error",A)})}catch{}}var L=E.body.getReader();(function A(){L.read().then(function(f){if(!_._destroyed){if(f.done)return l.clearTimeout(g),void _.push(null);_.push(new o(f.value)),A()}}).catch(function(f){l.clearTimeout(g),_._destroyed||_.emit("error",f)})})()}else if(_._xhr=R,_._pos=0,_.url=R.responseURL,_.statusCode=R.status,_.statusMessage=R.statusText,R.getAllResponseHeaders().split(/\r?\n/).forEach(function(A){var f=A.match(/^([^:]+):\s*(.*)/);if(f){var O=f[1].toLowerCase();O==="set-cookie"?(_.headers[O]===void 0&&(_.headers[O]=[]),_.headers[O].push(f[2])):_.headers[O]!==void 0?_.headers[O]+=", "+f[2]:_.headers[O]=f[2],_.rawHeaders.push(f[1],f[2])}}),_._charset="x-user-defined",!s.overrideMimeType){var V=_.rawHeaders["mime-type"];if(V){var M=V.match(/;\s*charset=([^;])(;|$)/);M&&(_._charset=M[1].toLowerCase())}_._charset||(_._charset="utf-8")}};i(m,c.Readable),m.prototype._read=function(){var R=this._resumeFetch;R&&(this._resumeFetch=null,R())},m.prototype._onXHRProgress=function(){var R=this,E=R._xhr,y=null;switch(R._mode){case"text:vbarray":if(E.readyState!==u.DONE)break;try{y=new l.VBArray(E.responseBody).toArray()}catch{}if(y!==null){R.push(new o(y));break}case"text":try{y=E.responseText}catch{R._mode="text:vbarray";break}if(y.length>R._pos){var g=y.substr(R._pos);if(R._charset==="x-user-defined"){for(var _=new o(g.length),T=0;T<g.length;T++)_[T]=255&g.charCodeAt(T);R.push(_)}else R.push(g,R._charset);R._pos=y.length}break;case"arraybuffer":if(E.readyState!==u.DONE||!E.response)break;y=E.response,R.push(new o(new Uint8Array(y)));break;case"moz-chunked-arraybuffer":if(y=E.response,E.readyState!==u.LOADING||!y)break;R.push(new o(new Uint8Array(y)));break;case"ms-stream":if(y=E.response,E.readyState!==u.LOADING)break;var L=new l.MSStreamReader;L.onprogress=function(){L.result.byteLength>R._pos&&(R.push(new o(new Uint8Array(L.result.slice(R._pos)))),R._pos=L.result.byteLength)},L.onload=function(){R.push(null)},L.readAsArrayBuffer(y)}R._xhr.readyState===u.DONE&&R._mode!=="ms-stream"&&R.push(null)}}).call(this,n(2),n(5).Buffer,n(6))},function(e,t,n){var r=n(194),o=n(196);function l(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=M,t.resolve=function(A,f){return M(A,!1,!0).resolve(f)},t.resolveObject=function(A,f){return A?M(A,!1,!0).resolveObject(f):f},t.format=function(A){return o.isString(A)&&(A=M(A)),A instanceof l?A.format():l.prototype.format.call(A)},t.Url=l;var s=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
25
- `," "]),m=["'"].concat(u),R=["%","/","?",";","#"].concat(m),E=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},T={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},V=n(197);function M(A,f,O){if(A&&o.isObject(A)&&A instanceof l)return A;var Y=new l;return Y.parse(A,f,O),Y}l.prototype.parse=function(A,f,O){if(!o.isString(A))throw new TypeError("Parameter 'url' must be a string, not "+typeof A);var Y=A.indexOf("?"),Z=Y!==-1&&Y<A.indexOf("#")?"?":"#",d=A.split(Z);d[0]=d[0].replace(/\\/g,"/");var p=A=d.join(Z);if(p=p.trim(),!O&&A.split("#").length===1){var C=c.exec(p);if(C)return this.path=p,this.href=p,this.pathname=C[1],C[2]?(this.search=C[2],this.query=f?V.parse(this.search.substr(1)):this.search.substr(1)):f&&(this.search="",this.query={}),this}var b=s.exec(p);if(b){var P=(b=b[0]).toLowerCase();this.protocol=P,p=p.substr(b.length)}if(O||b||p.match(/^\/\/[^@\/]+@[^@\/]+/)){var F=p.substr(0,2)==="//";!F||b&&T[b]||(p=p.substr(2),this.slashes=!0)}if(!T[b]&&(F||b&&!L[b])){for(var D,I,N=-1,k=0;k<E.length;k++)(w=p.indexOf(E[k]))!==-1&&(N===-1||w<N)&&(N=w);for((I=N===-1?p.lastIndexOf("@"):p.lastIndexOf("@",N))!==-1&&(D=p.slice(0,I),p=p.slice(I+1),this.auth=decodeURIComponent(D)),N=-1,k=0;k<R.length;k++){var w;(w=p.indexOf(R[k]))!==-1&&(N===-1||w<N)&&(N=w)}N===-1&&(N=p.length),this.host=p.slice(0,N),p=p.slice(N),this.parseHost(),this.hostname=this.hostname||"";var h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h)for(var B=this.hostname.split(/\./),z=(k=0,B.length);k<z;k++){var X=B[k];if(X&&!X.match(y)){for(var Q="",te=0,q=X.length;te<q;te++)X.charCodeAt(te)>127?Q+="x":Q+=X[te];if(!Q.match(y)){var H=B.slice(0,k),v=B.slice(k+1),S=X.match(g);S&&(H.push(S[1]),v.unshift(S[2])),v.length&&(p="/"+v.join(".")+p),this.hostname=H.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),h||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",J=this.hostname||"";this.host=J+U,this.href+=this.host,h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),p[0]!=="/"&&(p="/"+p))}if(!_[P])for(k=0,z=m.length;k<z;k++){var $=m[k];if(p.indexOf($)!==-1){var ne=encodeURIComponent($);ne===$&&(ne=escape($)),p=p.split($).join(ne)}}var se=p.indexOf("#");se!==-1&&(this.hash=p.substr(se),p=p.slice(0,se));var ge=p.indexOf("?");if(ge!==-1?(this.search=p.substr(ge),this.query=p.substr(ge+1),f&&(this.query=V.parse(this.query)),p=p.slice(0,ge)):f&&(this.search="",this.query={}),p&&(this.pathname=p),L[P]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var ve=this.search||"";this.path=U+ve}return this.href=this.format(),this},l.prototype.format=function(){var A=this.auth||"";A&&(A=(A=encodeURIComponent(A)).replace(/%3A/i,":"),A+="@");var f=this.protocol||"",O=this.pathname||"",Y=this.hash||"",Z=!1,d="";this.host?Z=A+this.host:this.hostname&&(Z=A+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Z+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(d=V.stringify(this.query));var p=this.search||d&&"?"+d||"";return f&&f.substr(-1)!==":"&&(f+=":"),this.slashes||(!f||L[f])&&Z!==!1?(Z="//"+(Z||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):Z||(Z=""),Y&&Y.charAt(0)!=="#"&&(Y="#"+Y),p&&p.charAt(0)!=="?"&&(p="?"+p),f+Z+(O=O.replace(/[?#]/g,function(C){return encodeURIComponent(C)}))+(p=p.replace("#","%23"))+Y},l.prototype.resolve=function(A){return this.resolveObject(M(A,!1,!0)).format()},l.prototype.resolveObject=function(A){if(o.isString(A)){var f=new l;f.parse(A,!1,!0),A=f}for(var O=new l,Y=Object.keys(this),Z=0;Z<Y.length;Z++){var d=Y[Z];O[d]=this[d]}if(O.hash=A.hash,A.href==="")return O.href=O.format(),O;if(A.slashes&&!A.protocol){for(var p=Object.keys(A),C=0;C<p.length;C++){var b=p[C];b!=="protocol"&&(O[b]=A[b])}return L[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(A.protocol&&A.protocol!==O.protocol){if(!L[A.protocol]){for(var P=Object.keys(A),F=0;F<P.length;F++){var D=P[F];O[D]=A[D]}return O.href=O.format(),O}if(O.protocol=A.protocol,A.host||T[A.protocol])O.pathname=A.pathname;else{for(var I=(A.pathname||"").split("/");I.length&&!(A.host=I.shift()););A.host||(A.host=""),A.hostname||(A.hostname=""),I[0]!==""&&I.unshift(""),I.length<2&&I.unshift(""),O.pathname=I.join("/")}if(O.search=A.search,O.query=A.query,O.host=A.host||"",O.auth=A.auth,O.hostname=A.hostname||A.host,O.port=A.port,O.pathname||O.search){var N=O.pathname||"",k=O.search||"";O.path=N+k}return O.slashes=O.slashes||A.slashes,O.href=O.format(),O}var w=O.pathname&&O.pathname.charAt(0)==="/",h=A.host||A.pathname&&A.pathname.charAt(0)==="/",B=h||w||O.host&&A.pathname,z=B,X=O.pathname&&O.pathname.split("/")||[],Q=(I=A.pathname&&A.pathname.split("/")||[],O.protocol&&!L[O.protocol]);if(Q&&(O.hostname="",O.port=null,O.host&&(X[0]===""?X[0]=O.host:X.unshift(O.host)),O.host="",A.protocol&&(A.hostname=null,A.port=null,A.host&&(I[0]===""?I[0]=A.host:I.unshift(A.host)),A.host=null),B=B&&(I[0]===""||X[0]==="")),h)O.host=A.host||A.host===""?A.host:O.host,O.hostname=A.hostname||A.hostname===""?A.hostname:O.hostname,O.search=A.search,O.query=A.query,X=I;else if(I.length)X||(X=[]),X.pop(),X=X.concat(I),O.search=A.search,O.query=A.query;else if(!o.isNullOrUndefined(A.search))return Q&&(O.hostname=O.host=X.shift(),(S=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@"))&&(O.auth=S.shift(),O.host=O.hostname=S.shift())),O.search=A.search,O.query=A.query,o.isNull(O.pathname)&&o.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O;if(!X.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var te=X.slice(-1)[0],q=(O.host||A.host||X.length>1)&&(te==="."||te==="..")||te==="",H=0,v=X.length;v>=0;v--)(te=X[v])==="."?X.splice(v,1):te===".."?(X.splice(v,1),H++):H&&(X.splice(v,1),H--);if(!B&&!z)for(;H--;H)X.unshift("..");!B||X[0]===""||X[0]&&X[0].charAt(0)==="/"||X.unshift(""),q&&X.join("/").substr(-1)!=="/"&&X.push("");var S,U=X[0]===""||X[0]&&X[0].charAt(0)==="/";return Q&&(O.hostname=O.host=U?"":X.length?X.shift():"",(S=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@"))&&(O.auth=S.shift(),O.host=O.hostname=S.shift())),(B=B||O.host&&X.length)&&!U&&X.unshift(""),X.length?O.pathname=X.join("/"):(O.pathname=null,O.path=null),o.isNull(O.pathname)&&o.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=A.auth||O.auth,O.slashes=O.slashes||A.slashes,O.href=O.format(),O},l.prototype.parseHost=function(){var A=this.host,f=i.exec(A);f&&((f=f[0])!==":"&&(this.port=f.substr(1)),A=A.substr(0,A.length-f.length)),A&&(this.hostname=A)}},function(e,t,n){const r=o=>o!==null&&typeof o=="object"&&typeof o.pipe=="function";r.writable=o=>r(o)&&o.writable!==!1&&typeof o._write=="function"&&typeof o._writableState=="object",r.readable=o=>r(o)&&o.readable!==!1&&typeof o._read=="function"&&typeof o._readableState=="object",r.duplex=o=>r.writable(o)&&r.readable(o),r.transform=o=>r.duplex(o)&&typeof o._transform=="function"&&typeof o._transformState=="object",e.exports=r},function(e,t,n){function r(_){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(_)}function o(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}function l(_,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(T&&T.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),T&&s(_,T)}function s(_,T){return(s=Object.setPrototypeOf||function(L,V){return L.__proto__=V,L})(_,T)}function i(_){var T=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var L,V=u(_);if(T){var M=u(this).constructor;L=Reflect.construct(V,arguments,M)}else L=V.apply(this,arguments);return c(this,L)}}function c(_,T){return!T||r(T)!=="object"&&typeof T!="function"?function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(_):T}function u(_){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)})(_)}var m=n(3).LEVEL,R=n(50),E=n(202),y=n(38)("winston:create-logger");function g(_){return"is"+_.charAt(0).toUpperCase()+_.slice(1)+"Enabled"}e.exports=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_.levels=_.levels||R.npm.levels;var T=function(V){l(A,V);var M=i(A);function A(f){return o(this,A),M.call(this,f)}return A}(E),L=new T(_);return Object.keys(_.levels).forEach(function(V){y('Define prototype method for "%s"',V),V!=="log"?(T.prototype[V]=function(){for(var M=this||L,A=arguments.length,f=new Array(A),O=0;O<A;O++)f[O]=arguments[O];if(f.length===1){var Y=f[0],Z=Y&&Y.message&&Y||{message:Y};return Z.level=Z[m]=V,M._addDefaultMeta(Z),M.write(Z),this||L}return f.length===0?(M.log(V,""),M):M.log.apply(M,[V].concat(f))},T.prototype[g(V)]=function(){return(this||L).isLevelEnabled(V)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')}),L}},function(e,t,n){(function(r){function o(R,E){for(var y=0;y<E.length;y++){var g=E[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(R,g.key,g)}}var l=n(18),s=n(51),i=n(38)("winston:exception"),c=n(90),u=n(91),m=n(92);e.exports=function(){function R(g){if(function(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}(this,R),!g)throw new Error("Logger is required to handle exceptions");this.logger=g,this.handlers=new Map}var E,y;return E=R,(y=[{key:"handle",value:function(){for(var g=this,_=arguments.length,T=new Array(_),L=0;L<_;L++)T[L]=arguments[L];T.forEach(function(V){if(Array.isArray(V))return V.forEach(function(M){return g._addHandler(M)});g._addHandler(V)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),r.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var g=this;this.catcher&&(r.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(_){return g.logger.unpipe(_)}))}},{key:"getAllInfo",value:function(g){var _=g.message;return _||typeof g!="string"||(_=g),{error:g,level:"error",message:["uncaughtException: ".concat(_||"(no error message)"),g.stack||" No stack trace"].join(`
26
- `),stack:g.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(g)}}},{key:"getProcessInfo",value:function(){return{pid:r.pid,uid:r.getuid?r.getuid():null,gid:r.getgid?r.getgid():null,cwd:r.cwd(),execPath:r.execPath,version:r.version,argv:r.argv,memoryUsage:r.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:l.loadavg(),uptime:l.uptime()}}},{key:"getTrace",value:function(g){return(g?u.parse(g):u.get()).map(function(_){return{column:_.getColumnNumber(),file:_.getFileName(),function:_.getFunctionName(),line:_.getLineNumber(),method:_.getMethodName(),native:_.isNative()}})}},{key:"_addHandler",value:function(g){if(!this.handlers.has(g)){g.handleExceptions=!0;var _=new m(g);this.handlers.set(g,_),this.logger.pipe(_)}}},{key:"_uncaughtException",value:function(g){var _,T=this.getAllInfo(g),L=this._getExceptionHandlers(),V=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(g):this.logger.exitOnError;function M(){i("doExit",V),i("process._exiting",r._exiting),V&&!r._exiting&&(_&&clearTimeout(_),r.exit(1))}if(!L.length&&V&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),V=!1),!L||L.length===0)return r.nextTick(M);s(L,function(A,f){var O=c(f),Y=A.transport||A;function Z(d){return function(){i(d),O()}}Y._ending=!0,Y.once("finish",Z("finished")),Y.once("error",Z("error"))},function(){return V&&M()}),this.logger.log(T),V&&(_=setTimeout(M,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter(function(g){return(g.transport||g).handleExceptions})}}])&&o(E.prototype,y),R}()}).call(this,n(2))},function(e,t,n){var r=n(205);e.exports=function(o){var l,s=0;function i(){return s||(s=1,l=o.apply(this,arguments),o=null),l}return i.displayName=r(o),i}},function(e,t){function n(r){for(var o in r)this[o]=r[o]}t.get=function(r){var o=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var l={},s=Error.prepareStackTrace;Error.prepareStackTrace=function(c,u){return u},Error.captureStackTrace(l,r||t.get);var i=l.stack;return Error.prepareStackTrace=s,Error.stackTraceLimit=o,i},t.parse=function(r){if(!r.stack)return[];var o=this;return r.stack.split(`
27
- `).slice(1).map(function(l){if(l.match(/^\s*[-]{4,}$/))return o._createParsedCallSite({fileName:l,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var s=l.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(s){var i=null,c=null,u=null,m=null,R=null,E=s[5]==="native";if(s[1]){var y=(u=s[1]).lastIndexOf(".");if(u[y-1]=="."&&y--,y>0){i=u.substr(0,y),c=u.substr(y+1);var g=i.indexOf(".Module");g>0&&(u=u.substr(g+1),i=i.substr(0,g))}m=null}c&&(m=i,R=c),c==="<anonymous>"&&(R=null,u=null);var _={fileName:s[2]||null,lineNumber:parseInt(s[3],10)||null,functionName:u,typeName:m,methodName:R,columnNumber:parseInt(s[4],10)||null,native:E};return o._createParsedCallSite(_)}}).filter(function(l){return!!l})},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach(function(r){n.prototype[r]=null,n.prototype["get"+r[0].toUpperCase()+r.substr(1)]=function(){return this[r]}}),["topLevel","eval","native","constructor"].forEach(function(r){n.prototype[r]=!1,n.prototype["is"+r[0].toUpperCase()+r.substr(1)]=function(){return this[r]}}),t._createParsedCallSite=function(r){return new n(r)}},function(e,t,n){function r(m){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(m)}function o(m,R){for(var E=0;E<R.length;E++){var y=R[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}function l(m,R){return(l=Object.setPrototypeOf||function(E,y){return E.__proto__=y,E})(m,R)}function s(m){var R=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var E,y=c(m);if(R){var g=c(this).constructor;E=Reflect.construct(y,arguments,g)}else E=y.apply(this,arguments);return i(this,E)}}function i(m,R){return!R||r(R)!=="object"&&typeof R!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(m):R}function c(m){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(m)}var u=n(32).Writable;e.exports=function(m){(function(_,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(T&&T.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),T&&l(_,T)})(g,m);var R,E,y=s(g);function g(_){var T;if(function(L,V){if(!(L instanceof V))throw new TypeError("Cannot call a class as a function")}(this,g),T=y.call(this,{objectMode:!0}),!_)throw new Error("ExceptionStream requires a TransportStream instance.");return T.handleExceptions=!0,T.transport=_,T}return R=g,(E=[{key:"_write",value:function(_,T,L){return _.exception?this.transport.log(_,L):(L(),!0)}}])&&o(R.prototype,E),g}(u)},function(e,t,n){(function(r){function o(R,E){for(var y=0;y<E.length;y++){var g=E[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(R,g.key,g)}}var l=n(18),s=n(51),i=n(38)("winston:rejection"),c=n(90),u=n(91),m=n(92);e.exports=function(){function R(g){if(function(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}(this,R),!g)throw new Error("Logger is required to handle rejections");this.logger=g,this.handlers=new Map}var E,y;return E=R,(y=[{key:"handle",value:function(){for(var g=this,_=arguments.length,T=new Array(_),L=0;L<_;L++)T[L]=arguments[L];T.forEach(function(V){if(Array.isArray(V))return V.forEach(function(M){return g._addHandler(M)});g._addHandler(V)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),r.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var g=this;this.catcher&&(r.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(_){return g.logger.unpipe(_)}))}},{key:"getAllInfo",value:function(g){var _=g.message;return _||typeof g!="string"||(_=g),{error:g,level:"error",message:["unhandledRejection: ".concat(_||"(no error message)"),g.stack||" No stack trace"].join(`
28
- `),stack:g.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(g)}}},{key:"getProcessInfo",value:function(){return{pid:r.pid,uid:r.getuid?r.getuid():null,gid:r.getgid?r.getgid():null,cwd:r.cwd(),execPath:r.execPath,version:r.version,argv:r.argv,memoryUsage:r.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:l.loadavg(),uptime:l.uptime()}}},{key:"getTrace",value:function(g){return(g?u.parse(g):u.get()).map(function(_){return{column:_.getColumnNumber(),file:_.getFileName(),function:_.getFunctionName(),line:_.getLineNumber(),method:_.getMethodName(),native:_.isNative()}})}},{key:"_addHandler",value:function(g){if(!this.handlers.has(g)){g.handleRejections=!0;var _=new m(g);this.handlers.set(g,_),this.logger.pipe(_)}}},{key:"_unhandledRejection",value:function(g){var _,T=this.getAllInfo(g),L=this._getRejectionHandlers(),V=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(g):this.logger.exitOnError;function M(){i("doExit",V),i("process._exiting",r._exiting),V&&!r._exiting&&(_&&clearTimeout(_),r.exit(1))}if(!L.length&&V&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),V=!1),!L||L.length===0)return r.nextTick(M);s(L,function(A,f){var O=c(f),Y=A.transport||A;function Z(d){return function(){i(d),O()}}Y._ending=!0,Y.once("finish",Z("finished")),Y.once("error",Z("error"))},function(){return V&&M()}),this.logger.log(T),V&&(_=setTimeout(M,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter(function(g){return(g.transport||g).handleRejections})}}])&&o(E.prototype,y),R}()}).call(this,n(2))},function(e,t,n){e.exports={asArray:n(212),asBoolStrict:n(213),asBool:n(214),asPortNumber:n(215),asEnum:n(216),asFloatNegative:n(217),asFloatPositive:n(218),asFloat:n(54),asIntNegative:n(219),asIntPositive:n(95),asInt:n(53),asJsonArray:n(220),asJsonObject:n(221),asJson:n(55),asRegExp:n(222),asString:n(33),asUrlObject:n(96),asUrlString:n(223),asEmailString:n(224)}},function(e,t,n){const r=n(53);e.exports=function(o){const l=r(o);if(l<0)throw new Error("should be a positive integer");return l}},function(e,t,n){const r=n(33);e.exports=function(o){const l=r(o);try{return new URL(l)}catch{throw new Error("should be a valid URL")}}},function(e,t,n){const r={};r.web=n(24),n(98);const o={v1:{}};o.v1.signaling={},o.v1.signaling.api=n(9),o.v1.signaling.api.SignalingClient=function(y,g,_){_||(_={}),_.format="text",this.client_=new r.web.GrpcWebClientBase(_),this.hostname_=y},o.v1.signaling.api.SignalingPromiseClient=function(y,g,_){_||(_={}),_.format="text",this.client_=new r.web.GrpcWebClientBase(_),this.hostname_=y};const l=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/GetHealth",r.web.MethodType.UNARY,o.v1.signaling.api.GetHealthRequest,o.v1.signaling.api.GetHealthResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.GetHealthResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetHealthResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.GetHealthResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getHealth=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetHealth",y,g||{},l,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.getHealth=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetHealth",y,g||{},l)};const s=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/CreatePeer",r.web.MethodType.UNARY,o.v1.signaling.api.CreatePeerRequest,o.v1.signaling.api.CreatePeerResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.CreatePeerResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.CreatePeerResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.CreatePeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.createPeer=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",y,g||{},s,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.createPeer=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",y,g||{},s)};const i=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/DeletePeer",r.web.MethodType.UNARY,o.v1.signaling.api.DeletePeerRequest,o.v1.signaling.api.DeletePeerResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.DeletePeerResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.DeletePeerResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.DeletePeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.deletePeer=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",y,g||{},i,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.deletePeer=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",y,g||{},i)};const c=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/RefreshPeer",r.web.MethodType.UNARY,o.v1.signaling.api.RefreshPeerRequest,o.v1.signaling.api.RefreshPeerResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.RefreshPeerResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.RefreshPeerResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.RefreshPeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.refreshPeer=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",y,g||{},c,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.refreshPeer=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",y,g||{},c)};const u=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/GetPeers",r.web.MethodType.UNARY,o.v1.signaling.api.GetPeersRequest,o.v1.signaling.api.GetPeersResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.GetPeersResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetPeersResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.GetPeersResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getPeers=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",y,g||{},u,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.getPeers=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",y,g||{},u)};const m=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/GetIceServers",r.web.MethodType.UNARY,o.v1.signaling.api.GetIceServersRequest,o.v1.signaling.api.GetIceServersResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.GetIceServersResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetIceServersResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.GetIceServersResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getIceServers=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",y,g||{},m,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.getIceServers=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",y,g||{},m)};const R=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/SendSignal",r.web.MethodType.UNARY,o.v1.signaling.api.SendSignalRequest,o.v1.signaling.api.SendSignalResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.SendSignalResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.SendSignalResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.SendSignalResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.sendSignal=function(y,g,_){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",y,g||{},R,_)},o.v1.signaling.api.SignalingPromiseClient.prototype.sendSignal=function(y,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",y,g||{},R)};const E=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/ReceiveSignalStream",r.web.MethodType.SERVER_STREAMING,o.v1.signaling.api.ReceiveSignalStreamRequest,o.v1.signaling.api.ReceiveSignalStreamResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.ReceiveSignalStreamResponse,function(y){return y.serializeBinary()},o.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.receiveSignalStream=function(y,g){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",y,g||{},E)},o.v1.signaling.api.SignalingPromiseClient.prototype.receiveSignalStream=function(y,g){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",y,g||{},E)},e.exports=o.v1.signaling.api},function(e,t,n){var r=n(99),o=r,l=Function("return this")();o.exportSymbol("proto.google.protobuf.BoolValue",null,l),o.exportSymbol("proto.google.protobuf.BytesValue",null,l),o.exportSymbol("proto.google.protobuf.DoubleValue",null,l),o.exportSymbol("proto.google.protobuf.FloatValue",null,l),o.exportSymbol("proto.google.protobuf.Int32Value",null,l),o.exportSymbol("proto.google.protobuf.Int64Value",null,l),o.exportSymbol("proto.google.protobuf.StringValue",null,l),o.exportSymbol("proto.google.protobuf.UInt32Value",null,l),o.exportSymbol("proto.google.protobuf.UInt64Value",null,l),proto.google.protobuf.DoubleValue=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.DoubleValue,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.DoubleValue.displayName="proto.google.protobuf.DoubleValue"),proto.google.protobuf.FloatValue=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.FloatValue,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.FloatValue.displayName="proto.google.protobuf.FloatValue"),proto.google.protobuf.Int64Value=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.Int64Value,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Int64Value.displayName="proto.google.protobuf.Int64Value"),proto.google.protobuf.UInt64Value=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.UInt64Value,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt64Value.displayName="proto.google.protobuf.UInt64Value"),proto.google.protobuf.Int32Value=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.Int32Value,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Int32Value.displayName="proto.google.protobuf.Int32Value"),proto.google.protobuf.UInt32Value=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.UInt32Value,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt32Value.displayName="proto.google.protobuf.UInt32Value"),proto.google.protobuf.BoolValue=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.BoolValue,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.BoolValue.displayName="proto.google.protobuf.BoolValue"),proto.google.protobuf.StringValue=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.StringValue,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.StringValue.displayName="proto.google.protobuf.StringValue"),proto.google.protobuf.BytesValue=function(s){r.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.BytesValue,r.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.BytesValue.displayName="proto.google.protobuf.BytesValue"),r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DoubleValue.prototype.toObject=function(s){return proto.google.protobuf.DoubleValue.toObject(s,this)},proto.google.protobuf.DoubleValue.toObject=function(s,i){var c={value:r.Message.getFloatingPointFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.DoubleValue.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.DoubleValue;return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.DoubleValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readDouble();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.DoubleValue.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.DoubleValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeDouble(1,c)},proto.google.protobuf.DoubleValue.prototype.getValue=function(){return r.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.DoubleValue.prototype.setValue=function(s){return r.Message.setProto3FloatField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FloatValue.prototype.toObject=function(s){return proto.google.protobuf.FloatValue.toObject(s,this)},proto.google.protobuf.FloatValue.toObject=function(s,i){var c={value:r.Message.getFloatingPointFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.FloatValue.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.FloatValue;return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.FloatValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readFloat();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.FloatValue.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.FloatValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.FloatValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeFloat(1,c)},proto.google.protobuf.FloatValue.prototype.getValue=function(){return r.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.FloatValue.prototype.setValue=function(s){return r.Message.setProto3FloatField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int64Value.prototype.toObject=function(s){return proto.google.protobuf.Int64Value.toObject(s,this)},proto.google.protobuf.Int64Value.toObject=function(s,i){var c={value:r.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.Int64Value.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.Int64Value;return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.Int64Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readInt64();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.Int64Value.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.Int64Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.Int64Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeInt64(1,c)},proto.google.protobuf.Int64Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int64Value.prototype.setValue=function(s){return r.Message.setProto3IntField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt64Value.prototype.toObject=function(s){return proto.google.protobuf.UInt64Value.toObject(s,this)},proto.google.protobuf.UInt64Value.toObject=function(s,i){var c={value:r.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.UInt64Value.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.UInt64Value;return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.UInt64Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readUint64();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.UInt64Value.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.UInt64Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeUint64(1,c)},proto.google.protobuf.UInt64Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt64Value.prototype.setValue=function(s){return r.Message.setProto3IntField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int32Value.prototype.toObject=function(s){return proto.google.protobuf.Int32Value.toObject(s,this)},proto.google.protobuf.Int32Value.toObject=function(s,i){var c={value:r.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.Int32Value.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.Int32Value;return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.Int32Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readInt32();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.Int32Value.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.Int32Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.Int32Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeInt32(1,c)},proto.google.protobuf.Int32Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int32Value.prototype.setValue=function(s){return r.Message.setProto3IntField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt32Value.prototype.toObject=function(s){return proto.google.protobuf.UInt32Value.toObject(s,this)},proto.google.protobuf.UInt32Value.toObject=function(s,i){var c={value:r.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.UInt32Value.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.UInt32Value;return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.UInt32Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readUint32();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.UInt32Value.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.UInt32Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeUint32(1,c)},proto.google.protobuf.UInt32Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt32Value.prototype.setValue=function(s){return r.Message.setProto3IntField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BoolValue.prototype.toObject=function(s){return proto.google.protobuf.BoolValue.toObject(s,this)},proto.google.protobuf.BoolValue.toObject=function(s,i){var c={value:r.Message.getBooleanFieldWithDefault(i,1,!1)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.BoolValue.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.BoolValue;return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.BoolValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readBool();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.BoolValue.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.BoolValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.BoolValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())&&i.writeBool(1,c)},proto.google.protobuf.BoolValue.prototype.getValue=function(){return r.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.BoolValue.prototype.setValue=function(s){return r.Message.setProto3BooleanField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.StringValue.prototype.toObject=function(s){return proto.google.protobuf.StringValue.toObject(s,this)},proto.google.protobuf.StringValue.toObject=function(s,i){var c={value:r.Message.getFieldWithDefault(i,1,"")};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.StringValue.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.StringValue;return proto.google.protobuf.StringValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.StringValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readString();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.StringValue.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.StringValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.StringValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue()).length>0&&i.writeString(1,c)},proto.google.protobuf.StringValue.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.StringValue.prototype.setValue=function(s){return r.Message.setProto3StringField(this,1,s)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BytesValue.prototype.toObject=function(s){return proto.google.protobuf.BytesValue.toObject(s,this)},proto.google.protobuf.BytesValue.toObject=function(s,i){var c={value:i.getValue_asB64()};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.BytesValue.deserializeBinary=function(s){var i=new r.BinaryReader(s),c=new proto.google.protobuf.BytesValue;return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.BytesValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readBytes();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.BytesValue.prototype.serializeBinary=function(){var s=new r.BinaryWriter;return proto.google.protobuf.BytesValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.BytesValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue_asU8()).length>0&&i.writeBytes(1,c)},proto.google.protobuf.BytesValue.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.BytesValue.prototype.getValue_asB64=function(){return r.Message.bytesAsB64(this.getValue())},proto.google.protobuf.BytesValue.prototype.getValue_asU8=function(){return r.Message.bytesAsU8(this.getValue())},proto.google.protobuf.BytesValue.prototype.setValue=function(s){return r.Message.setProto3BytesField(this,1,s)},o.object.extend(t,proto.google.protobuf)},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,o=0;o<r;o++){var l=e[o];if(t.call(n,l,o,e))return{i:o,v:l}}return{i:-1,v:void 0}},$jscomp.ASSUME_ES5=!1,$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.SIMPLE_FROUND_POLYFILL=!1,$jscomp.defineProperty=$jscomp.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},$jscomp.getGlobal=function(e){return typeof window!="undefined"&&window===e?e:global!==void 0&&global!=null?global:e},$jscomp.global=$jscomp.getGlobal(this),$jscomp.polyfill=function(e,t,n,r){if(t){for(n=$jscomp.global,e=e.split("."),r=0;r<e.length-1;r++){var o=e[r];o in n||(n[o]={}),n=n[o]}(t=t(r=n[e=e[e.length-1]]))!=r&&t!=null&&$jscomp.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},$jscomp.polyfill("Array.prototype.findIndex",function(e){return e||function(t,n){return $jscomp.findInternal(this,t,n).i}},"es6","es3"),$jscomp.checkStringArgs=function(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""},$jscomp.polyfill("String.prototype.endsWith",function(e){return e||function(t,n){var r=$jscomp.checkStringArgs(this,t,"endsWith");t+="",n===void 0&&(n=r.length),n=Math.max(0,Math.min(0|n,r.length));for(var o=t.length;0<o&&0<n;)if(r[--n]!=t[--o])return!1;return 0>=o}},"es6","es3"),$jscomp.polyfill("Array.prototype.find",function(e){return e||function(t,n){return $jscomp.findInternal(this,t,n).v}},"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",function(e){return e||function(t,n){var r=$jscomp.checkStringArgs(this,t,"startsWith");t+="";var o=r.length,l=t.length;n=Math.max(0,Math.min(0|n,r.length));for(var s=0;s<l&&n<o;)if(r[n++]!=t[s++])return!1;return s>=l}},"es6","es3"),$jscomp.polyfill("String.prototype.repeat",function(e){return e||function(t){var n=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)1&t&&(r+=n),(t>>>=1)&&(n+=n);return r}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return e!==void 0},goog.isString=function(e){return typeof e=="string"},goog.isBoolean=function(e){return typeof e=="boolean"},goog.isNumber=function(e){return typeof e=="number"},goog.exportPath_=function(e,t,n){e=e.split("."),n=n||goog.global,e[0]in n||n.execScript===void 0||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)!e.length&&goog.isDef(t)?n[r]=t:n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}},goog.define=function(e,t){return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(goog.cspNonce_===null&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||e.search(goog.VALID_MODULE_RE_)==-1)throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&typeof e.getCurrentModulePath=="function"&&!!e.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||typeof t.getCurrentModulePath!="function")throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var n=0;n<e.length;n++)if(t=t[e[n]],!goog.isDefAndNotNull(t))return null;return t},goog.globalize=function(e,t){for(var n in t=t||goog.global,e)t[n]=e[n]},goog.addDependency=function(e,t,n,r){},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){},goog.requireType=function(e){return{}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.instance_=void 0,e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED,goog.TRANSPILE="detect",goog.ASSUME_ES_MODULES_TRANSPILED=!1,goog.TRANSPILE_TO_LANGUAGE="",goog.TRANSPILER="transpile.js",goog.hasBadLetScoping=null,goog.useSafari10Workaround=function(){if(goog.hasBadLetScoping==null){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(e){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping},goog.workaroundSafari10EvalBug=function(e){return"(function(){"+e+`
17
+ `+Q.split(`
18
+ `).map(function(ne){return" "+ne}).join(`
19
+ `)):Q=N.stylize("[Circular]","special")),M(V)){if(U&&p.match(/^\d+$/))return Q;(V=JSON.stringify(""+p)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.substr(1,V.length-2),V=N.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=N.stylize(V,"string"))}return V+": "+Q}function g(N){return Array.isArray(N)}function b(N){return typeof N=="boolean"}function R(N){return N===null}function x(N){return typeof N=="number"}function F(N){return typeof N=="string"}function M(N){return N===void 0}function A(N){return d(N)&&m(N)==="[object RegExp]"}function d(N){return typeof N=="object"&&N!==null}function I(N){return d(N)&&m(N)==="[object Date]"}function $(N){return d(N)&&(m(N)==="[object Error]"||N instanceof Error)}function q(N){return typeof N=="function"}function m(N){return Object.prototype.toString.call(N)}function y(N){return N<10?"0"+N.toString(10):N.toString(10)}t.debuglog=function(N){if(M(l)&&(l=r.env.NODE_DEBUG||""),N=N.toUpperCase(),!o[N])if(new RegExp("\\b"+N+"\\b","i").test(l)){var P=r.pid;o[N]=function(){var W=t.format.apply(t,arguments);console.error("%s %d: %s",N,P,W)}}else o[N]=function(){};return o[N]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=g,t.isBoolean=b,t.isNull=R,t.isNullOrUndefined=function(N){return N==null},t.isNumber=x,t.isString=F,t.isSymbol=function(N){return typeof N=="symbol"},t.isUndefined=M,t.isRegExp=A,t.isObject=d,t.isDate=I,t.isError=$,t.isFunction=q,t.isPrimitive=function(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||N===void 0},t.isBuffer=n(107);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(){var N=new Date,P=[y(N.getHours()),y(N.getMinutes()),y(N.getSeconds())].join(":");return[N.getDate(),C[N.getMonth()],P].join(" ")}function L(N,P){return Object.prototype.hasOwnProperty.call(N,P)}t.log=function(){console.log("%s - %s",_(),t.format.apply(t,arguments))},t.inherits=n(108),t._extend=function(N,P){if(!P||!d(P))return N;for(var W=Object.keys(P),O=W.length;O--;)N[W[O]]=P[W[O]];return N};var z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function B(N,P){if(!N){var W=new Error("Promise was rejected with a falsy value");W.reason=N,N=W}return P(N)}t.promisify=function(N){if(typeof N!="function")throw new TypeError('The "original" argument must be of type Function');if(z&&N[z]){var P;if(typeof(P=N[z])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(P,z,{value:P,enumerable:!1,writable:!1,configurable:!0}),P}function P(){for(var W,O,p=new Promise(function(Q,ee){W=Q,O=ee}),U=[],V=0;V<arguments.length;V++)U.push(arguments[V]);U.push(function(Q,ee){Q?O(Q):W(ee)});try{N.apply(this,U)}catch(Q){O(Q)}return p}return Object.setPrototypeOf(P,Object.getPrototypeOf(N)),z&&Object.defineProperty(P,z,{value:P,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(P,i(N))},t.promisify.custom=z,t.callbackify=function(N){if(typeof N!="function")throw new TypeError('The "original" argument must be of type Function');function P(){for(var W=[],O=0;O<arguments.length;O++)W.push(arguments[O]);var p=W.pop();if(typeof p!="function")throw new TypeError("The last argument must be of type Function");var U=this,V=function(){return p.apply(U,arguments)};N.apply(this,W).then(function(Q){r.nextTick(V,null,Q)},function(Q){r.nextTick(B,Q,V)})}return Object.setPrototypeOf(P,Object.getPrototypeOf(N)),Object.defineProperties(P,i(N)),P}}).call(this,n(2))},function(e,t,n){e.exports=function(r,i){i||(i={}),typeof i=="function"&&(i={cmp:i});var s,l=typeof i.cycles=="boolean"&&i.cycles,o=i.cmp&&(s=i.cmp,function(u){return function(f,E){var w={key:f,value:u[f]},h={key:E,value:u[E]};return s(w,h)}}),c=[];return function u(f){if(f&&f.toJSON&&typeof f.toJSON=="function"&&(f=f.toJSON()),f!==void 0){if(typeof f=="number")return isFinite(f)?""+f:"null";if(typeof f!="object")return JSON.stringify(f);var E,w;if(Array.isArray(f)){for(w="[",E=0;E<f.length;E++)E&&(w+=","),w+=u(f[E])||"null";return w+"]"}if(f===null)return"null";if(c.indexOf(f)!==-1){if(l)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var h=c.push(f)-1,g=Object.keys(f).sort(o&&o(f));for(w="",E=0;E<g.length;E++){var b=g[E],R=u(f[b]);R&&(w&&(w+=","),w+=JSON.stringify(b)+":"+R)}return c.splice(h,1),"{"+w+"}"}}(r)}},function(e,t,n){(function(r){var i=r!==void 0&&r||typeof self<"u"&&self||window,s=Function.prototype.apply;function l(o,c){this._id=o,this._clearFn=c}t.setTimeout=function(){return new l(s.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new l(s.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(o){o&&o.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(o,c){clearTimeout(o._idleTimeoutId),o._idleTimeout=c},t.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},t._unrefActive=t.active=function(o){clearTimeout(o._idleTimeoutId);var c=o._idleTimeout;c>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},c))},n(141),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(6))},function(e,t,n){(function(r){r===void 0||!r.version||r.version.indexOf("v0.")===0||r.version.indexOf("v1.")===0&&r.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(i,s,l,o){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var c,u,f=arguments.length;switch(f){case 0:case 1:return r.nextTick(i);case 2:return r.nextTick(function(){i.call(null,s)});case 3:return r.nextTick(function(){i.call(null,s,l)});case 4:return r.nextTick(function(){i.call(null,s,l,o)});default:for(c=new Array(f-1),u=0;u<c.length;)c[u++]=arguments[u];return r.nextTick(function(){i.apply(null,c)})}}}:e.exports=r}).call(this,n(2))},function(e,t,n){(function(r){function i(s){return Object.prototype.toString.call(s)}t.isArray=function(s){return Array.isArray?Array.isArray(s):i(s)==="[object Array]"},t.isBoolean=function(s){return typeof s=="boolean"},t.isNull=function(s){return s===null},t.isNullOrUndefined=function(s){return s==null},t.isNumber=function(s){return typeof s=="number"},t.isString=function(s){return typeof s=="string"},t.isSymbol=function(s){return typeof s=="symbol"},t.isUndefined=function(s){return s===void 0},t.isRegExp=function(s){return i(s)==="[object RegExp]"},t.isObject=function(s){return typeof s=="object"&&s!==null},t.isDate=function(s){return i(s)==="[object Date]"},t.isError=function(s){return i(s)==="[object Error]"||s instanceof Error},t.isFunction=function(s){return typeof s=="function"},t.isPrimitive=function(s){return s===null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||typeof s=="symbol"||s===void 0},t.isBuffer=r.isBuffer}).call(this,n(5).Buffer)},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return typeof location<"u"?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return typeof navigator<"u"?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL=`
20
+ `,t.homedir=function(){return"/"}},function(e,t,n){var r=n(58),i=n(61).warn,s=t;s.version=n(138).version,s.transports=n(139),s.config=n(50),s.addColors=r.levels,s.format=r.format,s.createLogger=n(88),s.ExceptionHandler=n(89),s.RejectionHandler=n(93),s.Container=n(210),s.Transport=n(20),s.loggers=new s.Container;var l=s.createLogger();Object.keys(s.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(function(o){return s[o]=function(){return l[o].apply(l,arguments)}}),Object.defineProperty(s,"level",{get:function(){return l.level},set:function(o){l.level=o}}),Object.defineProperty(s,"exceptions",{get:function(){return l.exceptions}}),["exitOnError"].forEach(function(o){Object.defineProperty(s,o,{get:function(){return l[o]},set:function(c){l[o]=c}})}),Object.defineProperty(s,"default",{get:function(){return{exceptionHandlers:l.exceptionHandlers,rejectionHandlers:l.rejectionHandlers,transports:l.transports}}}),i.deprecated(s,"setLevels"),i.forFunctions(s,"useFormat",["cli"]),i.forProperties(s,"useFormat",["padLevels","stripColors"]),i.forFunctions(s,"deprecated",["addRewriter","addFilter","clone","extend"]),i.forProperties(s,"deprecated",["emitErrs","levelLength"]),i.moved(s,"createLogger","Logger")},function(e,t,n){var r=n(13),i=n(142),s=n(3).LEVEL,l=e.exports=function(){var o=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.handleRejections=c.handleRejections,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){o.levels=u.levels,o.parent=u}),this.once("unpipe",function(u){u===o.parent&&(o.parent=null,o.close&&o.close())})};r.inherits(l,i),l.prototype._write=function(o,c,u){if(this.silent||o.exception===!0&&!this.handleExceptions)return u(null);var f=this.level||this.parent&&this.parent.level;if(!f||this.levels[f]>=this.levels[o[s]]){if(o&&!this.format)return this.log(o,u);var E=void 0,w=void 0;try{w=this.format.transform(Object.assign({},o),this.format.options)}catch(h){E=h}if(E||!w){if(u(),E)throw E;return}return this.log(w,u)}return u(null)},l.prototype._writev=function(o,c){if(this.logv){var u=o.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var f=0;f<o.length;f++)if(this._accept(o[f]))if(!o[f].chunk||this.format){var E=void 0,w=void 0;try{w=this.format.transform(Object.assign({},o[f].chunk),this.format.options)}catch(h){E=h}if(E||!w){if(o[f].callback(),E)throw c(null),E}else this.log(w,o[f].callback)}else this.log(o[f].chunk,o[f].callback);return c(null)},l.prototype._accept=function(o){var c=o.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[s]])||!this.handleExceptions&&c.exception===!0)},l.prototype._nop=function(){},e.exports.LegacyTransportStream=n(148)},function(e,t,n){var r,i=typeof Reflect=="object"?Reflect:null,s=i&&typeof i.apply=="function"?i.apply:function(R,x,F){return Function.prototype.apply.call(R,x,F)};r=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(R){return Object.getOwnPropertyNames(R).concat(Object.getOwnPropertySymbols(R))}:function(R){return Object.getOwnPropertyNames(R)};var l=Number.isNaN||function(R){return R!=R};function o(){o.init.call(this)}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var c=10;function u(R){return R._maxListeners===void 0?o.defaultMaxListeners:R._maxListeners}function f(R,x,F,M){var A,d,I,$;if(typeof F!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof F);if((d=R._events)===void 0?(d=R._events=Object.create(null),R._eventsCount=0):(d.newListener!==void 0&&(R.emit("newListener",x,F.listener?F.listener:F),d=R._events),I=d[x]),I===void 0)I=d[x]=F,++R._eventsCount;else if(typeof I=="function"?I=d[x]=M?[F,I]:[I,F]:M?I.unshift(F):I.push(F),(A=u(R))>0&&I.length>A&&!I.warned){I.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=R,q.type=x,q.count=I.length,$=q,console&&console.warn&&console.warn($)}return R}function E(){for(var R=[],x=0;x<arguments.length;x++)R.push(arguments[x]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,s(this.listener,this.target,R))}function w(R,x,F){var M={fired:!1,wrapFn:void 0,target:R,type:x,listener:F},A=E.bind(M);return A.listener=F,M.wrapFn=A,A}function h(R,x,F){var M=R._events;if(M===void 0)return[];var A=M[x];return A===void 0?[]:typeof A=="function"?F?[A.listener||A]:[A]:F?function(d){for(var I=new Array(d.length),$=0;$<I.length;++$)I[$]=d[$].listener||d[$];return I}(A):b(A,A.length)}function g(R){var x=this._events;if(x!==void 0){var F=x[R];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function b(R,x){for(var F=new Array(x),M=0;M<x;++M)F[M]=R[M];return F}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(R){if(typeof R!="number"||R<0||l(R))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+R+".");c=R}}),o.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(R){if(typeof R!="number"||R<0||l(R))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+R+".");return this._maxListeners=R,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(R){for(var x=[],F=1;F<arguments.length;F++)x.push(arguments[F]);var M=R==="error",A=this._events;if(A!==void 0)M=M&&A.error===void 0;else if(!M)return!1;if(M){var d;if(x.length>0&&(d=x[0]),d instanceof Error)throw d;var I=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw I.context=d,I}var $=A[R];if($===void 0)return!1;if(typeof $=="function")s($,this,x);else{var q=$.length,m=b($,q);for(F=0;F<q;++F)s(m[F],this,x)}return!0},o.prototype.addListener=function(R,x){return f(this,R,x,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(R,x){return f(this,R,x,!0)},o.prototype.once=function(R,x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x);return this.on(R,w(this,R,x)),this},o.prototype.prependOnceListener=function(R,x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x);return this.prependListener(R,w(this,R,x)),this},o.prototype.removeListener=function(R,x){var F,M,A,d,I;if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x);if((M=this._events)===void 0)return this;if((F=M[R])===void 0)return this;if(F===x||F.listener===x)--this._eventsCount==0?this._events=Object.create(null):(delete M[R],M.removeListener&&this.emit("removeListener",R,F.listener||x));else if(typeof F!="function"){for(A=-1,d=F.length-1;d>=0;d--)if(F[d]===x||F[d].listener===x){I=F[d].listener,A=d;break}if(A<0)return this;A===0?F.shift():function($,q){for(;q+1<$.length;q++)$[q]=$[q+1];$.pop()}(F,A),F.length===1&&(M[R]=F[0]),M.removeListener!==void 0&&this.emit("removeListener",R,I||x)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(R){var x,F,M;if((F=this._events)===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[R]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[R]),this;if(arguments.length===0){var A,d=Object.keys(F);for(M=0;M<d.length;++M)(A=d[M])!=="removeListener"&&this.removeAllListeners(A);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(x=F[R])=="function")this.removeListener(R,x);else if(x!==void 0)for(M=x.length-1;M>=0;M--)this.removeListener(R,x[M]);return this},o.prototype.listeners=function(R){return h(this,R,!0)},o.prototype.rawListeners=function(R){return h(this,R,!1)},o.listenerCount=function(R,x){return typeof R.listenerCount=="function"?R.listenerCount(x):g.call(R,x)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(147).Buffer,i=r.isEncoding||function(g){switch((g=""+g)&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(g){var b;switch(this.encoding=function(R){var x=function(F){if(!F)return"utf8";for(var M;;)switch(F){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return F;default:if(M)return;F=(""+F).toLowerCase(),M=!0}}(R);if(typeof x!="string"&&(r.isEncoding===i||!i(R)))throw new Error("Unknown encoding: "+R);return x||R}(g),this.encoding){case"utf16le":this.text=c,this.end=u,b=4;break;case"utf8":this.fillLast=o,b=4;break;case"base64":this.text=f,this.end=E,b=3;break;default:return this.write=w,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(b)}function l(g){return g<=127?0:g>>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function o(g){var b=this.lastTotal-this.lastNeed,R=function(x,F,M){if((192&F[0])!=128)return x.lastNeed=0,"�";if(x.lastNeed>1&&F.length>1){if((192&F[1])!=128)return x.lastNeed=1,"�";if(x.lastNeed>2&&F.length>2&&(192&F[2])!=128)return x.lastNeed=2,"�"}}(this,g);return R!==void 0?R:this.lastNeed<=g.length?(g.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,b,0,g.length),void(this.lastNeed-=g.length))}function c(g,b){if((g.length-b)%2==0){var R=g.toString("utf16le",b);if(R){var x=R.charCodeAt(R.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",b,g.length-1)}function u(g){var b=g&&g.length?this.write(g):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,R)}return b}function f(g,b){var R=(g.length-b)%3;return R===0?g.toString("base64",b):(this.lastNeed=3-R,this.lastTotal=3,R===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",b,g.length-R))}function E(g){var b=g&&g.length?this.write(g):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function w(g){return g.toString(this.encoding)}function h(g){return g&&g.length?this.write(g):""}t.StringDecoder=s,s.prototype.write=function(g){if(g.length===0)return"";var b,R;if(this.lastNeed){if((b=this.fillLast(g))===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R<g.length?b?b+this.text(g,R):this.text(g,R):b||""},s.prototype.end=function(g){var b=g&&g.length?this.write(g):"";return this.lastNeed?b+"�":b},s.prototype.text=function(g,b){var R=function(F,M,A){var d=M.length-1;if(d<A)return 0;var I=l(M[d]);return I>=0?(I>0&&(F.lastNeed=I-1),I):--d<A||I===-2?0:(I=l(M[d]))>=0?(I>0&&(F.lastNeed=I-2),I):--d<A||I===-2?0:(I=l(M[d]))>=0?(I>0&&(I===2?I=0:F.lastNeed=I-3),I):0}(this,g,b);if(!this.lastNeed)return g.toString("utf8",b);this.lastTotal=R;var x=g.length-(R-this.lastNeed);return g.copy(this.lastChar,0,x),g.toString("utf8",b,x)},s.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},function(e,t,n){var r=n(16),i=Object.keys||function(g){var b=[];for(var R in g)b.push(R);return b};e.exports=E;var s=n(17);s.inherits=n(7);var l=n(69),o=n(48);s.inherits(E,l);for(var c=i(o.prototype),u=0;u<c.length;u++){var f=c[u];E.prototype[f]||(E.prototype[f]=o.prototype[f])}function E(g){if(!(this instanceof E))return new E(g);l.call(this,g),o.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}function w(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(g){g.end()}Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),E.prototype._destroy=function(g,b){this.push(null),this.end(),r.nextTick(b,g)}},function(e,t,n){(function(r){function i(j){var Z=0;return function(){return Z<j.length?{done:!1,value:j[Z++]}:{done:!0}}}var s=typeof Object.defineProperties=="function"?Object.defineProperty:function(j,Z,te){j!=Array.prototype&&j!=Object.prototype&&(j[Z]=te.value)},l=function(j){j=[typeof window=="object"&&window,typeof self=="object"&&self,typeof r=="object"&&r,j];for(var Z=0;Z<j.length;++Z){var te=j[Z];if(te&&te.Math==Math)return te}throw Error("Cannot find global object")}(this);function o(j,Z){if(Z){var te=l;j=j.split(".");for(var ae=0;ae<j.length-1;ae++){var ge=j[ae];ge in te||(te[ge]={}),te=te[ge]}(Z=Z(ae=te[j=j[j.length-1]]))!=ae&&Z!=null&&s(te,j,{configurable:!0,writable:!0,value:Z})}}function c(j){var Z=typeof Symbol<"u"&&Symbol.iterator&&j[Symbol.iterator];return Z?Z.call(j):{next:i(j)}}o("Object.is",function(j){return j||function(Z,te){return Z===te?Z!==0||1/Z==1/te:Z!=Z&&te!=te}}),o("Array.prototype.includes",function(j){return j||function(Z,te){var ae=this;ae instanceof String&&(ae=String(ae));var ge=ae.length;for(0>(te=te||0)&&(te=Math.max(te+ge,0));te<ge;te++){var pe=ae[te];if(pe===Z||Object.is(pe,Z))return!0}return!1}}),o("Promise",function(j){function Z(le){this.b=0,this.c=void 0,this.a=[];var he=this.f();try{le(he.resolve,he.reject)}catch(we){he.reject(we)}}function te(){this.a=null}function ae(le){return le instanceof Z?le:new Z(function(he){he(le)})}if(j)return j;te.prototype.b=function(le){if(this.a==null){this.a=[];var he=this;this.c(function(){he.g()})}this.a.push(le)};var ge=l.setTimeout;te.prototype.c=function(le){ge(le,0)},te.prototype.g=function(){for(;this.a&&this.a.length;){var le=this.a;this.a=[];for(var he=0;he<le.length;++he){var we=le[he];le[he]=null;try{we()}catch(_e){this.f(_e)}}}this.a=null},te.prototype.f=function(le){this.c(function(){throw le})},Z.prototype.f=function(){function le(_e){return function(Ee){we||(we=!0,_e.call(he,Ee))}}var he=this,we=!1;return{resolve:le(this.m),reject:le(this.g)}},Z.prototype.m=function(le){if(le===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(le instanceof Z)this.o(le);else{e:switch(typeof le){case"object":var he=le!=null;break e;case"function":he=!0;break e;default:he=!1}he?this.l(le):this.h(le)}},Z.prototype.l=function(le){var he=void 0;try{he=le.then}catch(we){return void this.g(we)}typeof he=="function"?this.u(he,le):this.h(le)},Z.prototype.g=function(le){this.i(2,le)},Z.prototype.h=function(le){this.i(1,le)},Z.prototype.i=function(le,he){if(this.b!=0)throw Error("Cannot settle("+le+", "+he+"): Promise already settled in state"+this.b);this.b=le,this.c=he,this.j()},Z.prototype.j=function(){if(this.a!=null){for(var le=0;le<this.a.length;++le)pe.b(this.a[le]);this.a=null}};var pe=new te;return Z.prototype.o=function(le){var he=this.f();le.w(he.resolve,he.reject)},Z.prototype.u=function(le,he){var we=this.f();try{le.call(he,we.resolve,we.reject)}catch(_e){we.reject(_e)}},Z.prototype.then=function(le,he){function we(Le,We){return typeof Le=="function"?function(ze){try{_e(Le(ze))}catch(He){Ee(He)}}:We}var _e,Ee,De=new Z(function(Le,We){_e=Le,Ee=We});return this.w(we(le,_e),we(he,Ee)),De},Z.prototype.catch=function(le){return this.then(void 0,le)},Z.prototype.w=function(le,he){function we(){switch(_e.b){case 1:le(_e.c);break;case 2:he(_e.c);break;default:throw Error("Unexpected state: "+_e.b)}}var _e=this;this.a==null?pe.b(we):this.a.push(we)},Z.resolve=ae,Z.reject=function(le){return new Z(function(he,we){we(le)})},Z.race=function(le){return new Z(function(he,we){for(var _e=c(le),Ee=_e.next();!Ee.done;Ee=_e.next())ae(Ee.value).w(he,we)})},Z.all=function(le){var he=c(le),we=he.next();return we.done?ae([]):new Z(function(_e,Ee){function De(ze){return function(He){Le[ze]=He,--We==0&&_e(Le)}}var Le=[],We=0;do Le.push(void 0),We++,ae(we.value).w(De(Le.length-1),Ee),we=he.next();while(!we.done)})},Z});var u=u||{},f=this||self;function E(j,Z){j=j.split("."),Z=Z||f;for(var te=0;te<j.length;te++)if((Z=Z[j[te]])==null)return null;return Z}function w(){}function h(j){var Z=typeof j;if(Z=="object"){if(!j)return"null";if(j instanceof Array)return"array";if(j instanceof Object)return Z;var te=Object.prototype.toString.call(j);if(te=="[object Window]")return"object";if(te=="[object Array]"||typeof j.length=="number"&&j.splice!==void 0&&j.propertyIsEnumerable!==void 0&&!j.propertyIsEnumerable("splice"))return"array";if(te=="[object Function]"||j.call!==void 0&&j.propertyIsEnumerable!==void 0&&!j.propertyIsEnumerable("call"))return"function"}else if(Z=="function"&&j.call===void 0)return"object";return Z}function g(j){var Z=typeof j;return Z=="object"&&j!=null||Z=="function"}function b(j,Z,te){return j.call.apply(j.bind,arguments)}function R(j,Z,te){if(!j)throw Error();if(2<arguments.length){var ae=Array.prototype.slice.call(arguments,2);return function(){var ge=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(ge,ae),j.apply(Z,ge)}}return function(){return j.apply(Z,arguments)}}function x(j,Z,te){return(x=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?b:R).apply(null,arguments)}function F(j,Z){function te(){}te.prototype=Z.prototype,j.S=Z.prototype,j.prototype=new te,j.prototype.constructor=j}function M(){this.a={}}function A(j,Z,te,ae){this.f=j,this.c=Z,this.b=te,this.a=ae}function d(j,Z,te,ae){te=te===void 0?{}:te,this.c=j,this.a=te,this.b=Z,this.f=ae===void 0?null:ae}function I(j,Z,te,ae,ge,pe){this.name=j,this.a=ge,this.b=pe}function $(j,Z,te){te=te===void 0?{}:te;var ae=ae===void 0?new M:ae;return new A(Z,j,te,ae)}function q(j,Z,te,ae){return ae instanceof I?ae:new I(j,te,ae.b||Z.constructor,ae.f,ae.a,ae.c)}function m(j){this.a=j}function y(j){switch(j){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function C(j){if(Error.captureStackTrace)Error.captureStackTrace(this,C);else{var Z=Error().stack;Z&&(this.stack=Z)}j&&(this.message=String(j))}function _(j,Z){for(var te="",ae=(j=j.split("%s")).length-1,ge=0;ge<ae;ge++)te+=j[ge]+(ge<Z.length?Z[ge]:"%s");C.call(this,te+j[ae])}function L(){this.j=null,this.i=[],this.l=0,this.b=z,this.f=this.a=this.h=0,this.c=null,this.g=0}M.prototype.get=function(j){return this.a[j]},M.prototype.f=function(){return Object.keys(this.a)},A.prototype.getRequestMessage=function(){return this.f},A.prototype.getMethodDescriptor=function(){return this.c},A.prototype.getMetadata=function(){return this.b},A.prototype.getCallOptions=function(){return this.a},d.prototype.getResponseMessage=function(){return this.c},d.prototype.getMetadata=function(){return this.a},d.prototype.getMethodDescriptor=function(){return this.b},d.prototype.getStatus=function(){return this.f},m.prototype.on=function(j,Z){return j=="data"||j=="error"?this:this.a.on(j,Z)},m.prototype.removeListener=function(j,Z){return this.a.removeListener(j,Z)},m.prototype.cancel=function(){this.a.cancel()},F(C,Error),C.prototype.name="CustomError",F(_,C),_.prototype.name="AssertionError";var z=0,B=1,N=2,P=3,W=0,O=128;function p(j,Z,te,ae){throw j.b=P,j.j="The stream is broken @"+j.l+"/"+te+". Error: "+ae+`. With input:
21
+ `+Z,Error(j.j)}var U=Array.prototype.indexOf?function(j,Z){return Array.prototype.indexOf.call(j,Z,void 0)}:function(j,Z){if(typeof j=="string")return typeof Z!="string"||Z.length!=1?-1:j.indexOf(Z,0);for(var te=0;te<j.length;te++)if(te in j&&j[te]===Z)return te;return-1},V,Q=String.prototype.trim?function(j){return j.trim()}:function(j){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(j)[1]};function ee(j,Z){return j.indexOf(Z)!=-1}function ne(j,Z){return j<Z?-1:j>Z?1:0}e:{var Y=f.navigator;if(Y){var G=Y.userAgent;if(G){V=G;break e}}V=""}var S="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function T(j){var Z=1;j=j.split(":");for(var te=[];0<Z&&j.length;)te.push(j.shift()),Z--;return j.length&&te.push(j.join(":")),te}function k(j){return k[" "](j),j}k[" "]=w;var J,K,re=ee(V,"Opera"),se=ee(V,"Trident")||ee(V,"MSIE"),fe=ee(V,"Edge"),ve=ee(V,"Gecko")&&!(ee(V.toLowerCase(),"webkit")&&!ee(V,"Edge"))&&!(ee(V,"Trident")||ee(V,"MSIE"))&&!ee(V,"Edge"),Ie=ee(V.toLowerCase(),"webkit")&&!ee(V,"Edge");function Se(){var j=f.document;return j?j.documentMode:void 0}e:{var Ce="",Te=(K=V,ve?/rv:([^\);]+)(\)|;)/.exec(K):fe?/Edge\/([\d\.]+)/.exec(K):se?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(K):Ie?/WebKit\/(\S+)/.exec(K):re?/(?:Version)[ \/]?(\S+)/.exec(K):void 0);if(Te&&(Ce=Te?Te[1]:""),se){var Re=Se();if(Re!=null&&Re>parseFloat(Ce)){J=String(Re);break e}}J=Ce}var Be,Ze={};function et(j){return function(Z,te){var ae=Ze;return Object.prototype.hasOwnProperty.call(ae,Z)?ae[Z]:ae[Z]=te(Z)}(j,function(){for(var Z=0,te=Q(String(J)).split("."),ae=Q(String(j)).split("."),ge=Math.max(te.length,ae.length),pe=0;Z==0&&pe<ge;pe++){var le=te[pe]||"",he=ae[pe]||"";do{if(le=/(\d*)(\D*)(.*)/.exec(le)||["","","",""],he=/(\d*)(\D*)(.*)/.exec(he)||["","","",""],le[0].length==0&&he[0].length==0)break;Z=ne(le[1].length==0?0:parseInt(le[1],10),he[1].length==0?0:parseInt(he[1],10))||ne(le[2].length==0,he[2].length==0)||ne(le[2],he[2]),le=le[3],he=he[3]}while(Z==0)}return 0<=Z})}if(f.document&&se){var nt=Se();Be=nt||parseInt(J,10)||void 0}else Be=void 0;var Rt=Be;function Pe(){this.F=this.F}Pe.prototype.F=!1;var vt,ft=Object.freeze||function(j){return j};(vt=!se)||(vt=9<=Number(Rt));var ut=vt,Ot=se&&!et("9"),It=function(){if(!f.addEventListener||!Object.defineProperty)return!1;var j=!1,Z=Object.defineProperty({},"passive",{get:function(){j=!0}});try{f.addEventListener("test",w,Z),f.removeEventListener("test",w,Z)}catch{}return j}();function ct(j,Z){this.type=j,this.a=this.target=Z,this.defaultPrevented=!1}function tt(j,Z){if(ct.call(this,j?j.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,j){var te=this.type=j.type,ae=j.changedTouches&&j.changedTouches.length?j.changedTouches[0]:null;if(this.target=j.target||j.srcElement,this.a=Z,Z=j.relatedTarget){if(ve){e:{try{k(Z.nodeName);var ge=!0;break e}catch{}ge=!1}ge||(Z=null)}}else te=="mouseover"?Z=j.fromElement:te=="mouseout"&&(Z=j.toElement);this.relatedTarget=Z,ae?(this.clientX=ae.clientX!==void 0?ae.clientX:ae.pageX,this.clientY=ae.clientY!==void 0?ae.clientY:ae.pageY,this.screenX=ae.screenX||0,this.screenY=ae.screenY||0):(this.clientX=j.clientX!==void 0?j.clientX:j.pageX,this.clientY=j.clientY!==void 0?j.clientY:j.pageY,this.screenX=j.screenX||0,this.screenY=j.screenY||0),this.button=j.button,this.key=j.key||"",this.ctrlKey=j.ctrlKey,this.altKey=j.altKey,this.shiftKey=j.shiftKey,this.metaKey=j.metaKey,this.pointerId=j.pointerId||0,this.pointerType=typeof j.pointerType=="string"?j.pointerType:Ct[j.pointerType]||"",this.c=j,j.defaultPrevented&&this.b()}}ct.prototype.b=function(){this.defaultPrevented=!0},F(tt,ct);var Ct=ft({2:"touch",3:"pen",4:"mouse"});tt.prototype.b=function(){tt.S.b.call(this);var j=this.c;if(j.preventDefault)j.preventDefault();else if(j.returnValue=!1,Ot)try{(j.ctrlKey||112<=j.keyCode&&123>=j.keyCode)&&(j.keyCode=-1)}catch{}};var ke="closure_listenable_"+(1e6*Math.random()|0),Mt=0;function be(j,Z,te,ae,ge){this.listener=j,this.proxy=null,this.src=Z,this.type=te,this.capture=!!ae,this.A=ge,this.key=++Mt,this.s=this.v=!1}function D(j){j.s=!0,j.listener=null,j.proxy=null,j.src=null,j.A=null}function H(j){this.src=j,this.a={},this.b=0}function X(j,Z){var te=Z.type;if(te in j.a){var ae,ge=j.a[te],pe=U(ge,Z);(ae=0<=pe)&&Array.prototype.splice.call(ge,pe,1),ae&&(D(Z),j.a[te].length==0&&(delete j.a[te],j.b--))}}function ie(j,Z,te,ae){for(var ge=0;ge<j.length;++ge){var pe=j[ge];if(!pe.s&&pe.listener==Z&&pe.capture==!!te&&pe.A==ae)return ge}return-1}H.prototype.add=function(j,Z,te,ae,ge){var pe=j.toString();(j=this.a[pe])||(j=this.a[pe]=[],this.b++);var le=ie(j,Z,ae,ge);return-1<le?(Z=j[le],te||(Z.v=!1)):((Z=new be(Z,this.src,pe,!!ae,ge)).v=te,j.push(Z)),Z};var oe="closure_lm_"+(1e6*Math.random()|0),de={};function ye(j,Z,te,ae,ge){if(ae&&ae.once)(function le(he,we,_e,Ee,De){if(Array.isArray(we))for(var Le=0;Le<we.length;Le++)le(he,we[Le],_e,Ee,De);else _e=qe(_e),he&&he[ke]?he.f.add(String(we),_e,!0,g(Ee)?!!Ee.capture:!!Ee,De):me(he,we,_e,!0,Ee,De)})(j,Z,te,ae,ge);else if(Array.isArray(Z))for(var pe=0;pe<Z.length;pe++)ye(j,Z[pe],te,ae,ge);else te=qe(te),j&&j[ke]?j.f.add(String(Z),te,!1,g(ae)?!!ae.capture:!!ae,ge):me(j,Z,te,!1,ae,ge)}function me(j,Z,te,ae,ge,pe){if(!Z)throw Error("Invalid event type");var le=g(ge)?!!ge.capture:!!ge,he=Ge(j);if(he||(j[oe]=he=new H(j)),!(te=he.add(Z,te,ae,le,pe)).proxy)if(ae=function(){var we=Ue,_e=ut?function(Ee){return we.call(_e.src,_e.listener,Ee)}:function(Ee){if(!(Ee=we.call(_e.src,_e.listener,Ee)))return Ee};return _e}(),te.proxy=ae,ae.src=j,ae.listener=te,j.addEventListener)It||(ge=le),ge===void 0&&(ge=!1),j.addEventListener(Z.toString(),ae,ge);else if(j.attachEvent)j.attachEvent(ue(Z.toString()),ae);else{if(!j.addListener||!j.removeListener)throw Error("addEventListener and attachEvent are unavailable.");j.addListener(ae)}}function ce(j){if(typeof j!="number"&&j&&!j.s){var Z=j.src;if(Z&&Z[ke])X(Z.f,j);else{var te=j.type,ae=j.proxy;Z.removeEventListener?Z.removeEventListener(te,ae,j.capture):Z.detachEvent?Z.detachEvent(ue(te),ae):Z.addListener&&Z.removeListener&&Z.removeListener(ae),(te=Ge(Z))?(X(te,j),te.b==0&&(te.src=null,Z[oe]=null)):D(j)}}}function ue(j){return j in de?de[j]:de[j]="on"+j}function Ae(j,Z,te,ae){var ge=!0;if((j=Ge(j))&&(Z=j.a[Z.toString()]))for(Z=Z.concat(),j=0;j<Z.length;j++){var pe=Z[j];pe&&pe.capture==te&&!pe.s&&(pe=Me(pe,ae),ge=ge&&pe!==!1)}return ge}function Me(j,Z){var te=j.listener,ae=j.A||j.src;return j.v&&ce(j),te.call(ae,Z)}function Ue(j,Z){if(j.s)return!0;if(!ut){var te=Z||E("window.event");Z=new tt(te,this);var ae=!0;if(!(0>te.keyCode||te.returnValue!=null)){e:{var ge=!1;if(te.keyCode==0)try{te.keyCode=-1;break e}catch{ge=!0}(ge||te.returnValue==null)&&(te.returnValue=!0)}for(te=[],ge=Z.a;ge;ge=ge.parentNode)te.push(ge);for(j=j.type,ge=te.length-1;0<=ge;ge--){Z.a=te[ge];var pe=Ae(te[ge],j,!0,Z);ae=ae&&pe}for(ge=0;ge<te.length;ge++)Z.a=te[ge],pe=Ae(te[ge],j,!1,Z),ae=ae&&pe}return ae}return Me(j,new tt(Z,this))}function Ge(j){return(j=j[oe])instanceof H?j:null}var Qe="__closure_events_fn_"+(1e9*Math.random()>>>0);function qe(j){return h(j)=="function"?j:(j[Qe]||(j[Qe]=function(Z){return j.handleEvent(Z)}),j[Qe])}function $e(){Pe.call(this),this.f=new H(this),this.N=this}function Ne(j,Z){j=j.N;var te=Z.type||Z;if(typeof Z=="string")Z=new ct(Z,j);else if(Z instanceof ct)Z.target=Z.target||j;else{var ae=Z;(function(ge,pe){for(var le,he,we=1;we<arguments.length;we++){for(le in he=arguments[we])ge[le]=he[le];for(var _e=0;_e<S.length;_e++)le=S[_e],Object.prototype.hasOwnProperty.call(he,le)&&(ge[le]=he[le])}})(Z=new ct(te,j),ae)}Fe(j=Z.a=j,te,!0,Z),Fe(j,te,!1,Z)}function Fe(j,Z,te,ae){if(Z=j.f.a[String(Z)]){Z=Z.concat();for(var ge=!0,pe=0;pe<Z.length;++pe){var le=Z[pe];if(le&&!le.s&&le.capture==te){var he=le.listener,we=le.A||le.src;le.v&&X(j.f,le),ge=he.call(we,ae)!==!1&&ge}}}}function Ye(j,Z,te){if(h(j)=="function")te&&(j=x(j,te));else{if(!j||typeof j.handleEvent!="function")throw Error("Invalid listener argument");j=x(j.handleEvent,j)}return 2147483647<Number(Z)?-1:f.setTimeout(j,Z||0)}function Ke(j,Z,te){this.reset(j,Z,te,void 0,void 0)}F($e,Pe),$e.prototype[ke]=!0,$e.prototype.addEventListener=function(j,Z,te,ae){ye(this,j,Z,te,ae)},$e.prototype.removeEventListener=function(j,Z,te,ae){(function ge(pe,le,he,we,_e){if(Array.isArray(le))for(var Ee=0;Ee<le.length;Ee++)ge(pe,le[Ee],he,we,_e);else we=g(we)?!!we.capture:!!we,he=qe(he),pe&&pe[ke]?(pe=pe.f,(le=String(le).toString())in pe.a&&-1<(he=ie(Ee=pe.a[le],he,we,_e))&&(D(Ee[he]),Array.prototype.splice.call(Ee,he,1),Ee.length==0&&(delete pe.a[le],pe.b--))):pe&&(pe=Ge(pe))&&(le=pe.a[le.toString()],pe=-1,le&&(pe=ie(le,he,we,_e)),(he=-1<pe?le[pe]:null)&&ce(he))})(this,j,Z,te,ae)},Ke.prototype.a=null;function Xe(j){this.f=j,this.b=this.c=this.a=null}function Je(j,Z){this.name=j,this.value=Z}Ke.prototype.reset=function(j,Z,te,ae,ge){delete this.a},Je.prototype.toString=function(){return this.name};var ot=new Je("SEVERE",1e3),at=new Je("CONFIG",700),dt=new Je("FINE",500);function wt(j){return j.c?j.c:j.a?wt(j.a):(function(Z,te){throw new _("Failure"+(Z?": "+Z:""),Array.prototype.slice.call(arguments,1))}("Root logger has no level set."),null)}Xe.prototype.log=function(j,Z,te){if(j.value>=wt(this).value)for(h(Z)=="function"&&(Z=Z()),j=new Ke(j,String(Z),this.f),te&&(j.a=te),te=this;te;)te=te.a};var St,Nt={},At=null;function it(j,Z){j&&j.log(dt,Z,void 0)}function Dt(){}function Bt(j){var Z;return(Z=j.a)||(Z={},Ft(j)&&(Z[0]=!0,Z[1]=!0),Z=j.a=Z),Z}function kt(){}function Ut(j){return(j=Ft(j))?new ActiveXObject(j):new XMLHttpRequest}function Ft(j){if(!j.b&&typeof XMLHttpRequest>"u"&&typeof ActiveXObject<"u"){for(var Z=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],te=0;te<Z.length;te++){var ae=Z[te];try{return new ActiveXObject(ae),j.b=ae}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return j.b}function pt(j,Z){this.b={},this.a=[],this.c=0;var te=arguments.length;if(1<te){if(te%2)throw Error("Uneven number of arguments");for(var ae=0;ae<te;ae+=2)this.set(arguments[ae],arguments[ae+1])}else j&&zt(this,j)}function xt(j){if(j.c!=j.a.length){for(var Z=0,te=0;Z<j.a.length;){var ae=j.a[Z];yt(j.b,ae)&&(j.a[te++]=ae),Z++}j.a.length=te}if(j.c!=j.a.length){var ge={};for(te=Z=0;Z<j.a.length;)yt(ge,ae=j.a[Z])||(j.a[te++]=ae,ge[ae]=1),Z++;j.a.length=te}}function zt(j,Z){if(Z instanceof pt)for(var te=Z.f(),ae=0;ae<te.length;ae++)j.set(te[ae],Z.get(te[ae]));else for(te in Z)j.set(te,Z[te])}function yt(j,Z){return Object.prototype.hasOwnProperty.call(j,Z)}Dt.prototype.a=null,F(kt,Dt),St=new kt,pt.prototype.f=function(){return xt(this),this.a.concat()},pt.prototype.get=function(j,Z){return yt(this.b,j)?this.b[j]:Z},pt.prototype.set=function(j,Z){yt(this.b,j)||(this.c++,this.a.push(j)),this.b[j]=Z},pt.prototype.forEach=function(j,Z){for(var te=this.f(),ae=0;ae<te.length;ae++){var ge=te[ae],pe=this.get(ge);j.call(Z,pe,ge,this)}};var Xt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function ht(j){$e.call(this),this.headers=new pt,this.D=j||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=Wt,this.B=this.H=!1}F(ht,$e);var Wt="",Jt=ht.prototype,Qt=function j(Z){var te;if(At||(At=new Xe(""),Nt[""]=At,At.c=at),!(te=Nt[Z])){te=new Xe(Z);var ae=Z.lastIndexOf("."),ge=Z.substr(ae+1);(ae=j(Z.substr(0,ae))).b||(ae.b={}),ae.b[ge]=te,te.a=ae,Nt[Z]=te}return te}("goog.net.XhrIo");Jt.b=Qt;var en=/^https?$/i,tn=["POST","PUT"];function nn(j,Z,te){if(j.a)throw Error("[goog.net.XhrIo] Object is active with another request="+j.o+"; newUri="+Z);j.o=Z,j.i="",j.g=0,j.J="POST",j.G=!1,j.c=!0,j.a=j.D?Ut(j.D):Ut(St),j.C=j.D?Bt(j.D):Bt(St),j.a.onreadystatechange=x(j.K,j);try{it(j.b,gt(j,"Opening Xhr")),j.I=!0,j.a.open("POST",String(Z),!0),j.I=!1}catch(pe){return it(j.b,gt(j,"Error opening Xhr: "+pe.message)),void Ht(j,pe)}Z=te||"";var ae=function(pe){e:{for(var le=rn,he=pe.length,we=typeof pe=="string"?pe.split(""):pe,_e=0;_e<he;_e++)if(_e in we&&le.call(void 0,we[_e],_e,pe)){le=_e;break e}le=-1}return 0>le?null:typeof pe=="string"?pe.charAt(le):pe[le]}((te=new pt(j.headers)).f()),ge=f.FormData&&Z instanceof f.FormData;!(0<=U(tn,"POST"))||ae||ge||te.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),te.forEach(function(pe,le){this.a.setRequestHeader(le,pe)},j),j.j&&(j.a.responseType=j.j),"withCredentials"in j.a&&j.a.withCredentials!==j.H&&(j.a.withCredentials=j.H);try{$t(j),0<j.l&&(j.B=function(pe){return se&&et(9)&&typeof pe.timeout=="number"&&pe.ontimeout!==void 0}(j.a),it(j.b,gt(j,"Will abort after "+j.l+"ms if incomplete, xhr2 "+j.B)),j.B?(j.a.timeout=j.l,j.a.ontimeout=x(j.L,j)):j.u=Ye(j.L,j.l,j)),it(j.b,gt(j,"Sending request")),j.m=!0,j.a.send(Z),j.m=!1}catch(pe){it(j.b,gt(j,"Send error: "+pe.message)),Ht(j,pe)}}function rn(j){return j.toLowerCase()=="content-type"}function Ht(j,Z){j.c=!1,j.a&&(j.h=!0,j.a.abort(),j.h=!1),j.i=Z,j.g=5,Vt(j),jt(j)}function Vt(j){j.G||(j.G=!0,Ne(j,"complete"),Ne(j,"error"))}function Gt(j){if(j.c&&u!==void 0){if(j.C[1]&&mt(j)==4&&j.getStatus()==2)it(j.b,gt(j,"Local request error detected and ignored"));else if(j.m&&mt(j)==4)Ye(j.K,0,j);else if(Ne(j,"readystatechange"),mt(j)==4){it(j.b,gt(j,"Request complete")),j.c=!1;try{var Z,te=j.getStatus();e:switch(te){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var ae=!0;break e;default:ae=!1}if(!(Z=ae)){var ge;if(ge=te===0){var pe=String(j.o).match(Xt)[1]||null;if(!pe&&f.self&&f.self.location){var le=f.self.location.protocol;pe=le.substr(0,le.length-1)}ge=!en.test(pe?pe.toLowerCase():"")}Z=ge}if(Z)Ne(j,"complete"),Ne(j,"success");else{j.g=6;try{var he=2<mt(j)?j.a.statusText:""}catch(we){it(j.b,"Can not get status: "+we.message),he=""}j.i=he+" ["+j.getStatus()+"]",Vt(j)}}finally{jt(j)}}}}function jt(j){if(j.a){$t(j);var Z=j.a,te=j.C[0]?w:null;j.a=null,j.C=null,Ne(j,"ready");try{Z.onreadystatechange=te}catch(ae){(j=j.b)&&j.log(ot,"Problem encountered resetting onreadystatechange: "+ae.message,void 0)}}}function $t(j){j.a&&j.B&&(j.a.ontimeout=null),j.u&&(f.clearTimeout(j.u),j.u=null)}function mt(j){return j.a?j.a.readyState:0}function Zt(j,Z){if(j.a&&mt(j)==4)return(j=j.a.getResponseHeader(Z))===null?void 0:j}function gt(j,Z){return Z+" ["+j.J+" "+j.o+" "+j.getStatus()+"]"}ht.prototype.L=function(){u!==void 0&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,it(this.b,gt(this,this.i)),Ne(this,"timeout"),this.abort(8))},ht.prototype.abort=function(j){this.a&&this.c&&(it(this.b,gt(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=j||7,Ne(this,"complete"),Ne(this,"abort"),jt(this))},ht.prototype.K=function(){this.F||(this.I||this.m||this.h?Gt(this):this.O())},ht.prototype.O=function(){Gt(this)},ht.prototype.getStatus=function(){try{return 2<mt(this)?this.a.status:-1}catch{return-1}};var qt={},Et=null;function an(j){var Z=j.length,te=3*Z/4;te%3?te=Math.floor(te):ee("=.",j[Z-1])&&(te=ee("=.",j[Z-2])?te-2:te-1);var ae=new Uint8Array(te),ge=0;return function(pe,le){function he(We){for(;we<pe.length;){var ze=pe.charAt(we++),He=Et[ze];if(He!=null)return He;if(!/^[\s\xa0]*$/.test(ze))throw Error("Unknown base64 encoding at char: "+ze)}return We}Yt();for(var we=0;;){var _e=he(-1),Ee=he(0),De=he(64),Le=he(64);if(Le===64&&_e===-1)break;le(_e<<2|Ee>>4),De!=64&&(le(Ee<<4&240|De>>2),Le!=64&&le(De<<6&192|Le))}}(j,function(pe){ae[ge++]=pe}),ae.subarray(0,ge)}function Yt(){if(!Et){Et={};for(var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Z=["+/=","+/","-_=","-_.","-_"],te=0;5>te;te++){var ae=j.concat(Z[te].split(""));qt[te]=ae;for(var ge=0;ge<ae.length;ge++){var pe=ae[ge];Et[pe]===void 0&&(Et[pe]=ge)}}}}var sn=["content-type","grpc-status","grpc-message"];function st(j){this.a=j.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new L;var Z=this;ye(this.a,"readystatechange",function(){var te=Z.a;if(te=te.a?te.a.getResponseHeader("Content-Type"):null){if((te=te.toLowerCase()).lastIndexOf("application/grpc-web-text",0)==0){te=Z.a;try{var ae=te.a?te.a.responseText:""}catch(_e){it(te.b,"Can not get responseText: "+_e.message),ae=""}if(ae=(te=ae||"").length-te.length%4,(te=te.substr(Z.i,ae-Z.i)).length==0)return;Z.i=ae,te=an(te)}else{if(te.lastIndexOf("application/grpc",0)!=0)return void bt(Z,{code:2,message:"Unknown Content-type received.",metadata:{}});te=new Uint8Array(function(_e){try{if(!_e.a)return null;if("response"in _e.a)return _e.a.response;switch(_e.j){case Wt:case"text":return _e.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in _e.a)return _e.a.mozResponseArrayBuffer}var Ee=_e.b;return Ee&&Ee.log(ot,"Response type "+_e.j+" is not supported on this browser",void 0),null}catch(De){return it(_e.b,"Can not get response: "+De.message),null}}(Z.a))}ae=null;try{ae=function(_e,Ee){function De(_t){xe.f++,xe.a=(xe.a<<8)+_t,xe.f==4&&(xe.b=N,xe.g=0,typeof Uint8Array<"u"?xe.c=new Uint8Array(xe.a):xe.c=Array(xe.a),xe.a==0&&We())}function Le(_t){xe.c[xe.g++]=_t,xe.g==xe.a&&We()}function We(){var _t={};_t[xe.h]=xe.c,xe.i.push(_t),xe.b=z}var ze,He,xe=_e,lt=0;for(ze=Ee instanceof Uint8Array||Ee instanceof Array?Ee:new Uint8Array(Ee);lt<ze.length;){switch(xe.b){case P:p(xe,ze,lt,"stream already broken");break;case z:(He=ze[lt])==W||He==O?xe.h=He:p(xe,ze,lt,"invalid frame byte"),xe.b=B,xe.a=0,xe.f=0;break;case B:De(ze[lt]);break;case N:Le(ze[lt]);break;default:throw Error("unexpected parser state: "+xe.b)}xe.l++,lt++}return _e=xe.i,xe.i=[],0<_e.length?_e:null}(Z.m,te)}catch{bt(Z,{code:2,message:"Error in parsing response body",metadata:{}})}if(ae)for(te=0;te<ae.length;te++){if(W in ae[te]){var ge=ae[te][W];if(ge)try{var pe=Z.l(ge);if(pe){ge=Z;for(var le=pe,he=0;he<ge.b.length;he++)ge.b[he](le)}}catch{bt(Z,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(O in ae[te]&&0<ae[te][O].length){for(ge="",le=0;le<ae[te][O].length;le++)ge+=String.fromCharCode(ae[te][O][le]);for(ge=ge.trim().split(`\r
22
+ `),le={},he=0;he<ge.length;he++){var we=ge[he].indexOf(":");le[ge[he].substring(0,we).trim()]=ge[he].substring(we+1).trim()}ge=le,le=0,he="","grpc-status"in ge&&(le=ge["grpc-status"],delete ge["grpc-status"]),"grpc-message"in ge&&(he=ge["grpc-message"],delete ge["grpc-message"]),bt(Z,{code:Number(le),message:he,metadata:ge})}}}}),ye(this.a,"complete",function(){var te=Z.a.g,ae="",ge={},pe=function(he){var we={};he=(he.a&&mt(he)==4&&he.a.getAllResponseHeaders()||"").split(`\r
23
+ `);for(var _e=0;_e<he.length;_e++)if(!/^[\s\xa0]*$/.test(he[_e])){var Ee=T(he[_e]),De=Ee[0];if(typeof(Ee=Ee[1])=="string"){Ee=Ee.trim();var Le=we[De]||[];we[De]=Le,Le.push(Ee)}}return function(We,ze){var He,xe={};for(He in We)xe[He]=ze.call(void 0,We[He],He,We);return xe}(we,function(We){return We.join(", ")})}(Z.a);if(Object.keys(pe).forEach(function(he){sn.includes(he)||(ge[he]=pe[he])}),function(he,we){for(var _e=0;_e<he.g.length;_e++)he.g[_e](we)}(Z,ge),te!=0){switch(te){case 7:var le=10;break;case 8:le=4;break;case 6:le=function(he){switch(he){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}}(Z.a.getStatus());break;default:le=14}le==10&&Z.j||bt(Z,{code:le,message:y(te),metadata:{}})}else te=!1,"grpc-status"in pe&&(le=Zt(Z.a,"grpc-status"),"grpc-message"in pe&&(ae=Zt(Z.a,"grpc-message")),Number(le)!=0&&(bt(Z,{code:Number(le),message:ae,metadata:pe}),te=!0)),te||function(he){for(var we=0;we<he.c.length;we++)he.c[we]()}(Z)})}function Tt(j,Z){-1<(Z=j.indexOf(Z))&&j.splice(Z,1)}function bt(j,Z){if(Z.code!=0)for(var te={code:Z.code,message:decodeURIComponent(Z.message||""),metadata:Z.metadata},ae=0;ae<j.f.length;ae++)j.f[ae](te);for(Z={code:Z.code,details:decodeURIComponent(Z.message||""),metadata:Z.metadata},te=0;te<j.h.length;te++)j.h[te](Z)}function rt(j){this.a=E("format",j)||"text",this.f=E("suppressCorsPreflight",j)||!1,this.c=E("withCredentials",j)||!1,this.b=E("streamInterceptors",j)||[],this.g=E("unaryInterceptors",j)||[]}function Lt(j,Z,te){var ae=Z.getMethodDescriptor(),ge=te+ae.name;(te=new ht).H=j.c;var pe=new st({T:te});if(pe.l=ae.b,zt(te.headers,Z.getMetadata()),j.a=="text"?(te.headers.set("Content-Type","application/grpc-web-text"),te.headers.set("Accept","application/grpc-web-text")):te.headers.set("Content-Type","application/grpc-web+proto"),te.headers.set("X-User-Agent","grpc-web-javascript/0.1"),te.headers.set("X-Grpc-Web","1"),yt(te.headers.b,"deadline")){var le=te.headers.get("deadline");le=Math.round(le-new Date().getTime());var he=te.headers;yt(he.b,"deadline")&&(delete he.b.deadline,he.c--,he.a.length>2*he.c&&xt(he)),1/0===le&&(le=0),0<le&&te.headers.set("grpc-timeout",le+"m")}if(j.f){xt(he=te.headers),le={};for(var we=0;we<he.a.length;we++){var _e=he.a[we];le[_e]=he.b[_e]}(he=te.headers).b={},he.a.length=0,he.c=0;e:{for(Ee in le){var Ee=!1;break e}Ee=!0}Ee||(le=function(We){var ze="";return function(He,xe){for(var lt in He)xe.call(void 0,He[lt],lt,He)}(We,function(He,xe){ze+=xe,ze+=":",ze+=He,ze+=`\r
24
+ `}),ze}(le),typeof ge=="string"?(Ee=encodeURIComponent("$httpHeaders"),(Ee+=le=le!=null?"="+encodeURIComponent(String(le)):"")&&(0>(le=ge.indexOf("#"))&&(le=ge.length),0>(he=ge.indexOf("?"))||he>le?(he=le,we=""):we=ge.substring(he+1,le),le=(ge=[ge.substr(0,he),we,ge.substr(le)])[1],ge[1]=Ee?le?le+"&"+Ee:Ee:le,ge=ge[0]+(ge[1]?"?"+ge[1]:"")+ge[2])):ge.a("$httpHeaders",le))}for(ae=(Z=(0,ae.a)(Z.getRequestMessage())).length,Ee=[0,0,0,0],le=new Uint8Array(5+ae),he=3;0<=he;he--)Ee[he]=ae%256,ae>>>=8;if(le.set(new Uint8Array(Ee),1),le.set(Z,5),Z=le,j.a=="text"){var De;for(j=Z,De===void 0&&(De=0),Yt(),De=qt[De],Z=[],ae=0;ae<j.length;ae+=3){_e=j[ae];var Le=(Ee=ae+1<j.length)?j[ae+1]:0;he=_e>>2,_e=(3&_e)<<4|Le>>4,Le=(15&Le)<<2|(we=(le=ae+2<j.length)?j[ae+2]:0)>>6,we&=63,le||(we=64,Ee||(Le=64)),Z.push(De[he],De[_e],De[Le]||"",De[we]||"")}Z=Z.join("")}else j.a=="binary"&&(te.j="arraybuffer");return nn(te,ge,Z),pe}function Kt(j,Z,te){var ae=null,ge=!1;j.on("data",function(pe){ae=pe}),j.on("error",function(pe){pe.code==0||ge||(ge=!0,Z(pe,null))}),j.on("status",function(pe){pe.code==0||ge?te&&Z(null,null,pe):(ge=!0,Z({code:pe.code,message:pe.details,metadata:pe.metadata},null))}),te&&j.on("metadata",function(pe){Z(null,null,null,pe)}),j.on("end",function(){ge||(ae==null?Z({code:2,message:"Incomplete response"}):Z(null,ae)),te&&Z(null,null)})}function Pt(j,Z){var te=j;return Z.forEach(function(ae){var ge=te;te=function(pe){return ae.intercept(pe,ge)}}),te}st.prototype.on=function(j,Z){return j=="data"?this.b.push(Z):j=="status"?this.h.push(Z):j=="metadata"?this.g.push(Z):j=="end"?this.c.push(Z):j=="error"&&this.f.push(Z),this},st.prototype.removeListener=function(j,Z){return j=="data"?Tt(this.b,Z):j=="status"?Tt(this.h,Z):j=="metadata"?Tt(this.g,Z):j=="end"?Tt(this.c,Z):j=="error"&&Tt(this.f,Z),this},st.prototype.cancel=function(){this.j=!0,this.a.abort()},st.prototype.cancel=st.prototype.cancel,st.prototype.removeListener=st.prototype.removeListener,st.prototype.on=st.prototype.on,rt.prototype.P=function(j,Z,te,ae,ge){var pe=this;ae=q(j,Z,"unary",ae);var le=j.substr(0,j.length-ae.name.length);return Kt(j=Pt(function(he){return Lt(pe,he,le)},this.b).call(this,$(ae,Z,te)),ge,!1),new m(j)},rt.prototype.M=function(j,Z,te,ae){var ge=this;ae=q(j,Z,"unary",ae);var pe=j.substr(0,j.length-ae.name.length);return Pt(function(le){return new Promise(function(he,we){var _e,Ee,De;Kt(Lt(ge,le,pe),function(Le,We,ze,He){Le?we(Le):We?De=We:ze?Ee=ze:He?_e=He:(Le=le.getMethodDescriptor(),he(new d(De,Le,We=(We=_e)===void 0?{}:We,Ee===void 0?null:Ee)))},!0)})},this.g).call(this,$(ae,Z,te)).then(function(le){return le.getResponseMessage()})},rt.prototype.unaryCall=function(j,Z,te,ae){return this.M(j,Z,te,ae)},rt.prototype.R=function(j,Z,te,ae){var ge=this;ae=q(j,Z,"server_streaming",ae);var pe=j.substr(0,j.length-ae.name.length);return Pt(function(le){return Lt(ge,le,pe)},this.b).call(this,$(ae,Z,te))},rt.prototype.serverStreaming=rt.prototype.R,rt.prototype.unaryCall=rt.prototype.unaryCall,rt.prototype.thenableCall=rt.prototype.M,rt.prototype.rpcCall=rt.prototype.P,e.exports.AbstractClientBase={MethodInfo:function(j,Z,te,ae,ge){this.name=ae,this.b=ge,this.f=j,this.a=Z,this.c=te}},e.exports.GrpcWebClientBase=rt,e.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},e.exports.MethodDescriptor=I,e.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}}).call(this,n(6))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var r,i=n(152),s=(r=i)&&r.__esModule?r:{default:r};function l(o){return o[Symbol.toStringTag]==="AsyncFunction"}t.default=function(o){if(typeof o!="function")throw new Error("expected a function");return l(o)?(0,s.default)(o):o},t.isAsync=l,t.isAsyncGenerator=function(o){return o[Symbol.toStringTag]==="AsyncGenerator"},t.isAsyncIterable=function(o){return typeof o[Symbol.asyncIterator]=="function"}},function(e,t,n){var r={};function i(l,o,c){c||(c=Error);var u=function(f){var E,w;function h(g,b,R){return f.call(this,function(x,F,M){return typeof o=="string"?o:o(x,F,M)}(g,b,R))||this}return w=f,(E=h).prototype=Object.create(w.prototype),E.prototype.constructor=E,E.__proto__=w,h}(c);u.prototype.name=c.name,u.prototype.code=l,r[l]=u}function s(l,o){if(Array.isArray(l)){var c=l.length;return l=l.map(function(u){return String(u)}),c>2?"one of ".concat(o," ").concat(l.slice(0,c-1).join(", "),", or ")+l[c-1]:c===2?"one of ".concat(o," ").concat(l[0]," or ").concat(l[1]):"of ".concat(o," ").concat(l[0])}return"of ".concat(o," ").concat(String(l))}i("ERR_INVALID_OPT_VALUE",function(l,o){return'The value "'+o+'" is invalid for option "'+l+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(l,o,c){var u,f,E;if(typeof o=="string"&&(f="not ",o.substr(0,f.length)===f)?(u="must not be",o=o.replace(/^not /,"")):u="must be",function(h,g,b){return(b===void 0||b>h.length)&&(b=h.length),h.substring(b-g.length,b)===g}(l," argument"))E="The ".concat(l," ").concat(u," ").concat(s(o,"type"));else{var w=function(h,g,b){return typeof b!="number"&&(b=0),!(b+g.length>h.length)&&h.indexOf(g,b)!==-1}(l,".")?"property":"argument";E='The "'.concat(l,'" ').concat(w," ").concat(u," ").concat(s(o,"type"))}return E+=". Received type ".concat(typeof c)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){(function(r){var i=Object.keys||function(h){var g=[];for(var b in h)g.push(b);return g};e.exports=f;var s=n(77),l=n(81);n(7)(f,s);for(var o=i(l.prototype),c=0;c<o.length;c++){var u=o[c];f.prototype[u]||(f.prototype[u]=l.prototype[u])}function f(h){if(!(this instanceof f))return new f(h);s.call(this,h),l.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",E)))}function E(){this._writableState.ended||r.nextTick(w,this)}function w(h){h.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}})}).call(this,n(2))},function(e,t,n){n.d(t,"a",function(){return l});var r=n(40),i=n(4);const s={"app-id":["app-id must match formant/*"]};class l extends r.a{constructor(c,u={}){super(c,Object.assign({validateHeaders:f=>`${f.get("app-id")}`.startsWith("formant/")?{}:s},u)),this.endpoint=c}getHeaders(){return Object.assign(Object.assign({},l.headers),{"App-ID":`formant/${i.a}`,"App-Version":i.j})}}l.headers={}},function(e,t,n){n(227),e.exports={encode:r=>new TextEncoder().encode(r),decode:r=>new TextDecoder().decode(r)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i=r.length){if(!i)throw new Error("arity is undefined");return function(...s){return typeof s[i-1]=="function"?r.apply(this,s):new Promise((l,o)=>{s[i-1]=(c,...u)=>{if(c)return o(c);l(u.length>1?u:u[0])},r.apply(this,s)})}},e.exports=t.default},function(e,t,n){(t=e.exports=n(69)).Stream=t,t.Readable=t,t.Writable=n(48),t.Duplex=n(23),t.Transform=n(72),t.PassThrough=n(165)},function(e,t,n){(t=e.exports=n(77)).Stream=t,t.Readable=t,t.Writable=n(81),t.Duplex=n(27),t.Transform=n(82),t.PassThrough=n(184),t.finished=n(49),t.pipeline=n(185)},function(e,t,n){e.exports=function(r){return r}},function(e,t,n){n.d(t,"a",function(){return i});const r=["password","secret","token","key","buffer"];function i(s,l=new Set){return l.has(s)?"[ RECURSIVE ]":!(o=s)||typeof o!="object"&&typeof o!="function"?s:(l.add(s),Object.keys(s).reduce((c,u)=>(c[u]=r.some(f=>u.toLowerCase().includes(f.toLowerCase()))?"[ REDACTED ]":i(s[u],l),c),{}));var o}},function(e,t){e.exports=r,r.default=r,r.stable=s,r.stableStringify=s;var n=[];function r(l,o,c){(function E(w,h,g,b){var R;if(typeof w=="object"&&w!==null){for(R=0;R<g.length;R++)if(g[R]===w)return b[h]="[Circular]",void n.push([b,h,w]);if(g.push(w),Array.isArray(w))for(R=0;R<w.length;R++)E(w[R],R,g,w);else{var x=Object.keys(w);for(R=0;R<x.length;R++){var F=x[R];E(w[F],F,g,w)}}g.pop()}})(l,"",[],void 0);for(var u=JSON.stringify(l,o,c);n.length!==0;){var f=n.pop();f[0][f[1]]=f[2]}return u}function i(l,o){return l<o?-1:l>o?1:0}function s(l,o,c){for(var u=function w(h,g,b,R){var x;if(typeof h=="object"&&h!==null){for(x=0;x<b.length;x++)if(b[x]===h)return R[g]="[Circular]",void n.push([R,g,h]);if(typeof h.toJSON=="function")return;if(b.push(h),Array.isArray(h))for(x=0;x<h.length;x++)w(h[x],x,b,h);else{var F={},M=Object.keys(h).sort(i);for(x=0;x<M.length;x++){var A=M[x];w(h[A],A,b,h),F[A]=h[A]}if(R===void 0)return F;n.push([R,g,h]),R[g]=F}b.pop()}}(l,"",[],void 0)||l,f=JSON.stringify(u,o,c);n.length!==0;){var E=n.pop();E[0][E[1]]=E[2]}return f}},function(e,t,n){var r=n(16),i=Object.keys||function(g){var b=[];for(var R in g)b.push(R);return b};e.exports=E;var s=Object.create(n(17));s.inherits=n(7);var l=n(143),o=n(62);s.inherits(E,l);for(var c=i(o.prototype),u=0;u<c.length;u++){var f=c[u];E.prototype[f]||(E.prototype[f]=o.prototype[f])}function E(g){if(!(this instanceof E))return new E(g);l.call(this,g),o.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}function w(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(g){g.end()}Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),E.prototype._destroy=function(g,b){this.push(null),this.end(),r.nextTick(b,g)}},function(e,t,n){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function i(o,c){return Object.prototype.hasOwnProperty.call(o,c)}t.assign=function(o){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var f in u)i(u,f)&&(o[f]=u[f])}}return o},t.shrinkBuf=function(o,c){return o.length===c?o:o.subarray?o.subarray(0,c):(o.length=c,o)};var s={arraySet:function(o,c,u,f,E){if(c.subarray&&o.subarray)o.set(c.subarray(u,u+f),E);else for(var w=0;w<f;w++)o[E+w]=c[u+w]},flattenChunks:function(o){var c,u,f,E,w,h;for(f=0,c=0,u=o.length;c<u;c++)f+=o[c].length;for(h=new Uint8Array(f),E=0,c=0,u=o.length;c<u;c++)w=o[c],h.set(w,E),E+=w.length;return h}},l={arraySet:function(o,c,u,f,E){for(var w=0;w<f;w++)o[E+w]=c[u+w]},flattenChunks:function(o){return[].concat.apply([],o)}};t.setTyped=function(o){o?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,s)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,l))},t.setTyped(r)},function(e,t,n){e.exports=n(186)},function(e,t,n){n.d(t,"a",function(){return i});var r=n(229);const i=Object(r.a)()},function(e,t,n){n.d(t,"a",function(){return x});var r=n(1),i=n(100),s=n.n(i),l=n(101),o=n.n(l);class c extends Error{constructor(M,A,d){super(`Connection failure: ${M.message}`),this.cause=M,this.url=A,this.retryable=d}}var u=n(8),f=n(0),E=n(10),w=n(11);class h extends Error{constructor(M,A){super(`Invalid headers (${JSON.stringify(M)}) for response: ${A.message}`),this.validationErrors=M,this.responseError=A}}var g=function(F,M,A,d){return new(A||(A=Promise))(function(I,$){function q(C){try{y(d.next(C))}catch(_){$(_)}}function m(C){try{y(d.throw(C))}catch(_){$(_)}}function y(C){var _;C.done?I(C.value):(_=C.value,_ instanceof A?_:new A(function(L){L(_)})).then(q,m)}y((d=d.apply(F,M||[])).next())})},b=function(F,M){var A={};for(var d in F)Object.prototype.hasOwnProperty.call(F,d)&&M.indexOf(d)<0&&(A[d]=F[d]);if(F!=null&&typeof Object.getOwnPropertySymbols=="function"){var I=0;for(d=Object.getOwnPropertySymbols(F);I<d.length;I++)M.indexOf(d[I])<0&&Object.prototype.propertyIsEnumerable.call(F,d[I])&&(A[d[I]]=F[d[I]])}return A};const R=new Set(["GET","HEAD","PUT","QUERY","DELETE","OPTIONS","TRACE"]);class x{constructor(M,A={}){if(this.endpoint=M,this.validateHeaders=d=>A.validateHeaders?A.validateHeaders(d):{},this.verbose=A.verbose!==!1,A.retries!==void 0&&!(A.retries>=0))throw new Error("retries must be positive or zero");if(this.configuredRetries=A.retries,A.timeoutMs!==void 0&&!(A.timeoutMs>0))throw new Error("timeoutMs must be positive");if(this.timeoutMs=A.timeoutMs,A.maxBackoffDelayMs!==void 0&&!(A.maxBackoffDelayMs>0))throw new Error("maxBackoffDelayMs must be positive");this.maxBackoffDelayMs=A.maxBackoffDelayMs||30*r.a.second}getRetries(){return this.configuredRetries!==void 0?this.configuredRetries:this.getConstructor().retries}getHeaders(){return{}}fetch(M,A={}){return g(this,void 0,void 0,function*(){return(yield this.fetchVerbose(M,A)).body})}fetchVerbose(M,A={}){return g(this,void 0,void 0,function*(){let d=100*r.a.millisecond,I=0;const $=this.timeoutMs!==void 0?new Date().getTime()+this.timeoutMs:void 0,q=$?()=>Math.max($-new Date().getTime(),0):void 0;for(;;)try{return yield this.doFetch(M,A,q)}catch(m){const y=Object(E.a)(m,c);if((q==null?void 0:q())===0||I===this.getRetries()||!y.retryable)throw y;I++,d=Math.min(...q?[q()]:[],d*(2+.1*(Math.random()-.5)),this.maxBackoffDelayMs),yield Object(u.a)(d),this.verbose&&f.a.warn(`Connection failure, retrying. Error: ${m.cause.message}`,{url:m.url,error:m.cause,attempt:I})}})}doFetch(M,A,d){return g(this,void 0,void 0,function*(){const{token:I,json:$,allowUnsafeRetries:q}=A,m=b(A,["token","json","allowUnsafeRetries"]),y=(m.method||"GET").toUpperCase(),C=this.endpoint!==void 0?`${this.endpoint}${M?`/${M}`:""}`:M,_=new s.a;let L;if(d){const z=d();z>0?L=setTimeout(()=>{_.abort()},z):_.abort()}try{let z;yield Promise.race([this.getConstructor().waitForConnectivity(),new Promise(U=>{z=setTimeout(U,d?Math.min(r.a.minute,d()):r.a.minute)})]),z&&clearTimeout(z);const B=yield o()(C,Object.assign(Object.assign({},m),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},$!==!1?{"Content-Type":"application/json"}:{}),this.getHeaders()),m.headers||{}),I!==void 0?{Authorization:`Bearer ${I}`}:{}),signal:_.signal})),N=B.headers.get("content-type")||"",P=N&&N.startsWith("application/json"),W=P?yield B.json():yield B.text(),O=()=>new w.a(y,C,B.status,W,W&&W.validationErrors||{},B.headers);if(!B.ok)throw this.verbose&&f.a[B.status>=500?"warn":"info"]("Response error",{method:y,url:C,statusCode:B.status}),O();const p=this.validateHeaders(B.headers);if(Object.keys(p).length!==0)throw new h(p,O());if(B.status===204)return{body:void 0,headers:B.headers};if($&&!P)throw new Error(`Response is not JSON: ${JSON.stringify(W)}`);return{body:W,headers:B.headers}}catch(z){const B=q||R.has(y);if(z.message==="Network request failed")throw new c(z,C,B);if(z.type==="system"&&["EAI_AGAIN","ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].find(O=>O===z.code))throw new c(z,C,!0);if(z.type==="system"&&["ETIMEDOUT","ECONNRESET","ESOCKETTIMEDOUT","EPIPE"].find(O=>O===z.code))throw new c(z,C,B);if(z.name==="AbortError")throw new c(z,C,B);const N=Object(E.a)(z,w.a),{statusCode:P}=N;if(P===408||P===429||P===502||P===503||P===504)throw this.verbose&&!B&&f.a.warn("Potentially unsafe retry"),new c(z,C,!0);const W=this.validateHeaders(N.headers);throw Object.keys(W).length!==0?new h(W,N):(yield this.getConstructor().onResponseError(N),z)}finally{L&&clearTimeout(L)}})}getConstructor(){return Object.getPrototypeOf(this).constructor}}x.retries=8,x.waitForConnectivity=()=>g(void 0,void 0,void 0,function*(){}),x.onResponseError=()=>g(void 0,void 0,void 0,function*(){})},function(e,t,n){function r(E,w){if(!(E instanceof w))throw new TypeError("Cannot call a class as a function")}function i(E,w){for(var h=0;h<w.length;h++){var g=w[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}var s=n(59),l=n(3),o=l.LEVEL,c=l.MESSAGE;s.enabled=!0;var u=/\s+/,f=function(){function E(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,E),b.colors&&this.addColors(b.colors),this.options=b}var w,h,g;return w=E,g=[{key:"addColors",value:function(b){var R=Object.keys(b).reduce(function(x,F){return x[F]=u.test(b[F])?b[F].split(u):b[F],x},{});return E.allColors=Object.assign({},E.allColors||{},R),E.allColors}}],(h=[{key:"addColors",value:function(b){return E.addColors(b)}},{key:"colorize",value:function(b,R,x){if(x===void 0&&(x=R),!Array.isArray(E.allColors[b]))return s[E.allColors[b]](x);for(var F=0,M=E.allColors[b].length;F<M;F++)x=s[E.allColors[b][F]](x);return x}},{key:"transform",value:function(b,R){return R.all&&typeof b[c]=="string"&&(b[c]=this.colorize(b[o],b.level,b[c])),(R.level||R.all||!R.message)&&(b.level=this.colorize(b[o],b.level)),(R.all||R.message)&&(b.message=this.colorize(b[o],b.level,b.message)),b}}])&&i(w.prototype,h),g&&i(w,g),E}();e.exports=function(E){return new f(E)},e.exports.Colorizer=e.exports.Format=f},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){(function(r){function i(s){try{if(!r.localStorage)return!1}catch{return!1}var l=r.localStorage[s];return l!=null&&String(l).toLowerCase()==="true"}e.exports=function(s,l){if(i("noDeprecation"))return s;var o=!1;return function(){if(!o){if(i("throwDeprecation"))throw new Error(l);i("traceDeprecation")?console.trace(l):console.warn(l),o=!0}return s.apply(this,arguments)}}}).call(this,n(6))},function(e,t,n){var r=n(5),i=r.Buffer;function s(o,c){for(var u in o)c[u]=o[u]}function l(o,c,u){return i(o,c,u)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=l),s(i,l),l.from=function(o,c,u){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,c,u)},l.alloc=function(o,c,u){if(typeof o!="number")throw new TypeError("Argument must be a number");var f=i(o);return c!==void 0?typeof u=="string"?f.fill(c,u):f.fill(c):f.fill(0),f},l.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},l.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return r&&typeof r.length=="number"&&r.length>=0&&r.length%1==0},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,n){var r=n(5),i=r.Buffer;function s(o,c){for(var u in o)c[u]=o[u]}function l(o,c,u){return i(o,c,u)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=l),s(i,l),l.from=function(o,c,u){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,c,u)},l.alloc=function(o,c,u){if(typeof o!="number")throw new TypeError("Argument must be a number");var f=i(o);return c!==void 0?typeof u=="string"?f.fill(c,u):f.fill(c):f.fill(0),f},l.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},l.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}},function(e,t,n){(function(r,i,s){var l=n(16);function o(y){var C=this;this.next=null,this.entry=null,this.finish=function(){(function(_,L,z){var B=_.entry;for(_.entry=null;B;){var N=B.callback;L.pendingcb--,N(z),B=B.next}L.corkedRequestsFree?L.corkedRequestsFree.next=_:L.corkedRequestsFree=_})(C,y)}}e.exports=M;var c,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:l.nextTick;M.WritableState=F;var f=n(17);f.inherits=n(7);var E={deprecate:n(43)},w=n(70),h=n(47).Buffer,g=s.Uint8Array||function(){},b,R=n(71);function x(){}function F(y,C){c=c||n(23),y=y||{};var _=C instanceof c;this.objectMode=!!y.objectMode,_&&(this.objectMode=this.objectMode||!!y.writableObjectMode);var L=y.highWaterMark,z=y.writableHighWaterMark,B=this.objectMode?16:16384;this.highWaterMark=L||L===0?L:_&&(z||z===0)?z:B,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var N=y.decodeStrings===!1;this.decodeStrings=!N,this.defaultEncoding=y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(P){(function(W,O){var p=W._writableState,U=p.sync,V=p.writecb;if(function(ee){ee.writing=!1,ee.writecb=null,ee.length-=ee.writelen,ee.writelen=0}(p),O)(function(ee,ne,Y,G,S){--ne.pendingcb,Y?(l.nextTick(S,G),l.nextTick(m,ee,ne),ee._writableState.errorEmitted=!0,ee.emit("error",G)):(S(G),ee._writableState.errorEmitted=!0,ee.emit("error",G),m(ee,ne))})(W,p,U,O,V);else{var Q=$(p);Q||p.corked||p.bufferProcessing||!p.bufferedRequest||I(W,p),U?u(d,W,p,Q,V):d(W,p,Q,V)}})(C,P)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function M(y){if(c=c||n(23),!(b.call(M,this)||this instanceof c))return new M(y);this._writableState=new F(y,this),this.writable=!0,y&&(typeof y.write=="function"&&(this._write=y.write),typeof y.writev=="function"&&(this._writev=y.writev),typeof y.destroy=="function"&&(this._destroy=y.destroy),typeof y.final=="function"&&(this._final=y.final)),w.call(this)}function A(y,C,_,L,z,B,N){C.writelen=L,C.writecb=N,C.writing=!0,C.sync=!0,_?y._writev(z,C.onwrite):y._write(z,B,C.onwrite),C.sync=!1}function d(y,C,_,L){_||function(z,B){B.length===0&&B.needDrain&&(B.needDrain=!1,z.emit("drain"))}(y,C),C.pendingcb--,L(),m(y,C)}function I(y,C){C.bufferProcessing=!0;var _=C.bufferedRequest;if(y._writev&&_&&_.next){var L=C.bufferedRequestCount,z=new Array(L),B=C.corkedRequestsFree;B.entry=_;for(var N=0,P=!0;_;)z[N]=_,_.isBuf||(P=!1),_=_.next,N+=1;z.allBuffers=P,A(y,C,!0,C.length,z,"",B.finish),C.pendingcb++,C.lastBufferedRequest=null,B.next?(C.corkedRequestsFree=B.next,B.next=null):C.corkedRequestsFree=new o(C),C.bufferedRequestCount=0}else{for(;_;){var W=_.chunk,O=_.encoding,p=_.callback;if(A(y,C,!1,C.objectMode?1:W.length,W,O,p),_=_.next,C.bufferedRequestCount--,C.writing)break}_===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=_,C.bufferProcessing=!1}function $(y){return y.ending&&y.length===0&&y.bufferedRequest===null&&!y.finished&&!y.writing}function q(y,C){y._final(function(_){C.pendingcb--,_&&y.emit("error",_),C.prefinished=!0,y.emit("prefinish"),m(y,C)})}function m(y,C){var _=$(C);return _&&(function(L,z){z.prefinished||z.finalCalled||(typeof L._final=="function"?(z.pendingcb++,z.finalCalled=!0,l.nextTick(q,L,z)):(z.prefinished=!0,L.emit("prefinish")))}(y,C),C.pendingcb===0&&(C.finished=!0,y.emit("finish"))),_}f.inherits(M,w),F.prototype.getBuffer=function(){for(var y=this.bufferedRequest,C=[];y;)C.push(y),y=y.next;return C},function(){try{Object.defineProperty(F.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(y){return!!b.call(this,y)||this===M&&y&&y._writableState instanceof F}})):b=function(y){return y instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(y,C,_){var L,z=this._writableState,B=!1,N=!z.objectMode&&(L=y,h.isBuffer(L)||L instanceof g);return N&&!h.isBuffer(y)&&(y=function(P){return h.from(P)}(y)),typeof C=="function"&&(_=C,C=null),N?C="buffer":C||(C=z.defaultEncoding),typeof _!="function"&&(_=x),z.ended?function(P,W){var O=new Error("write after end");P.emit("error",O),l.nextTick(W,O)}(this,_):(N||function(P,W,O,p){var U=!0,V=!1;return O===null?V=new TypeError("May not write null values to stream"):typeof O=="string"||O===void 0||W.objectMode||(V=new TypeError("Invalid non-string/buffer chunk")),V&&(P.emit("error",V),l.nextTick(p,V),U=!1),U}(this,z,y,_))&&(z.pendingcb++,B=function(P,W,O,p,U,V){if(!O){var Q=function(G,S,T){return G.objectMode||G.decodeStrings===!1||typeof S!="string"||(S=h.from(S,T)),S}(W,p,U);p!==Q&&(O=!0,U="buffer",p=Q)}var ee=W.objectMode?1:p.length;W.length+=ee;var ne=W.length<W.highWaterMark;if(ne||(W.needDrain=!0),W.writing||W.corked){var Y=W.lastBufferedRequest;W.lastBufferedRequest={chunk:p,encoding:U,isBuf:O,callback:V,next:null},Y?Y.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else A(P,W,!1,ee,p,U,V);return ne}(this,z,N,y,C,_)),B},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var y=this._writableState;y.corked&&(y.corked--,y.writing||y.corked||y.finished||y.bufferProcessing||!y.bufferedRequest||I(this,y))},M.prototype.setDefaultEncoding=function(y){if(typeof y=="string"&&(y=y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((y+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+y);return this._writableState.defaultEncoding=y,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(y,C,_){_(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(y,C,_){var L=this._writableState;typeof y=="function"?(_=y,y=null,C=null):typeof C=="function"&&(_=C,C=null),y!=null&&this.write(y,C),L.corked&&(L.corked=1,this.uncork()),L.ending||L.finished||function(z,B,N){B.ending=!0,m(z,B),N&&(B.finished?l.nextTick(N):z.once("finish",N)),B.ended=!0,z.writable=!1}(this,L,_)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(y){this._writableState&&(this._writableState.destroyed=y)}}),M.prototype.destroy=R.destroy,M.prototype._undestroy=R.undestroy,M.prototype._destroy=function(y,C){this.end(),C(y)}}).call(this,n(2),n(15).setImmediate,n(6))},function(e,t,n){var r=n(26).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function s(l,o,c){if(typeof o=="function")return s(l,null,o);o||(o={}),c=function(M){var A=!1;return function(){if(!A){A=!0;for(var d=arguments.length,I=new Array(d),$=0;$<d;$++)I[$]=arguments[$];M.apply(this,I)}}}(c||i);var u=o.readable||o.readable!==!1&&l.readable,f=o.writable||o.writable!==!1&&l.writable,E=function(){l.writable||h()},w=l._writableState&&l._writableState.finished,h=function(){f=!1,w=!0,u||c.call(l)},g=l._readableState&&l._readableState.endEmitted,b=function(){u=!1,g=!0,f||c.call(l)},R=function(M){c.call(l,M)},x=function(){var M;return u&&!g?(l._readableState&&l._readableState.ended||(M=new r),c.call(l,M)):f&&!w?(l._writableState&&l._writableState.ended||(M=new r),c.call(l,M)):void 0},F=function(){l.req.on("finish",h)};return function(M){return M.setHeader&&typeof M.abort=="function"}(l)?(l.on("complete",h),l.on("abort",x),l.req?F():l.on("request",F)):f&&!l._writableState&&(l.on("end",E),l.on("close",E)),l.on("end",b),l.on("finish",h),o.error!==!1&&l.on("error",R),l.on("close",x),function(){l.removeListener("complete",h),l.removeListener("abort",x),l.removeListener("request",F),l.req&&l.req.removeListener("finish",h),l.removeListener("end",E),l.removeListener("close",E),l.removeListener("finish",h),l.removeListener("end",b),l.removeListener("error",R),l.removeListener("close",x)}}},function(e,t,n){var r=n(58),i=n(3).configs;t.cli=r.levels(i.cli),t.npm=r.levels(i.npm),t.syslog=r.levels(i.syslog),t.addColors=r.levels},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(203)),i=o(n(204)),s=o(n(25)),l=o(n(30));function o(c){return c&&c.__esModule?c:{default:c}}t.default=(0,l.default)(function(c,u,f){return(0,r.default)(c,(0,i.default)((0,s.default)(u)),f)},3),e.exports=t.default},function(e,t,n){class r extends Error{constructor(s,...l){super(`env-var: ${s}`,...l),Error.captureStackTrace&&Error.captureStackTrace(this,r),this.name="EnvVarError"}}e.exports=r},function(e,t,n){e.exports=function(r){const i=parseInt(r,10);if(isNaN(i)||i.toString(10)!==r)throw new Error("should be a valid integer");return i}},function(e,t,n){e.exports=function(r){const i=parseFloat(r);if(isNaN(i)||i.toString()!==r)throw new Error("should be a valid float");return i}},function(e,t,n){e.exports=function(r){try{return JSON.parse(r)}catch{throw new Error("should be valid (parseable) JSON")}}},function(e,t,n){(function(r){function i(o,c){for(var u=0,f=o.length-1;f>=0;f--){var E=o[f];E==="."?o.splice(f,1):E===".."?(o.splice(f,1),u++):u&&(o.splice(f,1),u--)}if(c)for(;u--;u)o.unshift("..");return o}function s(o,c){if(o.filter)return o.filter(c);for(var u=[],f=0;f<o.length;f++)c(o[f],f,o)&&u.push(o[f]);return u}t.resolve=function(){for(var o="",c=!1,u=arguments.length-1;u>=-1&&!c;u--){var f=u>=0?arguments[u]:r.cwd();if(typeof f!="string")throw new TypeError("Arguments to path.resolve must be strings");f&&(o=f+"/"+o,c=f.charAt(0)==="/")}return(c?"/":"")+(o=i(s(o.split("/"),function(E){return!!E}),!c).join("/"))||"."},t.normalize=function(o){var c=t.isAbsolute(o),u=l(o,-1)==="/";return(o=i(s(o.split("/"),function(f){return!!f}),!c).join("/"))||c||(o="."),o&&u&&(o+="/"),(c?"/":"")+o},t.isAbsolute=function(o){return o.charAt(0)==="/"},t.join=function(){var o=Array.prototype.slice.call(arguments,0);return t.normalize(s(o,function(c,u){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(o,c){function u(R){for(var x=0;x<R.length&&R[x]==="";x++);for(var F=R.length-1;F>=0&&R[F]==="";F--);return x>F?[]:R.slice(x,F-x+1)}o=t.resolve(o).substr(1),c=t.resolve(c).substr(1);for(var f=u(o.split("/")),E=u(c.split("/")),w=Math.min(f.length,E.length),h=w,g=0;g<w;g++)if(f[g]!==E[g]){h=g;break}var b=[];for(g=h;g<f.length;g++)b.push("..");return(b=b.concat(E.slice(h))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(o){if(typeof o!="string"&&(o+=""),o.length===0)return".";for(var c=o.charCodeAt(0),u=c===47,f=-1,E=!0,w=o.length-1;w>=1;--w)if((c=o.charCodeAt(w))===47){if(!E){f=w;break}}else E=!1;return f===-1?u?"/":".":u&&f===1?"/":o.slice(0,f)},t.basename=function(o,c){var u=function(f){typeof f!="string"&&(f+="");var E,w=0,h=-1,g=!0;for(E=f.length-1;E>=0;--E)if(f.charCodeAt(E)===47){if(!g){w=E+1;break}}else h===-1&&(g=!1,h=E+1);return h===-1?"":f.slice(w,h)}(o);return c&&u.substr(-1*c.length)===c&&(u=u.substr(0,u.length-c.length)),u},t.extname=function(o){typeof o!="string"&&(o+="");for(var c=-1,u=0,f=-1,E=!0,w=0,h=o.length-1;h>=0;--h){var g=o.charCodeAt(h);if(g!==47)f===-1&&(E=!1,f=h+1),g===46?c===-1?c=h:w!==1&&(w=1):c!==-1&&(w=-1);else if(!E){u=h+1;break}}return c===-1||f===-1||w===0||w===1&&c===f-1&&c===u+1?"":o.slice(c,f)};var l="ab".substr(-1)==="b"?function(o,c,u){return o.substr(c,u)}:function(o,c,u){return c<0&&(c=o.length+c),o.substr(c,u)}}).call(this,n(2))},,function(e,t,n){var r=t.format=n(12);t.levels=n(105),Object.defineProperty(r,"align",{value:n(122)}),Object.defineProperty(r,"cli",{value:n(123)}),Object.defineProperty(r,"combine",{value:n(124)}),Object.defineProperty(r,"colorize",{value:n(41)}),Object.defineProperty(r,"json",{value:n(125)}),Object.defineProperty(r,"label",{value:n(128)}),Object.defineProperty(r,"logstash",{value:n(129)}),Object.defineProperty(r,"metadata",{value:n(130)}),Object.defineProperty(r,"padLevels",{value:n(60)}),Object.defineProperty(r,"prettyPrint",{value:n(131)}),Object.defineProperty(r,"printf",{value:n(132)}),Object.defineProperty(r,"simple",{value:n(133)}),Object.defineProperty(r,"splat",{value:n(134)}),Object.defineProperty(r,"timestamp",{value:n(135)}),Object.defineProperty(r,"uncolorize",{value:n(137)})},function(e,t,n){var r=n(106);e.exports=r},function(e,t,n){function r(w){return function(h){if(Array.isArray(h))return i(h)}(w)||function(h){if(typeof Symbol<"u"&&Symbol.iterator in Object(h))return Array.from(h)}(w)||function(h,g){if(h){if(typeof h=="string")return i(h,g);var b=Object.prototype.toString.call(h).slice(8,-1);if(b==="Object"&&h.constructor&&(b=h.constructor.name),b==="Map"||b==="Set")return Array.from(h);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return i(h,g)}}(w)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(w,h){(h==null||h>w.length)&&(h=w.length);for(var g=0,b=new Array(h);g<h;g++)b[g]=w[g];return b}function s(w,h){if(!(w instanceof h))throw new TypeError("Cannot call a class as a function")}function l(w,h){for(var g=0;g<h.length;g++){var b=h[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(w,b.key,b)}}var o=n(3),c=o.configs,u=o.LEVEL,f=o.MESSAGE,E=function(){function w(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{levels:c.npm.levels};s(this,w),this.paddings=w.paddingForLevels(R.levels,R.filler),this.options=R}var h,g,b;return h=w,b=[{key:"getLongestLevel",value:function(R){var x=Object.keys(R).map(function(F){return F.length});return Math.max.apply(Math,r(x))}},{key:"paddingForLevel",value:function(R,x,F){var M=F+1-R.length,A=Math.floor(M/x.length);return"".concat(x).concat(x.repeat(A)).slice(0,M)}},{key:"paddingForLevels",value:function(R){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ",F=w.getLongestLevel(R);return Object.keys(R).reduce(function(M,A){return M[A]=w.paddingForLevel(A,x,F),M},{})}}],(g=[{key:"transform",value:function(R,x){return R.message="".concat(this.paddings[R[u]]).concat(R.message),R[f]&&(R[f]="".concat(this.paddings[R[u]]).concat(R[f])),R}}])&&l(h.prototype,g),b&&l(h,b),w}();e.exports=function(w){return new E(w)},e.exports.Padder=e.exports.Format=E},function(e,t,n){var r=n(13).format;t.warn={deprecated:function(i){return function(){throw new Error(r("{ %s } was removed in winston@3.0.0.",i))}},useFormat:function(i){return function(){throw new Error([r("{ %s } was removed in winston@3.0.0.",i),"Use a custom winston.format = winston.format(function) instead."].join(`
26
+ `))}},forFunctions:function(i,s,l){l.forEach(function(o){i[o]=t.warn[s](o)})},moved:function(i,s,l){function o(){return function(){throw new Error([r("winston.%s was moved in winston@3.0.0.",l),r("Use a winston.%s instead.",s)].join(`
27
+ `))}}Object.defineProperty(i,l,{get:o,set:o})},forProperties:function(i,s,l){l.forEach(function(o){var c=t.warn[s](o);Object.defineProperty(i,o,{get:c,set:c})})}}},function(e,t,n){(function(r,i,s){var l=n(16);function o(y){var C=this;this.next=null,this.entry=null,this.finish=function(){(function(_,L,z){var B=_.entry;for(_.entry=null;B;){var N=B.callback;L.pendingcb--,N(z),B=B.next}L.corkedRequestsFree?L.corkedRequestsFree.next=_:L.corkedRequestsFree=_})(C,y)}}e.exports=M;var c,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:l.nextTick;M.WritableState=F;var f=Object.create(n(17));f.inherits=n(7);var E={deprecate:n(43)},w=n(63),h=n(44).Buffer,g=s.Uint8Array||function(){},b,R=n(64);function x(){}function F(y,C){c=c||n(36),y=y||{};var _=C instanceof c;this.objectMode=!!y.objectMode,_&&(this.objectMode=this.objectMode||!!y.writableObjectMode);var L=y.highWaterMark,z=y.writableHighWaterMark,B=this.objectMode?16:16384;this.highWaterMark=L||L===0?L:_&&(z||z===0)?z:B,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var N=y.decodeStrings===!1;this.decodeStrings=!N,this.defaultEncoding=y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(P){(function(W,O){var p=W._writableState,U=p.sync,V=p.writecb;if(function(ee){ee.writing=!1,ee.writecb=null,ee.length-=ee.writelen,ee.writelen=0}(p),O)(function(ee,ne,Y,G,S){--ne.pendingcb,Y?(l.nextTick(S,G),l.nextTick(m,ee,ne),ee._writableState.errorEmitted=!0,ee.emit("error",G)):(S(G),ee._writableState.errorEmitted=!0,ee.emit("error",G),m(ee,ne))})(W,p,U,O,V);else{var Q=$(p);Q||p.corked||p.bufferProcessing||!p.bufferedRequest||I(W,p),U?u(d,W,p,Q,V):d(W,p,Q,V)}})(C,P)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function M(y){if(c=c||n(36),!(b.call(M,this)||this instanceof c))return new M(y);this._writableState=new F(y,this),this.writable=!0,y&&(typeof y.write=="function"&&(this._write=y.write),typeof y.writev=="function"&&(this._writev=y.writev),typeof y.destroy=="function"&&(this._destroy=y.destroy),typeof y.final=="function"&&(this._final=y.final)),w.call(this)}function A(y,C,_,L,z,B,N){C.writelen=L,C.writecb=N,C.writing=!0,C.sync=!0,_?y._writev(z,C.onwrite):y._write(z,B,C.onwrite),C.sync=!1}function d(y,C,_,L){_||function(z,B){B.length===0&&B.needDrain&&(B.needDrain=!1,z.emit("drain"))}(y,C),C.pendingcb--,L(),m(y,C)}function I(y,C){C.bufferProcessing=!0;var _=C.bufferedRequest;if(y._writev&&_&&_.next){var L=C.bufferedRequestCount,z=new Array(L),B=C.corkedRequestsFree;B.entry=_;for(var N=0,P=!0;_;)z[N]=_,_.isBuf||(P=!1),_=_.next,N+=1;z.allBuffers=P,A(y,C,!0,C.length,z,"",B.finish),C.pendingcb++,C.lastBufferedRequest=null,B.next?(C.corkedRequestsFree=B.next,B.next=null):C.corkedRequestsFree=new o(C),C.bufferedRequestCount=0}else{for(;_;){var W=_.chunk,O=_.encoding,p=_.callback;if(A(y,C,!1,C.objectMode?1:W.length,W,O,p),_=_.next,C.bufferedRequestCount--,C.writing)break}_===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=_,C.bufferProcessing=!1}function $(y){return y.ending&&y.length===0&&y.bufferedRequest===null&&!y.finished&&!y.writing}function q(y,C){y._final(function(_){C.pendingcb--,_&&y.emit("error",_),C.prefinished=!0,y.emit("prefinish"),m(y,C)})}function m(y,C){var _=$(C);return _&&(function(L,z){z.prefinished||z.finalCalled||(typeof L._final=="function"?(z.pendingcb++,z.finalCalled=!0,l.nextTick(q,L,z)):(z.prefinished=!0,L.emit("prefinish")))}(y,C),C.pendingcb===0&&(C.finished=!0,y.emit("finish"))),_}f.inherits(M,w),F.prototype.getBuffer=function(){for(var y=this.bufferedRequest,C=[];y;)C.push(y),y=y.next;return C},function(){try{Object.defineProperty(F.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(y){return!!b.call(this,y)||this===M&&y&&y._writableState instanceof F}})):b=function(y){return y instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(y,C,_){var L,z=this._writableState,B=!1,N=!z.objectMode&&(L=y,h.isBuffer(L)||L instanceof g);return N&&!h.isBuffer(y)&&(y=function(P){return h.from(P)}(y)),typeof C=="function"&&(_=C,C=null),N?C="buffer":C||(C=z.defaultEncoding),typeof _!="function"&&(_=x),z.ended?function(P,W){var O=new Error("write after end");P.emit("error",O),l.nextTick(W,O)}(this,_):(N||function(P,W,O,p){var U=!0,V=!1;return O===null?V=new TypeError("May not write null values to stream"):typeof O=="string"||O===void 0||W.objectMode||(V=new TypeError("Invalid non-string/buffer chunk")),V&&(P.emit("error",V),l.nextTick(p,V),U=!1),U}(this,z,y,_))&&(z.pendingcb++,B=function(P,W,O,p,U,V){if(!O){var Q=function(G,S,T){return G.objectMode||G.decodeStrings===!1||typeof S!="string"||(S=h.from(S,T)),S}(W,p,U);p!==Q&&(O=!0,U="buffer",p=Q)}var ee=W.objectMode?1:p.length;W.length+=ee;var ne=W.length<W.highWaterMark;if(ne||(W.needDrain=!0),W.writing||W.corked){var Y=W.lastBufferedRequest;W.lastBufferedRequest={chunk:p,encoding:U,isBuf:O,callback:V,next:null},Y?Y.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else A(P,W,!1,ee,p,U,V);return ne}(this,z,N,y,C,_)),B},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var y=this._writableState;y.corked&&(y.corked--,y.writing||y.corked||y.finished||y.bufferProcessing||!y.bufferedRequest||I(this,y))},M.prototype.setDefaultEncoding=function(y){if(typeof y=="string"&&(y=y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((y+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+y);return this._writableState.defaultEncoding=y,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(y,C,_){_(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(y,C,_){var L=this._writableState;typeof y=="function"?(_=y,y=null,C=null):typeof C=="function"&&(_=C,C=null),y!=null&&this.write(y,C),L.corked&&(L.corked=1,this.uncork()),L.ending||L.finished||function(z,B,N){B.ending=!0,m(z,B),N&&(B.finished?l.nextTick(N):z.once("finish",N)),B.ended=!0,z.writable=!1}(this,L,_)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(y){this._writableState&&(this._writableState.destroyed=y)}}),M.prototype.destroy=R.destroy,M.prototype._undestroy=R.undestroy,M.prototype._destroy=function(y,C){this.end(),C(y)}}).call(this,n(2),n(15).setImmediate,n(6))},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){var r=n(16);function i(s,l){s.emit("error",l)}e.exports={destroy:function(s,l){var o=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(l?l(s):!s||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,s),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!l&&f?(r.nextTick(i,o,f),o._writableState&&(o._writableState.errorEmitted=!0)):l&&l(f)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t){},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(156)),i=l(n(25)),s=l(n(30));function l(o){return o&&o.__esModule?o:{default:o}}t.default=(0,s.default)(function(o,c,u,f){return(0,r.default)(c)(o,(0,i.default)(u),f)},4),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){function i(...s){if(r!==null){var l=r;r=null,l.apply(this,s)}}return Object.assign(i,r),i},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return function(...i){if(r===null)throw new Error("Callback was already called.");var s=r;r=null,s.apply(this,i)}},e.exports=t.default},function(e,t,n){(function(r,i){var s=n(16);e.exports=A;var l,o=n(42);A.ReadableState=M,n(21).EventEmitter;var c=function(O,p){return O.listeners(p).length},u=n(70),f=n(47).Buffer,E=r.Uint8Array||function(){},w=n(17);w.inherits=n(7);var h=n(162),g=void 0;g=h&&h.debuglog?h.debuglog("stream"):function(){};var b,R=n(163),x=n(71);w.inherits(A,u);var F=["error","close","destroy","pause","resume"];function M(O,p){O=O||{};var U=p instanceof(l=l||n(23));this.objectMode=!!O.objectMode,U&&(this.objectMode=this.objectMode||!!O.readableObjectMode);var V=O.highWaterMark,Q=O.readableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=V||V===0?V:U&&(Q||Q===0)?Q:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(b||(b=n(22).StringDecoder),this.decoder=new b(O.encoding),this.encoding=O.encoding)}function A(O){if(l=l||n(23),!(this instanceof A))return new A(O);this._readableState=new M(O,this),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),u.call(this)}function d(O,p,U,V,Q){var ee,ne=O._readableState;return p===null?(ne.reading=!1,function(Y,G){if(!G.ended){if(G.decoder){var S=G.decoder.end();S&&S.length&&(G.buffer.push(S),G.length+=G.objectMode?1:S.length)}G.ended=!0,q(Y)}}(O,ne)):(Q||(ee=function(Y,G){var S;T=G,f.isBuffer(T)||T instanceof E||typeof G=="string"||G===void 0||Y.objectMode||(S=new TypeError("Invalid non-string/buffer chunk"));var T;return S}(ne,p)),ee?O.emit("error",ee):ne.objectMode||p&&p.length>0?(typeof p=="string"||ne.objectMode||Object.getPrototypeOf(p)===f.prototype||(p=function(Y){return f.from(Y)}(p)),V?ne.endEmitted?O.emit("error",new Error("stream.unshift() after end event")):I(O,ne,p,!0):ne.ended?O.emit("error",new Error("stream.push() after EOF")):(ne.reading=!1,ne.decoder&&!U?(p=ne.decoder.write(p),ne.objectMode||p.length!==0?I(O,ne,p,!1):y(O,ne)):I(O,ne,p,!1))):V||(ne.reading=!1)),function(Y){return!Y.ended&&(Y.needReadable||Y.length<Y.highWaterMark||Y.length===0)}(ne)}function I(O,p,U,V){p.flowing&&p.length===0&&!p.sync?(O.emit("data",U),O.read(0)):(p.length+=p.objectMode?1:U.length,V?p.buffer.unshift(U):p.buffer.push(U),p.needReadable&&q(O)),y(O,p)}Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(O){this._readableState&&(this._readableState.destroyed=O)}}),A.prototype.destroy=x.destroy,A.prototype._undestroy=x.undestroy,A.prototype._destroy=function(O,p){this.push(null),p(O)},A.prototype.push=function(O,p){var U,V=this._readableState;return V.objectMode?U=!0:typeof O=="string"&&((p=p||V.defaultEncoding)!==V.encoding&&(O=f.from(O,p),p=""),U=!0),d(this,O,p,!1,U)},A.prototype.unshift=function(O){return d(this,O,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(O){return b||(b=n(22).StringDecoder),this._readableState.decoder=new b(O),this._readableState.encoding=O,this};function $(O,p){return O<=0||p.length===0&&p.ended?0:p.objectMode?1:O!=O?p.flowing&&p.length?p.buffer.head.data.length:p.length:(O>p.highWaterMark&&(p.highWaterMark=function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(O)),O<=p.length?O:p.ended?p.length:(p.needReadable=!0,0))}function q(O){var p=O._readableState;p.needReadable=!1,p.emittedReadable||(g("emitReadable",p.flowing),p.emittedReadable=!0,p.sync?s.nextTick(m,O):m(O))}function m(O){g("emit readable"),O.emit("readable"),z(O)}function y(O,p){p.readingMore||(p.readingMore=!0,s.nextTick(C,O,p))}function C(O,p){for(var U=p.length;!p.reading&&!p.flowing&&!p.ended&&p.length<p.highWaterMark&&(g("maybeReadMore read 0"),O.read(0),U!==p.length);)U=p.length;p.readingMore=!1}function _(O){g("readable nexttick read 0"),O.read(0)}function L(O,p){p.reading||(g("resume read 0"),O.read(0)),p.resumeScheduled=!1,p.awaitDrain=0,O.emit("resume"),z(O),p.flowing&&!p.reading&&O.read(0)}function z(O){var p=O._readableState;for(g("flow",p.flowing);p.flowing&&O.read()!==null;);}function B(O,p){return p.length===0?null:(p.objectMode?U=p.buffer.shift():!O||O>=p.length?(U=p.decoder?p.buffer.join(""):p.buffer.length===1?p.buffer.head.data:p.buffer.concat(p.length),p.buffer.clear()):U=function(V,Q,ee){var ne;return V<Q.head.data.length?(ne=Q.head.data.slice(0,V),Q.head.data=Q.head.data.slice(V)):ne=V===Q.head.data.length?Q.shift():ee?function(Y,G){var S=G.head,T=1,k=S.data;for(Y-=k.length;S=S.next;){var J=S.data,K=Y>J.length?J.length:Y;if(K===J.length?k+=J:k+=J.slice(0,Y),(Y-=K)===0){K===J.length?(++T,S.next?G.head=S.next:G.head=G.tail=null):(G.head=S,S.data=J.slice(K));break}++T}return G.length-=T,k}(V,Q):function(Y,G){var S=f.allocUnsafe(Y),T=G.head,k=1;for(T.data.copy(S),Y-=T.data.length;T=T.next;){var J=T.data,K=Y>J.length?J.length:Y;if(J.copy(S,S.length-Y,0,K),(Y-=K)===0){K===J.length?(++k,T.next?G.head=T.next:G.head=G.tail=null):(G.head=T,T.data=J.slice(K));break}++k}return G.length-=k,S}(V,Q),ne}(O,p.buffer,p.decoder),U);var U}function N(O){var p=O._readableState;if(p.length>0)throw new Error('"endReadable()" called on non-empty stream');p.endEmitted||(p.ended=!0,s.nextTick(P,p,O))}function P(O,p){O.endEmitted||O.length!==0||(O.endEmitted=!0,p.readable=!1,p.emit("end"))}function W(O,p){for(var U=0,V=O.length;U<V;U++)if(O[U]===p)return U;return-1}A.prototype.read=function(O){g("read",O),O=parseInt(O,10);var p=this._readableState,U=O;if(O!==0&&(p.emittedReadable=!1),O===0&&p.needReadable&&(p.length>=p.highWaterMark||p.ended))return g("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?N(this):q(this),null;if((O=$(O,p))===0&&p.ended)return p.length===0&&N(this),null;var V,Q=p.needReadable;return g("need readable",Q),(p.length===0||p.length-O<p.highWaterMark)&&g("length less than watermark",Q=!0),p.ended||p.reading?g("reading or ended",Q=!1):Q&&(g("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(O=$(U,p))),(V=O>0?B(O,p):null)===null?(p.needReadable=!0,O=0):p.length-=O,p.length===0&&(p.ended||(p.needReadable=!0),U!==O&&p.ended&&N(this)),V!==null&&this.emit("data",V),V},A.prototype._read=function(O){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(O,p){var U=this,V=this._readableState;switch(V.pipesCount){case 0:V.pipes=O;break;case 1:V.pipes=[V.pipes,O];break;default:V.pipes.push(O)}V.pipesCount+=1,g("pipe count=%d opts=%j",V.pipesCount,p);var Q=(!p||p.end!==!1)&&O!==i.stdout&&O!==i.stderr?ne:re;function ee(se,fe){g("onunpipe"),se===U&&fe&&fe.hasUnpiped===!1&&(fe.hasUnpiped=!0,g("cleanup"),O.removeListener("close",J),O.removeListener("finish",K),O.removeListener("drain",Y),O.removeListener("error",k),O.removeListener("unpipe",ee),U.removeListener("end",ne),U.removeListener("end",re),U.removeListener("data",T),G=!0,!V.awaitDrain||O._writableState&&!O._writableState.needDrain||Y())}function ne(){g("onend"),O.end()}V.endEmitted?s.nextTick(Q):U.once("end",Q),O.on("unpipe",ee);var Y=function(se){return function(){var fe=se._readableState;g("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&c(se,"data")&&(fe.flowing=!0,z(se))}}(U);O.on("drain",Y);var G=!1,S=!1;function T(se){g("ondata"),S=!1,O.write(se)!==!1||S||((V.pipesCount===1&&V.pipes===O||V.pipesCount>1&&W(V.pipes,O)!==-1)&&!G&&(g("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,S=!0),U.pause())}function k(se){g("onerror",se),re(),O.removeListener("error",k),c(O,"error")===0&&O.emit("error",se)}function J(){O.removeListener("finish",K),re()}function K(){g("onfinish"),O.removeListener("close",J),re()}function re(){g("unpipe"),U.unpipe(O)}return U.on("data",T),function(se,fe,ve){if(typeof se.prependListener=="function")return se.prependListener(fe,ve);se._events&&se._events[fe]?o(se._events[fe])?se._events[fe].unshift(ve):se._events[fe]=[ve,se._events[fe]]:se.on(fe,ve)}(O,"error",k),O.once("close",J),O.once("finish",K),O.emit("pipe",U),V.flowing||(g("pipe resume"),U.resume()),O},A.prototype.unpipe=function(O){var p=this._readableState,U={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return O&&O!==p.pipes||(O||(O=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,O&&O.emit("unpipe",this,U)),this;if(!O){var V=p.pipes,Q=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var ee=0;ee<Q;ee++)V[ee].emit("unpipe",this,U);return this}var ne=W(p.pipes,O);return ne===-1||(p.pipes.splice(ne,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),O.emit("unpipe",this,U)),this},A.prototype.on=function(O,p){var U=u.prototype.on.call(this,O,p);if(O==="data")this._readableState.flowing!==!1&&this.resume();else if(O==="readable"){var V=this._readableState;V.endEmitted||V.readableListening||(V.readableListening=V.needReadable=!0,V.emittedReadable=!1,V.reading?V.length&&q(this):s.nextTick(_,this))}return U},A.prototype.addListener=A.prototype.on,A.prototype.resume=function(){var O=this._readableState;return O.flowing||(g("resume"),O.flowing=!0,function(p,U){U.resumeScheduled||(U.resumeScheduled=!0,s.nextTick(L,p,U))}(this,O)),this},A.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(O){var p=this,U=this._readableState,V=!1;for(var Q in O.on("end",function(){if(g("wrapped end"),U.decoder&&!U.ended){var ne=U.decoder.end();ne&&ne.length&&p.push(ne)}p.push(null)}),O.on("data",function(ne){g("wrapped data"),U.decoder&&(ne=U.decoder.write(ne)),U.objectMode&&ne==null||(U.objectMode||ne&&ne.length)&&(p.push(ne)||(V=!0,O.pause()))}),O)this[Q]===void 0&&typeof O[Q]=="function"&&(this[Q]=function(ne){return function(){return O[ne].apply(O,arguments)}}(Q));for(var ee=0;ee<F.length;ee++)O.on(F[ee],this.emit.bind(this,F[ee]));return this._read=function(ne){g("wrapped _read",ne),V&&(V=!1,O.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=B}).call(this,n(6),n(2))},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){var r=n(16);function i(s,l){s.emit("error",l)}e.exports={destroy:function(s,l){var o=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(l?l(s):!s||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,s),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!l&&f?(r.nextTick(i,o,f),o._writableState&&(o._writableState.errorEmitted=!0)):l&&l(f)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){e.exports=l;var r=n(23),i=n(17);function s(u,f){var E=this._transformState;E.transforming=!1;var w=E.writecb;if(!w)return this.emit("error",new Error("write callback called multiple times"));E.writechunk=null,E.writecb=null,f!=null&&this.push(f),w(u);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function l(u){if(!(this instanceof l))return new l(u);r.call(this,u),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",o)}function o(){var u=this;typeof this._flush=="function"?this._flush(function(f,E){c(u,f,E)}):c(this,null,null)}function c(u,f,E){if(f)return u.emit("error",f);if(E!=null&&u.push(E),u._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(u._transformState.transforming)throw new Error("Calling transform done when still transforming");return u.push(null)}i.inherits=n(7),i.inherits(l,r),l.prototype.push=function(u,f){return this._transformState.needTransform=!1,r.prototype.push.call(this,u,f)},l.prototype._transform=function(u,f,E){throw new Error("_transform() is not implemented")},l.prototype._write=function(u,f,E){var w=this._transformState;if(w.writecb=E,w.writechunk=u,w.writeencoding=f,!w.transforming){var h=this._readableState;(w.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},l.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&f.writecb&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},l.prototype._destroy=function(u,f){var E=this;r.prototype._destroy.call(this,u,function(w){f(w),E.emit("close")})}},function(e,t,n){e.exports=n(48)},function(e,t,n){(function(r){var i=n(170);function s(m,y){if(m===y)return 0;for(var C=m.length,_=y.length,L=0,z=Math.min(C,_);L<z;++L)if(m[L]!==y[L]){C=m[L],_=y[L];break}return C<_?-1:_<C?1:0}function l(m){return r.Buffer&&typeof r.Buffer.isBuffer=="function"?r.Buffer.isBuffer(m):!(m==null||!m._isBuffer)}var o=n(13),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,f=function(){}.name==="foo";function E(m){return Object.prototype.toString.call(m)}function w(m){return!l(m)&&typeof r.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(m):!!m&&(m instanceof DataView||!!(m.buffer&&m.buffer instanceof ArrayBuffer)))}var h=e.exports=M,g=/\s*function\s+([^\(\s]*)\s*/;function b(m){if(o.isFunction(m)){if(f)return m.name;var y=m.toString().match(g);return y&&y[1]}}function R(m,y){return typeof m=="string"?m.length<y?m:m.slice(0,y):m}function x(m){if(f||!o.isFunction(m))return o.inspect(m);var y=b(m);return"[Function"+(y?": "+y:"")+"]"}function F(m,y,C,_,L){throw new h.AssertionError({message:C,actual:m,expected:y,operator:_,stackStartFunction:L})}function M(m,y){m||F(m,!0,y,"==",h.ok)}function A(m,y,C,_){if(m===y)return!0;if(l(m)&&l(y))return s(m,y)===0;if(o.isDate(m)&&o.isDate(y))return m.getTime()===y.getTime();if(o.isRegExp(m)&&o.isRegExp(y))return m.source===y.source&&m.global===y.global&&m.multiline===y.multiline&&m.lastIndex===y.lastIndex&&m.ignoreCase===y.ignoreCase;if(m!==null&&typeof m=="object"||y!==null&&typeof y=="object"){if(w(m)&&w(y)&&E(m)===E(y)&&!(m instanceof Float32Array||m instanceof Float64Array))return s(new Uint8Array(m.buffer),new Uint8Array(y.buffer))===0;if(l(m)!==l(y))return!1;var L=(_=_||{actual:[],expected:[]}).actual.indexOf(m);return L!==-1&&L===_.expected.indexOf(y)||(_.actual.push(m),_.expected.push(y),function(z,B,N,P){if(z==null||B==null)return!1;if(o.isPrimitive(z)||o.isPrimitive(B))return z===B;if(N&&Object.getPrototypeOf(z)!==Object.getPrototypeOf(B))return!1;var W=d(z),O=d(B);if(W&&!O||!W&&O)return!1;if(W)return z=u.call(z),B=u.call(B),A(z,B,N);var p,U,V=q(z),Q=q(B);if(V.length!==Q.length)return!1;for(V.sort(),Q.sort(),U=V.length-1;U>=0;U--)if(V[U]!==Q[U])return!1;for(U=V.length-1;U>=0;U--)if(p=V[U],!A(z[p],B[p],N,P))return!1;return!0}(m,y,C,_))}return C?m===y:m==y}function d(m){return Object.prototype.toString.call(m)=="[object Arguments]"}function I(m,y){if(!m||!y)return!1;if(Object.prototype.toString.call(y)=="[object RegExp]")return y.test(m);try{if(m instanceof y)return!0}catch{}return!Error.isPrototypeOf(y)&&y.call({},m)===!0}function $(m,y,C,_){var L;if(typeof y!="function")throw new TypeError('"block" argument must be a function');typeof C=="string"&&(_=C,C=null),L=function(N){var P;try{N()}catch(W){P=W}return P}(y),_=(C&&C.name?" ("+C.name+").":".")+(_?" "+_:"."),m&&!L&&F(L,C,"Missing expected exception"+_);var z=typeof _=="string",B=!m&&L&&!C;if((!m&&o.isError(L)&&z&&I(L,C)||B)&&F(L,C,"Got unwanted exception"+_),m&&L&&C&&!I(L,C)||!m&&L)throw L}h.AssertionError=function(m){this.name="AssertionError",this.actual=m.actual,this.expected=m.expected,this.operator=m.operator,m.message?(this.message=m.message,this.generatedMessage=!1):(this.message=function(N){return R(x(N.actual),128)+" "+N.operator+" "+R(x(N.expected),128)}(this),this.generatedMessage=!0);var y=m.stackStartFunction||F;if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var C=new Error;if(C.stack){var _=C.stack,L=b(y),z=_.indexOf(`
28
+ `+L);if(z>=0){var B=_.indexOf(`
29
+ `,z+1);_=_.substring(B+1)}this.stack=_}}},o.inherits(h.AssertionError,Error),h.fail=F,h.ok=M,h.equal=function(m,y,C){m!=y&&F(m,y,C,"==",h.equal)},h.notEqual=function(m,y,C){m==y&&F(m,y,C,"!=",h.notEqual)},h.deepEqual=function(m,y,C){A(m,y,!1)||F(m,y,C,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(m,y,C){A(m,y,!0)||F(m,y,C,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(m,y,C){A(m,y,!1)&&F(m,y,C,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function m(y,C,_){A(y,C,!0)&&F(y,C,_,"notDeepStrictEqual",m)},h.strictEqual=function(m,y,C){m!==y&&F(m,y,C,"===",h.strictEqual)},h.notStrictEqual=function(m,y,C){m===y&&F(m,y,C,"!==",h.notStrictEqual)},h.throws=function(m,y,C){$(!0,m,y,C)},h.doesNotThrow=function(m,y,C){$(!1,m,y,C)},h.ifError=function(m){if(m)throw m},h.strict=i(function m(y,C){y||F(y,!0,C,"==",m)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var q=Object.keys||function(m){var y=[];for(var C in m)c.call(m,C)&&y.push(C);return y}}).call(this,n(6))},function(e,t,n){e.exports=function(r,i,s,l){for(var o=65535&r|0,c=r>>>16&65535|0,u=0;s!==0;){s-=u=s>2e3?2e3:s;do c=c+(o=o+i[l++]|0)|0;while(--u);o%=65521,c%=65521}return o|c<<16|0}},function(e,t,n){var r=function(){for(var i,s=[],l=0;l<256;l++){i=l;for(var o=0;o<8;o++)i=1&i?3988292384^i>>>1:i>>>1;s[l]=i}return s}();e.exports=function(i,s,l,o){var c=r,u=o+l;i^=-1;for(var f=o;f<u;f++)i=i>>>8^c[255&(i^s[f])];return-1^i}},function(e,t,n){(function(r,i){var s;e.exports=y,y.ReadableState=m,n(21).EventEmitter;var l=function(Y,G){return Y.listeners(G).length},o=n(78),c=n(5).Buffer,u=r.Uint8Array||function(){},f,E=n(179);f=E&&E.debuglog?E.debuglog("stream"):function(){};var w,h,g,b=n(180),R=n(79),x=n(80).getHighWaterMark,F=n(26).codes,M=F.ERR_INVALID_ARG_TYPE,A=F.ERR_STREAM_PUSH_AFTER_EOF,d=F.ERR_METHOD_NOT_IMPLEMENTED,I=F.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(7)(y,o);var $=R.errorOrDestroy,q=["error","close","destroy","pause","resume"];function m(Y,G,S){s=s||n(27),Y=Y||{},typeof S!="boolean"&&(S=G instanceof s),this.objectMode=!!Y.objectMode,S&&(this.objectMode=this.objectMode||!!Y.readableObjectMode),this.highWaterMark=x(this,Y,"readableHighWaterMark",S),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.destroyed=!1,this.defaultEncoding=Y.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Y.encoding&&(w||(w=n(22).StringDecoder),this.decoder=new w(Y.encoding),this.encoding=Y.encoding)}function y(Y){if(s=s||n(27),!(this instanceof y))return new y(Y);var G=this instanceof s;this._readableState=new m(Y,this,G),this.readable=!0,Y&&(typeof Y.read=="function"&&(this._read=Y.read),typeof Y.destroy=="function"&&(this._destroy=Y.destroy)),o.call(this)}function C(Y,G,S,T,k){f("readableAddChunk",G);var J,K=Y._readableState;if(G===null)K.reading=!1,function(re,se){if(f("onEofChunk"),!se.ended){if(se.decoder){var fe=se.decoder.end();fe&&fe.length&&(se.buffer.push(fe),se.length+=se.objectMode?1:fe.length)}se.ended=!0,se.sync?z(re):(se.needReadable=!1,se.emittedReadable||(se.emittedReadable=!0,B(re)))}}(Y,K);else if(k||(J=function(re,se){var fe;ve=se,c.isBuffer(ve)||ve instanceof u||typeof se=="string"||se===void 0||re.objectMode||(fe=new M("chunk",["string","Buffer","Uint8Array"],se));var ve;return fe}(K,G)),J)$(Y,J);else if(K.objectMode||G&&G.length>0)if(typeof G=="string"||K.objectMode||Object.getPrototypeOf(G)===c.prototype||(G=function(re){return c.from(re)}(G)),T)K.endEmitted?$(Y,new I):_(Y,K,G,!0);else if(K.ended)$(Y,new A);else{if(K.destroyed)return!1;K.reading=!1,K.decoder&&!S?(G=K.decoder.write(G),K.objectMode||G.length!==0?_(Y,K,G,!1):N(Y,K)):_(Y,K,G,!1)}else T||(K.reading=!1,N(Y,K));return!K.ended&&(K.length<K.highWaterMark||K.length===0)}function _(Y,G,S,T){G.flowing&&G.length===0&&!G.sync?(G.awaitDrain=0,Y.emit("data",S)):(G.length+=G.objectMode?1:S.length,T?G.buffer.unshift(S):G.buffer.push(S),G.needReadable&&z(Y)),N(Y,G)}Object.defineProperty(y.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),y.prototype.destroy=R.destroy,y.prototype._undestroy=R.undestroy,y.prototype._destroy=function(Y,G){G(Y)},y.prototype.push=function(Y,G){var S,T=this._readableState;return T.objectMode?S=!0:typeof Y=="string"&&((G=G||T.defaultEncoding)!==T.encoding&&(Y=c.from(Y,G),G=""),S=!0),C(this,Y,G,!1,S)},y.prototype.unshift=function(Y){return C(this,Y,null,!0,!1)},y.prototype.isPaused=function(){return this._readableState.flowing===!1},y.prototype.setEncoding=function(Y){w||(w=n(22).StringDecoder);var G=new w(Y);this._readableState.decoder=G,this._readableState.encoding=this._readableState.decoder.encoding;for(var S=this._readableState.buffer.head,T="";S!==null;)T+=G.write(S.data),S=S.next;return this._readableState.buffer.clear(),T!==""&&this._readableState.buffer.push(T),this._readableState.length=T.length,this};function L(Y,G){return Y<=0||G.length===0&&G.ended?0:G.objectMode?1:Y!=Y?G.flowing&&G.length?G.buffer.head.data.length:G.length:(Y>G.highWaterMark&&(G.highWaterMark=function(S){return S>=1073741824?S=1073741824:(S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++),S}(Y)),Y<=G.length?Y:G.ended?G.length:(G.needReadable=!0,0))}function z(Y){var G=Y._readableState;f("emitReadable",G.needReadable,G.emittedReadable),G.needReadable=!1,G.emittedReadable||(f("emitReadable",G.flowing),G.emittedReadable=!0,i.nextTick(B,Y))}function B(Y){var G=Y._readableState;f("emitReadable_",G.destroyed,G.length,G.ended),G.destroyed||!G.length&&!G.ended||(Y.emit("readable"),G.emittedReadable=!1),G.needReadable=!G.flowing&&!G.ended&&G.length<=G.highWaterMark,U(Y)}function N(Y,G){G.readingMore||(G.readingMore=!0,i.nextTick(P,Y,G))}function P(Y,G){for(;!G.reading&&!G.ended&&(G.length<G.highWaterMark||G.flowing&&G.length===0);){var S=G.length;if(f("maybeReadMore read 0"),Y.read(0),S===G.length)break}G.readingMore=!1}function W(Y){var G=Y._readableState;G.readableListening=Y.listenerCount("readable")>0,G.resumeScheduled&&!G.paused?G.flowing=!0:Y.listenerCount("data")>0&&Y.resume()}function O(Y){f("readable nexttick read 0"),Y.read(0)}function p(Y,G){f("resume",G.reading),G.reading||Y.read(0),G.resumeScheduled=!1,Y.emit("resume"),U(Y),G.flowing&&!G.reading&&Y.read(0)}function U(Y){var G=Y._readableState;for(f("flow",G.flowing);G.flowing&&Y.read()!==null;);}function V(Y,G){return G.length===0?null:(G.objectMode?S=G.buffer.shift():!Y||Y>=G.length?(S=G.decoder?G.buffer.join(""):G.buffer.length===1?G.buffer.first():G.buffer.concat(G.length),G.buffer.clear()):S=G.buffer.consume(Y,G.decoder),S);var S}function Q(Y){var G=Y._readableState;f("endReadable",G.endEmitted),G.endEmitted||(G.ended=!0,i.nextTick(ee,G,Y))}function ee(Y,G){if(f("endReadableNT",Y.endEmitted,Y.length),!Y.endEmitted&&Y.length===0&&(Y.endEmitted=!0,G.readable=!1,G.emit("end"),Y.autoDestroy)){var S=G._writableState;(!S||S.autoDestroy&&S.finished)&&G.destroy()}}function ne(Y,G){for(var S=0,T=Y.length;S<T;S++)if(Y[S]===G)return S;return-1}y.prototype.read=function(Y){f("read",Y),Y=parseInt(Y,10);var G=this._readableState,S=Y;if(Y!==0&&(G.emittedReadable=!1),Y===0&&G.needReadable&&((G.highWaterMark!==0?G.length>=G.highWaterMark:G.length>0)||G.ended))return f("read: emitReadable",G.length,G.ended),G.length===0&&G.ended?Q(this):z(this),null;if((Y=L(Y,G))===0&&G.ended)return G.length===0&&Q(this),null;var T,k=G.needReadable;return f("need readable",k),(G.length===0||G.length-Y<G.highWaterMark)&&f("length less than watermark",k=!0),G.ended||G.reading?f("reading or ended",k=!1):k&&(f("do read"),G.reading=!0,G.sync=!0,G.length===0&&(G.needReadable=!0),this._read(G.highWaterMark),G.sync=!1,G.reading||(Y=L(S,G))),(T=Y>0?V(Y,G):null)===null?(G.needReadable=G.length<=G.highWaterMark,Y=0):(G.length-=Y,G.awaitDrain=0),G.length===0&&(G.ended||(G.needReadable=!0),S!==Y&&G.ended&&Q(this)),T!==null&&this.emit("data",T),T},y.prototype._read=function(Y){$(this,new d("_read()"))},y.prototype.pipe=function(Y,G){var S=this,T=this._readableState;switch(T.pipesCount){case 0:T.pipes=Y;break;case 1:T.pipes=[T.pipes,Y];break;default:T.pipes.push(Y)}T.pipesCount+=1,f("pipe count=%d opts=%j",T.pipesCount,G);var k=(!G||G.end!==!1)&&Y!==i.stdout&&Y!==i.stderr?K:Ce;function J(Te,Re){f("onunpipe"),Te===S&&Re&&Re.hasUnpiped===!1&&(Re.hasUnpiped=!0,f("cleanup"),Y.removeListener("close",Ie),Y.removeListener("finish",Se),Y.removeListener("drain",re),Y.removeListener("error",ve),Y.removeListener("unpipe",J),S.removeListener("end",K),S.removeListener("end",Ce),S.removeListener("data",fe),se=!0,!T.awaitDrain||Y._writableState&&!Y._writableState.needDrain||re())}function K(){f("onend"),Y.end()}T.endEmitted?i.nextTick(k):S.once("end",k),Y.on("unpipe",J);var re=function(Te){return function(){var Re=Te._readableState;f("pipeOnDrain",Re.awaitDrain),Re.awaitDrain&&Re.awaitDrain--,Re.awaitDrain===0&&l(Te,"data")&&(Re.flowing=!0,U(Te))}}(S);Y.on("drain",re);var se=!1;function fe(Te){f("ondata");var Re=Y.write(Te);f("dest.write",Re),Re===!1&&((T.pipesCount===1&&T.pipes===Y||T.pipesCount>1&&ne(T.pipes,Y)!==-1)&&!se&&(f("false write response, pause",T.awaitDrain),T.awaitDrain++),S.pause())}function ve(Te){f("onerror",Te),Ce(),Y.removeListener("error",ve),l(Y,"error")===0&&$(Y,Te)}function Ie(){Y.removeListener("finish",Se),Ce()}function Se(){f("onfinish"),Y.removeListener("close",Ie),Ce()}function Ce(){f("unpipe"),S.unpipe(Y)}return S.on("data",fe),function(Te,Re,Be){if(typeof Te.prependListener=="function")return Te.prependListener(Re,Be);Te._events&&Te._events[Re]?Array.isArray(Te._events[Re])?Te._events[Re].unshift(Be):Te._events[Re]=[Be,Te._events[Re]]:Te.on(Re,Be)}(Y,"error",ve),Y.once("close",Ie),Y.once("finish",Se),Y.emit("pipe",S),T.flowing||(f("pipe resume"),S.resume()),Y},y.prototype.unpipe=function(Y){var G=this._readableState,S={hasUnpiped:!1};if(G.pipesCount===0)return this;if(G.pipesCount===1)return Y&&Y!==G.pipes||(Y||(Y=G.pipes),G.pipes=null,G.pipesCount=0,G.flowing=!1,Y&&Y.emit("unpipe",this,S)),this;if(!Y){var T=G.pipes,k=G.pipesCount;G.pipes=null,G.pipesCount=0,G.flowing=!1;for(var J=0;J<k;J++)T[J].emit("unpipe",this,{hasUnpiped:!1});return this}var K=ne(G.pipes,Y);return K===-1||(G.pipes.splice(K,1),G.pipesCount-=1,G.pipesCount===1&&(G.pipes=G.pipes[0]),Y.emit("unpipe",this,S)),this},y.prototype.on=function(Y,G){var S=o.prototype.on.call(this,Y,G),T=this._readableState;return Y==="data"?(T.readableListening=this.listenerCount("readable")>0,T.flowing!==!1&&this.resume()):Y==="readable"&&(T.endEmitted||T.readableListening||(T.readableListening=T.needReadable=!0,T.flowing=!1,T.emittedReadable=!1,f("on readable",T.length,T.reading),T.length?z(this):T.reading||i.nextTick(O,this))),S},y.prototype.addListener=y.prototype.on,y.prototype.removeListener=function(Y,G){var S=o.prototype.removeListener.call(this,Y,G);return Y==="readable"&&i.nextTick(W,this),S},y.prototype.removeAllListeners=function(Y){var G=o.prototype.removeAllListeners.apply(this,arguments);return Y!=="readable"&&Y!==void 0||i.nextTick(W,this),G},y.prototype.resume=function(){var Y=this._readableState;return Y.flowing||(f("resume"),Y.flowing=!Y.readableListening,function(G,S){S.resumeScheduled||(S.resumeScheduled=!0,i.nextTick(p,G,S))}(this,Y)),Y.paused=!1,this},y.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},y.prototype.wrap=function(Y){var G=this,S=this._readableState,T=!1;for(var k in Y.on("end",function(){if(f("wrapped end"),S.decoder&&!S.ended){var K=S.decoder.end();K&&K.length&&G.push(K)}G.push(null)}),Y.on("data",function(K){f("wrapped data"),S.decoder&&(K=S.decoder.write(K)),S.objectMode&&K==null||(S.objectMode||K&&K.length)&&(G.push(K)||(T=!0,Y.pause()))}),Y)this[k]===void 0&&typeof Y[k]=="function"&&(this[k]=function(K){return function(){return Y[K].apply(Y,arguments)}}(k));for(var J=0;J<q.length;J++)Y.on(q[J],this.emit.bind(this,q[J]));return this._read=function(K){f("wrapped _read",K),T&&(T=!1,Y.resume())},this},typeof Symbol=="function"&&(y.prototype[Symbol.asyncIterator]=function(){return h===void 0&&(h=n(182)),h(this)}),Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){this._readableState&&(this._readableState.flowing=Y)}}),y._fromList=V,Object.defineProperty(y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(y.from=function(Y,G){return g===void 0&&(g=n(183)),g(y,Y,G)})}).call(this,n(6),n(2))},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){(function(r){function i(o,c){l(o,c),s(o)}function s(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function l(o,c){o.emit("error",c)}e.exports={destroy:function(o,c){var u=this,f=this._readableState&&this._readableState.destroyed,E=this._writableState&&this._writableState.destroyed;return f||E?(c?c(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(l,this,o)):r.nextTick(l,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(w){!c&&w?u._writableState?u._writableState.errorEmitted?r.nextTick(s,u):(u._writableState.errorEmitted=!0,r.nextTick(i,u,w)):r.nextTick(i,u,w):c?(r.nextTick(s,u),c(w)):r.nextTick(s,u)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(o,c){var u=o._readableState,f=o._writableState;u&&u.autoDestroy||f&&f.autoDestroy?o.destroy(c):o.emit("error",c)}}}).call(this,n(2))},function(e,t,n){var r=n(26).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(i,s,l,o){var c=function(u,f,E){return u.highWaterMark!=null?u.highWaterMark:f?u[E]:null}(s,o,l);if(c!=null){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new r(o?l:"highWaterMark",c);return Math.floor(c)}return i.objectMode?16:16384}}},function(e,t,n){(function(r,i){function s(P){var W=this;this.next=null,this.entry=null,this.finish=function(){(function(O,p,U){var V=O.entry;for(O.entry=null;V;){var Q=V.callback;p.pendingcb--,Q(U),V=V.next}p.corkedRequestsFree.next=O})(W,P)}}var l;e.exports=y,y.WritableState=m;var o={deprecate:n(43)},c=n(78),u=n(5).Buffer,f=r.Uint8Array||function(){},E,w=n(79),h=n(80).getHighWaterMark,g=n(26).codes,b=g.ERR_INVALID_ARG_TYPE,R=g.ERR_METHOD_NOT_IMPLEMENTED,x=g.ERR_MULTIPLE_CALLBACK,F=g.ERR_STREAM_CANNOT_PIPE,M=g.ERR_STREAM_DESTROYED,A=g.ERR_STREAM_NULL_VALUES,d=g.ERR_STREAM_WRITE_AFTER_END,I=g.ERR_UNKNOWN_ENCODING,$=w.errorOrDestroy;function q(){}function m(P,W,O){l=l||n(27),P=P||{},typeof O!="boolean"&&(O=W instanceof l),this.objectMode=!!P.objectMode,O&&(this.objectMode=this.objectMode||!!P.writableObjectMode),this.highWaterMark=h(this,P,"writableHighWaterMark",O),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var p=P.decodeStrings===!1;this.decodeStrings=!p,this.defaultEncoding=P.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){(function(V,Q){var ee=V._writableState,ne=ee.sync,Y=ee.writecb;if(typeof Y!="function")throw new x;if(function(S){S.writing=!1,S.writecb=null,S.length-=S.writelen,S.writelen=0}(ee),Q)(function(S,T,k,J,K){--T.pendingcb,k?(i.nextTick(K,J),i.nextTick(N,S,T),S._writableState.errorEmitted=!0,$(S,J)):(K(J),S._writableState.errorEmitted=!0,$(S,J),N(S,T))})(V,ee,ne,Q,Y);else{var G=z(ee)||V.destroyed;G||ee.corked||ee.bufferProcessing||!ee.bufferedRequest||L(V,ee),ne?i.nextTick(_,V,ee,G,Y):_(V,ee,G,Y)}})(W,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=P.emitClose!==!1,this.autoDestroy=!!P.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(P){var W=this instanceof(l=l||n(27));if(!W&&!E.call(y,this))return new y(P);this._writableState=new m(P,this,W),this.writable=!0,P&&(typeof P.write=="function"&&(this._write=P.write),typeof P.writev=="function"&&(this._writev=P.writev),typeof P.destroy=="function"&&(this._destroy=P.destroy),typeof P.final=="function"&&(this._final=P.final)),c.call(this)}function C(P,W,O,p,U,V,Q){W.writelen=p,W.writecb=Q,W.writing=!0,W.sync=!0,W.destroyed?W.onwrite(new M("write")):O?P._writev(U,W.onwrite):P._write(U,V,W.onwrite),W.sync=!1}function _(P,W,O,p){O||function(U,V){V.length===0&&V.needDrain&&(V.needDrain=!1,U.emit("drain"))}(P,W),W.pendingcb--,p(),N(P,W)}function L(P,W){W.bufferProcessing=!0;var O=W.bufferedRequest;if(P._writev&&O&&O.next){var p=W.bufferedRequestCount,U=new Array(p),V=W.corkedRequestsFree;V.entry=O;for(var Q=0,ee=!0;O;)U[Q]=O,O.isBuf||(ee=!1),O=O.next,Q+=1;U.allBuffers=ee,C(P,W,!0,W.length,U,"",V.finish),W.pendingcb++,W.lastBufferedRequest=null,V.next?(W.corkedRequestsFree=V.next,V.next=null):W.corkedRequestsFree=new s(W),W.bufferedRequestCount=0}else{for(;O;){var ne=O.chunk,Y=O.encoding,G=O.callback;if(C(P,W,!1,W.objectMode?1:ne.length,ne,Y,G),O=O.next,W.bufferedRequestCount--,W.writing)break}O===null&&(W.lastBufferedRequest=null)}W.bufferedRequest=O,W.bufferProcessing=!1}function z(P){return P.ending&&P.length===0&&P.bufferedRequest===null&&!P.finished&&!P.writing}function B(P,W){P._final(function(O){W.pendingcb--,O&&$(P,O),W.prefinished=!0,P.emit("prefinish"),N(P,W)})}function N(P,W){var O=z(W);if(O&&(function(U,V){V.prefinished||V.finalCalled||(typeof U._final!="function"||V.destroyed?(V.prefinished=!0,U.emit("prefinish")):(V.pendingcb++,V.finalCalled=!0,i.nextTick(B,U,V)))}(P,W),W.pendingcb===0&&(W.finished=!0,P.emit("finish"),W.autoDestroy))){var p=P._readableState;(!p||p.autoDestroy&&p.endEmitted)&&P.destroy()}return O}n(7)(y,c),m.prototype.getBuffer=function(){for(var P=this.bufferedRequest,W=[];P;)W.push(P),P=P.next;return W},function(){try{Object.defineProperty(m.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(E=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(P){return!!E.call(this,P)||this===y&&P&&P._writableState instanceof m}})):E=function(P){return P instanceof this},y.prototype.pipe=function(){$(this,new F)},y.prototype.write=function(P,W,O){var p,U=this._writableState,V=!1,Q=!U.objectMode&&(p=P,u.isBuffer(p)||p instanceof f);return Q&&!u.isBuffer(P)&&(P=function(ee){return u.from(ee)}(P)),typeof W=="function"&&(O=W,W=null),Q?W="buffer":W||(W=U.defaultEncoding),typeof O!="function"&&(O=q),U.ending?function(ee,ne){var Y=new d;$(ee,Y),i.nextTick(ne,Y)}(this,O):(Q||function(ee,ne,Y,G){var S;return Y===null?S=new A:typeof Y=="string"||ne.objectMode||(S=new b("chunk",["string","Buffer"],Y)),!S||($(ee,S),i.nextTick(G,S),!1)}(this,U,P,O))&&(U.pendingcb++,V=function(ee,ne,Y,G,S,T){if(!Y){var k=function(se,fe,ve){return se.objectMode||se.decodeStrings===!1||typeof fe!="string"||(fe=u.from(fe,ve)),fe}(ne,G,S);G!==k&&(Y=!0,S="buffer",G=k)}var J=ne.objectMode?1:G.length;ne.length+=J;var K=ne.length<ne.highWaterMark;if(K||(ne.needDrain=!0),ne.writing||ne.corked){var re=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:G,encoding:S,isBuf:Y,callback:T,next:null},re?re.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else C(ee,ne,!1,J,G,S,T);return K}(this,U,Q,P,W,O)),V},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var P=this._writableState;P.corked&&(P.corked--,P.writing||P.corked||P.bufferProcessing||!P.bufferedRequest||L(this,P))},y.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new I(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(P,W,O){O(new R("_write()"))},y.prototype._writev=null,y.prototype.end=function(P,W,O){var p=this._writableState;return typeof P=="function"?(O=P,P=null,W=null):typeof W=="function"&&(O=W,W=null),P!=null&&this.write(P,W),p.corked&&(p.corked=1,this.uncork()),p.ending||function(U,V,Q){V.ending=!0,N(U,V),Q&&(V.finished?i.nextTick(Q):U.once("finish",Q)),V.ended=!0,U.writable=!1}(this,p,O),this},Object.defineProperty(y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),y.prototype.destroy=w.destroy,y.prototype._undestroy=w.undestroy,y.prototype._destroy=function(P,W){W(P)}}).call(this,n(6),n(2))},function(e,t,n){e.exports=f;var r=n(26).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,s=r.ERR_MULTIPLE_CALLBACK,l=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(27);function u(h,g){var b=this._transformState;b.transforming=!1;var R=b.writecb;if(R===null)return this.emit("error",new s);b.writechunk=null,b.writecb=null,g!=null&&this.push(g),R(h);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function f(h){if(!(this instanceof f))return new f(h);c.call(this,h),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",E)}function E(){var h=this;typeof this._flush!="function"||this._readableState.destroyed?w(this,null,null):this._flush(function(g,b){w(h,g,b)})}function w(h,g,b){if(g)return h.emit("error",g);if(b!=null&&h.push(b),h._writableState.length)throw new o;if(h._transformState.transforming)throw new l;return h.push(null)}n(7)(f,c),f.prototype.push=function(h,g){return this._transformState.needTransform=!1,c.prototype.push.call(this,h,g)},f.prototype._transform=function(h,g,b){b(new i("_transform()"))},f.prototype._write=function(h,g,b){var R=this._transformState;if(R.writecb=b,R.writechunk=h,R.writeencoding=g,!R.transforming){var x=this._readableState;(R.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},f.prototype._read=function(h){var g=this._transformState;g.writechunk===null||g.transforming?g.needTransform=!0:(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform))},f.prototype._destroy=function(h,g){c.prototype._destroy.call(this,h,function(b){g(b)})}},function(e,t,n){(function(r){var i=n(190),s=n(85),l=n(192),o=n(193),c=n(86),u=t;u.request=function(f,E){f=typeof f=="string"?c.parse(f):l(f);var w=r.location.protocol.search(/^https?:$/)===-1?"http:":"",h=f.protocol||w,g=f.hostname||f.host,b=f.port,R=f.path||"/";g&&g.indexOf(":")!==-1&&(g="["+g+"]"),f.url=(g?h+"//"+g:"")+(b?":"+b:"")+R,f.method=(f.method||"GET").toUpperCase(),f.headers=f.headers||{};var x=new i(f);return E&&x.on("response",E),x},u.get=function(f,E){var w=u.request(f,E);return w.end(),w},u.ClientRequest=i,u.IncomingMessage=s.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=o,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(6))},function(e,t,n){(function(r){t.fetch=u(r.fetch)&&u(r.ReadableStream),t.writableStream=u(r.WritableStream),t.abortController=u(r.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch{}var i;function s(){if(i!==void 0)return i;if(r.XMLHttpRequest){i=new r.XMLHttpRequest;try{i.open("GET",r.XDomainRequest?"/":"https://example.com")}catch{i=null}}else i=null;return i}function l(f){var E=s();if(!E)return!1;try{return E.responseType=f,E.responseType===f}catch{}return!1}var o=r.ArrayBuffer!==void 0,c=o&&u(r.ArrayBuffer.prototype.slice);function u(f){return typeof f=="function"}t.arraybuffer=t.fetch||o&&l("arraybuffer"),t.msstream=!t.fetch&&c&&l("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o&&l("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!s()&&u(s().overrideMimeType),t.vbArray=u(r.VBArray),i=null}).call(this,n(6))},function(e,t,n){(function(r,i,s){var l=n(84),o=n(7),c=n(31),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=t.IncomingMessage=function(E,w,h,g){var b=this;if(c.Readable.call(b),b._mode=h,b.headers={},b.rawHeaders=[],b.trailers={},b.rawTrailers=[],b.on("end",function(){r.nextTick(function(){b.emit("close")})}),h==="fetch"){if(b._fetchResponse=w,b.url=w.url,b.statusCode=w.status,b.statusMessage=w.statusText,w.headers.forEach(function(A,d){b.headers[d.toLowerCase()]=A,b.rawHeaders.push(d,A)}),l.writableStream){var R=new WritableStream({write:function(A){return new Promise(function(d,I){b._destroyed?I():b.push(new i(A))?d():b._resumeFetch=d})},close:function(){s.clearTimeout(g),b._destroyed||b.push(null)},abort:function(A){b._destroyed||b.emit("error",A)}});try{return void w.body.pipeTo(R).catch(function(A){s.clearTimeout(g),b._destroyed||b.emit("error",A)})}catch{}}var x=w.body.getReader();(function A(){x.read().then(function(d){if(!b._destroyed){if(d.done)return s.clearTimeout(g),void b.push(null);b.push(new i(d.value)),A()}}).catch(function(d){s.clearTimeout(g),b._destroyed||b.emit("error",d)})})()}else if(b._xhr=E,b._pos=0,b.url=E.responseURL,b.statusCode=E.status,b.statusMessage=E.statusText,E.getAllResponseHeaders().split(/\r?\n/).forEach(function(A){var d=A.match(/^([^:]+):\s*(.*)/);if(d){var I=d[1].toLowerCase();I==="set-cookie"?(b.headers[I]===void 0&&(b.headers[I]=[]),b.headers[I].push(d[2])):b.headers[I]!==void 0?b.headers[I]+=", "+d[2]:b.headers[I]=d[2],b.rawHeaders.push(d[1],d[2])}}),b._charset="x-user-defined",!l.overrideMimeType){var F=b.rawHeaders["mime-type"];if(F){var M=F.match(/;\s*charset=([^;])(;|$)/);M&&(b._charset=M[1].toLowerCase())}b._charset||(b._charset="utf-8")}};o(f,c.Readable),f.prototype._read=function(){var E=this._resumeFetch;E&&(this._resumeFetch=null,E())},f.prototype._onXHRProgress=function(){var E=this,w=E._xhr,h=null;switch(E._mode){case"text:vbarray":if(w.readyState!==u.DONE)break;try{h=new s.VBArray(w.responseBody).toArray()}catch{}if(h!==null){E.push(new i(h));break}case"text":try{h=w.responseText}catch{E._mode="text:vbarray";break}if(h.length>E._pos){var g=h.substr(E._pos);if(E._charset==="x-user-defined"){for(var b=new i(g.length),R=0;R<g.length;R++)b[R]=255&g.charCodeAt(R);E.push(b)}else E.push(g,E._charset);E._pos=h.length}break;case"arraybuffer":if(w.readyState!==u.DONE||!w.response)break;h=w.response,E.push(new i(new Uint8Array(h)));break;case"moz-chunked-arraybuffer":if(h=w.response,w.readyState!==u.LOADING||!h)break;E.push(new i(new Uint8Array(h)));break;case"ms-stream":if(h=w.response,w.readyState!==u.LOADING)break;var x=new s.MSStreamReader;x.onprogress=function(){x.result.byteLength>E._pos&&(E.push(new i(new Uint8Array(x.result.slice(E._pos)))),E._pos=x.result.byteLength)},x.onload=function(){E.push(null)},x.readAsArrayBuffer(h)}E._xhr.readyState===u.DONE&&E._mode!=="ms-stream"&&E.push(null)}}).call(this,n(2),n(5).Buffer,n(6))},function(e,t,n){var r=n(194),i=n(196);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=M,t.resolve=function(A,d){return M(A,!1,!0).resolve(d)},t.resolveObject=function(A,d){return A?M(A,!1,!0).resolveObject(d):d},t.format=function(A){return i.isString(A)&&(A=M(A)),A instanceof s?A.format():s.prototype.format.call(A)},t.Url=s;var l=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
30
+ `," "]),f=["'"].concat(u),E=["%","/","?",";","#"].concat(f),w=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},F=n(197);function M(A,d,I){if(A&&i.isObject(A)&&A instanceof s)return A;var $=new s;return $.parse(A,d,I),$}s.prototype.parse=function(A,d,I){if(!i.isString(A))throw new TypeError("Parameter 'url' must be a string, not "+typeof A);var $=A.indexOf("?"),q=$!==-1&&$<A.indexOf("#")?"?":"#",m=A.split(q);m[0]=m[0].replace(/\\/g,"/");var y=A=m.join(q);if(y=y.trim(),!I&&A.split("#").length===1){var C=c.exec(y);if(C)return this.path=y,this.href=y,this.pathname=C[1],C[2]?(this.search=C[2],this.query=d?F.parse(this.search.substr(1)):this.search.substr(1)):d&&(this.search="",this.query={}),this}var _=l.exec(y);if(_){var L=(_=_[0]).toLowerCase();this.protocol=L,y=y.substr(_.length)}if(I||_||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=y.substr(0,2)==="//";!z||_&&R[_]||(y=y.substr(2),this.slashes=!0)}if(!R[_]&&(z||_&&!x[_])){for(var B,N,P=-1,W=0;W<w.length;W++)(O=y.indexOf(w[W]))!==-1&&(P===-1||O<P)&&(P=O);for((N=P===-1?y.lastIndexOf("@"):y.lastIndexOf("@",P))!==-1&&(B=y.slice(0,N),y=y.slice(N+1),this.auth=decodeURIComponent(B)),P=-1,W=0;W<E.length;W++){var O;(O=y.indexOf(E[W]))!==-1&&(P===-1||O<P)&&(P=O)}P===-1&&(P=y.length),this.host=y.slice(0,P),y=y.slice(P),this.parseHost(),this.hostname=this.hostname||"";var p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p)for(var U=this.hostname.split(/\./),V=(W=0,U.length);W<V;W++){var Q=U[W];if(Q&&!Q.match(h)){for(var ee="",ne=0,Y=Q.length;ne<Y;ne++)Q.charCodeAt(ne)>127?ee+="x":ee+=Q[ne];if(!ee.match(h)){var G=U.slice(0,W),S=U.slice(W+1),T=Q.match(g);T&&(G.push(T[1]),S.unshift(T[2])),S.length&&(y="/"+S.join(".")+y),this.hostname=G.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),p||(this.hostname=r.toASCII(this.hostname));var k=this.port?":"+this.port:"",J=this.hostname||"";this.host=J+k,this.href+=this.host,p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),y[0]!=="/"&&(y="/"+y))}if(!b[L])for(W=0,V=f.length;W<V;W++){var K=f[W];if(y.indexOf(K)!==-1){var re=encodeURIComponent(K);re===K&&(re=escape(K)),y=y.split(K).join(re)}}var se=y.indexOf("#");se!==-1&&(this.hash=y.substr(se),y=y.slice(0,se));var fe=y.indexOf("?");if(fe!==-1?(this.search=y.substr(fe),this.query=y.substr(fe+1),d&&(this.query=F.parse(this.query)),y=y.slice(0,fe)):d&&(this.search="",this.query={}),y&&(this.pathname=y),x[L]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var ve=this.search||"";this.path=k+ve}return this.href=this.format(),this},s.prototype.format=function(){var A=this.auth||"";A&&(A=(A=encodeURIComponent(A)).replace(/%3A/i,":"),A+="@");var d=this.protocol||"",I=this.pathname||"",$=this.hash||"",q=!1,m="";this.host?q=A+this.host:this.hostname&&(q=A+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(q+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(m=F.stringify(this.query));var y=this.search||m&&"?"+m||"";return d&&d.substr(-1)!==":"&&(d+=":"),this.slashes||(!d||x[d])&&q!==!1?(q="//"+(q||""),I&&I.charAt(0)!=="/"&&(I="/"+I)):q||(q=""),$&&$.charAt(0)!=="#"&&($="#"+$),y&&y.charAt(0)!=="?"&&(y="?"+y),d+q+(I=I.replace(/[?#]/g,function(C){return encodeURIComponent(C)}))+(y=y.replace("#","%23"))+$},s.prototype.resolve=function(A){return this.resolveObject(M(A,!1,!0)).format()},s.prototype.resolveObject=function(A){if(i.isString(A)){var d=new s;d.parse(A,!1,!0),A=d}for(var I=new s,$=Object.keys(this),q=0;q<$.length;q++){var m=$[q];I[m]=this[m]}if(I.hash=A.hash,A.href==="")return I.href=I.format(),I;if(A.slashes&&!A.protocol){for(var y=Object.keys(A),C=0;C<y.length;C++){var _=y[C];_!=="protocol"&&(I[_]=A[_])}return x[I.protocol]&&I.hostname&&!I.pathname&&(I.path=I.pathname="/"),I.href=I.format(),I}if(A.protocol&&A.protocol!==I.protocol){if(!x[A.protocol]){for(var L=Object.keys(A),z=0;z<L.length;z++){var B=L[z];I[B]=A[B]}return I.href=I.format(),I}if(I.protocol=A.protocol,A.host||R[A.protocol])I.pathname=A.pathname;else{for(var N=(A.pathname||"").split("/");N.length&&!(A.host=N.shift()););A.host||(A.host=""),A.hostname||(A.hostname=""),N[0]!==""&&N.unshift(""),N.length<2&&N.unshift(""),I.pathname=N.join("/")}if(I.search=A.search,I.query=A.query,I.host=A.host||"",I.auth=A.auth,I.hostname=A.hostname||A.host,I.port=A.port,I.pathname||I.search){var P=I.pathname||"",W=I.search||"";I.path=P+W}return I.slashes=I.slashes||A.slashes,I.href=I.format(),I}var O=I.pathname&&I.pathname.charAt(0)==="/",p=A.host||A.pathname&&A.pathname.charAt(0)==="/",U=p||O||I.host&&A.pathname,V=U,Q=I.pathname&&I.pathname.split("/")||[],ee=(N=A.pathname&&A.pathname.split("/")||[],I.protocol&&!x[I.protocol]);if(ee&&(I.hostname="",I.port=null,I.host&&(Q[0]===""?Q[0]=I.host:Q.unshift(I.host)),I.host="",A.protocol&&(A.hostname=null,A.port=null,A.host&&(N[0]===""?N[0]=A.host:N.unshift(A.host)),A.host=null),U=U&&(N[0]===""||Q[0]==="")),p)I.host=A.host||A.host===""?A.host:I.host,I.hostname=A.hostname||A.hostname===""?A.hostname:I.hostname,I.search=A.search,I.query=A.query,Q=N;else if(N.length)Q||(Q=[]),Q.pop(),Q=Q.concat(N),I.search=A.search,I.query=A.query;else if(!i.isNullOrUndefined(A.search))return ee&&(I.hostname=I.host=Q.shift(),(T=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=T.shift(),I.host=I.hostname=T.shift())),I.search=A.search,I.query=A.query,i.isNull(I.pathname)&&i.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.href=I.format(),I;if(!Q.length)return I.pathname=null,I.search?I.path="/"+I.search:I.path=null,I.href=I.format(),I;for(var ne=Q.slice(-1)[0],Y=(I.host||A.host||Q.length>1)&&(ne==="."||ne==="..")||ne==="",G=0,S=Q.length;S>=0;S--)(ne=Q[S])==="."?Q.splice(S,1):ne===".."?(Q.splice(S,1),G++):G&&(Q.splice(S,1),G--);if(!U&&!V)for(;G--;G)Q.unshift("..");!U||Q[0]===""||Q[0]&&Q[0].charAt(0)==="/"||Q.unshift(""),Y&&Q.join("/").substr(-1)!=="/"&&Q.push("");var T,k=Q[0]===""||Q[0]&&Q[0].charAt(0)==="/";return ee&&(I.hostname=I.host=k?"":Q.length?Q.shift():"",(T=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=T.shift(),I.host=I.hostname=T.shift())),(U=U||I.host&&Q.length)&&!k&&Q.unshift(""),Q.length?I.pathname=Q.join("/"):(I.pathname=null,I.path=null),i.isNull(I.pathname)&&i.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.auth=A.auth||I.auth,I.slashes=I.slashes||A.slashes,I.href=I.format(),I},s.prototype.parseHost=function(){var A=this.host,d=o.exec(A);d&&((d=d[0])!==":"&&(this.port=d.substr(1)),A=A.substr(0,A.length-d.length)),A&&(this.hostname=A)}},function(e,t,n){const r=i=>i!==null&&typeof i=="object"&&typeof i.pipe=="function";r.writable=i=>r(i)&&i.writable!==!1&&typeof i._write=="function"&&typeof i._writableState=="object",r.readable=i=>r(i)&&i.readable!==!1&&typeof i._read=="function"&&typeof i._readableState=="object",r.duplex=i=>r.writable(i)&&r.readable(i),r.transform=i=>r.duplex(i)&&typeof i._transform=="function"&&typeof i._transformState=="object",e.exports=r},function(e,t,n){function r(b){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(b)}function i(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")}function s(b,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(R&&R.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),R&&l(b,R)}function l(b,R){return(l=Object.setPrototypeOf||function(x,F){return x.__proto__=F,x})(b,R)}function o(b){var R=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var x,F=u(b);if(R){var M=u(this).constructor;x=Reflect.construct(F,arguments,M)}else x=F.apply(this,arguments);return c(this,x)}}function c(b,R){return!R||r(R)!=="object"&&typeof R!="function"?function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(b):R}function u(b){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(b)}var f=n(3).LEVEL,E=n(50),w=n(202),h=n(38)("winston:create-logger");function g(b){return"is"+b.charAt(0).toUpperCase()+b.slice(1)+"Enabled"}e.exports=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b.levels=b.levels||E.npm.levels;var R=function(F){s(A,F);var M=o(A);function A(d){return i(this,A),M.call(this,d)}return A}(w),x=new R(b);return Object.keys(b.levels).forEach(function(F){h('Define prototype method for "%s"',F),F!=="log"?(R.prototype[F]=function(){for(var M=this||x,A=arguments.length,d=new Array(A),I=0;I<A;I++)d[I]=arguments[I];if(d.length===1){var $=d[0],q=$&&$.message&&$||{message:$};return q.level=q[f]=F,M._addDefaultMeta(q),M.write(q),this||x}return d.length===0?(M.log(F,""),M):M.log.apply(M,[F].concat(d))},R.prototype[g(F)]=function(){return(this||x).isLevelEnabled(F)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')}),x}},function(e,t,n){(function(r){function i(E,w){for(var h=0;h<w.length;h++){var g=w[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}var s=n(18),l=n(51),o=n(38)("winston:exception"),c=n(90),u=n(91),f=n(92);e.exports=function(){function E(g){if(function(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")}(this,E),!g)throw new Error("Logger is required to handle exceptions");this.logger=g,this.handlers=new Map}var w,h;return w=E,(h=[{key:"handle",value:function(){for(var g=this,b=arguments.length,R=new Array(b),x=0;x<b;x++)R[x]=arguments[x];R.forEach(function(F){if(Array.isArray(F))return F.forEach(function(M){return g._addHandler(M)});g._addHandler(F)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),r.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var g=this;this.catcher&&(r.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(b){return g.logger.unpipe(b)}))}},{key:"getAllInfo",value:function(g){var b=g.message;return b||typeof g!="string"||(b=g),{error:g,level:"error",message:["uncaughtException: ".concat(b||"(no error message)"),g.stack||" No stack trace"].join(`
31
+ `),stack:g.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(g)}}},{key:"getProcessInfo",value:function(){return{pid:r.pid,uid:r.getuid?r.getuid():null,gid:r.getgid?r.getgid():null,cwd:r.cwd(),execPath:r.execPath,version:r.version,argv:r.argv,memoryUsage:r.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:s.loadavg(),uptime:s.uptime()}}},{key:"getTrace",value:function(g){return(g?u.parse(g):u.get()).map(function(b){return{column:b.getColumnNumber(),file:b.getFileName(),function:b.getFunctionName(),line:b.getLineNumber(),method:b.getMethodName(),native:b.isNative()}})}},{key:"_addHandler",value:function(g){if(!this.handlers.has(g)){g.handleExceptions=!0;var b=new f(g);this.handlers.set(g,b),this.logger.pipe(b)}}},{key:"_uncaughtException",value:function(g){var b,R=this.getAllInfo(g),x=this._getExceptionHandlers(),F=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(g):this.logger.exitOnError;function M(){o("doExit",F),o("process._exiting",r._exiting),F&&!r._exiting&&(b&&clearTimeout(b),r.exit(1))}if(!x.length&&F&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),F=!1),!x||x.length===0)return r.nextTick(M);l(x,function(A,d){var I=c(d),$=A.transport||A;function q(m){return function(){o(m),I()}}$._ending=!0,$.once("finish",q("finished")),$.once("error",q("error"))},function(){return F&&M()}),this.logger.log(R),F&&(b=setTimeout(M,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter(function(g){return(g.transport||g).handleExceptions})}}])&&i(w.prototype,h),E}()}).call(this,n(2))},function(e,t,n){var r=n(205);e.exports=function(i){var s,l=0;function o(){return l||(l=1,s=i.apply(this,arguments),i=null),s}return o.displayName=r(i),o}},function(e,t){function n(r){for(var i in r)this[i]=r[i]}t.get=function(r){var i=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var s={},l=Error.prepareStackTrace;Error.prepareStackTrace=function(c,u){return u},Error.captureStackTrace(s,r||t.get);var o=s.stack;return Error.prepareStackTrace=l,Error.stackTraceLimit=i,o},t.parse=function(r){if(!r.stack)return[];var i=this;return r.stack.split(`
32
+ `).slice(1).map(function(s){if(s.match(/^\s*[-]{4,}$/))return i._createParsedCallSite({fileName:s,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var l=s.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(l){var o=null,c=null,u=null,f=null,E=null,w=l[5]==="native";if(l[1]){var h=(u=l[1]).lastIndexOf(".");if(u[h-1]=="."&&h--,h>0){o=u.substr(0,h),c=u.substr(h+1);var g=o.indexOf(".Module");g>0&&(u=u.substr(g+1),o=o.substr(0,g))}f=null}c&&(f=o,E=c),c==="<anonymous>"&&(E=null,u=null);var b={fileName:l[2]||null,lineNumber:parseInt(l[3],10)||null,functionName:u,typeName:f,methodName:E,columnNumber:parseInt(l[4],10)||null,native:w};return i._createParsedCallSite(b)}}).filter(function(s){return!!s})},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach(function(r){n.prototype[r]=null,n.prototype["get"+r[0].toUpperCase()+r.substr(1)]=function(){return this[r]}}),["topLevel","eval","native","constructor"].forEach(function(r){n.prototype[r]=!1,n.prototype["is"+r[0].toUpperCase()+r.substr(1)]=function(){return this[r]}}),t._createParsedCallSite=function(r){return new n(r)}},function(e,t,n){function r(f){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(f)}function i(f,E){for(var w=0;w<E.length;w++){var h=E[w];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}function s(f,E){return(s=Object.setPrototypeOf||function(w,h){return w.__proto__=h,w})(f,E)}function l(f){var E=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,h=c(f);if(E){var g=c(this).constructor;w=Reflect.construct(h,arguments,g)}else w=h.apply(this,arguments);return o(this,w)}}function o(f,E){return!E||r(E)!=="object"&&typeof E!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(f):E}function c(f){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(f)}var u=n(32).Writable;e.exports=function(f){(function(b,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(R&&R.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),R&&s(b,R)})(g,f);var E,w,h=l(g);function g(b){var R;if(function(x,F){if(!(x instanceof F))throw new TypeError("Cannot call a class as a function")}(this,g),R=h.call(this,{objectMode:!0}),!b)throw new Error("ExceptionStream requires a TransportStream instance.");return R.handleExceptions=!0,R.transport=b,R}return E=g,(w=[{key:"_write",value:function(b,R,x){return b.exception?this.transport.log(b,x):(x(),!0)}}])&&i(E.prototype,w),g}(u)},function(e,t,n){(function(r){function i(E,w){for(var h=0;h<w.length;h++){var g=w[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}var s=n(18),l=n(51),o=n(38)("winston:rejection"),c=n(90),u=n(91),f=n(92);e.exports=function(){function E(g){if(function(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")}(this,E),!g)throw new Error("Logger is required to handle rejections");this.logger=g,this.handlers=new Map}var w,h;return w=E,(h=[{key:"handle",value:function(){for(var g=this,b=arguments.length,R=new Array(b),x=0;x<b;x++)R[x]=arguments[x];R.forEach(function(F){if(Array.isArray(F))return F.forEach(function(M){return g._addHandler(M)});g._addHandler(F)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),r.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var g=this;this.catcher&&(r.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(b){return g.logger.unpipe(b)}))}},{key:"getAllInfo",value:function(g){var b=g.message;return b||typeof g!="string"||(b=g),{error:g,level:"error",message:["unhandledRejection: ".concat(b||"(no error message)"),g.stack||" No stack trace"].join(`
33
+ `),stack:g.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(g)}}},{key:"getProcessInfo",value:function(){return{pid:r.pid,uid:r.getuid?r.getuid():null,gid:r.getgid?r.getgid():null,cwd:r.cwd(),execPath:r.execPath,version:r.version,argv:r.argv,memoryUsage:r.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:s.loadavg(),uptime:s.uptime()}}},{key:"getTrace",value:function(g){return(g?u.parse(g):u.get()).map(function(b){return{column:b.getColumnNumber(),file:b.getFileName(),function:b.getFunctionName(),line:b.getLineNumber(),method:b.getMethodName(),native:b.isNative()}})}},{key:"_addHandler",value:function(g){if(!this.handlers.has(g)){g.handleRejections=!0;var b=new f(g);this.handlers.set(g,b),this.logger.pipe(b)}}},{key:"_unhandledRejection",value:function(g){var b,R=this.getAllInfo(g),x=this._getRejectionHandlers(),F=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(g):this.logger.exitOnError;function M(){o("doExit",F),o("process._exiting",r._exiting),F&&!r._exiting&&(b&&clearTimeout(b),r.exit(1))}if(!x.length&&F&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),F=!1),!x||x.length===0)return r.nextTick(M);l(x,function(A,d){var I=c(d),$=A.transport||A;function q(m){return function(){o(m),I()}}$._ending=!0,$.once("finish",q("finished")),$.once("error",q("error"))},function(){return F&&M()}),this.logger.log(R),F&&(b=setTimeout(M,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter(function(g){return(g.transport||g).handleRejections})}}])&&i(w.prototype,h),E}()}).call(this,n(2))},function(e,t,n){e.exports={asArray:n(212),asBoolStrict:n(213),asBool:n(214),asPortNumber:n(215),asEnum:n(216),asFloatNegative:n(217),asFloatPositive:n(218),asFloat:n(54),asIntNegative:n(219),asIntPositive:n(95),asInt:n(53),asJsonArray:n(220),asJsonObject:n(221),asJson:n(55),asRegExp:n(222),asString:n(33),asUrlObject:n(96),asUrlString:n(223),asEmailString:n(224)}},function(e,t,n){const r=n(53);e.exports=function(i){const s=r(i);if(s<0)throw new Error("should be a positive integer");return s}},function(e,t,n){const r=n(33);e.exports=function(i){const s=r(i);try{return new URL(s)}catch{throw new Error("should be a valid URL")}}},function(e,t,n){const r={};r.web=n(24),n(98);const i={v1:{}};i.v1.signaling={},i.v1.signaling.api=n(9),i.v1.signaling.api.SignalingClient=function(h,g,b){b||(b={}),b.format="text",this.client_=new r.web.GrpcWebClientBase(b),this.hostname_=h},i.v1.signaling.api.SignalingPromiseClient=function(h,g,b){b||(b={}),b.format="text",this.client_=new r.web.GrpcWebClientBase(b),this.hostname_=h};const s=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/GetHealth",r.web.MethodType.UNARY,i.v1.signaling.api.GetHealthRequest,i.v1.signaling.api.GetHealthResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.GetHealthResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.GetHealthResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.GetHealthResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.getHealth=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetHealth",h,g||{},s,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.getHealth=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetHealth",h,g||{},s)};const l=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/CreatePeer",r.web.MethodType.UNARY,i.v1.signaling.api.CreatePeerRequest,i.v1.signaling.api.CreatePeerResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.CreatePeerResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.CreatePeerResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.CreatePeerResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.createPeer=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",h,g||{},l,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.createPeer=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",h,g||{},l)};const o=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/DeletePeer",r.web.MethodType.UNARY,i.v1.signaling.api.DeletePeerRequest,i.v1.signaling.api.DeletePeerResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.DeletePeerResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.DeletePeerResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.DeletePeerResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.deletePeer=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",h,g||{},o,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.deletePeer=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",h,g||{},o)};const c=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/RefreshPeer",r.web.MethodType.UNARY,i.v1.signaling.api.RefreshPeerRequest,i.v1.signaling.api.RefreshPeerResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.RefreshPeerResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.RefreshPeerResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.RefreshPeerResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.refreshPeer=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",h,g||{},c,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.refreshPeer=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",h,g||{},c)};const u=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/GetPeers",r.web.MethodType.UNARY,i.v1.signaling.api.GetPeersRequest,i.v1.signaling.api.GetPeersResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.GetPeersResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.GetPeersResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.GetPeersResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.getPeers=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",h,g||{},u,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.getPeers=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",h,g||{},u)};const f=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/GetIceServers",r.web.MethodType.UNARY,i.v1.signaling.api.GetIceServersRequest,i.v1.signaling.api.GetIceServersResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.GetIceServersResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.GetIceServersResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.GetIceServersResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.getIceServers=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",h,g||{},f,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.getIceServers=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",h,g||{},f)};const E=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/SendSignal",r.web.MethodType.UNARY,i.v1.signaling.api.SendSignalRequest,i.v1.signaling.api.SendSignalResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.SendSignalResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.SendSignalResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.SendSignalResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.sendSignal=function(h,g,b){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",h,g||{},E,b)},i.v1.signaling.api.SignalingPromiseClient.prototype.sendSignal=function(h,g){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",h,g||{},E)};const w=new r.web.MethodDescriptor("/v1.signaling.api.Signaling/ReceiveSignalStream",r.web.MethodType.SERVER_STREAMING,i.v1.signaling.api.ReceiveSignalStreamRequest,i.v1.signaling.api.ReceiveSignalStreamResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.ReceiveSignalStreamResponse,function(h){return h.serializeBinary()},i.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.receiveSignalStream=function(h,g){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",h,g||{},w)},i.v1.signaling.api.SignalingPromiseClient.prototype.receiveSignalStream=function(h,g){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",h,g||{},w)},e.exports=i.v1.signaling.api},function(e,t,n){var r=n(99),i=r,s=Function("return this")();i.exportSymbol("proto.google.protobuf.BoolValue",null,s),i.exportSymbol("proto.google.protobuf.BytesValue",null,s),i.exportSymbol("proto.google.protobuf.DoubleValue",null,s),i.exportSymbol("proto.google.protobuf.FloatValue",null,s),i.exportSymbol("proto.google.protobuf.Int32Value",null,s),i.exportSymbol("proto.google.protobuf.Int64Value",null,s),i.exportSymbol("proto.google.protobuf.StringValue",null,s),i.exportSymbol("proto.google.protobuf.UInt32Value",null,s),i.exportSymbol("proto.google.protobuf.UInt64Value",null,s),proto.google.protobuf.DoubleValue=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.DoubleValue,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.DoubleValue.displayName="proto.google.protobuf.DoubleValue"),proto.google.protobuf.FloatValue=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.FloatValue,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FloatValue.displayName="proto.google.protobuf.FloatValue"),proto.google.protobuf.Int64Value=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.Int64Value,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.Int64Value.displayName="proto.google.protobuf.Int64Value"),proto.google.protobuf.UInt64Value=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.UInt64Value,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt64Value.displayName="proto.google.protobuf.UInt64Value"),proto.google.protobuf.Int32Value=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.Int32Value,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.Int32Value.displayName="proto.google.protobuf.Int32Value"),proto.google.protobuf.UInt32Value=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.UInt32Value,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt32Value.displayName="proto.google.protobuf.UInt32Value"),proto.google.protobuf.BoolValue=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.BoolValue,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.BoolValue.displayName="proto.google.protobuf.BoolValue"),proto.google.protobuf.StringValue=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.StringValue,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.StringValue.displayName="proto.google.protobuf.StringValue"),proto.google.protobuf.BytesValue=function(l){r.Message.initialize(this,l,0,-1,null,null)},i.inherits(proto.google.protobuf.BytesValue,r.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.BytesValue.displayName="proto.google.protobuf.BytesValue"),r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DoubleValue.prototype.toObject=function(l){return proto.google.protobuf.DoubleValue.toObject(l,this)},proto.google.protobuf.DoubleValue.toObject=function(l,o){var c={value:r.Message.getFloatingPointFieldWithDefault(o,1,0)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.DoubleValue.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.DoubleValue;return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(c,o)},proto.google.protobuf.DoubleValue.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readDouble();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.DoubleValue.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.DoubleValue.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())!==0&&o.writeDouble(1,c)},proto.google.protobuf.DoubleValue.prototype.getValue=function(){return r.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.DoubleValue.prototype.setValue=function(l){return r.Message.setProto3FloatField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FloatValue.prototype.toObject=function(l){return proto.google.protobuf.FloatValue.toObject(l,this)},proto.google.protobuf.FloatValue.toObject=function(l,o){var c={value:r.Message.getFloatingPointFieldWithDefault(o,1,0)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.FloatValue.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.FloatValue;return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(c,o)},proto.google.protobuf.FloatValue.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readFloat();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.FloatValue.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.FloatValue.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.FloatValue.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())!==0&&o.writeFloat(1,c)},proto.google.protobuf.FloatValue.prototype.getValue=function(){return r.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.FloatValue.prototype.setValue=function(l){return r.Message.setProto3FloatField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int64Value.prototype.toObject=function(l){return proto.google.protobuf.Int64Value.toObject(l,this)},proto.google.protobuf.Int64Value.toObject=function(l,o){var c={value:r.Message.getFieldWithDefault(o,1,0)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.Int64Value.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.Int64Value;return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(c,o)},proto.google.protobuf.Int64Value.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readInt64();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.Int64Value.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.Int64Value.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.Int64Value.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())!==0&&o.writeInt64(1,c)},proto.google.protobuf.Int64Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int64Value.prototype.setValue=function(l){return r.Message.setProto3IntField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt64Value.prototype.toObject=function(l){return proto.google.protobuf.UInt64Value.toObject(l,this)},proto.google.protobuf.UInt64Value.toObject=function(l,o){var c={value:r.Message.getFieldWithDefault(o,1,0)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.UInt64Value.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.UInt64Value;return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(c,o)},proto.google.protobuf.UInt64Value.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readUint64();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.UInt64Value.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.UInt64Value.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())!==0&&o.writeUint64(1,c)},proto.google.protobuf.UInt64Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt64Value.prototype.setValue=function(l){return r.Message.setProto3IntField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int32Value.prototype.toObject=function(l){return proto.google.protobuf.Int32Value.toObject(l,this)},proto.google.protobuf.Int32Value.toObject=function(l,o){var c={value:r.Message.getFieldWithDefault(o,1,0)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.Int32Value.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.Int32Value;return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(c,o)},proto.google.protobuf.Int32Value.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readInt32();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.Int32Value.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.Int32Value.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.Int32Value.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())!==0&&o.writeInt32(1,c)},proto.google.protobuf.Int32Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int32Value.prototype.setValue=function(l){return r.Message.setProto3IntField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt32Value.prototype.toObject=function(l){return proto.google.protobuf.UInt32Value.toObject(l,this)},proto.google.protobuf.UInt32Value.toObject=function(l,o){var c={value:r.Message.getFieldWithDefault(o,1,0)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.UInt32Value.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.UInt32Value;return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(c,o)},proto.google.protobuf.UInt32Value.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readUint32();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.UInt32Value.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.UInt32Value.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())!==0&&o.writeUint32(1,c)},proto.google.protobuf.UInt32Value.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt32Value.prototype.setValue=function(l){return r.Message.setProto3IntField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BoolValue.prototype.toObject=function(l){return proto.google.protobuf.BoolValue.toObject(l,this)},proto.google.protobuf.BoolValue.toObject=function(l,o){var c={value:r.Message.getBooleanFieldWithDefault(o,1,!1)};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.BoolValue.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.BoolValue;return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(c,o)},proto.google.protobuf.BoolValue.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readBool();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.BoolValue.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.BoolValue.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.BoolValue.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue())&&o.writeBool(1,c)},proto.google.protobuf.BoolValue.prototype.getValue=function(){return r.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.BoolValue.prototype.setValue=function(l){return r.Message.setProto3BooleanField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.StringValue.prototype.toObject=function(l){return proto.google.protobuf.StringValue.toObject(l,this)},proto.google.protobuf.StringValue.toObject=function(l,o){var c={value:r.Message.getFieldWithDefault(o,1,"")};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.StringValue.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.StringValue;return proto.google.protobuf.StringValue.deserializeBinaryFromReader(c,o)},proto.google.protobuf.StringValue.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readString();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.StringValue.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.StringValue.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.StringValue.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue()).length>0&&o.writeString(1,c)},proto.google.protobuf.StringValue.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.StringValue.prototype.setValue=function(l){return r.Message.setProto3StringField(this,1,l)},r.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BytesValue.prototype.toObject=function(l){return proto.google.protobuf.BytesValue.toObject(l,this)},proto.google.protobuf.BytesValue.toObject=function(l,o){var c={value:o.getValue_asB64()};return l&&(c.$jspbMessageInstance=o),c}),proto.google.protobuf.BytesValue.deserializeBinary=function(l){var o=new r.BinaryReader(l),c=new proto.google.protobuf.BytesValue;return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(c,o)},proto.google.protobuf.BytesValue.deserializeBinaryFromReader=function(l,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var c=o.readBytes();l.setValue(c);break;default:o.skipField()}return l},proto.google.protobuf.BytesValue.prototype.serializeBinary=function(){var l=new r.BinaryWriter;return proto.google.protobuf.BytesValue.serializeBinaryToWriter(this,l),l.getResultBuffer()},proto.google.protobuf.BytesValue.serializeBinaryToWriter=function(l,o){var c;(c=l.getValue_asU8()).length>0&&o.writeBytes(1,c)},proto.google.protobuf.BytesValue.prototype.getValue=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.BytesValue.prototype.getValue_asB64=function(){return r.Message.bytesAsB64(this.getValue())},proto.google.protobuf.BytesValue.prototype.getValue_asU8=function(){return r.Message.bytesAsU8(this.getValue())},proto.google.protobuf.BytesValue.prototype.setValue=function(l){return r.Message.setProto3BytesField(this,1,l)},i.object.extend(t,proto.google.protobuf)},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var s=e[i];if(t.call(n,s,i,e))return{i,v:s}}return{i:-1,v:void 0}},$jscomp.ASSUME_ES5=!1,$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.SIMPLE_FROUND_POLYFILL=!1,$jscomp.defineProperty=$jscomp.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},$jscomp.getGlobal=function(e){return typeof window<"u"&&window===e?e:global!==void 0&&global!=null?global:e},$jscomp.global=$jscomp.getGlobal(this),$jscomp.polyfill=function(e,t,n,r){if(t){for(n=$jscomp.global,e=e.split("."),r=0;r<e.length-1;r++){var i=e[r];i in n||(n[i]={}),n=n[i]}(t=t(r=n[e=e[e.length-1]]))!=r&&t!=null&&$jscomp.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},$jscomp.polyfill("Array.prototype.findIndex",function(e){return e||function(t,n){return $jscomp.findInternal(this,t,n).i}},"es6","es3"),$jscomp.checkStringArgs=function(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""},$jscomp.polyfill("String.prototype.endsWith",function(e){return e||function(t,n){var r=$jscomp.checkStringArgs(this,t,"endsWith");t+="",n===void 0&&(n=r.length),n=Math.max(0,Math.min(0|n,r.length));for(var i=t.length;0<i&&0<n;)if(r[--n]!=t[--i])return!1;return 0>=i}},"es6","es3"),$jscomp.polyfill("Array.prototype.find",function(e){return e||function(t,n){return $jscomp.findInternal(this,t,n).v}},"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",function(e){return e||function(t,n){var r=$jscomp.checkStringArgs(this,t,"startsWith");t+="";var i=r.length,s=t.length;n=Math.max(0,Math.min(0|n,r.length));for(var l=0;l<s&&n<i;)if(r[n++]!=t[l++])return!1;return l>=s}},"es6","es3"),$jscomp.polyfill("String.prototype.repeat",function(e){return e||function(t){var n=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)1&t&&(r+=n),(t>>>=1)&&(n+=n);return r}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return e!==void 0},goog.isString=function(e){return typeof e=="string"},goog.isBoolean=function(e){return typeof e=="boolean"},goog.isNumber=function(e){return typeof e=="number"},goog.exportPath_=function(e,t,n){e=e.split("."),n=n||goog.global,e[0]in n||n.execScript===void 0||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)!e.length&&goog.isDef(t)?n[r]=t:n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}},goog.define=function(e,t){return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(goog.cspNonce_===null&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||e.search(goog.VALID_MODULE_RE_)==-1)throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&typeof e.getCurrentModulePath=="function"&&!!e.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||typeof t.getCurrentModulePath!="function")throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var n=0;n<e.length;n++)if(t=t[e[n]],!goog.isDefAndNotNull(t))return null;return t},goog.globalize=function(e,t){for(var n in t=t||goog.global,e)t[n]=e[n]},goog.addDependency=function(e,t,n,r){},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){},goog.requireType=function(e){return{}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.instance_=void 0,e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED,goog.TRANSPILE="detect",goog.ASSUME_ES_MODULES_TRANSPILED=!1,goog.TRANSPILE_TO_LANGUAGE="",goog.TRANSPILER="transpile.js",goog.hasBadLetScoping=null,goog.useSafari10Workaround=function(){if(goog.hasBadLetScoping==null){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(e){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping},goog.workaroundSafari10EvalBug=function(e){return"(function(){"+e+`
29
34
  ;})();
30
- `},goog.loadModule=function(e){var t=goog.moduleLoaderState_;try{if(goog.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:goog.ModuleType.GOOG},goog.isFunction(e))var n=e.call(void 0,{});else{if(!goog.isString(e))throw Error("Invalid module definition");goog.useSafari10Workaround()&&(e=goog.workaroundSafari10EvalBug(e)),n=goog.loadModuleFromSource_.call(void 0,e)}var r=goog.moduleLoaderState_.moduleName;if(!goog.isString(r)||!r)throw Error('Invalid module name "'+r+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(r,n):goog.SEAL_MODULE_EXPORTS&&Object.seal&&typeof n=="object"&&n!=null&&Object.seal(n),goog.loadedModules_[r]={exports:n,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName}}finally{goog.moduleLoaderState_=t}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.normalizePath_=function(e){e=e.split("/");for(var t=0;t<e.length;)e[t]=="."?e.splice(t,1):t&&e[t]==".."&&e[t-1]&&e[t-1]!=".."?e.splice(--t,2):t++;return e.join("/")},goog.loadFileSync_=function(e){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(e);try{var t=new goog.global.XMLHttpRequest;return t.open("get",e,!1),t.send(),t.status==0||t.status==200?t.responseText:null}catch{return null}},goog.transpile_=function(e,t,n){var r=goog.global.$jscomp;r||(goog.global.$jscomp=r={});var o=r.transpile;if(!o){var l=goog.basePath+goog.TRANSPILER,s=goog.loadFileSync_(l);if(s){if(function(){(0,eval)(s+`
31
- //# sourceURL=`+l)}.call(goog.global),goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=goog.global.$gwtExport.$jscomp.transpile,o=(r=goog.global.$jscomp).transpile}}return o||(o=r.transpile=function(i,c){return goog.logToConsole_(c+" requires transpilation but no transpiler was found."),i}),o(e,t,n)},goog.typeOf=function(e){var t=typeof e;if(t=="object"){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if(n=="[object Window]")return"object";if(n=="[object Array]"||typeof e.length=="number"&&e.splice!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("splice"))return"array";if(n=="[object Function]"||e.call!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("call"))return"function"}else if(t=="function"&&e.call===void 0)return"object";return t},goog.isNull=function(e){return e===null},goog.isDefAndNotNull=function(e){return e!=null},goog.isArray=function(e){return goog.typeOf(e)=="array"},goog.isArrayLike=function(e){var t=goog.typeOf(e);return t=="array"||t=="object"&&typeof e.length=="number"},goog.isDateLike=function(e){return goog.isObject(e)&&typeof e.getFullYear=="function"},goog.isFunction=function(e){return goog.typeOf(e)=="function"},goog.isObject=function(e){var t=typeof e;return t=="object"&&e!=null||t=="function"},goog.getUid=function(e){return e[goog.UID_PROPERTY_]||(e[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(e){return!!e[goog.UID_PROPERTY_]},goog.removeUid=function(e){e!==null&&"removeAttribute"in e&&e.removeAttribute(goog.UID_PROPERTY_);try{delete e[goog.UID_PROPERTY_]}catch{}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(typeof e.clone=="function")return e.clone();for(var n in t=t=="array"?[]:{},e)t[n]=goog.cloneObject(e[n]);return t}return e},goog.bindNative_=function(e,t,n){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var o=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(o,r),e.apply(t,o)}}return function(){return e.apply(t,arguments)}},goog.bind=function(e,t,n){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),e.apply(this,r)}},goog.mixin=function(e,t){for(var n in t)e[n]=t[n]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(e){if(goog.global.execScript)goog.global.execScript(e,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(goog.evalWorksForGlobals_==null){try{goog.global.eval("var _evalTest_ = 1;")}catch{}if(goog.global._evalTest_!==void 0){try{delete goog.global._evalTest_}catch{}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(e);else{var t=goog.global.document,n=t.createElement("SCRIPT");n.type="text/javascript",n.defer=!1,n.appendChild(t.createTextNode(e)),t.head.appendChild(n),t.head.removeChild(n)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(e,t){if(String(e).charAt(0)==".")throw Error('className passed in goog.getCssName must not start with ".". You passed: '+e);var n=function(o){return goog.cssNameMapping_[o]||o},r=function(o){o=o.split("-");for(var l=[],s=0;s<o.length;s++)l.push(n(o[s]));return l.join("-")};return r=goog.cssNameMapping_?goog.cssNameMappingStyle_=="BY_WHOLE"?n:r:function(o){return o},e=t?e+"-"+r(t):r(e),goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(e):e},goog.setCssNameMapping=function(e,t){goog.cssNameMapping_=e,goog.cssNameMappingStyle_=t},goog.getMsg=function(e,t,n){return n&&n.html&&(e=e.replace(/</g,"&lt;")),t&&(e=e.replace(/\{\$([^}]+)}/g,function(r,o){return t!=null&&o in t?t[o]:r})),e},goog.getMsgWithFallback=function(e,t){return e},goog.exportSymbol=function(e,t,n){goog.exportPath_(e,t,n)},goog.exportProperty=function(e,t,n){e[t]=n},goog.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.base=function(r,o,l){for(var s=Array(arguments.length-2),i=2;i<arguments.length;i++)s[i-2]=arguments[i];return t.prototype[o].apply(r,s)}},goog.base=function(e,t,n){var r=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!r)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(r.superClass_!==void 0){for(var o=Array(arguments.length-1),l=1;l<arguments.length;l++)o[l-1]=arguments[l];return r.superClass_.constructor.apply(e,o)}if(typeof t!="string"&&typeof t!="symbol")throw Error("method names provided to goog.base must be a string or a symbol");for(o=Array(arguments.length-2),l=2;l<arguments.length;l++)o[l-2]=arguments[l];l=!1;for(var s=e.constructor.prototype;s;s=Object.getPrototypeOf(s))if(s[t]===r)l=!0;else if(l)return s[t].apply(e,o);if(e[t]===r)return e.constructor.prototype[t].apply(e,o);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(e){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");e.call(goog.global)},goog.defineClass=function(e,t){var n=t.constructor,r=t.statics;return n&&n!=Object.prototype.constructor||(n=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),n=goog.defineClass.createSealingConstructor_(n,e),e&&goog.inherits(n,e),delete t.constructor,delete t.statics,goog.defineClass.applyProperties_(n.prototype,t),r!=null&&(r instanceof Function?r(n):goog.defineClass.applyProperties_(n,r)),n},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(e,t){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return e;var n=!goog.defineClass.isUnsealable_(t),r=function(){var o=e.apply(this,arguments)||this;return o[goog.UID_PROPERTY_]=o[goog.UID_PROPERTY_],this.constructor===r&&n&&Object.seal instanceof Function&&Object.seal(o),o};return r},goog.defineClass.isUnsealable_=function(e){return e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);for(var r=0;r<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;r++)n=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[r],Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},goog.tagUnsealableClass=function(e){},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.TRUSTED_TYPES_POLICY_NAME="",goog.identity_=function(e){return e},goog.createTrustedTypesPolicy=function(e){var t=null;if(typeof TrustedTypes=="undefined"||!TrustedTypes.createPolicy)return t;try{t=TrustedTypes.createPolicy(e,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(n){goog.logToConsole_(n.message)}return t},goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;var jspb={BinaryConstants:{},ConstBinaryMessage:function(){},BinaryMessage:function(){}};jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31},jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5},jspb.BinaryConstants.FieldTypeToWireType=function(e){var t=jspb.BinaryConstants.FieldType,n=jspb.BinaryConstants.WireType;switch(e){case t.INT32:case t.INT64:case t.UINT32:case t.UINT64:case t.SINT32:case t.SINT64:case t.BOOL:case t.ENUM:case t.VHASH64:return n.VARINT;case t.DOUBLE:case t.FIXED64:case t.SFIXED64:case t.FHASH64:return n.FIXED64;case t.STRING:case t.MESSAGE:case t.BYTES:return n.DELIMITED;case t.FLOAT:case t.FIXED32:case t.SFIXED32:return n.FIXED32;default:return n.INVALID}},jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1,jspb.BinaryConstants.FLOAT32_EPS=1401298464324817e-60,jspb.BinaryConstants.FLOAT32_MIN=11754943508222875e-54,jspb.BinaryConstants.FLOAT32_MAX=34028234663852886e22,jspb.BinaryConstants.FLOAT64_EPS=5e-324,jspb.BinaryConstants.FLOAT64_MIN=22250738585072014e-324,jspb.BinaryConstants.FLOAT64_MAX=17976931348623157e292,jspb.BinaryConstants.TWO_TO_20=1048576,jspb.BinaryConstants.TWO_TO_23=8388608,jspb.BinaryConstants.TWO_TO_31=2147483648,jspb.BinaryConstants.TWO_TO_32=4294967296,jspb.BinaryConstants.TWO_TO_52=4503599627370496,jspb.BinaryConstants.TWO_TO_63=9223372036854776e3,jspb.BinaryConstants.TWO_TO_64=18446744073709552e3,jspb.BinaryConstants.ZERO_HASH="\0\0\0\0\0\0\0\0",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.debug={},goog.debug.Error=function(e){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(e,t){goog.debug.Error.call(this,goog.asserts.subs_(e,t)),this.messagePattern=e},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(e){throw e},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.subs_=function(e,t){for(var n="",r=(e=e.split("%s")).length-1,o=0;o<r;o++)n+=e[o]+(o<t.length?t[o]:"%s");return n+e[r]},goog.asserts.doAssertFailure_=function(e,t,n,r){var o="Assertion failed";if(n){o+=": "+n;var l=r}else e&&(o+=": "+e,l=t);e=new goog.asserts.AssertionError(""+o,l||[]),goog.asserts.errorHandler_(e)},goog.asserts.setErrorHandler=function(e){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=e)},goog.asserts.assert=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!e&&goog.asserts.doAssertFailure_("",null,t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertExists=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&e==null&&goog.asserts.doAssertFailure_("Expected to exist: %s.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.fail=function(e,t){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(e)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertString=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(e)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertFunction=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(e)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObject=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(e)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertArray=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(e)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertBoolean=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(e)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertElement=function(e,t,n){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertInstanceof=function(e,t,n,r){return!goog.asserts.ENABLE_ASSERTS||e instanceof t||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(t),goog.asserts.getType_(e)],n,Array.prototype.slice.call(arguments,3)),e},goog.asserts.assertFinite=function(e,t,n){return!goog.asserts.ENABLE_ASSERTS||typeof e=="number"&&isFinite(e)||goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var e in Object.prototype)goog.asserts.fail(e+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):e===null?"null":typeof e},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=2012<goog.FEATURESET_YEAR,goog.array.peek=function(e){return e[e.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.indexOf.call(e,t,n)}:function(e,t,n){if(n=n==null?0:0>n?Math.max(0,e.length+n):n,goog.isString(e))return goog.isString(t)&&t.length==1?e.indexOf(t,n):-1;for(;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.lastIndexOf.call(e,t,n==null?e.length-1:n)}:function(e,t,n){if(0>(n=n==null?e.length-1:n)&&(n=Math.max(0,e.length+n)),goog.isString(e))return goog.isString(t)&&t.length==1?e.lastIndexOf(t,n):-1;for(;0<=n;n--)if(n in e&&e[n]===t)return n;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,n){goog.asserts.assert(e.length!=null),Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<r;l++)l in o&&t.call(n,o[l],l,e)},goog.array.forEachRight=function(e,t,n){var r=e.length,o=goog.isString(e)?e.split(""):e;for(--r;0<=r;--r)r in o&&t.call(n,o[r],r,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.filter.call(e,t,n)}:function(e,t,n){for(var r=e.length,o=[],l=0,s=goog.isString(e)?e.split(""):e,i=0;i<r;i++)if(i in s){var c=s[i];t.call(n,c,i,e)&&(o[l++]=c)}return o},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.map.call(e,t,n)}:function(e,t,n){for(var r=e.length,o=Array(r),l=goog.isString(e)?e.split(""):e,s=0;s<r;s++)s in l&&(o[s]=t.call(n,l[s],s,e));return o},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(e,t,n,r){return goog.asserts.assert(e.length!=null),r&&(t=goog.bind(t,r)),Array.prototype.reduce.call(e,t,n)}:function(e,t,n,r){var o=n;return goog.array.forEach(e,function(l,s){o=t.call(r,o,l,s,e)}),o},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(e,t,n,r){return goog.asserts.assert(e.length!=null),goog.asserts.assert(t!=null),r&&(t=goog.bind(t,r)),Array.prototype.reduceRight.call(e,t,n)}:function(e,t,n,r){var o=n;return goog.array.forEachRight(e,function(l,s){o=t.call(r,o,l,s,e)}),o},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.some.call(e,t,n)}:function(e,t,n){for(var r=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<r;l++)if(l in o&&t.call(n,o[l],l,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.every.call(e,t,n)}:function(e,t,n){for(var r=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<r;l++)if(l in o&&!t.call(n,o[l],l,e))return!1;return!0},goog.array.count=function(e,t,n){var r=0;return goog.array.forEach(e,function(o,l,s){t.call(n,o,l,s)&&++r},n),r},goog.array.find=function(e,t,n){return 0>(t=goog.array.findIndex(e,t,n))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(e,t,n){for(var r=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<r;l++)if(l in o&&t.call(n,o[l],l,e))return l;return-1},goog.array.findRight=function(e,t,n){return 0>(t=goog.array.findIndexRight(e,t,n))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(e,t,n){var r=e.length,o=goog.isString(e)?e.split(""):e;for(--r;0<=r;r--)if(r in o&&t.call(n,o[r],r,e))return r;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return e.length==0},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,n){goog.array.splice(e,n,0,t)},goog.array.insertArrayAt=function(e,t,n){goog.partial(goog.array.splice,e,n,0).apply(null,t)},goog.array.insertBefore=function(e,t,n){var r;arguments.length==2||0>(r=goog.array.indexOf(e,n))?e.push(t):goog.array.insertAt(e,t,r)},goog.array.remove=function(e,t){var n;return(n=0<=(t=goog.array.indexOf(e,t)))&&goog.array.removeAt(e,t),n},goog.array.removeLast=function(e,t){return 0<=(t=goog.array.lastIndexOf(e,t))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAt=function(e,t){return goog.asserts.assert(e.length!=null),Array.prototype.splice.call(e,t,1).length==1},goog.array.removeIf=function(e,t,n){return 0<=(t=goog.array.findIndex(e,t,n))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(e,t,n){var r=0;return goog.array.forEachRight(e,function(o,l){t.call(n,o,l,e)&&goog.array.removeAt(e,l)&&r++}),r},goog.array.concat=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.join=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.toArray=function(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(goog.isArrayLike(r)){var o=e.length||0,l=r.length||0;e.length=o+l;for(var s=0;s<l;s++)e[o+s]=r[s]}else e.push(r)}},goog.array.splice=function(e,t,n,r){return goog.asserts.assert(e.length!=null),Array.prototype.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,t,n){return goog.asserts.assert(e.length!=null),2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,n)},goog.array.removeDuplicates=function(e,t,n){t=t||e;var r=function(c){return goog.isObject(c)?"o"+goog.getUid(c):(typeof c).charAt(0)+c};n=n||r,r={};for(var o=0,l=0;l<e.length;){var s=e[l++],i=n(s);Object.prototype.hasOwnProperty.call(r,i)||(r[i]=!0,t[o++]=s)}t.length=o},goog.array.binarySearch=function(e,t,n){return goog.array.binarySearch_(e,n||goog.array.defaultCompare,!1,t)},goog.array.binarySelect=function(e,t,n){return goog.array.binarySearch_(e,t,!0,void 0,n)},goog.array.binarySearch_=function(e,t,n,r,o){for(var l,s=0,i=e.length;s<i;){var c=s+i>>1,u=n?t.call(o,e[c],c,e):t(r,e[c]);0<u?s=c+1:(i=c,l=!u)}return l?s:~s},goog.array.sort=function(e,t){e.sort(t||goog.array.defaultCompare)},goog.array.stableSort=function(e,t){for(var n=Array(e.length),r=0;r<e.length;r++)n[r]={index:r,value:e[r]};var o=t||goog.array.defaultCompare;for(goog.array.sort(n,function(l,s){return o(l.value,s.value)||l.index-s.index}),r=0;r<e.length;r++)e[r]=n[r].value},goog.array.sortByKey=function(e,t,n){var r=n||goog.array.defaultCompare;goog.array.sort(e,function(o,l){return r(t(o),t(l))})},goog.array.sortObjectsByKey=function(e,t,n){goog.array.sortByKey(e,function(r){return r[t]},n)},goog.array.isSorted=function(e,t,n){t=t||goog.array.defaultCompare;for(var r=1;r<e.length;r++){var o=t(e[r-1],e[r]);if(0<o||o==0&&n)return!1}return!0},goog.array.equals=function(e,t,n){if(!goog.isArrayLike(e)||!goog.isArrayLike(t)||e.length!=t.length)return!1;var r=e.length;n=n||goog.array.defaultCompareEquality;for(var o=0;o<r;o++)if(!n(e[o],t[o]))return!1;return!0},goog.array.compare3=function(e,t,n){n=n||goog.array.defaultCompare;for(var r=Math.min(e.length,t.length),o=0;o<r;o++){var l=n(e[o],t[o]);if(l!=0)return l}return goog.array.defaultCompare(e.length,t.length)},goog.array.defaultCompare=function(e,t){return e>t?1:e<t?-1:0},goog.array.inverseDefaultCompare=function(e,t){return-goog.array.defaultCompare(e,t)},goog.array.defaultCompareEquality=function(e,t){return e===t},goog.array.binaryInsert=function(e,t,n){return 0>(n=goog.array.binarySearch(e,t,n))&&(goog.array.insertAt(e,t,-(n+1)),!0)},goog.array.binaryRemove=function(e,t,n){return 0<=(t=goog.array.binarySearch(e,t,n))&&goog.array.removeAt(e,t)},goog.array.bucket=function(e,t,n){for(var r={},o=0;o<e.length;o++){var l=e[o],s=t.call(n,l,o,e);goog.isDef(s)&&(r[s]||(r[s]=[])).push(l)}return r},goog.array.toObject=function(e,t,n){var r={};return goog.array.forEach(e,function(o,l){r[t.call(n,o,l,e)]=o}),r},goog.array.range=function(e,t,n){var r=[],o=0,l=e;if(t!==void 0&&(o=e,l=t),0>(n=n||1)*(l-o))return[];if(0<n)for(e=o;e<l;e+=n)r.push(e);else for(e=o;e>l;e+=n)r.push(e);return r},goog.array.repeat=function(e,t){for(var n=[],r=0;r<t;r++)n[r]=e;return n},goog.array.flatten=function(e){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(goog.isArray(r))for(var o=0;o<r.length;o+=8192){var l=goog.array.slice(r,o,o+8192);l=goog.array.flatten.apply(null,l);for(var s=0;s<l.length;s++)t.push(l[s])}else t.push(r)}return t},goog.array.rotate=function(e,t){return goog.asserts.assert(e.length!=null),e.length&&(0<(t%=e.length)?Array.prototype.unshift.apply(e,e.splice(-t,t)):0>t&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,n){goog.asserts.assert(0<=t&&t<e.length),goog.asserts.assert(0<=n&&n<e.length),t=Array.prototype.splice.call(e,t,1),Array.prototype.splice.call(e,n,0,t[0])},goog.array.zip=function(e){if(!arguments.length)return[];for(var t=[],n=arguments[0].length,r=1;r<arguments.length;r++)arguments[r].length<n&&(n=arguments[r].length);for(r=0;r<n;r++){for(var o=[],l=0;l<arguments.length;l++)o.push(arguments[l][r]);t.push(o)}return t},goog.array.shuffle=function(e,t){t=t||Math.random;for(var n=e.length-1;0<n;n--){var r=Math.floor(t()*(n+1)),o=e[n];e[n]=e[r],e[r]=o}},goog.array.copyByIndex=function(e,t){var n=[];return goog.array.forEach(t,function(r){n.push(e[r])}),n},goog.array.concatMap=function(e,t,n){return goog.array.concat.apply([],goog.array.map(e,t,n))},goog.crypt={},goog.crypt.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);255<o&&(t[n++]=255&o,o>>=8),t[n++]=o}return t},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",n=0;n<e.length;n+=8192){var r=goog.array.slice(e,n,n+8192);t+=String.fromCharCode.apply(null,r)}return t},goog.crypt.byteArrayToHex=function(e,t){return goog.array.map(e,function(n){return 1<(n=n.toString(16)).length?n:"0"+n}).join(t||"")},goog.crypt.hexToByteArray=function(e){goog.asserts.assert(e.length%2==0,"Key string length must be multiple of 2");for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substring(n,n+2),16));return t},goog.crypt.stringToUtf8ByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);128>o?t[n++]=o:(2048>o?t[n++]=o>>6|192:((64512&o)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),t[n++]=o>>18|240,t[n++]=o>>12&63|128):t[n++]=o>>12|224,t[n++]=o>>6&63|128),t[n++]=63&o|128)}return t},goog.crypt.utf8ByteArrayToString=function(e){for(var t=[],n=0,r=0;n<e.length;){var o=e[n++];if(128>o)t[r++]=String.fromCharCode(o);else if(191<o&&224>o){var l=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&l)}else if(239<o&&365>o){l=e[n++];var s=e[n++];o=((7&o)<<18|(63&l)<<12|(63&s)<<6|63&e[n++])-65536,t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else l=e[n++],s=e[n++],t[r++]=String.fromCharCode((15&o)<<12|(63&l)<<6|63&s)}return t.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var n=[],r=0;r<e.length;r++)n.push(e[r]^t[r]);return n},goog.string={},goog.string.internal={},goog.string.internal.startsWith=function(e,t){return e.lastIndexOf(t,0)==0},goog.string.internal.endsWith=function(e,t){var n=e.length-t.length;return 0<=n&&e.indexOf(t,n)==n},goog.string.internal.caseInsensitiveStartsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(0,t.length))==0},goog.string.internal.caseInsensitiveEndsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(e.length-t.length,t.length))==0},goog.string.internal.caseInsensitiveEquals=function(e,t){return e.toLowerCase()==t.toLowerCase()},goog.string.internal.isEmptyOrWhitespace=function(e){return/^[\s\xa0]*$/.test(e)},goog.string.internal.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},goog.string.internal.caseInsensitiveCompare=function(e,t){return(e=String(e).toLowerCase())<(t=String(t).toLowerCase())?-1:e==t?0:1},goog.string.internal.newLineToBr=function(e,t){return e.replace(/(\r\n|\r|\n)/g,t?"<br />":"<br>")},goog.string.internal.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.internal.AMP_RE_,"&amp;").replace(goog.string.internal.LT_RE_,"&lt;").replace(goog.string.internal.GT_RE_,"&gt;").replace(goog.string.internal.QUOT_RE_,"&quot;").replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.internal.NULL_RE_,"&#0;");else{if(!goog.string.internal.ALL_RE_.test(e))return e;e.indexOf("&")!=-1&&(e=e.replace(goog.string.internal.AMP_RE_,"&amp;")),e.indexOf("<")!=-1&&(e=e.replace(goog.string.internal.LT_RE_,"&lt;")),e.indexOf(">")!=-1&&(e=e.replace(goog.string.internal.GT_RE_,"&gt;")),e.indexOf('"')!=-1&&(e=e.replace(goog.string.internal.QUOT_RE_,"&quot;")),e.indexOf("'")!=-1&&(e=e.replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;")),e.indexOf("\0")!=-1&&(e=e.replace(goog.string.internal.NULL_RE_,"&#0;"))}return e},goog.string.internal.AMP_RE_=/&/g,goog.string.internal.LT_RE_=/</g,goog.string.internal.GT_RE_=/>/g,goog.string.internal.QUOT_RE_=/"/g,goog.string.internal.SINGLE_QUOTE_RE_=/'/g,goog.string.internal.NULL_RE_=/\x00/g,goog.string.internal.ALL_RE_=/[\x00&<>"']/,goog.string.internal.whitespaceEscape=function(e,t){return goog.string.internal.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.internal.contains=function(e,t){return e.indexOf(t)!=-1},goog.string.internal.caseInsensitiveContains=function(e,t){return goog.string.internal.contains(e.toLowerCase(),t.toLowerCase())},goog.string.internal.compareVersions=function(e,t){var n=0;e=goog.string.internal.trim(String(e)).split("."),t=goog.string.internal.trim(String(t)).split(".");for(var r=Math.max(e.length,t.length),o=0;n==0&&o<r;o++){var l=e[o]||"",s=t[o]||"";do{if(l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],l[0].length==0&&s[0].length==0)break;n=l[1].length==0?0:parseInt(l[1],10);var i=s[1].length==0?0:parseInt(s[1],10);n=goog.string.internal.compareElements_(n,i)||goog.string.internal.compareElements_(l[2].length==0,s[2].length==0)||goog.string.internal.compareElements_(l[2],s[2]),l=l[3],s=s[3]}while(n==0)}return n},goog.string.internal.compareElements_=function(e,t){return e<t?-1:e>t?1:0},goog.string.TypedString=function(){},goog.string.Const=function(e,t){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=e===goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&t||"",this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_},goog.string.Const.prototype.implementsGoogStringTypedString=!0,goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_},goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"},goog.string.Const.unwrap=function(e){return e instanceof goog.string.Const&&e.constructor===goog.string.Const&&e.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_?e.stringConstValueWithSecurityContract__googStringSecurityPrivate_:(goog.asserts.fail("expected object of type Const, got '"+e+"'"),"type_error:Const")},goog.string.Const.from=function(e){return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,e)},goog.string.Const.TYPE_MARKER_={},goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={},goog.string.Const.EMPTY=goog.string.Const.from(""),goog.fs={},goog.fs.url={},goog.fs.url.createObjectUrl=function(e){return goog.fs.url.getUrlObject_().createObjectURL(e)},goog.fs.url.revokeObjectUrl=function(e){goog.fs.url.getUrlObject_().revokeObjectURL(e)},goog.fs.url.getUrlObject_=function(){var e=goog.fs.url.findUrlObject_();if(e!=null)return e;throw Error("This browser doesn't seem to support blob URLs")},goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null},goog.fs.url.browserSupportsObjectUrls=function(){return goog.fs.url.findUrlObject_()!=null},goog.html={},goog.html.trustedtypes={},goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#html"):null,goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||(goog.LOCALE.substring(0,2).toLowerCase()=="ar"||goog.LOCALE.substring(0,2).toLowerCase()=="fa"||goog.LOCALE.substring(0,2).toLowerCase()=="he"||goog.LOCALE.substring(0,2).toLowerCase()=="iw"||goog.LOCALE.substring(0,2).toLowerCase()=="ps"||goog.LOCALE.substring(0,2).toLowerCase()=="sd"||goog.LOCALE.substring(0,2).toLowerCase()=="ug"||goog.LOCALE.substring(0,2).toLowerCase()=="ur"||goog.LOCALE.substring(0,2).toLowerCase()=="yi")&&(goog.LOCALE.length==2||goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")||3<=goog.LOCALE.length&&goog.LOCALE.substring(0,3).toLowerCase()=="ckb"&&(goog.LOCALE.length==3||goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")||7<=goog.LOCALE.length&&(goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")&&(goog.LOCALE.substring(3,7).toLowerCase()=="adlm"||goog.LOCALE.substring(3,7).toLowerCase()=="arab"||goog.LOCALE.substring(3,7).toLowerCase()=="hebr"||goog.LOCALE.substring(3,7).toLowerCase()=="nkoo"||goog.LOCALE.substring(3,7).toLowerCase()=="rohg"||goog.LOCALE.substring(3,7).toLowerCase()=="thaa")||8<=goog.LOCALE.length&&(goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")&&(goog.LOCALE.substring(4,8).toLowerCase()=="adlm"||goog.LOCALE.substring(4,8).toLowerCase()=="arab"||goog.LOCALE.substring(4,8).toLowerCase()=="hebr"||goog.LOCALE.substring(4,8).toLowerCase()=="nkoo"||goog.LOCALE.substring(4,8).toLowerCase()=="rohg"||goog.LOCALE.substring(4,8).toLowerCase()=="thaa"),goog.i18n.bidi.Format={LRE:"\u202A",RLE:"\u202B",PDF:"\u202C",LRM:"\u200E",RLM:"\u200F"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,t){return typeof e=="number"?0<e?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:t?null:goog.i18n.bidi.Dir.NEUTRAL:e==null?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0900-\u1FFF\u200E\u2C00-\uD801\uD804-\uD839\uD83C-\uDBFF\uF900-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",goog.i18n.bidi.rtlChars_="\u0591-\u06EF\u06FA-\u08FF\u200F\uD802-\uD803\uD83A-\uD83B\uFB1D-\uFDFF\uFE70-\uFEFC",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,t){return t?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,t){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,t){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,t){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,t){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,t){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,t){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,t){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInText=function(e,t){return t=(t===void 0?goog.i18n.bidi.hasAnyRtl(e):t)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM,e.replace(goog.i18n.bidi.bracketGuardTextRe_,t+"$&"+t)},goog.i18n.bidi.enforceRtlInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=rtl"):`
35
+ `},goog.loadModule=function(e){var t=goog.moduleLoaderState_;try{if(goog.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:goog.ModuleType.GOOG},goog.isFunction(e))var n=e.call(void 0,{});else{if(!goog.isString(e))throw Error("Invalid module definition");goog.useSafari10Workaround()&&(e=goog.workaroundSafari10EvalBug(e)),n=goog.loadModuleFromSource_.call(void 0,e)}var r=goog.moduleLoaderState_.moduleName;if(!goog.isString(r)||!r)throw Error('Invalid module name "'+r+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(r,n):goog.SEAL_MODULE_EXPORTS&&Object.seal&&typeof n=="object"&&n!=null&&Object.seal(n),goog.loadedModules_[r]={exports:n,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName}}finally{goog.moduleLoaderState_=t}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.normalizePath_=function(e){e=e.split("/");for(var t=0;t<e.length;)e[t]=="."?e.splice(t,1):t&&e[t]==".."&&e[t-1]&&e[t-1]!=".."?e.splice(--t,2):t++;return e.join("/")},goog.loadFileSync_=function(e){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(e);try{var t=new goog.global.XMLHttpRequest;return t.open("get",e,!1),t.send(),t.status==0||t.status==200?t.responseText:null}catch{return null}},goog.transpile_=function(e,t,n){var r=goog.global.$jscomp;r||(goog.global.$jscomp=r={});var i=r.transpile;if(!i){var s=goog.basePath+goog.TRANSPILER,l=goog.loadFileSync_(s);if(l){if(function(){(0,eval)(l+`
36
+ //# sourceURL=`+s)}.call(goog.global),goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=goog.global.$gwtExport.$jscomp.transpile,i=(r=goog.global.$jscomp).transpile}}return i||(i=r.transpile=function(o,c){return goog.logToConsole_(c+" requires transpilation but no transpiler was found."),o}),i(e,t,n)},goog.typeOf=function(e){var t=typeof e;if(t=="object"){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if(n=="[object Window]")return"object";if(n=="[object Array]"||typeof e.length=="number"&&e.splice!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("splice"))return"array";if(n=="[object Function]"||e.call!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("call"))return"function"}else if(t=="function"&&e.call===void 0)return"object";return t},goog.isNull=function(e){return e===null},goog.isDefAndNotNull=function(e){return e!=null},goog.isArray=function(e){return goog.typeOf(e)=="array"},goog.isArrayLike=function(e){var t=goog.typeOf(e);return t=="array"||t=="object"&&typeof e.length=="number"},goog.isDateLike=function(e){return goog.isObject(e)&&typeof e.getFullYear=="function"},goog.isFunction=function(e){return goog.typeOf(e)=="function"},goog.isObject=function(e){var t=typeof e;return t=="object"&&e!=null||t=="function"},goog.getUid=function(e){return e[goog.UID_PROPERTY_]||(e[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(e){return!!e[goog.UID_PROPERTY_]},goog.removeUid=function(e){e!==null&&"removeAttribute"in e&&e.removeAttribute(goog.UID_PROPERTY_);try{delete e[goog.UID_PROPERTY_]}catch{}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(typeof e.clone=="function")return e.clone();for(var n in t=t=="array"?[]:{},e)t[n]=goog.cloneObject(e[n]);return t}return e},goog.bindNative_=function(e,t,n){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,r),e.apply(t,i)}}return function(){return e.apply(t,arguments)}},goog.bind=function(e,t,n){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),e.apply(this,r)}},goog.mixin=function(e,t){for(var n in t)e[n]=t[n]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(e){if(goog.global.execScript)goog.global.execScript(e,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(goog.evalWorksForGlobals_==null){try{goog.global.eval("var _evalTest_ = 1;")}catch{}if(goog.global._evalTest_!==void 0){try{delete goog.global._evalTest_}catch{}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(e);else{var t=goog.global.document,n=t.createElement("SCRIPT");n.type="text/javascript",n.defer=!1,n.appendChild(t.createTextNode(e)),t.head.appendChild(n),t.head.removeChild(n)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(e,t){if(String(e).charAt(0)==".")throw Error('className passed in goog.getCssName must not start with ".". You passed: '+e);var n=function(i){return goog.cssNameMapping_[i]||i},r=function(i){i=i.split("-");for(var s=[],l=0;l<i.length;l++)s.push(n(i[l]));return s.join("-")};return r=goog.cssNameMapping_?goog.cssNameMappingStyle_=="BY_WHOLE"?n:r:function(i){return i},e=t?e+"-"+r(t):r(e),goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(e):e},goog.setCssNameMapping=function(e,t){goog.cssNameMapping_=e,goog.cssNameMappingStyle_=t},goog.getMsg=function(e,t,n){return n&&n.html&&(e=e.replace(/</g,"&lt;")),t&&(e=e.replace(/\{\$([^}]+)}/g,function(r,i){return t!=null&&i in t?t[i]:r})),e},goog.getMsgWithFallback=function(e,t){return e},goog.exportSymbol=function(e,t,n){goog.exportPath_(e,t,n)},goog.exportProperty=function(e,t,n){e[t]=n},goog.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.base=function(r,i,s){for(var l=Array(arguments.length-2),o=2;o<arguments.length;o++)l[o-2]=arguments[o];return t.prototype[i].apply(r,l)}},goog.base=function(e,t,n){var r=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!r)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(r.superClass_!==void 0){for(var i=Array(arguments.length-1),s=1;s<arguments.length;s++)i[s-1]=arguments[s];return r.superClass_.constructor.apply(e,i)}if(typeof t!="string"&&typeof t!="symbol")throw Error("method names provided to goog.base must be a string or a symbol");for(i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];s=!1;for(var l=e.constructor.prototype;l;l=Object.getPrototypeOf(l))if(l[t]===r)s=!0;else if(s)return l[t].apply(e,i);if(e[t]===r)return e.constructor.prototype[t].apply(e,i);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(e){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");e.call(goog.global)},goog.defineClass=function(e,t){var n=t.constructor,r=t.statics;return n&&n!=Object.prototype.constructor||(n=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),n=goog.defineClass.createSealingConstructor_(n,e),e&&goog.inherits(n,e),delete t.constructor,delete t.statics,goog.defineClass.applyProperties_(n.prototype,t),r!=null&&(r instanceof Function?r(n):goog.defineClass.applyProperties_(n,r)),n},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(e,t){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return e;var n=!goog.defineClass.isUnsealable_(t),r=function(){var i=e.apply(this,arguments)||this;return i[goog.UID_PROPERTY_]=i[goog.UID_PROPERTY_],this.constructor===r&&n&&Object.seal instanceof Function&&Object.seal(i),i};return r},goog.defineClass.isUnsealable_=function(e){return e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);for(var r=0;r<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;r++)n=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[r],Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},goog.tagUnsealableClass=function(e){},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.TRUSTED_TYPES_POLICY_NAME="",goog.identity_=function(e){return e},goog.createTrustedTypesPolicy=function(e){var t=null;if(typeof TrustedTypes>"u"||!TrustedTypes.createPolicy)return t;try{t=TrustedTypes.createPolicy(e,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(n){goog.logToConsole_(n.message)}return t},goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;var jspb={BinaryConstants:{},ConstBinaryMessage:function(){},BinaryMessage:function(){}};jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31},jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5},jspb.BinaryConstants.FieldTypeToWireType=function(e){var t=jspb.BinaryConstants.FieldType,n=jspb.BinaryConstants.WireType;switch(e){case t.INT32:case t.INT64:case t.UINT32:case t.UINT64:case t.SINT32:case t.SINT64:case t.BOOL:case t.ENUM:case t.VHASH64:return n.VARINT;case t.DOUBLE:case t.FIXED64:case t.SFIXED64:case t.FHASH64:return n.FIXED64;case t.STRING:case t.MESSAGE:case t.BYTES:return n.DELIMITED;case t.FLOAT:case t.FIXED32:case t.SFIXED32:return n.FIXED32;default:return n.INVALID}},jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1,jspb.BinaryConstants.FLOAT32_EPS=1401298464324817e-60,jspb.BinaryConstants.FLOAT32_MIN=11754943508222875e-54,jspb.BinaryConstants.FLOAT32_MAX=34028234663852886e22,jspb.BinaryConstants.FLOAT64_EPS=5e-324,jspb.BinaryConstants.FLOAT64_MIN=22250738585072014e-324,jspb.BinaryConstants.FLOAT64_MAX=17976931348623157e292,jspb.BinaryConstants.TWO_TO_20=1048576,jspb.BinaryConstants.TWO_TO_23=8388608,jspb.BinaryConstants.TWO_TO_31=2147483648,jspb.BinaryConstants.TWO_TO_32=4294967296,jspb.BinaryConstants.TWO_TO_52=4503599627370496,jspb.BinaryConstants.TWO_TO_63=9223372036854776e3,jspb.BinaryConstants.TWO_TO_64=18446744073709552e3,jspb.BinaryConstants.ZERO_HASH="\0\0\0\0\0\0\0\0",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.debug={},goog.debug.Error=function(e){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(e,t){goog.debug.Error.call(this,goog.asserts.subs_(e,t)),this.messagePattern=e},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(e){throw e},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.subs_=function(e,t){for(var n="",r=(e=e.split("%s")).length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");return n+e[r]},goog.asserts.doAssertFailure_=function(e,t,n,r){var i="Assertion failed";if(n){i+=": "+n;var s=r}else e&&(i+=": "+e,s=t);e=new goog.asserts.AssertionError(""+i,s||[]),goog.asserts.errorHandler_(e)},goog.asserts.setErrorHandler=function(e){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=e)},goog.asserts.assert=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!e&&goog.asserts.doAssertFailure_("",null,t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertExists=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&e==null&&goog.asserts.doAssertFailure_("Expected to exist: %s.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.fail=function(e,t){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(e)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertString=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(e)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertFunction=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(e)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObject=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(e)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertArray=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(e)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertBoolean=function(e,t,n){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(e)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertElement=function(e,t,n){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertInstanceof=function(e,t,n,r){return!goog.asserts.ENABLE_ASSERTS||e instanceof t||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(t),goog.asserts.getType_(e)],n,Array.prototype.slice.call(arguments,3)),e},goog.asserts.assertFinite=function(e,t,n){return!goog.asserts.ENABLE_ASSERTS||typeof e=="number"&&isFinite(e)||goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var e in Object.prototype)goog.asserts.fail(e+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):e===null?"null":typeof e},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=2012<goog.FEATURESET_YEAR,goog.array.peek=function(e){return e[e.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.indexOf.call(e,t,n)}:function(e,t,n){if(n=n==null?0:0>n?Math.max(0,e.length+n):n,goog.isString(e))return goog.isString(t)&&t.length==1?e.indexOf(t,n):-1;for(;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.lastIndexOf.call(e,t,n??e.length-1)}:function(e,t,n){if(0>(n=n??e.length-1)&&(n=Math.max(0,e.length+n)),goog.isString(e))return goog.isString(t)&&t.length==1?e.lastIndexOf(t,n):-1;for(;0<=n;n--)if(n in e&&e[n]===t)return n;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,n){goog.asserts.assert(e.length!=null),Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i=goog.isString(e)?e.split(""):e,s=0;s<r;s++)s in i&&t.call(n,i[s],s,e)},goog.array.forEachRight=function(e,t,n){var r=e.length,i=goog.isString(e)?e.split(""):e;for(--r;0<=r;--r)r in i&&t.call(n,i[r],r,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.filter.call(e,t,n)}:function(e,t,n){for(var r=e.length,i=[],s=0,l=goog.isString(e)?e.split(""):e,o=0;o<r;o++)if(o in l){var c=l[o];t.call(n,c,o,e)&&(i[s++]=c)}return i},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.map.call(e,t,n)}:function(e,t,n){for(var r=e.length,i=Array(r),s=goog.isString(e)?e.split(""):e,l=0;l<r;l++)l in s&&(i[l]=t.call(n,s[l],l,e));return i},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(e,t,n,r){return goog.asserts.assert(e.length!=null),r&&(t=goog.bind(t,r)),Array.prototype.reduce.call(e,t,n)}:function(e,t,n,r){var i=n;return goog.array.forEach(e,function(s,l){i=t.call(r,i,s,l,e)}),i},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(e,t,n,r){return goog.asserts.assert(e.length!=null),goog.asserts.assert(t!=null),r&&(t=goog.bind(t,r)),Array.prototype.reduceRight.call(e,t,n)}:function(e,t,n,r){var i=n;return goog.array.forEachRight(e,function(s,l){i=t.call(r,i,s,l,e)}),i},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.some.call(e,t,n)}:function(e,t,n){for(var r=e.length,i=goog.isString(e)?e.split(""):e,s=0;s<r;s++)if(s in i&&t.call(n,i[s],s,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(e,t,n){return goog.asserts.assert(e.length!=null),Array.prototype.every.call(e,t,n)}:function(e,t,n){for(var r=e.length,i=goog.isString(e)?e.split(""):e,s=0;s<r;s++)if(s in i&&!t.call(n,i[s],s,e))return!1;return!0},goog.array.count=function(e,t,n){var r=0;return goog.array.forEach(e,function(i,s,l){t.call(n,i,s,l)&&++r},n),r},goog.array.find=function(e,t,n){return 0>(t=goog.array.findIndex(e,t,n))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(e,t,n){for(var r=e.length,i=goog.isString(e)?e.split(""):e,s=0;s<r;s++)if(s in i&&t.call(n,i[s],s,e))return s;return-1},goog.array.findRight=function(e,t,n){return 0>(t=goog.array.findIndexRight(e,t,n))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(e,t,n){var r=e.length,i=goog.isString(e)?e.split(""):e;for(--r;0<=r;r--)if(r in i&&t.call(n,i[r],r,e))return r;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return e.length==0},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,n){goog.array.splice(e,n,0,t)},goog.array.insertArrayAt=function(e,t,n){goog.partial(goog.array.splice,e,n,0).apply(null,t)},goog.array.insertBefore=function(e,t,n){var r;arguments.length==2||0>(r=goog.array.indexOf(e,n))?e.push(t):goog.array.insertAt(e,t,r)},goog.array.remove=function(e,t){var n;return(n=0<=(t=goog.array.indexOf(e,t)))&&goog.array.removeAt(e,t),n},goog.array.removeLast=function(e,t){return 0<=(t=goog.array.lastIndexOf(e,t))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAt=function(e,t){return goog.asserts.assert(e.length!=null),Array.prototype.splice.call(e,t,1).length==1},goog.array.removeIf=function(e,t,n){return 0<=(t=goog.array.findIndex(e,t,n))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(e,t,n){var r=0;return goog.array.forEachRight(e,function(i,s){t.call(n,i,s,e)&&goog.array.removeAt(e,s)&&r++}),r},goog.array.concat=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.join=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.toArray=function(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(goog.isArrayLike(r)){var i=e.length||0,s=r.length||0;e.length=i+s;for(var l=0;l<s;l++)e[i+l]=r[l]}else e.push(r)}},goog.array.splice=function(e,t,n,r){return goog.asserts.assert(e.length!=null),Array.prototype.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,t,n){return goog.asserts.assert(e.length!=null),2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,n)},goog.array.removeDuplicates=function(e,t,n){t=t||e;var r=function(c){return goog.isObject(c)?"o"+goog.getUid(c):(typeof c).charAt(0)+c};n=n||r,r={};for(var i=0,s=0;s<e.length;){var l=e[s++],o=n(l);Object.prototype.hasOwnProperty.call(r,o)||(r[o]=!0,t[i++]=l)}t.length=i},goog.array.binarySearch=function(e,t,n){return goog.array.binarySearch_(e,n||goog.array.defaultCompare,!1,t)},goog.array.binarySelect=function(e,t,n){return goog.array.binarySearch_(e,t,!0,void 0,n)},goog.array.binarySearch_=function(e,t,n,r,i){for(var s,l=0,o=e.length;l<o;){var c=l+o>>1,u=n?t.call(i,e[c],c,e):t(r,e[c]);0<u?l=c+1:(o=c,s=!u)}return s?l:~l},goog.array.sort=function(e,t){e.sort(t||goog.array.defaultCompare)},goog.array.stableSort=function(e,t){for(var n=Array(e.length),r=0;r<e.length;r++)n[r]={index:r,value:e[r]};var i=t||goog.array.defaultCompare;for(goog.array.sort(n,function(s,l){return i(s.value,l.value)||s.index-l.index}),r=0;r<e.length;r++)e[r]=n[r].value},goog.array.sortByKey=function(e,t,n){var r=n||goog.array.defaultCompare;goog.array.sort(e,function(i,s){return r(t(i),t(s))})},goog.array.sortObjectsByKey=function(e,t,n){goog.array.sortByKey(e,function(r){return r[t]},n)},goog.array.isSorted=function(e,t,n){t=t||goog.array.defaultCompare;for(var r=1;r<e.length;r++){var i=t(e[r-1],e[r]);if(0<i||i==0&&n)return!1}return!0},goog.array.equals=function(e,t,n){if(!goog.isArrayLike(e)||!goog.isArrayLike(t)||e.length!=t.length)return!1;var r=e.length;n=n||goog.array.defaultCompareEquality;for(var i=0;i<r;i++)if(!n(e[i],t[i]))return!1;return!0},goog.array.compare3=function(e,t,n){n=n||goog.array.defaultCompare;for(var r=Math.min(e.length,t.length),i=0;i<r;i++){var s=n(e[i],t[i]);if(s!=0)return s}return goog.array.defaultCompare(e.length,t.length)},goog.array.defaultCompare=function(e,t){return e>t?1:e<t?-1:0},goog.array.inverseDefaultCompare=function(e,t){return-goog.array.defaultCompare(e,t)},goog.array.defaultCompareEquality=function(e,t){return e===t},goog.array.binaryInsert=function(e,t,n){return 0>(n=goog.array.binarySearch(e,t,n))&&(goog.array.insertAt(e,t,-(n+1)),!0)},goog.array.binaryRemove=function(e,t,n){return 0<=(t=goog.array.binarySearch(e,t,n))&&goog.array.removeAt(e,t)},goog.array.bucket=function(e,t,n){for(var r={},i=0;i<e.length;i++){var s=e[i],l=t.call(n,s,i,e);goog.isDef(l)&&(r[l]||(r[l]=[])).push(s)}return r},goog.array.toObject=function(e,t,n){var r={};return goog.array.forEach(e,function(i,s){r[t.call(n,i,s,e)]=i}),r},goog.array.range=function(e,t,n){var r=[],i=0,s=e;if(t!==void 0&&(i=e,s=t),0>(n=n||1)*(s-i))return[];if(0<n)for(e=i;e<s;e+=n)r.push(e);else for(e=i;e>s;e+=n)r.push(e);return r},goog.array.repeat=function(e,t){for(var n=[],r=0;r<t;r++)n[r]=e;return n},goog.array.flatten=function(e){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(goog.isArray(r))for(var i=0;i<r.length;i+=8192){var s=goog.array.slice(r,i,i+8192);s=goog.array.flatten.apply(null,s);for(var l=0;l<s.length;l++)t.push(s[l])}else t.push(r)}return t},goog.array.rotate=function(e,t){return goog.asserts.assert(e.length!=null),e.length&&(0<(t%=e.length)?Array.prototype.unshift.apply(e,e.splice(-t,t)):0>t&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,n){goog.asserts.assert(0<=t&&t<e.length),goog.asserts.assert(0<=n&&n<e.length),t=Array.prototype.splice.call(e,t,1),Array.prototype.splice.call(e,n,0,t[0])},goog.array.zip=function(e){if(!arguments.length)return[];for(var t=[],n=arguments[0].length,r=1;r<arguments.length;r++)arguments[r].length<n&&(n=arguments[r].length);for(r=0;r<n;r++){for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s][r]);t.push(i)}return t},goog.array.shuffle=function(e,t){t=t||Math.random;for(var n=e.length-1;0<n;n--){var r=Math.floor(t()*(n+1)),i=e[n];e[n]=e[r],e[r]=i}},goog.array.copyByIndex=function(e,t){var n=[];return goog.array.forEach(t,function(r){n.push(e[r])}),n},goog.array.concatMap=function(e,t,n){return goog.array.concat.apply([],goog.array.map(e,t,n))},goog.crypt={},goog.crypt.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);255<i&&(t[n++]=255&i,i>>=8),t[n++]=i}return t},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",n=0;n<e.length;n+=8192){var r=goog.array.slice(e,n,n+8192);t+=String.fromCharCode.apply(null,r)}return t},goog.crypt.byteArrayToHex=function(e,t){return goog.array.map(e,function(n){return 1<(n=n.toString(16)).length?n:"0"+n}).join(t||"")},goog.crypt.hexToByteArray=function(e){goog.asserts.assert(e.length%2==0,"Key string length must be multiple of 2");for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substring(n,n+2),16));return t},goog.crypt.stringToUtf8ByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);128>i?t[n++]=i:(2048>i?t[n++]=i>>6|192:((64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},goog.crypt.utf8ByteArrayToString=function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(128>i)t[r++]=String.fromCharCode(i);else if(191<i&&224>i){var s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(239<i&&365>i){s=e[n++];var l=e[n++];i=((7&i)<<18|(63&s)<<12|(63&l)<<6|63&e[n++])-65536,t[r++]=String.fromCharCode(55296+(i>>10)),t[r++]=String.fromCharCode(56320+(1023&i))}else s=e[n++],l=e[n++],t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&l)}return t.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var n=[],r=0;r<e.length;r++)n.push(e[r]^t[r]);return n},goog.string={},goog.string.internal={},goog.string.internal.startsWith=function(e,t){return e.lastIndexOf(t,0)==0},goog.string.internal.endsWith=function(e,t){var n=e.length-t.length;return 0<=n&&e.indexOf(t,n)==n},goog.string.internal.caseInsensitiveStartsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(0,t.length))==0},goog.string.internal.caseInsensitiveEndsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(e.length-t.length,t.length))==0},goog.string.internal.caseInsensitiveEquals=function(e,t){return e.toLowerCase()==t.toLowerCase()},goog.string.internal.isEmptyOrWhitespace=function(e){return/^[\s\xa0]*$/.test(e)},goog.string.internal.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},goog.string.internal.caseInsensitiveCompare=function(e,t){return(e=String(e).toLowerCase())<(t=String(t).toLowerCase())?-1:e==t?0:1},goog.string.internal.newLineToBr=function(e,t){return e.replace(/(\r\n|\r|\n)/g,t?"<br />":"<br>")},goog.string.internal.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.internal.AMP_RE_,"&amp;").replace(goog.string.internal.LT_RE_,"&lt;").replace(goog.string.internal.GT_RE_,"&gt;").replace(goog.string.internal.QUOT_RE_,"&quot;").replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.internal.NULL_RE_,"&#0;");else{if(!goog.string.internal.ALL_RE_.test(e))return e;e.indexOf("&")!=-1&&(e=e.replace(goog.string.internal.AMP_RE_,"&amp;")),e.indexOf("<")!=-1&&(e=e.replace(goog.string.internal.LT_RE_,"&lt;")),e.indexOf(">")!=-1&&(e=e.replace(goog.string.internal.GT_RE_,"&gt;")),e.indexOf('"')!=-1&&(e=e.replace(goog.string.internal.QUOT_RE_,"&quot;")),e.indexOf("'")!=-1&&(e=e.replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;")),e.indexOf("\0")!=-1&&(e=e.replace(goog.string.internal.NULL_RE_,"&#0;"))}return e},goog.string.internal.AMP_RE_=/&/g,goog.string.internal.LT_RE_=/</g,goog.string.internal.GT_RE_=/>/g,goog.string.internal.QUOT_RE_=/"/g,goog.string.internal.SINGLE_QUOTE_RE_=/'/g,goog.string.internal.NULL_RE_=/\x00/g,goog.string.internal.ALL_RE_=/[\x00&<>"']/,goog.string.internal.whitespaceEscape=function(e,t){return goog.string.internal.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.internal.contains=function(e,t){return e.indexOf(t)!=-1},goog.string.internal.caseInsensitiveContains=function(e,t){return goog.string.internal.contains(e.toLowerCase(),t.toLowerCase())},goog.string.internal.compareVersions=function(e,t){var n=0;e=goog.string.internal.trim(String(e)).split("."),t=goog.string.internal.trim(String(t)).split(".");for(var r=Math.max(e.length,t.length),i=0;n==0&&i<r;i++){var s=e[i]||"",l=t[i]||"";do{if(s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],s[0].length==0&&l[0].length==0)break;n=s[1].length==0?0:parseInt(s[1],10);var o=l[1].length==0?0:parseInt(l[1],10);n=goog.string.internal.compareElements_(n,o)||goog.string.internal.compareElements_(s[2].length==0,l[2].length==0)||goog.string.internal.compareElements_(s[2],l[2]),s=s[3],l=l[3]}while(n==0)}return n},goog.string.internal.compareElements_=function(e,t){return e<t?-1:e>t?1:0},goog.string.TypedString=function(){},goog.string.Const=function(e,t){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=e===goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&t||"",this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_},goog.string.Const.prototype.implementsGoogStringTypedString=!0,goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_},goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"},goog.string.Const.unwrap=function(e){return e instanceof goog.string.Const&&e.constructor===goog.string.Const&&e.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_?e.stringConstValueWithSecurityContract__googStringSecurityPrivate_:(goog.asserts.fail("expected object of type Const, got '"+e+"'"),"type_error:Const")},goog.string.Const.from=function(e){return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,e)},goog.string.Const.TYPE_MARKER_={},goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={},goog.string.Const.EMPTY=goog.string.Const.from(""),goog.fs={},goog.fs.url={},goog.fs.url.createObjectUrl=function(e){return goog.fs.url.getUrlObject_().createObjectURL(e)},goog.fs.url.revokeObjectUrl=function(e){goog.fs.url.getUrlObject_().revokeObjectURL(e)},goog.fs.url.getUrlObject_=function(){var e=goog.fs.url.findUrlObject_();if(e!=null)return e;throw Error("This browser doesn't seem to support blob URLs")},goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null},goog.fs.url.browserSupportsObjectUrls=function(){return goog.fs.url.findUrlObject_()!=null},goog.html={},goog.html.trustedtypes={},goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#html"):null,goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||(goog.LOCALE.substring(0,2).toLowerCase()=="ar"||goog.LOCALE.substring(0,2).toLowerCase()=="fa"||goog.LOCALE.substring(0,2).toLowerCase()=="he"||goog.LOCALE.substring(0,2).toLowerCase()=="iw"||goog.LOCALE.substring(0,2).toLowerCase()=="ps"||goog.LOCALE.substring(0,2).toLowerCase()=="sd"||goog.LOCALE.substring(0,2).toLowerCase()=="ug"||goog.LOCALE.substring(0,2).toLowerCase()=="ur"||goog.LOCALE.substring(0,2).toLowerCase()=="yi")&&(goog.LOCALE.length==2||goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")||3<=goog.LOCALE.length&&goog.LOCALE.substring(0,3).toLowerCase()=="ckb"&&(goog.LOCALE.length==3||goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")||7<=goog.LOCALE.length&&(goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")&&(goog.LOCALE.substring(3,7).toLowerCase()=="adlm"||goog.LOCALE.substring(3,7).toLowerCase()=="arab"||goog.LOCALE.substring(3,7).toLowerCase()=="hebr"||goog.LOCALE.substring(3,7).toLowerCase()=="nkoo"||goog.LOCALE.substring(3,7).toLowerCase()=="rohg"||goog.LOCALE.substring(3,7).toLowerCase()=="thaa")||8<=goog.LOCALE.length&&(goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")&&(goog.LOCALE.substring(4,8).toLowerCase()=="adlm"||goog.LOCALE.substring(4,8).toLowerCase()=="arab"||goog.LOCALE.substring(4,8).toLowerCase()=="hebr"||goog.LOCALE.substring(4,8).toLowerCase()=="nkoo"||goog.LOCALE.substring(4,8).toLowerCase()=="rohg"||goog.LOCALE.substring(4,8).toLowerCase()=="thaa"),goog.i18n.bidi.Format={LRE:"‪",RLE:"‫",PDF:"‬",LRM:"‎",RLM:"‏"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,t){return typeof e=="number"?0<e?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:t?null:goog.i18n.bidi.Dir.NEUTRAL:e==null?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ऀ-῿‎Ⰰ-\uD801\uD804-\uD839\uD83C-\uDBFF豈-﬜︀-﹯﻽-￿",goog.i18n.bidi.rtlChars_="֑-ۯۺ-ࣿ‏\uD802-\uD803\uD83A-\uD83Bיִ-﷿ﹰ-ﻼ",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,t){return t?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,t){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,t){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,t){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,t){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,t){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,t){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,t){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInText=function(e,t){return t=(t===void 0?goog.i18n.bidi.hasAnyRtl(e):t)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM,e.replace(goog.i18n.bidi.bracketGuardTextRe_,t+"$&"+t)},goog.i18n.bidi.enforceRtlInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=rtl"):`
32
37
  <span dir=rtl>`+e+"</span>"},goog.i18n.bidi.enforceRtlInText=function(e){return goog.i18n.bidi.Format.RLE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.enforceLtrInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=ltr"):`
33
- <span dir=ltr>`+e+"</span>"},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05F4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05F3")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,t){var n=0,r=0,o=!1;for(e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t).split(goog.i18n.bidi.wordSeparatorRe_),t=0;t<e.length;t++){var l=e[t];goog.i18n.bidi.startsWithRtl(l)?(n++,r++):goog.i18n.bidi.isRequiredLtrRe_.test(l)?o=!0:goog.i18n.bidi.hasAnyLtr(l)?r++:goog.i18n.bidi.hasNumeralsRe_.test(l)&&(o=!0)}return r==0?o?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:n/r>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,t){return goog.i18n.bidi.estimateDirection(e,t)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,t){e&&(t=goog.i18n.bidi.toDir(t))&&(e.style.textAlign=t==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=t==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.setElementDirByTextDirectionality=function(e,t){switch(goog.i18n.bidi.estimateDirection(t)){case goog.i18n.bidi.Dir.LTR:e.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:e.dir="rtl";break;default:e.removeAttribute("dir")}},goog.i18n.bidi.DirectionalString=function(){},goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.trustedURL_=null,this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.html.TrustedResourceUrl.prototype.cloneWithParams=function(e,t){var n=goog.html.TrustedResourceUrl.unwrap(this),r=(n=goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(n))[3]||"";return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(n[1]+goog.html.TrustedResourceUrl.stringifyParams_("?",n[2]||"",e)+goog.html.TrustedResourceUrl.stringifyParams_("#",r,t))},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(e).toString()},goog.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.unwrapTrustedURL=function(e){return e.trustedURL_?e.trustedURL_:goog.html.TrustedResourceUrl.unwrap(e)},goog.html.TrustedResourceUrl.format=function(e,t){var n=goog.string.Const.unwrap(e);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return e=n.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,function(r,o){if(!Object.prototype.hasOwnProperty.call(t,o))throw Error('Found marker, "'+o+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return(r=t[o])instanceof goog.string.Const?goog.string.Const.unwrap(r):encodeURIComponent(String(r))}),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g,goog.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,goog.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,goog.html.TrustedResourceUrl.formatWithParams=function(e,t,n,r){return goog.html.TrustedResourceUrl.format(e,t).cloneWithParams(n,r)},goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.fromConstants=function(e){for(var t="",n=0;n<e.length;n++)t+=goog.string.Const.unwrap(e[n]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.TrustedResourceUrl;return t.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(e):e,goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY&&(t.trustedURL_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e)),t},goog.html.TrustedResourceUrl.stringifyParams_=function(e,t,n){if(n==null)return t;if(goog.isString(n))return n?e+encodeURIComponent(n):"";for(var r in n){var o=n[r];o=goog.isArray(o)?o:[o];for(var l=0;l<o.length;l++){var s=o[l];s!=null&&(t||(t=e),t+=(t.length>e.length?"&":"")+encodeURIComponent(r)+"="+encodeURIComponent(String(s)))}}return t},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return goog.html.SafeUrl.unwrapTrustedURL(e).toString()},goog.html.SafeUrl.unwrapTrustedURL=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeUrlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,goog.html.SafeUrl.isSafeMimeType=function(e){return goog.html.SAFE_MIME_TYPE_PATTERN_.test(e)},goog.html.SafeUrl.fromBlob=function(e){return e=goog.html.SAFE_MIME_TYPE_PATTERN_.test(e.type)?goog.fs.url.createObjectUrl(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.DATA_URL_PATTERN_=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i,goog.html.SafeUrl.fromDataUrl=function(e){var t=(e=e.replace(/(%0A|%0D)/g,"")).match(goog.html.DATA_URL_PATTERN_);return t=t&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(t[1]),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t?e:goog.html.SafeUrl.INNOCUOUS_STRING)},goog.html.SafeUrl.fromTelUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"tel:")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i,goog.html.SafeUrl.fromSipUrl=function(e){return goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(e))||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromFacebookMessengerUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"fb-messenger://share")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromWhatsAppUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"whatsapp://send")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromSmsUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"sms:")&&goog.html.SafeUrl.isSmsUrlBodyValid_(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.isSmsUrlBodyValid_=function(e){var t=e.indexOf("#");if(0<t&&(e=e.substring(0,t)),!(t=e.match(/[?&]body=/gi)))return!0;if(1<t.length)return!1;if(!(e=e.match(/[?&]body=([^&]*)/)[1]))return!0;try{decodeURIComponent(e)}catch{return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(e)},goog.html.SafeUrl.fromSshUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"ssh://")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.sanitizeChromeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeEdgeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeExtensionUrl_=function(e,t,n){return(e=e.exec(t))?(e=e[1],(n instanceof goog.string.Const?[goog.string.Const.unwrap(n)]:n.map(function(r){return goog.string.Const.unwrap(r)})).indexOf(e)==-1&&(t=goog.html.SafeUrl.INNOCUOUS_STRING)):t=goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeUrl.fromTrustedResourceUrl=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(e))},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,goog.html.SafeUrl.SAFE_URL_PATTERN=goog.html.SAFE_URL_PATTERN_,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SAFE_URL_PATTERN_.test(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.sanitizeAssertUnchanged=function(e,t){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),t&&/^data:/i.test(e)&&(t=goog.html.SafeUrl.fromDataUrl(e)).getTypedStringValue()==e?t:(goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(e),"%s does not match the safe URL pattern",e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)))},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeUrl;return t.privateDoNotAccessOrElseSafeUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e):e,t},goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"),goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="",this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyle.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyle.EMPTY:(goog.asserts.assert(goog.string.internal.endsWith(e,";"),"Last character of style string is not ';': "+e),goog.asserts.assert(goog.string.internal.contains(e,":"),`Style string must contain at least one ':', to specify a "name: value" pair: `+e),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyle().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,this},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var t,n="";for(t in e){if(!/^[-_a-zA-Z0-9]+$/.test(t))throw Error("Name allows only [-_a-zA-Z0-9], got: "+t);var r=e[t];r!=null&&(n+=t+":"+(r=goog.isArray(r)?goog.array.map(r,goog.html.SafeStyle.sanitizePropertyValue_).join(" "):goog.html.SafeStyle.sanitizePropertyValue_(r))+";")}return n?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(n):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.sanitizePropertyValue_=function(e){if(e instanceof goog.html.SafeUrl)return'url("'+goog.html.SafeUrl.unwrap(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';if(e=e instanceof goog.string.Const?goog.string.Const.unwrap(e):goog.html.SafeStyle.sanitizePropertyValueString_(String(e)),/[{;}]/.test(e))throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.",[e]);return e},goog.html.SafeStyle.sanitizePropertyValueString_=function(e){var t=e.replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.URL_RE_,"url");return goog.html.SafeStyle.VALUE_RE_.test(t)?goog.html.SafeStyle.COMMENT_RE_.test(e)?(goog.asserts.fail("String value disallows comments, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):goog.html.SafeStyle.hasBalancedQuotes_(e)?goog.html.SafeStyle.hasBalancedSquareBrackets_(e)?goog.html.SafeStyle.sanitizeUrl_(e):(goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value requires balanced quotes, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value allows only "+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING)},goog.html.SafeStyle.hasBalancedQuotes_=function(e){for(var t=!0,n=!0,r=0;r<e.length;r++){var o=e.charAt(r);o=="'"&&n?t=!t:o=='"'&&t&&(n=!n)}return t&&n},goog.html.SafeStyle.hasBalancedSquareBrackets_=function(e){for(var t=!0,n=/^[-_a-zA-Z0-9]$/,r=0;r<e.length;r++){var o=e.charAt(r);if(o=="]"){if(t)return!1;t=!0}else if(o=="["){if(!t)return!1;t=!1}else if(!t&&!n.test(o))return!1}return t},goog.html.SafeStyle.VALUE_ALLOWED_CHARS_=`[-,."'%_!# a-zA-Z0-9\\[\\]]`,goog.html.SafeStyle.VALUE_RE_=new RegExp("^"+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$"),goog.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g,goog.html.SafeStyle.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g,goog.html.SafeStyle.COMMENT_RE_=/\/\*/,goog.html.SafeStyle.sanitizeUrl_=function(e){return e.replace(goog.html.SafeStyle.URL_RE_,function(t,n,r,o){var l="";return r=r.replace(/^(['"])(.*)\1$/,function(s,i,c){return l=i,c}),t=goog.html.SafeUrl.sanitize(r).getTypedStringValue(),n+l+t+l+o})},goog.html.SafeStyle.concat=function(e){var t="",n=function(r){goog.isArray(r)?goog.array.forEach(r,n):t+=goog.html.SafeStyle.unwrap(r)};return goog.array.forEach(arguments,n),t?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t):goog.html.SafeStyle.EMPTY},goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="",this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0,goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeScript.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeScript.fromConstantAndArgs=function(e,t){for(var n=[],r=1;r<arguments.length;r++)n.push(goog.html.SafeScript.stringify_(arguments[r]));return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+goog.string.Const.unwrap(e)+")("+n.join(", ")+");")},goog.html.SafeScript.fromJson=function(e){return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(e))},goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"}),goog.html.SafeScript.unwrap=function(e){return goog.html.SafeScript.unwrapTrustedScript(e).toString()},goog.html.SafeScript.unwrapTrustedScript=function(e){return e instanceof goog.html.SafeScript&&e.constructor===goog.html.SafeScript&&e.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeScriptWrappedValue_:(goog.asserts.fail("expected object of type SafeScript, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeScript")},goog.html.SafeScript.stringify_=function(e){return JSON.stringify(e).replace(/</g,"\\x3c")},goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeScript().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(e):e,this},goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(""),goog.object={},goog.object.is=function(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t},goog.object.forEach=function(e,t,n){for(var r in e)t.call(n,e[r],r,e)},goog.object.filter=function(e,t,n){var r,o={};for(r in e)t.call(n,e[r],r,e)&&(o[r]=e[r]);return o},goog.object.map=function(e,t,n){var r,o={};for(r in e)o[r]=t.call(n,e[r],r,e);return o},goog.object.some=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return!0;return!1},goog.object.every=function(e,t,n){for(var r in e)if(!t.call(n,e[r],r,e))return!1;return!0},goog.object.getCount=function(e){var t,n=0;for(t in e)n++;return n},goog.object.getAnyKey=function(e){for(var t in e)return t},goog.object.getAnyValue=function(e){for(var t in e)return e[t]},goog.object.contains=function(e,t){return goog.object.containsValue(e,t)},goog.object.getValues=function(e){var t,n=[],r=0;for(t in e)n[r++]=e[t];return n},goog.object.getKeys=function(e){var t,n=[],r=0;for(t in e)n[r++]=t;return n},goog.object.getValueByKeys=function(e,t){var n=goog.isArrayLike(t),r=n?t:arguments;for(n=n?0:1;n<r.length;n++){if(e==null)return;e=e[r[n]]}return e},goog.object.containsKey=function(e,t){return e!==null&&t in e},goog.object.containsValue=function(e,t){for(var n in e)if(e[n]==t)return!0;return!1},goog.object.findKey=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},goog.object.findValue=function(e,t,n){return(t=goog.object.findKey(e,t,n))&&e[t]},goog.object.isEmpty=function(e){for(var t in e)return!1;return!0},goog.object.clear=function(e){for(var t in e)delete e[t]},goog.object.remove=function(e,t){var n;return(n=t in e)&&delete e[t],n},goog.object.add=function(e,t,n){if(e!==null&&t in e)throw Error('The object already contains the key "'+t+'"');goog.object.set(e,t,n)},goog.object.get=function(e,t,n){return e!==null&&t in e?e[t]:n},goog.object.set=function(e,t,n){e[t]=n},goog.object.setIfUndefined=function(e,t,n){return t in e?e[t]:e[t]=n},goog.object.setWithReturnValueIfNotSet=function(e,t,n){return t in e?e[t]:(n=n(),e[t]=n)},goog.object.equals=function(e,t){for(var n in e)if(!(n in t)||e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0},goog.object.clone=function(e){var t,n={};for(t in e)n[t]=e[t];return n},goog.object.unsafeClone=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(goog.isFunction(e.clone))return e.clone();for(var n in t=t=="array"?[]:{},e)t[n]=goog.object.unsafeClone(e[n]);return t}return e},goog.object.transpose=function(e){var t,n={};for(t in e)n[e[t]]=t;return n},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(e,t){for(var n,r,o=1;o<arguments.length;o++){for(n in r=arguments[o])e[n]=r[n];for(var l=0;l<goog.object.PROTOTYPE_FIELDS_.length;l++)n=goog.object.PROTOTYPE_FIELDS_[l],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}},goog.object.create=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(t%2)throw Error("Uneven number of arguments");for(var n={},r=0;r<t;r+=2)n[arguments[r]]=arguments[r+1];return n},goog.object.createSet=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var n={},r=0;r<t;r++)n[arguments[r]]=!0;return n},goog.object.createImmutableView=function(e){var t=e;return Object.isFrozen&&!Object.isFrozen(e)&&(t=Object.create(e),Object.freeze(t)),t},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.object.getAllPropertyNames=function(e,t,n){if(!e)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return goog.object.getKeys(e);for(var r={};e&&(e!==Object.prototype||t)&&(e!==Function.prototype||n);){for(var o=Object.getOwnPropertyNames(e),l=0;l<o.length;l++)r[o[l]]=!0;e=Object.getPrototypeOf(e)}return goog.object.getKeys(r)},goog.object.getSuperClass=function(e){return(e=Object.getPrototypeOf(e.prototype))&&e.constructor},goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="",this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyleSheet.createRule=function(e,t){if(goog.string.internal.contains(e,"<"))throw Error("Selector does not allow '<', got: "+e);var n=e.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(n))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+e);if(!goog.html.SafeStyleSheet.hasBalancedBrackets_(n))throw Error("() and [] in selector must be balanced, got: "+e);return t instanceof goog.html.SafeStyle||(t=goog.html.SafeStyle.create(t)),e=e+"{"+goog.html.SafeStyle.unwrap(t).replace(/</g,"\\3C ")+"}",goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeStyleSheet.hasBalancedBrackets_=function(e){for(var t={"(":")","[":"]"},n=[],r=0;r<e.length;r++){var o=e[r];if(t[o])n.push(t[o]);else if(goog.object.contains(t,o)&&n.pop()!=o)return!1}return n.length==0},goog.html.SafeStyleSheet.concat=function(e){var t="",n=function(r){goog.isArray(r)?goog.array.forEach(r,n):t+=goog.html.SafeStyleSheet.unwrap(r)};return goog.array.forEach(arguments,n),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeStyleSheet.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyleSheet.EMPTY:(goog.asserts.assert(!goog.string.internal.contains(e,"<"),"Forbidden '<' character in style sheet string: "+e),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_},goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"}),goog.html.SafeStyleSheet.unwrap=function(e){return e instanceof goog.html.SafeStyleSheet&&e.constructor===goog.html.SafeStyleSheet&&e.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(goog.asserts.fail("expected object of type SafeStyleSheet, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyleSheet")},goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyleSheet().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=e,this},goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(""),goog.dom.tags={},goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},goog.dom.tags.isVoidTag=function(e){return goog.dom.tags.VOID_TAGS_[e]===!0},goog.dom.HtmlElement=function(){},goog.dom.TagName=function(e){this.tagName_=e},goog.dom.TagName.prototype.toString=function(){return this.tagName_},goog.dom.TagName.A=new goog.dom.TagName("A"),goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR"),goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM"),goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS"),goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET"),goog.dom.TagName.AREA=new goog.dom.TagName("AREA"),goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE"),goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE"),goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO"),goog.dom.TagName.B=new goog.dom.TagName("B"),goog.dom.TagName.BASE=new goog.dom.TagName("BASE"),goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT"),goog.dom.TagName.BDI=new goog.dom.TagName("BDI"),goog.dom.TagName.BDO=new goog.dom.TagName("BDO"),goog.dom.TagName.BIG=new goog.dom.TagName("BIG"),goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE"),goog.dom.TagName.BODY=new goog.dom.TagName("BODY"),goog.dom.TagName.BR=new goog.dom.TagName("BR"),goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON"),goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS"),goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION"),goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER"),goog.dom.TagName.CITE=new goog.dom.TagName("CITE"),goog.dom.TagName.CODE=new goog.dom.TagName("CODE"),goog.dom.TagName.COL=new goog.dom.TagName("COL"),goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP"),goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND"),goog.dom.TagName.DATA=new goog.dom.TagName("DATA"),goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST"),goog.dom.TagName.DD=new goog.dom.TagName("DD"),goog.dom.TagName.DEL=new goog.dom.TagName("DEL"),goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS"),goog.dom.TagName.DFN=new goog.dom.TagName("DFN"),goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG"),goog.dom.TagName.DIR=new goog.dom.TagName("DIR"),goog.dom.TagName.DIV=new goog.dom.TagName("DIV"),goog.dom.TagName.DL=new goog.dom.TagName("DL"),goog.dom.TagName.DT=new goog.dom.TagName("DT"),goog.dom.TagName.EM=new goog.dom.TagName("EM"),goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED"),goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET"),goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION"),goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE"),goog.dom.TagName.FONT=new goog.dom.TagName("FONT"),goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER"),goog.dom.TagName.FORM=new goog.dom.TagName("FORM"),goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME"),goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET"),goog.dom.TagName.H1=new goog.dom.TagName("H1"),goog.dom.TagName.H2=new goog.dom.TagName("H2"),goog.dom.TagName.H3=new goog.dom.TagName("H3"),goog.dom.TagName.H4=new goog.dom.TagName("H4"),goog.dom.TagName.H5=new goog.dom.TagName("H5"),goog.dom.TagName.H6=new goog.dom.TagName("H6"),goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD"),goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER"),goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP"),goog.dom.TagName.HR=new goog.dom.TagName("HR"),goog.dom.TagName.HTML=new goog.dom.TagName("HTML"),goog.dom.TagName.I=new goog.dom.TagName("I"),goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME"),goog.dom.TagName.IMG=new goog.dom.TagName("IMG"),goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT"),goog.dom.TagName.INS=new goog.dom.TagName("INS"),goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX"),goog.dom.TagName.KBD=new goog.dom.TagName("KBD"),goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN"),goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL"),goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND"),goog.dom.TagName.LI=new goog.dom.TagName("LI"),goog.dom.TagName.LINK=new goog.dom.TagName("LINK"),goog.dom.TagName.MAIN=new goog.dom.TagName("MAIN"),goog.dom.TagName.MAP=new goog.dom.TagName("MAP"),goog.dom.TagName.MARK=new goog.dom.TagName("MARK"),goog.dom.TagName.MATH=new goog.dom.TagName("MATH"),goog.dom.TagName.MENU=new goog.dom.TagName("MENU"),goog.dom.TagName.MENUITEM=new goog.dom.TagName("MENUITEM"),goog.dom.TagName.META=new goog.dom.TagName("META"),goog.dom.TagName.METER=new goog.dom.TagName("METER"),goog.dom.TagName.NAV=new goog.dom.TagName("NAV"),goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES"),goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT"),goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT"),goog.dom.TagName.OL=new goog.dom.TagName("OL"),goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP"),goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION"),goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT"),goog.dom.TagName.P=new goog.dom.TagName("P"),goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM"),goog.dom.TagName.PICTURE=new goog.dom.TagName("PICTURE"),goog.dom.TagName.PRE=new goog.dom.TagName("PRE"),goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS"),goog.dom.TagName.Q=new goog.dom.TagName("Q"),goog.dom.TagName.RP=new goog.dom.TagName("RP"),goog.dom.TagName.RT=new goog.dom.TagName("RT"),goog.dom.TagName.RTC=new goog.dom.TagName("RTC"),goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY"),goog.dom.TagName.S=new goog.dom.TagName("S"),goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP"),goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT"),goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION"),goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT"),goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL"),goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE"),goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN"),goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE"),goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG"),goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE"),goog.dom.TagName.SUB=new goog.dom.TagName("SUB"),goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY"),goog.dom.TagName.SUP=new goog.dom.TagName("SUP"),goog.dom.TagName.SVG=new goog.dom.TagName("SVG"),goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE"),goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY"),goog.dom.TagName.TD=new goog.dom.TagName("TD"),goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE"),goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA"),goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT"),goog.dom.TagName.TH=new goog.dom.TagName("TH"),goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD"),goog.dom.TagName.TIME=new goog.dom.TagName("TIME"),goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE"),goog.dom.TagName.TR=new goog.dom.TagName("TR"),goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK"),goog.dom.TagName.TT=new goog.dom.TagName("TT"),goog.dom.TagName.U=new goog.dom.TagName("U"),goog.dom.TagName.UL=new goog.dom.TagName("UL"),goog.dom.TagName.VAR=new goog.dom.TagName("VAR"),goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO"),goog.dom.TagName.WBR=new goog.dom.TagName("WBR"),goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.contains(t,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.caseInsensitiveContains(t,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var t,n=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,r=[];t=n.exec(e);)r.push([t[1],t[2],t[3]||void 0]);return r},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdgeHtml_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchEdgeChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("Edg/")},goog.labs.userAgent.browser.matchOperaChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")||goog.labs.userAgent.util.matchUserAgent("FxiOS")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdgeHtml_()||goog.labs.userAgent.browser.matchEdgeChromium_()||goog.labs.userAgent.browser.matchOperaChromium_()||goog.labs.userAgent.browser.matchFirefox_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&!goog.labs.userAgent.browser.matchFirefox_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdgeHtml_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdgeHtml_,goog.labs.userAgent.browser.isEdgeChromium=goog.labs.userAgent.browser.matchEdgeChromium_,goog.labs.userAgent.browser.isOperaChromium=goog.labs.userAgent.browser.matchOperaChromium_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(o){return o=goog.array.find(o,r),n[o]||""}var t=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(t);t=goog.labs.userAgent.util.extractVersionTuples(t);var n={};goog.array.forEach(t,function(o){n[o[0]]=o[1]});var r=goog.partial(goog.object.containsKey,n);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?e(["Edge"]):goog.labs.userAgent.browser.isEdgeChromium()?e(["Edg"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(t=t[2])&&t[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var t=/rv: *([\d\.]*)/.exec(e);if(t&&t[1])return t[1];t="";var n=/MSIE +([\d\.]+)/.exec(e);if(n&&n[1])if(e=/Trident\/(\d.\d)/.exec(e),n[1]=="7.0")if(e&&e[1])switch(e[1]){case"4.0":t="8.0";break;case"5.0":t="9.0";break;case"6.0":t="10.0";break;case"7.0":t="11.0"}else t="7.0";else t=n[1];return t},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return goog.html.SafeHtml.unwrapTrustedHTML(e).toString()},goog.html.SafeHtml.unwrapTrustedHTML=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var t=typeof e=="object",n=null;return t&&e.implementsGoogI18nBidiDirectionalString&&(n=e.getDirection()),e=t&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(e),n)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.html.SafeHtml.create=function(e,t,n){return goog.html.SafeHtml.verifyTagName(String(e)),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(e),t,n)},goog.html.SafeHtml.verifyTagName=function(e){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.")},goog.html.SafeHtml.createIframe=function(e,t,n,r){e&&goog.html.TrustedResourceUrl.unwrap(e);var o={};return o.src=e||null,o.srcdoc=t&&goog.html.SafeHtml.unwrap(t),e=goog.html.SafeHtml.combineAttributes(o,{sandbox:""},n),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,r)},goog.html.SafeHtml.createSandboxIframe=function(e,t,n,r){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var o={};return o.src=e?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)):null,o.srcdoc=t||null,o.sandbox="",e=goog.html.SafeHtml.combineAttributes(o,{},n),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,r)},goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype},goog.html.SafeHtml.createScriptSrc=function(e,t){return goog.html.TrustedResourceUrl.unwrap(e),e=goog.html.SafeHtml.combineAttributes({src:e},{},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",e)},goog.html.SafeHtml.createScript=function(e,t){for(var n in t){var r=n.toLowerCase();if(r=="language"||r=="src"||r=="text"||r=="type")throw Error('Cannot set "'+r+'" attribute')}for(n="",e=goog.array.concat(e),r=0;r<e.length;r++)n+=goog.html.SafeScript.unwrap(e[r]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",t,e)},goog.html.SafeHtml.createStyle=function(e,t){t=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},t);var n="";e=goog.array.concat(e);for(var r=0;r<e.length;r++)n+=goog.html.SafeStyleSheet.unwrap(e[r]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",t,e)},goog.html.SafeHtml.createMetaRefresh=function(e,t){return e=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)),(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.internal.contains(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(t||0)+"; url="+e})},goog.html.SafeHtml.getAttrNameAndValue_=function(e,t,n){if(n instanceof goog.string.Const)n=goog.string.Const.unwrap(n);else if(t.toLowerCase()=="style")n=goog.html.SafeHtml.getStyleValue_(n);else{if(/^on/i.test(t))throw Error('Attribute "'+t+'" requires goog.string.Const value, "'+n+'" given.');if(t.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(n instanceof goog.html.TrustedResourceUrl)n=goog.html.TrustedResourceUrl.unwrap(n);else if(n instanceof goog.html.SafeUrl)n=goog.html.SafeUrl.unwrap(n);else{if(!goog.isString(n))throw Error('Attribute "'+t+'" on tag "'+e+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+n+'" given.');n=goog.html.SafeUrl.sanitize(n).getTypedStringValue()}}return n.implementsGoogStringTypedString&&(n=n.getTypedStringValue()),goog.asserts.assert(goog.isString(n)||goog.isNumber(n),"String or number value expected, got "+typeof n+" with value: "+n),t+'="'+goog.string.internal.htmlEscape(String(n))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,t,n,r){return(t=goog.html.SafeHtml.create(t,n,r)).dir_=e,t},goog.html.SafeHtml.join=function(e,t){var n=(e=goog.html.SafeHtml.htmlEscape(e)).getDirection(),r=[],o=function(l){goog.isArray(l)?goog.array.forEach(l,o):(l=goog.html.SafeHtml.htmlEscape(l),r.push(goog.html.SafeHtml.unwrap(l)),l=l.getDirection(),n==goog.i18n.bidi.Dir.NEUTRAL?n=l:l!=goog.i18n.bidi.Dir.NEUTRAL&&n!=l&&(n=null))};return goog.array.forEach(t,o),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r.join(goog.html.SafeHtml.unwrap(e)),n)},goog.html.SafeHtml.concat=function(e){return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))},goog.html.SafeHtml.concatWithDir=function(e,t){var n=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return n.dir_=e,n},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,t){return new goog.html.SafeHtml().initSecurityPrivateDoNotAccessOrElse_(e,t)},goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e,t){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(e):e,this.dir_=t,this},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,t,n){var r=null,o="<"+e+goog.html.SafeHtml.stringifyAttributes(e,t);return goog.isDefAndNotNull(n)?goog.isArray(n)||(n=[n]):n=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!n.length,"Void tag <"+e+"> does not allow content."),o+=">"):(r=goog.html.SafeHtml.concat(n),o+=">"+goog.html.SafeHtml.unwrap(r)+"</"+e+">",r=r.getDirection()),(e=t&&t.dir)&&(r=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(o,r)},goog.html.SafeHtml.stringifyAttributes=function(e,t){var n="";if(t)for(var r in t){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(r))throw Error('Invalid attribute name "'+r+'".');var o=t[r];goog.isDefAndNotNull(o)&&(n+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,r,o))}return n},goog.html.SafeHtml.combineAttributes=function(e,t,n){var r,o={};for(r in e)goog.asserts.assert(r.toLowerCase()==r,"Must be lower case"),o[r]=e[r];for(r in t)goog.asserts.assert(r.toLowerCase()==r,"Must be lower case"),o[r]=t[r];for(r in n){var l=r.toLowerCase();if(l in e)throw Error('Cannot override "'+l+'" attribute, got "'+r+'" with value "'+n[r]+'"');l in t&&delete o[l],o[r]=n[r]}return o},goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.uncheckedconversions={},goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(e,t,n){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,n||null)},goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.dom.asserts={},goog.dom.asserts.assertIsLocation=function(e){if(goog.asserts.ENABLE_ASSERTS){var t=goog.dom.asserts.getWindow_(e);t&&(!e||!(e instanceof t.Location)&&e instanceof t.Element)&&goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",goog.dom.asserts.debugStringForType_(e))}return e},goog.dom.asserts.assertIsElementType_=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var n=goog.dom.asserts.getWindow_(e);n&&n[t]!==void 0&&(e&&(e instanceof n[t]||!(e instanceof n.Location||e instanceof n.Element))||goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,goog.dom.asserts.debugStringForType_(e)))}return e},goog.dom.asserts.assertIsHTMLAnchorElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAnchorElement")},goog.dom.asserts.assertIsHTMLButtonElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLButtonElement")},goog.dom.asserts.assertIsHTMLLinkElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLLinkElement")},goog.dom.asserts.assertIsHTMLImageElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLImageElement")},goog.dom.asserts.assertIsHTMLAudioElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAudioElement")},goog.dom.asserts.assertIsHTMLVideoElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLVideoElement")},goog.dom.asserts.assertIsHTMLInputElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLInputElement")},goog.dom.asserts.assertIsHTMLTextAreaElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLTextAreaElement")},goog.dom.asserts.assertIsHTMLCanvasElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLCanvasElement")},goog.dom.asserts.assertIsHTMLEmbedElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLEmbedElement")},goog.dom.asserts.assertIsHTMLFormElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFormElement")},goog.dom.asserts.assertIsHTMLFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFrameElement")},goog.dom.asserts.assertIsHTMLIFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLIFrameElement")},goog.dom.asserts.assertIsHTMLObjectElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLObjectElement")},goog.dom.asserts.assertIsHTMLScriptElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLScriptElement")},goog.dom.asserts.debugStringForType_=function(e){if(!goog.isObject(e))return e===void 0?"undefined":e===null?"null":typeof e;try{return e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch{return"<object could not be stringified>"}},goog.dom.asserts.getWindow_=function(e){try{var t=e&&e.ownerDocument,n=t&&(t.defaultView||t.parentWindow);if((n=n||goog.global).Element&&n.Location)return n}catch{}return null},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=function(){return!1},goog.functions.TRUE=function(){return!0},goog.functions.NULL=function(){return null},goog.functions.identity=function(e,t){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,t){return t=t||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,t))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.partialRight=function(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var r=Array.prototype.slice.call(arguments);return r.push.apply(r,n),e.apply(this,r)}},goog.functions.withReturnValue=function(e,t){return goog.functions.sequence(e,goog.functions.constant(t))},goog.functions.equalTo=function(e,t){return function(n){return t?e==n:e===n}},goog.functions.compose=function(e,t){var n=arguments,r=n.length;return function(){var o;r&&(o=n[r-1].apply(this,arguments));for(var l=r-2;0<=l;l--)o=n[l].call(this,o);return o}},goog.functions.sequence=function(e){var t=arguments,n=t.length;return function(){for(var r,o=0;o<n;o++)r=t[o].apply(this,arguments);return r}},goog.functions.and=function(e){var t=arguments,n=t.length;return function(){for(var r=0;r<n;r++)if(!t[r].apply(this,arguments))return!1;return!0}},goog.functions.or=function(e){var t=arguments,n=t.length;return function(){for(var r=0;r<n;r++)if(t[r].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e,t){var n=function(){};return n.prototype=e.prototype,n=new n,e.apply(n,Array.prototype.slice.call(arguments,1)),n},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var t,n=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(n||(t=e(),n=!0),t):e()}},goog.functions.once=function(e){var t=e;return function(){if(t){var n=t;t=null,n()}}},goog.functions.debounce=function(e,t,n){var r=0;return function(o){goog.global.clearTimeout(r);var l=arguments;r=goog.global.setTimeout(function(){e.apply(n,l)},t)}},goog.functions.throttle=function(e,t,n){var r=0,o=!1,l=[],s=function(){r=0,o&&(o=!1,i())},i=function(){r=goog.global.setTimeout(s,t),e.apply(n,l)};return function(c){l=arguments,r?o=!0:i()}},goog.functions.rateLimit=function(e,t,n){var r=0,o=function(){r=0};return function(l){r||(r=goog.global.setTimeout(o,t),e.apply(n,arguments))}},goog.dom.safe={},goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"},goog.dom.safe.insertAdjacentHtml=function(e,t,n){e.insertAdjacentHTML(t,goog.html.SafeHtml.unwrapTrustedHTML(n))},goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.dom.safe.isInnerHtmlCleanupRecursive_=goog.functions.cacheReturnValue(function(){if(goog.DEBUG&&typeof document=="undefined")return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!(goog.DEBUG&&!e.firstChild)&&(t=e.firstChild.firstChild,e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY),!t.parentElement)}),goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(e,t){if(goog.dom.safe.isInnerHtmlCleanupRecursive_())for(;e.lastChild;)e.removeChild(e.lastChild);e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setInnerHtml=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var n=e.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[n])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+e.tagName+".")}goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(e,t)},goog.dom.safe.setOuterHtml=function(e,t){e.outerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setFormElementAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLFormElement(e).action=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setButtonFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLButtonElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setInputFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLInputElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setStyle=function(e,t){e.style.cssText=goog.html.SafeStyle.unwrap(t)},goog.dom.safe.documentWrite=function(e,t){e.write(goog.html.SafeHtml.unwrapTrustedHTML(t))},goog.dom.safe.setAnchorHref=function(e,t){goog.dom.asserts.assertIsHTMLAnchorElement(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setImageSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLImageElement(e),!(t instanceof goog.html.SafeUrl)){var n=/^data:image\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,n)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setAudioSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLAudioElement(e),!(t instanceof goog.html.SafeUrl)){var n=/^data:audio\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,n)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setVideoSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLVideoElement(e),!(t instanceof goog.html.SafeUrl)){var n=/^data:video\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,n)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setEmbedSrc=function(e,t){goog.dom.asserts.assertIsHTMLEmbedElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setFrameSrc=function(e,t){goog.dom.asserts.assertIsHTMLFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrcdoc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.srcdoc=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setLinkHrefAndRel=function(e,t,n){goog.dom.asserts.assertIsHTMLLinkElement(e),e.rel=n,goog.string.internal.caseInsensitiveContains(n,"stylesheet")?(goog.asserts.assert(t instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),e.href=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)):e.href=t instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrapTrustedURL(t):t instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrapTrustedURL(t):goog.html.SafeUrl.unwrapTrustedURL(goog.html.SafeUrl.sanitizeAssertUnchanged(t))},goog.dom.safe.setObjectData=function(e,t){goog.dom.asserts.assertIsHTMLObjectElement(e),e.data=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setScriptSrc=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setScriptContent=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.text=goog.html.SafeScript.unwrapTrustedScript(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setLocationHref=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.assignLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.assign(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.replaceLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.replace(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.openInWindow=function(e,t,n,r,o){return e=e instanceof goog.html.SafeUrl?e:goog.html.SafeUrl.sanitizeAssertUnchanged(e),(t||goog.global).open(goog.html.SafeUrl.unwrapTrustedURL(e),n?goog.string.Const.unwrap(n):"",r,o)},goog.dom.safe.parseFromStringHtml=function(e,t){return goog.dom.safe.parseFromString(e,t,"text/html")},goog.dom.safe.parseFromString=function(e,t,n){return e.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(t),n)},goog.dom.safe.createImageFromBlob=function(e){if(!/^image\/.*/g.test(e.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var t=goog.global.URL.createObjectURL(e);return(e=new goog.global.Image).onload=function(){goog.global.URL.revokeObjectURL(t)},goog.dom.safe.setImageSrc(e,goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."),t)),e},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:"\xA0"},goog.string.startsWith=goog.string.internal.startsWith,goog.string.endsWith=goog.string.internal.endsWith,goog.string.caseInsensitiveStartsWith=goog.string.internal.caseInsensitiveStartsWith,goog.string.caseInsensitiveEndsWith=goog.string.internal.caseInsensitiveEndsWith,goog.string.caseInsensitiveEquals=goog.string.internal.caseInsensitiveEquals,goog.string.subs=function(e,t){for(var n=e.split("%s"),r="",o=Array.prototype.slice.call(arguments,1);o.length&&1<n.length;)r+=n.shift()+o.shift();return r+n.join("%s")},goog.string.collapseWhitespace=function(e){return e.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=goog.string.internal.isEmptyOrWhitespace,goog.string.isEmptyString=function(e){return e.length==0},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(e){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(e))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(e){return!/[^\t\n\r ]/.test(e)},goog.string.isAlpha=function(e){return!/[^a-zA-Z]/.test(e)},goog.string.isNumeric=function(e){return!/[^0-9]/.test(e)},goog.string.isAlphaNumeric=function(e){return!/[^a-zA-Z0-9]/.test(e)},goog.string.isSpace=function(e){return e==" "},goog.string.isUnicodeChar=function(e){return e.length==1&&" "<=e&&"~">=e||"\x80"<=e&&"\uFFFD">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,`
34
- `)},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.string.internal.trim,goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare,goog.string.numberAwareCompare_=function(e,t,n){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var r=e.toLowerCase().match(n),o=t.toLowerCase().match(n),l=Math.min(r.length,o.length),s=0;s<l;s++){n=r[s];var i=o[s];if(n!=i)return e=parseInt(n,10),!isNaN(e)&&(t=parseInt(i,10),!isNaN(t)&&e-t)?e-t:n<i?-1:1}return r.length!=o.length?r.length-o.length:e<t?-1:1},goog.string.intAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=goog.string.internal.newLineToBr,goog.string.htmlEscape=function(e,t){return e=goog.string.internal.htmlEscape(e,t),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"&#101;")),e},goog.string.E_RE_=/e/g,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},r=t?t.createElement("div"):goog.global.document.createElement("div");return e.replace(goog.string.HTML_ENTITY_PATTERN_,function(o,l){var s=n[o];return s||(l.charAt(0)=="#"&&(l=Number("0"+l.substr(1)),isNaN(l)||(s=String.fromCharCode(l))),s||(goog.dom.safe.setInnerHtml(r,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),o+" ")),s=r.firstChild.nodeValue.slice(0,-1)),n[o]=s)})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(t,n){switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:return n.charAt(0)!="#"||(n=Number("0"+n.substr(1)),isNaN(n))?t:String.fromCharCode(n)}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var n=t.length,r=0;r<n;r++){var o=n==1?t:t.charAt(r);if(e.charAt(0)==o&&e.charAt(e.length-1)==o)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,n){return n&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),n&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,n,r){if(n&&(e=goog.string.unescapeEntities(e)),r&&e.length>t){r>t&&(r=t);var o=e.length-r;e=e.substring(0,t-r)+"..."+e.substring(o)}else e.length>t&&(r=Math.floor(t/2),o=e.length-r,e=e.substring(0,r+t%2)+"..."+e.substring(o));return n&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var t=['"'],n=0;n<e.length;n++){var r=e.charAt(n),o=r.charCodeAt(0);t[n+1]=goog.string.specialEscapeChars_[r]||(31<o&&127>o?r:goog.string.escapeChar(r))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=goog.string.escapeChar(e.charAt(n));return t.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var t=e.charCodeAt(0);if(31<t&&127>t)var n=e;else 256>t?(n="\\x",(16>t||256<t)&&(n+="0")):(n="\\u",4096>t&&(n+="0")),n+=t.toString(16).toUpperCase();return goog.string.jsEscapeCache_[e]=n},goog.string.contains=goog.string.internal.contains,goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains,goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,n){var r=e;return 0<=t&&t<e.length&&0<n&&(r=e.substr(0,t)+e.substr(t+n,e.length-t-n)),r},goog.string.remove=function(e,t){return e.replace(t,"")},goog.string.removeAll=function(e,t){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,"")},goog.string.replaceAll=function(e,t,n){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,n.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,t){return e.repeat(t)}:function(e,t){return Array(t+1).join(e)},goog.string.padNumber=function(e,t,n){return(n=(e=goog.isDef(n)?e.toFixed(n):String(e)).indexOf("."))==-1&&(n=e.length),goog.string.repeat("0",Math.max(0,t-n))+e},goog.string.makeSafe=function(e){return e==null?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=goog.string.internal.compareVersions,goog.string.hashCode=function(e){for(var t=0,n=0;n<e.length;++n)t=31*t+e.charCodeAt(n)>>>0;return t},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=Number(e);return t==0&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,function(t,n){return n.toUpperCase()})},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){return t=goog.isString(t)?goog.string.regExpEscape(t):"\\s",e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),function(n,r,o){return r+o.toUpperCase()})},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,n){e=e.split(t);for(var r=[];0<n&&e.length;)r.push(e.shift()),n--;return e.length&&r.push(e.join(t)),r},goog.string.lastComponent=function(e,t){if(!t)return e;typeof t=="string"&&(t=[t]);for(var n=-1,r=0;r<t.length;r++)if(t[r]!=""){var o=e.lastIndexOf(t[r]);o>n&&(n=o)}return n==-1?e:e.slice(n+1)},goog.string.editDistance=function(e,t){var n=[],r=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var o=0;o<t.length+1;o++)n[o]=o;for(o=0;o<e.length;o++){r[0]=o+1;for(var l=0;l<t.length;l++)r[l+1]=Math.min(r[l]+1,n[l+1]+1,n[l]+Number(e[o]!=t[l]));for(l=0;l<n.length;l++)n[l]=r[l]}return r[t.length]},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")},goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")},goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?t=(e=(t=/Windows (?:NT|Phone) ([0-9.]+)/).exec(e))?e[1]:"0.0":goog.labs.userAgent.platform.isIos()?t=(e=(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(e))&&e[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?t=(e=(t=/Mac OS X ([0-9_.]+)/).exec(e))?e[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isKaiOS()?t=(e=(t=/(?:KaiOS)\/(\S+)/i).exec(e))&&e[1]:goog.labs.userAgent.platform.isAndroid()?t=(e=(t=/Android\s+([^\);]+)(\)|;)/).exec(e))&&e[1]:goog.labs.userAgent.platform.isChromeOS()&&(t=(e=(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.objectProperty=function(e,t){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch{}return!1},goog.reflect.cache=function(e,t,n,r){return r=r?r(t):t,Object.prototype.hasOwnProperty.call(e,r)?e[r]:e[r]=n(t)},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){e=goog.labs.userAgent.util.extractVersionTuples(e);var t,n=goog.labs.userAgent.engine.getEngineTuple_(e);if(n)return n[0]=="Gecko"?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):n[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var t=0;t<e.length;t++){var n=e[t];if(n[0]=="Edge")return n}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){return(e=goog.array.find(e,function(n){return t==n[0]}))&&e[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null},goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigatorTyped();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.ASSUME_KAIOS=!1,goog.userAgent.ASSUME_GO2PHONE=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigatorTyped();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS(),goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone(),goog.userAgent.determineVersion_=function(){var e="",t=goog.userAgent.getVersionRegexResult_();return t&&(e=t?t[1]:""),goog.userAgent.IE&&(t=goog.userAgent.getDocumentMode_())!=null&&t>parseFloat(e)?String(t):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)})},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.",goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4},goog.crypt.base64.paddingChars_="=.",goog.crypt.base64.isPadding_=function(e){return goog.string.contains(goog.crypt.base64.paddingChars_,e)},goog.crypt.base64.byteToCharMaps_={},goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||typeof goog.global.btoa=="function",goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&typeof goog.global.atob=="function",goog.crypt.base64.encodeByteArray=function(e,t){goog.asserts.assert(goog.isArrayLike(e),"encodeByteArray takes an array as a parameter"),t===void 0&&(t=goog.crypt.base64.Alphabet.DEFAULT),goog.crypt.base64.init_(),t=goog.crypt.base64.byteToCharMaps_[t];for(var n=[],r=0;r<e.length;r+=3){var o=e[r],l=r+1<e.length,s=l?e[r+1]:0,i=r+2<e.length,c=i?e[r+2]:0,u=o>>2;o=(3&o)<<4|s>>4,s=(15&s)<<2|c>>6,c&=63,i||(c=64,l||(s=64)),n.push(t[u],t[o],t[s]||"",t[c]||"")}return n.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var n="";return goog.crypt.base64.decodeStringInternal_(e,function(r){n+=String.fromCharCode(r)}),n},goog.crypt.base64.decodeStringToByteArray=function(e,t){var n=[];return goog.crypt.base64.decodeStringInternal_(e,function(r){n.push(r)}),n},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=e.length,n=3*t/4;n%3?n=Math.floor(n):goog.crypt.base64.isPadding_(e[t-1])&&(n=goog.crypt.base64.isPadding_(e[t-2])?n-2:n-1);var r=new Uint8Array(n),o=0;return goog.crypt.base64.decodeStringInternal_(e,function(l){r[o++]=l}),r.subarray(0,o)},goog.crypt.base64.decodeStringInternal_=function(e,t){function n(c){for(;r<e.length;){var u=e.charAt(r++),m=goog.crypt.base64.charToByteMap_[u];if(m!=null)return m;if(!goog.string.isEmptyOrWhitespace(u))throw Error("Unknown base64 encoding at char: "+u)}return c}goog.crypt.base64.init_();for(var r=0;;){var o=n(-1),l=n(0),s=n(64),i=n(64);if(i===64&&o===-1)break;t(o<<2|l>>4),s!=64&&(t(l<<4&240|s>>2),i!=64&&t(s<<6&192|i))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var e=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=e.concat(t[n].split(""));goog.crypt.base64.byteToCharMaps_[n]=r;for(var o=0;o<r.length;o++){var l=r[o],s=goog.crypt.base64.charToByteMap_[l];s===void 0?goog.crypt.base64.charToByteMap_[l]=o:goog.asserts.assert(s===o)}}}},jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(e){var t=e>>>0;e=Math.floor((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e,n=(e=Math.abs(e))>>>0;e=Math.floor((e-n)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,4294967295<(n=1+(~n>>>0))&&(n=0,4294967295<++e&&(e=0))),jspb.utils.split64Low=n,jspb.utils.split64High=e},jspb.utils.splitZigzag64=function(e){var t=0>e;e=2*Math.abs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var n=jspb.utils.split64High;t&&(e==0?n==0?n=e=4294967295:(n--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=n},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(e))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(e>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|2139095040)>>>0;else if(e<jspb.BinaryConstants.FLOAT32_MIN)e=Math.round(e/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|e)>>>0;else{var n=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-n),e=8388607&Math.round(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|n+127<<23|e)>>>0}},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(t<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(e<jspb.BinaryConstants.FLOAT64_MIN){var n=e/Math.pow(2,-1074);e=n/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(t<<31|e)>>>0,jspb.utils.split64Low=n>>>0}else{var r=0;if(2<=(n=e))for(;2<=n&&1023>r;)r++,n/=2;else for(;1>n&&-1022<r;)n*=2,r--;e=(n=e*Math.pow(2,-r))*jspb.BinaryConstants.TWO_TO_20&1048575,n=n*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|r+1023<<20|e)>>>0,jspb.utils.split64Low=n}},jspb.utils.splitHash64=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),o=e.charCodeAt(3),l=e.charCodeAt(4),s=e.charCodeAt(5),i=e.charCodeAt(6);e=e.charCodeAt(7),jspb.utils.split64Low=t+(n<<8)+(r<<16)+(o<<24)>>>0,jspb.utils.split64High=l+(s<<8)+(i<<16)+(e<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+(e>>>0)},jspb.utils.joinInt64=function(e,t){var n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=jspb.utils.joinUint64(e,t),n?-e:e},jspb.utils.toZigzag64=function(e,t,n){var r=t>>31;return n(e<<1^r,(t<<1|e>>>31)^r)},jspb.utils.joinZigzag64=function(e,t){return jspb.utils.fromZigzag64(e,t,jspb.utils.joinInt64)},jspb.utils.fromZigzag64=function(e,t,n){var r=-(1&e);return n((e>>>1|t<<31)^r,t>>>1^r)},jspb.utils.joinFloat32=function(e,t){t=2*(e>>31)+1;var n=e>>>23&255;return e&=8388607,n==255?e?NaN:1/0*t:n==0?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))},jspb.utils.joinFloat64=function(e,t){var n=2*(t>>31)+1,r=t>>>20&2047;return e=jspb.BinaryConstants.TWO_TO_32*(1048575&t)+e,r==2047?e?NaN:1/0*n:r==0?n*Math.pow(2,-1074)*e:n*Math.pow(2,r-1075)*(e+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.ZERO_CHAR_CODE_=48,jspb.utils.A_CHAR_CODE_=97,jspb.utils.joinUnsignedDecimalString=function(e,t){function n(o,l){return o=o?String(o):"",l?"0000000".slice(o.length)+o:o}if(2097151>=t)return""+(jspb.BinaryConstants.TWO_TO_32*t+e);var r=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*r+6710656*(t=t>>16&65535),r+=8147497*t,t*=2,1e7<=e&&(r+=Math.floor(e/1e7),e%=1e7),1e7<=r&&(t+=Math.floor(r/1e7),r%=1e7),n(t,0)+n(r,t)+n(e,1)},jspb.utils.joinSignedDecimalString=function(e,t){var n=2147483648&t;return n&&(t=~t+((e=1+~e>>>0)==0?1:0)>>>0),e=jspb.utils.joinUnsignedDecimalString(e,t),n?"-"+e:e},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var n=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(e,n):jspb.utils.joinUnsignedDecimalString(e,n)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var n=Array(e.length),r=0;r<e.length;r++)n[r]=jspb.utils.hash64ToDecimalString(e[r],t);return n},jspb.utils.decimalStringToHash64=function(e){function t(l,s){for(var i=0;8>i&&(l!==1||0<s);i++)s=l*r[i]+s,r[i]=255&s,s>>>=8}goog.asserts.assert(0<e.length);var n=!1;e[0]==="-"&&(n=!0,e=e.slice(1));for(var r=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-jspb.utils.ZERO_CHAR_CODE_);return n&&(function(){for(var l=0;8>l;l++)r[l]=255&~r[l]}(),t(1,1)),goog.crypt.byteArrayToString(r)},jspb.utils.splitDecimalString=function(e){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e))},jspb.utils.toHexDigit_=function(e){return String.fromCharCode(10>e?jspb.utils.ZERO_CHAR_CODE_+e:jspb.utils.A_CHAR_CODE_-10+e)},jspb.utils.fromHexCharCode_=function(e){return e>=jspb.utils.A_CHAR_CODE_?e-jspb.utils.A_CHAR_CODE_+10:e-jspb.utils.ZERO_CHAR_CODE_},jspb.utils.hash64ToHexString=function(e){var t=Array(18);t[0]="0",t[1]="x";for(var n=0;8>n;n++){var r=e.charCodeAt(7-n);t[2*n+2]=jspb.utils.toHexDigit_(r>>4),t[2*n+3]=jspb.utils.toHexDigit_(15&r)}return t.join("")},jspb.utils.hexStringToHash64=function(e){e=e.toLowerCase(),goog.asserts.assert(e.length==18),goog.asserts.assert(e[0]=="0"),goog.asserts.assert(e[1]=="x");for(var t="",n=0;8>n;n++){var r=jspb.utils.fromHexCharCode_(e.charCodeAt(2*n+2)),o=jspb.utils.fromHexCharCode_(e.charCodeAt(2*n+3));t=String.fromCharCode(16*r+o)+t}return t},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var n=jspb.utils.split64High;return t?jspb.utils.joinInt64(e,n):jspb.utils.joinUint64(e,n)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(e,t,n){for(var r=0,o=t;o<n;o++)r+=e[o]>>7;return n-t-r},jspb.utils.countVarintFields=function(e,t,n,r){var o=0;if(128>(r=8*r+jspb.BinaryConstants.WireType.VARINT))for(;t<n&&e[t++]==r;)for(o++;;){var l=e[t++];if((128&l)==0)break}else for(;t<n;){for(l=r;128<l;){if(e[t]!=(127&l|128))return o;t++,l>>=7}if(e[t++]!=l)break;for(o++;(128&(l=e[t++]))!=0;);}return o},jspb.utils.countFixedFields_=function(e,t,n,r,o){var l=0;if(128>r)for(;t<n&&e[t++]==r;)l++,t+=o;else for(;t<n;){for(var s=r;128<s;){if(e[t++]!=(127&s|128))return l;s>>=7}if(e[t++]!=s)break;l++,t+=o}return l},jspb.utils.countFixed32Fields=function(e,t,n,r){return jspb.utils.countFixedFields_(e,t,n,8*r+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,n,r){return jspb.utils.countFixedFields_(e,t,n,8*r+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(e,t,n,r){var o=0;for(r=8*r+jspb.BinaryConstants.WireType.DELIMITED;t<n;){for(var l=r;128<l;){if(e[t++]!=(127&l|128))return o;l>>=7}if(e[t++]!=l)break;o++;for(var s=0,i=1;s+=(127&(l=e[t++]))*i,i*=128,(128&l)!=0;);t+=s}return o},jspb.utils.debugBytesToTextFormat=function(e){var t='"';if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var n=0;n<e.length;n++)t+="\\x",16>e[n]&&(t+="0"),t+=e[n].toString(16)}return t+'"'},jspb.utils.debugScalarToTextFormat=function(e){return typeof e=="string"?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++){var r=e.charCodeAt(n);if(255<r)throw Error("Conversion error: string contains codepoint outside of byte range");t[n]=r}return t},jspb.utils.byteSourceToUint8Array=function(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||Buffer!==void 0&&e.constructor===Buffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryDecoder=function(e,t,n){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,n)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,n){if(jspb.BinaryDecoder.instanceCache_.length){var r=jspb.BinaryDecoder.instanceCache_.pop();return e&&r.setBlock(e,t,n),r}return new jspb.BinaryDecoder(e,t,n)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,n){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=t!==void 0?t:0,this.end_=n!==void 0?this.start_+n:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64=function(e){for(var t=128,n=0,r=0,o=0;4>o&&128<=t;o++)n|=(127&(t=this.bytes_[this.cursor_++]))<<7*o;if(128<=t&&(n|=(127&(t=this.bytes_[this.cursor_++]))<<28,r|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)r|=(127&(t=this.bytes_[this.cursor_++]))<<7*o+3;if(128>t)return e(n>>>0,r>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0},jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(e){return this.readSplitVarint64(function(t,n){return jspb.utils.fromZigzag64(t,n,e)})},jspb.BinaryDecoder.prototype.readSplitFixed64=function(e){var t=this.bytes_,n=this.cursor_;this.cursor_+=8;for(var r=0,o=0,l=n+7;l>=n;l--)r=r<<8|t[l],o=o<<8|t[l+4];return e(r,o)},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128<e;)this.cursor_--,e>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t=e[this.cursor_+0],n=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),n>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),n)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)},jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],n=this.bytes_[this.cursor_+2],r=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|n<<16|r<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],n=this.bytes_[this.cursor_+2],r=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|n<<16|r<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(e){var t=this.bytes_,n=this.cursor_;e=n+e;for(var r=[],o="";n<e;){var l=t[n++];if(128>l)r.push(l);else{if(192>l)continue;if(224>l){var s=t[n++];r.push((31&l)<<6|63&s)}else if(240>l){s=t[n++];var i=t[n++];r.push((15&l)<<12|(63&s)<<6|63&i)}else 248>l&&(l=(7&l)<<18|(63&(s=t[n++]))<<12|(63&(i=t[n++]))<<6|63&t[n++],l-=65536,r.push(55296+(l>>10&1023),56320+(1023&l)))}8192<=r.length&&(o+=String.fromCharCode.apply(null,r),r.length=0)}return o+=goog.crypt.byteArrayToString(r),this.cursor_=n,o},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var e=this.bytes_,t=this.cursor_,n=e[t+0],r=e[t+1],o=e[t+2],l=e[t+3],s=e[t+4],i=e[t+5],c=e[t+6];return e=e[t+7],this.cursor_+=8,String.fromCharCode(n,r,o,l,s,i,c,e)},jspb.BinaryReader=function(e,t,n){this.decoder_=jspb.BinaryDecoder.alloc(e,t,n),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,n){if(jspb.BinaryReader.instanceCache_.length){var r=jspb.BinaryReader.instanceCache_.pop();return e&&r.decoder_.setBlock(e,t,n),r}return new jspb.BinaryReader(e,t,n)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,n){this.decoder_.setBlock(e,t,n),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3;return(e&=7)!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type: %s (at position %s)",e,this.fieldCursor_),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){for(var e=this.nextField_;;){if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=e&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(e,t){this.readCallbacks_===null&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[e]),this.readCallbacks_[e]=t},jspb.BinaryReader.prototype.runReadCallback=function(e){return goog.asserts.assert(this.readCallbacks_!==null),e=this.readCallbacks_[e],goog.asserts.assert(e),e(this)},jspb.BinaryReader.prototype.readAny=function(e){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(e);var t=jspb.BinaryConstants.FieldType;switch(e){case t.DOUBLE:return this.readDouble();case t.FLOAT:return this.readFloat();case t.INT64:return this.readInt64();case t.UINT64:return this.readUint64();case t.INT32:return this.readInt32();case t.FIXED64:return this.readFixed64();case t.FIXED32:return this.readFixed32();case t.BOOL:return this.readBool();case t.STRING:return this.readString();case t.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case t.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case t.BYTES:return this.readBytes();case t.UINT32:return this.readUint32();case t.ENUM:return this.readEnum();case t.SFIXED32:return this.readSfixed32();case t.SFIXED64:return this.readSfixed64();case t.SINT32:return this.readSint32();case t.SINT64:return this.readSint64();case t.FHASH64:return this.readFixedHash64();case t.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(e,t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var n=this.decoder_.getEnd(),r=this.decoder_.readUnsignedVarint32();r=this.decoder_.getCursor()+r,this.decoder_.setEnd(r),t(e,this),this.decoder_.setCursor(r),this.decoder_.setEnd(n)},jspb.BinaryReader.prototype.readGroup=function(e,t,n){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==e),n(t,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32(),t=this.decoder_.getCursor(),n=t+e;return e=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),t,e),this.decoder_.setCursor(n),e},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(e)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(e)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readSintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarintHash64()},jspb.BinaryReader.prototype.readSplitVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(e)},jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(function(t,n){return jspb.utils.fromZigzag64(t,n,e)})},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readSplitFixed64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readSplitFixed64(e)},jspb.BinaryReader.prototype.readPackedField_=function(e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();t=this.decoder_.getCursor()+t;for(var n=[];this.decoder_.getCursor()<t;)n.push(e.call(this.decoder_));return n},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Map=function(e,t){this.arr_=e,this.valueCtor_=t,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()},jspb.Map.prototype.loadFromArray_=function(){for(var e=0;e<this.arr_.length;e++){var t=this.arr_[e],n=t[0];this.map_[n.toString()]=new jspb.Map.Entry_(n,t[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var e,t=this.map_;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=t[e].valueWrapper;n&&n.toArray()}}}else{for(this.arr_.length=0,(t=this.stringKeys_()).sort(),e=0;e<t.length;e++){var r=this.map_[t[e]];(n=r.valueWrapper)&&n.toArray(),this.arr_.push([r.key,r.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(e,t){for(var n=this.toArray(),r=[],o=0;o<n.length;o++){var l=this.map_[n[o][0].toString()];this.wrapEntry_(l);var s=l.valueWrapper;s?(goog.asserts.assert(t),r.push([l.key,t(e,s)])):r.push([l.key,l.value])}return r},jspb.Map.fromObject=function(e,t,n){t=new jspb.Map([],t);for(var r=0;r<e.length;r++){var o=e[r][0],l=n(e[r][1]);t.set(o,l)}return t},jspb.Map.ArrayIteratorIterable_=function(e){this.idx_=0,this.arr_=e},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},typeof Symbol!="undefined"&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(e){e=e.toString();var t=this.map_.hasOwnProperty(e);return delete this.map_[e],this.arrClean=!1,t},jspb.Map.prototype.getEntryList=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++){var r=this.map_[t[n]];e.push([r.key,r.value])}return e},jspb.Map.prototype.entries=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++){var r=this.map_[t[n]];e.push([r.key,this.wrapEntry_(r)])}return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.keys=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++)e.push(this.map_[t[n]].key);return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.values=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++)e.push(this.wrapEntry_(this.map_[t[n]]));return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.forEach=function(e,t){var n=this.stringKeys_();n.sort();for(var r=0;r<n.length;r++){var o=this.map_[n[r]];e.call(t,this.wrapEntry_(o),o.key,this)}},jspb.Map.prototype.set=function(e,t){var n=new jspb.Map.Entry_(e);return this.valueCtor_?(n.valueWrapper=t,n.value=t.toArray()):n.value=t,this.map_[e.toString()]=n,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(e){return this.valueCtor_?(e.valueWrapper||(e.valueWrapper=new this.valueCtor_(e.value)),e.valueWrapper):e.value},jspb.Map.prototype.get=function(e){if(e=this.map_[e.toString()])return this.wrapEntry_(e)},jspb.Map.prototype.has=function(e){return e.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(e,t,n,r,o){var l=this.stringKeys_();l.sort();for(var s=0;s<l.length;s++){var i=this.map_[l[s]];t.beginSubMessage(e),n.call(t,1,i.key),this.valueCtor_?r.call(t,2,this.wrapEntry_(i),o):r.call(t,2,i.value),t.endSubMessage()}},jspb.Map.deserializeBinary=function(e,t,n,r,o,l,s){for(;t.nextField()&&!t.isEndGroup();){var i=t.getFieldNumber();i==1?l=n.call(t):i==2&&(e.valueCtor_?(goog.asserts.assert(o),s||(s=new e.valueCtor_),r.call(t,s,o)):s=r.call(t))}goog.asserts.assert(l!=null),goog.asserts.assert(s!=null),e.set(l,s)},jspb.Map.prototype.stringKeys_=function(){var e,t=this.map_,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(e);return n},jspb.Map.Entry_=function(e,t){this.key=e,this.value=t,this.valueWrapper=void 0},jspb.ExtensionFieldInfo=function(e,t,n,r,o){this.fieldIndex=e,this.fieldName=t,this.ctor=n,this.toObjectFn=r,this.isRepeated=o},jspb.ExtensionFieldBinaryInfo=function(e,t,n,r,o,l){this.fieldInfo=e,this.binaryReaderFn=t,this.binaryWriterFn=n,this.binaryMessageSerializeFn=r,this.binaryMessageDeserializeFn=o,this.isPacked=l},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_=typeof Uint8Array=="function",jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.hiddenES6Property_=function(){},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(e,t,n,r,o,l){if(e.wrappers_=null,t||(t=n?[n]:[]),e.messageId_=n?String(n):void 0,e.arrayIndexOffset_=n===0?-1:0,e.array=t,jspb.Message.initPivotAndExtensionObject_(e,r),e.convertedPrimitiveFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(e.repeatedFields=o),o)for(t=0;t<o.length;t++)(n=o[t])<e.pivot_?(n=jspb.Message.getIndex_(e,n),e.array[n]=e.array[n]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[n]=e.extensionObject_[n]||jspb.Message.EMPTY_LIST_SENTINEL_);if(l&&l.length)for(t=0;t<l.length;t++)jspb.Message.computeOneofCase(e,l[t])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(e){return jspb.Message.ASSUME_LOCAL_ARRAYS?e instanceof Array:Array.isArray(e)},jspb.Message.isExtensionObject_=function(e){return!(e===null||typeof e!="object"||jspb.Message.isArray_(e)||jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)},jspb.Message.initPivotAndExtensionObject_=function(e,t){var n=e.array.length,r=-1;if(n&&(r=n-1,n=e.array[r],jspb.Message.isExtensionObject_(n)))return e.pivot_=jspb.Message.getFieldNumber_(e,r),void(e.extensionObject_=n);-1<t?(e.pivot_=Math.max(t,jspb.Message.getFieldNumber_(e,r+1)),e.extensionObject_=null):e.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(e){var t=jspb.Message.getIndex_(e,e.pivot_);e.array[t]||(e.extensionObject_=e.array[t]={})},jspb.Message.toObjectList=function(e,t,n){for(var r=[],o=0;o<e.length;o++)r[o]=t.call(e[o],n,e[o]);return r},jspb.Message.toObjectExtension=function(e,t,n,r,o){for(var l in n){var s=n[l],i=r.call(e,s);if(i!=null){for(var c in s.fieldName)if(s.fieldName.hasOwnProperty(c))break;t[c]=s.toObjectFn?s.isRepeated?jspb.Message.toObjectList(i,s.toObjectFn,o):s.toObjectFn(o,i):i}}},jspb.Message.serializeBinaryExtensions=function(e,t,n,r){for(var o in n){var l=n[o],s=l.fieldInfo;if(!l.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var i=r.call(e,s);if(i!=null)if(s.isMessageType()){if(!l.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");l.binaryWriterFn.call(t,s.fieldIndex,i,l.binaryMessageSerializeFn)}else l.binaryWriterFn.call(t,s.fieldIndex,i)}},jspb.Message.readBinaryExtension=function(e,t,n,r,o){var l=n[t.getFieldNumber()];if(l){if(n=l.fieldInfo,!l.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(n.isMessageType()){var s=new n.ctor;l.binaryReaderFn.call(t,s,l.binaryMessageDeserializeFn)}else s=l.binaryReaderFn.call(t);n.isRepeated&&!l.isPacked?(t=r.call(e,n))?t.push(s):o.call(e,n,[s]):o.call(e,n,s)}else t.skipField()},jspb.Message.getField=function(e,t){if(t<e.pivot_){t=jspb.Message.getIndex_(e,t);var n=e.array[t];return n===jspb.Message.EMPTY_LIST_SENTINEL_?e.array[t]=[]:n}if(e.extensionObject_)return(n=e.extensionObject_[t])===jspb.Message.EMPTY_LIST_SENTINEL_?e.extensionObject_[t]=[]:n},jspb.Message.getRepeatedField=function(e,t){return jspb.Message.getField(e,t)},jspb.Message.getOptionalFloatingPointField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:+e},jspb.Message.getBooleanField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:!!e},jspb.Message.getRepeatedFloatingPointField=function(e,t){var n=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var r=0;r<n.length;r++)n[r]=+n[r];e.convertedPrimitiveFields_[t]=!0}return n},jspb.Message.getRepeatedBooleanField=function(e,t){var n=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var r=0;r<n.length;r++)n[r]=!!n[r];e.convertedPrimitiveFields_[t]=!0}return n},jspb.Message.bytesAsB64=function(e){return e==null||typeof e=="string"?e:jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array?goog.crypt.base64.encodeByteArray(e):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(e)),null)},jspb.Message.bytesAsU8=function(e){return e==null||e instanceof Uint8Array?e:typeof e=="string"?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(e)),null)},jspb.Message.bytesListAsB64=function(e){return jspb.Message.assertConsistentTypes_(e),e.length&&typeof e[0]!="string"?goog.array.map(e,jspb.Message.bytesAsB64):e},jspb.Message.bytesListAsU8=function(e){return jspb.Message.assertConsistentTypes_(e),!e.length||e[0]instanceof Uint8Array?e:goog.array.map(e,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(e){if(goog.DEBUG&&e&&1<e.length){var t=goog.typeOf(e[0]);goog.array.forEach(e,function(n){goog.typeOf(n)!=t&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(n)+" expected "+t)})}},jspb.Message.getFieldWithDefault=function(e,t,n){return(e=jspb.Message.getField(e,t))==null?n:e},jspb.Message.getBooleanFieldWithDefault=function(e,t,n){return(e=jspb.Message.getBooleanField(e,t))==null?n:e},jspb.Message.getFloatingPointFieldWithDefault=function(e,t,n){return(e=jspb.Message.getOptionalFloatingPointField(e,t))==null?n:e},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(e,t,n,r){if(e.wrappers_||(e.wrappers_={}),t in e.wrappers_)return e.wrappers_[t];var o=jspb.Message.getField(e,t);if(!o){if(n)return;o=[],jspb.Message.setField(e,t,o)}return e.wrappers_[t]=new jspb.Map(o,r)},jspb.Message.setField=function(e,t,n){return goog.asserts.assertInstanceof(e,jspb.Message),t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=n:(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[t]=n),e},jspb.Message.setProto3IntField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,0)},jspb.Message.setProto3FloatField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,0)},jspb.Message.setProto3BooleanField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,!1)},jspb.Message.setProto3StringField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,"")},jspb.Message.setProto3BytesField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,"")},jspb.Message.setProto3EnumField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,0)},jspb.Message.setProto3StringIntField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,"0")},jspb.Message.setFieldIgnoringDefault_=function(e,t,n,r){return goog.asserts.assertInstanceof(e,jspb.Message),n!==r?jspb.Message.setField(e,t,n):t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(e),delete e.extensionObject_[t]),e},jspb.Message.addToRepeatedField=function(e,t,n,r){return goog.asserts.assertInstanceof(e,jspb.Message),t=jspb.Message.getRepeatedField(e,t),r!=null?t.splice(r,0,n):t.push(n),e},jspb.Message.setOneofField=function(e,t,n,r){return goog.asserts.assertInstanceof(e,jspb.Message),(n=jspb.Message.computeOneofCase(e,n))&&n!==t&&r!==void 0&&(e.wrappers_&&n in e.wrappers_&&(e.wrappers_[n]=void 0),jspb.Message.setField(e,n,void 0)),jspb.Message.setField(e,t,r)},jspb.Message.computeOneofCase=function(e,t){for(var n,r,o=0;o<t.length;o++){var l=t[o],s=jspb.Message.getField(e,l);s!=null&&(n=l,r=s,jspb.Message.setField(e,l,void 0))}return n?(jspb.Message.setField(e,n,r),n):0},jspb.Message.getWrapperField=function(e,t,n,r){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[n]){var o=jspb.Message.getField(e,n);(r||o)&&(e.wrappers_[n]=new t(o))}return e.wrappers_[n]},jspb.Message.getRepeatedWrapperField=function(e,t,n){return jspb.Message.wrapRepeatedField_(e,t,n),(t=e.wrappers_[n])==jspb.Message.EMPTY_LIST_SENTINEL_&&(t=e.wrappers_[n]=[]),t},jspb.Message.wrapRepeatedField_=function(e,t,n){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[n]){for(var r=jspb.Message.getRepeatedField(e,n),o=[],l=0;l<r.length;l++)o[l]=new t(r[l]);e.wrappers_[n]=o}},jspb.Message.setWrapperField=function(e,t,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var r=n&&n.toArray();return e.wrappers_[t]=n,jspb.Message.setField(e,t,r)},jspb.Message.setOneofWrapperField=function(e,t,n,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var o=r&&r.toArray();return e.wrappers_[t]=r,jspb.Message.setOneofField(e,t,n,o)},jspb.Message.setRepeatedWrapperField=function(e,t,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={}),n=n||[];for(var r=[],o=0;o<n.length;o++)r[o]=n[o].toArray();return e.wrappers_[t]=n,jspb.Message.setField(e,t,r)},jspb.Message.addToRepeatedWrapperField=function(e,t,n,r,o){jspb.Message.wrapRepeatedField_(e,r,t);var l=e.wrappers_[t];return l||(l=e.wrappers_[t]=[]),n=n||new r,e=jspb.Message.getRepeatedField(e,t),o!=null?(l.splice(o,0,n),e.splice(o,0,n.toArray())):(l.push(n),e.push(n.toArray())),n},jspb.Message.toMap=function(e,t,n,r){for(var o={},l=0;l<e.length;l++)o[t.call(e[l])]=n?n.call(e[l],r,e[l]):e[l];return o},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var e in this.wrappers_){var t=this.wrappers_[e];if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]&&t[n].toArray();else t&&t.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(e){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var t=e.fieldIndex;if(e.isRepeated){if(e.isMessageType())return this.wrappers_[t]||(this.wrappers_[t]=goog.array.map(this.extensionObject_[t]||[],function(n){return new e.ctor(n)})),this.wrappers_[t]}else if(e.isMessageType())return!this.wrappers_[t]&&this.extensionObject_[t]&&(this.wrappers_[t]=new e.ctor(this.extensionObject_[t])),this.wrappers_[t];return this.extensionObject_[t]}},jspb.Message.prototype.setExtension=function(e,t){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var n=e.fieldIndex;return e.isRepeated?(t=t||[],e.isMessageType()?(this.wrappers_[n]=t,this.extensionObject_[n]=goog.array.map(t,function(r){return r.toArray()})):this.extensionObject_[n]=t):e.isMessageType()?(this.wrappers_[n]=t,this.extensionObject_[n]=t&&t.toArray()):this.extensionObject_[n]=t,this},jspb.Message.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var n=e.toArray();t=t.toArray();var r=[],o=0,l=n.length>t.length?n.length:t.length;for(e.getJsPbMessageId()&&(r[0]=e.getJsPbMessageId(),o=1);o<l;o++)jspb.Message.compareFields(n[o],t[o])||(r[o]=t[o]);return new e.constructor(r)},jspb.Message.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&jspb.Message.compareFields(e.toArray(),t.toArray())},jspb.Message.compareExtensions=function(e,t){e=e||{},t=t||{};var n,r={};for(n in e)r[n]=0;for(n in t)r[n]=0;for(n in r)if(!jspb.Message.compareFields(e[n],t[n]))return!1;return!0},jspb.Message.compareFields=function(e,t){if(e==t)return!0;if(!goog.isObject(e)||!goog.isObject(t))return!!(typeof e=="number"&&isNaN(e)||typeof t=="number"&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}if(e.constructor===Array){var r=void 0,o=void 0,l=Math.max(e.length,t.length);for(n=0;n<l;n++){var s=e[n],i=t[n];if(s&&s.constructor==Object&&(goog.asserts.assert(r===void 0),goog.asserts.assert(n===e.length-1),r=s,s=void 0),i&&i.constructor==Object&&(goog.asserts.assert(o===void 0),goog.asserts.assert(n===t.length-1),o=i,i=void 0),!jspb.Message.compareFields(s,i))return!1}return!r&&!o||(r=r||{},o=o||{},jspb.Message.compareExtensions(r,o))}if(e.constructor===Object)return jspb.Message.compareExtensions(e,t);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(e){return jspb.Message.cloneMessage(e)},jspb.Message.cloneMessage=function(e){return new e.constructor(jspb.Message.clone_(e.toArray()))},jspb.Message.copyInto=function(e,t){goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assert(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=jspb.Message.clone(e);for(var n=t.toArray(),r=e.toArray(),o=n.length=0;o<r.length;o++)n[o]=r[o];t.wrappers_=e.wrappers_,t.extensionObject_=e.extensionObject_},jspb.Message.clone_=function(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n<e.length;n++){var r=e[n];r!=null&&(t[n]=typeof r=="object"?jspb.Message.clone_(goog.asserts.assert(r)):r)}return t}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)return new Uint8Array(e);for(n in t={},e)(r=e[n])!=null&&(t[n]=typeof r=="object"?jspb.Message.clone_(goog.asserts.assert(r)):r);return t},jspb.Message.registerMessageType=function(e,t){t.messageId=e},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(e,t){this.lo=e,this.hi=t},jspb.arith.UInt64.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return this.lo==0&&this.hi==0},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(e,t){var n=65535&e,r=65535&t,o=t>>>16;for(t=n*r+65536*(n*o&65535)+65536*((e>>>=16)*r&65535),n=e*o+(n*o>>>16)+(e*r>>>16);4294967296<=t;)t-=4294967296,n+=1;return new jspb.arith.UInt64(t>>>0,n>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return(e=jspb.arith.UInt64.mul32x32(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(e==0)return[];var t=new jspb.arith.UInt64(0,0),n=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var r=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),r=r.leftShift();for(;!r.zero();)0>=e.cmp(n)&&(t=t.add(r),n=n.sub(e)),e=e.rightShift(),r=r.rightShift();return[t,n]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();){var n=(t=t.div(10))[0];e=t[1].lo+e,t=n}return e==""&&(e="0"),e},jspb.arith.UInt64.fromString=function(e){for(var t=new jspb.arith.UInt64(0,0),n=new jspb.arith.UInt64(0,0),r=0;r<e.length;r++){if("0">e[r]||"9"<e[r])return null;var o=parseInt(e[r],10);n.lo=o,t=t.mul(10).add(n)}return t},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(e,t){this.lo=e,this.hi=t},jspb.arith.Int64.prototype.add=function(e){return new jspb.arith.Int64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=(2147483648&this.hi)!=0,t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0<e.length&&e[0]=="-";return t&&(e=e.substring(1)),(e=jspb.arith.UInt64.fromString(e))===null?null:(t&&(e=new jspb.arith.UInt64(0,0).sub(e)),new jspb.arith.Int64(e.lo,e.hi))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var e=this.buffer_;return this.buffer_=[],e},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(e,t){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);0<t||127<e;)this.buffer_.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(e),this.writeUint32(t)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(e){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);127<e;)this.buffer_.push(127&e|128),e>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),0<=e)this.writeUnsignedVarint32(e);else{for(var t=0;9>t;t++)this.buffer_.push(127&e|128),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((e<<1^e>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(e){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(e))},jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(e){var t=this;jspb.utils.splitHash64(e),jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,function(n,r){t.writeSplitVarint64(n>>>0,r>>>0)})},jspb.BinaryEncoder.prototype.writeUint8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&256>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-128<=e&&128>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(typeof e=="boolean"||typeof e=="number"),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(e)},jspb.BinaryEncoder.prototype.writeBytes=function(e){this.buffer_.push.apply(this.buffer_,e)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(e){jspb.utils.splitHash64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(e){jspb.utils.splitHash64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(e){for(var t=this.buffer_.length,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(128>r)this.buffer_.push(r);else if(2048>r)this.buffer_.push(r>>6|192),this.buffer_.push(63&r|128);else if(65536>r)if(55296<=r&&56319>=r&&n+1<e.length){var o=e.charCodeAt(n+1);56320<=o&&57343>=o&&(r=1024*(r-55296)+o-56320+65536,this.buffer_.push(r>>18|240),this.buffer_.push(r>>12&63|128),this.buffer_.push(r>>6&63|128),this.buffer_.push(63&r|128),n++)}else this.buffer_.push(r>>12|224),this.buffer_.push(r>>6&63|128),this.buffer_.push(63&r|128)}return this.buffer_.length-t},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop();for(t=this.totalLength_+this.encoder_.length()-t,goog.asserts.assert(0<=t);127<t;)e.push(127&t|128),t>>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,n){this.appendUint8Array_(e.subarray(t,n))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,n){e!=null&&t!=null&&n!=null&&this.writeSerializedMessage(e,t,n)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(this.bookmarks_.length==0);for(var e=new Uint8Array(this.totalLength_+this.encoder_.length()),t=this.blocks_,n=t.length,r=0,o=0;o<n;o++){var l=t[o];e.set(l,r),r+=l.length}return t=this.encoder_.end(),e.set(t,r),r+=t.length,goog.asserts.assert(r==e.length),this.blocks_=[e],e},jspb.BinaryWriter.prototype.getResultBase64String=function(e){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),e)},jspb.BinaryWriter.prototype.beginSubMessage=function(e){this.bookmarks_.push(this.beginDelimited_(e))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(e,t){goog.asserts.assert(1<=e&&e==Math.floor(e)),this.encoder_.writeUnsignedVarint32(8*e+t)},jspb.BinaryWriter.prototype.writeAny=function(e,t,n){var r=jspb.BinaryConstants.FieldType;switch(e){case r.DOUBLE:this.writeDouble(t,n);break;case r.FLOAT:this.writeFloat(t,n);break;case r.INT64:this.writeInt64(t,n);break;case r.UINT64:this.writeUint64(t,n);break;case r.INT32:this.writeInt32(t,n);break;case r.FIXED64:this.writeFixed64(t,n);break;case r.FIXED32:this.writeFixed32(t,n);break;case r.BOOL:this.writeBool(t,n);break;case r.STRING:this.writeString(t,n);break;case r.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case r.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case r.BYTES:this.writeBytes(t,n);break;case r.UINT32:this.writeUint32(t,n);break;case r.ENUM:this.writeEnum(t,n);break;case r.SFIXED32:this.writeSfixed32(t,n);break;case r.SFIXED64:this.writeSfixed64(t,n);break;case r.SINT32:this.writeSint32(t,n);break;case r.SINT64:this.writeSint64(t,n);break;case r.FHASH64:this.writeFixedHash64(t,n);break;case r.VHASH64:this.writeVarintHash64(t,n);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(t))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(t))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(t))},jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(t))},jspb.BinaryWriter.prototype.writeInt32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeInt64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeUint32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeUint64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSint32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(e,t))},jspb.BinaryWriter.prototype.writeSint64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(e,t))},jspb.BinaryWriter.prototype.writeSintHash64=function(e,t){t!=null&&this.writeZigzagVarintHash64_(e,t)},jspb.BinaryWriter.prototype.writeSint64String=function(e,t){t!=null&&this.writeZigzagVarint64String_(e,t)},jspb.BinaryWriter.prototype.writeFixed32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(t))},jspb.BinaryWriter.prototype.writeFixed64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(t))},jspb.BinaryWriter.prototype.writeFixed64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSfixed32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(t))},jspb.BinaryWriter.prototype.writeSfixed64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(t))},jspb.BinaryWriter.prototype.writeSfixed64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeFloat=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(t))},jspb.BinaryWriter.prototype.writeDouble=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(t))},jspb.BinaryWriter.prototype.writeBool=function(e,t){t!=null&&(goog.asserts.assert(typeof t=="boolean"||typeof t=="number"),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(t))},jspb.BinaryWriter.prototype.writeEnum=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeString=function(e,t){t!=null&&(e=this.beginDelimited_(e),this.encoder_.writeString(t),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeBytes=function(e,t){t!=null&&(t=jspb.utils.byteSourceToUint8Array(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),this.appendUint8Array_(t))},jspb.BinaryWriter.prototype.writeMessage=function(e,t,n){t!=null&&(e=this.beginDelimited_(e),n(t,this),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeMessageSet=function(e,t,n){t!=null&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e),e=this.beginDelimited_(3),n(t,this),this.endDelimited_(e),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeGroup=function(e,t,n){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),n(t,this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(t))},jspb.BinaryWriter.prototype.writeVarintHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(t))},jspb.BinaryWriter.prototype.writeSplitFixed64=function(e,t,n){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t,n)},jspb.BinaryWriter.prototype.writeSplitVarint64=function(e,t,n){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t,n)},jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(e,t,n){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT);var r=this.encoder_;jspb.utils.toZigzag64(t,n,function(o,l){r.writeSplitVarint64(o>>>0,l>>>0)})},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSignedVarint32_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeInt32String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSignedVarint64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(e,t,n,r){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitFixed64(e,n(t[o]),r(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(e,t,n,r){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitVarint64(e,n(t[o]),r(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(e,t,n,r){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitZigzagVarint64(e,n(t[o]),r(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeInt64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUnsignedVarint32_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUint32String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUnsignedVarint64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUint64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarint32_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarint64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarint64String_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarintHash64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixed32(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixed64(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixed64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSfixed32(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSfixed64(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSfixed64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFloat(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeDouble(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeBool(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeEnum(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedString=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeString(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeBytes(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(e,t,n){if(t!=null)for(var r=0;r<t.length;r++){var o=this.beginDelimited_(e);n(t[r],this),this.endDelimited_(o)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(e,t,n){if(t!=null)for(var r=0;r<t.length;r++)this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),n(t[r],this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixedHash64(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeVarintHash64(e,t[n])},jspb.BinaryWriter.prototype.writePackedInt32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeSignedVarint32(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeSignedVarint32(parseInt(t[n],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeSignedVarint64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(e,t,n,r){if(t!=null){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitFixed64(n(t[o]),r(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(e,t,n,r){if(t!=null){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitVarint64(n(t[o]),r(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(e,t,n,r){if(t!=null){e=this.beginDelimited_(e);for(var o=this.encoder_,l=0;l<t.length;l++)jspb.utils.toZigzag64(n(t[l]),r(t[l]),function(s,i){o.writeSplitVarint64(s>>>0,i>>>0)});this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++){var r=jspb.arith.Int64.fromString(t[n]);this.encoder_.writeSplitVarint64(r.lo,r.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeUnsignedVarint32(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeUnsignedVarint32(parseInt(t[n],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeUnsignedVarint64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++){var r=jspb.arith.UInt64.fromString(t[n]);this.encoder_.writeSplitVarint64(r.lo,r.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarint32(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarint64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(t[n]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarintHash64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeUint32(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeUint64(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++){var n=jspb.arith.UInt64.fromString(t[e]);this.encoder_.writeSplitFixed64(n.lo,n.hi)}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeInt32(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64String(t[e])},jspb.BinaryWriter.prototype.writePackedFloat=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeFloat(t[e])},jspb.BinaryWriter.prototype.writePackedDouble=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeDouble(t[e])},jspb.BinaryWriter.prototype.writePackedBool=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),e=0;e<t.length;e++)this.encoder_.writeBool(t[e])},jspb.BinaryWriter.prototype.writePackedEnum=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeEnum(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeFixedHash64(t[e])},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeVarintHash64(t[n]);this.endDelimited_(e)}},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(6),__webpack_require__(5).Buffer)},function(e,t,n){const{AbortController:r,AbortSignal:o}=typeof self!="undefined"?self:typeof window!="undefined"?window:void 0;e.exports=r,e.exports.AbortSignal=o,e.exports.default=r},function(e,t){var n=function(r){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}(typeof self!="undefined"?self:this);(function(r){(function(o){var l="URLSearchParams"in r,s="Symbol"in r&&"iterator"in Symbol,i="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),c="FormData"in r,u="ArrayBuffer"in r;if(u)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],R=ArrayBuffer.isView||function(C){return C&&m.indexOf(Object.prototype.toString.call(C))>-1};function E(C){if(typeof C!="string"&&(C=String(C)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(C))throw new TypeError("Invalid character in header field name");return C.toLowerCase()}function y(C){return typeof C!="string"&&(C=String(C)),C}function g(C){var b={next:function(){var P=C.shift();return{done:P===void 0,value:P}}};return s&&(b[Symbol.iterator]=function(){return b}),b}function _(C){this.map={},C instanceof _?C.forEach(function(b,P){this.append(P,b)},this):Array.isArray(C)?C.forEach(function(b){this.append(b[0],b[1])},this):C&&Object.getOwnPropertyNames(C).forEach(function(b){this.append(b,C[b])},this)}function T(C){if(C.bodyUsed)return Promise.reject(new TypeError("Already read"));C.bodyUsed=!0}function L(C){return new Promise(function(b,P){C.onload=function(){b(C.result)},C.onerror=function(){P(C.error)}})}function V(C){var b=new FileReader,P=L(b);return b.readAsArrayBuffer(C),P}function M(C){if(C.slice)return C.slice(0);var b=new Uint8Array(C.byteLength);return b.set(new Uint8Array(C)),b.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(C){var b;this._bodyInit=C,C?typeof C=="string"?this._bodyText=C:i&&Blob.prototype.isPrototypeOf(C)?this._bodyBlob=C:c&&FormData.prototype.isPrototypeOf(C)?this._bodyFormData=C:l&&URLSearchParams.prototype.isPrototypeOf(C)?this._bodyText=C.toString():u&&i&&(b=C)&&DataView.prototype.isPrototypeOf(b)?(this._bodyArrayBuffer=M(C.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(C)||R(C))?this._bodyArrayBuffer=M(C):this._bodyText=C=Object.prototype.toString.call(C):this._bodyText="",this.headers.get("content-type")||(typeof C=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l&&URLSearchParams.prototype.isPrototypeOf(C)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var C=T(this);if(C)return C;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?T(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(V)}),this.text=function(){var C,b,P,F=T(this);if(F)return F;if(this._bodyBlob)return C=this._bodyBlob,b=new FileReader,P=L(b),b.readAsText(C),P;if(this._bodyArrayBuffer)return Promise.resolve(function(D){for(var I=new Uint8Array(D),N=new Array(I.length),k=0;k<I.length;k++)N[k]=String.fromCharCode(I[k]);return N.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(Y)}),this.json=function(){return this.text().then(JSON.parse)},this}_.prototype.append=function(C,b){C=E(C),b=y(b);var P=this.map[C];this.map[C]=P?P+", "+b:b},_.prototype.delete=function(C){delete this.map[E(C)]},_.prototype.get=function(C){return C=E(C),this.has(C)?this.map[C]:null},_.prototype.has=function(C){return this.map.hasOwnProperty(E(C))},_.prototype.set=function(C,b){this.map[E(C)]=y(b)},_.prototype.forEach=function(C,b){for(var P in this.map)this.map.hasOwnProperty(P)&&C.call(b,this.map[P],P,this)},_.prototype.keys=function(){var C=[];return this.forEach(function(b,P){C.push(P)}),g(C)},_.prototype.values=function(){var C=[];return this.forEach(function(b){C.push(b)}),g(C)},_.prototype.entries=function(){var C=[];return this.forEach(function(b,P){C.push([P,b])}),g(C)},s&&(_.prototype[Symbol.iterator]=_.prototype.entries);var f=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(C,b){var P,F,D=(b=b||{}).body;if(C instanceof O){if(C.bodyUsed)throw new TypeError("Already read");this.url=C.url,this.credentials=C.credentials,b.headers||(this.headers=new _(C.headers)),this.method=C.method,this.mode=C.mode,this.signal=C.signal,D||C._bodyInit==null||(D=C._bodyInit,C.bodyUsed=!0)}else this.url=String(C);if(this.credentials=b.credentials||this.credentials||"same-origin",!b.headers&&this.headers||(this.headers=new _(b.headers)),this.method=(P=b.method||this.method||"GET",F=P.toUpperCase(),f.indexOf(F)>-1?F:P),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(D)}function Y(C){var b=new FormData;return C.trim().split("&").forEach(function(P){if(P){var F=P.split("="),D=F.shift().replace(/\+/g," "),I=F.join("=").replace(/\+/g," ");b.append(decodeURIComponent(D),decodeURIComponent(I))}}),b}function Z(C,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new _(b.headers),this.url=b.url||"",this._initBody(C)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})},A.call(O.prototype),A.call(Z.prototype),Z.prototype.clone=function(){return new Z(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},Z.error=function(){var C=new Z(null,{status:0,statusText:""});return C.type="error",C};var d=[301,302,303,307,308];Z.redirect=function(C,b){if(d.indexOf(b)===-1)throw new RangeError("Invalid status code");return new Z(null,{status:b,headers:{location:C}})},o.DOMException=r.DOMException;try{new o.DOMException}catch{o.DOMException=function(b,P){this.message=b,this.name=P;var F=Error(b);this.stack=F.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function p(C,b){return new Promise(function(P,F){var D=new O(C,b);if(D.signal&&D.signal.aborted)return F(new o.DOMException("Aborted","AbortError"));var I=new XMLHttpRequest;function N(){I.abort()}I.onload=function(){var k,w,h={status:I.status,statusText:I.statusText,headers:(k=I.getAllResponseHeaders()||"",w=new _,k.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(z){var X=z.split(":"),Q=X.shift().trim();if(Q){var te=X.join(":").trim();w.append(Q,te)}}),w)};h.url="responseURL"in I?I.responseURL:h.headers.get("X-Request-URL");var B="response"in I?I.response:I.responseText;P(new Z(B,h))},I.onerror=function(){F(new TypeError("Network request failed"))},I.ontimeout=function(){F(new TypeError("Network request failed"))},I.onabort=function(){F(new o.DOMException("Aborted","AbortError"))},I.open(D.method,D.url,!0),D.credentials==="include"?I.withCredentials=!0:D.credentials==="omit"&&(I.withCredentials=!1),"responseType"in I&&i&&(I.responseType="blob"),D.headers.forEach(function(k,w){I.setRequestHeader(w,k)}),D.signal&&(D.signal.addEventListener("abort",N),I.onreadystatechange=function(){I.readyState===4&&D.signal.removeEventListener("abort",N)}),I.send(D._bodyInit===void 0?null:D._bodyInit)})}p.polyfill=!0,r.fetch||(r.fetch=p,r.Headers=_,r.Request=O,r.Response=Z),o.Headers=_,o.Request=O,o.Response=Z,o.fetch=p})({})})(n),delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},function(e,t,n){(function(r){const o=n(211),l=n(52),s=(i,c,u)=>({from:s,EnvVarError:n(52),get:function(m){if(!m)return i;if(arguments.length>1)throw new l("It looks like you passed more than one argument to env.get(). Since env-var@6.0.0 this is no longer supported. To set a default value use env.get(TARGET).default(DEFAULT)");return o(i,m,c||{},u||function(){})},accessors:n(94),logger:n(225)(console.log,i.NODE_ENV)});e.exports=s(r.env)}).call(this,n(2))},function(e,t,n){var r=n(13),o=n(73),l=n(3).LEVEL,s=e.exports=function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){i.levels=u.levels,i.parent=u}),this.once("unpipe",function(u){u===i.parent&&(i.parent=null,i.close&&i.close())})};r.inherits(s,o),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);var m=this.level||this.parent&&this.parent.level;if(!m||this.levels[m]>=this.levels[i[l]]){if(i&&!this.format)return this.log(i,u);var R=void 0,E=void 0;try{E=this.format.transform(Object.assign({},i),this.format.options)}catch(y){R=y}if(R||!E){if(u(),R)throw R;return}return this.log(E,u)}return u(null)},s.prototype._writev=function(i,c){if(this.logv){var u=i.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var m=0;m<i.length;m++)if(this._accept(i[m]))if(!i[m].chunk||this.format){var R=void 0,E=void 0;try{E=this.format.transform(Object.assign({},i[m].chunk),this.format.options)}catch(y){R=y}if(R||!E){if(i[m].callback(),R)throw c(null),R}else this.log(E,i[m].callback)}else this.log(i[m].chunk,i[m].callback);return c(null)},s.prototype._accept=function(i){var c=i.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[l]])||!this.handleExceptions&&c.exception===!0)},s.prototype._nop=function(){}},function(e,t,n){(function(r){const o=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,l=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new c}abort(){this.signal.dispatchEvent("abort")}},s=typeof AbortSignal=="function",i=typeof l.AbortSignal=="function",c=s?AbortSignal:i?l.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(A){if(A==="abort"){this.aborted=!0;const f={type:A,target:this};this.onabort(f),this._listeners.forEach(O=>O(f),this)}}onabort(){}addEventListener(A,f){A==="abort"&&this._listeners.push(f)}removeEventListener(A,f){A==="abort"&&(this._listeners=this._listeners.filter(O=>O!==f))}},u=new Set,m=(A,f)=>{const O=`LRU_CACHE_OPTION_${A}`;y(O)&&g(O,`${A} option`,`options.${f}`,M)},R=(A,f)=>{const O=`LRU_CACHE_METHOD_${A}`;if(y(O)){const{prototype:Y}=M,{get:Z}=Object.getOwnPropertyDescriptor(Y,A);g(O,`${A} method`,`cache.${f}()`,Z)}},E=(...A)=>{typeof r=="object"&&r&&typeof r.emitWarning=="function"?r.emitWarning(...A):console.error(...A)},y=A=>!u.has(A),g=(A,f,O,Y)=>{u.add(A),E(`The ${f} is deprecated. Please use ${O} instead.`,"DeprecationWarning",A,Y)},_=A=>A&&A===Math.floor(A)&&A>0&&isFinite(A),T=A=>_(A)?A<=Math.pow(2,8)?Uint8Array:A<=Math.pow(2,16)?Uint16Array:A<=Math.pow(2,32)?Uint32Array:A<=Number.MAX_SAFE_INTEGER?L:null:null;class L extends Array{constructor(f){super(f),this.fill(0)}}class V{constructor(f){if(f===0)return[];const O=T(f);this.heap=new O(f),this.length=0}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}}class M{constructor(f={}){const{max:O=0,ttl:Y,ttlResolution:Z=1,ttlAutopurge:d,updateAgeOnGet:p,updateAgeOnHas:C,allowStale:b,dispose:P,disposeAfter:F,noDisposeOnSet:D,noUpdateTTL:I,maxSize:N=0,maxEntrySize:k=0,sizeCalculation:w,fetchMethod:h,fetchContext:B,noDeleteOnFetchRejection:z,noDeleteOnStaleGet:X}=f,{length:Q,maxAge:te,stale:q}=f instanceof M?{}:f;if(O!==0&&!_(O))throw new TypeError("max option must be a nonnegative integer");const H=O?T(O):Array;if(!H)throw new Error("invalid max value: "+O);if(this.max=O,this.maxSize=N,this.maxEntrySize=k||this.maxSize,this.sizeCalculation=w||Q,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=h||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=B,!this.fetchMethod&&B!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(O).fill(null),this.valList=new Array(O).fill(null),this.next=new H(O),this.prev=new H(O),this.head=0,this.tail=0,this.free=new V(O),this.initialFill=1,this.size=0,typeof P=="function"&&(this.dispose=P),typeof F=="function"?(this.disposeAfter=F,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!D,this.noUpdateTTL=!!I,this.noDeleteOnFetchRejection=!!z,this.maxEntrySize!==0){if(this.maxSize!==0&&!_(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!_(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!b||!!q,this.noDeleteOnStaleGet=!!X,this.updateAgeOnGet=!!p,this.updateAgeOnHas=!!C,this.ttlResolution=_(Z)||Z===0?Z:1,this.ttlAutopurge=!!d,this.ttl=Y||te||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const v="LRU_CACHE_UNBOUNDED";y(v)&&(u.add(v),E("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",v,M))}q&&m("stale","allowStale"),te&&m("maxAge","ttl"),Q&&m("length","sizeCalculation")}getRemainingTTL(f){return this.has(f,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new L(this.max),this.starts=new L(this.max),this.setItemTTL=(Y,Z,d=o.now())=>{if(this.starts[Y]=Z!==0?d:0,this.ttls[Y]=Z,Z!==0&&this.ttlAutopurge){const p=setTimeout(()=>{this.isStale(Y)&&this.delete(this.keyList[Y])},Z+1);p.unref&&p.unref()}},this.updateItemAge=Y=>{this.starts[Y]=this.ttls[Y]!==0?o.now():0};let f=0;const O=()=>{const Y=o.now();if(this.ttlResolution>0){f=Y;const Z=setTimeout(()=>f=0,this.ttlResolution);Z.unref&&Z.unref()}return Y};this.getRemainingTTL=Y=>{const Z=this.keyMap.get(Y);return Z===void 0?0:this.ttls[Z]===0||this.starts[Z]===0?1/0:this.starts[Z]+this.ttls[Z]-(f||O())},this.isStale=Y=>this.ttls[Y]!==0&&this.starts[Y]!==0&&(f||O())-this.starts[Y]>this.ttls[Y]}updateItemAge(f){}setItemTTL(f,O,Y){}isStale(f){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new L(this.max),this.removeItemSize=f=>{this.calculatedSize-=this.sizes[f],this.sizes[f]=0},this.requireSize=(f,O,Y,Z)=>{if(!_(Y)){if(!Z)throw new TypeError("invalid size value (must be positive integer)");if(typeof Z!="function")throw new TypeError("sizeCalculation must be a function");if(Y=Z(O,f),!_(Y))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return Y},this.addItemSize=(f,O)=>{this.sizes[f]=O;const Y=this.maxSize-this.sizes[f];for(;this.calculatedSize>Y;)this.evict(!0);this.calculatedSize+=this.sizes[f]}}removeItemSize(f){}addItemSize(f,O){}requireSize(f,O,Y,Z){if(Y||Z)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:f=this.allowStale}={}){if(this.size)for(let O=this.tail;this.isValidIndex(O)&&(!f&&this.isStale(O)||(yield O),O!==this.head);)O=this.prev[O]}*rindexes({allowStale:f=this.allowStale}={}){if(this.size)for(let O=this.head;this.isValidIndex(O)&&(!f&&this.isStale(O)||(yield O),O!==this.tail);)O=this.next[O]}isValidIndex(f){return this.keyMap.get(this.keyList[f])===f}*entries(){for(const f of this.indexes())yield[this.keyList[f],this.valList[f]]}*rentries(){for(const f of this.rindexes())yield[this.keyList[f],this.valList[f]]}*keys(){for(const f of this.indexes())yield this.keyList[f]}*rkeys(){for(const f of this.rindexes())yield this.keyList[f]}*values(){for(const f of this.indexes())yield this.valList[f]}*rvalues(){for(const f of this.rindexes())yield this.valList[f]}[Symbol.iterator](){return this.entries()}find(f,O={}){for(const Y of this.indexes())if(f(this.valList[Y],this.keyList[Y],this))return this.get(this.keyList[Y],O)}forEach(f,O=this){for(const Y of this.indexes())f.call(O,this.valList[Y],this.keyList[Y],this)}rforEach(f,O=this){for(const Y of this.rindexes())f.call(O,this.valList[Y],this.keyList[Y],this)}get prune(){return R("prune","purgeStale"),this.purgeStale}purgeStale(){let f=!1;for(const O of this.rindexes({allowStale:!0}))this.isStale(O)&&(this.delete(this.keyList[O]),f=!0);return f}dump(){const f=[];for(const O of this.indexes({allowStale:!0})){const Y=this.keyList[O],Z=this.valList[O],d={value:this.isBackgroundFetch(Z)?Z.__staleWhileFetching:Z};if(this.ttls){d.ttl=this.ttls[O];const p=o.now()-this.starts[O];d.start=Math.floor(Date.now()-p)}this.sizes&&(d.size=this.sizes[O]),f.unshift([Y,d])}return f}load(f){this.clear();for(const[O,Y]of f){if(Y.start){const Z=Date.now()-Y.start;Y.start=o.now()-Z}this.set(O,Y.value,Y)}}dispose(f,O,Y){}set(f,O,{ttl:Y=this.ttl,start:Z,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:C=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL}={}){if(p=this.requireSize(f,O,p,C),this.maxEntrySize&&p>this.maxEntrySize)return this;let P=this.size===0?void 0:this.keyMap.get(f);if(P===void 0)P=this.newIndex(),this.keyList[P]=f,this.valList[P]=O,this.keyMap.set(f,P),this.next[this.tail]=P,this.prev[P]=this.tail,this.tail=P,this.size++,this.addItemSize(P,p),b=!1;else{const F=this.valList[P];O!==F&&(this.isBackgroundFetch(F)?F.__abortController.abort():d||(this.dispose(F,f,"set"),this.disposeAfter&&this.disposed.push([F,f,"set"])),this.removeItemSize(P),this.valList[P]=O,this.addItemSize(P,p)),this.moveToTail(P)}if(Y===0||this.ttl!==0||this.ttls||this.initializeTTLTracking(),b||this.setItemTTL(P,Y,Z),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const f=this.valList[this.head];return this.evict(!0),f}}evict(f){const O=this.head,Y=this.keyList[O],Z=this.valList[O];return this.isBackgroundFetch(Z)?Z.__abortController.abort():(this.dispose(Z,Y,"evict"),this.disposeAfter&&this.disposed.push([Z,Y,"evict"])),this.removeItemSize(O),f&&(this.keyList[O]=null,this.valList[O]=null,this.free.push(O)),this.head=this.next[O],this.keyMap.delete(Y),this.size--,O}has(f,{updateAgeOnHas:O=this.updateAgeOnHas}={}){const Y=this.keyMap.get(f);return Y!==void 0&&!this.isStale(Y)&&(O&&this.updateItemAge(Y),!0)}peek(f,{allowStale:O=this.allowStale}={}){const Y=this.keyMap.get(f);if(Y!==void 0&&(O||!this.isStale(Y))){const Z=this.valList[Y];return this.isBackgroundFetch(Z)?Z.__staleWhileFetching:Z}}backgroundFetch(f,O,Y,Z){const d=O===void 0?void 0:this.valList[O];if(this.isBackgroundFetch(d))return d;const p=new l,C={signal:p.signal,options:Y,context:Z},b=new Promise(P=>P(this.fetchMethod(f,d,C))).then(P=>(p.signal.aborted||this.set(f,P,C.options),P),P=>{if(this.valList[O]===b&&(!Y.noDeleteOnFetchRejection||b.__staleWhileFetching===void 0?this.delete(f):this.valList[O]=b.__staleWhileFetching),b.__returned===b)throw P});return b.__abortController=p,b.__staleWhileFetching=d,b.__returned=null,O===void 0?(this.set(f,b,C.options),O=this.keyMap.get(f)):this.valList[O]=b,b}isBackgroundFetch(f){return f&&typeof f=="object"&&typeof f.then=="function"&&Object.prototype.hasOwnProperty.call(f,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(f,"__returned")&&(f.__returned===f||f.__returned===null)}async fetch(f,{allowStale:O=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:Z=this.noDeleteOnStaleGet,ttl:d=this.ttl,noDisposeOnSet:p=this.noDisposeOnSet,size:C=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:P=this.noUpdateTTL,noDeleteOnFetchRejection:F=this.noDeleteOnFetchRejection,fetchContext:D=this.fetchContext,forceRefresh:I=!1}={}){if(!this.fetchMethod)return this.get(f,{allowStale:O,updateAgeOnGet:Y,noDeleteOnStaleGet:Z});const N={allowStale:O,updateAgeOnGet:Y,noDeleteOnStaleGet:Z,ttl:d,noDisposeOnSet:p,size:C,sizeCalculation:b,noUpdateTTL:P,noDeleteOnFetchRejection:F};let k=this.keyMap.get(f);if(k===void 0){const w=this.backgroundFetch(f,k,N,D);return w.__returned=w}{const w=this.valList[k];if(this.isBackgroundFetch(w))return O&&w.__staleWhileFetching!==void 0?w.__staleWhileFetching:w.__returned=w;if(!I&&!this.isStale(k))return this.moveToTail(k),Y&&this.updateItemAge(k),w;const h=this.backgroundFetch(f,k,N,D);return O&&h.__staleWhileFetching!==void 0?h.__staleWhileFetching:h.__returned=h}}get(f,{allowStale:O=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:Z=this.noDeleteOnStaleGet}={}){const d=this.keyMap.get(f);if(d!==void 0){const p=this.valList[d],C=this.isBackgroundFetch(p);return this.isStale(d)?C?O?p.__staleWhileFetching:void 0:(Z||this.delete(f),O?p:void 0):C?void 0:(this.moveToTail(d),Y&&this.updateItemAge(d),p)}}connect(f,O){this.prev[O]=f,this.next[f]=O}moveToTail(f){f!==this.tail&&(f===this.head?this.head=this.next[f]:this.connect(this.prev[f],this.next[f]),this.connect(this.tail,f),this.tail=f)}get del(){return R("del","delete"),this.delete}delete(f){let O=!1;if(this.size!==0){const Y=this.keyMap.get(f);if(Y!==void 0)if(O=!0,this.size===1)this.clear();else{this.removeItemSize(Y);const Z=this.valList[Y];this.isBackgroundFetch(Z)?Z.__abortController.abort():(this.dispose(Z,f,"delete"),this.disposeAfter&&this.disposed.push([Z,f,"delete"])),this.keyMap.delete(f),this.keyList[Y]=null,this.valList[Y]=null,Y===this.tail?this.tail=this.prev[Y]:Y===this.head?this.head=this.next[Y]:(this.next[this.prev[Y]]=this.next[Y],this.prev[this.next[Y]]=this.prev[Y]),this.size--,this.free.push(Y)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return O}clear(){for(const f of this.rindexes({allowStale:!0})){const O=this.valList[f];if(this.isBackgroundFetch(O))O.__abortController.abort();else{const Y=this.keyList[f];this.dispose(O,Y,"delete"),this.disposeAfter&&this.disposed.push([O,Y,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return R("reset","clear"),this.clear}get length(){return((f,O)=>{const Y=`LRU_CACHE_PROPERTY_${f}`;if(y(Y)){const{prototype:Z}=M,{get:d}=Object.getOwnPropertyDescriptor(Z,f);g(Y,`${f} property`,`cache.${O}`,d)}})("length","size"),this.size}static get AbortController(){return l}static get AbortSignal(){return c}}e.exports=M}).call(this,n(2))},function(e,t,n){var r=n(41).Colorizer;e.exports=function(o){return r.addColors(o.colors||o),o}},function(e,t,n){var r={};e.exports=r,r.themes={};var o=n(13),l=r.styles=n(109),s=Object.defineProperties,i=new RegExp(/[\r\n]+/g);r.supportsColor=n(110).supportsColor,r.enabled===void 0&&(r.enabled=r.supportsColor()!==!1),r.enable=function(){r.enabled=!0},r.disable=function(){r.enabled=!1},r.stripColors=r.strip=function(T){return(""+T).replace(/\x1B\[\d+m/g,"")},r.stylize=function(T,L){return r.enabled?l[L].open+T+l[L].close:T+""};var c=/[|\\{}()[\]^$+*?.]/g;function u(T){var L=function V(){return y.apply(V,arguments)};return L._styles=T,L.__proto__=E,L}var m,R=(m={},l.grey=l.gray,Object.keys(l).forEach(function(T){l[T].closeRe=new RegExp(function(L){if(typeof L!="string")throw new TypeError("Expected a string");return L.replace(c,"\\$&")}(l[T].close),"g"),m[T]={get:function(){return u(this._styles.concat(T))}}}),m),E=s(function(){},R);function y(){var T=Array.prototype.slice.call(arguments),L=T.map(function(O){return O!==void 0&&O.constructor===String?O:o.inspect(O)}).join(" ");if(!r.enabled||!L)return L;for(var V=L.indexOf(`
35
- `)!=-1,M=this._styles,A=M.length;A--;){var f=l[M[A]];L=f.open+L.replace(f.closeRe,f.open)+f.close,V&&(L=L.replace(i,function(O){return f.close+O+f.open}))}return L}r.setTheme=function(T){if(typeof T!="string")for(var L in T)(function(V){r[V]=function(M){if(typeof T[V]=="object"){var A=M;for(var f in T[V])A=r[T[V][f]](A);return A}return r[T[V]](M)}})(L);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var g=function(T,L){var V=L.split("");return(V=V.map(T)).join("")};for(var _ in r.trap=n(112),r.zalgo=n(113),r.maps={},r.maps.america=n(114)(r),r.maps.zebra=n(115)(r),r.maps.rainbow=n(116)(r),r.maps.random=n(117)(r),r.maps)(function(T){r[T]=function(L){return g(r.maps[T],L)}})(_);s(r,function(){var T={};return Object.keys(R).forEach(function(L){T[L]={get:function(){return u([L])}}}),T}())},function(e,t){e.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(n,r){n.super_=r;var o=function(){};o.prototype=r.prototype,n.prototype=new o,n.prototype.constructor=n}},function(e,t){var n={};e.exports=n;var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(r).forEach(function(o){var l=r[o],s=n[o]=[];s.open="\x1B["+l[0]+"m",s.close="\x1B["+l[1]+"m"})},function(e,t,n){(function(r){var o=n(18),l=n(111),s=r.env,i=void 0;function c(u){return function(m){return m!==0&&{level:m,hasBasic:!0,has256:m>=2,has16m:m>=3}}(function(m){if(i===!1)return 0;if(l("color=16m")||l("color=full")||l("color=truecolor"))return 3;if(l("color=256"))return 2;if(m&&!m.isTTY&&i!==!0)return 0;var R=i?1:0;if(r.platform==="win32"){var E=o.release().split(".");return Number(r.versions.node.split(".")[0])>=8&&Number(E[0])>=10&&Number(E[2])>=10586?Number(E[2])>=14931?3:2:1}return"CI"in s?["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(y){return y in s})||s.CI_NAME==="codeship"?1:R:"TEAMCITY_VERSION"in s?/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0:"TERM_PROGRAM"in s?(parseInt("445".split(".")[0],10),2):/-256(color)?$/i.test("xterm-256color")?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test("xterm-256color")||"COLORTERM"in s?1:R}(u))}l("no-color")||l("no-colors")||l("color=false")?i=!1:(l("color")||l("colors")||l("color=true")||l("color=always"))&&(i=!0),"FORCE_COLOR"in s&&(i=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0),e.exports={supportsColor:c,stdout:c(r.stdout),stderr:c(r.stderr)}}).call(this,n(2))},function(e,t,n){(function(r){e.exports=function(o,l){var s=(l=l||r.argv).indexOf("--"),i=/^-{1,2}/.test(o)?"":"--",c=l.indexOf(i+o);return c!==-1&&(s===-1||c<s)}}).call(this,n(2))},function(e,t){e.exports=function(n,r){var o="";n=(n=n||"Run the trap, drop the bass").split("");var l={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return n.forEach(function(s){s=s.toLowerCase();var i=l[s]||[" "],c=Math.floor(Math.random()*i.length);o+=l[s]!==void 0?l[s][c]:s}),o}},function(e,t){e.exports=function(n,r){n=n||" he is here ";var o={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},l=[].concat(o.up,o.down,o.mid);function s(c){return Math.floor(Math.random()*c)}function i(c){var u=!1;return l.filter(function(m){u=m===c}),u}return function(c,u){var m,R,E="";for(R in(u=u||{}).up=u.up===void 0||u.up,u.mid=u.mid===void 0||u.mid,u.down=u.down===void 0||u.down,u.size=u.size!==void 0?u.size:"maxi",c=c.split(""))if(!i(R)){switch(E+=c[R],m={up:0,down:0,mid:0},u.size){case"mini":m.up=s(8),m.mid=s(2),m.down=s(8);break;case"maxi":m.up=s(16)+3,m.mid=s(4)+1,m.down=s(64)+3;break;default:m.up=s(8)+1,m.mid=s(6)/2,m.down=s(8)+1}var y=["up","mid","down"];for(var g in y)for(var _=y[g],T=0;T<=m[_];T++)u[_]&&(E+=o[_][s(o[_].length)])}return E}(n,r)}},function(e,t){e.exports=function(n){return function(r,o,l){if(r===" ")return r;switch(o%3){case 0:return n.red(r);case 1:return n.white(r);case 2:return n.blue(r)}}}},function(e,t){e.exports=function(n){return function(r,o,l){return o%2==0?r:n.inverse(r)}}},function(e,t){e.exports=function(n){var r=["red","yellow","green","blue","magenta"];return function(o,l,s){return o===" "?o:n[r[l++%r.length]](o)}}},function(e,t){e.exports=function(n){var r=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(o,l,s){return o===" "?o:n[r[Math.round(Math.random()*(r.length-2))]](o)}}},function(e,t,n){Object.defineProperty(t,"cli",{value:n(119)}),Object.defineProperty(t,"npm",{value:n(120)}),Object.defineProperty(t,"syslog",{value:n(121)})},function(e,t,n){t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},function(e,t,n){t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},function(e,t,n){t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},function(e,t,n){var r=n(12);e.exports=r(function(o){return o.message=" ".concat(o.message),o})},function(e,t,n){function r(R,E){if(!(R instanceof E))throw new TypeError("Cannot call a class as a function")}function o(R,E){for(var y=0;y<E.length;y++){var g=E[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(R,g.key,g)}}var l=n(41).Colorizer,s=n(60).Padder,i=n(3),c=i.configs,u=i.MESSAGE,m=function(){function R(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,R),g.levels||(g.levels=c.npm.levels),this.colorizer=new l(g),this.padder=new s(g),this.options=g}var E,y;return E=R,(y=[{key:"transform",value:function(g,_){return this.colorizer.transform(this.padder.transform(g,_),_),g[u]="".concat(g.level,":").concat(g.message),g}}])&&o(E.prototype,y),R}();e.exports=function(R){return new m(R)},e.exports.Format=m},function(e,t,n){var r=n(12);function o(s){if(s.every(l))return function(i){for(var c=i,u=0;u<s.length;u++)if(!(c=s[u].transform(c,s[u].options)))return!1;return c}}function l(s){if(typeof s.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
36
- `));return!0}e.exports=function(){for(var s=arguments.length,i=new Array(s),c=0;c<s;c++)i[c]=arguments[c];var u=r(o(i)),m=u();return m.Format=u.Format,m},e.exports.cascade=o},function(e,t,n){(function(r){var o=n(12),l=n(3).MESSAGE,s=n(35);function i(c,u){return u instanceof r?u.toString("base64"):typeof u=="bigint"?u.toString():u}e.exports=o(function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return c[l]=(u.stable?s.stableStringify:s)(c,u.replacer||i,u.space),c})}).call(this,n(5).Buffer)},function(e,t,n){t.byteLength=function(R){var E=u(R),y=E[0],g=E[1];return 3*(y+g)/4-g},t.toByteArray=function(R){for(var E,y=u(R),g=y[0],_=y[1],T=new l(function(A,f,O){return 3*(f+O)/4-O}(0,g,_)),L=0,V=_>0?g-4:g,M=0;M<V;M+=4)E=o[R.charCodeAt(M)]<<18|o[R.charCodeAt(M+1)]<<12|o[R.charCodeAt(M+2)]<<6|o[R.charCodeAt(M+3)],T[L++]=E>>16&255,T[L++]=E>>8&255,T[L++]=255&E;return _===2&&(E=o[R.charCodeAt(M)]<<2|o[R.charCodeAt(M+1)]>>4,T[L++]=255&E),_===1&&(E=o[R.charCodeAt(M)]<<10|o[R.charCodeAt(M+1)]<<4|o[R.charCodeAt(M+2)]>>2,T[L++]=E>>8&255,T[L++]=255&E),T},t.fromByteArray=function(R){for(var E,y=R.length,g=y%3,_=[],T=0,L=y-g;T<L;T+=16383)_.push(m(R,T,T+16383>L?L:T+16383));return g===1?(E=R[y-1],_.push(r[E>>2]+r[E<<4&63]+"==")):g===2&&(E=(R[y-2]<<8)+R[y-1],_.push(r[E>>10]+r[E>>4&63]+r[E<<2&63]+"=")),_.join("")};for(var r=[],o=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,c=s.length;i<c;++i)r[i]=s[i],o[s.charCodeAt(i)]=i;function u(R){var E=R.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=R.indexOf("=");return y===-1&&(y=E),[y,y===E?0:4-y%4]}function m(R,E,y){for(var g,_,T=[],L=E;L<y;L+=3)g=(R[L]<<16&16711680)+(R[L+1]<<8&65280)+(255&R[L+2]),T.push(r[(_=g)>>18&63]+r[_>>12&63]+r[_>>6&63]+r[63&_]);return T.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(n,r,o,l,s){var i,c,u=8*s-l-1,m=(1<<u)-1,R=m>>1,E=-7,y=o?s-1:0,g=o?-1:1,_=n[r+y];for(y+=g,i=_&(1<<-E)-1,_>>=-E,E+=u;E>0;i=256*i+n[r+y],y+=g,E-=8);for(c=i&(1<<-E)-1,i>>=-E,E+=l;E>0;c=256*c+n[r+y],y+=g,E-=8);if(i===0)i=1-R;else{if(i===m)return c?NaN:1/0*(_?-1:1);c+=Math.pow(2,l),i-=R}return(_?-1:1)*c*Math.pow(2,i-l)},t.write=function(n,r,o,l,s,i){var c,u,m,R=8*i-s-1,E=(1<<R)-1,y=E>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=l?0:i-1,T=l?1:-1,L=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,c=E):(c=Math.floor(Math.log(r)/Math.LN2),r*(m=Math.pow(2,-c))<1&&(c--,m*=2),(r+=c+y>=1?g/m:g*Math.pow(2,1-y))*m>=2&&(c++,m/=2),c+y>=E?(u=0,c=E):c+y>=1?(u=(r*m-1)*Math.pow(2,s),c+=y):(u=r*Math.pow(2,y-1)*Math.pow(2,s),c=0));s>=8;n[o+_]=255&u,_+=T,u/=256,s-=8);for(c=c<<s|u,R+=s;R>0;n[o+_]=255&c,_+=T,c/=256,R-=8);n[o+_-T]|=128*L}},function(e,t,n){var r=n(12);e.exports=r(function(o,l){return l.message?(o.message="[".concat(l.label,"] ").concat(o.message),o):(o.label=l.label,o)})},function(e,t,n){var r=n(12),o=n(3).MESSAGE,l=n(35);e.exports=r(function(s){var i={};return s.message&&(i["@message"]=s.message,delete s.message),s.timestamp&&(i["@timestamp"]=s.timestamp,delete s.timestamp),i["@fields"]=s,s[o]=l(i),s})},function(e,t,n){var r=n(12);function o(s,i,c){var u,m,R,E=i.reduce(function(g,_){return g[_]=s[_],delete s[_],g},{}),y=Object.keys(s).reduce(function(g,_){return g[_]=s[_],delete s[_],g},{});return Object.assign(s,E,(R=y,(m=c)in(u={})?Object.defineProperty(u,m,{value:R,enumerable:!0,configurable:!0,writable:!0}):u[m]=R,u)),s}function l(s,i,c){return s[c]=i.reduce(function(u,m){return u[m]=s[m],delete s[m],u},{}),s}e.exports=r(function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c="metadata";i.key&&(c=i.key);var u=[];return i.fillExcept||i.fillWith||(u.push("level"),u.push("message")),i.fillExcept&&(u=i.fillExcept),u.length>0?o(s,u,c):i.fillWith?l(s,i.fillWith,c):s})},function(e,t,n){var r=n(13).inspect,o=n(12),l=n(3),s=l.LEVEL,i=l.MESSAGE,c=l.SPLAT;e.exports=o(function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=Object.assign({},u);return delete R[s],delete R[i],delete R[c],u[i]=r(R,!1,m.depth||null,m.colorize),u})},function(e,t,n){function r(s,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}var o=n(3).MESSAGE,l=function(){function s(u){(function(m,R){if(!(m instanceof R))throw new TypeError("Cannot call a class as a function")})(this,s),this.template=u}var i,c;return i=s,(c=[{key:"transform",value:function(u){return u[o]=this.template(u),u}}])&&r(i.prototype,c),s}();e.exports=function(s){return new l(s)},e.exports.Printf=e.exports.Format=l},function(e,t,n){var r=n(12),o=n(3).MESSAGE,l=n(35);e.exports=r(function(s){var i=l(Object.assign({},s,{level:void 0,message:void 0,splat:void 0})),c=s.padding&&s.padding[s.level]||"";return s[o]=i!=="{}"?"".concat(s.level,":").concat(c," ").concat(s.message," ").concat(i):"".concat(s.level,":").concat(c," ").concat(s.message),s})},function(e,t,n){function r(R){return function(E){if(Array.isArray(E))return o(E)}(R)||function(E){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(E))return Array.from(E)}(R)||function(E,y){if(!!E){if(typeof E=="string")return o(E,y);var g=Object.prototype.toString.call(E).slice(8,-1);if(g==="Object"&&E.constructor&&(g=E.constructor.name),g==="Map"||g==="Set")return Array.from(E);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return o(E,y)}}(R)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
37
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(R,E){(E==null||E>R.length)&&(E=R.length);for(var y=0,g=new Array(E);y<E;y++)g[y]=R[y];return g}function l(R,E){for(var y=0;y<E.length;y++){var g=E[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(R,g.key,g)}}var s=n(13),i=n(3).SPLAT,c=/%[scdjifoO%]/g,u=/%%/g,m=function(){function R(g){(function(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")})(this,R),this.options=g}var E,y;return E=R,(y=[{key:"_splat",value:function(g,_){var T=g.message,L=g[i]||g.splat||[],V=T.match(u),M=V&&V.length||0,A=_.length-M-L.length,f=A<0?L.splice(A,-1*A):[],O=f.length;if(O)for(var Y=0;Y<O;Y++)Object.assign(g,f[Y]);return g.message=s.format.apply(s,[T].concat(r(L))),g}},{key:"transform",value:function(g){var _=g.message,T=g[i]||g.splat;if(!T||!T.length)return g;var L=_&&_.match&&_.match(c);if(!L&&(T||T.length)){var V=T.length>1?T.splice(0):T,M=V.length;if(M)for(var A=0;A<M;A++)Object.assign(g,V[A]);return g}return L?this._splat(g,L):g}}])&&l(E.prototype,y),R}();e.exports=function(R){return new m(R)}},function(e,t,n){var r=n(136),o=n(12);e.exports=o(function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.format&&(l.timestamp=typeof s.format=="function"?s.format():r.format(new Date,s.format)),l.timestamp||(l.timestamp=new Date().toISOString()),s.alias&&(l[s.alias]=l.timestamp),l})},function(e,t,n){n.r(t),n.d(t,"assign",function(){return c}),n.d(t,"format",function(){return p}),n.d(t,"parse",function(){return C}),n.d(t,"defaultI18n",function(){return E}),n.d(t,"setGlobalDateI18n",function(){return g}),n.d(t,"setGlobalDateMasks",function(){return d});var r=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",l=/\[([^]*?)\]/gm;function s(P,F){for(var D=[],I=0,N=P.length;I<N;I++)D.push(P[I].substr(0,F));return D}var i=function(P){return function(F,D){var I=D[P].map(function(N){return N.toLowerCase()}).indexOf(F.toLowerCase());return I>-1?I:null}};function c(P){for(var F=[],D=1;D<arguments.length;D++)F[D-1]=arguments[D];for(var I=0,N=F;I<N.length;I++){var k=N[I];for(var w in k)P[w]=k[w]}return P}var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"],R=s(m,3),E={dayNamesShort:s(u,3),dayNames:u,monthNamesShort:R,monthNames:m,amPm:["am","pm"],DoFn:function(P){return P+["th","st","nd","rd"][P%10>3?0:(P-P%10!=10?1:0)*P%10]}},y=c({},E),g=function(P){return y=c(y,P)},_=function(P){return P.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},T=function(P,F){for(F===void 0&&(F=2),P=String(P);P.length<F;)P="0"+P;return P},L={D:function(P){return String(P.getDate())},DD:function(P){return T(P.getDate())},Do:function(P,F){return F.DoFn(P.getDate())},d:function(P){return String(P.getDay())},dd:function(P){return T(P.getDay())},ddd:function(P,F){return F.dayNamesShort[P.getDay()]},dddd:function(P,F){return F.dayNames[P.getDay()]},M:function(P){return String(P.getMonth()+1)},MM:function(P){return T(P.getMonth()+1)},MMM:function(P,F){return F.monthNamesShort[P.getMonth()]},MMMM:function(P,F){return F.monthNames[P.getMonth()]},YY:function(P){return T(String(P.getFullYear()),4).substr(2)},YYYY:function(P){return T(P.getFullYear(),4)},h:function(P){return String(P.getHours()%12||12)},hh:function(P){return T(P.getHours()%12||12)},H:function(P){return String(P.getHours())},HH:function(P){return T(P.getHours())},m:function(P){return String(P.getMinutes())},mm:function(P){return T(P.getMinutes())},s:function(P){return String(P.getSeconds())},ss:function(P){return T(P.getSeconds())},S:function(P){return String(Math.round(P.getMilliseconds()/100))},SS:function(P){return T(Math.round(P.getMilliseconds()/10),2)},SSS:function(P){return T(P.getMilliseconds(),3)},a:function(P,F){return P.getHours()<12?F.amPm[0]:F.amPm[1]},A:function(P,F){return P.getHours()<12?F.amPm[0].toUpperCase():F.amPm[1].toUpperCase()},ZZ:function(P){var F=P.getTimezoneOffset();return(F>0?"-":"+")+T(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4)},Z:function(P){var F=P.getTimezoneOffset();return(F>0?"-":"+")+T(Math.floor(Math.abs(F)/60),2)+":"+T(Math.abs(F)%60,2)}},V=function(P){return+P-1},M=[null,"[1-9]\\d?"],A=[null,o],f=["isPm",o,function(P,F){var D=P.toLowerCase();return D===F.amPm[0]?0:D===F.amPm[1]?1:null}],O=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(P){var F=(P+"").match(/([+-]|\d\d)/gi);if(F){var D=60*+F[1]+parseInt(F[2],10);return F[0]==="+"?D:-D}return 0}],Y={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+o,function(P){return parseInt(P,10)}],M:["month","[1-9]\\d?",V],MM:["month","\\d\\d",V],YY:["year","\\d\\d",function(P){var F=+(""+new Date().getFullYear()).substr(0,2);return+(""+(+P>68?F-1:F)+P)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(P){return 100*+P}],SS:["millisecond","\\d\\d",function(P){return 10*+P}],SSS:["millisecond","\\d{3}"],d:M,dd:M,ddd:A,dddd:A,MMM:["month",o,i("monthNamesShort")],MMMM:["month",o,i("monthNames")],a:f,A:f,ZZ:O,Z:O},Z={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},d=function(P){return c(Z,P)},p=function(P,F,D){if(F===void 0&&(F=Z.default),D===void 0&&(D={}),typeof P=="number"&&(P=new Date(P)),Object.prototype.toString.call(P)!=="[object Date]"||isNaN(P.getTime()))throw new Error("Invalid Date pass to format");var I=[];F=(F=Z[F]||F).replace(l,function(k,w){return I.push(w),"@@@"});var N=c(c({},y),D);return(F=F.replace(r,function(k){return L[k](P,N)})).replace(/@@@/g,function(){return I.shift()})};function C(P,F,D){if(D===void 0&&(D={}),typeof F!="string")throw new Error("Invalid format in fecha parse");if(F=Z[F]||F,P.length>1e3)return null;var I={year:new Date().getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},N=[],k=[],w=F.replace(l,function($,ne){return k.push(_(ne)),"@@@"}),h={},B={};w=_(w).replace(r,function($){var ne=Y[$],se=ne[0],ge=ne[1],ve=ne[3];if(h[se])throw new Error("Invalid format. "+se+" specified twice in format");return h[se]=!0,ve&&(B[ve]=!0),N.push(ne),"("+ge+")"}),Object.keys(B).forEach(function($){if(!h[$])throw new Error("Invalid format. "+$+" is required in specified format")}),w=w.replace(/@@@/g,function(){return k.shift()});var z=P.match(new RegExp(w,"i"));if(!z)return null;for(var X=c(c({},y),D),Q=1;Q<z.length;Q++){var te=N[Q-1],q=te[0],H=te[2],v=H?H(z[Q],X):+z[Q];if(v==null)return null;I[q]=v}I.isPm===1&&I.hour!=null&&+I.hour!=12?I.hour=+I.hour+12:I.isPm===0&&+I.hour==12&&(I.hour=0);for(var S=new Date(I.year,I.month,I.day,I.hour,I.minute,I.second,I.millisecond),U=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],J=(Q=0,U.length);Q<J;Q++)if(h[U[Q][0]]&&I[U[Q][0]]!==S[U[Q][1]]())return null;return I.timezoneOffset==null?S:new Date(Date.UTC(I.year,I.month,I.day,I.hour,I.minute-I.timezoneOffset,I.second,I.millisecond))}var b={format:p,parse:C,defaultI18n:E,setGlobalDateI18n:g,setGlobalDateMasks:d};t.default=b},function(e,t,n){var r=n(59),o=n(12),l=n(3).MESSAGE;e.exports=o(function(s,i){return i.level!==!1&&(s.level=r.strip(s.level)),i.message!==!1&&(s.message=r.strip(s.message)),i.raw!==!1&&s[l]&&(s[l]=r.strip(s[l])),s})},function(e){e.exports=JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.3.3","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["Jarrett Cruger <jcrugzz@gmail.com>","Chris Alderson <chrisalderson@protonmail.com>","David Hyde <dabh@stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"async":"^3.1.0","@dabh/diagnostics":"^2.0.2","is-stream":"^2.0.0","logform":"^2.2.0","one-time":"^1.0.0","readable-stream":"^3.4.0","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.4.0"},"devDependencies":{"@babel/cli":"^7.10.3","@babel/core":"^7.10.3","@babel/preset-env":"^7.10.3","@types/node":"^14.0.13","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","colors":"^1.4.0","cross-spawn-async":"^2.2.5","eslint-config-populist":"^4.2.0","hock":"^1.4.1","mocha":"^8.0.1","nyc":"^15.1.0","rimraf":"^3.0.2","split2":"^3.1.1","std-mocks":"^1.0.1","through2":"^3.0.1","winston-compat":"^0.1.5"},"main":"./lib/winston","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"populist lib/*.js lib/winston/*.js lib/winston/**/*.js","pretest":"npm run lint","test":"nyc --reporter=text --reporter lcov npm run test:mocha","test:mocha":"mocha test/*.test.js test/**/*.test.js --exit","build":"./node_modules/.bin/rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 6.4.0"},"license":"MIT"}')},function(e,t,n){Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:function(){return n(140)}}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:function(){return n(149)}}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:function(){return n(189)}}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:function(){return n(201)}})},function(e,t,n){(function(r){function o(T){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L})(T)}function l(T,L){if(!(T instanceof L))throw new TypeError("Cannot call a class as a function")}function s(T,L){for(var V=0;V<L.length;V++){var M=L[V];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(T,M.key,M)}}function i(T,L){return(i=Object.setPrototypeOf||function(V,M){return V.__proto__=M,V})(T,L)}function c(T){var L=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var V,M=m(T);if(L){var A=m(this).constructor;V=Reflect.construct(M,arguments,A)}else V=M.apply(this,arguments);return u(this,V)}}function u(T,L){return!L||o(L)!=="object"&&typeof L!="function"?function(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}(T):L}function m(T){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)})(T)}var R=n(18),E=n(3),y=E.LEVEL,g=E.MESSAGE,_=n(20);e.exports=function(T){(function(f,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(O&&O.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),O&&i(f,O)})(A,T);var L,V,M=c(A);function A(){var f,O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return l(this,A),(f=M.call(this,O)).name=O.name||"console",f.stderrLevels=f._stringArrayToSet(O.stderrLevels),f.consoleWarnLevels=f._stringArrayToSet(O.consoleWarnLevels),f.eol=O.eol||R.EOL,f.setMaxListeners(30),f}return L=A,(V=[{key:"log",value:function(f,O){var Y=this;return r(function(){return Y.emit("logged",f)}),this.stderrLevels[f[y]]?(console._stderr?console._stderr.write("".concat(f[g]).concat(this.eol)):console.error(f[g]),void(O&&O())):this.consoleWarnLevels[f[y]]?(console._stderr?console._stderr.write("".concat(f[g]).concat(this.eol)):console.warn(f[g]),void(O&&O())):(console._stdout?console._stdout.write("".concat(f[g]).concat(this.eol)):console.log(f[g]),void(O&&O()))}},{key:"_stringArrayToSet",value:function(f,O){if(!f)return{};if(O=O||"Cannot make set from type other than Array of string elements",!Array.isArray(f))throw new Error(O);return f.reduce(function(Y,Z){if(typeof Z!="string")throw new Error(O);return Y[Z]=!0,Y},{})}}])&&s(L.prototype,V),A}(_)}).call(this,n(15).setImmediate)},function(e,t,n){(function(r,o){(function(l,s){if(!l.setImmediate){var i,c,u,m,R,E=1,y={},g=!1,_=l.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(l);T=T&&T.setTimeout?T:l,{}.toString.call(l.process)==="[object process]"?i=function(M){o.nextTick(function(){V(M)})}:function(){if(l.postMessage&&!l.importScripts){var M=!0,A=l.onmessage;return l.onmessage=function(){M=!1},l.postMessage("","*"),l.onmessage=A,M}}()?(m="setImmediate$"+Math.random()+"$",R=function(M){M.source===l&&typeof M.data=="string"&&M.data.indexOf(m)===0&&V(+M.data.slice(m.length))},l.addEventListener?l.addEventListener("message",R,!1):l.attachEvent("onmessage",R),i=function(M){l.postMessage(m+M,"*")}):l.MessageChannel?((u=new MessageChannel).port1.onmessage=function(M){V(M.data)},i=function(M){u.port2.postMessage(M)}):_&&"onreadystatechange"in _.createElement("script")?(c=_.documentElement,i=function(M){var A=_.createElement("script");A.onreadystatechange=function(){V(M),A.onreadystatechange=null,c.removeChild(A),A=null},c.appendChild(A)}):i=function(M){setTimeout(V,0,M)},T.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var A=new Array(arguments.length-1),f=0;f<A.length;f++)A[f]=arguments[f+1];var O={callback:M,args:A};return y[E]=O,i(E),E++},T.clearImmediate=L}function L(M){delete y[M]}function V(M){if(g)setTimeout(V,0,M);else{var A=y[M];if(A){g=!0;try{(function(f){var O=f.callback,Y=f.args;switch(Y.length){case 0:O();break;case 1:O(Y[0]);break;case 2:O(Y[0],Y[1]);break;case 3:O(Y[0],Y[1],Y[2]);break;default:O.apply(void 0,Y)}})(A)}finally{L(M),g=!1}}}}})(typeof self=="undefined"?r===void 0?this:r:self)}).call(this,n(6),n(2))},function(e,t,n){e.exports=n(62)},function(e,t,n){(function(r,o){var l=n(16);e.exports=A;var s,i=n(42);A.ReadableState=M,n(21).EventEmitter;var c=function(w,h){return w.listeners(h).length},u=n(63),m=n(44).Buffer,R=r.Uint8Array||function(){},E=Object.create(n(17));E.inherits=n(7);var y=n(144),g=void 0;g=y&&y.debuglog?y.debuglog("stream"):function(){};var _,T=n(145),L=n(64);E.inherits(A,u);var V=["error","close","destroy","pause","resume"];function M(w,h){w=w||{};var B=h instanceof(s=s||n(36));this.objectMode=!!w.objectMode,B&&(this.objectMode=this.objectMode||!!w.readableObjectMode);var z=w.highWaterMark,X=w.readableHighWaterMark,Q=this.objectMode?16:16384;this.highWaterMark=z||z===0?z:B&&(X||X===0)?X:Q,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(_||(_=n(22).StringDecoder),this.decoder=new _(w.encoding),this.encoding=w.encoding)}function A(w){if(s=s||n(36),!(this instanceof A))return new A(w);this._readableState=new M(w,this),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),u.call(this)}function f(w,h,B,z,X){var Q,te=w._readableState;return h===null?(te.reading=!1,function(q,H){if(!H.ended){if(H.decoder){var v=H.decoder.end();v&&v.length&&(H.buffer.push(v),H.length+=H.objectMode?1:v.length)}H.ended=!0,Z(q)}}(w,te)):(X||(Q=function(q,H){var v;S=H,m.isBuffer(S)||S instanceof R||typeof H=="string"||H===void 0||q.objectMode||(v=new TypeError("Invalid non-string/buffer chunk"));var S;return v}(te,h)),Q?w.emit("error",Q):te.objectMode||h&&h.length>0?(typeof h=="string"||te.objectMode||Object.getPrototypeOf(h)===m.prototype||(h=function(q){return m.from(q)}(h)),z?te.endEmitted?w.emit("error",new Error("stream.unshift() after end event")):O(w,te,h,!0):te.ended?w.emit("error",new Error("stream.push() after EOF")):(te.reading=!1,te.decoder&&!B?(h=te.decoder.write(h),te.objectMode||h.length!==0?O(w,te,h,!1):p(w,te)):O(w,te,h,!1))):z||(te.reading=!1)),function(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}(te)}function O(w,h,B,z){h.flowing&&h.length===0&&!h.sync?(w.emit("data",B),w.read(0)):(h.length+=h.objectMode?1:B.length,z?h.buffer.unshift(B):h.buffer.push(B),h.needReadable&&Z(w)),p(w,h)}Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(w){this._readableState&&(this._readableState.destroyed=w)}}),A.prototype.destroy=L.destroy,A.prototype._undestroy=L.undestroy,A.prototype._destroy=function(w,h){this.push(null),h(w)},A.prototype.push=function(w,h){var B,z=this._readableState;return z.objectMode?B=!0:typeof w=="string"&&((h=h||z.defaultEncoding)!==z.encoding&&(w=m.from(w,h),h=""),B=!0),f(this,w,h,!1,B)},A.prototype.unshift=function(w){return f(this,w,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(w){return _||(_=n(22).StringDecoder),this._readableState.decoder=new _(w),this._readableState.encoding=w,this};function Y(w,h){return w<=0||h.length===0&&h.ended?0:h.objectMode?1:w!=w?h.flowing&&h.length?h.buffer.head.data.length:h.length:(w>h.highWaterMark&&(h.highWaterMark=function(B){return B>=8388608?B=8388608:(B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++),B}(w)),w<=h.length?w:h.ended?h.length:(h.needReadable=!0,0))}function Z(w){var h=w._readableState;h.needReadable=!1,h.emittedReadable||(g("emitReadable",h.flowing),h.emittedReadable=!0,h.sync?l.nextTick(d,w):d(w))}function d(w){g("emit readable"),w.emit("readable"),F(w)}function p(w,h){h.readingMore||(h.readingMore=!0,l.nextTick(C,w,h))}function C(w,h){for(var B=h.length;!h.reading&&!h.flowing&&!h.ended&&h.length<h.highWaterMark&&(g("maybeReadMore read 0"),w.read(0),B!==h.length);)B=h.length;h.readingMore=!1}function b(w){g("readable nexttick read 0"),w.read(0)}function P(w,h){h.reading||(g("resume read 0"),w.read(0)),h.resumeScheduled=!1,h.awaitDrain=0,w.emit("resume"),F(w),h.flowing&&!h.reading&&w.read(0)}function F(w){var h=w._readableState;for(g("flow",h.flowing);h.flowing&&w.read()!==null;);}function D(w,h){return h.length===0?null:(h.objectMode?B=h.buffer.shift():!w||w>=h.length?(B=h.decoder?h.buffer.join(""):h.buffer.length===1?h.buffer.head.data:h.buffer.concat(h.length),h.buffer.clear()):B=function(z,X,Q){var te;return z<X.head.data.length?(te=X.head.data.slice(0,z),X.head.data=X.head.data.slice(z)):te=z===X.head.data.length?X.shift():Q?function(q,H){var v=H.head,S=1,U=v.data;for(q-=U.length;v=v.next;){var J=v.data,$=q>J.length?J.length:q;if($===J.length?U+=J:U+=J.slice(0,q),(q-=$)===0){$===J.length?(++S,v.next?H.head=v.next:H.head=H.tail=null):(H.head=v,v.data=J.slice($));break}++S}return H.length-=S,U}(z,X):function(q,H){var v=m.allocUnsafe(q),S=H.head,U=1;for(S.data.copy(v),q-=S.data.length;S=S.next;){var J=S.data,$=q>J.length?J.length:q;if(J.copy(v,v.length-q,0,$),(q-=$)===0){$===J.length?(++U,S.next?H.head=S.next:H.head=H.tail=null):(H.head=S,S.data=J.slice($));break}++U}return H.length-=U,v}(z,X),te}(w,h.buffer,h.decoder),B);var B}function I(w){var h=w._readableState;if(h.length>0)throw new Error('"endReadable()" called on non-empty stream');h.endEmitted||(h.ended=!0,l.nextTick(N,h,w))}function N(w,h){w.endEmitted||w.length!==0||(w.endEmitted=!0,h.readable=!1,h.emit("end"))}function k(w,h){for(var B=0,z=w.length;B<z;B++)if(w[B]===h)return B;return-1}A.prototype.read=function(w){g("read",w),w=parseInt(w,10);var h=this._readableState,B=w;if(w!==0&&(h.emittedReadable=!1),w===0&&h.needReadable&&(h.length>=h.highWaterMark||h.ended))return g("read: emitReadable",h.length,h.ended),h.length===0&&h.ended?I(this):Z(this),null;if((w=Y(w,h))===0&&h.ended)return h.length===0&&I(this),null;var z,X=h.needReadable;return g("need readable",X),(h.length===0||h.length-w<h.highWaterMark)&&g("length less than watermark",X=!0),h.ended||h.reading?g("reading or ended",X=!1):X&&(g("do read"),h.reading=!0,h.sync=!0,h.length===0&&(h.needReadable=!0),this._read(h.highWaterMark),h.sync=!1,h.reading||(w=Y(B,h))),(z=w>0?D(w,h):null)===null?(h.needReadable=!0,w=0):h.length-=w,h.length===0&&(h.ended||(h.needReadable=!0),B!==w&&h.ended&&I(this)),z!==null&&this.emit("data",z),z},A.prototype._read=function(w){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(w,h){var B=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=w;break;case 1:z.pipes=[z.pipes,w];break;default:z.pipes.push(w)}z.pipesCount+=1,g("pipe count=%d opts=%j",z.pipesCount,h);var X=(!h||h.end!==!1)&&w!==o.stdout&&w!==o.stderr?te:ne;function Q(se,ge){g("onunpipe"),se===B&&ge&&ge.hasUnpiped===!1&&(ge.hasUnpiped=!0,g("cleanup"),w.removeListener("close",J),w.removeListener("finish",$),w.removeListener("drain",q),w.removeListener("error",U),w.removeListener("unpipe",Q),B.removeListener("end",te),B.removeListener("end",ne),B.removeListener("data",S),H=!0,!z.awaitDrain||w._writableState&&!w._writableState.needDrain||q())}function te(){g("onend"),w.end()}z.endEmitted?l.nextTick(X):B.once("end",X),w.on("unpipe",Q);var q=function(se){return function(){var ge=se._readableState;g("pipeOnDrain",ge.awaitDrain),ge.awaitDrain&&ge.awaitDrain--,ge.awaitDrain===0&&c(se,"data")&&(ge.flowing=!0,F(se))}}(B);w.on("drain",q);var H=!1,v=!1;function S(se){g("ondata"),v=!1,w.write(se)!==!1||v||((z.pipesCount===1&&z.pipes===w||z.pipesCount>1&&k(z.pipes,w)!==-1)&&!H&&(g("false write response, pause",B._readableState.awaitDrain),B._readableState.awaitDrain++,v=!0),B.pause())}function U(se){g("onerror",se),ne(),w.removeListener("error",U),c(w,"error")===0&&w.emit("error",se)}function J(){w.removeListener("finish",$),ne()}function $(){g("onfinish"),w.removeListener("close",J),ne()}function ne(){g("unpipe"),B.unpipe(w)}return B.on("data",S),function(se,ge,ve){if(typeof se.prependListener=="function")return se.prependListener(ge,ve);se._events&&se._events[ge]?i(se._events[ge])?se._events[ge].unshift(ve):se._events[ge]=[ve,se._events[ge]]:se.on(ge,ve)}(w,"error",U),w.once("close",J),w.once("finish",$),w.emit("pipe",B),z.flowing||(g("pipe resume"),B.resume()),w},A.prototype.unpipe=function(w){var h=this._readableState,B={hasUnpiped:!1};if(h.pipesCount===0)return this;if(h.pipesCount===1)return w&&w!==h.pipes||(w||(w=h.pipes),h.pipes=null,h.pipesCount=0,h.flowing=!1,w&&w.emit("unpipe",this,B)),this;if(!w){var z=h.pipes,X=h.pipesCount;h.pipes=null,h.pipesCount=0,h.flowing=!1;for(var Q=0;Q<X;Q++)z[Q].emit("unpipe",this,B);return this}var te=k(h.pipes,w);return te===-1||(h.pipes.splice(te,1),h.pipesCount-=1,h.pipesCount===1&&(h.pipes=h.pipes[0]),w.emit("unpipe",this,B)),this},A.prototype.on=function(w,h){var B=u.prototype.on.call(this,w,h);if(w==="data")this._readableState.flowing!==!1&&this.resume();else if(w==="readable"){var z=this._readableState;z.endEmitted||z.readableListening||(z.readableListening=z.needReadable=!0,z.emittedReadable=!1,z.reading?z.length&&Z(this):l.nextTick(b,this))}return B},A.prototype.addListener=A.prototype.on,A.prototype.resume=function(){var w=this._readableState;return w.flowing||(g("resume"),w.flowing=!0,function(h,B){B.resumeScheduled||(B.resumeScheduled=!0,l.nextTick(P,h,B))}(this,w)),this},A.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(w){var h=this,B=this._readableState,z=!1;for(var X in w.on("end",function(){if(g("wrapped end"),B.decoder&&!B.ended){var te=B.decoder.end();te&&te.length&&h.push(te)}h.push(null)}),w.on("data",function(te){g("wrapped data"),B.decoder&&(te=B.decoder.write(te)),B.objectMode&&te==null||(B.objectMode||te&&te.length)&&(h.push(te)||(z=!0,w.pause()))}),w)this[X]===void 0&&typeof w[X]=="function"&&(this[X]=function(te){return function(){return w[te].apply(w,arguments)}}(X));for(var Q=0;Q<V.length;Q++)w.on(V[Q],this.emit.bind(this,V[Q]));return this._read=function(te){g("wrapped _read",te),z&&(z=!1,w.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=D}).call(this,n(6),n(2))},function(e,t){},function(e,t,n){var r=n(44).Buffer,o=n(146);e.exports=function(){function l(){(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},l.prototype.unshift=function(s){var i={data:s,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},l.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(s){if(this.length===0)return"";for(var i=this.head,c=""+i.data;i=i.next;)c+=s+i.data;return c},l.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var i,c,u,m=r.allocUnsafe(s>>>0),R=this.head,E=0;R;)i=R.data,c=m,u=E,i.copy(c,u),E+=R.data.length,R=R.next;return m},l}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var l=o.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,n){var r=n(5),o=r.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(l(r,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var m=o(i);return c!==void 0?typeof u=="string"?m.fill(c,u):m.fill(c):m.fill(0),m},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(i)}},function(e,t,n){var r=n(13),o=n(3).LEVEL,l=n(20),s=e.exports=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(l.call(this,i),!i.transport||typeof i.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");function c(u){this.emit("error",u,this.transport)}this.transport=i.transport,this.level=this.level||i.transport.level,this.handleExceptions=this.handleExceptions||i.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=c.bind(this),this.transport.on("error",this.transport.__winstonError))};r.inherits(s,l),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[i[o]])&&this.transport.log(i[o],i.message,i,this._nop),u(null)},s.prototype._writev=function(i,c){for(var u=0;u<i.length;u++)this._accept(i[u])&&(this.transport.log(i[u].chunk[o],i[u].chunk.message,i[u].chunk,this._nop),i[u].callback());return c(null)},s.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
38
- `))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,n){(function(r,o){function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function i(d,p){for(var C=0;C<p.length;C++){var b=p[C];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,b.key,b)}}function c(d,p){return(c=Object.setPrototypeOf||function(C,b){return C.__proto__=b,C})(d,p)}function u(d){var p=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var C,b=E(d);if(p){var P=E(this).constructor;C=Reflect.construct(b,arguments,P)}else C=b.apply(this,arguments);return m(this,C)}}function m(d,p){return!p||l(p)!=="object"&&typeof p!="function"?R(d):p}function R(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function E(d){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)})(d)}var y=n(65),g=n(56),_=n(150),T=n(160),L=n(3).MESSAGE,V=n(32),M=V.Stream,A=V.PassThrough,f=n(20),O=n(38)("winston:file"),Y=n(18),Z=n(188);e.exports=function(d){(function(F,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(D&&D.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),D&&c(F,D)})(P,d);var p,C,b=u(P);function P(){var F,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function I(N){for(var k=arguments.length,w=new Array(k>1?k-1:0),h=1;h<k;h++)w[h-1]=arguments[h];w.slice(1).forEach(function(B){if(D[B])throw new Error("Cannot set ".concat(B," and ").concat(N," together"))})}if(s(this,P),(F=b.call(this,D)).name=D.name||"file",F._stream=new A,F._stream.setMaxListeners(30),F._onError=F._onError.bind(R(F)),D.filename||D.dirname)I("filename or dirname","stream"),F._basename=F.filename=D.filename?g.basename(D.filename):"winston.log",F.dirname=D.dirname||g.dirname(D.filename),F.options=D.options||{flags:"a"};else{if(!D.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),I("stream","filename","maxsize"),F._dest=F._stream.pipe(F._setupStream(D.stream)),F.dirname=g.dirname(F._dest.path)}return F.maxsize=D.maxsize||null,F.rotationFormat=D.rotationFormat||!1,F.zippedArchive=D.zippedArchive||!1,F.maxFiles=D.maxFiles||null,F.eol=D.eol||Y.EOL,F.tailable=D.tailable||!1,F._size=0,F._pendingSize=0,F._created=0,F._drain=!1,F._opening=!1,F._ending=!1,F.dirname&&F._createLogDirIfNotExist(F.dirname),F.open(),F}return p=P,(C=[{key:"finishIfEnding",value:function(){var F=this;this._ending&&(this._opening?this.once("open",function(){F._stream.once("finish",function(){return F.emit("finish")}),r(function(){return F._stream.end()})}):(this._stream.once("finish",function(){return F.emit("finish")}),r(function(){return F._stream.end()})))}},{key:"log",value:function(F){var D=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};if(this.silent)return I(),!0;if(this._drain)this._stream.once("drain",function(){D._drain=!1,D.log(F,I)});else{if(!this._rotate){var N="".concat(F[L]).concat(this.eol),k=o.byteLength(N);this._pendingSize+=k,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var w=this._stream.write(N,h.bind(this));return w?I():(this._drain=!0,this._stream.once("drain",function(){D._drain=!1,I()})),O("written",w,this._drain),this.finishIfEnding(),w}this._stream.once("rotate",function(){D._rotate=!1,D.log(F,I)})}function h(){var B=this;this._size+=k,this._pendingSize-=k,O("logged %s %s",this._size,N),this.emit("logged",F),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream(function(){return B._rotateFile()}))}}},{key:"query",value:function(F,D){typeof F=="function"&&(D=F,F={}),F=function(z){return(z=z||{}).rows=z.rows||z.limit||10,z.start=z.start||0,z.until=z.until||new Date,l(z.until)!=="object"&&(z.until=new Date(z.until)),z.from=z.from||z.until-864e5,l(z.from)!=="object"&&(z.from=new Date(z.from)),z.order=z.order||"desc",z}(F);var I=g.join(this.dirname,this.filename),N="",k=[],w=0,h=y.createReadStream(I,{encoding:"utf8"});function B(z,X){try{var Q=JSON.parse(z);(function(te){if(te&&l(te)==="object"){var q=new Date(te.timestamp);if(!(F.from&&q<F.from||F.until&&q>F.until||F.level&&F.level!==te.level))return!0}})(Q)&&function(te){F.rows&&k.length>=F.rows&&F.order!=="desc"?h.readable&&h.destroy():(F.fields&&(te=F.fields.reduce(function(q,H){return q[H]=te[H],q},{})),F.order==="desc"&&k.length>=F.rows&&k.shift(),k.push(te))}(Q)}catch(te){X||h.emit("error",te)}}h.on("error",function(z){if(h.readable&&h.destroy(),D)return z.code!=="ENOENT"?D(z):D(null,k)}),h.on("data",function(z){for(var X=(z=(N+z).split(/\n+/)).length-1,Q=0;Q<X;Q++)(!F.start||w>=F.start)&&B(z[Q]),w++;N=z[X]}),h.on("close",function(){N&&B(N,!0),F.order==="desc"&&(k=k.reverse()),D&&D(null,k)})}},{key:"stream",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=g.join(this.dirname,this.filename),I=new M,N={file:D,start:F.start};return I.destroy=Z(N,function(k,w){if(k)return I.emit("error",k);try{I.emit("data",w),w=JSON.parse(w),I.emit("log",w)}catch(h){I.emit("error",h)}}),I}},{key:"open",value:function(){var F=this;this.filename&&(this._opening||(this._opening=!0,this.stat(function(D,I){if(D)return F.emit("error",D);O("stat done: %s { size: %s }",F.filename,I),F._size=I,F._dest=F._createStream(F._stream),F._opening=!1,F.once("open",function(){F._stream.eventNames().includes("rotate")?F._stream.emit("rotate"):F._rotate=!1})})))}},{key:"stat",value:function(F){var D=this,I=this._getFile(),N=g.join(this.dirname,I);y.stat(N,function(k,w){return k&&k.code==="ENOENT"?(O("ENOENT\xA0ok",N),D.filename=I,F(null,0)):k?(O("err ".concat(k.code," ").concat(N)),F(k)):!w||D._needsNewFile(w.size)?D._incFile(function(){return D.stat(F)}):(D.filename=I,void F(null,w.size))})}},{key:"close",value:function(F){var D=this;this._stream&&this._stream.end(function(){F&&F(),D.emit("flush"),D.emit("closed")})}},{key:"_needsNewFile",value:function(F){return F=F||this._size,this.maxsize&&F>=this.maxsize}},{key:"_onError",value:function(F){this.emit("error",F)}},{key:"_setupStream",value:function(F){return F.on("error",this._onError),F}},{key:"_cleanupStream",value:function(F){return F.removeListener("error",this._onError),F}},{key:"_rotateFile",value:function(){var F=this;this._incFile(function(){return F.open()})}},{key:"_endStream",value:function(){var F=this,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end(function(){F._cleanupStream(F._dest),D()})):D()}},{key:"_createStream",value:function(F){var D=this,I=g.join(this.dirname,this.filename);O("create stream start",I,this.options);var N=y.createWriteStream(I,this.options).on("error",function(w){return O(w)}).on("close",function(){return O("close",N.path,N.bytesWritten)}).on("open",function(){O("file open ok",I),D.emit("open",I),F.pipe(N),D.rotatedWhileOpening&&(D._stream=new A,D._stream.setMaxListeners(30),D._rotateFile(),D.rotatedWhileOpening=!1,D._cleanupStream(N),F.end())});if(O("create stream ok",I),this.zippedArchive){var k=T.createGzip();return k.pipe(N),k}return N}},{key:"_incFile",value:function(F){O("_incFile",this.filename);var D=g.extname(this._basename),I=g.basename(this._basename,D);this.tailable?this._checkMaxFilesTailable(D,I,F):(this._created+=1,this._checkMaxFilesIncrementing(D,I,F))}},{key:"_getFile",value:function(){var F=g.extname(this._basename),D=g.basename(this._basename,F),I=this.rotationFormat?this.rotationFormat():this._created,N=!this.tailable&&this._created?"".concat(D).concat(I).concat(F):"".concat(D).concat(F);return this.zippedArchive&&!this.tailable?"".concat(N,".gz"):N}},{key:"_checkMaxFilesIncrementing",value:function(F,D,I){if(!this.maxFiles||this._created<this.maxFiles)return r(I);var N=this._created-this.maxFiles,k=N!==0?N:"",w=this.zippedArchive?".gz":"",h="".concat(D).concat(k).concat(F).concat(w),B=g.join(this.dirname,h);y.unlink(B,I)}},{key:"_checkMaxFilesTailable",value:function(F,D,I){var N=this,k=[];if(this.maxFiles){for(var w=this.zippedArchive?".gz":"",h=this.maxFiles-1;h>1;h--)k.push(function(B,z){var X=this,Q="".concat(D).concat(B-1).concat(F).concat(w),te=g.join(this.dirname,Q);y.exists(te,function(q){if(!q)return z(null);Q="".concat(D).concat(B).concat(F).concat(w),y.rename(te,g.join(X.dirname,Q),z)})}.bind(this,h));_(k,function(){y.rename(g.join(N.dirname,"".concat(D).concat(F)),g.join(N.dirname,"".concat(D,"1").concat(F).concat(w)),I)})}}},{key:"_createLogDirIfNotExist",value:function(F){y.existsSync(F)||y.mkdirSync(F,{recursive:!0})}}])&&i(p.prototype,C),P}(f)}).call(this,n(15).setImmediate,n(5).Buffer)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,i){return(0,r.default)(o.default,s,i)};var r=l(n(151)),o=l(n(155));function l(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(45)),o=s(n(25)),l=s(n(30));function s(i){return i&&i.__esModule?i:{default:i}}t.default=(0,l.default)((i,c,u)=>{var m=(0,r.default)(c)?[]:{};i(c,(R,E,y)=>{(0,o.default)(R)((g,..._)=>{_.length<2&&([_]=_),m[E]=_,y(g)})},R=>u(R,m))},3),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(u){return(0,l.isAsync)(u)?function(...m){const R=m.pop();return i(u.apply(this,m),R)}:(0,r.default)(function(m,R){var E;try{E=u.apply(this,m)}catch(y){return R(y)}if(E&&typeof E.then=="function")return i(E,R);R(null,E)})};var r=s(n(153)),o=s(n(154)),l=n(25);function s(u){return u&&u.__esModule?u:{default:u}}function i(u,m){return u.then(R=>{c(m,null,R)},R=>{c(m,R&&R.message?R:new Error(R))})}function c(u,m,R){try{u(m,R)}catch(E){(0,o.default)(y=>{throw y},E)}}e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return function(...o){var l=o.pop();return r.call(this,o,l)}},e.exports=t.default},function(e,t,n){(function(r,o){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=c,t.wrap=u;var l,s=t.hasSetImmediate=typeof r=="function"&&r,i=t.hasNextTick=typeof o=="object"&&typeof o.nextTick=="function";function c(m){setTimeout(m,0)}function u(m){return(R,...E)=>m(()=>R(...E))}l=s?r:i?o.nextTick:c,t.default=u(l)}).call(this,n(15).setImmediate,n(2))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(66)),o=l(n(30));function l(s){return s&&s.__esModule?s:{default:s}}t.default=(0,o.default)(function(s,i,c){return(0,r.default)(s,1,i,c)},3),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(67)),o=u(n(157)),l=u(n(68)),s=n(25),i=u(n(159)),c=u(n(46));function u(m){return m&&m.__esModule?m:{default:m}}t.default=m=>(R,E,y)=>{if(y=(0,r.default)(y),m<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!R)return y(null);if((0,s.isAsyncGenerator)(R))return(0,i.default)(R,m,E,y);if((0,s.isAsyncIterable)(R))return(0,i.default)(R[Symbol.asyncIterator](),m,E,y);var g=(0,o.default)(R),_=!1,T=!1,L=0,V=!1;function M(f,O){if(!T)if(L-=1,f)_=!0,y(f);else if(f===!1)_=!0,T=!0;else{if(O===c.default||_&&L<=0)return _=!0,y(null);V||A()}}function A(){for(V=!0;L<m&&!_;){var f=g();if(f===null)return _=!0,void(L<=0&&y(null));L+=1,E(f.value,f.key,(0,l.default)(M))}V=!1}A()},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s){if((0,r.default)(s))return function(E){var y=-1,g=E.length;return function(){return++y<g?{value:E[y],key:y}:null}}(s);var i=(0,o.default)(s);return i?function(E){var y=-1;return function(){var g=E.next();return g.done?null:(y++,{value:g.value,key:y})}}(i):(c=s,u=c?Object.keys(c):[],m=-1,R=u.length,function(){var E=u[++m];return m<R?{value:c[E],key:E}:null});var c,u,m,R};var r=l(n(45)),o=l(n(158));function l(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return r[Symbol.iterator]&&r[Symbol.iterator]()},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,i,c,u){let m=!1,R=!1,E=!1,y=0,g=0;function _(){y>=i||E||m||(E=!0,s.next().then(({value:V,done:M})=>{if(!R&&!m){if(E=!1,M)return m=!0,void(y<=0&&u(null));y++,c(V,g,T),g++,_()}}).catch(L))}function T(V,M){if(y-=1,!R)return V?L(V):V===!1?(m=!0,void(R=!0)):M===l.default||m&&y<=0?(m=!0,u(null)):void _()}function L(V){R||(E=!1,m=!0,u(V))}_()};var r,o=n(46),l=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){(function(r){var o=n(5).Buffer,l=n(161).Transform,s=n(169),i=n(13),c=n(74).ok,u=n(5).kMaxLength,m="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var R=Object.keys(s),E=0;E<R.length;E++){var y=R[E];y.match(/^Z/)&&Object.defineProperty(t,y,{enumerable:!0,value:s[y],writable:!1})}for(var g={Z_OK:s.Z_OK,Z_STREAM_END:s.Z_STREAM_END,Z_NEED_DICT:s.Z_NEED_DICT,Z_ERRNO:s.Z_ERRNO,Z_STREAM_ERROR:s.Z_STREAM_ERROR,Z_DATA_ERROR:s.Z_DATA_ERROR,Z_MEM_ERROR:s.Z_MEM_ERROR,Z_BUF_ERROR:s.Z_BUF_ERROR,Z_VERSION_ERROR:s.Z_VERSION_ERROR},_=Object.keys(g),T=0;T<_.length;T++){var L=_[T];g[g[L]]=L}function V(D,I,N){var k=[],w=0;function h(){for(var z;(z=D.read())!==null;)k.push(z),w+=z.length;D.once("readable",h)}function B(){var z,X=null;w>=u?X=new RangeError(m):z=o.concat(k,w),k=[],D.close(),N(X,z)}D.on("error",function(z){D.removeListener("end",B),D.removeListener("readable",h),N(z)}),D.on("end",B),D.end(I),h()}function M(D,I){if(typeof I=="string"&&(I=o.from(I)),!o.isBuffer(I))throw new TypeError("Not a string or buffer");var N=D._finishFlushFlag;return D._processChunk(I,N)}function A(D){if(!(this instanceof A))return new A(D);b.call(this,D,s.DEFLATE)}function f(D){if(!(this instanceof f))return new f(D);b.call(this,D,s.INFLATE)}function O(D){if(!(this instanceof O))return new O(D);b.call(this,D,s.GZIP)}function Y(D){if(!(this instanceof Y))return new Y(D);b.call(this,D,s.GUNZIP)}function Z(D){if(!(this instanceof Z))return new Z(D);b.call(this,D,s.DEFLATERAW)}function d(D){if(!(this instanceof d))return new d(D);b.call(this,D,s.INFLATERAW)}function p(D){if(!(this instanceof p))return new p(D);b.call(this,D,s.UNZIP)}function C(D){return D===s.Z_NO_FLUSH||D===s.Z_PARTIAL_FLUSH||D===s.Z_SYNC_FLUSH||D===s.Z_FULL_FLUSH||D===s.Z_FINISH||D===s.Z_BLOCK}function b(D,I){var N=this;if(this._opts=D=D||{},this._chunkSize=D.chunkSize||t.Z_DEFAULT_CHUNK,l.call(this,D),D.flush&&!C(D.flush))throw new Error("Invalid flush flag: "+D.flush);if(D.finishFlush&&!C(D.finishFlush))throw new Error("Invalid flush flag: "+D.finishFlush);if(this._flushFlag=D.flush||s.Z_NO_FLUSH,this._finishFlushFlag=D.finishFlush!==void 0?D.finishFlush:s.Z_FINISH,D.chunkSize&&(D.chunkSize<t.Z_MIN_CHUNK||D.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+D.chunkSize);if(D.windowBits&&(D.windowBits<t.Z_MIN_WINDOWBITS||D.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+D.windowBits);if(D.level&&(D.level<t.Z_MIN_LEVEL||D.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+D.level);if(D.memLevel&&(D.memLevel<t.Z_MIN_MEMLEVEL||D.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+D.memLevel);if(D.strategy&&D.strategy!=t.Z_FILTERED&&D.strategy!=t.Z_HUFFMAN_ONLY&&D.strategy!=t.Z_RLE&&D.strategy!=t.Z_FIXED&&D.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+D.strategy);if(D.dictionary&&!o.isBuffer(D.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(I);var k=this;this._hadError=!1,this._handle.onerror=function(B,z){P(k),k._hadError=!0;var X=new Error(B);X.errno=z,X.code=t.codes[z],k.emit("error",X)};var w=t.Z_DEFAULT_COMPRESSION;typeof D.level=="number"&&(w=D.level);var h=t.Z_DEFAULT_STRATEGY;typeof D.strategy=="number"&&(h=D.strategy),this._handle.init(D.windowBits||t.Z_DEFAULT_WINDOWBITS,w,D.memLevel||t.Z_DEFAULT_MEMLEVEL,h,D.dictionary),this._buffer=o.allocUnsafe(this._chunkSize),this._offset=0,this._level=w,this._strategy=h,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!N._handle},configurable:!0,enumerable:!0})}function P(D,I){I&&r.nextTick(I),D._handle&&(D._handle.close(),D._handle=null)}function F(D){D.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(g),writable:!1}),t.Deflate=A,t.Inflate=f,t.Gzip=O,t.Gunzip=Y,t.DeflateRaw=Z,t.InflateRaw=d,t.Unzip=p,t.createDeflate=function(D){return new A(D)},t.createInflate=function(D){return new f(D)},t.createDeflateRaw=function(D){return new Z(D)},t.createInflateRaw=function(D){return new d(D)},t.createGzip=function(D){return new O(D)},t.createGunzip=function(D){return new Y(D)},t.createUnzip=function(D){return new p(D)},t.deflate=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new A(I),D,N)},t.deflateSync=function(D,I){return M(new A(I),D)},t.gzip=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new O(I),D,N)},t.gzipSync=function(D,I){return M(new O(I),D)},t.deflateRaw=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new Z(I),D,N)},t.deflateRawSync=function(D,I){return M(new Z(I),D)},t.unzip=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new p(I),D,N)},t.unzipSync=function(D,I){return M(new p(I),D)},t.inflate=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new f(I),D,N)},t.inflateSync=function(D,I){return M(new f(I),D)},t.gunzip=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new Y(I),D,N)},t.gunzipSync=function(D,I){return M(new Y(I),D)},t.inflateRaw=function(D,I,N){return typeof I=="function"&&(N=I,I={}),V(new d(I),D,N)},t.inflateRawSync=function(D,I){return M(new d(I),D)},i.inherits(b,l),b.prototype.params=function(D,I,N){if(D<t.Z_MIN_LEVEL||D>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+D);if(I!=t.Z_FILTERED&&I!=t.Z_HUFFMAN_ONLY&&I!=t.Z_RLE&&I!=t.Z_FIXED&&I!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+I);if(this._level!==D||this._strategy!==I){var k=this;this.flush(s.Z_SYNC_FLUSH,function(){c(k._handle,"zlib binding closed"),k._handle.params(D,I),k._hadError||(k._level=D,k._strategy=I,N&&N())})}else r.nextTick(N)},b.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},b.prototype._flush=function(D){this._transform(o.alloc(0),"",D)},b.prototype.flush=function(D,I){var N=this,k=this._writableState;(typeof D=="function"||D===void 0&&!I)&&(I=D,D=s.Z_FULL_FLUSH),k.ended?I&&r.nextTick(I):k.ending?I&&this.once("end",I):k.needDrain?I&&this.once("drain",function(){return N.flush(D,I)}):(this._flushFlag=D,this.write(o.alloc(0),"",I))},b.prototype.close=function(D){P(this,D),r.nextTick(F,this)},b.prototype._transform=function(D,I,N){var k,w=this._writableState,h=(w.ending||w.ended)&&(!D||w.length===D.length);return D===null||o.isBuffer(D)?this._handle?(h?k=this._finishFlushFlag:(k=this._flushFlag,D.length>=w.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(D,k,N)):N(new Error("zlib binding closed")):N(new Error("invalid input"))},b.prototype._processChunk=function(D,I,N){var k=D&&D.length,w=this._chunkSize-this._offset,h=0,B=this,z=typeof N=="function";if(!z){var X,Q=[],te=0;this.on("error",function(U){X=U}),c(this._handle,"zlib binding closed");do var q=this._handle.writeSync(I,D,h,k,this._buffer,this._offset,w);while(!this._hadError&&S(q[0],q[1]));if(this._hadError)throw X;if(te>=u)throw P(this),new RangeError(m);var H=o.concat(Q,te);return P(this),H}c(this._handle,"zlib binding closed");var v=this._handle.write(I,D,h,k,this._buffer,this._offset,w);function S(U,J){if(this&&(this.buffer=null,this.callback=null),!B._hadError){var $=w-J;if(c($>=0,"have should not go down"),$>0){var ne=B._buffer.slice(B._offset,B._offset+$);B._offset+=$,z?B.push(ne):(Q.push(ne),te+=ne.length)}if((J===0||B._offset>=B._chunkSize)&&(w=B._chunkSize,B._offset=0,B._buffer=o.allocUnsafe(B._chunkSize)),J===0){if(h+=k-U,k=U,!z)return!0;var se=B._handle.write(I,D,h,k,B._buffer,B._offset,B._chunkSize);return se.callback=S,void(se.buffer=D)}if(!z)return!1;N()}}v.buffer=D,v.callback=S},i.inherits(A,b),i.inherits(f,b),i.inherits(O,b),i.inherits(Y,b),i.inherits(Z,b),i.inherits(d,b),i.inherits(p,b)}).call(this,n(2))},function(e,t,n){e.exports=o;var r=n(21).EventEmitter;function o(){r.call(this)}n(7)(o,r),o.Readable=n(31),o.Writable=n(73),o.Duplex=n(166),o.Transform=n(167),o.PassThrough=n(168),o.Stream=o,o.prototype.pipe=function(l,s){var i=this;function c(_){l.writable&&l.write(_)===!1&&i.pause&&i.pause()}function u(){i.readable&&i.resume&&i.resume()}i.on("data",c),l.on("drain",u),l._isStdio||s&&s.end===!1||(i.on("end",R),i.on("close",E));var m=!1;function R(){m||(m=!0,l.end())}function E(){m||(m=!0,typeof l.destroy=="function"&&l.destroy())}function y(_){if(g(),r.listenerCount(this,"error")===0)throw _}function g(){i.removeListener("data",c),l.removeListener("drain",u),i.removeListener("end",R),i.removeListener("close",E),i.removeListener("error",y),l.removeListener("error",y),i.removeListener("end",g),i.removeListener("close",g),l.removeListener("close",g)}return i.on("error",y),l.on("error",y),i.on("end",g),i.on("close",g),l.on("close",g),l.emit("pipe",i),l}},function(e,t){},function(e,t,n){var r=n(47).Buffer,o=n(164);e.exports=function(){function l(){(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},l.prototype.unshift=function(s){var i={data:s,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},l.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(s){if(this.length===0)return"";for(var i=this.head,c=""+i.data;i=i.next;)c+=s+i.data;return c},l.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var i,c,u,m=r.allocUnsafe(s>>>0),R=this.head,E=0;R;)i=R.data,c=m,u=E,i.copy(c,u),E+=R.data.length,R=R.next;return m},l}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var l=o.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,n){e.exports=l;var r=n(72),o=n(17);function l(s){if(!(this instanceof l))return new l(s);r.call(this,s)}o.inherits=n(7),o.inherits(l,r),l.prototype._transform=function(s,i,c){c(null,s)}},function(e,t,n){e.exports=n(23)},function(e,t,n){e.exports=n(31).Transform},function(e,t,n){e.exports=n(31).PassThrough},function(e,t,n){(function(r,o){var l=n(74),s=n(171),i=n(172),c=n(175),u=n(178);for(var m in u)t[m]=u[m];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function R(E){if(typeof E!="number"||E<t.DEFLATE||E>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=E,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}R.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,l(this.init_done,"close before init"),l(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?i.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},R.prototype.write=function(E,y,g,_,T,L,V){return this._write(!0,E,y,g,_,T,L,V)},R.prototype.writeSync=function(E,y,g,_,T,L,V){return this._write(!1,E,y,g,_,T,L,V)},R.prototype._write=function(E,y,g,_,T,L,V,M){if(l.equal(arguments.length,8),l(this.init_done,"write before init"),l(this.mode!==t.NONE,"already finalized"),l.equal(!1,this.write_in_progress,"write already in progress"),l.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,l.equal(!1,y===void 0,"must provide flush value"),this.write_in_progress=!0,y!==t.Z_NO_FLUSH&&y!==t.Z_PARTIAL_FLUSH&&y!==t.Z_SYNC_FLUSH&&y!==t.Z_FULL_FLUSH&&y!==t.Z_FINISH&&y!==t.Z_BLOCK)throw new Error("Invalid flush value");if(g==null&&(g=r.alloc(0),T=0,_=0),this.strm.avail_in=T,this.strm.input=g,this.strm.next_in=_,this.strm.avail_out=M,this.strm.output=L,this.strm.next_out=V,this.flush=y,!E)return this._process(),this._checkError()?this._afterSync():void 0;var A=this;return o.nextTick(function(){A._process(),A._after()}),this},R.prototype._afterSync=function(){var E=this.strm.avail_out,y=this.strm.avail_in;return this.write_in_progress=!1,[y,E]},R.prototype._process=function(){var E=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=i.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(E=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(E===null)break;if(this.strm.input[E]!==31){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,E++,this.strm.avail_in===1)break;case 1:if(E===null)break;this.strm.input[E]===139?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},R.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},R.prototype._after=function(){if(this._checkError()){var E=this.strm.avail_out,y=this.strm.avail_in;this.write_in_progress=!1,this.callback(y,E),this.pending_close&&this.close()}},R.prototype._error=function(E){this.strm.msg&&(E=this.strm.msg),this.onerror(E,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},R.prototype.init=function(E,y,g,_,T){l(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),l(E>=8&&E<=15,"invalid windowBits"),l(y>=-1&&y<=9,"invalid compression level"),l(g>=1&&g<=9,"invalid memlevel"),l(_===t.Z_FILTERED||_===t.Z_HUFFMAN_ONLY||_===t.Z_RLE||_===t.Z_FIXED||_===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(y,E,g,_,T),this._setDictionary()},R.prototype.params=function(){throw new Error("deflateParams Not supported")},R.prototype.reset=function(){this._reset(),this._setDictionary()},R.prototype._init=function(E,y,g,_,T){switch(this.level=E,this.windowBits=y,this.memLevel=g,this.strategy=_,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=i.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=T,this.write_in_progress=!1,this.init_done=!0},R.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=i.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},R.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=i.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=R}).call(this,n(5).Buffer,n(2))},function(e,t,n){var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}e.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;if(Object.getOwnPropertyNames(c).map(function(R){return c[R]}).join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(R){m[R]=R}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(i,c){for(var u,m,R=s(i),E=1;E<arguments.length;E++){for(var y in u=Object(arguments[E]))o.call(u,y)&&(R[y]=u[y]);if(r){m=r(u);for(var g=0;g<m.length;g++)l.call(u,m[g])&&(R[m[g]]=u[m[g]])}}return R}},function(e,t,n){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,n){var r,o=n(37),l=n(173),s=n(75),i=n(76),c=n(174);function u(d,p){return d.msg=c[p],p}function m(d){return(d<<1)-(d>4?9:0)}function R(d){for(var p=d.length;--p>=0;)d[p]=0}function E(d){var p=d.state,C=p.pending;C>d.avail_out&&(C=d.avail_out),C!==0&&(o.arraySet(d.output,p.pending_buf,p.pending_out,C,d.next_out),d.next_out+=C,p.pending_out+=C,d.total_out+=C,d.avail_out-=C,p.pending-=C,p.pending===0&&(p.pending_out=0))}function y(d,p){l._tr_flush_block(d,d.block_start>=0?d.block_start:-1,d.strstart-d.block_start,p),d.block_start=d.strstart,E(d.strm)}function g(d,p){d.pending_buf[d.pending++]=p}function _(d,p){d.pending_buf[d.pending++]=p>>>8&255,d.pending_buf[d.pending++]=255&p}function T(d,p){var C,b,P=d.max_chain_length,F=d.strstart,D=d.prev_length,I=d.nice_match,N=d.strstart>d.w_size-262?d.strstart-(d.w_size-262):0,k=d.window,w=d.w_mask,h=d.prev,B=d.strstart+258,z=k[F+D-1],X=k[F+D];d.prev_length>=d.good_match&&(P>>=2),I>d.lookahead&&(I=d.lookahead);do if(k[(C=p)+D]===X&&k[C+D-1]===z&&k[C]===k[F]&&k[++C]===k[F+1]){F+=2,C++;do;while(k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&F<B);if(b=258-(B-F),F=B-258,b>D){if(d.match_start=p,D=b,b>=I)break;z=k[F+D-1],X=k[F+D]}}while((p=h[p&w])>N&&--P!=0);return D<=d.lookahead?D:d.lookahead}function L(d){var p,C,b,P,F,D,I,N,k,w,h=d.w_size;do{if(P=d.window_size-d.lookahead-d.strstart,d.strstart>=h+(h-262)){o.arraySet(d.window,d.window,h,h,0),d.match_start-=h,d.strstart-=h,d.block_start-=h,p=C=d.hash_size;do b=d.head[--p],d.head[p]=b>=h?b-h:0;while(--C);p=C=h;do b=d.prev[--p],d.prev[p]=b>=h?b-h:0;while(--C);P+=h}if(d.strm.avail_in===0)break;if(D=d.strm,I=d.window,N=d.strstart+d.lookahead,k=P,w=void 0,(w=D.avail_in)>k&&(w=k),C=w===0?0:(D.avail_in-=w,o.arraySet(I,D.input,D.next_in,w,N),D.state.wrap===1?D.adler=s(D.adler,I,w,N):D.state.wrap===2&&(D.adler=i(D.adler,I,w,N)),D.next_in+=w,D.total_in+=w,w),d.lookahead+=C,d.lookahead+d.insert>=3)for(F=d.strstart-d.insert,d.ins_h=d.window[F],d.ins_h=(d.ins_h<<d.hash_shift^d.window[F+1])&d.hash_mask;d.insert&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[F+3-1])&d.hash_mask,d.prev[F&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=F,F++,d.insert--,!(d.lookahead+d.insert<3)););}while(d.lookahead<262&&d.strm.avail_in!==0)}function V(d,p){for(var C,b;;){if(d.lookahead<262){if(L(d),d.lookahead<262&&p===0)return 1;if(d.lookahead===0)break}if(C=0,d.lookahead>=3&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+3-1])&d.hash_mask,C=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),C!==0&&d.strstart-C<=d.w_size-262&&(d.match_length=T(d,C)),d.match_length>=3)if(b=l._tr_tally(d,d.strstart-d.match_start,d.match_length-3),d.lookahead-=d.match_length,d.match_length<=d.max_lazy_match&&d.lookahead>=3){d.match_length--;do d.strstart++,d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+3-1])&d.hash_mask,C=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart;while(--d.match_length!=0);d.strstart++}else d.strstart+=d.match_length,d.match_length=0,d.ins_h=d.window[d.strstart],d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+1])&d.hash_mask;else b=l._tr_tally(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++;if(b&&(y(d,!1),d.strm.avail_out===0))return 1}return d.insert=d.strstart<2?d.strstart:2,p===4?(y(d,!0),d.strm.avail_out===0?3:4):d.last_lit&&(y(d,!1),d.strm.avail_out===0)?1:2}function M(d,p){for(var C,b,P;;){if(d.lookahead<262){if(L(d),d.lookahead<262&&p===0)return 1;if(d.lookahead===0)break}if(C=0,d.lookahead>=3&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+3-1])&d.hash_mask,C=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),d.prev_length=d.match_length,d.prev_match=d.match_start,d.match_length=2,C!==0&&d.prev_length<d.max_lazy_match&&d.strstart-C<=d.w_size-262&&(d.match_length=T(d,C),d.match_length<=5&&(d.strategy===1||d.match_length===3&&d.strstart-d.match_start>4096)&&(d.match_length=2)),d.prev_length>=3&&d.match_length<=d.prev_length){P=d.strstart+d.lookahead-3,b=l._tr_tally(d,d.strstart-1-d.prev_match,d.prev_length-3),d.lookahead-=d.prev_length-1,d.prev_length-=2;do++d.strstart<=P&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+3-1])&d.hash_mask,C=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart);while(--d.prev_length!=0);if(d.match_available=0,d.match_length=2,d.strstart++,b&&(y(d,!1),d.strm.avail_out===0))return 1}else if(d.match_available){if((b=l._tr_tally(d,0,d.window[d.strstart-1]))&&y(d,!1),d.strstart++,d.lookahead--,d.strm.avail_out===0)return 1}else d.match_available=1,d.strstart++,d.lookahead--}return d.match_available&&(b=l._tr_tally(d,0,d.window[d.strstart-1]),d.match_available=0),d.insert=d.strstart<2?d.strstart:2,p===4?(y(d,!0),d.strm.avail_out===0?3:4):d.last_lit&&(y(d,!1),d.strm.avail_out===0)?1:2}function A(d,p,C,b,P){this.good_length=d,this.max_lazy=p,this.nice_length=C,this.max_chain=b,this.func=P}function f(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),R(this.dyn_ltree),R(this.dyn_dtree),R(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),R(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),R(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function O(d){var p;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=2,(p=d.state).pending=0,p.pending_out=0,p.wrap<0&&(p.wrap=-p.wrap),p.status=p.wrap?42:113,d.adler=p.wrap===2?0:1,p.last_flush=0,l._tr_init(p),0):u(d,-2)}function Y(d){var p,C=O(d);return C===0&&((p=d.state).window_size=2*p.w_size,R(p.head),p.max_lazy_match=r[p.level].max_lazy,p.good_match=r[p.level].good_length,p.nice_match=r[p.level].nice_length,p.max_chain_length=r[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=2,p.match_available=0,p.ins_h=0),C}function Z(d,p,C,b,P,F){if(!d)return-2;var D=1;if(p===-1&&(p=6),b<0?(D=0,b=-b):b>15&&(D=2,b-=16),P<1||P>9||C!==8||b<8||b>15||p<0||p>9||F<0||F>4)return u(d,-2);b===8&&(b=9);var I=new f;return d.state=I,I.strm=d,I.wrap=D,I.gzhead=null,I.w_bits=b,I.w_size=1<<I.w_bits,I.w_mask=I.w_size-1,I.hash_bits=P+7,I.hash_size=1<<I.hash_bits,I.hash_mask=I.hash_size-1,I.hash_shift=~~((I.hash_bits+3-1)/3),I.window=new o.Buf8(2*I.w_size),I.head=new o.Buf16(I.hash_size),I.prev=new o.Buf16(I.w_size),I.lit_bufsize=1<<P+6,I.pending_buf_size=4*I.lit_bufsize,I.pending_buf=new o.Buf8(I.pending_buf_size),I.d_buf=1*I.lit_bufsize,I.l_buf=3*I.lit_bufsize,I.level=p,I.strategy=F,I.method=C,Y(d)}r=[new A(0,0,0,0,function(d,p){var C=65535;for(C>d.pending_buf_size-5&&(C=d.pending_buf_size-5);;){if(d.lookahead<=1){if(L(d),d.lookahead===0&&p===0)return 1;if(d.lookahead===0)break}d.strstart+=d.lookahead,d.lookahead=0;var b=d.block_start+C;if((d.strstart===0||d.strstart>=b)&&(d.lookahead=d.strstart-b,d.strstart=b,y(d,!1),d.strm.avail_out===0)||d.strstart-d.block_start>=d.w_size-262&&(y(d,!1),d.strm.avail_out===0))return 1}return d.insert=0,p===4?(y(d,!0),d.strm.avail_out===0?3:4):(d.strstart>d.block_start&&(y(d,!1),d.strm.avail_out),1)}),new A(4,4,8,4,V),new A(4,5,16,8,V),new A(4,6,32,32,V),new A(4,4,16,16,M),new A(8,16,32,32,M),new A(8,16,128,128,M),new A(8,32,128,256,M),new A(32,128,258,1024,M),new A(32,258,258,4096,M)],t.deflateInit=function(d,p){return Z(d,p,8,15,8,0)},t.deflateInit2=Z,t.deflateReset=Y,t.deflateResetKeep=O,t.deflateSetHeader=function(d,p){return d&&d.state?d.state.wrap!==2?-2:(d.state.gzhead=p,0):-2},t.deflate=function(d,p){var C,b,P,F;if(!d||!d.state||p>5||p<0)return d?u(d,-2):-2;if(b=d.state,!d.output||!d.input&&d.avail_in!==0||b.status===666&&p!==4)return u(d,d.avail_out===0?-5:-2);if(b.strm=d,C=b.last_flush,b.last_flush=p,b.status===42)if(b.wrap===2)d.adler=0,g(b,31),g(b,139),g(b,8),b.gzhead?(g(b,(b.gzhead.text?1:0)+(b.gzhead.hcrc?2:0)+(b.gzhead.extra?4:0)+(b.gzhead.name?8:0)+(b.gzhead.comment?16:0)),g(b,255&b.gzhead.time),g(b,b.gzhead.time>>8&255),g(b,b.gzhead.time>>16&255),g(b,b.gzhead.time>>24&255),g(b,b.level===9?2:b.strategy>=2||b.level<2?4:0),g(b,255&b.gzhead.os),b.gzhead.extra&&b.gzhead.extra.length&&(g(b,255&b.gzhead.extra.length),g(b,b.gzhead.extra.length>>8&255)),b.gzhead.hcrc&&(d.adler=i(d.adler,b.pending_buf,b.pending,0)),b.gzindex=0,b.status=69):(g(b,0),g(b,0),g(b,0),g(b,0),g(b,0),g(b,b.level===9?2:b.strategy>=2||b.level<2?4:0),g(b,3),b.status=113);else{var D=8+(b.w_bits-8<<4)<<8;D|=(b.strategy>=2||b.level<2?0:b.level<6?1:b.level===6?2:3)<<6,b.strstart!==0&&(D|=32),D+=31-D%31,b.status=113,_(b,D),b.strstart!==0&&(_(b,d.adler>>>16),_(b,65535&d.adler)),d.adler=1}if(b.status===69)if(b.gzhead.extra){for(P=b.pending;b.gzindex<(65535&b.gzhead.extra.length)&&(b.pending!==b.pending_buf_size||(b.gzhead.hcrc&&b.pending>P&&(d.adler=i(d.adler,b.pending_buf,b.pending-P,P)),E(d),P=b.pending,b.pending!==b.pending_buf_size));)g(b,255&b.gzhead.extra[b.gzindex]),b.gzindex++;b.gzhead.hcrc&&b.pending>P&&(d.adler=i(d.adler,b.pending_buf,b.pending-P,P)),b.gzindex===b.gzhead.extra.length&&(b.gzindex=0,b.status=73)}else b.status=73;if(b.status===73)if(b.gzhead.name){P=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>P&&(d.adler=i(d.adler,b.pending_buf,b.pending-P,P)),E(d),P=b.pending,b.pending===b.pending_buf_size)){F=1;break}F=b.gzindex<b.gzhead.name.length?255&b.gzhead.name.charCodeAt(b.gzindex++):0,g(b,F)}while(F!==0);b.gzhead.hcrc&&b.pending>P&&(d.adler=i(d.adler,b.pending_buf,b.pending-P,P)),F===0&&(b.gzindex=0,b.status=91)}else b.status=91;if(b.status===91)if(b.gzhead.comment){P=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>P&&(d.adler=i(d.adler,b.pending_buf,b.pending-P,P)),E(d),P=b.pending,b.pending===b.pending_buf_size)){F=1;break}F=b.gzindex<b.gzhead.comment.length?255&b.gzhead.comment.charCodeAt(b.gzindex++):0,g(b,F)}while(F!==0);b.gzhead.hcrc&&b.pending>P&&(d.adler=i(d.adler,b.pending_buf,b.pending-P,P)),F===0&&(b.status=103)}else b.status=103;if(b.status===103&&(b.gzhead.hcrc?(b.pending+2>b.pending_buf_size&&E(d),b.pending+2<=b.pending_buf_size&&(g(b,255&d.adler),g(b,d.adler>>8&255),d.adler=0,b.status=113)):b.status=113),b.pending!==0){if(E(d),d.avail_out===0)return b.last_flush=-1,0}else if(d.avail_in===0&&m(p)<=m(C)&&p!==4)return u(d,-5);if(b.status===666&&d.avail_in!==0)return u(d,-5);if(d.avail_in!==0||b.lookahead!==0||p!==0&&b.status!==666){var I=b.strategy===2?function(N,k){for(var w;;){if(N.lookahead===0&&(L(N),N.lookahead===0)){if(k===0)return 1;break}if(N.match_length=0,w=l._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,w&&(y(N,!1),N.strm.avail_out===0))return 1}return N.insert=0,k===4?(y(N,!0),N.strm.avail_out===0?3:4):N.last_lit&&(y(N,!1),N.strm.avail_out===0)?1:2}(b,p):b.strategy===3?function(N,k){for(var w,h,B,z,X=N.window;;){if(N.lookahead<=258){if(L(N),N.lookahead<=258&&k===0)return 1;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=3&&N.strstart>0&&(h=X[B=N.strstart-1])===X[++B]&&h===X[++B]&&h===X[++B]){z=N.strstart+258;do;while(h===X[++B]&&h===X[++B]&&h===X[++B]&&h===X[++B]&&h===X[++B]&&h===X[++B]&&h===X[++B]&&h===X[++B]&&B<z);N.match_length=258-(z-B),N.match_length>N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=3?(w=l._tr_tally(N,1,N.match_length-3),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(w=l._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),w&&(y(N,!1),N.strm.avail_out===0))return 1}return N.insert=0,k===4?(y(N,!0),N.strm.avail_out===0?3:4):N.last_lit&&(y(N,!1),N.strm.avail_out===0)?1:2}(b,p):r[b.level].func(b,p);if(I!==3&&I!==4||(b.status=666),I===1||I===3)return d.avail_out===0&&(b.last_flush=-1),0;if(I===2&&(p===1?l._tr_align(b):p!==5&&(l._tr_stored_block(b,0,0,!1),p===3&&(R(b.head),b.lookahead===0&&(b.strstart=0,b.block_start=0,b.insert=0))),E(d),d.avail_out===0))return b.last_flush=-1,0}return p!==4?0:b.wrap<=0?1:(b.wrap===2?(g(b,255&d.adler),g(b,d.adler>>8&255),g(b,d.adler>>16&255),g(b,d.adler>>24&255),g(b,255&d.total_in),g(b,d.total_in>>8&255),g(b,d.total_in>>16&255),g(b,d.total_in>>24&255)):(_(b,d.adler>>>16),_(b,65535&d.adler)),E(d),b.wrap>0&&(b.wrap=-b.wrap),b.pending!==0?0:1)},t.deflateEnd=function(d){var p;return d&&d.state?(p=d.state.status)!==42&&p!==69&&p!==73&&p!==91&&p!==103&&p!==113&&p!==666?u(d,-2):(d.state=null,p===113?u(d,-3):0):-2},t.deflateSetDictionary=function(d,p){var C,b,P,F,D,I,N,k,w=p.length;if(!d||!d.state||(F=(C=d.state).wrap)===2||F===1&&C.status!==42||C.lookahead)return-2;for(F===1&&(d.adler=s(d.adler,p,w,0)),C.wrap=0,w>=C.w_size&&(F===0&&(R(C.head),C.strstart=0,C.block_start=0,C.insert=0),k=new o.Buf8(C.w_size),o.arraySet(k,p,w-C.w_size,C.w_size,0),p=k,w=C.w_size),D=d.avail_in,I=d.next_in,N=d.input,d.avail_in=w,d.next_in=0,d.input=p,L(C);C.lookahead>=3;){b=C.strstart,P=C.lookahead-2;do C.ins_h=(C.ins_h<<C.hash_shift^C.window[b+3-1])&C.hash_mask,C.prev[b&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=b,b++;while(--P);C.strstart=b,C.lookahead=2,L(C)}return C.strstart+=C.lookahead,C.block_start=C.strstart,C.insert=C.lookahead,C.lookahead=0,C.match_length=C.prev_length=2,C.match_available=0,d.next_in=I,d.input=N,d.avail_in=D,C.wrap=F,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){var r=n(37);function o(h){for(var B=h.length;--B>=0;)h[B]=0}var l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);o(u);var m=new Array(60);o(m);var R=new Array(512);o(R);var E=new Array(256);o(E);var y=new Array(29);o(y);var g,_,T,L=new Array(30);function V(h,B,z,X,Q){this.static_tree=h,this.extra_bits=B,this.extra_base=z,this.elems=X,this.max_length=Q,this.has_stree=h&&h.length}function M(h,B){this.dyn_tree=h,this.max_code=0,this.stat_desc=B}function A(h){return h<256?R[h]:R[256+(h>>>7)]}function f(h,B){h.pending_buf[h.pending++]=255&B,h.pending_buf[h.pending++]=B>>>8&255}function O(h,B,z){h.bi_valid>16-z?(h.bi_buf|=B<<h.bi_valid&65535,f(h,h.bi_buf),h.bi_buf=B>>16-h.bi_valid,h.bi_valid+=z-16):(h.bi_buf|=B<<h.bi_valid&65535,h.bi_valid+=z)}function Y(h,B,z){O(h,z[2*B],z[2*B+1])}function Z(h,B){var z=0;do z|=1&h,h>>>=1,z<<=1;while(--B>0);return z>>>1}function d(h,B,z){var X,Q,te=new Array(16),q=0;for(X=1;X<=15;X++)te[X]=q=q+z[X-1]<<1;for(Q=0;Q<=B;Q++){var H=h[2*Q+1];H!==0&&(h[2*Q]=Z(te[H]++,H))}}function p(h){var B;for(B=0;B<286;B++)h.dyn_ltree[2*B]=0;for(B=0;B<30;B++)h.dyn_dtree[2*B]=0;for(B=0;B<19;B++)h.bl_tree[2*B]=0;h.dyn_ltree[512]=1,h.opt_len=h.static_len=0,h.last_lit=h.matches=0}function C(h){h.bi_valid>8?f(h,h.bi_buf):h.bi_valid>0&&(h.pending_buf[h.pending++]=h.bi_buf),h.bi_buf=0,h.bi_valid=0}function b(h,B,z,X){var Q=2*B,te=2*z;return h[Q]<h[te]||h[Q]===h[te]&&X[B]<=X[z]}function P(h,B,z){for(var X=h.heap[z],Q=z<<1;Q<=h.heap_len&&(Q<h.heap_len&&b(B,h.heap[Q+1],h.heap[Q],h.depth)&&Q++,!b(B,X,h.heap[Q],h.depth));)h.heap[z]=h.heap[Q],z=Q,Q<<=1;h.heap[z]=X}function F(h,B,z){var X,Q,te,q,H=0;if(h.last_lit!==0)do X=h.pending_buf[h.d_buf+2*H]<<8|h.pending_buf[h.d_buf+2*H+1],Q=h.pending_buf[h.l_buf+H],H++,X===0?Y(h,Q,B):(Y(h,(te=E[Q])+256+1,B),(q=l[te])!==0&&O(h,Q-=y[te],q),Y(h,te=A(--X),z),(q=s[te])!==0&&O(h,X-=L[te],q));while(H<h.last_lit);Y(h,256,B)}function D(h,B){var z,X,Q,te=B.dyn_tree,q=B.stat_desc.static_tree,H=B.stat_desc.has_stree,v=B.stat_desc.elems,S=-1;for(h.heap_len=0,h.heap_max=573,z=0;z<v;z++)te[2*z]!==0?(h.heap[++h.heap_len]=S=z,h.depth[z]=0):te[2*z+1]=0;for(;h.heap_len<2;)te[2*(Q=h.heap[++h.heap_len]=S<2?++S:0)]=1,h.depth[Q]=0,h.opt_len--,H&&(h.static_len-=q[2*Q+1]);for(B.max_code=S,z=h.heap_len>>1;z>=1;z--)P(h,te,z);Q=v;do z=h.heap[1],h.heap[1]=h.heap[h.heap_len--],P(h,te,1),X=h.heap[1],h.heap[--h.heap_max]=z,h.heap[--h.heap_max]=X,te[2*Q]=te[2*z]+te[2*X],h.depth[Q]=(h.depth[z]>=h.depth[X]?h.depth[z]:h.depth[X])+1,te[2*z+1]=te[2*X+1]=Q,h.heap[1]=Q++,P(h,te,1);while(h.heap_len>=2);h.heap[--h.heap_max]=h.heap[1],function(U,J){var $,ne,se,ge,ve,Oe,Se=J.dyn_tree,Ce=J.max_code,Ee=J.stat_desc.static_tree,Te=J.stat_desc.has_stree,De=J.stat_desc.extra_bits,qe=J.stat_desc.extra_base,Qe=J.stat_desc.max_length,tt=0;for(ge=0;ge<=15;ge++)U.bl_count[ge]=0;for(Se[2*U.heap[U.heap_max]+1]=0,$=U.heap_max+1;$<573;$++)(ge=Se[2*Se[2*(ne=U.heap[$])+1]+1]+1)>Qe&&(ge=Qe,tt++),Se[2*ne+1]=ge,ne>Ce||(U.bl_count[ge]++,ve=0,ne>=qe&&(ve=De[ne-qe]),Oe=Se[2*ne],U.opt_len+=Oe*(ge+ve),Te&&(U.static_len+=Oe*(Ee[2*ne+1]+ve)));if(tt!==0){do{for(ge=Qe-1;U.bl_count[ge]===0;)ge--;U.bl_count[ge]--,U.bl_count[ge+1]+=2,U.bl_count[Qe]--,tt-=2}while(tt>0);for(ge=Qe;ge!==0;ge--)for(ne=U.bl_count[ge];ne!==0;)(se=U.heap[--$])>Ce||(Se[2*se+1]!==ge&&(U.opt_len+=(ge-Se[2*se+1])*Se[2*se],Se[2*se+1]=ge),ne--)}}(h,B),d(te,S,h.bl_count)}function I(h,B,z){var X,Q,te=-1,q=B[1],H=0,v=7,S=4;for(q===0&&(v=138,S=3),B[2*(z+1)+1]=65535,X=0;X<=z;X++)Q=q,q=B[2*(X+1)+1],++H<v&&Q===q||(H<S?h.bl_tree[2*Q]+=H:Q!==0?(Q!==te&&h.bl_tree[2*Q]++,h.bl_tree[32]++):H<=10?h.bl_tree[34]++:h.bl_tree[36]++,H=0,te=Q,q===0?(v=138,S=3):Q===q?(v=6,S=3):(v=7,S=4))}function N(h,B,z){var X,Q,te=-1,q=B[1],H=0,v=7,S=4;for(q===0&&(v=138,S=3),X=0;X<=z;X++)if(Q=q,q=B[2*(X+1)+1],!(++H<v&&Q===q)){if(H<S)do Y(h,Q,h.bl_tree);while(--H!=0);else Q!==0?(Q!==te&&(Y(h,Q,h.bl_tree),H--),Y(h,16,h.bl_tree),O(h,H-3,2)):H<=10?(Y(h,17,h.bl_tree),O(h,H-3,3)):(Y(h,18,h.bl_tree),O(h,H-11,7));H=0,te=Q,q===0?(v=138,S=3):Q===q?(v=6,S=3):(v=7,S=4)}}o(L);var k=!1;function w(h,B,z,X){O(h,0+(X?1:0),3),function(Q,te,q,H){C(Q),H&&(f(Q,q),f(Q,~q)),r.arraySet(Q.pending_buf,Q.window,te,q,Q.pending),Q.pending+=q}(h,B,z,!0)}t._tr_init=function(h){k||(function(){var B,z,X,Q,te,q=new Array(16);for(X=0,Q=0;Q<28;Q++)for(y[Q]=X,B=0;B<1<<l[Q];B++)E[X++]=Q;for(E[X-1]=Q,te=0,Q=0;Q<16;Q++)for(L[Q]=te,B=0;B<1<<s[Q];B++)R[te++]=Q;for(te>>=7;Q<30;Q++)for(L[Q]=te<<7,B=0;B<1<<s[Q]-7;B++)R[256+te++]=Q;for(z=0;z<=15;z++)q[z]=0;for(B=0;B<=143;)u[2*B+1]=8,B++,q[8]++;for(;B<=255;)u[2*B+1]=9,B++,q[9]++;for(;B<=279;)u[2*B+1]=7,B++,q[7]++;for(;B<=287;)u[2*B+1]=8,B++,q[8]++;for(d(u,287,q),B=0;B<30;B++)m[2*B+1]=5,m[2*B]=Z(B,5);g=new V(u,l,257,286,15),_=new V(m,s,0,30,15),T=new V(new Array(0),i,0,19,7)}(),k=!0),h.l_desc=new M(h.dyn_ltree,g),h.d_desc=new M(h.dyn_dtree,_),h.bl_desc=new M(h.bl_tree,T),h.bi_buf=0,h.bi_valid=0,p(h)},t._tr_stored_block=w,t._tr_flush_block=function(h,B,z,X){var Q,te,q=0;h.level>0?(h.strm.data_type===2&&(h.strm.data_type=function(H){var v,S=4093624447;for(v=0;v<=31;v++,S>>>=1)if(1&S&&H.dyn_ltree[2*v]!==0)return 0;if(H.dyn_ltree[18]!==0||H.dyn_ltree[20]!==0||H.dyn_ltree[26]!==0)return 1;for(v=32;v<256;v++)if(H.dyn_ltree[2*v]!==0)return 1;return 0}(h)),D(h,h.l_desc),D(h,h.d_desc),q=function(H){var v;for(I(H,H.dyn_ltree,H.l_desc.max_code),I(H,H.dyn_dtree,H.d_desc.max_code),D(H,H.bl_desc),v=18;v>=3&&H.bl_tree[2*c[v]+1]===0;v--);return H.opt_len+=3*(v+1)+5+5+4,v}(h),Q=h.opt_len+3+7>>>3,(te=h.static_len+3+7>>>3)<=Q&&(Q=te)):Q=te=z+5,z+4<=Q&&B!==-1?w(h,B,z,X):h.strategy===4||te===Q?(O(h,2+(X?1:0),3),F(h,u,m)):(O(h,4+(X?1:0),3),function(H,v,S,U){var J;for(O(H,v-257,5),O(H,S-1,5),O(H,U-4,4),J=0;J<U;J++)O(H,H.bl_tree[2*c[J]+1],3);N(H,H.dyn_ltree,v-1),N(H,H.dyn_dtree,S-1)}(h,h.l_desc.max_code+1,h.d_desc.max_code+1,q+1),F(h,h.dyn_ltree,h.dyn_dtree)),p(h),X&&C(h)},t._tr_tally=function(h,B,z){return h.pending_buf[h.d_buf+2*h.last_lit]=B>>>8&255,h.pending_buf[h.d_buf+2*h.last_lit+1]=255&B,h.pending_buf[h.l_buf+h.last_lit]=255&z,h.last_lit++,B===0?h.dyn_ltree[2*z]++:(h.matches++,B--,h.dyn_ltree[2*(E[z]+256+1)]++,h.dyn_dtree[2*A(B)]++),h.last_lit===h.lit_bufsize-1},t._tr_align=function(h){O(h,2,3),Y(h,256,u),function(B){B.bi_valid===16?(f(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):B.bi_valid>=8&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)}(h)}},function(e,t,n){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){var r=n(37),o=n(75),l=n(76),s=n(176),i=n(177);function c(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(M){var A;return M&&M.state?(A=M.state,M.total_in=M.total_out=A.total=0,M.msg="",A.wrap&&(M.adler=1&A.wrap),A.mode=1,A.last=0,A.havedict=0,A.dmax=32768,A.head=null,A.hold=0,A.bits=0,A.lencode=A.lendyn=new r.Buf32(852),A.distcode=A.distdyn=new r.Buf32(592),A.sane=1,A.back=-1,0):-2}function R(M){var A;return M&&M.state?((A=M.state).wsize=0,A.whave=0,A.wnext=0,m(M)):-2}function E(M,A){var f,O;return M&&M.state?(O=M.state,A<0?(f=0,A=-A):(f=1+(A>>4),A<48&&(A&=15)),A&&(A<8||A>15)?-2:(O.window!==null&&O.wbits!==A&&(O.window=null),O.wrap=f,O.wbits=A,R(M))):-2}function y(M,A){var f,O;return M?(O=new u,M.state=O,O.window=null,(f=E(M,A))!==0&&(M.state=null),f):-2}var g,_,T=!0;function L(M){if(T){var A;for(g=new r.Buf32(512),_=new r.Buf32(32),A=0;A<144;)M.lens[A++]=8;for(;A<256;)M.lens[A++]=9;for(;A<280;)M.lens[A++]=7;for(;A<288;)M.lens[A++]=8;for(i(1,M.lens,0,288,g,0,M.work,{bits:9}),A=0;A<32;)M.lens[A++]=5;i(2,M.lens,0,32,_,0,M.work,{bits:5}),T=!1}M.lencode=g,M.lenbits=9,M.distcode=_,M.distbits=5}function V(M,A,f,O){var Y,Z=M.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new r.Buf8(Z.wsize)),O>=Z.wsize?(r.arraySet(Z.window,A,f-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):((Y=Z.wsize-Z.wnext)>O&&(Y=O),r.arraySet(Z.window,A,f-O,Y,Z.wnext),(O-=Y)?(r.arraySet(Z.window,A,f-O,O,0),Z.wnext=O,Z.whave=Z.wsize):(Z.wnext+=Y,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=Y))),0}t.inflateReset=R,t.inflateReset2=E,t.inflateResetKeep=m,t.inflateInit=function(M){return y(M,15)},t.inflateInit2=y,t.inflate=function(M,A){var f,O,Y,Z,d,p,C,b,P,F,D,I,N,k,w,h,B,z,X,Q,te,q,H,v,S=0,U=new r.Buf8(4),J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return-2;(f=M.state).mode===12&&(f.mode=13),d=M.next_out,Y=M.output,C=M.avail_out,Z=M.next_in,O=M.input,p=M.avail_in,b=f.hold,P=f.bits,F=p,D=C,q=0;e:for(;;)switch(f.mode){case 1:if(f.wrap===0){f.mode=13;break}for(;P<16;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(2&f.wrap&&b===35615){f.check=0,U[0]=255&b,U[1]=b>>>8&255,f.check=l(f.check,U,2,0),b=0,P=0,f.mode=2;break}if(f.flags=0,f.head&&(f.head.done=!1),!(1&f.wrap)||(((255&b)<<8)+(b>>8))%31){M.msg="incorrect header check",f.mode=30;break}if((15&b)!=8){M.msg="unknown compression method",f.mode=30;break}if(P-=4,te=8+(15&(b>>>=4)),f.wbits===0)f.wbits=te;else if(te>f.wbits){M.msg="invalid window size",f.mode=30;break}f.dmax=1<<te,M.adler=f.check=1,f.mode=512&b?10:12,b=0,P=0;break;case 2:for(;P<16;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(f.flags=b,(255&f.flags)!=8){M.msg="unknown compression method",f.mode=30;break}if(57344&f.flags){M.msg="unknown header flags set",f.mode=30;break}f.head&&(f.head.text=b>>8&1),512&f.flags&&(U[0]=255&b,U[1]=b>>>8&255,f.check=l(f.check,U,2,0)),b=0,P=0,f.mode=3;case 3:for(;P<32;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}f.head&&(f.head.time=b),512&f.flags&&(U[0]=255&b,U[1]=b>>>8&255,U[2]=b>>>16&255,U[3]=b>>>24&255,f.check=l(f.check,U,4,0)),b=0,P=0,f.mode=4;case 4:for(;P<16;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}f.head&&(f.head.xflags=255&b,f.head.os=b>>8),512&f.flags&&(U[0]=255&b,U[1]=b>>>8&255,f.check=l(f.check,U,2,0)),b=0,P=0,f.mode=5;case 5:if(1024&f.flags){for(;P<16;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}f.length=b,f.head&&(f.head.extra_len=b),512&f.flags&&(U[0]=255&b,U[1]=b>>>8&255,f.check=l(f.check,U,2,0)),b=0,P=0}else f.head&&(f.head.extra=null);f.mode=6;case 6:if(1024&f.flags&&((I=f.length)>p&&(I=p),I&&(f.head&&(te=f.head.extra_len-f.length,f.head.extra||(f.head.extra=new Array(f.head.extra_len)),r.arraySet(f.head.extra,O,Z,I,te)),512&f.flags&&(f.check=l(f.check,O,I,Z)),p-=I,Z+=I,f.length-=I),f.length))break e;f.length=0,f.mode=7;case 7:if(2048&f.flags){if(p===0)break e;I=0;do te=O[Z+I++],f.head&&te&&f.length<65536&&(f.head.name+=String.fromCharCode(te));while(te&&I<p);if(512&f.flags&&(f.check=l(f.check,O,I,Z)),p-=I,Z+=I,te)break e}else f.head&&(f.head.name=null);f.length=0,f.mode=8;case 8:if(4096&f.flags){if(p===0)break e;I=0;do te=O[Z+I++],f.head&&te&&f.length<65536&&(f.head.comment+=String.fromCharCode(te));while(te&&I<p);if(512&f.flags&&(f.check=l(f.check,O,I,Z)),p-=I,Z+=I,te)break e}else f.head&&(f.head.comment=null);f.mode=9;case 9:if(512&f.flags){for(;P<16;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(b!==(65535&f.check)){M.msg="header crc mismatch",f.mode=30;break}b=0,P=0}f.head&&(f.head.hcrc=f.flags>>9&1,f.head.done=!0),M.adler=f.check=0,f.mode=12;break;case 10:for(;P<32;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}M.adler=f.check=c(b),b=0,P=0,f.mode=11;case 11:if(f.havedict===0)return M.next_out=d,M.avail_out=C,M.next_in=Z,M.avail_in=p,f.hold=b,f.bits=P,2;M.adler=f.check=1,f.mode=12;case 12:if(A===5||A===6)break e;case 13:if(f.last){b>>>=7&P,P-=7&P,f.mode=27;break}for(;P<3;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}switch(f.last=1&b,P-=1,3&(b>>>=1)){case 0:f.mode=14;break;case 1:if(L(f),f.mode=20,A===6){b>>>=2,P-=2;break e}break;case 2:f.mode=17;break;case 3:M.msg="invalid block type",f.mode=30}b>>>=2,P-=2;break;case 14:for(b>>>=7&P,P-=7&P;P<32;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if((65535&b)!=(b>>>16^65535)){M.msg="invalid stored block lengths",f.mode=30;break}if(f.length=65535&b,b=0,P=0,f.mode=15,A===6)break e;case 15:f.mode=16;case 16:if(I=f.length){if(I>p&&(I=p),I>C&&(I=C),I===0)break e;r.arraySet(Y,O,Z,I,d),p-=I,Z+=I,C-=I,d+=I,f.length-=I;break}f.mode=12;break;case 17:for(;P<14;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(f.nlen=257+(31&b),b>>>=5,P-=5,f.ndist=1+(31&b),b>>>=5,P-=5,f.ncode=4+(15&b),b>>>=4,P-=4,f.nlen>286||f.ndist>30){M.msg="too many length or distance symbols",f.mode=30;break}f.have=0,f.mode=18;case 18:for(;f.have<f.ncode;){for(;P<3;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}f.lens[J[f.have++]]=7&b,b>>>=3,P-=3}for(;f.have<19;)f.lens[J[f.have++]]=0;if(f.lencode=f.lendyn,f.lenbits=7,H={bits:f.lenbits},q=i(0,f.lens,0,19,f.lencode,0,f.work,H),f.lenbits=H.bits,q){M.msg="invalid code lengths set",f.mode=30;break}f.have=0,f.mode=19;case 19:for(;f.have<f.nlen+f.ndist;){for(;h=(S=f.lencode[b&(1<<f.lenbits)-1])>>>16&255,B=65535&S,!((w=S>>>24)<=P);){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(B<16)b>>>=w,P-=w,f.lens[f.have++]=B;else{if(B===16){for(v=w+2;P<v;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(b>>>=w,P-=w,f.have===0){M.msg="invalid bit length repeat",f.mode=30;break}te=f.lens[f.have-1],I=3+(3&b),b>>>=2,P-=2}else if(B===17){for(v=w+3;P<v;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}P-=w,te=0,I=3+(7&(b>>>=w)),b>>>=3,P-=3}else{for(v=w+7;P<v;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}P-=w,te=0,I=11+(127&(b>>>=w)),b>>>=7,P-=7}if(f.have+I>f.nlen+f.ndist){M.msg="invalid bit length repeat",f.mode=30;break}for(;I--;)f.lens[f.have++]=te}}if(f.mode===30)break;if(f.lens[256]===0){M.msg="invalid code -- missing end-of-block",f.mode=30;break}if(f.lenbits=9,H={bits:f.lenbits},q=i(1,f.lens,0,f.nlen,f.lencode,0,f.work,H),f.lenbits=H.bits,q){M.msg="invalid literal/lengths set",f.mode=30;break}if(f.distbits=6,f.distcode=f.distdyn,H={bits:f.distbits},q=i(2,f.lens,f.nlen,f.ndist,f.distcode,0,f.work,H),f.distbits=H.bits,q){M.msg="invalid distances set",f.mode=30;break}if(f.mode=20,A===6)break e;case 20:f.mode=21;case 21:if(p>=6&&C>=258){M.next_out=d,M.avail_out=C,M.next_in=Z,M.avail_in=p,f.hold=b,f.bits=P,s(M,D),d=M.next_out,Y=M.output,C=M.avail_out,Z=M.next_in,O=M.input,p=M.avail_in,b=f.hold,P=f.bits,f.mode===12&&(f.back=-1);break}for(f.back=0;h=(S=f.lencode[b&(1<<f.lenbits)-1])>>>16&255,B=65535&S,!((w=S>>>24)<=P);){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(h&&(240&h)==0){for(z=w,X=h,Q=B;h=(S=f.lencode[Q+((b&(1<<z+X)-1)>>z)])>>>16&255,B=65535&S,!(z+(w=S>>>24)<=P);){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}b>>>=z,P-=z,f.back+=z}if(b>>>=w,P-=w,f.back+=w,f.length=B,h===0){f.mode=26;break}if(32&h){f.back=-1,f.mode=12;break}if(64&h){M.msg="invalid literal/length code",f.mode=30;break}f.extra=15&h,f.mode=22;case 22:if(f.extra){for(v=f.extra;P<v;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}f.length+=b&(1<<f.extra)-1,b>>>=f.extra,P-=f.extra,f.back+=f.extra}f.was=f.length,f.mode=23;case 23:for(;h=(S=f.distcode[b&(1<<f.distbits)-1])>>>16&255,B=65535&S,!((w=S>>>24)<=P);){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if((240&h)==0){for(z=w,X=h,Q=B;h=(S=f.distcode[Q+((b&(1<<z+X)-1)>>z)])>>>16&255,B=65535&S,!(z+(w=S>>>24)<=P);){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}b>>>=z,P-=z,f.back+=z}if(b>>>=w,P-=w,f.back+=w,64&h){M.msg="invalid distance code",f.mode=30;break}f.offset=B,f.extra=15&h,f.mode=24;case 24:if(f.extra){for(v=f.extra;P<v;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}f.offset+=b&(1<<f.extra)-1,b>>>=f.extra,P-=f.extra,f.back+=f.extra}if(f.offset>f.dmax){M.msg="invalid distance too far back",f.mode=30;break}f.mode=25;case 25:if(C===0)break e;if(I=D-C,f.offset>I){if((I=f.offset-I)>f.whave&&f.sane){M.msg="invalid distance too far back",f.mode=30;break}I>f.wnext?(I-=f.wnext,N=f.wsize-I):N=f.wnext-I,I>f.length&&(I=f.length),k=f.window}else k=Y,N=d-f.offset,I=f.length;I>C&&(I=C),C-=I,f.length-=I;do Y[d++]=k[N++];while(--I);f.length===0&&(f.mode=21);break;case 26:if(C===0)break e;Y[d++]=f.length,C--,f.mode=21;break;case 27:if(f.wrap){for(;P<32;){if(p===0)break e;p--,b|=O[Z++]<<P,P+=8}if(D-=C,M.total_out+=D,f.total+=D,D&&(M.adler=f.check=f.flags?l(f.check,Y,D,d-D):o(f.check,Y,D,d-D)),D=C,(f.flags?b:c(b))!==f.check){M.msg="incorrect data check",f.mode=30;break}b=0,P=0}f.mode=28;case 28:if(f.wrap&&f.flags){for(;P<32;){if(p===0)break e;p--,b+=O[Z++]<<P,P+=8}if(b!==(4294967295&f.total)){M.msg="incorrect length check",f.mode=30;break}b=0,P=0}f.mode=29;case 29:q=1;break e;case 30:q=-3;break e;case 31:return-4;case 32:default:return-2}return M.next_out=d,M.avail_out=C,M.next_in=Z,M.avail_in=p,f.hold=b,f.bits=P,(f.wsize||D!==M.avail_out&&f.mode<30&&(f.mode<27||A!==4))&&V(M,M.output,M.next_out,D-M.avail_out)?(f.mode=31,-4):(F-=M.avail_in,D-=M.avail_out,M.total_in+=F,M.total_out+=D,f.total+=D,f.wrap&&D&&(M.adler=f.check=f.flags?l(f.check,Y,D,M.next_out-D):o(f.check,Y,D,M.next_out-D)),M.data_type=f.bits+(f.last?64:0)+(f.mode===12?128:0)+(f.mode===20||f.mode===15?256:0),(F===0&&D===0||A===4)&&q===0&&(q=-5),q)},t.inflateEnd=function(M){if(!M||!M.state)return-2;var A=M.state;return A.window&&(A.window=null),M.state=null,0},t.inflateGetHeader=function(M,A){var f;return M&&M.state?(2&(f=M.state).wrap)==0?-2:(f.head=A,A.done=!1,0):-2},t.inflateSetDictionary=function(M,A){var f,O=A.length;return M&&M.state?(f=M.state).wrap!==0&&f.mode!==11?-2:f.mode===11&&o(1,A,O,0)!==f.check?-3:V(M,A,O,O)?(f.mode=31,-4):(f.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){e.exports=function(r,o){var l,s,i,c,u,m,R,E,y,g,_,T,L,V,M,A,f,O,Y,Z,d,p,C,b,P;l=r.state,s=r.next_in,b=r.input,i=s+(r.avail_in-5),c=r.next_out,P=r.output,u=c-(o-r.avail_out),m=c+(r.avail_out-257),R=l.dmax,E=l.wsize,y=l.whave,g=l.wnext,_=l.window,T=l.hold,L=l.bits,V=l.lencode,M=l.distcode,A=(1<<l.lenbits)-1,f=(1<<l.distbits)-1;e:do{L<15&&(T+=b[s++]<<L,L+=8,T+=b[s++]<<L,L+=8),O=V[T&A];t:for(;;){if(T>>>=Y=O>>>24,L-=Y,(Y=O>>>16&255)===0)P[c++]=65535&O;else{if(!(16&Y)){if((64&Y)==0){O=V[(65535&O)+(T&(1<<Y)-1)];continue t}if(32&Y){l.mode=12;break e}r.msg="invalid literal/length code",l.mode=30;break e}Z=65535&O,(Y&=15)&&(L<Y&&(T+=b[s++]<<L,L+=8),Z+=T&(1<<Y)-1,T>>>=Y,L-=Y),L<15&&(T+=b[s++]<<L,L+=8,T+=b[s++]<<L,L+=8),O=M[T&f];n:for(;;){if(T>>>=Y=O>>>24,L-=Y,!(16&(Y=O>>>16&255))){if((64&Y)==0){O=M[(65535&O)+(T&(1<<Y)-1)];continue n}r.msg="invalid distance code",l.mode=30;break e}if(d=65535&O,L<(Y&=15)&&(T+=b[s++]<<L,(L+=8)<Y&&(T+=b[s++]<<L,L+=8)),(d+=T&(1<<Y)-1)>R){r.msg="invalid distance too far back",l.mode=30;break e}if(T>>>=Y,L-=Y,d>(Y=c-u)){if((Y=d-Y)>y&&l.sane){r.msg="invalid distance too far back",l.mode=30;break e}if(p=0,C=_,g===0){if(p+=E-Y,Y<Z){Z-=Y;do P[c++]=_[p++];while(--Y);p=c-d,C=P}}else if(g<Y){if(p+=E+g-Y,(Y-=g)<Z){Z-=Y;do P[c++]=_[p++];while(--Y);if(p=0,g<Z){Z-=Y=g;do P[c++]=_[p++];while(--Y);p=c-d,C=P}}}else if(p+=g-Y,Y<Z){Z-=Y;do P[c++]=_[p++];while(--Y);p=c-d,C=P}for(;Z>2;)P[c++]=C[p++],P[c++]=C[p++],P[c++]=C[p++],Z-=3;Z&&(P[c++]=C[p++],Z>1&&(P[c++]=C[p++]))}else{p=c-d;do P[c++]=P[p++],P[c++]=P[p++],P[c++]=P[p++],Z-=3;while(Z>2);Z&&(P[c++]=P[p++],Z>1&&(P[c++]=P[p++]))}break}}break}}while(s<i&&c<m);s-=Z=L>>3,T&=(1<<(L-=Z<<3))-1,r.next_in=s,r.next_out=c,r.avail_in=s<i?i-s+5:5-(s-i),r.avail_out=c<m?m-c+257:257-(c-m),l.hold=T,l.bits=L}},function(e,t,n){var r=n(37),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(c,u,m,R,E,y,g,_){var T,L,V,M,A,f,O,Y,Z,d=_.bits,p=0,C=0,b=0,P=0,F=0,D=0,I=0,N=0,k=0,w=0,h=null,B=0,z=new r.Buf16(16),X=new r.Buf16(16),Q=null,te=0;for(p=0;p<=15;p++)z[p]=0;for(C=0;C<R;C++)z[u[m+C]]++;for(F=d,P=15;P>=1&&z[P]===0;P--);if(F>P&&(F=P),P===0)return E[y++]=20971520,E[y++]=20971520,_.bits=1,0;for(b=1;b<P&&z[b]===0;b++);for(F<b&&(F=b),N=1,p=1;p<=15;p++)if(N<<=1,(N-=z[p])<0)return-1;if(N>0&&(c===0||P!==1))return-1;for(X[1]=0,p=1;p<15;p++)X[p+1]=X[p]+z[p];for(C=0;C<R;C++)u[m+C]!==0&&(g[X[u[m+C]]++]=C);if(c===0?(h=Q=g,f=19):c===1?(h=o,B-=257,Q=l,te-=257,f=256):(h=s,Q=i,f=-1),w=0,C=0,p=b,A=y,D=F,I=0,V=-1,M=(k=1<<F)-1,c===1&&k>852||c===2&&k>592)return 1;for(;;){O=p-I,g[C]<f?(Y=0,Z=g[C]):g[C]>f?(Y=Q[te+g[C]],Z=h[B+g[C]]):(Y=96,Z=0),T=1<<p-I,b=L=1<<D;do E[A+(w>>I)+(L-=T)]=O<<24|Y<<16|Z|0;while(L!==0);for(T=1<<p-1;w&T;)T>>=1;if(T!==0?(w&=T-1,w+=T):w=0,C++,--z[p]==0){if(p===P)break;p=u[m+g[C]]}if(p>F&&(w&M)!==V){for(I===0&&(I=F),A+=b,N=1<<(D=p-I);D+I<P&&!((N-=z[D+I])<=0);)D++,N<<=1;if(k+=1<<D,c===1&&k>852||c===2&&k>592)return 1;E[V=w&M]=F<<24|D<<16|A-y|0}}return w!==0&&(E[A+w]=p-I<<24|64<<16|0),_.bits=F,0}},function(e,t,n){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){},function(e,t,n){function r(u,m){var R=Object.keys(u);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(u);m&&(E=E.filter(function(y){return Object.getOwnPropertyDescriptor(u,y).enumerable})),R.push.apply(R,E)}return R}function o(u,m,R){return m in u?Object.defineProperty(u,m,{value:R,enumerable:!0,configurable:!0,writable:!0}):u[m]=R,u}function l(u,m){for(var R=0;R<m.length;R++){var E=m[R];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}var s=n(5).Buffer,i=n(181).inspect,c=i&&i.custom||"inspect";e.exports=function(){function u(){(function(E,y){if(!(E instanceof y))throw new TypeError("Cannot call a class as a function")})(this,u),this.head=null,this.tail=null,this.length=0}var m,R;return m=u,(R=[{key:"push",value:function(E){var y={data:E,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(E){var y={data:E,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(E){if(this.length===0)return"";for(var y=this.head,g=""+y.data;y=y.next;)g+=E+y.data;return g}},{key:"concat",value:function(E){if(this.length===0)return s.alloc(0);for(var y,g,_,T=s.allocUnsafe(E>>>0),L=this.head,V=0;L;)y=L.data,g=T,_=V,s.prototype.copy.call(y,g,_),V+=L.data.length,L=L.next;return T}},{key:"consume",value:function(E,y){var g;return E<this.head.data.length?(g=this.head.data.slice(0,E),this.head.data=this.head.data.slice(E)):g=E===this.head.data.length?this.shift():y?this._getString(E):this._getBuffer(E),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(E){var y=this.head,g=1,_=y.data;for(E-=_.length;y=y.next;){var T=y.data,L=E>T.length?T.length:E;if(L===T.length?_+=T:_+=T.slice(0,E),(E-=L)==0){L===T.length?(++g,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=T.slice(L));break}++g}return this.length-=g,_}},{key:"_getBuffer",value:function(E){var y=s.allocUnsafe(E),g=this.head,_=1;for(g.data.copy(y),E-=g.data.length;g=g.next;){var T=g.data,L=E>T.length?T.length:E;if(T.copy(y,y.length-E,0,L),(E-=L)==0){L===T.length?(++_,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=T.slice(L));break}++_}return this.length-=_,y}},{key:c,value:function(E,y){return i(this,function(g){for(var _=1;_<arguments.length;_++){var T=arguments[_]!=null?arguments[_]:{};_%2?r(Object(T),!0).forEach(function(L){o(g,L,T[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(T)):r(Object(T)).forEach(function(L){Object.defineProperty(g,L,Object.getOwnPropertyDescriptor(T,L))})}return g}({},y,{depth:0,customInspect:!1}))}}])&&l(m.prototype,R),u}()},function(e,t){},function(e,t,n){(function(r){var o;function l(M,A,f){return A in M?Object.defineProperty(M,A,{value:f,enumerable:!0,configurable:!0,writable:!0}):M[A]=f,M}var s=n(49),i=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),m=Symbol("ended"),R=Symbol("lastPromise"),E=Symbol("handlePromise"),y=Symbol("stream");function g(M,A){return{value:M,done:A}}function _(M){var A=M[i];if(A!==null){var f=M[y].read();f!==null&&(M[R]=null,M[i]=null,M[c]=null,A(g(f,!1)))}}function T(M){r.nextTick(_,M)}var L=Object.getPrototypeOf(function(){}),V=Object.setPrototypeOf((l(o={get stream(){return this[y]},next:function(){var M=this,A=this[u];if(A!==null)return Promise.reject(A);if(this[m])return Promise.resolve(g(void 0,!0));if(this[y].destroyed)return new Promise(function(Z,d){r.nextTick(function(){M[u]?d(M[u]):Z(g(void 0,!0))})});var f,O=this[R];if(O)f=new Promise(function(Z,d){return function(p,C){Z.then(function(){d[m]?p(g(void 0,!0)):d[E](p,C)},C)}}(O,this));else{var Y=this[y].read();if(Y!==null)return Promise.resolve(g(Y,!1));f=new Promise(this[E])}return this[R]=f,f}},Symbol.asyncIterator,function(){return this}),l(o,"return",function(){var M=this;return new Promise(function(A,f){M[y].destroy(null,function(O){O?f(O):A(g(void 0,!0))})})}),o),L);e.exports=function(M){var A,f=Object.create(V,(l(A={},y,{value:M,writable:!0}),l(A,i,{value:null,writable:!0}),l(A,c,{value:null,writable:!0}),l(A,u,{value:null,writable:!0}),l(A,m,{value:M._readableState.endEmitted,writable:!0}),l(A,E,{value:function(O,Y){var Z=f[y].read();Z?(f[R]=null,f[i]=null,f[c]=null,O(g(Z,!1))):(f[i]=O,f[c]=Y)},writable:!0}),A));return f[R]=null,s(M,function(O){if(O&&O.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Y=f[c];return Y!==null&&(f[R]=null,f[i]=null,f[c]=null,Y(O)),void(f[u]=O)}var Z=f[i];Z!==null&&(f[R]=null,f[i]=null,f[c]=null,Z(g(void 0,!0))),f[m]=!0}),M.on("readable",T.bind(null,f)),f}}).call(this,n(2))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){e.exports=o;var r=n(82);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l)}n(7)(o,r),o.prototype._transform=function(l,s,i){i(null,l)}},function(e,t,n){var r,o=n(26).codes,l=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function i(E){if(E)throw E}function c(E,y,g,_){_=function(V){var M=!1;return function(){M||(M=!0,V.apply(void 0,arguments))}}(_);var T=!1;E.on("close",function(){T=!0}),r===void 0&&(r=n(49)),r(E,{readable:y,writable:g},function(V){if(V)return _(V);T=!0,_()});var L=!1;return function(V){if(!T&&!L)return L=!0,function(M){return M.setHeader&&typeof M.abort=="function"}(E)?E.abort():typeof E.destroy=="function"?E.destroy():void _(V||new s("pipe"))}}function u(E){E()}function m(E,y){return E.pipe(y)}function R(E){return E.length?typeof E[E.length-1]!="function"?i:E.pop():i}e.exports=function(){for(var E=arguments.length,y=new Array(E),g=0;g<E;g++)y[g]=arguments[g];var _,T=R(y);if(Array.isArray(y[0])&&(y=y[0]),y.length<2)throw new l("streams");var L=y.map(function(V,M){var A=M<y.length-1;return c(V,A,M>0,function(f){_||(_=f),f&&L.forEach(u),A||(L.forEach(u),T(_))})});return y.reduce(m)}},function(e,t,n){var r=n(187)(function o(l,s){return(s=s||{}).namespace=l,s.prod=!0,s.dev=!1,s.force||o.force?o.yep(s):o.nope(s)});e.exports=r},function(e,t){var n=[],r=[],o=function(){};function l(g){return!~n.indexOf(g)&&(n.push(g),!0)}function s(g){o=g}function i(g){for(var _=[],T=0;T<n.length;T++)if(n[T].async)_.push(n[T]);else if(n[T](g))return!0;return!!_.length&&new Promise(function(L){Promise.all(_.map(function(V){return V(g)})).then(function(V){L(V.some(Boolean))})})}function c(g){return!~r.indexOf(g)&&(r.push(g),!0)}function u(){o.apply(o,arguments)}function m(g){for(var _=0;_<r.length;_++)g=r[_].apply(r[_],arguments);return g}function R(g,_){var T=Object.prototype.hasOwnProperty;for(var L in _)T.call(_,L)&&(g[L]=_[L]);return g}function E(g){return g.enabled=!1,g.modify=c,g.set=s,g.use=l,R(function(){return!1},g)}function y(g){return g.enabled=!0,g.modify=c,g.set=s,g.use=l,R(function(){var _=Array.prototype.slice.call(arguments,0);return u.call(u,g,m(_,g)),!0},g)}e.exports=function(g){return g.introduce=R,g.enabled=i,g.process=m,g.modify=c,g.write=u,g.nope=E,g.yep=y,g.set=s,g.use=l,g}},function(e,t,n){(function(r){var o=n(65),l=n(22).StringDecoder,s=n(32).Stream;function i(){}e.exports=function(c,u){var m=r.alloc(65536),R=new l("utf8"),E=new s,y="",g=0,_=0;return c.start===-1&&delete c.start,E.readable=!0,E.destroy=function(){E.destroyed=!0,E.emit("end"),E.emit("close")},o.open(c.file,"a+","0644",function(T,L){if(T)return u?u(T):E.emit("error",T),void E.destroy();(function V(){if(!E.destroyed)return o.read(L,m,0,m.length,g,function(M,A){if(M)return u?u(M):E.emit("error",M),void E.destroy();if(!A)return y&&((c.start==null||_>c.start)&&(u?u(null,y):E.emit("line",y)),_++,y=""),setTimeout(V,1e3);var f=R.write(m.slice(0,A));u||E.emit("data",f);for(var O=(f=(y+f).split(/\n+/)).length-1,Y=0;Y<O;Y++)(c.start==null||_>c.start)&&(u?u(null,f[Y]):E.emit("line",f[Y])),_++;return y=f[O],g+=A,V()});o.close(L,i)})()}),u?E.destroy:E}}).call(this,n(5).Buffer)},function(e,t,n){(function(r,o){function l(M){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(M)}function s(M,A){var f=Object.keys(M);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(M);A&&(O=O.filter(function(Y){return Object.getOwnPropertyDescriptor(M,Y).enumerable})),f.push.apply(f,O)}return f}function i(M){for(var A=1;A<arguments.length;A++){var f=arguments[A]!=null?arguments[A]:{};A%2?s(Object(f),!0).forEach(function(O){c(M,O,f[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(f)):s(Object(f)).forEach(function(O){Object.defineProperty(M,O,Object.getOwnPropertyDescriptor(f,O))})}return M}function c(M,A,f){return A in M?Object.defineProperty(M,A,{value:f,enumerable:!0,configurable:!0,writable:!0}):M[A]=f,M}function u(M,A){if(!(M instanceof A))throw new TypeError("Cannot call a class as a function")}function m(M,A){for(var f=0;f<A.length;f++){var O=A[f];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(M,O.key,O)}}function R(M,A){return(R=Object.setPrototypeOf||function(f,O){return f.__proto__=O,f})(M,A)}function E(M){var A=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var f,O=g(M);if(A){var Y=g(this).constructor;f=Reflect.construct(O,arguments,Y)}else f=O.apply(this,arguments);return y(this,f)}}function y(M,A){return!A||l(A)!=="object"&&typeof A!="function"?function(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}(M):A}function g(M){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(M)}var _=n(83),T=n(200),L=n(32).Stream,V=n(20);e.exports=function(M){(function(Z,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(d&&d.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),d&&R(Z,d)})(Y,M);var A,f,O=E(Y);function Y(){var Z,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u(this,Y),(Z=O.call(this,d)).options=d,Z.name=d.name||"http",Z.ssl=!!d.ssl,Z.host=d.host||"localhost",Z.port=d.port,Z.auth=d.auth,Z.path=d.path||"",Z.agent=d.agent,Z.headers=d.headers||{},Z.headers["content-type"]="application/json",Z.port||(Z.port=Z.ssl?443:80),Z}return A=Y,(f=[{key:"log",value:function(Z,d){var p=this;this._request(Z,function(C,b){b&&b.statusCode!==200&&(C=new Error("Invalid HTTP Status Code: ".concat(b.statusCode))),C?p.emit("warn",C):p.emit("logged",Z)}),d&&r(d)}},{key:"query",value:function(Z,d){typeof Z=="function"&&(d=Z,Z={}),(Z={method:"query",params:this.normalizeQuery(Z)}).params.path&&(Z.path=Z.params.path,delete Z.params.path),Z.params.auth&&(Z.auth=Z.params.auth,delete Z.params.auth),this._request(Z,function(p,C,b){if(C&&C.statusCode!==200&&(p=new Error("Invalid HTTP Status Code: ".concat(C.statusCode))),p)return d(p);if(typeof b=="string")try{b=JSON.parse(b)}catch(P){return d(P)}d(null,b)})}},{key:"stream",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=new L;(Z={method:"stream",params:Z}).params.path&&(Z.path=Z.params.path,delete Z.params.path),Z.params.auth&&(Z.auth=Z.params.auth,delete Z.params.auth);var p="",C=this._request(Z);return d.destroy=function(){return C.destroy()},C.on("data",function(b){for(var P=(b=(p+b).split(/\n+/)).length-1,F=0;F<P;F++)try{d.emit("log",JSON.parse(b[F]))}catch(D){d.emit("error",D)}p=b[P]}),C.on("error",function(b){return d.emit("error",b)}),d}},{key:"_request",value:function(Z,d){var p=(Z=Z||{}).auth||this.auth,C=Z.path||this.path||"";delete Z.auth,delete Z.path;var b=Object.assign({},this.headers);p&&p.bearer&&(b.Authorization="Bearer ".concat(p.bearer));var P=(this.ssl?T:_).request(i(i({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(C.replace(/^\//,"")),headers:b,auth:p&&p.username&&p.password?"".concat(p.username,":").concat(p.password):"",agent:this.agent}));P.on("error",d),P.on("response",function(F){return F.on("end",function(){return d(null,F)}).resume()}),P.end(o.from(JSON.stringify(Z),"utf8"))}}])&&m(A.prototype,f),Y}(V)}).call(this,n(15).setImmediate,n(5).Buffer)},function(e,t,n){(function(r,o,l){var s=n(84),i=n(7),c=n(85),u=n(31),m=n(191),R=c.IncomingMessage,E=c.readyStates,y=e.exports=function(_){var T,L=this;u.Writable.call(L),L._opts=_,L._body=[],L._headers={},_.auth&&L.setHeader("Authorization","Basic "+new r(_.auth).toString("base64")),Object.keys(_.headers).forEach(function(M){L.setHeader(M,_.headers[M])});var V=!0;if(_.mode==="disable-fetch"||"requestTimeout"in _&&!s.abortController)V=!1,T=!0;else if(_.mode==="prefer-streaming")T=!1;else if(_.mode==="allow-wrong-content-type")T=!s.overrideMimeType;else{if(_.mode&&_.mode!=="default"&&_.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");T=!0}L._mode=function(M,A){return s.fetch&&A?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&M?"arraybuffer":s.vbArray&&M?"text:vbarray":"text"}(T,V),L._fetchTimer=null,L.on("finish",function(){L._onFinish()})};i(y,u.Writable),y.prototype.setHeader=function(_,T){var L=_.toLowerCase();g.indexOf(L)===-1&&(this._headers[L]={name:_,value:T})},y.prototype.getHeader=function(_){var T=this._headers[_.toLowerCase()];return T?T.value:null},y.prototype.removeHeader=function(_){delete this._headers[_.toLowerCase()]},y.prototype._onFinish=function(){var _=this;if(!_._destroyed){var T=_._opts,L=_._headers,V=null;T.method!=="GET"&&T.method!=="HEAD"&&(V=s.arraybuffer?m(r.concat(_._body)):s.blobConstructor?new o.Blob(_._body.map(function(Y){return m(Y)}),{type:(L["content-type"]||{}).value||""}):r.concat(_._body).toString());var M=[];if(Object.keys(L).forEach(function(Y){var Z=L[Y].name,d=L[Y].value;Array.isArray(d)?d.forEach(function(p){M.push([Z,p])}):M.push([Z,d])}),_._mode==="fetch"){var A=null;if(s.abortController){var f=new AbortController;A=f.signal,_._fetchAbortController=f,"requestTimeout"in T&&T.requestTimeout!==0&&(_._fetchTimer=o.setTimeout(function(){_.emit("requestTimeout"),_._fetchAbortController&&_._fetchAbortController.abort()},T.requestTimeout))}o.fetch(_._opts.url,{method:_._opts.method,headers:M,body:V||void 0,mode:"cors",credentials:T.withCredentials?"include":"same-origin",signal:A}).then(function(Y){_._fetchResponse=Y,_._connect()},function(Y){o.clearTimeout(_._fetchTimer),_._destroyed||_.emit("error",Y)})}else{var O=_._xhr=new o.XMLHttpRequest;try{O.open(_._opts.method,_._opts.url,!0)}catch(Y){return void l.nextTick(function(){_.emit("error",Y)})}"responseType"in O&&(O.responseType=_._mode.split(":")[0]),"withCredentials"in O&&(O.withCredentials=!!T.withCredentials),_._mode==="text"&&"overrideMimeType"in O&&O.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in T&&(O.timeout=T.requestTimeout,O.ontimeout=function(){_.emit("requestTimeout")}),M.forEach(function(Y){O.setRequestHeader(Y[0],Y[1])}),_._response=null,O.onreadystatechange=function(){switch(O.readyState){case E.LOADING:case E.DONE:_._onXHRProgress()}},_._mode==="moz-chunked-arraybuffer"&&(O.onprogress=function(){_._onXHRProgress()}),O.onerror=function(){_._destroyed||_.emit("error",new Error("XHR error"))};try{O.send(V)}catch(Y){return void l.nextTick(function(){_.emit("error",Y)})}}}},y.prototype._onXHRProgress=function(){(function(_){try{var T=_.status;return T!==null&&T!==0}catch{return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},y.prototype._connect=function(){var _=this;_._destroyed||(_._response=new R(_._xhr,_._fetchResponse,_._mode,_._fetchTimer),_._response.on("error",function(T){_.emit("error",T)}),_.emit("response",_._response))},y.prototype._write=function(_,T,L){this._body.push(_),L()},y.prototype.abort=y.prototype.destroy=function(){this._destroyed=!0,o.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},y.prototype.end=function(_,T,L){typeof _=="function"&&(L=_,_=void 0),u.Writable.prototype.end.call(this,_,T,L)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n(5).Buffer,n(6),n(2))},function(e,t,n){var r=n(5).Buffer;e.exports=function(o){if(o instanceof Uint8Array){if(o.byteOffset===0&&o.byteLength===o.buffer.byteLength)return o.buffer;if(typeof o.buffer.slice=="function")return o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength)}if(r.isBuffer(o)){for(var l=new Uint8Array(o.length),s=o.length,i=0;i<s;i++)l[i]=o[i];return l.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var r={},o=0;o<arguments.length;o++){var l=arguments[o];for(var s in l)n.call(l,s)&&(r[s]=l[s])}return r};var n=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,n){(function(r,o){var l;(function(s){t&&t.nodeType,r&&r.nodeType;var i=typeof o=="object"&&o;i.global!==i&&i.window!==i&&i.self;var c,u=2147483647,m=/^xn--/,R=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,_=String.fromCharCode;function T(d){throw new RangeError(y[d])}function L(d,p){for(var C=d.length,b=[];C--;)b[C]=p(d[C]);return b}function V(d,p){var C=d.split("@"),b="";return C.length>1&&(b=C[0]+"@",d=C[1]),b+L((d=d.replace(E,".")).split("."),p).join(".")}function M(d){for(var p,C,b=[],P=0,F=d.length;P<F;)(p=d.charCodeAt(P++))>=55296&&p<=56319&&P<F?(64512&(C=d.charCodeAt(P++)))==56320?b.push(((1023&p)<<10)+(1023&C)+65536):(b.push(p),P--):b.push(p);return b}function A(d){return L(d,function(p){var C="";return p>65535&&(C+=_((p-=65536)>>>10&1023|55296),p=56320|1023&p),C+=_(p)}).join("")}function f(d,p){return d+22+75*(d<26)-((p!=0)<<5)}function O(d,p,C){var b=0;for(d=C?g(d/700):d>>1,d+=g(d/p);d>455;b+=36)d=g(d/35);return g(b+36*d/(d+38))}function Y(d){var p,C,b,P,F,D,I,N,k,w,h,B=[],z=d.length,X=0,Q=128,te=72;for((C=d.lastIndexOf("-"))<0&&(C=0),b=0;b<C;++b)d.charCodeAt(b)>=128&&T("not-basic"),B.push(d.charCodeAt(b));for(P=C>0?C+1:0;P<z;){for(F=X,D=1,I=36;P>=z&&T("invalid-input"),((N=(h=d.charCodeAt(P++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||N>g((u-X)/D))&&T("overflow"),X+=N*D,!(N<(k=I<=te?1:I>=te+26?26:I-te));I+=36)D>g(u/(w=36-k))&&T("overflow"),D*=w;te=O(X-F,p=B.length+1,F==0),g(X/p)>u-Q&&T("overflow"),Q+=g(X/p),X%=p,B.splice(X++,0,Q)}return A(B)}function Z(d){var p,C,b,P,F,D,I,N,k,w,h,B,z,X,Q,te=[];for(B=(d=M(d)).length,p=128,C=0,F=72,D=0;D<B;++D)(h=d[D])<128&&te.push(_(h));for(b=P=te.length,P&&te.push("-");b<B;){for(I=u,D=0;D<B;++D)(h=d[D])>=p&&h<I&&(I=h);for(I-p>g((u-C)/(z=b+1))&&T("overflow"),C+=(I-p)*z,p=I,D=0;D<B;++D)if((h=d[D])<p&&++C>u&&T("overflow"),h==p){for(N=C,k=36;!(N<(w=k<=F?1:k>=F+26?26:k-F));k+=36)Q=N-w,X=36-w,te.push(_(f(w+Q%X,0))),N=g(Q/X);te.push(_(f(N,0))),F=O(C,z,b==P),C=0,++b}++C,++p}return te.join("")}c={version:"1.4.1",ucs2:{decode:M,encode:A},decode:Y,encode:Z,toASCII:function(d){return V(d,function(p){return R.test(p)?"xn--"+Z(p):p})},toUnicode:function(d){return V(d,function(p){return m.test(p)?Y(p.slice(4).toLowerCase()):p})}},(l=function(){return c}.call(t,n,t,r))===void 0||(r.exports=l)})()}).call(this,n(195)(e),n(6))},function(e,t){e.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(e,t,n){e.exports={isString:function(r){return typeof r=="string"},isObject:function(r){return typeof r=="object"&&r!==null},isNull:function(r){return r===null},isNullOrUndefined:function(r){return r==null}}},function(e,t,n){t.decode=t.parse=n(198),t.encode=t.stringify=n(199)},function(e,t,n){function r(l,s){return Object.prototype.hasOwnProperty.call(l,s)}e.exports=function(l,s,i,c){s=s||"&",i=i||"=";var u={};if(typeof l!="string"||l.length===0)return u;var m=/\+/g;l=l.split(s);var R=1e3;c&&typeof c.maxKeys=="number"&&(R=c.maxKeys);var E=l.length;R>0&&E>R&&(E=R);for(var y=0;y<E;++y){var g,_,T,L,V=l[y].replace(m,"%20"),M=V.indexOf(i);M>=0?(g=V.substr(0,M),_=V.substr(M+1)):(g=V,_=""),T=decodeURIComponent(g),L=decodeURIComponent(_),r(u,T)?o(u[T])?u[T].push(L):u[T]=[u[T],L]:u[T]=L}return u};var o=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},function(e,t,n){var r=function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}};e.exports=function(i,c,u,m){return c=c||"&",u=u||"=",i===null&&(i=void 0),typeof i=="object"?l(s(i),function(R){var E=encodeURIComponent(r(R))+u;return o(i[R])?l(i[R],function(y){return E+encodeURIComponent(r(y))}).join(c):E+encodeURIComponent(r(i[R]))}).join(c):m?encodeURIComponent(r(m))+u+encodeURIComponent(r(i)):""};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"};function l(i,c){if(i.map)return i.map(c);for(var u=[],m=0;m<i.length;m++)u.push(c(i[m],m));return u}var s=Object.keys||function(i){var c=[];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&c.push(u);return c}},function(e,t,n){var r=n(83),o=n(86),l=e.exports;for(var s in r)r.hasOwnProperty(s)&&(l[s]=r[s]);function i(c){if(typeof c=="string"&&(c=o.parse(c)),c.protocol||(c.protocol="https:"),c.protocol!=="https:")throw new Error('Protocol "'+c.protocol+'" not supported. Expected "https:"');return c}l.request=function(c,u){return c=i(c),r.request.call(this,c,u)},l.get=function(c,u){return c=i(c),r.get.call(this,c,u)}},function(e,t,n){(function(r){function o(_){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(_)}function l(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}function s(_,T){for(var L=0;L<T.length;L++){var V=T[L];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(_,V.key,V)}}function i(_,T){return(i=Object.setPrototypeOf||function(L,V){return L.__proto__=V,L})(_,T)}function c(_){var T=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var L,V=m(_);if(T){var M=m(this).constructor;L=Reflect.construct(V,arguments,M)}else L=V.apply(this,arguments);return u(this,L)}}function u(_,T){return!T||o(T)!=="object"&&typeof T!="function"?function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(_):T}function m(_){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)})(_)}var R=n(87),E=n(3).MESSAGE,y=n(18),g=n(20);e.exports=function(_){(function(A,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(f&&f.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),f&&i(A,f)})(M,_);var T,L,V=c(M);function M(){var A,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(l(this,M),A=V.call(this,f),!f.stream||!R(f.stream))throw new Error("options.stream is required.");return A._stream=f.stream,A._stream.setMaxListeners(1/0),A.isObjectMode=f.stream._writableState.objectMode,A.eol=f.eol||y.EOL,A}return T=M,(L=[{key:"log",value:function(A,f){var O=this;if(r(function(){return O.emit("logged",A)}),this.isObjectMode)return this._stream.write(A),void(f&&f());this._stream.write("".concat(A[E]).concat(this.eol)),f&&f()}}])&&s(T.prototype,L),M}(g)}).call(this,n(15).setImmediate)},function(e,t,n){(function(r){function o(b,P,F){return P in b?Object.defineProperty(b,P,{value:F,enumerable:!0,configurable:!0,writable:!0}):b[P]=F,b}function l(b){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P})(b)}function s(b,P){for(var F=0;F<P.length;F++){var D=P[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(b,D.key,D)}}function i(b,P){return(i=Object.setPrototypeOf||function(F,D){return F.__proto__=D,F})(b,P)}function c(b){var P=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var F,D=m(b);if(P){var I=m(this).constructor;F=Reflect.construct(D,arguments,I)}else F=D.apply(this,arguments);return u(this,F)}}function u(b,P){return!P||l(P)!=="object"&&typeof P!="function"?function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}(b):P}function m(b){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)})(b)}var R=n(32),E=R.Stream,y=R.Transform,g=n(51),_=n(3),T=_.LEVEL,L=_.SPLAT,V=n(87),M=n(89),A=n(93),f=n(206),O=n(207),Y=n(61).warn,Z=n(50),d=/%[scdjifoO%]/g,p=function(b){(function(N,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(k&&k.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),k&&i(N,k)})(I,b);var P,F,D=c(I);function I(N){var k;return function(w,h){if(!(w instanceof h))throw new TypeError("Cannot call a class as a function")}(this,I),(k=D.call(this,{objectMode:!0})).configure(N),k}return P=I,(F=[{key:"child",value:function(N){var k=this;return Object.create(k,{write:{value:function(w){var h=Object.assign({},N,w);w instanceof Error&&(h.stack=w.stack,h.message=w.message),k.write(h)}}})}},{key:"configure",value:function(){var N=this,k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=k.silent,h=k.format,B=k.defaultMeta,z=k.levels,X=k.level,Q=X===void 0?"info":X,te=k.exitOnError,q=te===void 0||te,H=k.transports,v=k.colors,S=k.emitErrs,U=k.formatters,J=k.padLevels,$=k.rewriters,ne=k.stripColors,se=k.exceptionHandlers,ge=k.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=w,this.format=h||this.format||n(208)(),this.defaultMeta=B||null,this.levels=z||this.levels||Z.npm.levels,this.level=Q,this.exceptions=new M(this),this.rejections=new A(this),this.profilers={},this.exitOnError=q,H&&(H=Array.isArray(H)?H:[H]).forEach(function(ve){return N.add(ve)}),v||S||U||J||$||ne)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
39
- `));se&&this.exceptions.handle(se),ge&&this.rejections.handle(ge)}},{key:"isLevelEnabled",value:function(N){var k=this,w=C(this.levels,N);if(w===null)return!1;var h=C(this.levels,this.level);return h!==null&&(this.transports&&this.transports.length!==0?this.transports.findIndex(function(B){var z=C(k.levels,B.level);return z===null&&(z=h),z>=w})!==-1:h>=w)}},{key:"log",value:function(N,k){for(var w,h,B=arguments.length,z=new Array(B>2?B-2:0),X=2;X<B;X++)z[X-2]=arguments[X];if(arguments.length===1)return N[T]=N.level,this._addDefaultMeta(N),this.write(N),this;if(arguments.length===2)return k&&l(k)==="object"?(k[T]=k.level=N,this._addDefaultMeta(k),this.write(k),this):(this.write((o(h={},T,N),o(h,"level",N),o(h,"message",k),h)),this);var Q=z[0];if(l(Q)==="object"&&Q!==null){var te=k&&k.match&&k.match(d);if(!te){var q,H=Object.assign({},this.defaultMeta,Q,(o(q={},T,N),o(q,L,z),o(q,"level",N),o(q,"message",k),q));return Q.message&&(H.message="".concat(H.message," ").concat(Q.message)),Q.stack&&(H.stack=Q.stack),this.write(H),this}}return this.write(Object.assign({},this.defaultMeta,(o(w={},T,N),o(w,L,z),o(w,"level",N),o(w,"message",k),w))),this}},{key:"_transform",value:function(N,k,w){if(this.silent)return w();N[T]||(N[T]=N.level),this.levels[N[T]]||this.levels[N[T]]===0||console.error("[winston] Unknown logger level: %s",N[T]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports %j",N);try{this.push(this.format.transform(N,this.format.options))}catch(h){throw h}finally{w()}}},{key:"_final",value:function(N){var k=this.transports.slice();g(k,function(w,h){if(!w||w.finished)return r(h);w.once("finish",h),w.end()},N)}},{key:"add",value:function(N){var k=!V(N)||N.log.length>2?new f({transport:N}):N;if(!k._writableState||!k._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",k),this._onEvent("warn",k),this.pipe(k),N.handleExceptions&&this.exceptions.handle(),N.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(N){if(!N)return this;var k=N;return(!V(N)||N.log.length>2)&&(k=this.transports.filter(function(w){return w.transport===N})[0]),k&&this.unpipe(k),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){Y.deprecated("setLevels")}},{key:"query",value:function(N,k){typeof N=="function"&&(k=N,N={}),N=N||{};var w={},h=Object.assign({},N.query||{});g(this.transports.filter(function(B){return!!B.query}),function(B,z){(function(X,Q){N.query&&typeof X.formatQuery=="function"&&(N.query=X.formatQuery(h)),X.query(N,function(te,q){if(te)return Q(te);typeof X.formatResults=="function"&&(q=X.formatResults(q,N.format)),Q(null,q)})})(B,function(X,Q){z&&((Q=X||Q)&&(w[B.name]=Q),z()),z=null})},function(){return k(null,w)})}},{key:"stream",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=new E,w=[];return k._streams=w,k.destroy=function(){for(var h=w.length;h--;)w[h].destroy()},this.transports.filter(function(h){return!!h.stream}).forEach(function(h){var B=h.stream(N);B&&(w.push(B),B.on("log",function(z){z.transport=z.transport||[],z.transport.push(h.name),k.emit("log",z)}),B.on("error",function(z){z.transport=z.transport||[],z.transport.push(h.name),k.emit("error",z)}))}),k}},{key:"startTimer",value:function(){return new O(this)}},{key:"profile",value:function(N){var k=Date.now();if(this.profilers[N]){var w=this.profilers[N];delete this.profilers[N];for(var h=arguments.length,B=new Array(h>1?h-1:0),z=1;z<h;z++)B[z-1]=arguments[z];typeof B[B.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),B.pop());var X=l(B[B.length-1])==="object"?B.pop():{};return X.level=X.level||"info",X.durationMs=k-w,X.message=X.message||N,this.write(X)}return this.profilers[N]=k,this}},{key:"handleExceptions",value:function(){var N;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(N=this.exceptions).handle.apply(N,arguments)}},{key:"unhandleExceptions",value:function(){var N;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(N=this.exceptions).unhandle.apply(N,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
40
- `))}},{key:"_onEvent",value:function(N,k){k["__winston"+N]||(k["__winston"+N]=function(w){N!=="error"||this.transports.includes(k)||this.add(k),this.emit(N,w,k)}.bind(this),k.on(N,k["__winston"+N]))}},{key:"_addDefaultMeta",value:function(N){this.defaultMeta&&Object.assign(N,this.defaultMeta)}}])&&s(P.prototype,F),I}(y);function C(b,P){var F=b[P];return F||F===0?F:null}Object.defineProperty(p.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var b=this._readableState.pipes;return Array.isArray(b)?b:[b].filter(Boolean)}}),e.exports=p}).call(this,n(15).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=m(n(45)),o=m(n(46)),l=m(n(66)),s=m(n(67)),i=m(n(68)),c=m(n(25)),u=m(n(30));function m(y){return y&&y.__esModule?y:{default:y}}function R(y,g,_){_=(0,s.default)(_);var T=0,L=0,{length:V}=y,M=!1;function A(f,O){f===!1&&(M=!0),M!==!0&&(f?_(f):++L!==V&&O!==o.default||_(null))}for(V===0&&_(null);T<V;T++)g(y[T],T,(0,i.default)(A))}function E(y,g,_){return(0,l.default)(y,1/0,g,_)}t.default=(0,u.default)(function(y,g,_){return((0,r.default)(y)?R:E)(y,(0,c.default)(g),_)},3),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return(o,l,s)=>r(o,s)},e.exports=t.default},function(e,t,n){var r=Object.prototype.toString;e.exports=function(o){if(typeof o.displayName=="string"&&o.constructor.name)return o.displayName;if(typeof o.name=="string"&&o.name)return o.name;if(typeof o=="object"&&o.constructor&&typeof o.constructor.name=="string")return o.constructor.name;var l=o.toString(),s=r.call(o).slice(8,-1);return(l=s==="Function"?l.substring(l.indexOf("(")+1,l.indexOf(")")):s)||"anonymous"}},function(e,t,n){const r=n(13),{LEVEL:o}=n(3),l=n(20),s=e.exports=function(i={}){if(l.call(this,i),!i.transport||typeof i.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=i.transport,this.level=this.level||i.transport.level,this.handleExceptions=this.handleExceptions||i.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(c){this.emit("error",c,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};r.inherits(s,l),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[i[o]])&&this.transport.log(i[o],i.message,i,this._nop),u(null)},s.prototype._writev=function(i,c){for(let u=0;u<i.length;u++)this._accept(i[u])&&(this.transport.log(i[u].chunk[o],i[u].chunk.message,i[u].chunk,this._nop),i[u].callback());return c(null)},s.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
41
- `))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}function o(l,s){for(var i=0;i<s.length;i++){var c=s[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,c.key,c)}}e.exports=function(){function l(c){if(function(u,m){if(!(u instanceof m))throw new TypeError("Cannot call a class as a function")}(this,l),!c)throw new Error("Logger is required for profiling.");this.logger=c,this.start=Date.now()}var s,i;return s=l,(i=[{key:"done",value:function(){for(var c=arguments.length,u=new Array(c),m=0;m<c;m++)u[m]=arguments[m];typeof u[u.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),u.pop());var R=r(u[u.length-1])==="object"?u.pop():{};return R.level=R.level||"info",R.durationMs=Date.now()-this.start,this.logger.write(R)}}])&&o(s.prototype,i),l}()},function(e,t,n){(function(r){const o=n(209),{MESSAGE:l}=n(3),s=n(35);function i(c,u){return u instanceof r?u.toString("base64"):typeof u=="bigint"?u.toString():u}e.exports=o((c,u={})=>(c[l]=(u.stable?s.stableStringify:s)(c,u.replacer||i,u.space),c))}).call(this,n(5).Buffer)},function(e,t,n){class r extends Error{constructor(l){super(`Format functions must be synchronous taking a two arguments: (info, opts)
42
- Found: ${l.toString().split(`
38
+ <span dir=ltr>`+e+"</span>"},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1״").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1׳")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,t){var n=0,r=0,i=!1;for(e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t).split(goog.i18n.bidi.wordSeparatorRe_),t=0;t<e.length;t++){var s=e[t];goog.i18n.bidi.startsWithRtl(s)?(n++,r++):goog.i18n.bidi.isRequiredLtrRe_.test(s)?i=!0:goog.i18n.bidi.hasAnyLtr(s)?r++:goog.i18n.bidi.hasNumeralsRe_.test(s)&&(i=!0)}return r==0?i?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:n/r>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,t){return goog.i18n.bidi.estimateDirection(e,t)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,t){e&&(t=goog.i18n.bidi.toDir(t))&&(e.style.textAlign=t==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=t==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.setElementDirByTextDirectionality=function(e,t){switch(goog.i18n.bidi.estimateDirection(t)){case goog.i18n.bidi.Dir.LTR:e.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:e.dir="rtl";break;default:e.removeAttribute("dir")}},goog.i18n.bidi.DirectionalString=function(){},goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.trustedURL_=null,this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.html.TrustedResourceUrl.prototype.cloneWithParams=function(e,t){var n=goog.html.TrustedResourceUrl.unwrap(this),r=(n=goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(n))[3]||"";return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(n[1]+goog.html.TrustedResourceUrl.stringifyParams_("?",n[2]||"",e)+goog.html.TrustedResourceUrl.stringifyParams_("#",r,t))},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(e).toString()},goog.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.unwrapTrustedURL=function(e){return e.trustedURL_?e.trustedURL_:goog.html.TrustedResourceUrl.unwrap(e)},goog.html.TrustedResourceUrl.format=function(e,t){var n=goog.string.Const.unwrap(e);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return e=n.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,function(r,i){if(!Object.prototype.hasOwnProperty.call(t,i))throw Error('Found marker, "'+i+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return(r=t[i])instanceof goog.string.Const?goog.string.Const.unwrap(r):encodeURIComponent(String(r))}),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g,goog.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,goog.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,goog.html.TrustedResourceUrl.formatWithParams=function(e,t,n,r){return goog.html.TrustedResourceUrl.format(e,t).cloneWithParams(n,r)},goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.fromConstants=function(e){for(var t="",n=0;n<e.length;n++)t+=goog.string.Const.unwrap(e[n]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.TrustedResourceUrl;return t.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(e):e,goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY&&(t.trustedURL_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e)),t},goog.html.TrustedResourceUrl.stringifyParams_=function(e,t,n){if(n==null)return t;if(goog.isString(n))return n?e+encodeURIComponent(n):"";for(var r in n){var i=n[r];i=goog.isArray(i)?i:[i];for(var s=0;s<i.length;s++){var l=i[s];l!=null&&(t||(t=e),t+=(t.length>e.length?"&":"")+encodeURIComponent(r)+"="+encodeURIComponent(String(l)))}}return t},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return goog.html.SafeUrl.unwrapTrustedURL(e).toString()},goog.html.SafeUrl.unwrapTrustedURL=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeUrlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,goog.html.SafeUrl.isSafeMimeType=function(e){return goog.html.SAFE_MIME_TYPE_PATTERN_.test(e)},goog.html.SafeUrl.fromBlob=function(e){return e=goog.html.SAFE_MIME_TYPE_PATTERN_.test(e.type)?goog.fs.url.createObjectUrl(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.DATA_URL_PATTERN_=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i,goog.html.SafeUrl.fromDataUrl=function(e){var t=(e=e.replace(/(%0A|%0D)/g,"")).match(goog.html.DATA_URL_PATTERN_);return t=t&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(t[1]),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t?e:goog.html.SafeUrl.INNOCUOUS_STRING)},goog.html.SafeUrl.fromTelUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"tel:")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i,goog.html.SafeUrl.fromSipUrl=function(e){return goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(e))||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromFacebookMessengerUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"fb-messenger://share")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromWhatsAppUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"whatsapp://send")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromSmsUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"sms:")&&goog.html.SafeUrl.isSmsUrlBodyValid_(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.isSmsUrlBodyValid_=function(e){var t=e.indexOf("#");if(0<t&&(e=e.substring(0,t)),!(t=e.match(/[?&]body=/gi)))return!0;if(1<t.length)return!1;if(!(e=e.match(/[?&]body=([^&]*)/)[1]))return!0;try{decodeURIComponent(e)}catch{return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(e)},goog.html.SafeUrl.fromSshUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"ssh://")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.sanitizeChromeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeEdgeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeExtensionUrl_=function(e,t,n){return(e=e.exec(t))?(e=e[1],(n instanceof goog.string.Const?[goog.string.Const.unwrap(n)]:n.map(function(r){return goog.string.Const.unwrap(r)})).indexOf(e)==-1&&(t=goog.html.SafeUrl.INNOCUOUS_STRING)):t=goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeUrl.fromTrustedResourceUrl=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(e))},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,goog.html.SafeUrl.SAFE_URL_PATTERN=goog.html.SAFE_URL_PATTERN_,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SAFE_URL_PATTERN_.test(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.sanitizeAssertUnchanged=function(e,t){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),t&&/^data:/i.test(e)&&(t=goog.html.SafeUrl.fromDataUrl(e)).getTypedStringValue()==e?t:(goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(e),"%s does not match the safe URL pattern",e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)))},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeUrl;return t.privateDoNotAccessOrElseSafeUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e):e,t},goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"),goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="",this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyle.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyle.EMPTY:(goog.asserts.assert(goog.string.internal.endsWith(e,";"),"Last character of style string is not ';': "+e),goog.asserts.assert(goog.string.internal.contains(e,":"),`Style string must contain at least one ':', to specify a "name: value" pair: `+e),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyle().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,this},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var t,n="";for(t in e){if(!/^[-_a-zA-Z0-9]+$/.test(t))throw Error("Name allows only [-_a-zA-Z0-9], got: "+t);var r=e[t];r!=null&&(n+=t+":"+(r=goog.isArray(r)?goog.array.map(r,goog.html.SafeStyle.sanitizePropertyValue_).join(" "):goog.html.SafeStyle.sanitizePropertyValue_(r))+";")}return n?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(n):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.sanitizePropertyValue_=function(e){if(e instanceof goog.html.SafeUrl)return'url("'+goog.html.SafeUrl.unwrap(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';if(e=e instanceof goog.string.Const?goog.string.Const.unwrap(e):goog.html.SafeStyle.sanitizePropertyValueString_(String(e)),/[{;}]/.test(e))throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.",[e]);return e},goog.html.SafeStyle.sanitizePropertyValueString_=function(e){var t=e.replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.URL_RE_,"url");return goog.html.SafeStyle.VALUE_RE_.test(t)?goog.html.SafeStyle.COMMENT_RE_.test(e)?(goog.asserts.fail("String value disallows comments, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):goog.html.SafeStyle.hasBalancedQuotes_(e)?goog.html.SafeStyle.hasBalancedSquareBrackets_(e)?goog.html.SafeStyle.sanitizeUrl_(e):(goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value requires balanced quotes, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value allows only "+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING)},goog.html.SafeStyle.hasBalancedQuotes_=function(e){for(var t=!0,n=!0,r=0;r<e.length;r++){var i=e.charAt(r);i=="'"&&n?t=!t:i=='"'&&t&&(n=!n)}return t&&n},goog.html.SafeStyle.hasBalancedSquareBrackets_=function(e){for(var t=!0,n=/^[-_a-zA-Z0-9]$/,r=0;r<e.length;r++){var i=e.charAt(r);if(i=="]"){if(t)return!1;t=!0}else if(i=="["){if(!t)return!1;t=!1}else if(!t&&!n.test(i))return!1}return t},goog.html.SafeStyle.VALUE_ALLOWED_CHARS_=`[-,."'%_!# a-zA-Z0-9\\[\\]]`,goog.html.SafeStyle.VALUE_RE_=new RegExp("^"+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$"),goog.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g,goog.html.SafeStyle.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g,goog.html.SafeStyle.COMMENT_RE_=/\/\*/,goog.html.SafeStyle.sanitizeUrl_=function(e){return e.replace(goog.html.SafeStyle.URL_RE_,function(t,n,r,i){var s="";return r=r.replace(/^(['"])(.*)\1$/,function(l,o,c){return s=o,c}),t=goog.html.SafeUrl.sanitize(r).getTypedStringValue(),n+s+t+s+i})},goog.html.SafeStyle.concat=function(e){var t="",n=function(r){goog.isArray(r)?goog.array.forEach(r,n):t+=goog.html.SafeStyle.unwrap(r)};return goog.array.forEach(arguments,n),t?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t):goog.html.SafeStyle.EMPTY},goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="",this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0,goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeScript.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeScript.fromConstantAndArgs=function(e,t){for(var n=[],r=1;r<arguments.length;r++)n.push(goog.html.SafeScript.stringify_(arguments[r]));return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+goog.string.Const.unwrap(e)+")("+n.join(", ")+");")},goog.html.SafeScript.fromJson=function(e){return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(e))},goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"}),goog.html.SafeScript.unwrap=function(e){return goog.html.SafeScript.unwrapTrustedScript(e).toString()},goog.html.SafeScript.unwrapTrustedScript=function(e){return e instanceof goog.html.SafeScript&&e.constructor===goog.html.SafeScript&&e.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeScriptWrappedValue_:(goog.asserts.fail("expected object of type SafeScript, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeScript")},goog.html.SafeScript.stringify_=function(e){return JSON.stringify(e).replace(/</g,"\\x3c")},goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeScript().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(e):e,this},goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(""),goog.object={},goog.object.is=function(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t},goog.object.forEach=function(e,t,n){for(var r in e)t.call(n,e[r],r,e)},goog.object.filter=function(e,t,n){var r,i={};for(r in e)t.call(n,e[r],r,e)&&(i[r]=e[r]);return i},goog.object.map=function(e,t,n){var r,i={};for(r in e)i[r]=t.call(n,e[r],r,e);return i},goog.object.some=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return!0;return!1},goog.object.every=function(e,t,n){for(var r in e)if(!t.call(n,e[r],r,e))return!1;return!0},goog.object.getCount=function(e){var t,n=0;for(t in e)n++;return n},goog.object.getAnyKey=function(e){for(var t in e)return t},goog.object.getAnyValue=function(e){for(var t in e)return e[t]},goog.object.contains=function(e,t){return goog.object.containsValue(e,t)},goog.object.getValues=function(e){var t,n=[],r=0;for(t in e)n[r++]=e[t];return n},goog.object.getKeys=function(e){var t,n=[],r=0;for(t in e)n[r++]=t;return n},goog.object.getValueByKeys=function(e,t){var n=goog.isArrayLike(t),r=n?t:arguments;for(n=n?0:1;n<r.length;n++){if(e==null)return;e=e[r[n]]}return e},goog.object.containsKey=function(e,t){return e!==null&&t in e},goog.object.containsValue=function(e,t){for(var n in e)if(e[n]==t)return!0;return!1},goog.object.findKey=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},goog.object.findValue=function(e,t,n){return(t=goog.object.findKey(e,t,n))&&e[t]},goog.object.isEmpty=function(e){for(var t in e)return!1;return!0},goog.object.clear=function(e){for(var t in e)delete e[t]},goog.object.remove=function(e,t){var n;return(n=t in e)&&delete e[t],n},goog.object.add=function(e,t,n){if(e!==null&&t in e)throw Error('The object already contains the key "'+t+'"');goog.object.set(e,t,n)},goog.object.get=function(e,t,n){return e!==null&&t in e?e[t]:n},goog.object.set=function(e,t,n){e[t]=n},goog.object.setIfUndefined=function(e,t,n){return t in e?e[t]:e[t]=n},goog.object.setWithReturnValueIfNotSet=function(e,t,n){return t in e?e[t]:(n=n(),e[t]=n)},goog.object.equals=function(e,t){for(var n in e)if(!(n in t)||e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0},goog.object.clone=function(e){var t,n={};for(t in e)n[t]=e[t];return n},goog.object.unsafeClone=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(goog.isFunction(e.clone))return e.clone();for(var n in t=t=="array"?[]:{},e)t[n]=goog.object.unsafeClone(e[n]);return t}return e},goog.object.transpose=function(e){var t,n={};for(t in e)n[e[t]]=t;return n},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var s=0;s<goog.object.PROTOTYPE_FIELDS_.length;s++)n=goog.object.PROTOTYPE_FIELDS_[s],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}},goog.object.create=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(t%2)throw Error("Uneven number of arguments");for(var n={},r=0;r<t;r+=2)n[arguments[r]]=arguments[r+1];return n},goog.object.createSet=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var n={},r=0;r<t;r++)n[arguments[r]]=!0;return n},goog.object.createImmutableView=function(e){var t=e;return Object.isFrozen&&!Object.isFrozen(e)&&(t=Object.create(e),Object.freeze(t)),t},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.object.getAllPropertyNames=function(e,t,n){if(!e)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return goog.object.getKeys(e);for(var r={};e&&(e!==Object.prototype||t)&&(e!==Function.prototype||n);){for(var i=Object.getOwnPropertyNames(e),s=0;s<i.length;s++)r[i[s]]=!0;e=Object.getPrototypeOf(e)}return goog.object.getKeys(r)},goog.object.getSuperClass=function(e){return(e=Object.getPrototypeOf(e.prototype))&&e.constructor},goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="",this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyleSheet.createRule=function(e,t){if(goog.string.internal.contains(e,"<"))throw Error("Selector does not allow '<', got: "+e);var n=e.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(n))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+e);if(!goog.html.SafeStyleSheet.hasBalancedBrackets_(n))throw Error("() and [] in selector must be balanced, got: "+e);return t instanceof goog.html.SafeStyle||(t=goog.html.SafeStyle.create(t)),e=e+"{"+goog.html.SafeStyle.unwrap(t).replace(/</g,"\\3C ")+"}",goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeStyleSheet.hasBalancedBrackets_=function(e){for(var t={"(":")","[":"]"},n=[],r=0;r<e.length;r++){var i=e[r];if(t[i])n.push(t[i]);else if(goog.object.contains(t,i)&&n.pop()!=i)return!1}return n.length==0},goog.html.SafeStyleSheet.concat=function(e){var t="",n=function(r){goog.isArray(r)?goog.array.forEach(r,n):t+=goog.html.SafeStyleSheet.unwrap(r)};return goog.array.forEach(arguments,n),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeStyleSheet.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyleSheet.EMPTY:(goog.asserts.assert(!goog.string.internal.contains(e,"<"),"Forbidden '<' character in style sheet string: "+e),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_},goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"}),goog.html.SafeStyleSheet.unwrap=function(e){return e instanceof goog.html.SafeStyleSheet&&e.constructor===goog.html.SafeStyleSheet&&e.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(goog.asserts.fail("expected object of type SafeStyleSheet, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyleSheet")},goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyleSheet().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=e,this},goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(""),goog.dom.tags={},goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},goog.dom.tags.isVoidTag=function(e){return goog.dom.tags.VOID_TAGS_[e]===!0},goog.dom.HtmlElement=function(){},goog.dom.TagName=function(e){this.tagName_=e},goog.dom.TagName.prototype.toString=function(){return this.tagName_},goog.dom.TagName.A=new goog.dom.TagName("A"),goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR"),goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM"),goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS"),goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET"),goog.dom.TagName.AREA=new goog.dom.TagName("AREA"),goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE"),goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE"),goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO"),goog.dom.TagName.B=new goog.dom.TagName("B"),goog.dom.TagName.BASE=new goog.dom.TagName("BASE"),goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT"),goog.dom.TagName.BDI=new goog.dom.TagName("BDI"),goog.dom.TagName.BDO=new goog.dom.TagName("BDO"),goog.dom.TagName.BIG=new goog.dom.TagName("BIG"),goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE"),goog.dom.TagName.BODY=new goog.dom.TagName("BODY"),goog.dom.TagName.BR=new goog.dom.TagName("BR"),goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON"),goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS"),goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION"),goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER"),goog.dom.TagName.CITE=new goog.dom.TagName("CITE"),goog.dom.TagName.CODE=new goog.dom.TagName("CODE"),goog.dom.TagName.COL=new goog.dom.TagName("COL"),goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP"),goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND"),goog.dom.TagName.DATA=new goog.dom.TagName("DATA"),goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST"),goog.dom.TagName.DD=new goog.dom.TagName("DD"),goog.dom.TagName.DEL=new goog.dom.TagName("DEL"),goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS"),goog.dom.TagName.DFN=new goog.dom.TagName("DFN"),goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG"),goog.dom.TagName.DIR=new goog.dom.TagName("DIR"),goog.dom.TagName.DIV=new goog.dom.TagName("DIV"),goog.dom.TagName.DL=new goog.dom.TagName("DL"),goog.dom.TagName.DT=new goog.dom.TagName("DT"),goog.dom.TagName.EM=new goog.dom.TagName("EM"),goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED"),goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET"),goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION"),goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE"),goog.dom.TagName.FONT=new goog.dom.TagName("FONT"),goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER"),goog.dom.TagName.FORM=new goog.dom.TagName("FORM"),goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME"),goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET"),goog.dom.TagName.H1=new goog.dom.TagName("H1"),goog.dom.TagName.H2=new goog.dom.TagName("H2"),goog.dom.TagName.H3=new goog.dom.TagName("H3"),goog.dom.TagName.H4=new goog.dom.TagName("H4"),goog.dom.TagName.H5=new goog.dom.TagName("H5"),goog.dom.TagName.H6=new goog.dom.TagName("H6"),goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD"),goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER"),goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP"),goog.dom.TagName.HR=new goog.dom.TagName("HR"),goog.dom.TagName.HTML=new goog.dom.TagName("HTML"),goog.dom.TagName.I=new goog.dom.TagName("I"),goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME"),goog.dom.TagName.IMG=new goog.dom.TagName("IMG"),goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT"),goog.dom.TagName.INS=new goog.dom.TagName("INS"),goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX"),goog.dom.TagName.KBD=new goog.dom.TagName("KBD"),goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN"),goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL"),goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND"),goog.dom.TagName.LI=new goog.dom.TagName("LI"),goog.dom.TagName.LINK=new goog.dom.TagName("LINK"),goog.dom.TagName.MAIN=new goog.dom.TagName("MAIN"),goog.dom.TagName.MAP=new goog.dom.TagName("MAP"),goog.dom.TagName.MARK=new goog.dom.TagName("MARK"),goog.dom.TagName.MATH=new goog.dom.TagName("MATH"),goog.dom.TagName.MENU=new goog.dom.TagName("MENU"),goog.dom.TagName.MENUITEM=new goog.dom.TagName("MENUITEM"),goog.dom.TagName.META=new goog.dom.TagName("META"),goog.dom.TagName.METER=new goog.dom.TagName("METER"),goog.dom.TagName.NAV=new goog.dom.TagName("NAV"),goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES"),goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT"),goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT"),goog.dom.TagName.OL=new goog.dom.TagName("OL"),goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP"),goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION"),goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT"),goog.dom.TagName.P=new goog.dom.TagName("P"),goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM"),goog.dom.TagName.PICTURE=new goog.dom.TagName("PICTURE"),goog.dom.TagName.PRE=new goog.dom.TagName("PRE"),goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS"),goog.dom.TagName.Q=new goog.dom.TagName("Q"),goog.dom.TagName.RP=new goog.dom.TagName("RP"),goog.dom.TagName.RT=new goog.dom.TagName("RT"),goog.dom.TagName.RTC=new goog.dom.TagName("RTC"),goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY"),goog.dom.TagName.S=new goog.dom.TagName("S"),goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP"),goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT"),goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION"),goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT"),goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL"),goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE"),goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN"),goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE"),goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG"),goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE"),goog.dom.TagName.SUB=new goog.dom.TagName("SUB"),goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY"),goog.dom.TagName.SUP=new goog.dom.TagName("SUP"),goog.dom.TagName.SVG=new goog.dom.TagName("SVG"),goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE"),goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY"),goog.dom.TagName.TD=new goog.dom.TagName("TD"),goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE"),goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA"),goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT"),goog.dom.TagName.TH=new goog.dom.TagName("TH"),goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD"),goog.dom.TagName.TIME=new goog.dom.TagName("TIME"),goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE"),goog.dom.TagName.TR=new goog.dom.TagName("TR"),goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK"),goog.dom.TagName.TT=new goog.dom.TagName("TT"),goog.dom.TagName.U=new goog.dom.TagName("U"),goog.dom.TagName.UL=new goog.dom.TagName("UL"),goog.dom.TagName.VAR=new goog.dom.TagName("VAR"),goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO"),goog.dom.TagName.WBR=new goog.dom.TagName("WBR"),goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.contains(t,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.caseInsensitiveContains(t,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var t,n=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,r=[];t=n.exec(e);)r.push([t[1],t[2],t[3]||void 0]);return r},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdgeHtml_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchEdgeChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("Edg/")},goog.labs.userAgent.browser.matchOperaChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")||goog.labs.userAgent.util.matchUserAgent("FxiOS")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdgeHtml_()||goog.labs.userAgent.browser.matchEdgeChromium_()||goog.labs.userAgent.browser.matchOperaChromium_()||goog.labs.userAgent.browser.matchFirefox_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&!goog.labs.userAgent.browser.matchFirefox_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdgeHtml_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdgeHtml_,goog.labs.userAgent.browser.isEdgeChromium=goog.labs.userAgent.browser.matchEdgeChromium_,goog.labs.userAgent.browser.isOperaChromium=goog.labs.userAgent.browser.matchOperaChromium_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(i){return i=goog.array.find(i,r),n[i]||""}var t=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(t);t=goog.labs.userAgent.util.extractVersionTuples(t);var n={};goog.array.forEach(t,function(i){n[i[0]]=i[1]});var r=goog.partial(goog.object.containsKey,n);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?e(["Edge"]):goog.labs.userAgent.browser.isEdgeChromium()?e(["Edg"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(t=t[2])&&t[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var t=/rv: *([\d\.]*)/.exec(e);if(t&&t[1])return t[1];t="";var n=/MSIE +([\d\.]+)/.exec(e);if(n&&n[1])if(e=/Trident\/(\d.\d)/.exec(e),n[1]=="7.0")if(e&&e[1])switch(e[1]){case"4.0":t="8.0";break;case"5.0":t="9.0";break;case"6.0":t="10.0";break;case"7.0":t="11.0"}else t="7.0";else t=n[1];return t},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return goog.html.SafeHtml.unwrapTrustedHTML(e).toString()},goog.html.SafeHtml.unwrapTrustedHTML=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var t=typeof e=="object",n=null;return t&&e.implementsGoogI18nBidiDirectionalString&&(n=e.getDirection()),e=t&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(e),n)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.html.SafeHtml.create=function(e,t,n){return goog.html.SafeHtml.verifyTagName(String(e)),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(e),t,n)},goog.html.SafeHtml.verifyTagName=function(e){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.")},goog.html.SafeHtml.createIframe=function(e,t,n,r){e&&goog.html.TrustedResourceUrl.unwrap(e);var i={};return i.src=e||null,i.srcdoc=t&&goog.html.SafeHtml.unwrap(t),e=goog.html.SafeHtml.combineAttributes(i,{sandbox:""},n),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,r)},goog.html.SafeHtml.createSandboxIframe=function(e,t,n,r){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var i={};return i.src=e?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)):null,i.srcdoc=t||null,i.sandbox="",e=goog.html.SafeHtml.combineAttributes(i,{},n),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,r)},goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype},goog.html.SafeHtml.createScriptSrc=function(e,t){return goog.html.TrustedResourceUrl.unwrap(e),e=goog.html.SafeHtml.combineAttributes({src:e},{},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",e)},goog.html.SafeHtml.createScript=function(e,t){for(var n in t){var r=n.toLowerCase();if(r=="language"||r=="src"||r=="text"||r=="type")throw Error('Cannot set "'+r+'" attribute')}for(n="",e=goog.array.concat(e),r=0;r<e.length;r++)n+=goog.html.SafeScript.unwrap(e[r]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",t,e)},goog.html.SafeHtml.createStyle=function(e,t){t=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},t);var n="";e=goog.array.concat(e);for(var r=0;r<e.length;r++)n+=goog.html.SafeStyleSheet.unwrap(e[r]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",t,e)},goog.html.SafeHtml.createMetaRefresh=function(e,t){return e=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)),(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.internal.contains(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(t||0)+"; url="+e})},goog.html.SafeHtml.getAttrNameAndValue_=function(e,t,n){if(n instanceof goog.string.Const)n=goog.string.Const.unwrap(n);else if(t.toLowerCase()=="style")n=goog.html.SafeHtml.getStyleValue_(n);else{if(/^on/i.test(t))throw Error('Attribute "'+t+'" requires goog.string.Const value, "'+n+'" given.');if(t.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(n instanceof goog.html.TrustedResourceUrl)n=goog.html.TrustedResourceUrl.unwrap(n);else if(n instanceof goog.html.SafeUrl)n=goog.html.SafeUrl.unwrap(n);else{if(!goog.isString(n))throw Error('Attribute "'+t+'" on tag "'+e+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+n+'" given.');n=goog.html.SafeUrl.sanitize(n).getTypedStringValue()}}return n.implementsGoogStringTypedString&&(n=n.getTypedStringValue()),goog.asserts.assert(goog.isString(n)||goog.isNumber(n),"String or number value expected, got "+typeof n+" with value: "+n),t+'="'+goog.string.internal.htmlEscape(String(n))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,t,n,r){return(t=goog.html.SafeHtml.create(t,n,r)).dir_=e,t},goog.html.SafeHtml.join=function(e,t){var n=(e=goog.html.SafeHtml.htmlEscape(e)).getDirection(),r=[],i=function(s){goog.isArray(s)?goog.array.forEach(s,i):(s=goog.html.SafeHtml.htmlEscape(s),r.push(goog.html.SafeHtml.unwrap(s)),s=s.getDirection(),n==goog.i18n.bidi.Dir.NEUTRAL?n=s:s!=goog.i18n.bidi.Dir.NEUTRAL&&n!=s&&(n=null))};return goog.array.forEach(t,i),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r.join(goog.html.SafeHtml.unwrap(e)),n)},goog.html.SafeHtml.concat=function(e){return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))},goog.html.SafeHtml.concatWithDir=function(e,t){var n=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return n.dir_=e,n},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,t){return new goog.html.SafeHtml().initSecurityPrivateDoNotAccessOrElse_(e,t)},goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e,t){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(e):e,this.dir_=t,this},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,t,n){var r=null,i="<"+e+goog.html.SafeHtml.stringifyAttributes(e,t);return goog.isDefAndNotNull(n)?goog.isArray(n)||(n=[n]):n=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!n.length,"Void tag <"+e+"> does not allow content."),i+=">"):(r=goog.html.SafeHtml.concat(n),i+=">"+goog.html.SafeHtml.unwrap(r)+"</"+e+">",r=r.getDirection()),(e=t&&t.dir)&&(r=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(i,r)},goog.html.SafeHtml.stringifyAttributes=function(e,t){var n="";if(t)for(var r in t){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(r))throw Error('Invalid attribute name "'+r+'".');var i=t[r];goog.isDefAndNotNull(i)&&(n+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,r,i))}return n},goog.html.SafeHtml.combineAttributes=function(e,t,n){var r,i={};for(r in e)goog.asserts.assert(r.toLowerCase()==r,"Must be lower case"),i[r]=e[r];for(r in t)goog.asserts.assert(r.toLowerCase()==r,"Must be lower case"),i[r]=t[r];for(r in n){var s=r.toLowerCase();if(s in e)throw Error('Cannot override "'+s+'" attribute, got "'+r+'" with value "'+n[r]+'"');s in t&&delete i[s],i[r]=n[r]}return i},goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.uncheckedconversions={},goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(e,t,n){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,n||null)},goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.dom.asserts={},goog.dom.asserts.assertIsLocation=function(e){if(goog.asserts.ENABLE_ASSERTS){var t=goog.dom.asserts.getWindow_(e);t&&(!e||!(e instanceof t.Location)&&e instanceof t.Element)&&goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",goog.dom.asserts.debugStringForType_(e))}return e},goog.dom.asserts.assertIsElementType_=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var n=goog.dom.asserts.getWindow_(e);n&&n[t]!==void 0&&(e&&(e instanceof n[t]||!(e instanceof n.Location||e instanceof n.Element))||goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,goog.dom.asserts.debugStringForType_(e)))}return e},goog.dom.asserts.assertIsHTMLAnchorElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAnchorElement")},goog.dom.asserts.assertIsHTMLButtonElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLButtonElement")},goog.dom.asserts.assertIsHTMLLinkElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLLinkElement")},goog.dom.asserts.assertIsHTMLImageElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLImageElement")},goog.dom.asserts.assertIsHTMLAudioElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAudioElement")},goog.dom.asserts.assertIsHTMLVideoElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLVideoElement")},goog.dom.asserts.assertIsHTMLInputElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLInputElement")},goog.dom.asserts.assertIsHTMLTextAreaElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLTextAreaElement")},goog.dom.asserts.assertIsHTMLCanvasElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLCanvasElement")},goog.dom.asserts.assertIsHTMLEmbedElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLEmbedElement")},goog.dom.asserts.assertIsHTMLFormElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFormElement")},goog.dom.asserts.assertIsHTMLFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFrameElement")},goog.dom.asserts.assertIsHTMLIFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLIFrameElement")},goog.dom.asserts.assertIsHTMLObjectElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLObjectElement")},goog.dom.asserts.assertIsHTMLScriptElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLScriptElement")},goog.dom.asserts.debugStringForType_=function(e){if(!goog.isObject(e))return e===void 0?"undefined":e===null?"null":typeof e;try{return e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch{return"<object could not be stringified>"}},goog.dom.asserts.getWindow_=function(e){try{var t=e&&e.ownerDocument,n=t&&(t.defaultView||t.parentWindow);if((n=n||goog.global).Element&&n.Location)return n}catch{}return null},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=function(){return!1},goog.functions.TRUE=function(){return!0},goog.functions.NULL=function(){return null},goog.functions.identity=function(e,t){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,t){return t=t||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,t))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.partialRight=function(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var r=Array.prototype.slice.call(arguments);return r.push.apply(r,n),e.apply(this,r)}},goog.functions.withReturnValue=function(e,t){return goog.functions.sequence(e,goog.functions.constant(t))},goog.functions.equalTo=function(e,t){return function(n){return t?e==n:e===n}},goog.functions.compose=function(e,t){var n=arguments,r=n.length;return function(){var i;r&&(i=n[r-1].apply(this,arguments));for(var s=r-2;0<=s;s--)i=n[s].call(this,i);return i}},goog.functions.sequence=function(e){var t=arguments,n=t.length;return function(){for(var r,i=0;i<n;i++)r=t[i].apply(this,arguments);return r}},goog.functions.and=function(e){var t=arguments,n=t.length;return function(){for(var r=0;r<n;r++)if(!t[r].apply(this,arguments))return!1;return!0}},goog.functions.or=function(e){var t=arguments,n=t.length;return function(){for(var r=0;r<n;r++)if(t[r].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e,t){var n=function(){};return n.prototype=e.prototype,n=new n,e.apply(n,Array.prototype.slice.call(arguments,1)),n},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var t,n=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(n||(t=e(),n=!0),t):e()}},goog.functions.once=function(e){var t=e;return function(){if(t){var n=t;t=null,n()}}},goog.functions.debounce=function(e,t,n){var r=0;return function(i){goog.global.clearTimeout(r);var s=arguments;r=goog.global.setTimeout(function(){e.apply(n,s)},t)}},goog.functions.throttle=function(e,t,n){var r=0,i=!1,s=[],l=function(){r=0,i&&(i=!1,o())},o=function(){r=goog.global.setTimeout(l,t),e.apply(n,s)};return function(c){s=arguments,r?i=!0:o()}},goog.functions.rateLimit=function(e,t,n){var r=0,i=function(){r=0};return function(s){r||(r=goog.global.setTimeout(i,t),e.apply(n,arguments))}},goog.dom.safe={},goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"},goog.dom.safe.insertAdjacentHtml=function(e,t,n){e.insertAdjacentHTML(t,goog.html.SafeHtml.unwrapTrustedHTML(n))},goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.dom.safe.isInnerHtmlCleanupRecursive_=goog.functions.cacheReturnValue(function(){if(goog.DEBUG&&typeof document>"u")return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!(goog.DEBUG&&!e.firstChild)&&(t=e.firstChild.firstChild,e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY),!t.parentElement)}),goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(e,t){if(goog.dom.safe.isInnerHtmlCleanupRecursive_())for(;e.lastChild;)e.removeChild(e.lastChild);e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setInnerHtml=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var n=e.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[n])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+e.tagName+".")}goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(e,t)},goog.dom.safe.setOuterHtml=function(e,t){e.outerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setFormElementAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLFormElement(e).action=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setButtonFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLButtonElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setInputFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLInputElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setStyle=function(e,t){e.style.cssText=goog.html.SafeStyle.unwrap(t)},goog.dom.safe.documentWrite=function(e,t){e.write(goog.html.SafeHtml.unwrapTrustedHTML(t))},goog.dom.safe.setAnchorHref=function(e,t){goog.dom.asserts.assertIsHTMLAnchorElement(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setImageSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLImageElement(e),!(t instanceof goog.html.SafeUrl)){var n=/^data:image\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,n)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setAudioSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLAudioElement(e),!(t instanceof goog.html.SafeUrl)){var n=/^data:audio\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,n)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setVideoSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLVideoElement(e),!(t instanceof goog.html.SafeUrl)){var n=/^data:video\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,n)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setEmbedSrc=function(e,t){goog.dom.asserts.assertIsHTMLEmbedElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setFrameSrc=function(e,t){goog.dom.asserts.assertIsHTMLFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrcdoc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.srcdoc=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setLinkHrefAndRel=function(e,t,n){goog.dom.asserts.assertIsHTMLLinkElement(e),e.rel=n,goog.string.internal.caseInsensitiveContains(n,"stylesheet")?(goog.asserts.assert(t instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),e.href=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)):e.href=t instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrapTrustedURL(t):t instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrapTrustedURL(t):goog.html.SafeUrl.unwrapTrustedURL(goog.html.SafeUrl.sanitizeAssertUnchanged(t))},goog.dom.safe.setObjectData=function(e,t){goog.dom.asserts.assertIsHTMLObjectElement(e),e.data=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setScriptSrc=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setScriptContent=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.text=goog.html.SafeScript.unwrapTrustedScript(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setLocationHref=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.assignLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.assign(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.replaceLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.replace(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.openInWindow=function(e,t,n,r,i){return e=e instanceof goog.html.SafeUrl?e:goog.html.SafeUrl.sanitizeAssertUnchanged(e),(t||goog.global).open(goog.html.SafeUrl.unwrapTrustedURL(e),n?goog.string.Const.unwrap(n):"",r,i)},goog.dom.safe.parseFromStringHtml=function(e,t){return goog.dom.safe.parseFromString(e,t,"text/html")},goog.dom.safe.parseFromString=function(e,t,n){return e.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(t),n)},goog.dom.safe.createImageFromBlob=function(e){if(!/^image\/.*/g.test(e.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var t=goog.global.URL.createObjectURL(e);return(e=new goog.global.Image).onload=function(){goog.global.URL.revokeObjectURL(t)},goog.dom.safe.setImageSrc(e,goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."),t)),e},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:" "},goog.string.startsWith=goog.string.internal.startsWith,goog.string.endsWith=goog.string.internal.endsWith,goog.string.caseInsensitiveStartsWith=goog.string.internal.caseInsensitiveStartsWith,goog.string.caseInsensitiveEndsWith=goog.string.internal.caseInsensitiveEndsWith,goog.string.caseInsensitiveEquals=goog.string.internal.caseInsensitiveEquals,goog.string.subs=function(e,t){for(var n=e.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")},goog.string.collapseWhitespace=function(e){return e.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=goog.string.internal.isEmptyOrWhitespace,goog.string.isEmptyString=function(e){return e.length==0},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(e){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(e))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(e){return!/[^\t\n\r ]/.test(e)},goog.string.isAlpha=function(e){return!/[^a-zA-Z]/.test(e)},goog.string.isNumeric=function(e){return!/[^0-9]/.test(e)},goog.string.isAlphaNumeric=function(e){return!/[^a-zA-Z0-9]/.test(e)},goog.string.isSpace=function(e){return e==" "},goog.string.isUnicodeChar=function(e){return e.length==1&&" "<=e&&"~">=e||"€"<=e&&"�">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,`
39
+ `)},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.string.internal.trim,goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare,goog.string.numberAwareCompare_=function(e,t,n){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var r=e.toLowerCase().match(n),i=t.toLowerCase().match(n),s=Math.min(r.length,i.length),l=0;l<s;l++){n=r[l];var o=i[l];if(n!=o)return e=parseInt(n,10),!isNaN(e)&&(t=parseInt(o,10),!isNaN(t)&&e-t)?e-t:n<o?-1:1}return r.length!=i.length?r.length-i.length:e<t?-1:1},goog.string.intAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=goog.string.internal.newLineToBr,goog.string.htmlEscape=function(e,t){return e=goog.string.internal.htmlEscape(e,t),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"&#101;")),e},goog.string.E_RE_=/e/g,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},r=t?t.createElement("div"):goog.global.document.createElement("div");return e.replace(goog.string.HTML_ENTITY_PATTERN_,function(i,s){var l=n[i];return l||(s.charAt(0)=="#"&&(s=+("0"+s.substr(1)),isNaN(s)||(l=String.fromCharCode(s))),l||(goog.dom.safe.setInnerHtml(r,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),i+" ")),l=r.firstChild.nodeValue.slice(0,-1)),n[i]=l)})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(t,n){switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:return n.charAt(0)!="#"||(n=+("0"+n.substr(1)),isNaN(n))?t:String.fromCharCode(n)}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var n=t.length,r=0;r<n;r++){var i=n==1?t:t.charAt(r);if(e.charAt(0)==i&&e.charAt(e.length-1)==i)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,n){return n&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),n&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,n,r){if(n&&(e=goog.string.unescapeEntities(e)),r&&e.length>t){r>t&&(r=t);var i=e.length-r;e=e.substring(0,t-r)+"..."+e.substring(i)}else e.length>t&&(r=Math.floor(t/2),i=e.length-r,e=e.substring(0,r+t%2)+"..."+e.substring(i));return n&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var t=['"'],n=0;n<e.length;n++){var r=e.charAt(n),i=r.charCodeAt(0);t[n+1]=goog.string.specialEscapeChars_[r]||(31<i&&127>i?r:goog.string.escapeChar(r))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=goog.string.escapeChar(e.charAt(n));return t.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var t=e.charCodeAt(0);if(31<t&&127>t)var n=e;else 256>t?(n="\\x",(16>t||256<t)&&(n+="0")):(n="\\u",4096>t&&(n+="0")),n+=t.toString(16).toUpperCase();return goog.string.jsEscapeCache_[e]=n},goog.string.contains=goog.string.internal.contains,goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains,goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,n){var r=e;return 0<=t&&t<e.length&&0<n&&(r=e.substr(0,t)+e.substr(t+n,e.length-t-n)),r},goog.string.remove=function(e,t){return e.replace(t,"")},goog.string.removeAll=function(e,t){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,"")},goog.string.replaceAll=function(e,t,n){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,n.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,t){return e.repeat(t)}:function(e,t){return Array(t+1).join(e)},goog.string.padNumber=function(e,t,n){return(n=(e=goog.isDef(n)?e.toFixed(n):String(e)).indexOf("."))==-1&&(n=e.length),goog.string.repeat("0",Math.max(0,t-n))+e},goog.string.makeSafe=function(e){return e==null?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=goog.string.internal.compareVersions,goog.string.hashCode=function(e){for(var t=0,n=0;n<e.length;++n)t=31*t+e.charCodeAt(n)>>>0;return t},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=Number(e);return t==0&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,function(t,n){return n.toUpperCase()})},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){return t=goog.isString(t)?goog.string.regExpEscape(t):"\\s",e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),function(n,r,i){return r+i.toUpperCase()})},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,n){e=e.split(t);for(var r=[];0<n&&e.length;)r.push(e.shift()),n--;return e.length&&r.push(e.join(t)),r},goog.string.lastComponent=function(e,t){if(!t)return e;typeof t=="string"&&(t=[t]);for(var n=-1,r=0;r<t.length;r++)if(t[r]!=""){var i=e.lastIndexOf(t[r]);i>n&&(n=i)}return n==-1?e:e.slice(n+1)},goog.string.editDistance=function(e,t){var n=[],r=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var i=0;i<t.length+1;i++)n[i]=i;for(i=0;i<e.length;i++){r[0]=i+1;for(var s=0;s<t.length;s++)r[s+1]=Math.min(r[s]+1,n[s+1]+1,n[s]+ +(e[i]!=t[s]));for(s=0;s<n.length;s++)n[s]=r[s]}return r[t.length]},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")},goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")},goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?t=(e=(t=/Windows (?:NT|Phone) ([0-9.]+)/).exec(e))?e[1]:"0.0":goog.labs.userAgent.platform.isIos()?t=(e=(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(e))&&e[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?t=(e=(t=/Mac OS X ([0-9_.]+)/).exec(e))?e[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isKaiOS()?t=(e=(t=/(?:KaiOS)\/(\S+)/i).exec(e))&&e[1]:goog.labs.userAgent.platform.isAndroid()?t=(e=(t=/Android\s+([^\);]+)(\)|;)/).exec(e))&&e[1]:goog.labs.userAgent.platform.isChromeOS()&&(t=(e=(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.objectProperty=function(e,t){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch{}return!1},goog.reflect.cache=function(e,t,n,r){return r=r?r(t):t,Object.prototype.hasOwnProperty.call(e,r)?e[r]:e[r]=n(t)},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){e=goog.labs.userAgent.util.extractVersionTuples(e);var t,n=goog.labs.userAgent.engine.getEngineTuple_(e);if(n)return n[0]=="Gecko"?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):n[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var t=0;t<e.length;t++){var n=e[t];if(n[0]=="Edge")return n}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){return(e=goog.array.find(e,function(n){return t==n[0]}))&&e[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null},goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigatorTyped();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.ASSUME_KAIOS=!1,goog.userAgent.ASSUME_GO2PHONE=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigatorTyped();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS(),goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone(),goog.userAgent.determineVersion_=function(){var e="",t=goog.userAgent.getVersionRegexResult_();return t&&(e=t?t[1]:""),goog.userAgent.IE&&(t=goog.userAgent.getDocumentMode_())!=null&&t>parseFloat(e)?String(t):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)})},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.",goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4},goog.crypt.base64.paddingChars_="=.",goog.crypt.base64.isPadding_=function(e){return goog.string.contains(goog.crypt.base64.paddingChars_,e)},goog.crypt.base64.byteToCharMaps_={},goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||typeof goog.global.btoa=="function",goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&typeof goog.global.atob=="function",goog.crypt.base64.encodeByteArray=function(e,t){goog.asserts.assert(goog.isArrayLike(e),"encodeByteArray takes an array as a parameter"),t===void 0&&(t=goog.crypt.base64.Alphabet.DEFAULT),goog.crypt.base64.init_(),t=goog.crypt.base64.byteToCharMaps_[t];for(var n=[],r=0;r<e.length;r+=3){var i=e[r],s=r+1<e.length,l=s?e[r+1]:0,o=r+2<e.length,c=o?e[r+2]:0,u=i>>2;i=(3&i)<<4|l>>4,l=(15&l)<<2|c>>6,c&=63,o||(c=64,s||(l=64)),n.push(t[u],t[i],t[l]||"",t[c]||"")}return n.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var n="";return goog.crypt.base64.decodeStringInternal_(e,function(r){n+=String.fromCharCode(r)}),n},goog.crypt.base64.decodeStringToByteArray=function(e,t){var n=[];return goog.crypt.base64.decodeStringInternal_(e,function(r){n.push(r)}),n},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=e.length,n=3*t/4;n%3?n=Math.floor(n):goog.crypt.base64.isPadding_(e[t-1])&&(n=goog.crypt.base64.isPadding_(e[t-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return goog.crypt.base64.decodeStringInternal_(e,function(s){r[i++]=s}),r.subarray(0,i)},goog.crypt.base64.decodeStringInternal_=function(e,t){function n(c){for(;r<e.length;){var u=e.charAt(r++),f=goog.crypt.base64.charToByteMap_[u];if(f!=null)return f;if(!goog.string.isEmptyOrWhitespace(u))throw Error("Unknown base64 encoding at char: "+u)}return c}goog.crypt.base64.init_();for(var r=0;;){var i=n(-1),s=n(0),l=n(64),o=n(64);if(o===64&&i===-1)break;t(i<<2|s>>4),l!=64&&(t(s<<4&240|l>>2),o!=64&&t(l<<6&192|o))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var e=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=e.concat(t[n].split(""));goog.crypt.base64.byteToCharMaps_[n]=r;for(var i=0;i<r.length;i++){var s=r[i],l=goog.crypt.base64.charToByteMap_[s];l===void 0?goog.crypt.base64.charToByteMap_[s]=i:goog.asserts.assert(l===i)}}}},jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(e){var t=e>>>0;e=Math.floor((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e,n=(e=Math.abs(e))>>>0;e=Math.floor((e-n)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,4294967295<(n=1+(~n>>>0))&&(n=0,4294967295<++e&&(e=0))),jspb.utils.split64Low=n,jspb.utils.split64High=e},jspb.utils.splitZigzag64=function(e){var t=0>e;e=2*Math.abs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var n=jspb.utils.split64High;t&&(e==0?n==0?n=e=4294967295:(n--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=n},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(e))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(e>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|2139095040)>>>0;else if(e<jspb.BinaryConstants.FLOAT32_MIN)e=Math.round(e/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|e)>>>0;else{var n=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-n),e=8388607&Math.round(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|n+127<<23|e)>>>0}},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(t<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(e<jspb.BinaryConstants.FLOAT64_MIN){var n=e/Math.pow(2,-1074);e=n/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(t<<31|e)>>>0,jspb.utils.split64Low=n>>>0}else{var r=0;if(2<=(n=e))for(;2<=n&&1023>r;)r++,n/=2;else for(;1>n&&-1022<r;)n*=2,r--;e=(n=e*Math.pow(2,-r))*jspb.BinaryConstants.TWO_TO_20&1048575,n=n*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|r+1023<<20|e)>>>0,jspb.utils.split64Low=n}},jspb.utils.splitHash64=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=e.charCodeAt(4),l=e.charCodeAt(5),o=e.charCodeAt(6);e=e.charCodeAt(7),jspb.utils.split64Low=t+(n<<8)+(r<<16)+(i<<24)>>>0,jspb.utils.split64High=s+(l<<8)+(o<<16)+(e<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+(e>>>0)},jspb.utils.joinInt64=function(e,t){var n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=jspb.utils.joinUint64(e,t),n?-e:e},jspb.utils.toZigzag64=function(e,t,n){var r=t>>31;return n(e<<1^r,(t<<1|e>>>31)^r)},jspb.utils.joinZigzag64=function(e,t){return jspb.utils.fromZigzag64(e,t,jspb.utils.joinInt64)},jspb.utils.fromZigzag64=function(e,t,n){var r=-(1&e);return n((e>>>1|t<<31)^r,t>>>1^r)},jspb.utils.joinFloat32=function(e,t){t=2*(e>>31)+1;var n=e>>>23&255;return e&=8388607,n==255?e?NaN:1/0*t:n==0?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))},jspb.utils.joinFloat64=function(e,t){var n=2*(t>>31)+1,r=t>>>20&2047;return e=jspb.BinaryConstants.TWO_TO_32*(1048575&t)+e,r==2047?e?NaN:1/0*n:r==0?n*Math.pow(2,-1074)*e:n*Math.pow(2,r-1075)*(e+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.ZERO_CHAR_CODE_=48,jspb.utils.A_CHAR_CODE_=97,jspb.utils.joinUnsignedDecimalString=function(e,t){function n(i,s){return i=i?String(i):"",s?"0000000".slice(i.length)+i:i}if(2097151>=t)return""+(jspb.BinaryConstants.TWO_TO_32*t+e);var r=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*r+6710656*(t=t>>16&65535),r+=8147497*t,t*=2,1e7<=e&&(r+=Math.floor(e/1e7),e%=1e7),1e7<=r&&(t+=Math.floor(r/1e7),r%=1e7),n(t,0)+n(r,t)+n(e,1)},jspb.utils.joinSignedDecimalString=function(e,t){var n=2147483648&t;return n&&(t=~t+((e=1+~e>>>0)==0?1:0)>>>0),e=jspb.utils.joinUnsignedDecimalString(e,t),n?"-"+e:e},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var n=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(e,n):jspb.utils.joinUnsignedDecimalString(e,n)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var n=Array(e.length),r=0;r<e.length;r++)n[r]=jspb.utils.hash64ToDecimalString(e[r],t);return n},jspb.utils.decimalStringToHash64=function(e){function t(s,l){for(var o=0;8>o&&(s!==1||0<l);o++)l=s*r[o]+l,r[o]=255&l,l>>>=8}goog.asserts.assert(0<e.length);var n=!1;e[0]==="-"&&(n=!0,e=e.slice(1));for(var r=[0,0,0,0,0,0,0,0],i=0;i<e.length;i++)t(10,e.charCodeAt(i)-jspb.utils.ZERO_CHAR_CODE_);return n&&(function(){for(var s=0;8>s;s++)r[s]=255&~r[s]}(),t(1,1)),goog.crypt.byteArrayToString(r)},jspb.utils.splitDecimalString=function(e){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e))},jspb.utils.toHexDigit_=function(e){return String.fromCharCode(10>e?jspb.utils.ZERO_CHAR_CODE_+e:jspb.utils.A_CHAR_CODE_-10+e)},jspb.utils.fromHexCharCode_=function(e){return e>=jspb.utils.A_CHAR_CODE_?e-jspb.utils.A_CHAR_CODE_+10:e-jspb.utils.ZERO_CHAR_CODE_},jspb.utils.hash64ToHexString=function(e){var t=Array(18);t[0]="0",t[1]="x";for(var n=0;8>n;n++){var r=e.charCodeAt(7-n);t[2*n+2]=jspb.utils.toHexDigit_(r>>4),t[2*n+3]=jspb.utils.toHexDigit_(15&r)}return t.join("")},jspb.utils.hexStringToHash64=function(e){e=e.toLowerCase(),goog.asserts.assert(e.length==18),goog.asserts.assert(e[0]=="0"),goog.asserts.assert(e[1]=="x");for(var t="",n=0;8>n;n++){var r=jspb.utils.fromHexCharCode_(e.charCodeAt(2*n+2)),i=jspb.utils.fromHexCharCode_(e.charCodeAt(2*n+3));t=String.fromCharCode(16*r+i)+t}return t},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var n=jspb.utils.split64High;return t?jspb.utils.joinInt64(e,n):jspb.utils.joinUint64(e,n)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(e,t,n){for(var r=0,i=t;i<n;i++)r+=e[i]>>7;return n-t-r},jspb.utils.countVarintFields=function(e,t,n,r){var i=0;if(128>(r=8*r+jspb.BinaryConstants.WireType.VARINT))for(;t<n&&e[t++]==r;)for(i++;;){var s=e[t++];if(!(128&s))break}else for(;t<n;){for(s=r;128<s;){if(e[t]!=(127&s|128))return i;t++,s>>=7}if(e[t++]!=s)break;for(i++;128&(s=e[t++]););}return i},jspb.utils.countFixedFields_=function(e,t,n,r,i){var s=0;if(128>r)for(;t<n&&e[t++]==r;)s++,t+=i;else for(;t<n;){for(var l=r;128<l;){if(e[t++]!=(127&l|128))return s;l>>=7}if(e[t++]!=l)break;s++,t+=i}return s},jspb.utils.countFixed32Fields=function(e,t,n,r){return jspb.utils.countFixedFields_(e,t,n,8*r+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,n,r){return jspb.utils.countFixedFields_(e,t,n,8*r+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(e,t,n,r){var i=0;for(r=8*r+jspb.BinaryConstants.WireType.DELIMITED;t<n;){for(var s=r;128<s;){if(e[t++]!=(127&s|128))return i;s>>=7}if(e[t++]!=s)break;i++;for(var l=0,o=1;l+=(127&(s=e[t++]))*o,o*=128,(128&s)!=0;);t+=l}return i},jspb.utils.debugBytesToTextFormat=function(e){var t='"';if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var n=0;n<e.length;n++)t+="\\x",16>e[n]&&(t+="0"),t+=e[n].toString(16)}return t+'"'},jspb.utils.debugScalarToTextFormat=function(e){return typeof e=="string"?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++){var r=e.charCodeAt(n);if(255<r)throw Error("Conversion error: string contains codepoint outside of byte range");t[n]=r}return t},jspb.utils.byteSourceToUint8Array=function(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||Buffer!==void 0&&e.constructor===Buffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryDecoder=function(e,t,n){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,n)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,n){if(jspb.BinaryDecoder.instanceCache_.length){var r=jspb.BinaryDecoder.instanceCache_.pop();return e&&r.setBlock(e,t,n),r}return new jspb.BinaryDecoder(e,t,n)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,n){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=t!==void 0?t:0,this.end_=n!==void 0?this.start_+n:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64=function(e){for(var t=128,n=0,r=0,i=0;4>i&&128<=t;i++)n|=(127&(t=this.bytes_[this.cursor_++]))<<7*i;if(128<=t&&(n|=(127&(t=this.bytes_[this.cursor_++]))<<28,r|=(127&t)>>4),128<=t)for(i=0;5>i&&128<=t;i++)r|=(127&(t=this.bytes_[this.cursor_++]))<<7*i+3;if(128>t)return e(n>>>0,r>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0},jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(e){return this.readSplitVarint64(function(t,n){return jspb.utils.fromZigzag64(t,n,e)})},jspb.BinaryDecoder.prototype.readSplitFixed64=function(e){var t=this.bytes_,n=this.cursor_;this.cursor_+=8;for(var r=0,i=0,s=n+7;s>=n;s--)r=r<<8|t[s],i=i<<8|t[s+4];return e(r,i)},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128<e;)this.cursor_--,e>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t=e[this.cursor_+0],n=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),n):(n|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),n>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),n)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)},jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],n=this.bytes_[this.cursor_+2],r=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|n<<16|r<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],n=this.bytes_[this.cursor_+2],r=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|n<<16|r<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(e){var t=this.bytes_,n=this.cursor_;e=n+e;for(var r=[],i="";n<e;){var s=t[n++];if(128>s)r.push(s);else{if(192>s)continue;if(224>s){var l=t[n++];r.push((31&s)<<6|63&l)}else if(240>s){l=t[n++];var o=t[n++];r.push((15&s)<<12|(63&l)<<6|63&o)}else 248>s&&(s=(7&s)<<18|(63&(l=t[n++]))<<12|(63&(o=t[n++]))<<6|63&t[n++],s-=65536,r.push(55296+(s>>10&1023),56320+(1023&s)))}8192<=r.length&&(i+=String.fromCharCode.apply(null,r),r.length=0)}return i+=goog.crypt.byteArrayToString(r),this.cursor_=n,i},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var e=this.bytes_,t=this.cursor_,n=e[t+0],r=e[t+1],i=e[t+2],s=e[t+3],l=e[t+4],o=e[t+5],c=e[t+6];return e=e[t+7],this.cursor_+=8,String.fromCharCode(n,r,i,s,l,o,c,e)},jspb.BinaryReader=function(e,t,n){this.decoder_=jspb.BinaryDecoder.alloc(e,t,n),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,n){if(jspb.BinaryReader.instanceCache_.length){var r=jspb.BinaryReader.instanceCache_.pop();return e&&r.decoder_.setBlock(e,t,n),r}return new jspb.BinaryReader(e,t,n)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,n){this.decoder_.setBlock(e,t,n),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3;return(e&=7)!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type: %s (at position %s)",e,this.fieldCursor_),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){for(var e=this.nextField_;;){if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=e&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(e,t){this.readCallbacks_===null&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[e]),this.readCallbacks_[e]=t},jspb.BinaryReader.prototype.runReadCallback=function(e){return goog.asserts.assert(this.readCallbacks_!==null),e=this.readCallbacks_[e],goog.asserts.assert(e),e(this)},jspb.BinaryReader.prototype.readAny=function(e){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(e);var t=jspb.BinaryConstants.FieldType;switch(e){case t.DOUBLE:return this.readDouble();case t.FLOAT:return this.readFloat();case t.INT64:return this.readInt64();case t.UINT64:return this.readUint64();case t.INT32:return this.readInt32();case t.FIXED64:return this.readFixed64();case t.FIXED32:return this.readFixed32();case t.BOOL:return this.readBool();case t.STRING:return this.readString();case t.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case t.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case t.BYTES:return this.readBytes();case t.UINT32:return this.readUint32();case t.ENUM:return this.readEnum();case t.SFIXED32:return this.readSfixed32();case t.SFIXED64:return this.readSfixed64();case t.SINT32:return this.readSint32();case t.SINT64:return this.readSint64();case t.FHASH64:return this.readFixedHash64();case t.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(e,t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var n=this.decoder_.getEnd(),r=this.decoder_.readUnsignedVarint32();r=this.decoder_.getCursor()+r,this.decoder_.setEnd(r),t(e,this),this.decoder_.setCursor(r),this.decoder_.setEnd(n)},jspb.BinaryReader.prototype.readGroup=function(e,t,n){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==e),n(t,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32(),t=this.decoder_.getCursor(),n=t+e;return e=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),t,e),this.decoder_.setCursor(n),e},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(e)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(e)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readSintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarintHash64()},jspb.BinaryReader.prototype.readSplitVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(e)},jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(function(t,n){return jspb.utils.fromZigzag64(t,n,e)})},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readSplitFixed64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readSplitFixed64(e)},jspb.BinaryReader.prototype.readPackedField_=function(e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();t=this.decoder_.getCursor()+t;for(var n=[];this.decoder_.getCursor()<t;)n.push(e.call(this.decoder_));return n},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Map=function(e,t){this.arr_=e,this.valueCtor_=t,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()},jspb.Map.prototype.loadFromArray_=function(){for(var e=0;e<this.arr_.length;e++){var t=this.arr_[e],n=t[0];this.map_[n.toString()]=new jspb.Map.Entry_(n,t[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var e,t=this.map_;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=t[e].valueWrapper;n&&n.toArray()}}}else{for(this.arr_.length=0,(t=this.stringKeys_()).sort(),e=0;e<t.length;e++){var r=this.map_[t[e]];(n=r.valueWrapper)&&n.toArray(),this.arr_.push([r.key,r.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(e,t){for(var n=this.toArray(),r=[],i=0;i<n.length;i++){var s=this.map_[n[i][0].toString()];this.wrapEntry_(s);var l=s.valueWrapper;l?(goog.asserts.assert(t),r.push([s.key,t(e,l)])):r.push([s.key,s.value])}return r},jspb.Map.fromObject=function(e,t,n){t=new jspb.Map([],t);for(var r=0;r<e.length;r++){var i=e[r][0],s=n(e[r][1]);t.set(i,s)}return t},jspb.Map.ArrayIteratorIterable_=function(e){this.idx_=0,this.arr_=e},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},typeof Symbol<"u"&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(e){e=e.toString();var t=this.map_.hasOwnProperty(e);return delete this.map_[e],this.arrClean=!1,t},jspb.Map.prototype.getEntryList=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++){var r=this.map_[t[n]];e.push([r.key,r.value])}return e},jspb.Map.prototype.entries=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++){var r=this.map_[t[n]];e.push([r.key,this.wrapEntry_(r)])}return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.keys=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++)e.push(this.map_[t[n]].key);return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.values=function(){var e=[],t=this.stringKeys_();t.sort();for(var n=0;n<t.length;n++)e.push(this.wrapEntry_(this.map_[t[n]]));return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.forEach=function(e,t){var n=this.stringKeys_();n.sort();for(var r=0;r<n.length;r++){var i=this.map_[n[r]];e.call(t,this.wrapEntry_(i),i.key,this)}},jspb.Map.prototype.set=function(e,t){var n=new jspb.Map.Entry_(e);return this.valueCtor_?(n.valueWrapper=t,n.value=t.toArray()):n.value=t,this.map_[e.toString()]=n,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(e){return this.valueCtor_?(e.valueWrapper||(e.valueWrapper=new this.valueCtor_(e.value)),e.valueWrapper):e.value},jspb.Map.prototype.get=function(e){if(e=this.map_[e.toString()])return this.wrapEntry_(e)},jspb.Map.prototype.has=function(e){return e.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(e,t,n,r,i){var s=this.stringKeys_();s.sort();for(var l=0;l<s.length;l++){var o=this.map_[s[l]];t.beginSubMessage(e),n.call(t,1,o.key),this.valueCtor_?r.call(t,2,this.wrapEntry_(o),i):r.call(t,2,o.value),t.endSubMessage()}},jspb.Map.deserializeBinary=function(e,t,n,r,i,s,l){for(;t.nextField()&&!t.isEndGroup();){var o=t.getFieldNumber();o==1?s=n.call(t):o==2&&(e.valueCtor_?(goog.asserts.assert(i),l||(l=new e.valueCtor_),r.call(t,l,i)):l=r.call(t))}goog.asserts.assert(s!=null),goog.asserts.assert(l!=null),e.set(s,l)},jspb.Map.prototype.stringKeys_=function(){var e,t=this.map_,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(e);return n},jspb.Map.Entry_=function(e,t){this.key=e,this.value=t,this.valueWrapper=void 0},jspb.ExtensionFieldInfo=function(e,t,n,r,i){this.fieldIndex=e,this.fieldName=t,this.ctor=n,this.toObjectFn=r,this.isRepeated=i},jspb.ExtensionFieldBinaryInfo=function(e,t,n,r,i,s){this.fieldInfo=e,this.binaryReaderFn=t,this.binaryWriterFn=n,this.binaryMessageSerializeFn=r,this.binaryMessageDeserializeFn=i,this.isPacked=s},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_=typeof Uint8Array=="function",jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.hiddenES6Property_=function(){},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(e,t,n,r,i,s){if(e.wrappers_=null,t||(t=n?[n]:[]),e.messageId_=n?String(n):void 0,e.arrayIndexOffset_=n===0?-1:0,e.array=t,jspb.Message.initPivotAndExtensionObject_(e,r),e.convertedPrimitiveFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(e.repeatedFields=i),i)for(t=0;t<i.length;t++)(n=i[t])<e.pivot_?(n=jspb.Message.getIndex_(e,n),e.array[n]=e.array[n]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[n]=e.extensionObject_[n]||jspb.Message.EMPTY_LIST_SENTINEL_);if(s&&s.length)for(t=0;t<s.length;t++)jspb.Message.computeOneofCase(e,s[t])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(e){return jspb.Message.ASSUME_LOCAL_ARRAYS?e instanceof Array:Array.isArray(e)},jspb.Message.isExtensionObject_=function(e){return!(e===null||typeof e!="object"||jspb.Message.isArray_(e)||jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)},jspb.Message.initPivotAndExtensionObject_=function(e,t){var n=e.array.length,r=-1;if(n&&(r=n-1,n=e.array[r],jspb.Message.isExtensionObject_(n)))return e.pivot_=jspb.Message.getFieldNumber_(e,r),void(e.extensionObject_=n);-1<t?(e.pivot_=Math.max(t,jspb.Message.getFieldNumber_(e,r+1)),e.extensionObject_=null):e.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(e){var t=jspb.Message.getIndex_(e,e.pivot_);e.array[t]||(e.extensionObject_=e.array[t]={})},jspb.Message.toObjectList=function(e,t,n){for(var r=[],i=0;i<e.length;i++)r[i]=t.call(e[i],n,e[i]);return r},jspb.Message.toObjectExtension=function(e,t,n,r,i){for(var s in n){var l=n[s],o=r.call(e,l);if(o!=null){for(var c in l.fieldName)if(l.fieldName.hasOwnProperty(c))break;t[c]=l.toObjectFn?l.isRepeated?jspb.Message.toObjectList(o,l.toObjectFn,i):l.toObjectFn(i,o):o}}},jspb.Message.serializeBinaryExtensions=function(e,t,n,r){for(var i in n){var s=n[i],l=s.fieldInfo;if(!s.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var o=r.call(e,l);if(o!=null)if(l.isMessageType()){if(!s.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");s.binaryWriterFn.call(t,l.fieldIndex,o,s.binaryMessageSerializeFn)}else s.binaryWriterFn.call(t,l.fieldIndex,o)}},jspb.Message.readBinaryExtension=function(e,t,n,r,i){var s=n[t.getFieldNumber()];if(s){if(n=s.fieldInfo,!s.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(n.isMessageType()){var l=new n.ctor;s.binaryReaderFn.call(t,l,s.binaryMessageDeserializeFn)}else l=s.binaryReaderFn.call(t);n.isRepeated&&!s.isPacked?(t=r.call(e,n))?t.push(l):i.call(e,n,[l]):i.call(e,n,l)}else t.skipField()},jspb.Message.getField=function(e,t){if(t<e.pivot_){t=jspb.Message.getIndex_(e,t);var n=e.array[t];return n===jspb.Message.EMPTY_LIST_SENTINEL_?e.array[t]=[]:n}if(e.extensionObject_)return(n=e.extensionObject_[t])===jspb.Message.EMPTY_LIST_SENTINEL_?e.extensionObject_[t]=[]:n},jspb.Message.getRepeatedField=function(e,t){return jspb.Message.getField(e,t)},jspb.Message.getOptionalFloatingPointField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:+e},jspb.Message.getBooleanField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:!!e},jspb.Message.getRepeatedFloatingPointField=function(e,t){var n=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var r=0;r<n.length;r++)n[r]=+n[r];e.convertedPrimitiveFields_[t]=!0}return n},jspb.Message.getRepeatedBooleanField=function(e,t){var n=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var r=0;r<n.length;r++)n[r]=!!n[r];e.convertedPrimitiveFields_[t]=!0}return n},jspb.Message.bytesAsB64=function(e){return e==null||typeof e=="string"?e:jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array?goog.crypt.base64.encodeByteArray(e):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(e)),null)},jspb.Message.bytesAsU8=function(e){return e==null||e instanceof Uint8Array?e:typeof e=="string"?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(e)),null)},jspb.Message.bytesListAsB64=function(e){return jspb.Message.assertConsistentTypes_(e),e.length&&typeof e[0]!="string"?goog.array.map(e,jspb.Message.bytesAsB64):e},jspb.Message.bytesListAsU8=function(e){return jspb.Message.assertConsistentTypes_(e),!e.length||e[0]instanceof Uint8Array?e:goog.array.map(e,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(e){if(goog.DEBUG&&e&&1<e.length){var t=goog.typeOf(e[0]);goog.array.forEach(e,function(n){goog.typeOf(n)!=t&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(n)+" expected "+t)})}},jspb.Message.getFieldWithDefault=function(e,t,n){return(e=jspb.Message.getField(e,t))==null?n:e},jspb.Message.getBooleanFieldWithDefault=function(e,t,n){return(e=jspb.Message.getBooleanField(e,t))==null?n:e},jspb.Message.getFloatingPointFieldWithDefault=function(e,t,n){return(e=jspb.Message.getOptionalFloatingPointField(e,t))==null?n:e},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(e,t,n,r){if(e.wrappers_||(e.wrappers_={}),t in e.wrappers_)return e.wrappers_[t];var i=jspb.Message.getField(e,t);if(!i){if(n)return;i=[],jspb.Message.setField(e,t,i)}return e.wrappers_[t]=new jspb.Map(i,r)},jspb.Message.setField=function(e,t,n){return goog.asserts.assertInstanceof(e,jspb.Message),t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=n:(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[t]=n),e},jspb.Message.setProto3IntField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,0)},jspb.Message.setProto3FloatField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,0)},jspb.Message.setProto3BooleanField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,!1)},jspb.Message.setProto3StringField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,"")},jspb.Message.setProto3BytesField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,"")},jspb.Message.setProto3EnumField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,0)},jspb.Message.setProto3StringIntField=function(e,t,n){return jspb.Message.setFieldIgnoringDefault_(e,t,n,"0")},jspb.Message.setFieldIgnoringDefault_=function(e,t,n,r){return goog.asserts.assertInstanceof(e,jspb.Message),n!==r?jspb.Message.setField(e,t,n):t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(e),delete e.extensionObject_[t]),e},jspb.Message.addToRepeatedField=function(e,t,n,r){return goog.asserts.assertInstanceof(e,jspb.Message),t=jspb.Message.getRepeatedField(e,t),r!=null?t.splice(r,0,n):t.push(n),e},jspb.Message.setOneofField=function(e,t,n,r){return goog.asserts.assertInstanceof(e,jspb.Message),(n=jspb.Message.computeOneofCase(e,n))&&n!==t&&r!==void 0&&(e.wrappers_&&n in e.wrappers_&&(e.wrappers_[n]=void 0),jspb.Message.setField(e,n,void 0)),jspb.Message.setField(e,t,r)},jspb.Message.computeOneofCase=function(e,t){for(var n,r,i=0;i<t.length;i++){var s=t[i],l=jspb.Message.getField(e,s);l!=null&&(n=s,r=l,jspb.Message.setField(e,s,void 0))}return n?(jspb.Message.setField(e,n,r),n):0},jspb.Message.getWrapperField=function(e,t,n,r){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[n]){var i=jspb.Message.getField(e,n);(r||i)&&(e.wrappers_[n]=new t(i))}return e.wrappers_[n]},jspb.Message.getRepeatedWrapperField=function(e,t,n){return jspb.Message.wrapRepeatedField_(e,t,n),(t=e.wrappers_[n])==jspb.Message.EMPTY_LIST_SENTINEL_&&(t=e.wrappers_[n]=[]),t},jspb.Message.wrapRepeatedField_=function(e,t,n){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[n]){for(var r=jspb.Message.getRepeatedField(e,n),i=[],s=0;s<r.length;s++)i[s]=new t(r[s]);e.wrappers_[n]=i}},jspb.Message.setWrapperField=function(e,t,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var r=n&&n.toArray();return e.wrappers_[t]=n,jspb.Message.setField(e,t,r)},jspb.Message.setOneofWrapperField=function(e,t,n,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var i=r&&r.toArray();return e.wrappers_[t]=r,jspb.Message.setOneofField(e,t,n,i)},jspb.Message.setRepeatedWrapperField=function(e,t,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={}),n=n||[];for(var r=[],i=0;i<n.length;i++)r[i]=n[i].toArray();return e.wrappers_[t]=n,jspb.Message.setField(e,t,r)},jspb.Message.addToRepeatedWrapperField=function(e,t,n,r,i){jspb.Message.wrapRepeatedField_(e,r,t);var s=e.wrappers_[t];return s||(s=e.wrappers_[t]=[]),n=n||new r,e=jspb.Message.getRepeatedField(e,t),i!=null?(s.splice(i,0,n),e.splice(i,0,n.toArray())):(s.push(n),e.push(n.toArray())),n},jspb.Message.toMap=function(e,t,n,r){for(var i={},s=0;s<e.length;s++)i[t.call(e[s])]=n?n.call(e[s],r,e[s]):e[s];return i},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var e in this.wrappers_){var t=this.wrappers_[e];if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]&&t[n].toArray();else t&&t.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(e){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var t=e.fieldIndex;if(e.isRepeated){if(e.isMessageType())return this.wrappers_[t]||(this.wrappers_[t]=goog.array.map(this.extensionObject_[t]||[],function(n){return new e.ctor(n)})),this.wrappers_[t]}else if(e.isMessageType())return!this.wrappers_[t]&&this.extensionObject_[t]&&(this.wrappers_[t]=new e.ctor(this.extensionObject_[t])),this.wrappers_[t];return this.extensionObject_[t]}},jspb.Message.prototype.setExtension=function(e,t){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var n=e.fieldIndex;return e.isRepeated?(t=t||[],e.isMessageType()?(this.wrappers_[n]=t,this.extensionObject_[n]=goog.array.map(t,function(r){return r.toArray()})):this.extensionObject_[n]=t):e.isMessageType()?(this.wrappers_[n]=t,this.extensionObject_[n]=t&&t.toArray()):this.extensionObject_[n]=t,this},jspb.Message.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var n=e.toArray();t=t.toArray();var r=[],i=0,s=n.length>t.length?n.length:t.length;for(e.getJsPbMessageId()&&(r[0]=e.getJsPbMessageId(),i=1);i<s;i++)jspb.Message.compareFields(n[i],t[i])||(r[i]=t[i]);return new e.constructor(r)},jspb.Message.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&jspb.Message.compareFields(e.toArray(),t.toArray())},jspb.Message.compareExtensions=function(e,t){e=e||{},t=t||{};var n,r={};for(n in e)r[n]=0;for(n in t)r[n]=0;for(n in r)if(!jspb.Message.compareFields(e[n],t[n]))return!1;return!0},jspb.Message.compareFields=function(e,t){if(e==t)return!0;if(!goog.isObject(e)||!goog.isObject(t))return!!(typeof e=="number"&&isNaN(e)||typeof t=="number"&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}if(e.constructor===Array){var r=void 0,i=void 0,s=Math.max(e.length,t.length);for(n=0;n<s;n++){var l=e[n],o=t[n];if(l&&l.constructor==Object&&(goog.asserts.assert(r===void 0),goog.asserts.assert(n===e.length-1),r=l,l=void 0),o&&o.constructor==Object&&(goog.asserts.assert(i===void 0),goog.asserts.assert(n===t.length-1),i=o,o=void 0),!jspb.Message.compareFields(l,o))return!1}return!r&&!i||(r=r||{},i=i||{},jspb.Message.compareExtensions(r,i))}if(e.constructor===Object)return jspb.Message.compareExtensions(e,t);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(e){return jspb.Message.cloneMessage(e)},jspb.Message.cloneMessage=function(e){return new e.constructor(jspb.Message.clone_(e.toArray()))},jspb.Message.copyInto=function(e,t){goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assert(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=jspb.Message.clone(e);for(var n=t.toArray(),r=e.toArray(),i=n.length=0;i<r.length;i++)n[i]=r[i];t.wrappers_=e.wrappers_,t.extensionObject_=e.extensionObject_},jspb.Message.clone_=function(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n<e.length;n++){var r=e[n];r!=null&&(t[n]=typeof r=="object"?jspb.Message.clone_(goog.asserts.assert(r)):r)}return t}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)return new Uint8Array(e);for(n in t={},e)(r=e[n])!=null&&(t[n]=typeof r=="object"?jspb.Message.clone_(goog.asserts.assert(r)):r);return t},jspb.Message.registerMessageType=function(e,t){t.messageId=e},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(e,t){this.lo=e,this.hi=t},jspb.arith.UInt64.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return this.lo==0&&this.hi==0},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(e,t){var n=65535&e,r=65535&t,i=t>>>16;for(t=n*r+65536*(n*i&65535)+65536*((e>>>=16)*r&65535),n=e*i+(n*i>>>16)+(e*r>>>16);4294967296<=t;)t-=4294967296,n+=1;return new jspb.arith.UInt64(t>>>0,n>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return(e=jspb.arith.UInt64.mul32x32(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(e==0)return[];var t=new jspb.arith.UInt64(0,0),n=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var r=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),r=r.leftShift();for(;!r.zero();)0>=e.cmp(n)&&(t=t.add(r),n=n.sub(e)),e=e.rightShift(),r=r.rightShift();return[t,n]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();){var n=(t=t.div(10))[0];e=t[1].lo+e,t=n}return e==""&&(e="0"),e},jspb.arith.UInt64.fromString=function(e){for(var t=new jspb.arith.UInt64(0,0),n=new jspb.arith.UInt64(0,0),r=0;r<e.length;r++){if("0">e[r]||"9"<e[r])return null;var i=parseInt(e[r],10);n.lo=i,t=t.mul(10).add(n)}return t},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(e,t){this.lo=e,this.hi=t},jspb.arith.Int64.prototype.add=function(e){return new jspb.arith.Int64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=(2147483648&this.hi)!=0,t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0<e.length&&e[0]=="-";return t&&(e=e.substring(1)),(e=jspb.arith.UInt64.fromString(e))===null?null:(t&&(e=new jspb.arith.UInt64(0,0).sub(e)),new jspb.arith.Int64(e.lo,e.hi))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var e=this.buffer_;return this.buffer_=[],e},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(e,t){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);0<t||127<e;)this.buffer_.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(e),this.writeUint32(t)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(e){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);127<e;)this.buffer_.push(127&e|128),e>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),0<=e)this.writeUnsignedVarint32(e);else{for(var t=0;9>t;t++)this.buffer_.push(127&e|128),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((e<<1^e>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(e){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(e))},jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(e){var t=this;jspb.utils.splitHash64(e),jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,function(n,r){t.writeSplitVarint64(n>>>0,r>>>0)})},jspb.BinaryEncoder.prototype.writeUint8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&256>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-128<=e&&128>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(typeof e=="boolean"||typeof e=="number"),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(e)},jspb.BinaryEncoder.prototype.writeBytes=function(e){this.buffer_.push.apply(this.buffer_,e)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(e){jspb.utils.splitHash64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(e){jspb.utils.splitHash64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(e){for(var t=this.buffer_.length,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(128>r)this.buffer_.push(r);else if(2048>r)this.buffer_.push(r>>6|192),this.buffer_.push(63&r|128);else if(65536>r)if(55296<=r&&56319>=r&&n+1<e.length){var i=e.charCodeAt(n+1);56320<=i&&57343>=i&&(r=1024*(r-55296)+i-56320+65536,this.buffer_.push(r>>18|240),this.buffer_.push(r>>12&63|128),this.buffer_.push(r>>6&63|128),this.buffer_.push(63&r|128),n++)}else this.buffer_.push(r>>12|224),this.buffer_.push(r>>6&63|128),this.buffer_.push(63&r|128)}return this.buffer_.length-t},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop();for(t=this.totalLength_+this.encoder_.length()-t,goog.asserts.assert(0<=t);127<t;)e.push(127&t|128),t>>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,n){this.appendUint8Array_(e.subarray(t,n))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,n){e!=null&&t!=null&&n!=null&&this.writeSerializedMessage(e,t,n)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(this.bookmarks_.length==0);for(var e=new Uint8Array(this.totalLength_+this.encoder_.length()),t=this.blocks_,n=t.length,r=0,i=0;i<n;i++){var s=t[i];e.set(s,r),r+=s.length}return t=this.encoder_.end(),e.set(t,r),r+=t.length,goog.asserts.assert(r==e.length),this.blocks_=[e],e},jspb.BinaryWriter.prototype.getResultBase64String=function(e){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),e)},jspb.BinaryWriter.prototype.beginSubMessage=function(e){this.bookmarks_.push(this.beginDelimited_(e))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(e,t){goog.asserts.assert(1<=e&&e==Math.floor(e)),this.encoder_.writeUnsignedVarint32(8*e+t)},jspb.BinaryWriter.prototype.writeAny=function(e,t,n){var r=jspb.BinaryConstants.FieldType;switch(e){case r.DOUBLE:this.writeDouble(t,n);break;case r.FLOAT:this.writeFloat(t,n);break;case r.INT64:this.writeInt64(t,n);break;case r.UINT64:this.writeUint64(t,n);break;case r.INT32:this.writeInt32(t,n);break;case r.FIXED64:this.writeFixed64(t,n);break;case r.FIXED32:this.writeFixed32(t,n);break;case r.BOOL:this.writeBool(t,n);break;case r.STRING:this.writeString(t,n);break;case r.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case r.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case r.BYTES:this.writeBytes(t,n);break;case r.UINT32:this.writeUint32(t,n);break;case r.ENUM:this.writeEnum(t,n);break;case r.SFIXED32:this.writeSfixed32(t,n);break;case r.SFIXED64:this.writeSfixed64(t,n);break;case r.SINT32:this.writeSint32(t,n);break;case r.SINT64:this.writeSint64(t,n);break;case r.FHASH64:this.writeFixedHash64(t,n);break;case r.VHASH64:this.writeVarintHash64(t,n);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(t))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(t))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(t))},jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(t))},jspb.BinaryWriter.prototype.writeInt32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeInt64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeUint32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeUint64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSint32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(e,t))},jspb.BinaryWriter.prototype.writeSint64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(e,t))},jspb.BinaryWriter.prototype.writeSintHash64=function(e,t){t!=null&&this.writeZigzagVarintHash64_(e,t)},jspb.BinaryWriter.prototype.writeSint64String=function(e,t){t!=null&&this.writeZigzagVarint64String_(e,t)},jspb.BinaryWriter.prototype.writeFixed32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(t))},jspb.BinaryWriter.prototype.writeFixed64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(t))},jspb.BinaryWriter.prototype.writeFixed64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSfixed32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(t))},jspb.BinaryWriter.prototype.writeSfixed64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(t))},jspb.BinaryWriter.prototype.writeSfixed64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeFloat=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(t))},jspb.BinaryWriter.prototype.writeDouble=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(t))},jspb.BinaryWriter.prototype.writeBool=function(e,t){t!=null&&(goog.asserts.assert(typeof t=="boolean"||typeof t=="number"),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(t))},jspb.BinaryWriter.prototype.writeEnum=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeString=function(e,t){t!=null&&(e=this.beginDelimited_(e),this.encoder_.writeString(t),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeBytes=function(e,t){t!=null&&(t=jspb.utils.byteSourceToUint8Array(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),this.appendUint8Array_(t))},jspb.BinaryWriter.prototype.writeMessage=function(e,t,n){t!=null&&(e=this.beginDelimited_(e),n(t,this),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeMessageSet=function(e,t,n){t!=null&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e),e=this.beginDelimited_(3),n(t,this),this.endDelimited_(e),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeGroup=function(e,t,n){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),n(t,this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(t))},jspb.BinaryWriter.prototype.writeVarintHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(t))},jspb.BinaryWriter.prototype.writeSplitFixed64=function(e,t,n){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t,n)},jspb.BinaryWriter.prototype.writeSplitVarint64=function(e,t,n){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t,n)},jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(e,t,n){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT);var r=this.encoder_;jspb.utils.toZigzag64(t,n,function(i,s){r.writeSplitVarint64(i>>>0,s>>>0)})},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSignedVarint32_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeInt32String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSignedVarint64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(e,t,n,r){if(t!=null)for(var i=0;i<t.length;i++)this.writeSplitFixed64(e,n(t[i]),r(t[i]))},jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(e,t,n,r){if(t!=null)for(var i=0;i<t.length;i++)this.writeSplitVarint64(e,n(t[i]),r(t[i]))},jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(e,t,n,r){if(t!=null)for(var i=0;i<t.length;i++)this.writeSplitZigzagVarint64(e,n(t[i]),r(t[i]))},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeInt64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUnsignedVarint32_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUint32String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUnsignedVarint64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeUint64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarint32_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarint64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarint64String_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeZigzagVarintHash64_(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixed32(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixed64(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixed64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSfixed32(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSfixed64(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeSfixed64String(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFloat(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeDouble(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeBool(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeEnum(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedString=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeString(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeBytes(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(e,t,n){if(t!=null)for(var r=0;r<t.length;r++){var i=this.beginDelimited_(e);n(t[r],this),this.endDelimited_(i)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(e,t,n){if(t!=null)for(var r=0;r<t.length;r++)this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),n(t[r],this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeFixedHash64(e,t[n])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.writeVarintHash64(e,t[n])},jspb.BinaryWriter.prototype.writePackedInt32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeSignedVarint32(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeSignedVarint32(parseInt(t[n],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeSignedVarint64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(e,t,n,r){if(t!=null){e=this.beginDelimited_(e);for(var i=0;i<t.length;i++)this.encoder_.writeSplitFixed64(n(t[i]),r(t[i]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(e,t,n,r){if(t!=null){e=this.beginDelimited_(e);for(var i=0;i<t.length;i++)this.encoder_.writeSplitVarint64(n(t[i]),r(t[i]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(e,t,n,r){if(t!=null){e=this.beginDelimited_(e);for(var i=this.encoder_,s=0;s<t.length;s++)jspb.utils.toZigzag64(n(t[s]),r(t[s]),function(l,o){i.writeSplitVarint64(l>>>0,o>>>0)});this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++){var r=jspb.arith.Int64.fromString(t[n]);this.encoder_.writeSplitVarint64(r.lo,r.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeUnsignedVarint32(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeUnsignedVarint32(parseInt(t[n],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeUnsignedVarint64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++){var r=jspb.arith.UInt64.fromString(t[n]);this.encoder_.writeSplitVarint64(r.lo,r.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarint32(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarint64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(t[n]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeZigzagVarintHash64(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeUint32(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeUint64(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++){var n=jspb.arith.UInt64.fromString(t[e]);this.encoder_.writeSplitFixed64(n.lo,n.hi)}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeInt32(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64String(t[e])},jspb.BinaryWriter.prototype.writePackedFloat=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeFloat(t[e])},jspb.BinaryWriter.prototype.writePackedDouble=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeDouble(t[e])},jspb.BinaryWriter.prototype.writePackedBool=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),e=0;e<t.length;e++)this.encoder_.writeBool(t[e])},jspb.BinaryWriter.prototype.writePackedEnum=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeEnum(t[n]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeFixedHash64(t[e])},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var n=0;n<t.length;n++)this.encoder_.writeVarintHash64(t[n]);this.endDelimited_(e)}},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(6),__webpack_require__(5).Buffer)},function(e,t,n){const{AbortController:r,AbortSignal:i}=typeof self<"u"?self:typeof window<"u"?window:void 0;e.exports=r,e.exports.AbortSignal=i,e.exports.default=r},function(e,t){var n=function(r){function i(){this.fetch=!1,this.DOMException=r.DOMException}return i.prototype=r,new i}(typeof self<"u"?self:this);(function(r){(function(i){var s="URLSearchParams"in r,l="Symbol"in r&&"iterator"in Symbol,o="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),c="FormData"in r,u="ArrayBuffer"in r;if(u)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],E=ArrayBuffer.isView||function(C){return C&&f.indexOf(Object.prototype.toString.call(C))>-1};function w(C){if(typeof C!="string"&&(C=String(C)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(C))throw new TypeError("Invalid character in header field name");return C.toLowerCase()}function h(C){return typeof C!="string"&&(C=String(C)),C}function g(C){var _={next:function(){var L=C.shift();return{done:L===void 0,value:L}}};return l&&(_[Symbol.iterator]=function(){return _}),_}function b(C){this.map={},C instanceof b?C.forEach(function(_,L){this.append(L,_)},this):Array.isArray(C)?C.forEach(function(_){this.append(_[0],_[1])},this):C&&Object.getOwnPropertyNames(C).forEach(function(_){this.append(_,C[_])},this)}function R(C){if(C.bodyUsed)return Promise.reject(new TypeError("Already read"));C.bodyUsed=!0}function x(C){return new Promise(function(_,L){C.onload=function(){_(C.result)},C.onerror=function(){L(C.error)}})}function F(C){var _=new FileReader,L=x(_);return _.readAsArrayBuffer(C),L}function M(C){if(C.slice)return C.slice(0);var _=new Uint8Array(C.byteLength);return _.set(new Uint8Array(C)),_.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(C){var _;this._bodyInit=C,C?typeof C=="string"?this._bodyText=C:o&&Blob.prototype.isPrototypeOf(C)?this._bodyBlob=C:c&&FormData.prototype.isPrototypeOf(C)?this._bodyFormData=C:s&&URLSearchParams.prototype.isPrototypeOf(C)?this._bodyText=C.toString():u&&o&&(_=C)&&DataView.prototype.isPrototypeOf(_)?(this._bodyArrayBuffer=M(C.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(C)||E(C))?this._bodyArrayBuffer=M(C):this._bodyText=C=Object.prototype.toString.call(C):this._bodyText="",this.headers.get("content-type")||(typeof C=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s&&URLSearchParams.prototype.isPrototypeOf(C)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var C=R(this);if(C)return C;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?R(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(F)}),this.text=function(){var C,_,L,z=R(this);if(z)return z;if(this._bodyBlob)return C=this._bodyBlob,_=new FileReader,L=x(_),_.readAsText(C),L;if(this._bodyArrayBuffer)return Promise.resolve(function(B){for(var N=new Uint8Array(B),P=new Array(N.length),W=0;W<N.length;W++)P[W]=String.fromCharCode(N[W]);return P.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}b.prototype.append=function(C,_){C=w(C),_=h(_);var L=this.map[C];this.map[C]=L?L+", "+_:_},b.prototype.delete=function(C){delete this.map[w(C)]},b.prototype.get=function(C){return C=w(C),this.has(C)?this.map[C]:null},b.prototype.has=function(C){return this.map.hasOwnProperty(w(C))},b.prototype.set=function(C,_){this.map[w(C)]=h(_)},b.prototype.forEach=function(C,_){for(var L in this.map)this.map.hasOwnProperty(L)&&C.call(_,this.map[L],L,this)},b.prototype.keys=function(){var C=[];return this.forEach(function(_,L){C.push(L)}),g(C)},b.prototype.values=function(){var C=[];return this.forEach(function(_){C.push(_)}),g(C)},b.prototype.entries=function(){var C=[];return this.forEach(function(_,L){C.push([L,_])}),g(C)},l&&(b.prototype[Symbol.iterator]=b.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function I(C,_){var L,z,B=(_=_||{}).body;if(C instanceof I){if(C.bodyUsed)throw new TypeError("Already read");this.url=C.url,this.credentials=C.credentials,_.headers||(this.headers=new b(C.headers)),this.method=C.method,this.mode=C.mode,this.signal=C.signal,B||C._bodyInit==null||(B=C._bodyInit,C.bodyUsed=!0)}else this.url=String(C);if(this.credentials=_.credentials||this.credentials||"same-origin",!_.headers&&this.headers||(this.headers=new b(_.headers)),this.method=(L=_.method||this.method||"GET",z=L.toUpperCase(),d.indexOf(z)>-1?z:L),this.mode=_.mode||this.mode||null,this.signal=_.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(B)}function $(C){var _=new FormData;return C.trim().split("&").forEach(function(L){if(L){var z=L.split("="),B=z.shift().replace(/\+/g," "),N=z.join("=").replace(/\+/g," ");_.append(decodeURIComponent(B),decodeURIComponent(N))}}),_}function q(C,_){_||(_={}),this.type="default",this.status=_.status===void 0?200:_.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in _?_.statusText:"OK",this.headers=new b(_.headers),this.url=_.url||"",this._initBody(C)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})},A.call(I.prototype),A.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},q.error=function(){var C=new q(null,{status:0,statusText:""});return C.type="error",C};var m=[301,302,303,307,308];q.redirect=function(C,_){if(m.indexOf(_)===-1)throw new RangeError("Invalid status code");return new q(null,{status:_,headers:{location:C}})},i.DOMException=r.DOMException;try{new i.DOMException}catch{i.DOMException=function(_,L){this.message=_,this.name=L;var z=Error(_);this.stack=z.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function y(C,_){return new Promise(function(L,z){var B=new I(C,_);if(B.signal&&B.signal.aborted)return z(new i.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function P(){N.abort()}N.onload=function(){var W,O,p={status:N.status,statusText:N.statusText,headers:(W=N.getAllResponseHeaders()||"",O=new b,W.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(V){var Q=V.split(":"),ee=Q.shift().trim();if(ee){var ne=Q.join(":").trim();O.append(ee,ne)}}),O)};p.url="responseURL"in N?N.responseURL:p.headers.get("X-Request-URL");var U="response"in N?N.response:N.responseText;L(new q(U,p))},N.onerror=function(){z(new TypeError("Network request failed"))},N.ontimeout=function(){z(new TypeError("Network request failed"))},N.onabort=function(){z(new i.DOMException("Aborted","AbortError"))},N.open(B.method,B.url,!0),B.credentials==="include"?N.withCredentials=!0:B.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&o&&(N.responseType="blob"),B.headers.forEach(function(W,O){N.setRequestHeader(O,W)}),B.signal&&(B.signal.addEventListener("abort",P),N.onreadystatechange=function(){N.readyState===4&&B.signal.removeEventListener("abort",P)}),N.send(B._bodyInit===void 0?null:B._bodyInit)})}y.polyfill=!0,r.fetch||(r.fetch=y,r.Headers=b,r.Request=I,r.Response=q),i.Headers=b,i.Request=I,i.Response=q,i.fetch=y})({})})(n),delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},function(e,t,n){(function(r){const i=n(211),s=n(52),l=(o,c,u)=>({from:l,EnvVarError:n(52),get:function(f){if(!f)return o;if(arguments.length>1)throw new s("It looks like you passed more than one argument to env.get(). Since env-var@6.0.0 this is no longer supported. To set a default value use env.get(TARGET).default(DEFAULT)");return i(o,f,c||{},u||function(){})},accessors:n(94),logger:n(225)(console.log,o.NODE_ENV)});e.exports=l(r.env)}).call(this,n(2))},function(e,t,n){var r=n(13),i=n(73),s=n(3).LEVEL,l=e.exports=function(){var o=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){o.levels=u.levels,o.parent=u}),this.once("unpipe",function(u){u===o.parent&&(o.parent=null,o.close&&o.close())})};r.inherits(l,i),l.prototype._write=function(o,c,u){if(this.silent||o.exception===!0&&!this.handleExceptions)return u(null);var f=this.level||this.parent&&this.parent.level;if(!f||this.levels[f]>=this.levels[o[s]]){if(o&&!this.format)return this.log(o,u);var E=void 0,w=void 0;try{w=this.format.transform(Object.assign({},o),this.format.options)}catch(h){E=h}if(E||!w){if(u(),E)throw E;return}return this.log(w,u)}return u(null)},l.prototype._writev=function(o,c){if(this.logv){var u=o.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var f=0;f<o.length;f++)if(this._accept(o[f]))if(!o[f].chunk||this.format){var E=void 0,w=void 0;try{w=this.format.transform(Object.assign({},o[f].chunk),this.format.options)}catch(h){E=h}if(E||!w){if(o[f].callback(),E)throw c(null),E}else this.log(w,o[f].callback)}else this.log(o[f].chunk,o[f].callback);return c(null)},l.prototype._accept=function(o){var c=o.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[s]])||!this.handleExceptions&&c.exception===!0)},l.prototype._nop=function(){}},function(e,t,n){(function(r){const i=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new c}abort(){this.signal.dispatchEvent("abort")}},l=typeof AbortSignal=="function",o=typeof s.AbortSignal=="function",c=l?AbortSignal:o?s.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(A){if(A==="abort"){this.aborted=!0;const d={type:A,target:this};this.onabort(d),this._listeners.forEach(I=>I(d),this)}}onabort(){}addEventListener(A,d){A==="abort"&&this._listeners.push(d)}removeEventListener(A,d){A==="abort"&&(this._listeners=this._listeners.filter(I=>I!==d))}},u=new Set,f=(A,d)=>{const I=`LRU_CACHE_OPTION_${A}`;h(I)&&g(I,`${A} option`,`options.${d}`,M)},E=(A,d)=>{const I=`LRU_CACHE_METHOD_${A}`;if(h(I)){const{prototype:$}=M,{get:q}=Object.getOwnPropertyDescriptor($,A);g(I,`${A} method`,`cache.${d}()`,q)}},w=(...A)=>{typeof r=="object"&&r&&typeof r.emitWarning=="function"?r.emitWarning(...A):console.error(...A)},h=A=>!u.has(A),g=(A,d,I,$)=>{u.add(A),w(`The ${d} is deprecated. Please use ${I} instead.`,"DeprecationWarning",A,$)},b=A=>A&&A===Math.floor(A)&&A>0&&isFinite(A),R=A=>b(A)?A<=Math.pow(2,8)?Uint8Array:A<=Math.pow(2,16)?Uint16Array:A<=Math.pow(2,32)?Uint32Array:A<=Number.MAX_SAFE_INTEGER?x:null:null;class x extends Array{constructor(d){super(d),this.fill(0)}}class F{constructor(d){if(d===0)return[];const I=R(d);this.heap=new I(d),this.length=0}push(d){this.heap[this.length++]=d}pop(){return this.heap[--this.length]}}class M{constructor(d={}){const{max:I=0,ttl:$,ttlResolution:q=1,ttlAutopurge:m,updateAgeOnGet:y,updateAgeOnHas:C,allowStale:_,dispose:L,disposeAfter:z,noDisposeOnSet:B,noUpdateTTL:N,maxSize:P=0,maxEntrySize:W=0,sizeCalculation:O,fetchMethod:p,fetchContext:U,noDeleteOnFetchRejection:V,noDeleteOnStaleGet:Q}=d,{length:ee,maxAge:ne,stale:Y}=d instanceof M?{}:d;if(I!==0&&!b(I))throw new TypeError("max option must be a nonnegative integer");const G=I?R(I):Array;if(!G)throw new Error("invalid max value: "+I);if(this.max=I,this.maxSize=P,this.maxEntrySize=W||this.maxSize,this.sizeCalculation=O||ee,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=p||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=U,!this.fetchMethod&&U!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(I).fill(null),this.valList=new Array(I).fill(null),this.next=new G(I),this.prev=new G(I),this.head=0,this.tail=0,this.free=new F(I),this.initialFill=1,this.size=0,typeof L=="function"&&(this.dispose=L),typeof z=="function"?(this.disposeAfter=z,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!B,this.noUpdateTTL=!!N,this.noDeleteOnFetchRejection=!!V,this.maxEntrySize!==0){if(this.maxSize!==0&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!_||!!Y,this.noDeleteOnStaleGet=!!Q,this.updateAgeOnGet=!!y,this.updateAgeOnHas=!!C,this.ttlResolution=b(q)||q===0?q:1,this.ttlAutopurge=!!m,this.ttl=$||ne||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const S="LRU_CACHE_UNBOUNDED";h(S)&&(u.add(S),w("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",S,M))}Y&&f("stale","allowStale"),ne&&f("maxAge","ttl"),ee&&f("length","sizeCalculation")}getRemainingTTL(d){return this.has(d,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new x(this.max),this.starts=new x(this.max),this.setItemTTL=($,q,m=i.now())=>{if(this.starts[$]=q!==0?m:0,this.ttls[$]=q,q!==0&&this.ttlAutopurge){const y=setTimeout(()=>{this.isStale($)&&this.delete(this.keyList[$])},q+1);y.unref&&y.unref()}},this.updateItemAge=$=>{this.starts[$]=this.ttls[$]!==0?i.now():0};let d=0;const I=()=>{const $=i.now();if(this.ttlResolution>0){d=$;const q=setTimeout(()=>d=0,this.ttlResolution);q.unref&&q.unref()}return $};this.getRemainingTTL=$=>{const q=this.keyMap.get($);return q===void 0?0:this.ttls[q]===0||this.starts[q]===0?1/0:this.starts[q]+this.ttls[q]-(d||I())},this.isStale=$=>this.ttls[$]!==0&&this.starts[$]!==0&&(d||I())-this.starts[$]>this.ttls[$]}updateItemAge(d){}setItemTTL(d,I,$){}isStale(d){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new x(this.max),this.removeItemSize=d=>{this.calculatedSize-=this.sizes[d],this.sizes[d]=0},this.requireSize=(d,I,$,q)=>{if(!b($)){if(!q)throw new TypeError("invalid size value (must be positive integer)");if(typeof q!="function")throw new TypeError("sizeCalculation must be a function");if($=q(I,d),!b($))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return $},this.addItemSize=(d,I)=>{this.sizes[d]=I;const $=this.maxSize-this.sizes[d];for(;this.calculatedSize>$;)this.evict(!0);this.calculatedSize+=this.sizes[d]}}removeItemSize(d){}addItemSize(d,I){}requireSize(d,I,$,q){if($||q)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:d=this.allowStale}={}){if(this.size)for(let I=this.tail;this.isValidIndex(I)&&(!d&&this.isStale(I)||(yield I),I!==this.head);)I=this.prev[I]}*rindexes({allowStale:d=this.allowStale}={}){if(this.size)for(let I=this.head;this.isValidIndex(I)&&(!d&&this.isStale(I)||(yield I),I!==this.tail);)I=this.next[I]}isValidIndex(d){return this.keyMap.get(this.keyList[d])===d}*entries(){for(const d of this.indexes())yield[this.keyList[d],this.valList[d]]}*rentries(){for(const d of this.rindexes())yield[this.keyList[d],this.valList[d]]}*keys(){for(const d of this.indexes())yield this.keyList[d]}*rkeys(){for(const d of this.rindexes())yield this.keyList[d]}*values(){for(const d of this.indexes())yield this.valList[d]}*rvalues(){for(const d of this.rindexes())yield this.valList[d]}[Symbol.iterator](){return this.entries()}find(d,I={}){for(const $ of this.indexes())if(d(this.valList[$],this.keyList[$],this))return this.get(this.keyList[$],I)}forEach(d,I=this){for(const $ of this.indexes())d.call(I,this.valList[$],this.keyList[$],this)}rforEach(d,I=this){for(const $ of this.rindexes())d.call(I,this.valList[$],this.keyList[$],this)}get prune(){return E("prune","purgeStale"),this.purgeStale}purgeStale(){let d=!1;for(const I of this.rindexes({allowStale:!0}))this.isStale(I)&&(this.delete(this.keyList[I]),d=!0);return d}dump(){const d=[];for(const I of this.indexes({allowStale:!0})){const $=this.keyList[I],q=this.valList[I],m={value:this.isBackgroundFetch(q)?q.__staleWhileFetching:q};if(this.ttls){m.ttl=this.ttls[I];const y=i.now()-this.starts[I];m.start=Math.floor(Date.now()-y)}this.sizes&&(m.size=this.sizes[I]),d.unshift([$,m])}return d}load(d){this.clear();for(const[I,$]of d){if($.start){const q=Date.now()-$.start;$.start=i.now()-q}this.set(I,$.value,$)}}dispose(d,I,$){}set(d,I,{ttl:$=this.ttl,start:q,noDisposeOnSet:m=this.noDisposeOnSet,size:y=0,sizeCalculation:C=this.sizeCalculation,noUpdateTTL:_=this.noUpdateTTL}={}){if(y=this.requireSize(d,I,y,C),this.maxEntrySize&&y>this.maxEntrySize)return this;let L=this.size===0?void 0:this.keyMap.get(d);if(L===void 0)L=this.newIndex(),this.keyList[L]=d,this.valList[L]=I,this.keyMap.set(d,L),this.next[this.tail]=L,this.prev[L]=this.tail,this.tail=L,this.size++,this.addItemSize(L,y),_=!1;else{const z=this.valList[L];I!==z&&(this.isBackgroundFetch(z)?z.__abortController.abort():m||(this.dispose(z,d,"set"),this.disposeAfter&&this.disposed.push([z,d,"set"])),this.removeItemSize(L),this.valList[L]=I,this.addItemSize(L,y)),this.moveToTail(L)}if($===0||this.ttl!==0||this.ttls||this.initializeTTLTracking(),_||this.setItemTTL(L,$,q),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const d=this.valList[this.head];return this.evict(!0),d}}evict(d){const I=this.head,$=this.keyList[I],q=this.valList[I];return this.isBackgroundFetch(q)?q.__abortController.abort():(this.dispose(q,$,"evict"),this.disposeAfter&&this.disposed.push([q,$,"evict"])),this.removeItemSize(I),d&&(this.keyList[I]=null,this.valList[I]=null,this.free.push(I)),this.head=this.next[I],this.keyMap.delete($),this.size--,I}has(d,{updateAgeOnHas:I=this.updateAgeOnHas}={}){const $=this.keyMap.get(d);return $!==void 0&&!this.isStale($)&&(I&&this.updateItemAge($),!0)}peek(d,{allowStale:I=this.allowStale}={}){const $=this.keyMap.get(d);if($!==void 0&&(I||!this.isStale($))){const q=this.valList[$];return this.isBackgroundFetch(q)?q.__staleWhileFetching:q}}backgroundFetch(d,I,$,q){const m=I===void 0?void 0:this.valList[I];if(this.isBackgroundFetch(m))return m;const y=new s,C={signal:y.signal,options:$,context:q},_=new Promise(L=>L(this.fetchMethod(d,m,C))).then(L=>(y.signal.aborted||this.set(d,L,C.options),L),L=>{if(this.valList[I]===_&&(!$.noDeleteOnFetchRejection||_.__staleWhileFetching===void 0?this.delete(d):this.valList[I]=_.__staleWhileFetching),_.__returned===_)throw L});return _.__abortController=y,_.__staleWhileFetching=m,_.__returned=null,I===void 0?(this.set(d,_,C.options),I=this.keyMap.get(d)):this.valList[I]=_,_}isBackgroundFetch(d){return d&&typeof d=="object"&&typeof d.then=="function"&&Object.prototype.hasOwnProperty.call(d,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(d,"__returned")&&(d.__returned===d||d.__returned===null)}async fetch(d,{allowStale:I=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:q=this.noDeleteOnStaleGet,ttl:m=this.ttl,noDisposeOnSet:y=this.noDisposeOnSet,size:C=0,sizeCalculation:_=this.sizeCalculation,noUpdateTTL:L=this.noUpdateTTL,noDeleteOnFetchRejection:z=this.noDeleteOnFetchRejection,fetchContext:B=this.fetchContext,forceRefresh:N=!1}={}){if(!this.fetchMethod)return this.get(d,{allowStale:I,updateAgeOnGet:$,noDeleteOnStaleGet:q});const P={allowStale:I,updateAgeOnGet:$,noDeleteOnStaleGet:q,ttl:m,noDisposeOnSet:y,size:C,sizeCalculation:_,noUpdateTTL:L,noDeleteOnFetchRejection:z};let W=this.keyMap.get(d);if(W===void 0){const O=this.backgroundFetch(d,W,P,B);return O.__returned=O}{const O=this.valList[W];if(this.isBackgroundFetch(O))return I&&O.__staleWhileFetching!==void 0?O.__staleWhileFetching:O.__returned=O;if(!N&&!this.isStale(W))return this.moveToTail(W),$&&this.updateItemAge(W),O;const p=this.backgroundFetch(d,W,P,B);return I&&p.__staleWhileFetching!==void 0?p.__staleWhileFetching:p.__returned=p}}get(d,{allowStale:I=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:q=this.noDeleteOnStaleGet}={}){const m=this.keyMap.get(d);if(m!==void 0){const y=this.valList[m],C=this.isBackgroundFetch(y);return this.isStale(m)?C?I?y.__staleWhileFetching:void 0:(q||this.delete(d),I?y:void 0):C?void 0:(this.moveToTail(m),$&&this.updateItemAge(m),y)}}connect(d,I){this.prev[I]=d,this.next[d]=I}moveToTail(d){d!==this.tail&&(d===this.head?this.head=this.next[d]:this.connect(this.prev[d],this.next[d]),this.connect(this.tail,d),this.tail=d)}get del(){return E("del","delete"),this.delete}delete(d){let I=!1;if(this.size!==0){const $=this.keyMap.get(d);if($!==void 0)if(I=!0,this.size===1)this.clear();else{this.removeItemSize($);const q=this.valList[$];this.isBackgroundFetch(q)?q.__abortController.abort():(this.dispose(q,d,"delete"),this.disposeAfter&&this.disposed.push([q,d,"delete"])),this.keyMap.delete(d),this.keyList[$]=null,this.valList[$]=null,$===this.tail?this.tail=this.prev[$]:$===this.head?this.head=this.next[$]:(this.next[this.prev[$]]=this.next[$],this.prev[this.next[$]]=this.prev[$]),this.size--,this.free.push($)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return I}clear(){for(const d of this.rindexes({allowStale:!0})){const I=this.valList[d];if(this.isBackgroundFetch(I))I.__abortController.abort();else{const $=this.keyList[d];this.dispose(I,$,"delete"),this.disposeAfter&&this.disposed.push([I,$,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return E("reset","clear"),this.clear}get length(){return((d,I)=>{const $=`LRU_CACHE_PROPERTY_${d}`;if(h($)){const{prototype:q}=M,{get:m}=Object.getOwnPropertyDescriptor(q,d);g($,`${d} property`,`cache.${I}`,m)}})("length","size"),this.size}static get AbortController(){return s}static get AbortSignal(){return c}}e.exports=M}).call(this,n(2))},function(e,t,n){var r=n(41).Colorizer;e.exports=function(i){return r.addColors(i.colors||i),i}},function(e,t,n){var r={};e.exports=r,r.themes={};var i=n(13),s=r.styles=n(109),l=Object.defineProperties,o=new RegExp(/[\r\n]+/g);r.supportsColor=n(110).supportsColor,r.enabled===void 0&&(r.enabled=r.supportsColor()!==!1),r.enable=function(){r.enabled=!0},r.disable=function(){r.enabled=!1},r.stripColors=r.strip=function(R){return(""+R).replace(/\x1B\[\d+m/g,"")},r.stylize=function(R,x){return r.enabled?s[x].open+R+s[x].close:R+""};var c=/[|\\{}()[\]^$+*?.]/g;function u(R){var x=function F(){return h.apply(F,arguments)};return x._styles=R,x.__proto__=w,x}var f,E=(f={},s.grey=s.gray,Object.keys(s).forEach(function(R){s[R].closeRe=new RegExp(function(x){if(typeof x!="string")throw new TypeError("Expected a string");return x.replace(c,"\\$&")}(s[R].close),"g"),f[R]={get:function(){return u(this._styles.concat(R))}}}),f),w=l(function(){},E);function h(){var R=Array.prototype.slice.call(arguments),x=R.map(function(I){return I!==void 0&&I.constructor===String?I:i.inspect(I)}).join(" ");if(!r.enabled||!x)return x;for(var F=x.indexOf(`
40
+ `)!=-1,M=this._styles,A=M.length;A--;){var d=s[M[A]];x=d.open+x.replace(d.closeRe,d.open)+d.close,F&&(x=x.replace(o,function(I){return d.close+I+d.open}))}return x}r.setTheme=function(R){if(typeof R!="string")for(var x in R)(function(F){r[F]=function(M){if(typeof R[F]=="object"){var A=M;for(var d in R[F])A=r[R[F][d]](A);return A}return r[R[F]](M)}})(x);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var g=function(R,x){var F=x.split("");return(F=F.map(R)).join("")};for(var b in r.trap=n(112),r.zalgo=n(113),r.maps={},r.maps.america=n(114)(r),r.maps.zebra=n(115)(r),r.maps.rainbow=n(116)(r),r.maps.random=n(117)(r),r.maps)(function(R){r[R]=function(x){return g(r.maps[R],x)}})(b);l(r,function(){var R={};return Object.keys(E).forEach(function(x){R[x]={get:function(){return u([x])}}}),R}())},function(e,t){e.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(n,r){n.super_=r;var i=function(){};i.prototype=r.prototype,n.prototype=new i,n.prototype.constructor=n}},function(e,t){var n={};e.exports=n;var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(r).forEach(function(i){var s=r[i],l=n[i]=[];l.open="\x1B["+s[0]+"m",l.close="\x1B["+s[1]+"m"})},function(e,t,n){(function(r){var i=n(18),s=n(111),l=r.env,o=void 0;function c(u){return function(f){return f!==0&&{level:f,hasBasic:!0,has256:f>=2,has16m:f>=3}}(function(f){if(o===!1)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(f&&!f.isTTY&&o!==!0)return 0;var E=o?1:0;if(r.platform==="win32"){var w=i.release().split(".");return Number(r.versions.node.split(".")[0])>=8&&Number(w[0])>=10&&Number(w[2])>=10586?Number(w[2])>=14931?3:2:1}return"CI"in l?["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(h){return h in l})||l.CI_NAME==="codeship"?1:E:"TEAMCITY_VERSION"in l?/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION)?1:0:"TERM_PROGRAM"in l?(parseInt("445".split(".")[0],10),2):/-256(color)?$/i.test("xterm-256color")?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test("xterm-256color")||"COLORTERM"in l?1:E}(u))}s("no-color")||s("no-colors")||s("color=false")?o=!1:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(o=!0),"FORCE_COLOR"in l&&(o=l.FORCE_COLOR.length===0||parseInt(l.FORCE_COLOR,10)!==0),e.exports={supportsColor:c,stdout:c(r.stdout),stderr:c(r.stderr)}}).call(this,n(2))},function(e,t,n){(function(r){e.exports=function(i,s){var l=(s=s||r.argv).indexOf("--"),o=/^-{1,2}/.test(i)?"":"--",c=s.indexOf(o+i);return c!==-1&&(l===-1||c<l)}}).call(this,n(2))},function(e,t){e.exports=function(n,r){var i="";n=(n=n||"Run the trap, drop the bass").split("");var s={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ",""],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:[""],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ",""],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝",""],p:["Ƿ","Ҏ"],q:[""],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ",""],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return n.forEach(function(l){l=l.toLowerCase();var o=s[l]||[" "],c=Math.floor(Math.random()*o.length);i+=s[l]!==void 0?s[l][c]:l}),i}},function(e,t){e.exports=function(n,r){n=n||" he is here ";var i={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},s=[].concat(i.up,i.down,i.mid);function l(c){return Math.floor(Math.random()*c)}function o(c){var u=!1;return s.filter(function(f){u=f===c}),u}return function(c,u){var f,E,w="";for(E in(u=u||{}).up=u.up===void 0||u.up,u.mid=u.mid===void 0||u.mid,u.down=u.down===void 0||u.down,u.size=u.size!==void 0?u.size:"maxi",c=c.split(""))if(!o(E)){switch(w+=c[E],f={up:0,down:0,mid:0},u.size){case"mini":f.up=l(8),f.mid=l(2),f.down=l(8);break;case"maxi":f.up=l(16)+3,f.mid=l(4)+1,f.down=l(64)+3;break;default:f.up=l(8)+1,f.mid=l(6)/2,f.down=l(8)+1}var h=["up","mid","down"];for(var g in h)for(var b=h[g],R=0;R<=f[b];R++)u[b]&&(w+=i[b][l(i[b].length)])}return w}(n,r)}},function(e,t){e.exports=function(n){return function(r,i,s){if(r===" ")return r;switch(i%3){case 0:return n.red(r);case 1:return n.white(r);case 2:return n.blue(r)}}}},function(e,t){e.exports=function(n){return function(r,i,s){return i%2==0?r:n.inverse(r)}}},function(e,t){e.exports=function(n){var r=["red","yellow","green","blue","magenta"];return function(i,s,l){return i===" "?i:n[r[s++%r.length]](i)}}},function(e,t){e.exports=function(n){var r=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(i,s,l){return i===" "?i:n[r[Math.round(Math.random()*(r.length-2))]](i)}}},function(e,t,n){Object.defineProperty(t,"cli",{value:n(119)}),Object.defineProperty(t,"npm",{value:n(120)}),Object.defineProperty(t,"syslog",{value:n(121)})},function(e,t,n){t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},function(e,t,n){t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},function(e,t,n){t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},function(e,t,n){var r=n(12);e.exports=r(function(i){return i.message=" ".concat(i.message),i})},function(e,t,n){function r(E,w){if(!(E instanceof w))throw new TypeError("Cannot call a class as a function")}function i(E,w){for(var h=0;h<w.length;h++){var g=w[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}var s=n(41).Colorizer,l=n(60).Padder,o=n(3),c=o.configs,u=o.MESSAGE,f=function(){function E(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,E),g.levels||(g.levels=c.npm.levels),this.colorizer=new s(g),this.padder=new l(g),this.options=g}var w,h;return w=E,(h=[{key:"transform",value:function(g,b){return this.colorizer.transform(this.padder.transform(g,b),b),g[u]="".concat(g.level,":").concat(g.message),g}}])&&i(w.prototype,h),E}();e.exports=function(E){return new f(E)},e.exports.Format=f},function(e,t,n){var r=n(12);function i(l){if(l.every(s))return function(o){for(var c=o,u=0;u<l.length;u++)if(!(c=l[u].transform(c,l[u].options)))return!1;return c}}function s(l){if(typeof l.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
41
+ `));return!0}e.exports=function(){for(var l=arguments.length,o=new Array(l),c=0;c<l;c++)o[c]=arguments[c];var u=r(i(o)),f=u();return f.Format=u.Format,f},e.exports.cascade=i},function(e,t,n){(function(r){var i=n(12),s=n(3).MESSAGE,l=n(35);function o(c,u){return u instanceof r?u.toString("base64"):typeof u=="bigint"?u.toString():u}e.exports=i(function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return c[s]=(u.stable?l.stableStringify:l)(c,u.replacer||o,u.space),c})}).call(this,n(5).Buffer)},function(e,t,n){t.byteLength=function(E){var w=u(E),h=w[0],g=w[1];return 3*(h+g)/4-g},t.toByteArray=function(E){for(var w,h=u(E),g=h[0],b=h[1],R=new s(function(A,d,I){return 3*(d+I)/4-I}(0,g,b)),x=0,F=b>0?g-4:g,M=0;M<F;M+=4)w=i[E.charCodeAt(M)]<<18|i[E.charCodeAt(M+1)]<<12|i[E.charCodeAt(M+2)]<<6|i[E.charCodeAt(M+3)],R[x++]=w>>16&255,R[x++]=w>>8&255,R[x++]=255&w;return b===2&&(w=i[E.charCodeAt(M)]<<2|i[E.charCodeAt(M+1)]>>4,R[x++]=255&w),b===1&&(w=i[E.charCodeAt(M)]<<10|i[E.charCodeAt(M+1)]<<4|i[E.charCodeAt(M+2)]>>2,R[x++]=w>>8&255,R[x++]=255&w),R},t.fromByteArray=function(E){for(var w,h=E.length,g=h%3,b=[],R=0,x=h-g;R<x;R+=16383)b.push(f(E,R,R+16383>x?x:R+16383));return g===1?(w=E[h-1],b.push(r[w>>2]+r[w<<4&63]+"==")):g===2&&(w=(E[h-2]<<8)+E[h-1],b.push(r[w>>10]+r[w>>4&63]+r[w<<2&63]+"=")),b.join("")};for(var r=[],i=[],s=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,c=l.length;o<c;++o)r[o]=l[o],i[l.charCodeAt(o)]=o;function u(E){var w=E.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=E.indexOf("=");return h===-1&&(h=w),[h,h===w?0:4-h%4]}function f(E,w,h){for(var g,b,R=[],x=w;x<h;x+=3)g=(E[x]<<16&16711680)+(E[x+1]<<8&65280)+(255&E[x+2]),R.push(r[(b=g)>>18&63]+r[b>>12&63]+r[b>>6&63]+r[63&b]);return R.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(n,r,i,s,l){var o,c,u=8*l-s-1,f=(1<<u)-1,E=f>>1,w=-7,h=i?l-1:0,g=i?-1:1,b=n[r+h];for(h+=g,o=b&(1<<-w)-1,b>>=-w,w+=u;w>0;o=256*o+n[r+h],h+=g,w-=8);for(c=o&(1<<-w)-1,o>>=-w,w+=s;w>0;c=256*c+n[r+h],h+=g,w-=8);if(o===0)o=1-E;else{if(o===f)return c?NaN:1/0*(b?-1:1);c+=Math.pow(2,s),o-=E}return(b?-1:1)*c*Math.pow(2,o-s)},t.write=function(n,r,i,s,l,o){var c,u,f,E=8*o-l-1,w=(1<<E)-1,h=w>>1,g=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=s?0:o-1,R=s?1:-1,x=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,c=w):(c=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-c))<1&&(c--,f*=2),(r+=c+h>=1?g/f:g*Math.pow(2,1-h))*f>=2&&(c++,f/=2),c+h>=w?(u=0,c=w):c+h>=1?(u=(r*f-1)*Math.pow(2,l),c+=h):(u=r*Math.pow(2,h-1)*Math.pow(2,l),c=0));l>=8;n[i+b]=255&u,b+=R,u/=256,l-=8);for(c=c<<l|u,E+=l;E>0;n[i+b]=255&c,b+=R,c/=256,E-=8);n[i+b-R]|=128*x}},function(e,t,n){var r=n(12);e.exports=r(function(i,s){return s.message?(i.message="[".concat(s.label,"] ").concat(i.message),i):(i.label=s.label,i)})},function(e,t,n){var r=n(12),i=n(3).MESSAGE,s=n(35);e.exports=r(function(l){var o={};return l.message&&(o["@message"]=l.message,delete l.message),l.timestamp&&(o["@timestamp"]=l.timestamp,delete l.timestamp),o["@fields"]=l,l[i]=s(o),l})},function(e,t,n){var r=n(12);function i(l,o,c){var u,f,E,w=o.reduce(function(g,b){return g[b]=l[b],delete l[b],g},{}),h=Object.keys(l).reduce(function(g,b){return g[b]=l[b],delete l[b],g},{});return Object.assign(l,w,(E=h,(f=c)in(u={})?Object.defineProperty(u,f,{value:E,enumerable:!0,configurable:!0,writable:!0}):u[f]=E,u)),l}function s(l,o,c){return l[c]=o.reduce(function(u,f){return u[f]=l[f],delete l[f],u},{}),l}e.exports=r(function(l){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c="metadata";o.key&&(c=o.key);var u=[];return o.fillExcept||o.fillWith||(u.push("level"),u.push("message")),o.fillExcept&&(u=o.fillExcept),u.length>0?i(l,u,c):o.fillWith?s(l,o.fillWith,c):l})},function(e,t,n){var r=n(13).inspect,i=n(12),s=n(3),l=s.LEVEL,o=s.MESSAGE,c=s.SPLAT;e.exports=i(function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=Object.assign({},u);return delete E[l],delete E[o],delete E[c],u[o]=r(E,!1,f.depth||null,f.colorize),u})},function(e,t,n){function r(l,o){for(var c=0;c<o.length;c++){var u=o[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}var i=n(3).MESSAGE,s=function(){function l(u){(function(f,E){if(!(f instanceof E))throw new TypeError("Cannot call a class as a function")})(this,l),this.template=u}var o,c;return o=l,(c=[{key:"transform",value:function(u){return u[i]=this.template(u),u}}])&&r(o.prototype,c),l}();e.exports=function(l){return new s(l)},e.exports.Printf=e.exports.Format=s},function(e,t,n){var r=n(12),i=n(3).MESSAGE,s=n(35);e.exports=r(function(l){var o=s(Object.assign({},l,{level:void 0,message:void 0,splat:void 0})),c=l.padding&&l.padding[l.level]||"";return l[i]=o!=="{}"?"".concat(l.level,":").concat(c," ").concat(l.message," ").concat(o):"".concat(l.level,":").concat(c," ").concat(l.message),l})},function(e,t,n){function r(E){return function(w){if(Array.isArray(w))return i(w)}(E)||function(w){if(typeof Symbol<"u"&&Symbol.iterator in Object(w))return Array.from(w)}(E)||function(w,h){if(w){if(typeof w=="string")return i(w,h);var g=Object.prototype.toString.call(w).slice(8,-1);if(g==="Object"&&w.constructor&&(g=w.constructor.name),g==="Map"||g==="Set")return Array.from(w);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return i(w,h)}}(E)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(E,w){(w==null||w>E.length)&&(w=E.length);for(var h=0,g=new Array(w);h<w;h++)g[h]=E[h];return g}function s(E,w){for(var h=0;h<w.length;h++){var g=w[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}var l=n(13),o=n(3).SPLAT,c=/%[scdjifoO%]/g,u=/%%/g,f=function(){function E(g){(function(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")})(this,E),this.options=g}var w,h;return w=E,(h=[{key:"_splat",value:function(g,b){var R=g.message,x=g[o]||g.splat||[],F=R.match(u),M=F&&F.length||0,A=b.length-M-x.length,d=A<0?x.splice(A,-1*A):[],I=d.length;if(I)for(var $=0;$<I;$++)Object.assign(g,d[$]);return g.message=l.format.apply(l,[R].concat(r(x))),g}},{key:"transform",value:function(g){var b=g.message,R=g[o]||g.splat;if(!R||!R.length)return g;var x=b&&b.match&&b.match(c);if(!x&&(R||R.length)){var F=R.length>1?R.splice(0):R,M=F.length;if(M)for(var A=0;A<M;A++)Object.assign(g,F[A]);return g}return x?this._splat(g,x):g}}])&&s(w.prototype,h),E}();e.exports=function(E){return new f(E)}},function(e,t,n){var r=n(136),i=n(12);e.exports=i(function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return l.format&&(s.timestamp=typeof l.format=="function"?l.format():r.format(new Date,l.format)),s.timestamp||(s.timestamp=new Date().toISOString()),l.alias&&(s[l.alias]=s.timestamp),s})},function(e,t,n){n.r(t),n.d(t,"assign",function(){return c}),n.d(t,"format",function(){return y}),n.d(t,"parse",function(){return C}),n.d(t,"defaultI18n",function(){return w}),n.d(t,"setGlobalDateI18n",function(){return g}),n.d(t,"setGlobalDateMasks",function(){return m});var r=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,i="[^\\s]+",s=/\[([^]*?)\]/gm;function l(L,z){for(var B=[],N=0,P=L.length;N<P;N++)B.push(L[N].substr(0,z));return B}var o=function(L){return function(z,B){var N=B[L].map(function(P){return P.toLowerCase()}).indexOf(z.toLowerCase());return N>-1?N:null}};function c(L){for(var z=[],B=1;B<arguments.length;B++)z[B-1]=arguments[B];for(var N=0,P=z;N<P.length;N++){var W=P[N];for(var O in W)L[O]=W[O]}return L}var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"],E=l(f,3),w={dayNamesShort:l(u,3),dayNames:u,monthNamesShort:E,monthNames:f,amPm:["am","pm"],DoFn:function(L){return L+["th","st","nd","rd"][L%10>3?0:(L-L%10!=10?1:0)*L%10]}},h=c({},w),g=function(L){return h=c(h,L)},b=function(L){return L.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(L,z){for(z===void 0&&(z=2),L=String(L);L.length<z;)L="0"+L;return L},x={D:function(L){return String(L.getDate())},DD:function(L){return R(L.getDate())},Do:function(L,z){return z.DoFn(L.getDate())},d:function(L){return String(L.getDay())},dd:function(L){return R(L.getDay())},ddd:function(L,z){return z.dayNamesShort[L.getDay()]},dddd:function(L,z){return z.dayNames[L.getDay()]},M:function(L){return String(L.getMonth()+1)},MM:function(L){return R(L.getMonth()+1)},MMM:function(L,z){return z.monthNamesShort[L.getMonth()]},MMMM:function(L,z){return z.monthNames[L.getMonth()]},YY:function(L){return R(String(L.getFullYear()),4).substr(2)},YYYY:function(L){return R(L.getFullYear(),4)},h:function(L){return String(L.getHours()%12||12)},hh:function(L){return R(L.getHours()%12||12)},H:function(L){return String(L.getHours())},HH:function(L){return R(L.getHours())},m:function(L){return String(L.getMinutes())},mm:function(L){return R(L.getMinutes())},s:function(L){return String(L.getSeconds())},ss:function(L){return R(L.getSeconds())},S:function(L){return String(Math.round(L.getMilliseconds()/100))},SS:function(L){return R(Math.round(L.getMilliseconds()/10),2)},SSS:function(L){return R(L.getMilliseconds(),3)},a:function(L,z){return L.getHours()<12?z.amPm[0]:z.amPm[1]},A:function(L,z){return L.getHours()<12?z.amPm[0].toUpperCase():z.amPm[1].toUpperCase()},ZZ:function(L){var z=L.getTimezoneOffset();return(z>0?"-":"+")+R(100*Math.floor(Math.abs(z)/60)+Math.abs(z)%60,4)},Z:function(L){var z=L.getTimezoneOffset();return(z>0?"-":"+")+R(Math.floor(Math.abs(z)/60),2)+":"+R(Math.abs(z)%60,2)}},F=function(L){return+L-1},M=[null,"[1-9]\\d?"],A=[null,i],d=["isPm",i,function(L,z){var B=L.toLowerCase();return B===z.amPm[0]?0:B===z.amPm[1]?1:null}],I=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(L){var z=(L+"").match(/([+-]|\d\d)/gi);if(z){var B=60*+z[1]+parseInt(z[2],10);return z[0]==="+"?B:-B}return 0}],$={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+i,function(L){return parseInt(L,10)}],M:["month","[1-9]\\d?",F],MM:["month","\\d\\d",F],YY:["year","\\d\\d",function(L){var z=+(""+new Date().getFullYear()).substr(0,2);return+(""+(+L>68?z-1:z)+L)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(L){return 100*+L}],SS:["millisecond","\\d\\d",function(L){return 10*+L}],SSS:["millisecond","\\d{3}"],d:M,dd:M,ddd:A,dddd:A,MMM:["month",i,o("monthNamesShort")],MMMM:["month",i,o("monthNames")],a:d,A:d,ZZ:I,Z:I},q={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},m=function(L){return c(q,L)},y=function(L,z,B){if(z===void 0&&(z=q.default),B===void 0&&(B={}),typeof L=="number"&&(L=new Date(L)),Object.prototype.toString.call(L)!=="[object Date]"||isNaN(L.getTime()))throw new Error("Invalid Date pass to format");var N=[];z=(z=q[z]||z).replace(s,function(W,O){return N.push(O),"@@@"});var P=c(c({},h),B);return(z=z.replace(r,function(W){return x[W](L,P)})).replace(/@@@/g,function(){return N.shift()})};function C(L,z,B){if(B===void 0&&(B={}),typeof z!="string")throw new Error("Invalid format in fecha parse");if(z=q[z]||z,L.length>1e3)return null;var N={year:new Date().getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},P=[],W=[],O=z.replace(s,function(K,re){return W.push(b(re)),"@@@"}),p={},U={};O=b(O).replace(r,function(K){var re=$[K],se=re[0],fe=re[1],ve=re[3];if(p[se])throw new Error("Invalid format. "+se+" specified twice in format");return p[se]=!0,ve&&(U[ve]=!0),P.push(re),"("+fe+")"}),Object.keys(U).forEach(function(K){if(!p[K])throw new Error("Invalid format. "+K+" is required in specified format")}),O=O.replace(/@@@/g,function(){return W.shift()});var V=L.match(new RegExp(O,"i"));if(!V)return null;for(var Q=c(c({},h),B),ee=1;ee<V.length;ee++){var ne=P[ee-1],Y=ne[0],G=ne[2],S=G?G(V[ee],Q):+V[ee];if(S==null)return null;N[Y]=S}N.isPm===1&&N.hour!=null&&+N.hour!=12?N.hour=+N.hour+12:N.isPm===0&&+N.hour==12&&(N.hour=0);for(var T=new Date(N.year,N.month,N.day,N.hour,N.minute,N.second,N.millisecond),k=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],J=(ee=0,k.length);ee<J;ee++)if(p[k[ee][0]]&&N[k[ee][0]]!==T[k[ee][1]]())return null;return N.timezoneOffset==null?T:new Date(Date.UTC(N.year,N.month,N.day,N.hour,N.minute-N.timezoneOffset,N.second,N.millisecond))}var _={format:y,parse:C,defaultI18n:w,setGlobalDateI18n:g,setGlobalDateMasks:m};t.default=_},function(e,t,n){var r=n(59),i=n(12),s=n(3).MESSAGE;e.exports=i(function(l,o){return o.level!==!1&&(l.level=r.strip(l.level)),o.message!==!1&&(l.message=r.strip(l.message)),o.raw!==!1&&l[s]&&(l[s]=r.strip(l[s])),l})},function(e){e.exports=JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.3.3","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["Jarrett Cruger <jcrugzz@gmail.com>","Chris Alderson <chrisalderson@protonmail.com>","David Hyde <dabh@stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"async":"^3.1.0","@dabh/diagnostics":"^2.0.2","is-stream":"^2.0.0","logform":"^2.2.0","one-time":"^1.0.0","readable-stream":"^3.4.0","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.4.0"},"devDependencies":{"@babel/cli":"^7.10.3","@babel/core":"^7.10.3","@babel/preset-env":"^7.10.3","@types/node":"^14.0.13","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","colors":"^1.4.0","cross-spawn-async":"^2.2.5","eslint-config-populist":"^4.2.0","hock":"^1.4.1","mocha":"^8.0.1","nyc":"^15.1.0","rimraf":"^3.0.2","split2":"^3.1.1","std-mocks":"^1.0.1","through2":"^3.0.1","winston-compat":"^0.1.5"},"main":"./lib/winston","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"populist lib/*.js lib/winston/*.js lib/winston/**/*.js","pretest":"npm run lint","test":"nyc --reporter=text --reporter lcov npm run test:mocha","test:mocha":"mocha test/*.test.js test/**/*.test.js --exit","build":"./node_modules/.bin/rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 6.4.0"},"license":"MIT"}')},function(e,t,n){Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:function(){return n(140)}}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:function(){return n(149)}}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:function(){return n(189)}}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:function(){return n(201)}})},function(e,t,n){(function(r){function i(R){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(R)}function s(R,x){if(!(R instanceof x))throw new TypeError("Cannot call a class as a function")}function l(R,x){for(var F=0;F<x.length;F++){var M=x[F];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(R,M.key,M)}}function o(R,x){return(o=Object.setPrototypeOf||function(F,M){return F.__proto__=M,F})(R,x)}function c(R){var x=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var F,M=f(R);if(x){var A=f(this).constructor;F=Reflect.construct(M,arguments,A)}else F=M.apply(this,arguments);return u(this,F)}}function u(R,x){return!x||i(x)!=="object"&&typeof x!="function"?function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}(R):x}function f(R){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)})(R)}var E=n(18),w=n(3),h=w.LEVEL,g=w.MESSAGE,b=n(20);e.exports=function(R){(function(d,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(I&&I.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),I&&o(d,I)})(A,R);var x,F,M=c(A);function A(){var d,I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return s(this,A),(d=M.call(this,I)).name=I.name||"console",d.stderrLevels=d._stringArrayToSet(I.stderrLevels),d.consoleWarnLevels=d._stringArrayToSet(I.consoleWarnLevels),d.eol=I.eol||E.EOL,d.setMaxListeners(30),d}return x=A,(F=[{key:"log",value:function(d,I){var $=this;return r(function(){return $.emit("logged",d)}),this.stderrLevels[d[h]]?(console._stderr?console._stderr.write("".concat(d[g]).concat(this.eol)):console.error(d[g]),void(I&&I())):this.consoleWarnLevels[d[h]]?(console._stderr?console._stderr.write("".concat(d[g]).concat(this.eol)):console.warn(d[g]),void(I&&I())):(console._stdout?console._stdout.write("".concat(d[g]).concat(this.eol)):console.log(d[g]),void(I&&I()))}},{key:"_stringArrayToSet",value:function(d,I){if(!d)return{};if(I=I||"Cannot make set from type other than Array of string elements",!Array.isArray(d))throw new Error(I);return d.reduce(function($,q){if(typeof q!="string")throw new Error(I);return $[q]=!0,$},{})}}])&&l(x.prototype,F),A}(b)}).call(this,n(15).setImmediate)},function(e,t,n){(function(r,i){(function(s,l){if(!s.setImmediate){var o,c,u,f,E,w=1,h={},g=!1,b=s.document,R=Object.getPrototypeOf&&Object.getPrototypeOf(s);R=R&&R.setTimeout?R:s,{}.toString.call(s.process)==="[object process]"?o=function(M){i.nextTick(function(){F(M)})}:function(){if(s.postMessage&&!s.importScripts){var M=!0,A=s.onmessage;return s.onmessage=function(){M=!1},s.postMessage("","*"),s.onmessage=A,M}}()?(f="setImmediate$"+Math.random()+"$",E=function(M){M.source===s&&typeof M.data=="string"&&M.data.indexOf(f)===0&&F(+M.data.slice(f.length))},s.addEventListener?s.addEventListener("message",E,!1):s.attachEvent("onmessage",E),o=function(M){s.postMessage(f+M,"*")}):s.MessageChannel?((u=new MessageChannel).port1.onmessage=function(M){F(M.data)},o=function(M){u.port2.postMessage(M)}):b&&"onreadystatechange"in b.createElement("script")?(c=b.documentElement,o=function(M){var A=b.createElement("script");A.onreadystatechange=function(){F(M),A.onreadystatechange=null,c.removeChild(A),A=null},c.appendChild(A)}):o=function(M){setTimeout(F,0,M)},R.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var A=new Array(arguments.length-1),d=0;d<A.length;d++)A[d]=arguments[d+1];var I={callback:M,args:A};return h[w]=I,o(w),w++},R.clearImmediate=x}function x(M){delete h[M]}function F(M){if(g)setTimeout(F,0,M);else{var A=h[M];if(A){g=!0;try{(function(d){var I=d.callback,$=d.args;switch($.length){case 0:I();break;case 1:I($[0]);break;case 2:I($[0],$[1]);break;case 3:I($[0],$[1],$[2]);break;default:I.apply(void 0,$)}})(A)}finally{x(M),g=!1}}}}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,n(6),n(2))},function(e,t,n){e.exports=n(62)},function(e,t,n){(function(r,i){var s=n(16);e.exports=A;var l,o=n(42);A.ReadableState=M,n(21).EventEmitter;var c=function(O,p){return O.listeners(p).length},u=n(63),f=n(44).Buffer,E=r.Uint8Array||function(){},w=Object.create(n(17));w.inherits=n(7);var h=n(144),g=void 0;g=h&&h.debuglog?h.debuglog("stream"):function(){};var b,R=n(145),x=n(64);w.inherits(A,u);var F=["error","close","destroy","pause","resume"];function M(O,p){O=O||{};var U=p instanceof(l=l||n(36));this.objectMode=!!O.objectMode,U&&(this.objectMode=this.objectMode||!!O.readableObjectMode);var V=O.highWaterMark,Q=O.readableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=V||V===0?V:U&&(Q||Q===0)?Q:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(b||(b=n(22).StringDecoder),this.decoder=new b(O.encoding),this.encoding=O.encoding)}function A(O){if(l=l||n(36),!(this instanceof A))return new A(O);this._readableState=new M(O,this),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),u.call(this)}function d(O,p,U,V,Q){var ee,ne=O._readableState;return p===null?(ne.reading=!1,function(Y,G){if(!G.ended){if(G.decoder){var S=G.decoder.end();S&&S.length&&(G.buffer.push(S),G.length+=G.objectMode?1:S.length)}G.ended=!0,q(Y)}}(O,ne)):(Q||(ee=function(Y,G){var S;T=G,f.isBuffer(T)||T instanceof E||typeof G=="string"||G===void 0||Y.objectMode||(S=new TypeError("Invalid non-string/buffer chunk"));var T;return S}(ne,p)),ee?O.emit("error",ee):ne.objectMode||p&&p.length>0?(typeof p=="string"||ne.objectMode||Object.getPrototypeOf(p)===f.prototype||(p=function(Y){return f.from(Y)}(p)),V?ne.endEmitted?O.emit("error",new Error("stream.unshift() after end event")):I(O,ne,p,!0):ne.ended?O.emit("error",new Error("stream.push() after EOF")):(ne.reading=!1,ne.decoder&&!U?(p=ne.decoder.write(p),ne.objectMode||p.length!==0?I(O,ne,p,!1):y(O,ne)):I(O,ne,p,!1))):V||(ne.reading=!1)),function(Y){return!Y.ended&&(Y.needReadable||Y.length<Y.highWaterMark||Y.length===0)}(ne)}function I(O,p,U,V){p.flowing&&p.length===0&&!p.sync?(O.emit("data",U),O.read(0)):(p.length+=p.objectMode?1:U.length,V?p.buffer.unshift(U):p.buffer.push(U),p.needReadable&&q(O)),y(O,p)}Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(O){this._readableState&&(this._readableState.destroyed=O)}}),A.prototype.destroy=x.destroy,A.prototype._undestroy=x.undestroy,A.prototype._destroy=function(O,p){this.push(null),p(O)},A.prototype.push=function(O,p){var U,V=this._readableState;return V.objectMode?U=!0:typeof O=="string"&&((p=p||V.defaultEncoding)!==V.encoding&&(O=f.from(O,p),p=""),U=!0),d(this,O,p,!1,U)},A.prototype.unshift=function(O){return d(this,O,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(O){return b||(b=n(22).StringDecoder),this._readableState.decoder=new b(O),this._readableState.encoding=O,this};function $(O,p){return O<=0||p.length===0&&p.ended?0:p.objectMode?1:O!=O?p.flowing&&p.length?p.buffer.head.data.length:p.length:(O>p.highWaterMark&&(p.highWaterMark=function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(O)),O<=p.length?O:p.ended?p.length:(p.needReadable=!0,0))}function q(O){var p=O._readableState;p.needReadable=!1,p.emittedReadable||(g("emitReadable",p.flowing),p.emittedReadable=!0,p.sync?s.nextTick(m,O):m(O))}function m(O){g("emit readable"),O.emit("readable"),z(O)}function y(O,p){p.readingMore||(p.readingMore=!0,s.nextTick(C,O,p))}function C(O,p){for(var U=p.length;!p.reading&&!p.flowing&&!p.ended&&p.length<p.highWaterMark&&(g("maybeReadMore read 0"),O.read(0),U!==p.length);)U=p.length;p.readingMore=!1}function _(O){g("readable nexttick read 0"),O.read(0)}function L(O,p){p.reading||(g("resume read 0"),O.read(0)),p.resumeScheduled=!1,p.awaitDrain=0,O.emit("resume"),z(O),p.flowing&&!p.reading&&O.read(0)}function z(O){var p=O._readableState;for(g("flow",p.flowing);p.flowing&&O.read()!==null;);}function B(O,p){return p.length===0?null:(p.objectMode?U=p.buffer.shift():!O||O>=p.length?(U=p.decoder?p.buffer.join(""):p.buffer.length===1?p.buffer.head.data:p.buffer.concat(p.length),p.buffer.clear()):U=function(V,Q,ee){var ne;return V<Q.head.data.length?(ne=Q.head.data.slice(0,V),Q.head.data=Q.head.data.slice(V)):ne=V===Q.head.data.length?Q.shift():ee?function(Y,G){var S=G.head,T=1,k=S.data;for(Y-=k.length;S=S.next;){var J=S.data,K=Y>J.length?J.length:Y;if(K===J.length?k+=J:k+=J.slice(0,Y),(Y-=K)===0){K===J.length?(++T,S.next?G.head=S.next:G.head=G.tail=null):(G.head=S,S.data=J.slice(K));break}++T}return G.length-=T,k}(V,Q):function(Y,G){var S=f.allocUnsafe(Y),T=G.head,k=1;for(T.data.copy(S),Y-=T.data.length;T=T.next;){var J=T.data,K=Y>J.length?J.length:Y;if(J.copy(S,S.length-Y,0,K),(Y-=K)===0){K===J.length?(++k,T.next?G.head=T.next:G.head=G.tail=null):(G.head=T,T.data=J.slice(K));break}++k}return G.length-=k,S}(V,Q),ne}(O,p.buffer,p.decoder),U);var U}function N(O){var p=O._readableState;if(p.length>0)throw new Error('"endReadable()" called on non-empty stream');p.endEmitted||(p.ended=!0,s.nextTick(P,p,O))}function P(O,p){O.endEmitted||O.length!==0||(O.endEmitted=!0,p.readable=!1,p.emit("end"))}function W(O,p){for(var U=0,V=O.length;U<V;U++)if(O[U]===p)return U;return-1}A.prototype.read=function(O){g("read",O),O=parseInt(O,10);var p=this._readableState,U=O;if(O!==0&&(p.emittedReadable=!1),O===0&&p.needReadable&&(p.length>=p.highWaterMark||p.ended))return g("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?N(this):q(this),null;if((O=$(O,p))===0&&p.ended)return p.length===0&&N(this),null;var V,Q=p.needReadable;return g("need readable",Q),(p.length===0||p.length-O<p.highWaterMark)&&g("length less than watermark",Q=!0),p.ended||p.reading?g("reading or ended",Q=!1):Q&&(g("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(O=$(U,p))),(V=O>0?B(O,p):null)===null?(p.needReadable=!0,O=0):p.length-=O,p.length===0&&(p.ended||(p.needReadable=!0),U!==O&&p.ended&&N(this)),V!==null&&this.emit("data",V),V},A.prototype._read=function(O){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(O,p){var U=this,V=this._readableState;switch(V.pipesCount){case 0:V.pipes=O;break;case 1:V.pipes=[V.pipes,O];break;default:V.pipes.push(O)}V.pipesCount+=1,g("pipe count=%d opts=%j",V.pipesCount,p);var Q=(!p||p.end!==!1)&&O!==i.stdout&&O!==i.stderr?ne:re;function ee(se,fe){g("onunpipe"),se===U&&fe&&fe.hasUnpiped===!1&&(fe.hasUnpiped=!0,g("cleanup"),O.removeListener("close",J),O.removeListener("finish",K),O.removeListener("drain",Y),O.removeListener("error",k),O.removeListener("unpipe",ee),U.removeListener("end",ne),U.removeListener("end",re),U.removeListener("data",T),G=!0,!V.awaitDrain||O._writableState&&!O._writableState.needDrain||Y())}function ne(){g("onend"),O.end()}V.endEmitted?s.nextTick(Q):U.once("end",Q),O.on("unpipe",ee);var Y=function(se){return function(){var fe=se._readableState;g("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&c(se,"data")&&(fe.flowing=!0,z(se))}}(U);O.on("drain",Y);var G=!1,S=!1;function T(se){g("ondata"),S=!1,O.write(se)!==!1||S||((V.pipesCount===1&&V.pipes===O||V.pipesCount>1&&W(V.pipes,O)!==-1)&&!G&&(g("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,S=!0),U.pause())}function k(se){g("onerror",se),re(),O.removeListener("error",k),c(O,"error")===0&&O.emit("error",se)}function J(){O.removeListener("finish",K),re()}function K(){g("onfinish"),O.removeListener("close",J),re()}function re(){g("unpipe"),U.unpipe(O)}return U.on("data",T),function(se,fe,ve){if(typeof se.prependListener=="function")return se.prependListener(fe,ve);se._events&&se._events[fe]?o(se._events[fe])?se._events[fe].unshift(ve):se._events[fe]=[ve,se._events[fe]]:se.on(fe,ve)}(O,"error",k),O.once("close",J),O.once("finish",K),O.emit("pipe",U),V.flowing||(g("pipe resume"),U.resume()),O},A.prototype.unpipe=function(O){var p=this._readableState,U={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return O&&O!==p.pipes||(O||(O=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,O&&O.emit("unpipe",this,U)),this;if(!O){var V=p.pipes,Q=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var ee=0;ee<Q;ee++)V[ee].emit("unpipe",this,U);return this}var ne=W(p.pipes,O);return ne===-1||(p.pipes.splice(ne,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),O.emit("unpipe",this,U)),this},A.prototype.on=function(O,p){var U=u.prototype.on.call(this,O,p);if(O==="data")this._readableState.flowing!==!1&&this.resume();else if(O==="readable"){var V=this._readableState;V.endEmitted||V.readableListening||(V.readableListening=V.needReadable=!0,V.emittedReadable=!1,V.reading?V.length&&q(this):s.nextTick(_,this))}return U},A.prototype.addListener=A.prototype.on,A.prototype.resume=function(){var O=this._readableState;return O.flowing||(g("resume"),O.flowing=!0,function(p,U){U.resumeScheduled||(U.resumeScheduled=!0,s.nextTick(L,p,U))}(this,O)),this},A.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(O){var p=this,U=this._readableState,V=!1;for(var Q in O.on("end",function(){if(g("wrapped end"),U.decoder&&!U.ended){var ne=U.decoder.end();ne&&ne.length&&p.push(ne)}p.push(null)}),O.on("data",function(ne){g("wrapped data"),U.decoder&&(ne=U.decoder.write(ne)),U.objectMode&&ne==null||(U.objectMode||ne&&ne.length)&&(p.push(ne)||(V=!0,O.pause()))}),O)this[Q]===void 0&&typeof O[Q]=="function"&&(this[Q]=function(ne){return function(){return O[ne].apply(O,arguments)}}(Q));for(var ee=0;ee<F.length;ee++)O.on(F[ee],this.emit.bind(this,F[ee]));return this._read=function(ne){g("wrapped _read",ne),V&&(V=!1,O.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=B}).call(this,n(6),n(2))},function(e,t){},function(e,t,n){var r=n(44).Buffer,i=n(146);e.exports=function(){function s(){(function(l,o){if(!(l instanceof o))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(l){var o={data:l,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},s.prototype.unshift=function(l){var o={data:l,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},s.prototype.shift=function(){if(this.length!==0){var l=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(l){if(this.length===0)return"";for(var o=this.head,c=""+o.data;o=o.next;)c+=l+o.data;return c},s.prototype.concat=function(l){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var o,c,u,f=r.allocUnsafe(l>>>0),E=this.head,w=0;E;)o=E.data,c=f,u=w,o.copy(c,u),w+=E.data.length,E=E.next;return f},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){var r=n(5),i=r.Buffer;function s(o,c){for(var u in o)c[u]=o[u]}function l(o,c,u){return i(o,c,u)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=l),s(i,l),l.from=function(o,c,u){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,c,u)},l.alloc=function(o,c,u){if(typeof o!="number")throw new TypeError("Argument must be a number");var f=i(o);return c!==void 0?typeof u=="string"?f.fill(c,u):f.fill(c):f.fill(0),f},l.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},l.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}},function(e,t,n){var r=n(13),i=n(3).LEVEL,s=n(20),l=e.exports=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(s.call(this,o),!o.transport||typeof o.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");function c(u){this.emit("error",u,this.transport)}this.transport=o.transport,this.level=this.level||o.transport.level,this.handleExceptions=this.handleExceptions||o.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=c.bind(this),this.transport.on("error",this.transport.__winstonError))};r.inherits(l,s),l.prototype._write=function(o,c,u){if(this.silent||o.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[o[i]])&&this.transport.log(o[i],o.message,o,this._nop),u(null)},l.prototype._writev=function(o,c){for(var u=0;u<o.length;u++)this._accept(o[u])&&(this.transport.log(o[u].chunk[i],o[u].chunk.message,o[u].chunk,this._nop),o[u].callback());return c(null)},l.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
43
+ `))},l.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,n){(function(r,i){function s(m){return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(m)}function l(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function o(m,y){for(var C=0;C<y.length;C++){var _=y[C];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}function c(m,y){return(c=Object.setPrototypeOf||function(C,_){return C.__proto__=_,C})(m,y)}function u(m){var y=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var C,_=w(m);if(y){var L=w(this).constructor;C=Reflect.construct(_,arguments,L)}else C=_.apply(this,arguments);return f(this,C)}}function f(m,y){return!y||s(y)!=="object"&&typeof y!="function"?E(m):y}function E(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function w(m){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(m)}var h=n(65),g=n(56),b=n(150),R=n(160),x=n(3).MESSAGE,F=n(32),M=F.Stream,A=F.PassThrough,d=n(20),I=n(38)("winston:file"),$=n(18),q=n(188);e.exports=function(m){(function(z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(B&&B.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),B&&c(z,B)})(L,m);var y,C,_=u(L);function L(){var z,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function N(P){for(var W=arguments.length,O=new Array(W>1?W-1:0),p=1;p<W;p++)O[p-1]=arguments[p];O.slice(1).forEach(function(U){if(B[U])throw new Error("Cannot set ".concat(U," and ").concat(P," together"))})}if(l(this,L),(z=_.call(this,B)).name=B.name||"file",z._stream=new A,z._stream.setMaxListeners(30),z._onError=z._onError.bind(E(z)),B.filename||B.dirname)N("filename or dirname","stream"),z._basename=z.filename=B.filename?g.basename(B.filename):"winston.log",z.dirname=B.dirname||g.dirname(B.filename),z.options=B.options||{flags:"a"};else{if(!B.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),N("stream","filename","maxsize"),z._dest=z._stream.pipe(z._setupStream(B.stream)),z.dirname=g.dirname(z._dest.path)}return z.maxsize=B.maxsize||null,z.rotationFormat=B.rotationFormat||!1,z.zippedArchive=B.zippedArchive||!1,z.maxFiles=B.maxFiles||null,z.eol=B.eol||$.EOL,z.tailable=B.tailable||!1,z._size=0,z._pendingSize=0,z._created=0,z._drain=!1,z._opening=!1,z._ending=!1,z.dirname&&z._createLogDirIfNotExist(z.dirname),z.open(),z}return y=L,(C=[{key:"finishIfEnding",value:function(){var z=this;this._ending&&(this._opening?this.once("open",function(){z._stream.once("finish",function(){return z.emit("finish")}),r(function(){return z._stream.end()})}):(this._stream.once("finish",function(){return z.emit("finish")}),r(function(){return z._stream.end()})))}},{key:"log",value:function(z){var B=this,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};if(this.silent)return N(),!0;if(this._drain)this._stream.once("drain",function(){B._drain=!1,B.log(z,N)});else{if(!this._rotate){var P="".concat(z[x]).concat(this.eol),W=i.byteLength(P);this._pendingSize+=W,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var O=this._stream.write(P,p.bind(this));return O?N():(this._drain=!0,this._stream.once("drain",function(){B._drain=!1,N()})),I("written",O,this._drain),this.finishIfEnding(),O}this._stream.once("rotate",function(){B._rotate=!1,B.log(z,N)})}function p(){var U=this;this._size+=W,this._pendingSize-=W,I("logged %s %s",this._size,P),this.emit("logged",z),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream(function(){return U._rotateFile()}))}}},{key:"query",value:function(z,B){typeof z=="function"&&(B=z,z={}),z=function(V){return(V=V||{}).rows=V.rows||V.limit||10,V.start=V.start||0,V.until=V.until||new Date,s(V.until)!=="object"&&(V.until=new Date(V.until)),V.from=V.from||V.until-864e5,s(V.from)!=="object"&&(V.from=new Date(V.from)),V.order=V.order||"desc",V}(z);var N=g.join(this.dirname,this.filename),P="",W=[],O=0,p=h.createReadStream(N,{encoding:"utf8"});function U(V,Q){try{var ee=JSON.parse(V);(function(ne){if(ne&&s(ne)==="object"){var Y=new Date(ne.timestamp);if(!(z.from&&Y<z.from||z.until&&Y>z.until||z.level&&z.level!==ne.level))return!0}})(ee)&&function(ne){z.rows&&W.length>=z.rows&&z.order!=="desc"?p.readable&&p.destroy():(z.fields&&(ne=z.fields.reduce(function(Y,G){return Y[G]=ne[G],Y},{})),z.order==="desc"&&W.length>=z.rows&&W.shift(),W.push(ne))}(ee)}catch(ne){Q||p.emit("error",ne)}}p.on("error",function(V){if(p.readable&&p.destroy(),B)return V.code!=="ENOENT"?B(V):B(null,W)}),p.on("data",function(V){for(var Q=(V=(P+V).split(/\n+/)).length-1,ee=0;ee<Q;ee++)(!z.start||O>=z.start)&&U(V[ee]),O++;P=V[Q]}),p.on("close",function(){P&&U(P,!0),z.order==="desc"&&(W=W.reverse()),B&&B(null,W)})}},{key:"stream",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=g.join(this.dirname,this.filename),N=new M,P={file:B,start:z.start};return N.destroy=q(P,function(W,O){if(W)return N.emit("error",W);try{N.emit("data",O),O=JSON.parse(O),N.emit("log",O)}catch(p){N.emit("error",p)}}),N}},{key:"open",value:function(){var z=this;this.filename&&(this._opening||(this._opening=!0,this.stat(function(B,N){if(B)return z.emit("error",B);I("stat done: %s { size: %s }",z.filename,N),z._size=N,z._dest=z._createStream(z._stream),z._opening=!1,z.once("open",function(){z._stream.eventNames().includes("rotate")?z._stream.emit("rotate"):z._rotate=!1})})))}},{key:"stat",value:function(z){var B=this,N=this._getFile(),P=g.join(this.dirname,N);h.stat(P,function(W,O){return W&&W.code==="ENOENT"?(I("ENOENT ok",P),B.filename=N,z(null,0)):W?(I("err ".concat(W.code," ").concat(P)),z(W)):!O||B._needsNewFile(O.size)?B._incFile(function(){return B.stat(z)}):(B.filename=N,void z(null,O.size))})}},{key:"close",value:function(z){var B=this;this._stream&&this._stream.end(function(){z&&z(),B.emit("flush"),B.emit("closed")})}},{key:"_needsNewFile",value:function(z){return z=z||this._size,this.maxsize&&z>=this.maxsize}},{key:"_onError",value:function(z){this.emit("error",z)}},{key:"_setupStream",value:function(z){return z.on("error",this._onError),z}},{key:"_cleanupStream",value:function(z){return z.removeListener("error",this._onError),z}},{key:"_rotateFile",value:function(){var z=this;this._incFile(function(){return z.open()})}},{key:"_endStream",value:function(){var z=this,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end(function(){z._cleanupStream(z._dest),B()})):B()}},{key:"_createStream",value:function(z){var B=this,N=g.join(this.dirname,this.filename);I("create stream start",N,this.options);var P=h.createWriteStream(N,this.options).on("error",function(O){return I(O)}).on("close",function(){return I("close",P.path,P.bytesWritten)}).on("open",function(){I("file open ok",N),B.emit("open",N),z.pipe(P),B.rotatedWhileOpening&&(B._stream=new A,B._stream.setMaxListeners(30),B._rotateFile(),B.rotatedWhileOpening=!1,B._cleanupStream(P),z.end())});if(I("create stream ok",N),this.zippedArchive){var W=R.createGzip();return W.pipe(P),W}return P}},{key:"_incFile",value:function(z){I("_incFile",this.filename);var B=g.extname(this._basename),N=g.basename(this._basename,B);this.tailable?this._checkMaxFilesTailable(B,N,z):(this._created+=1,this._checkMaxFilesIncrementing(B,N,z))}},{key:"_getFile",value:function(){var z=g.extname(this._basename),B=g.basename(this._basename,z),N=this.rotationFormat?this.rotationFormat():this._created,P=!this.tailable&&this._created?"".concat(B).concat(N).concat(z):"".concat(B).concat(z);return this.zippedArchive&&!this.tailable?"".concat(P,".gz"):P}},{key:"_checkMaxFilesIncrementing",value:function(z,B,N){if(!this.maxFiles||this._created<this.maxFiles)return r(N);var P=this._created-this.maxFiles,W=P!==0?P:"",O=this.zippedArchive?".gz":"",p="".concat(B).concat(W).concat(z).concat(O),U=g.join(this.dirname,p);h.unlink(U,N)}},{key:"_checkMaxFilesTailable",value:function(z,B,N){var P=this,W=[];if(this.maxFiles){for(var O=this.zippedArchive?".gz":"",p=this.maxFiles-1;p>1;p--)W.push(function(U,V){var Q=this,ee="".concat(B).concat(U-1).concat(z).concat(O),ne=g.join(this.dirname,ee);h.exists(ne,function(Y){if(!Y)return V(null);ee="".concat(B).concat(U).concat(z).concat(O),h.rename(ne,g.join(Q.dirname,ee),V)})}.bind(this,p));b(W,function(){h.rename(g.join(P.dirname,"".concat(B).concat(z)),g.join(P.dirname,"".concat(B,"1").concat(z).concat(O)),N)})}}},{key:"_createLogDirIfNotExist",value:function(z){h.existsSync(z)||h.mkdirSync(z,{recursive:!0})}}])&&o(y.prototype,C),L}(d)}).call(this,n(15).setImmediate,n(5).Buffer)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(l,o){return(0,r.default)(i.default,l,o)};var r=s(n(151)),i=s(n(155));function s(l){return l&&l.__esModule?l:{default:l}}e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(45)),i=l(n(25)),s=l(n(30));function l(o){return o&&o.__esModule?o:{default:o}}t.default=(0,s.default)((o,c,u)=>{var f=(0,r.default)(c)?[]:{};o(c,(E,w,h)=>{(0,i.default)(E)((g,...b)=>{b.length<2&&([b]=b),f[w]=b,h(g)})},E=>u(E,f))},3),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(u){return(0,s.isAsync)(u)?function(...f){const E=f.pop();return o(u.apply(this,f),E)}:(0,r.default)(function(f,E){var w;try{w=u.apply(this,f)}catch(h){return E(h)}if(w&&typeof w.then=="function")return o(w,E);E(null,w)})};var r=l(n(153)),i=l(n(154)),s=n(25);function l(u){return u&&u.__esModule?u:{default:u}}function o(u,f){return u.then(E=>{c(f,null,E)},E=>{c(f,E&&E.message?E:new Error(E))})}function c(u,f,E){try{u(f,E)}catch(w){(0,i.default)(h=>{throw h},w)}}e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return function(...i){var s=i.pop();return r.call(this,i,s)}},e.exports=t.default},function(e,t,n){(function(r,i){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=c,t.wrap=u;var s,l=t.hasSetImmediate=typeof r=="function"&&r,o=t.hasNextTick=typeof i=="object"&&typeof i.nextTick=="function";function c(f){setTimeout(f,0)}function u(f){return(E,...w)=>f(()=>E(...w))}s=l?r:o?i.nextTick:c,t.default=u(s)}).call(this,n(15).setImmediate,n(2))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(66)),i=s(n(30));function s(l){return l&&l.__esModule?l:{default:l}}t.default=(0,i.default)(function(l,o,c){return(0,r.default)(l,1,o,c)},3),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(67)),i=u(n(157)),s=u(n(68)),l=n(25),o=u(n(159)),c=u(n(46));function u(f){return f&&f.__esModule?f:{default:f}}t.default=f=>(E,w,h)=>{if(h=(0,r.default)(h),f<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!E)return h(null);if((0,l.isAsyncGenerator)(E))return(0,o.default)(E,f,w,h);if((0,l.isAsyncIterable)(E))return(0,o.default)(E[Symbol.asyncIterator](),f,w,h);var g=(0,i.default)(E),b=!1,R=!1,x=0,F=!1;function M(d,I){if(!R)if(x-=1,d)b=!0,h(d);else if(d===!1)b=!0,R=!0;else{if(I===c.default||b&&x<=0)return b=!0,h(null);F||A()}}function A(){for(F=!0;x<f&&!b;){var d=g();if(d===null)return b=!0,void(x<=0&&h(null));x+=1,w(d.value,d.key,(0,s.default)(M))}F=!1}A()},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(l){if((0,r.default)(l))return function(w){var h=-1,g=w.length;return function(){return++h<g?{value:w[h],key:h}:null}}(l);var o=(0,i.default)(l);return o?function(w){var h=-1;return function(){var g=w.next();return g.done?null:(h++,{value:g.value,key:h})}}(o):(c=l,u=c?Object.keys(c):[],f=-1,E=u.length,function(){var w=u[++f];return f<E?{value:c[w],key:w}:null});var c,u,f,E};var r=s(n(45)),i=s(n(158));function s(l){return l&&l.__esModule?l:{default:l}}e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return r[Symbol.iterator]&&r[Symbol.iterator]()},e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(l,o,c,u){let f=!1,E=!1,w=!1,h=0,g=0;function b(){h>=o||w||f||(w=!0,l.next().then(({value:F,done:M})=>{if(!E&&!f){if(w=!1,M)return f=!0,void(h<=0&&u(null));h++,c(F,g,R),g++,b()}}).catch(x))}function R(F,M){if(h-=1,!E)return F?x(F):F===!1?(f=!0,void(E=!0)):M===s.default||f&&h<=0?(f=!0,u(null)):void b()}function x(F){E||(w=!1,f=!0,u(F))}b()};var r,i=n(46),s=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){(function(r){var i=n(5).Buffer,s=n(161).Transform,l=n(169),o=n(13),c=n(74).ok,u=n(5).kMaxLength,f="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";l.Z_MIN_WINDOWBITS=8,l.Z_MAX_WINDOWBITS=15,l.Z_DEFAULT_WINDOWBITS=15,l.Z_MIN_CHUNK=64,l.Z_MAX_CHUNK=1/0,l.Z_DEFAULT_CHUNK=16384,l.Z_MIN_MEMLEVEL=1,l.Z_MAX_MEMLEVEL=9,l.Z_DEFAULT_MEMLEVEL=8,l.Z_MIN_LEVEL=-1,l.Z_MAX_LEVEL=9,l.Z_DEFAULT_LEVEL=l.Z_DEFAULT_COMPRESSION;for(var E=Object.keys(l),w=0;w<E.length;w++){var h=E[w];h.match(/^Z/)&&Object.defineProperty(t,h,{enumerable:!0,value:l[h],writable:!1})}for(var g={Z_OK:l.Z_OK,Z_STREAM_END:l.Z_STREAM_END,Z_NEED_DICT:l.Z_NEED_DICT,Z_ERRNO:l.Z_ERRNO,Z_STREAM_ERROR:l.Z_STREAM_ERROR,Z_DATA_ERROR:l.Z_DATA_ERROR,Z_MEM_ERROR:l.Z_MEM_ERROR,Z_BUF_ERROR:l.Z_BUF_ERROR,Z_VERSION_ERROR:l.Z_VERSION_ERROR},b=Object.keys(g),R=0;R<b.length;R++){var x=b[R];g[g[x]]=x}function F(B,N,P){var W=[],O=0;function p(){for(var V;(V=B.read())!==null;)W.push(V),O+=V.length;B.once("readable",p)}function U(){var V,Q=null;O>=u?Q=new RangeError(f):V=i.concat(W,O),W=[],B.close(),P(Q,V)}B.on("error",function(V){B.removeListener("end",U),B.removeListener("readable",p),P(V)}),B.on("end",U),B.end(N),p()}function M(B,N){if(typeof N=="string"&&(N=i.from(N)),!i.isBuffer(N))throw new TypeError("Not a string or buffer");var P=B._finishFlushFlag;return B._processChunk(N,P)}function A(B){if(!(this instanceof A))return new A(B);_.call(this,B,l.DEFLATE)}function d(B){if(!(this instanceof d))return new d(B);_.call(this,B,l.INFLATE)}function I(B){if(!(this instanceof I))return new I(B);_.call(this,B,l.GZIP)}function $(B){if(!(this instanceof $))return new $(B);_.call(this,B,l.GUNZIP)}function q(B){if(!(this instanceof q))return new q(B);_.call(this,B,l.DEFLATERAW)}function m(B){if(!(this instanceof m))return new m(B);_.call(this,B,l.INFLATERAW)}function y(B){if(!(this instanceof y))return new y(B);_.call(this,B,l.UNZIP)}function C(B){return B===l.Z_NO_FLUSH||B===l.Z_PARTIAL_FLUSH||B===l.Z_SYNC_FLUSH||B===l.Z_FULL_FLUSH||B===l.Z_FINISH||B===l.Z_BLOCK}function _(B,N){var P=this;if(this._opts=B=B||{},this._chunkSize=B.chunkSize||t.Z_DEFAULT_CHUNK,s.call(this,B),B.flush&&!C(B.flush))throw new Error("Invalid flush flag: "+B.flush);if(B.finishFlush&&!C(B.finishFlush))throw new Error("Invalid flush flag: "+B.finishFlush);if(this._flushFlag=B.flush||l.Z_NO_FLUSH,this._finishFlushFlag=B.finishFlush!==void 0?B.finishFlush:l.Z_FINISH,B.chunkSize&&(B.chunkSize<t.Z_MIN_CHUNK||B.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+B.chunkSize);if(B.windowBits&&(B.windowBits<t.Z_MIN_WINDOWBITS||B.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+B.windowBits);if(B.level&&(B.level<t.Z_MIN_LEVEL||B.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+B.level);if(B.memLevel&&(B.memLevel<t.Z_MIN_MEMLEVEL||B.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+B.memLevel);if(B.strategy&&B.strategy!=t.Z_FILTERED&&B.strategy!=t.Z_HUFFMAN_ONLY&&B.strategy!=t.Z_RLE&&B.strategy!=t.Z_FIXED&&B.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+B.strategy);if(B.dictionary&&!i.isBuffer(B.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new l.Zlib(N);var W=this;this._hadError=!1,this._handle.onerror=function(U,V){L(W),W._hadError=!0;var Q=new Error(U);Q.errno=V,Q.code=t.codes[V],W.emit("error",Q)};var O=t.Z_DEFAULT_COMPRESSION;typeof B.level=="number"&&(O=B.level);var p=t.Z_DEFAULT_STRATEGY;typeof B.strategy=="number"&&(p=B.strategy),this._handle.init(B.windowBits||t.Z_DEFAULT_WINDOWBITS,O,B.memLevel||t.Z_DEFAULT_MEMLEVEL,p,B.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=O,this._strategy=p,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!P._handle},configurable:!0,enumerable:!0})}function L(B,N){N&&r.nextTick(N),B._handle&&(B._handle.close(),B._handle=null)}function z(B){B.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(g),writable:!1}),t.Deflate=A,t.Inflate=d,t.Gzip=I,t.Gunzip=$,t.DeflateRaw=q,t.InflateRaw=m,t.Unzip=y,t.createDeflate=function(B){return new A(B)},t.createInflate=function(B){return new d(B)},t.createDeflateRaw=function(B){return new q(B)},t.createInflateRaw=function(B){return new m(B)},t.createGzip=function(B){return new I(B)},t.createGunzip=function(B){return new $(B)},t.createUnzip=function(B){return new y(B)},t.deflate=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new A(N),B,P)},t.deflateSync=function(B,N){return M(new A(N),B)},t.gzip=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new I(N),B,P)},t.gzipSync=function(B,N){return M(new I(N),B)},t.deflateRaw=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new q(N),B,P)},t.deflateRawSync=function(B,N){return M(new q(N),B)},t.unzip=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new y(N),B,P)},t.unzipSync=function(B,N){return M(new y(N),B)},t.inflate=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new d(N),B,P)},t.inflateSync=function(B,N){return M(new d(N),B)},t.gunzip=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new $(N),B,P)},t.gunzipSync=function(B,N){return M(new $(N),B)},t.inflateRaw=function(B,N,P){return typeof N=="function"&&(P=N,N={}),F(new m(N),B,P)},t.inflateRawSync=function(B,N){return M(new m(N),B)},o.inherits(_,s),_.prototype.params=function(B,N,P){if(B<t.Z_MIN_LEVEL||B>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+B);if(N!=t.Z_FILTERED&&N!=t.Z_HUFFMAN_ONLY&&N!=t.Z_RLE&&N!=t.Z_FIXED&&N!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+N);if(this._level!==B||this._strategy!==N){var W=this;this.flush(l.Z_SYNC_FLUSH,function(){c(W._handle,"zlib binding closed"),W._handle.params(B,N),W._hadError||(W._level=B,W._strategy=N,P&&P())})}else r.nextTick(P)},_.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},_.prototype._flush=function(B){this._transform(i.alloc(0),"",B)},_.prototype.flush=function(B,N){var P=this,W=this._writableState;(typeof B=="function"||B===void 0&&!N)&&(N=B,B=l.Z_FULL_FLUSH),W.ended?N&&r.nextTick(N):W.ending?N&&this.once("end",N):W.needDrain?N&&this.once("drain",function(){return P.flush(B,N)}):(this._flushFlag=B,this.write(i.alloc(0),"",N))},_.prototype.close=function(B){L(this,B),r.nextTick(z,this)},_.prototype._transform=function(B,N,P){var W,O=this._writableState,p=(O.ending||O.ended)&&(!B||O.length===B.length);return B===null||i.isBuffer(B)?this._handle?(p?W=this._finishFlushFlag:(W=this._flushFlag,B.length>=O.length&&(this._flushFlag=this._opts.flush||l.Z_NO_FLUSH)),void this._processChunk(B,W,P)):P(new Error("zlib binding closed")):P(new Error("invalid input"))},_.prototype._processChunk=function(B,N,P){var W=B&&B.length,O=this._chunkSize-this._offset,p=0,U=this,V=typeof P=="function";if(!V){var Q,ee=[],ne=0;this.on("error",function(k){Q=k}),c(this._handle,"zlib binding closed");do var Y=this._handle.writeSync(N,B,p,W,this._buffer,this._offset,O);while(!this._hadError&&T(Y[0],Y[1]));if(this._hadError)throw Q;if(ne>=u)throw L(this),new RangeError(f);var G=i.concat(ee,ne);return L(this),G}c(this._handle,"zlib binding closed");var S=this._handle.write(N,B,p,W,this._buffer,this._offset,O);function T(k,J){if(this&&(this.buffer=null,this.callback=null),!U._hadError){var K=O-J;if(c(K>=0,"have should not go down"),K>0){var re=U._buffer.slice(U._offset,U._offset+K);U._offset+=K,V?U.push(re):(ee.push(re),ne+=re.length)}if((J===0||U._offset>=U._chunkSize)&&(O=U._chunkSize,U._offset=0,U._buffer=i.allocUnsafe(U._chunkSize)),J===0){if(p+=W-k,W=k,!V)return!0;var se=U._handle.write(N,B,p,W,U._buffer,U._offset,U._chunkSize);return se.callback=T,void(se.buffer=B)}if(!V)return!1;P()}}S.buffer=B,S.callback=T},o.inherits(A,_),o.inherits(d,_),o.inherits(I,_),o.inherits($,_),o.inherits(q,_),o.inherits(m,_),o.inherits(y,_)}).call(this,n(2))},function(e,t,n){e.exports=i;var r=n(21).EventEmitter;function i(){r.call(this)}n(7)(i,r),i.Readable=n(31),i.Writable=n(73),i.Duplex=n(166),i.Transform=n(167),i.PassThrough=n(168),i.Stream=i,i.prototype.pipe=function(s,l){var o=this;function c(b){s.writable&&s.write(b)===!1&&o.pause&&o.pause()}function u(){o.readable&&o.resume&&o.resume()}o.on("data",c),s.on("drain",u),s._isStdio||l&&l.end===!1||(o.on("end",E),o.on("close",w));var f=!1;function E(){f||(f=!0,s.end())}function w(){f||(f=!0,typeof s.destroy=="function"&&s.destroy())}function h(b){if(g(),r.listenerCount(this,"error")===0)throw b}function g(){o.removeListener("data",c),s.removeListener("drain",u),o.removeListener("end",E),o.removeListener("close",w),o.removeListener("error",h),s.removeListener("error",h),o.removeListener("end",g),o.removeListener("close",g),s.removeListener("close",g)}return o.on("error",h),s.on("error",h),o.on("end",g),o.on("close",g),s.on("close",g),s.emit("pipe",o),s}},function(e,t){},function(e,t,n){var r=n(47).Buffer,i=n(164);e.exports=function(){function s(){(function(l,o){if(!(l instanceof o))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(l){var o={data:l,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},s.prototype.unshift=function(l){var o={data:l,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},s.prototype.shift=function(){if(this.length!==0){var l=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(l){if(this.length===0)return"";for(var o=this.head,c=""+o.data;o=o.next;)c+=l+o.data;return c},s.prototype.concat=function(l){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var o,c,u,f=r.allocUnsafe(l>>>0),E=this.head,w=0;E;)o=E.data,c=f,u=w,o.copy(c,u),w+=E.data.length,E=E.next;return f},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){e.exports=s;var r=n(72),i=n(17);function s(l){if(!(this instanceof s))return new s(l);r.call(this,l)}i.inherits=n(7),i.inherits(s,r),s.prototype._transform=function(l,o,c){c(null,l)}},function(e,t,n){e.exports=n(23)},function(e,t,n){e.exports=n(31).Transform},function(e,t,n){e.exports=n(31).PassThrough},function(e,t,n){(function(r,i){var s=n(74),l=n(171),o=n(172),c=n(175),u=n(178);for(var f in u)t[f]=u[f];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function E(w){if(typeof w!="number"||w<t.DEFLATE||w>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=w,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}E.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,s(this.init_done,"close before init"),s(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},E.prototype.write=function(w,h,g,b,R,x,F){return this._write(!0,w,h,g,b,R,x,F)},E.prototype.writeSync=function(w,h,g,b,R,x,F){return this._write(!1,w,h,g,b,R,x,F)},E.prototype._write=function(w,h,g,b,R,x,F,M){if(s.equal(arguments.length,8),s(this.init_done,"write before init"),s(this.mode!==t.NONE,"already finalized"),s.equal(!1,this.write_in_progress,"write already in progress"),s.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,s.equal(!1,h===void 0,"must provide flush value"),this.write_in_progress=!0,h!==t.Z_NO_FLUSH&&h!==t.Z_PARTIAL_FLUSH&&h!==t.Z_SYNC_FLUSH&&h!==t.Z_FULL_FLUSH&&h!==t.Z_FINISH&&h!==t.Z_BLOCK)throw new Error("Invalid flush value");if(g==null&&(g=r.alloc(0),R=0,b=0),this.strm.avail_in=R,this.strm.input=g,this.strm.next_in=b,this.strm.avail_out=M,this.strm.output=x,this.strm.next_out=F,this.flush=h,!w)return this._process(),this._checkError()?this._afterSync():void 0;var A=this;return i.nextTick(function(){A._process(),A._after()}),this},E.prototype._afterSync=function(){var w=this.strm.avail_out,h=this.strm.avail_in;return this.write_in_progress=!1,[h,w]},E.prototype._process=function(){var w=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(w=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(w===null)break;if(this.strm.input[w]!==31){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,w++,this.strm.avail_in===1)break;case 1:if(w===null)break;this.strm.input[w]===139?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},E.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},E.prototype._after=function(){if(this._checkError()){var w=this.strm.avail_out,h=this.strm.avail_in;this.write_in_progress=!1,this.callback(h,w),this.pending_close&&this.close()}},E.prototype._error=function(w){this.strm.msg&&(w=this.strm.msg),this.onerror(w,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},E.prototype.init=function(w,h,g,b,R){s(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),s(w>=8&&w<=15,"invalid windowBits"),s(h>=-1&&h<=9,"invalid compression level"),s(g>=1&&g<=9,"invalid memlevel"),s(b===t.Z_FILTERED||b===t.Z_HUFFMAN_ONLY||b===t.Z_RLE||b===t.Z_FIXED||b===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(h,w,g,b,R),this._setDictionary()},E.prototype.params=function(){throw new Error("deflateParams Not supported")},E.prototype.reset=function(){this._reset(),this._setDictionary()},E.prototype._init=function(w,h,g,b,R){switch(this.level=w,this.windowBits=h,this.memLevel=g,this.strategy=b,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new l,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=R,this.write_in_progress=!1,this.init_done=!0},E.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},E.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=E}).call(this,n(5).Buffer,n(2))},function(e,t,n){var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function l(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}e.exports=function(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;if(Object.getOwnPropertyNames(c).map(function(E){return c[E]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(E){f[E]=E}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(o,c){for(var u,f,E=l(o),w=1;w<arguments.length;w++){for(var h in u=Object(arguments[w]))i.call(u,h)&&(E[h]=u[h]);if(r){f=r(u);for(var g=0;g<f.length;g++)s.call(u,f[g])&&(E[f[g]]=u[f[g]])}}return E}},function(e,t,n){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,n){var r,i=n(37),s=n(173),l=n(75),o=n(76),c=n(174);function u(m,y){return m.msg=c[y],y}function f(m){return(m<<1)-(m>4?9:0)}function E(m){for(var y=m.length;--y>=0;)m[y]=0}function w(m){var y=m.state,C=y.pending;C>m.avail_out&&(C=m.avail_out),C!==0&&(i.arraySet(m.output,y.pending_buf,y.pending_out,C,m.next_out),m.next_out+=C,y.pending_out+=C,m.total_out+=C,m.avail_out-=C,y.pending-=C,y.pending===0&&(y.pending_out=0))}function h(m,y){s._tr_flush_block(m,m.block_start>=0?m.block_start:-1,m.strstart-m.block_start,y),m.block_start=m.strstart,w(m.strm)}function g(m,y){m.pending_buf[m.pending++]=y}function b(m,y){m.pending_buf[m.pending++]=y>>>8&255,m.pending_buf[m.pending++]=255&y}function R(m,y){var C,_,L=m.max_chain_length,z=m.strstart,B=m.prev_length,N=m.nice_match,P=m.strstart>m.w_size-262?m.strstart-(m.w_size-262):0,W=m.window,O=m.w_mask,p=m.prev,U=m.strstart+258,V=W[z+B-1],Q=W[z+B];m.prev_length>=m.good_match&&(L>>=2),N>m.lookahead&&(N=m.lookahead);do if(W[(C=y)+B]===Q&&W[C+B-1]===V&&W[C]===W[z]&&W[++C]===W[z+1]){z+=2,C++;do;while(W[++z]===W[++C]&&W[++z]===W[++C]&&W[++z]===W[++C]&&W[++z]===W[++C]&&W[++z]===W[++C]&&W[++z]===W[++C]&&W[++z]===W[++C]&&W[++z]===W[++C]&&z<U);if(_=258-(U-z),z=U-258,_>B){if(m.match_start=y,B=_,_>=N)break;V=W[z+B-1],Q=W[z+B]}}while((y=p[y&O])>P&&--L!=0);return B<=m.lookahead?B:m.lookahead}function x(m){var y,C,_,L,z,B,N,P,W,O,p=m.w_size;do{if(L=m.window_size-m.lookahead-m.strstart,m.strstart>=p+(p-262)){i.arraySet(m.window,m.window,p,p,0),m.match_start-=p,m.strstart-=p,m.block_start-=p,y=C=m.hash_size;do _=m.head[--y],m.head[y]=_>=p?_-p:0;while(--C);y=C=p;do _=m.prev[--y],m.prev[y]=_>=p?_-p:0;while(--C);L+=p}if(m.strm.avail_in===0)break;if(B=m.strm,N=m.window,P=m.strstart+m.lookahead,W=L,O=void 0,(O=B.avail_in)>W&&(O=W),C=O===0?0:(B.avail_in-=O,i.arraySet(N,B.input,B.next_in,O,P),B.state.wrap===1?B.adler=l(B.adler,N,O,P):B.state.wrap===2&&(B.adler=o(B.adler,N,O,P)),B.next_in+=O,B.total_in+=O,O),m.lookahead+=C,m.lookahead+m.insert>=3)for(z=m.strstart-m.insert,m.ins_h=m.window[z],m.ins_h=(m.ins_h<<m.hash_shift^m.window[z+1])&m.hash_mask;m.insert&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[z+3-1])&m.hash_mask,m.prev[z&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=z,z++,m.insert--,!(m.lookahead+m.insert<3)););}while(m.lookahead<262&&m.strm.avail_in!==0)}function F(m,y){for(var C,_;;){if(m.lookahead<262){if(x(m),m.lookahead<262&&y===0)return 1;if(m.lookahead===0)break}if(C=0,m.lookahead>=3&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+3-1])&m.hash_mask,C=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),C!==0&&m.strstart-C<=m.w_size-262&&(m.match_length=R(m,C)),m.match_length>=3)if(_=s._tr_tally(m,m.strstart-m.match_start,m.match_length-3),m.lookahead-=m.match_length,m.match_length<=m.max_lazy_match&&m.lookahead>=3){m.match_length--;do m.strstart++,m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+3-1])&m.hash_mask,C=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart;while(--m.match_length!=0);m.strstart++}else m.strstart+=m.match_length,m.match_length=0,m.ins_h=m.window[m.strstart],m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+1])&m.hash_mask;else _=s._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++;if(_&&(h(m,!1),m.strm.avail_out===0))return 1}return m.insert=m.strstart<2?m.strstart:2,y===4?(h(m,!0),m.strm.avail_out===0?3:4):m.last_lit&&(h(m,!1),m.strm.avail_out===0)?1:2}function M(m,y){for(var C,_,L;;){if(m.lookahead<262){if(x(m),m.lookahead<262&&y===0)return 1;if(m.lookahead===0)break}if(C=0,m.lookahead>=3&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+3-1])&m.hash_mask,C=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),m.prev_length=m.match_length,m.prev_match=m.match_start,m.match_length=2,C!==0&&m.prev_length<m.max_lazy_match&&m.strstart-C<=m.w_size-262&&(m.match_length=R(m,C),m.match_length<=5&&(m.strategy===1||m.match_length===3&&m.strstart-m.match_start>4096)&&(m.match_length=2)),m.prev_length>=3&&m.match_length<=m.prev_length){L=m.strstart+m.lookahead-3,_=s._tr_tally(m,m.strstart-1-m.prev_match,m.prev_length-3),m.lookahead-=m.prev_length-1,m.prev_length-=2;do++m.strstart<=L&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+3-1])&m.hash_mask,C=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart);while(--m.prev_length!=0);if(m.match_available=0,m.match_length=2,m.strstart++,_&&(h(m,!1),m.strm.avail_out===0))return 1}else if(m.match_available){if((_=s._tr_tally(m,0,m.window[m.strstart-1]))&&h(m,!1),m.strstart++,m.lookahead--,m.strm.avail_out===0)return 1}else m.match_available=1,m.strstart++,m.lookahead--}return m.match_available&&(_=s._tr_tally(m,0,m.window[m.strstart-1]),m.match_available=0),m.insert=m.strstart<2?m.strstart:2,y===4?(h(m,!0),m.strm.avail_out===0?3:4):m.last_lit&&(h(m,!1),m.strm.avail_out===0)?1:2}function A(m,y,C,_,L){this.good_length=m,this.max_lazy=y,this.nice_length=C,this.max_chain=_,this.func=L}function d(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),E(this.dyn_ltree),E(this.dyn_dtree),E(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),E(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),E(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function I(m){var y;return m&&m.state?(m.total_in=m.total_out=0,m.data_type=2,(y=m.state).pending=0,y.pending_out=0,y.wrap<0&&(y.wrap=-y.wrap),y.status=y.wrap?42:113,m.adler=y.wrap===2?0:1,y.last_flush=0,s._tr_init(y),0):u(m,-2)}function $(m){var y,C=I(m);return C===0&&((y=m.state).window_size=2*y.w_size,E(y.head),y.max_lazy_match=r[y.level].max_lazy,y.good_match=r[y.level].good_length,y.nice_match=r[y.level].nice_length,y.max_chain_length=r[y.level].max_chain,y.strstart=0,y.block_start=0,y.lookahead=0,y.insert=0,y.match_length=y.prev_length=2,y.match_available=0,y.ins_h=0),C}function q(m,y,C,_,L,z){if(!m)return-2;var B=1;if(y===-1&&(y=6),_<0?(B=0,_=-_):_>15&&(B=2,_-=16),L<1||L>9||C!==8||_<8||_>15||y<0||y>9||z<0||z>4)return u(m,-2);_===8&&(_=9);var N=new d;return m.state=N,N.strm=m,N.wrap=B,N.gzhead=null,N.w_bits=_,N.w_size=1<<N.w_bits,N.w_mask=N.w_size-1,N.hash_bits=L+7,N.hash_size=1<<N.hash_bits,N.hash_mask=N.hash_size-1,N.hash_shift=~~((N.hash_bits+3-1)/3),N.window=new i.Buf8(2*N.w_size),N.head=new i.Buf16(N.hash_size),N.prev=new i.Buf16(N.w_size),N.lit_bufsize=1<<L+6,N.pending_buf_size=4*N.lit_bufsize,N.pending_buf=new i.Buf8(N.pending_buf_size),N.d_buf=1*N.lit_bufsize,N.l_buf=3*N.lit_bufsize,N.level=y,N.strategy=z,N.method=C,$(m)}r=[new A(0,0,0,0,function(m,y){var C=65535;for(C>m.pending_buf_size-5&&(C=m.pending_buf_size-5);;){if(m.lookahead<=1){if(x(m),m.lookahead===0&&y===0)return 1;if(m.lookahead===0)break}m.strstart+=m.lookahead,m.lookahead=0;var _=m.block_start+C;if((m.strstart===0||m.strstart>=_)&&(m.lookahead=m.strstart-_,m.strstart=_,h(m,!1),m.strm.avail_out===0)||m.strstart-m.block_start>=m.w_size-262&&(h(m,!1),m.strm.avail_out===0))return 1}return m.insert=0,y===4?(h(m,!0),m.strm.avail_out===0?3:4):(m.strstart>m.block_start&&(h(m,!1),m.strm.avail_out),1)}),new A(4,4,8,4,F),new A(4,5,16,8,F),new A(4,6,32,32,F),new A(4,4,16,16,M),new A(8,16,32,32,M),new A(8,16,128,128,M),new A(8,32,128,256,M),new A(32,128,258,1024,M),new A(32,258,258,4096,M)],t.deflateInit=function(m,y){return q(m,y,8,15,8,0)},t.deflateInit2=q,t.deflateReset=$,t.deflateResetKeep=I,t.deflateSetHeader=function(m,y){return m&&m.state?m.state.wrap!==2?-2:(m.state.gzhead=y,0):-2},t.deflate=function(m,y){var C,_,L,z;if(!m||!m.state||y>5||y<0)return m?u(m,-2):-2;if(_=m.state,!m.output||!m.input&&m.avail_in!==0||_.status===666&&y!==4)return u(m,m.avail_out===0?-5:-2);if(_.strm=m,C=_.last_flush,_.last_flush=y,_.status===42)if(_.wrap===2)m.adler=0,g(_,31),g(_,139),g(_,8),_.gzhead?(g(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),g(_,255&_.gzhead.time),g(_,_.gzhead.time>>8&255),g(_,_.gzhead.time>>16&255),g(_,_.gzhead.time>>24&255),g(_,_.level===9?2:_.strategy>=2||_.level<2?4:0),g(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(g(_,255&_.gzhead.extra.length),g(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(m.adler=o(m.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(g(_,0),g(_,0),g(_,0),g(_,0),g(_,0),g(_,_.level===9?2:_.strategy>=2||_.level<2?4:0),g(_,3),_.status=113);else{var B=8+(_.w_bits-8<<4)<<8;B|=(_.strategy>=2||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(B|=32),B+=31-B%31,_.status=113,b(_,B),_.strstart!==0&&(b(_,m.adler>>>16),b(_,65535&m.adler)),m.adler=1}if(_.status===69)if(_.gzhead.extra){for(L=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>L&&(m.adler=o(m.adler,_.pending_buf,_.pending-L,L)),w(m),L=_.pending,_.pending!==_.pending_buf_size));)g(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>L&&(m.adler=o(m.adler,_.pending_buf,_.pending-L,L)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){L=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>L&&(m.adler=o(m.adler,_.pending_buf,_.pending-L,L)),w(m),L=_.pending,_.pending===_.pending_buf_size)){z=1;break}z=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,g(_,z)}while(z!==0);_.gzhead.hcrc&&_.pending>L&&(m.adler=o(m.adler,_.pending_buf,_.pending-L,L)),z===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){L=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>L&&(m.adler=o(m.adler,_.pending_buf,_.pending-L,L)),w(m),L=_.pending,_.pending===_.pending_buf_size)){z=1;break}z=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,g(_,z)}while(z!==0);_.gzhead.hcrc&&_.pending>L&&(m.adler=o(m.adler,_.pending_buf,_.pending-L,L)),z===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&w(m),_.pending+2<=_.pending_buf_size&&(g(_,255&m.adler),g(_,m.adler>>8&255),m.adler=0,_.status=113)):_.status=113),_.pending!==0){if(w(m),m.avail_out===0)return _.last_flush=-1,0}else if(m.avail_in===0&&f(y)<=f(C)&&y!==4)return u(m,-5);if(_.status===666&&m.avail_in!==0)return u(m,-5);if(m.avail_in!==0||_.lookahead!==0||y!==0&&_.status!==666){var N=_.strategy===2?function(P,W){for(var O;;){if(P.lookahead===0&&(x(P),P.lookahead===0)){if(W===0)return 1;break}if(P.match_length=0,O=s._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++,O&&(h(P,!1),P.strm.avail_out===0))return 1}return P.insert=0,W===4?(h(P,!0),P.strm.avail_out===0?3:4):P.last_lit&&(h(P,!1),P.strm.avail_out===0)?1:2}(_,y):_.strategy===3?function(P,W){for(var O,p,U,V,Q=P.window;;){if(P.lookahead<=258){if(x(P),P.lookahead<=258&&W===0)return 1;if(P.lookahead===0)break}if(P.match_length=0,P.lookahead>=3&&P.strstart>0&&(p=Q[U=P.strstart-1])===Q[++U]&&p===Q[++U]&&p===Q[++U]){V=P.strstart+258;do;while(p===Q[++U]&&p===Q[++U]&&p===Q[++U]&&p===Q[++U]&&p===Q[++U]&&p===Q[++U]&&p===Q[++U]&&p===Q[++U]&&U<V);P.match_length=258-(V-U),P.match_length>P.lookahead&&(P.match_length=P.lookahead)}if(P.match_length>=3?(O=s._tr_tally(P,1,P.match_length-3),P.lookahead-=P.match_length,P.strstart+=P.match_length,P.match_length=0):(O=s._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++),O&&(h(P,!1),P.strm.avail_out===0))return 1}return P.insert=0,W===4?(h(P,!0),P.strm.avail_out===0?3:4):P.last_lit&&(h(P,!1),P.strm.avail_out===0)?1:2}(_,y):r[_.level].func(_,y);if(N!==3&&N!==4||(_.status=666),N===1||N===3)return m.avail_out===0&&(_.last_flush=-1),0;if(N===2&&(y===1?s._tr_align(_):y!==5&&(s._tr_stored_block(_,0,0,!1),y===3&&(E(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),w(m),m.avail_out===0))return _.last_flush=-1,0}return y!==4?0:_.wrap<=0?1:(_.wrap===2?(g(_,255&m.adler),g(_,m.adler>>8&255),g(_,m.adler>>16&255),g(_,m.adler>>24&255),g(_,255&m.total_in),g(_,m.total_in>>8&255),g(_,m.total_in>>16&255),g(_,m.total_in>>24&255)):(b(_,m.adler>>>16),b(_,65535&m.adler)),w(m),_.wrap>0&&(_.wrap=-_.wrap),_.pending!==0?0:1)},t.deflateEnd=function(m){var y;return m&&m.state?(y=m.state.status)!==42&&y!==69&&y!==73&&y!==91&&y!==103&&y!==113&&y!==666?u(m,-2):(m.state=null,y===113?u(m,-3):0):-2},t.deflateSetDictionary=function(m,y){var C,_,L,z,B,N,P,W,O=y.length;if(!m||!m.state||(z=(C=m.state).wrap)===2||z===1&&C.status!==42||C.lookahead)return-2;for(z===1&&(m.adler=l(m.adler,y,O,0)),C.wrap=0,O>=C.w_size&&(z===0&&(E(C.head),C.strstart=0,C.block_start=0,C.insert=0),W=new i.Buf8(C.w_size),i.arraySet(W,y,O-C.w_size,C.w_size,0),y=W,O=C.w_size),B=m.avail_in,N=m.next_in,P=m.input,m.avail_in=O,m.next_in=0,m.input=y,x(C);C.lookahead>=3;){_=C.strstart,L=C.lookahead-2;do C.ins_h=(C.ins_h<<C.hash_shift^C.window[_+3-1])&C.hash_mask,C.prev[_&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=_,_++;while(--L);C.strstart=_,C.lookahead=2,x(C)}return C.strstart+=C.lookahead,C.block_start=C.strstart,C.insert=C.lookahead,C.lookahead=0,C.match_length=C.prev_length=2,C.match_available=0,m.next_in=N,m.input=P,m.avail_in=B,C.wrap=z,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){var r=n(37);function i(p){for(var U=p.length;--U>=0;)p[U]=0}var s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var f=new Array(60);i(f);var E=new Array(512);i(E);var w=new Array(256);i(w);var h=new Array(29);i(h);var g,b,R,x=new Array(30);function F(p,U,V,Q,ee){this.static_tree=p,this.extra_bits=U,this.extra_base=V,this.elems=Q,this.max_length=ee,this.has_stree=p&&p.length}function M(p,U){this.dyn_tree=p,this.max_code=0,this.stat_desc=U}function A(p){return p<256?E[p]:E[256+(p>>>7)]}function d(p,U){p.pending_buf[p.pending++]=255&U,p.pending_buf[p.pending++]=U>>>8&255}function I(p,U,V){p.bi_valid>16-V?(p.bi_buf|=U<<p.bi_valid&65535,d(p,p.bi_buf),p.bi_buf=U>>16-p.bi_valid,p.bi_valid+=V-16):(p.bi_buf|=U<<p.bi_valid&65535,p.bi_valid+=V)}function $(p,U,V){I(p,V[2*U],V[2*U+1])}function q(p,U){var V=0;do V|=1&p,p>>>=1,V<<=1;while(--U>0);return V>>>1}function m(p,U,V){var Q,ee,ne=new Array(16),Y=0;for(Q=1;Q<=15;Q++)ne[Q]=Y=Y+V[Q-1]<<1;for(ee=0;ee<=U;ee++){var G=p[2*ee+1];G!==0&&(p[2*ee]=q(ne[G]++,G))}}function y(p){var U;for(U=0;U<286;U++)p.dyn_ltree[2*U]=0;for(U=0;U<30;U++)p.dyn_dtree[2*U]=0;for(U=0;U<19;U++)p.bl_tree[2*U]=0;p.dyn_ltree[512]=1,p.opt_len=p.static_len=0,p.last_lit=p.matches=0}function C(p){p.bi_valid>8?d(p,p.bi_buf):p.bi_valid>0&&(p.pending_buf[p.pending++]=p.bi_buf),p.bi_buf=0,p.bi_valid=0}function _(p,U,V,Q){var ee=2*U,ne=2*V;return p[ee]<p[ne]||p[ee]===p[ne]&&Q[U]<=Q[V]}function L(p,U,V){for(var Q=p.heap[V],ee=V<<1;ee<=p.heap_len&&(ee<p.heap_len&&_(U,p.heap[ee+1],p.heap[ee],p.depth)&&ee++,!_(U,Q,p.heap[ee],p.depth));)p.heap[V]=p.heap[ee],V=ee,ee<<=1;p.heap[V]=Q}function z(p,U,V){var Q,ee,ne,Y,G=0;if(p.last_lit!==0)do Q=p.pending_buf[p.d_buf+2*G]<<8|p.pending_buf[p.d_buf+2*G+1],ee=p.pending_buf[p.l_buf+G],G++,Q===0?$(p,ee,U):($(p,(ne=w[ee])+256+1,U),(Y=s[ne])!==0&&I(p,ee-=h[ne],Y),$(p,ne=A(--Q),V),(Y=l[ne])!==0&&I(p,Q-=x[ne],Y));while(G<p.last_lit);$(p,256,U)}function B(p,U){var V,Q,ee,ne=U.dyn_tree,Y=U.stat_desc.static_tree,G=U.stat_desc.has_stree,S=U.stat_desc.elems,T=-1;for(p.heap_len=0,p.heap_max=573,V=0;V<S;V++)ne[2*V]!==0?(p.heap[++p.heap_len]=T=V,p.depth[V]=0):ne[2*V+1]=0;for(;p.heap_len<2;)ne[2*(ee=p.heap[++p.heap_len]=T<2?++T:0)]=1,p.depth[ee]=0,p.opt_len--,G&&(p.static_len-=Y[2*ee+1]);for(U.max_code=T,V=p.heap_len>>1;V>=1;V--)L(p,ne,V);ee=S;do V=p.heap[1],p.heap[1]=p.heap[p.heap_len--],L(p,ne,1),Q=p.heap[1],p.heap[--p.heap_max]=V,p.heap[--p.heap_max]=Q,ne[2*ee]=ne[2*V]+ne[2*Q],p.depth[ee]=(p.depth[V]>=p.depth[Q]?p.depth[V]:p.depth[Q])+1,ne[2*V+1]=ne[2*Q+1]=ee,p.heap[1]=ee++,L(p,ne,1);while(p.heap_len>=2);p.heap[--p.heap_max]=p.heap[1],function(k,J){var K,re,se,fe,ve,Ie,Se=J.dyn_tree,Ce=J.max_code,Te=J.stat_desc.static_tree,Re=J.stat_desc.has_stree,Be=J.stat_desc.extra_bits,Ze=J.stat_desc.extra_base,et=J.stat_desc.max_length,nt=0;for(fe=0;fe<=15;fe++)k.bl_count[fe]=0;for(Se[2*k.heap[k.heap_max]+1]=0,K=k.heap_max+1;K<573;K++)(fe=Se[2*Se[2*(re=k.heap[K])+1]+1]+1)>et&&(fe=et,nt++),Se[2*re+1]=fe,re>Ce||(k.bl_count[fe]++,ve=0,re>=Ze&&(ve=Be[re-Ze]),Ie=Se[2*re],k.opt_len+=Ie*(fe+ve),Re&&(k.static_len+=Ie*(Te[2*re+1]+ve)));if(nt!==0){do{for(fe=et-1;k.bl_count[fe]===0;)fe--;k.bl_count[fe]--,k.bl_count[fe+1]+=2,k.bl_count[et]--,nt-=2}while(nt>0);for(fe=et;fe!==0;fe--)for(re=k.bl_count[fe];re!==0;)(se=k.heap[--K])>Ce||(Se[2*se+1]!==fe&&(k.opt_len+=(fe-Se[2*se+1])*Se[2*se],Se[2*se+1]=fe),re--)}}(p,U),m(ne,T,p.bl_count)}function N(p,U,V){var Q,ee,ne=-1,Y=U[1],G=0,S=7,T=4;for(Y===0&&(S=138,T=3),U[2*(V+1)+1]=65535,Q=0;Q<=V;Q++)ee=Y,Y=U[2*(Q+1)+1],++G<S&&ee===Y||(G<T?p.bl_tree[2*ee]+=G:ee!==0?(ee!==ne&&p.bl_tree[2*ee]++,p.bl_tree[32]++):G<=10?p.bl_tree[34]++:p.bl_tree[36]++,G=0,ne=ee,Y===0?(S=138,T=3):ee===Y?(S=6,T=3):(S=7,T=4))}function P(p,U,V){var Q,ee,ne=-1,Y=U[1],G=0,S=7,T=4;for(Y===0&&(S=138,T=3),Q=0;Q<=V;Q++)if(ee=Y,Y=U[2*(Q+1)+1],!(++G<S&&ee===Y)){if(G<T)do $(p,ee,p.bl_tree);while(--G!=0);else ee!==0?(ee!==ne&&($(p,ee,p.bl_tree),G--),$(p,16,p.bl_tree),I(p,G-3,2)):G<=10?($(p,17,p.bl_tree),I(p,G-3,3)):($(p,18,p.bl_tree),I(p,G-11,7));G=0,ne=ee,Y===0?(S=138,T=3):ee===Y?(S=6,T=3):(S=7,T=4)}}i(x);var W=!1;function O(p,U,V,Q){I(p,0+(Q?1:0),3),function(ee,ne,Y,G){C(ee),G&&(d(ee,Y),d(ee,~Y)),r.arraySet(ee.pending_buf,ee.window,ne,Y,ee.pending),ee.pending+=Y}(p,U,V,!0)}t._tr_init=function(p){W||(function(){var U,V,Q,ee,ne,Y=new Array(16);for(Q=0,ee=0;ee<28;ee++)for(h[ee]=Q,U=0;U<1<<s[ee];U++)w[Q++]=ee;for(w[Q-1]=ee,ne=0,ee=0;ee<16;ee++)for(x[ee]=ne,U=0;U<1<<l[ee];U++)E[ne++]=ee;for(ne>>=7;ee<30;ee++)for(x[ee]=ne<<7,U=0;U<1<<l[ee]-7;U++)E[256+ne++]=ee;for(V=0;V<=15;V++)Y[V]=0;for(U=0;U<=143;)u[2*U+1]=8,U++,Y[8]++;for(;U<=255;)u[2*U+1]=9,U++,Y[9]++;for(;U<=279;)u[2*U+1]=7,U++,Y[7]++;for(;U<=287;)u[2*U+1]=8,U++,Y[8]++;for(m(u,287,Y),U=0;U<30;U++)f[2*U+1]=5,f[2*U]=q(U,5);g=new F(u,s,257,286,15),b=new F(f,l,0,30,15),R=new F(new Array(0),o,0,19,7)}(),W=!0),p.l_desc=new M(p.dyn_ltree,g),p.d_desc=new M(p.dyn_dtree,b),p.bl_desc=new M(p.bl_tree,R),p.bi_buf=0,p.bi_valid=0,y(p)},t._tr_stored_block=O,t._tr_flush_block=function(p,U,V,Q){var ee,ne,Y=0;p.level>0?(p.strm.data_type===2&&(p.strm.data_type=function(G){var S,T=4093624447;for(S=0;S<=31;S++,T>>>=1)if(1&T&&G.dyn_ltree[2*S]!==0)return 0;if(G.dyn_ltree[18]!==0||G.dyn_ltree[20]!==0||G.dyn_ltree[26]!==0)return 1;for(S=32;S<256;S++)if(G.dyn_ltree[2*S]!==0)return 1;return 0}(p)),B(p,p.l_desc),B(p,p.d_desc),Y=function(G){var S;for(N(G,G.dyn_ltree,G.l_desc.max_code),N(G,G.dyn_dtree,G.d_desc.max_code),B(G,G.bl_desc),S=18;S>=3&&G.bl_tree[2*c[S]+1]===0;S--);return G.opt_len+=3*(S+1)+5+5+4,S}(p),ee=p.opt_len+3+7>>>3,(ne=p.static_len+3+7>>>3)<=ee&&(ee=ne)):ee=ne=V+5,V+4<=ee&&U!==-1?O(p,U,V,Q):p.strategy===4||ne===ee?(I(p,2+(Q?1:0),3),z(p,u,f)):(I(p,4+(Q?1:0),3),function(G,S,T,k){var J;for(I(G,S-257,5),I(G,T-1,5),I(G,k-4,4),J=0;J<k;J++)I(G,G.bl_tree[2*c[J]+1],3);P(G,G.dyn_ltree,S-1),P(G,G.dyn_dtree,T-1)}(p,p.l_desc.max_code+1,p.d_desc.max_code+1,Y+1),z(p,p.dyn_ltree,p.dyn_dtree)),y(p),Q&&C(p)},t._tr_tally=function(p,U,V){return p.pending_buf[p.d_buf+2*p.last_lit]=U>>>8&255,p.pending_buf[p.d_buf+2*p.last_lit+1]=255&U,p.pending_buf[p.l_buf+p.last_lit]=255&V,p.last_lit++,U===0?p.dyn_ltree[2*V]++:(p.matches++,U--,p.dyn_ltree[2*(w[V]+256+1)]++,p.dyn_dtree[2*A(U)]++),p.last_lit===p.lit_bufsize-1},t._tr_align=function(p){I(p,2,3),$(p,256,u),function(U){U.bi_valid===16?(d(U,U.bi_buf),U.bi_buf=0,U.bi_valid=0):U.bi_valid>=8&&(U.pending_buf[U.pending++]=255&U.bi_buf,U.bi_buf>>=8,U.bi_valid-=8)}(p)}},function(e,t,n){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){var r=n(37),i=n(75),s=n(76),l=n(176),o=n(177);function c(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(M){var A;return M&&M.state?(A=M.state,M.total_in=M.total_out=A.total=0,M.msg="",A.wrap&&(M.adler=1&A.wrap),A.mode=1,A.last=0,A.havedict=0,A.dmax=32768,A.head=null,A.hold=0,A.bits=0,A.lencode=A.lendyn=new r.Buf32(852),A.distcode=A.distdyn=new r.Buf32(592),A.sane=1,A.back=-1,0):-2}function E(M){var A;return M&&M.state?((A=M.state).wsize=0,A.whave=0,A.wnext=0,f(M)):-2}function w(M,A){var d,I;return M&&M.state?(I=M.state,A<0?(d=0,A=-A):(d=1+(A>>4),A<48&&(A&=15)),A&&(A<8||A>15)?-2:(I.window!==null&&I.wbits!==A&&(I.window=null),I.wrap=d,I.wbits=A,E(M))):-2}function h(M,A){var d,I;return M?(I=new u,M.state=I,I.window=null,(d=w(M,A))!==0&&(M.state=null),d):-2}var g,b,R=!0;function x(M){if(R){var A;for(g=new r.Buf32(512),b=new r.Buf32(32),A=0;A<144;)M.lens[A++]=8;for(;A<256;)M.lens[A++]=9;for(;A<280;)M.lens[A++]=7;for(;A<288;)M.lens[A++]=8;for(o(1,M.lens,0,288,g,0,M.work,{bits:9}),A=0;A<32;)M.lens[A++]=5;o(2,M.lens,0,32,b,0,M.work,{bits:5}),R=!1}M.lencode=g,M.lenbits=9,M.distcode=b,M.distbits=5}function F(M,A,d,I){var $,q=M.state;return q.window===null&&(q.wsize=1<<q.wbits,q.wnext=0,q.whave=0,q.window=new r.Buf8(q.wsize)),I>=q.wsize?(r.arraySet(q.window,A,d-q.wsize,q.wsize,0),q.wnext=0,q.whave=q.wsize):(($=q.wsize-q.wnext)>I&&($=I),r.arraySet(q.window,A,d-I,$,q.wnext),(I-=$)?(r.arraySet(q.window,A,d-I,I,0),q.wnext=I,q.whave=q.wsize):(q.wnext+=$,q.wnext===q.wsize&&(q.wnext=0),q.whave<q.wsize&&(q.whave+=$))),0}t.inflateReset=E,t.inflateReset2=w,t.inflateResetKeep=f,t.inflateInit=function(M){return h(M,15)},t.inflateInit2=h,t.inflate=function(M,A){var d,I,$,q,m,y,C,_,L,z,B,N,P,W,O,p,U,V,Q,ee,ne,Y,G,S,T=0,k=new r.Buf8(4),J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return-2;(d=M.state).mode===12&&(d.mode=13),m=M.next_out,$=M.output,C=M.avail_out,q=M.next_in,I=M.input,y=M.avail_in,_=d.hold,L=d.bits,z=y,B=C,Y=0;e:for(;;)switch(d.mode){case 1:if(d.wrap===0){d.mode=13;break}for(;L<16;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(2&d.wrap&&_===35615){d.check=0,k[0]=255&_,k[1]=_>>>8&255,d.check=s(d.check,k,2,0),_=0,L=0,d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&_)<<8)+(_>>8))%31){M.msg="incorrect header check",d.mode=30;break}if((15&_)!=8){M.msg="unknown compression method",d.mode=30;break}if(L-=4,ne=8+(15&(_>>>=4)),d.wbits===0)d.wbits=ne;else if(ne>d.wbits){M.msg="invalid window size",d.mode=30;break}d.dmax=1<<ne,M.adler=d.check=1,d.mode=512&_?10:12,_=0,L=0;break;case 2:for(;L<16;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(d.flags=_,(255&d.flags)!=8){M.msg="unknown compression method",d.mode=30;break}if(57344&d.flags){M.msg="unknown header flags set",d.mode=30;break}d.head&&(d.head.text=_>>8&1),512&d.flags&&(k[0]=255&_,k[1]=_>>>8&255,d.check=s(d.check,k,2,0)),_=0,L=0,d.mode=3;case 3:for(;L<32;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}d.head&&(d.head.time=_),512&d.flags&&(k[0]=255&_,k[1]=_>>>8&255,k[2]=_>>>16&255,k[3]=_>>>24&255,d.check=s(d.check,k,4,0)),_=0,L=0,d.mode=4;case 4:for(;L<16;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}d.head&&(d.head.xflags=255&_,d.head.os=_>>8),512&d.flags&&(k[0]=255&_,k[1]=_>>>8&255,d.check=s(d.check,k,2,0)),_=0,L=0,d.mode=5;case 5:if(1024&d.flags){for(;L<16;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}d.length=_,d.head&&(d.head.extra_len=_),512&d.flags&&(k[0]=255&_,k[1]=_>>>8&255,d.check=s(d.check,k,2,0)),_=0,L=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&((N=d.length)>y&&(N=y),N&&(d.head&&(ne=d.head.extra_len-d.length,d.head.extra||(d.head.extra=new Array(d.head.extra_len)),r.arraySet(d.head.extra,I,q,N,ne)),512&d.flags&&(d.check=s(d.check,I,N,q)),y-=N,q+=N,d.length-=N),d.length))break e;d.length=0,d.mode=7;case 7:if(2048&d.flags){if(y===0)break e;N=0;do ne=I[q+N++],d.head&&ne&&d.length<65536&&(d.head.name+=String.fromCharCode(ne));while(ne&&N<y);if(512&d.flags&&(d.check=s(d.check,I,N,q)),y-=N,q+=N,ne)break e}else d.head&&(d.head.name=null);d.length=0,d.mode=8;case 8:if(4096&d.flags){if(y===0)break e;N=0;do ne=I[q+N++],d.head&&ne&&d.length<65536&&(d.head.comment+=String.fromCharCode(ne));while(ne&&N<y);if(512&d.flags&&(d.check=s(d.check,I,N,q)),y-=N,q+=N,ne)break e}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;L<16;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(_!==(65535&d.check)){M.msg="header crc mismatch",d.mode=30;break}_=0,L=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0),M.adler=d.check=0,d.mode=12;break;case 10:for(;L<32;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}M.adler=d.check=c(_),_=0,L=0,d.mode=11;case 11:if(d.havedict===0)return M.next_out=m,M.avail_out=C,M.next_in=q,M.avail_in=y,d.hold=_,d.bits=L,2;M.adler=d.check=1,d.mode=12;case 12:if(A===5||A===6)break e;case 13:if(d.last){_>>>=7&L,L-=7&L,d.mode=27;break}for(;L<3;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}switch(d.last=1&_,L-=1,3&(_>>>=1)){case 0:d.mode=14;break;case 1:if(x(d),d.mode=20,A===6){_>>>=2,L-=2;break e}break;case 2:d.mode=17;break;case 3:M.msg="invalid block type",d.mode=30}_>>>=2,L-=2;break;case 14:for(_>>>=7&L,L-=7&L;L<32;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if((65535&_)!=(_>>>16^65535)){M.msg="invalid stored block lengths",d.mode=30;break}if(d.length=65535&_,_=0,L=0,d.mode=15,A===6)break e;case 15:d.mode=16;case 16:if(N=d.length){if(N>y&&(N=y),N>C&&(N=C),N===0)break e;r.arraySet($,I,q,N,m),y-=N,q+=N,C-=N,m+=N,d.length-=N;break}d.mode=12;break;case 17:for(;L<14;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(d.nlen=257+(31&_),_>>>=5,L-=5,d.ndist=1+(31&_),_>>>=5,L-=5,d.ncode=4+(15&_),_>>>=4,L-=4,d.nlen>286||d.ndist>30){M.msg="too many length or distance symbols",d.mode=30;break}d.have=0,d.mode=18;case 18:for(;d.have<d.ncode;){for(;L<3;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}d.lens[J[d.have++]]=7&_,_>>>=3,L-=3}for(;d.have<19;)d.lens[J[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,G={bits:d.lenbits},Y=o(0,d.lens,0,19,d.lencode,0,d.work,G),d.lenbits=G.bits,Y){M.msg="invalid code lengths set",d.mode=30;break}d.have=0,d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;p=(T=d.lencode[_&(1<<d.lenbits)-1])>>>16&255,U=65535&T,!((O=T>>>24)<=L);){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(U<16)_>>>=O,L-=O,d.lens[d.have++]=U;else{if(U===16){for(S=O+2;L<S;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(_>>>=O,L-=O,d.have===0){M.msg="invalid bit length repeat",d.mode=30;break}ne=d.lens[d.have-1],N=3+(3&_),_>>>=2,L-=2}else if(U===17){for(S=O+3;L<S;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}L-=O,ne=0,N=3+(7&(_>>>=O)),_>>>=3,L-=3}else{for(S=O+7;L<S;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}L-=O,ne=0,N=11+(127&(_>>>=O)),_>>>=7,L-=7}if(d.have+N>d.nlen+d.ndist){M.msg="invalid bit length repeat",d.mode=30;break}for(;N--;)d.lens[d.have++]=ne}}if(d.mode===30)break;if(d.lens[256]===0){M.msg="invalid code -- missing end-of-block",d.mode=30;break}if(d.lenbits=9,G={bits:d.lenbits},Y=o(1,d.lens,0,d.nlen,d.lencode,0,d.work,G),d.lenbits=G.bits,Y){M.msg="invalid literal/lengths set",d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,G={bits:d.distbits},Y=o(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,G),d.distbits=G.bits,Y){M.msg="invalid distances set",d.mode=30;break}if(d.mode=20,A===6)break e;case 20:d.mode=21;case 21:if(y>=6&&C>=258){M.next_out=m,M.avail_out=C,M.next_in=q,M.avail_in=y,d.hold=_,d.bits=L,l(M,B),m=M.next_out,$=M.output,C=M.avail_out,q=M.next_in,I=M.input,y=M.avail_in,_=d.hold,L=d.bits,d.mode===12&&(d.back=-1);break}for(d.back=0;p=(T=d.lencode[_&(1<<d.lenbits)-1])>>>16&255,U=65535&T,!((O=T>>>24)<=L);){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(p&&!(240&p)){for(V=O,Q=p,ee=U;p=(T=d.lencode[ee+((_&(1<<V+Q)-1)>>V)])>>>16&255,U=65535&T,!(V+(O=T>>>24)<=L);){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}_>>>=V,L-=V,d.back+=V}if(_>>>=O,L-=O,d.back+=O,d.length=U,p===0){d.mode=26;break}if(32&p){d.back=-1,d.mode=12;break}if(64&p){M.msg="invalid literal/length code",d.mode=30;break}d.extra=15&p,d.mode=22;case 22:if(d.extra){for(S=d.extra;L<S;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}d.length+=_&(1<<d.extra)-1,_>>>=d.extra,L-=d.extra,d.back+=d.extra}d.was=d.length,d.mode=23;case 23:for(;p=(T=d.distcode[_&(1<<d.distbits)-1])>>>16&255,U=65535&T,!((O=T>>>24)<=L);){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(!(240&p)){for(V=O,Q=p,ee=U;p=(T=d.distcode[ee+((_&(1<<V+Q)-1)>>V)])>>>16&255,U=65535&T,!(V+(O=T>>>24)<=L);){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}_>>>=V,L-=V,d.back+=V}if(_>>>=O,L-=O,d.back+=O,64&p){M.msg="invalid distance code",d.mode=30;break}d.offset=U,d.extra=15&p,d.mode=24;case 24:if(d.extra){for(S=d.extra;L<S;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}d.offset+=_&(1<<d.extra)-1,_>>>=d.extra,L-=d.extra,d.back+=d.extra}if(d.offset>d.dmax){M.msg="invalid distance too far back",d.mode=30;break}d.mode=25;case 25:if(C===0)break e;if(N=B-C,d.offset>N){if((N=d.offset-N)>d.whave&&d.sane){M.msg="invalid distance too far back",d.mode=30;break}N>d.wnext?(N-=d.wnext,P=d.wsize-N):P=d.wnext-N,N>d.length&&(N=d.length),W=d.window}else W=$,P=m-d.offset,N=d.length;N>C&&(N=C),C-=N,d.length-=N;do $[m++]=W[P++];while(--N);d.length===0&&(d.mode=21);break;case 26:if(C===0)break e;$[m++]=d.length,C--,d.mode=21;break;case 27:if(d.wrap){for(;L<32;){if(y===0)break e;y--,_|=I[q++]<<L,L+=8}if(B-=C,M.total_out+=B,d.total+=B,B&&(M.adler=d.check=d.flags?s(d.check,$,B,m-B):i(d.check,$,B,m-B)),B=C,(d.flags?_:c(_))!==d.check){M.msg="incorrect data check",d.mode=30;break}_=0,L=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;L<32;){if(y===0)break e;y--,_+=I[q++]<<L,L+=8}if(_!==(4294967295&d.total)){M.msg="incorrect length check",d.mode=30;break}_=0,L=0}d.mode=29;case 29:Y=1;break e;case 30:Y=-3;break e;case 31:return-4;case 32:default:return-2}return M.next_out=m,M.avail_out=C,M.next_in=q,M.avail_in=y,d.hold=_,d.bits=L,(d.wsize||B!==M.avail_out&&d.mode<30&&(d.mode<27||A!==4))&&F(M,M.output,M.next_out,B-M.avail_out)?(d.mode=31,-4):(z-=M.avail_in,B-=M.avail_out,M.total_in+=z,M.total_out+=B,d.total+=B,d.wrap&&B&&(M.adler=d.check=d.flags?s(d.check,$,B,M.next_out-B):i(d.check,$,B,M.next_out-B)),M.data_type=d.bits+(d.last?64:0)+(d.mode===12?128:0)+(d.mode===20||d.mode===15?256:0),(z===0&&B===0||A===4)&&Y===0&&(Y=-5),Y)},t.inflateEnd=function(M){if(!M||!M.state)return-2;var A=M.state;return A.window&&(A.window=null),M.state=null,0},t.inflateGetHeader=function(M,A){var d;return M&&M.state&&2&(d=M.state).wrap?(d.head=A,A.done=!1,0):-2},t.inflateSetDictionary=function(M,A){var d,I=A.length;return M&&M.state?(d=M.state).wrap!==0&&d.mode!==11?-2:d.mode===11&&i(1,A,I,0)!==d.check?-3:F(M,A,I,I)?(d.mode=31,-4):(d.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){e.exports=function(r,i){var s,l,o,c,u,f,E,w,h,g,b,R,x,F,M,A,d,I,$,q,m,y,C,_,L;s=r.state,l=r.next_in,_=r.input,o=l+(r.avail_in-5),c=r.next_out,L=r.output,u=c-(i-r.avail_out),f=c+(r.avail_out-257),E=s.dmax,w=s.wsize,h=s.whave,g=s.wnext,b=s.window,R=s.hold,x=s.bits,F=s.lencode,M=s.distcode,A=(1<<s.lenbits)-1,d=(1<<s.distbits)-1;e:do{x<15&&(R+=_[l++]<<x,x+=8,R+=_[l++]<<x,x+=8),I=F[R&A];t:for(;;){if(R>>>=$=I>>>24,x-=$,($=I>>>16&255)===0)L[c++]=65535&I;else{if(!(16&$)){if(!(64&$)){I=F[(65535&I)+(R&(1<<$)-1)];continue t}if(32&$){s.mode=12;break e}r.msg="invalid literal/length code",s.mode=30;break e}q=65535&I,($&=15)&&(x<$&&(R+=_[l++]<<x,x+=8),q+=R&(1<<$)-1,R>>>=$,x-=$),x<15&&(R+=_[l++]<<x,x+=8,R+=_[l++]<<x,x+=8),I=M[R&d];n:for(;;){if(R>>>=$=I>>>24,x-=$,!(16&($=I>>>16&255))){if(!(64&$)){I=M[(65535&I)+(R&(1<<$)-1)];continue n}r.msg="invalid distance code",s.mode=30;break e}if(m=65535&I,x<($&=15)&&(R+=_[l++]<<x,(x+=8)<$&&(R+=_[l++]<<x,x+=8)),(m+=R&(1<<$)-1)>E){r.msg="invalid distance too far back",s.mode=30;break e}if(R>>>=$,x-=$,m>($=c-u)){if(($=m-$)>h&&s.sane){r.msg="invalid distance too far back",s.mode=30;break e}if(y=0,C=b,g===0){if(y+=w-$,$<q){q-=$;do L[c++]=b[y++];while(--$);y=c-m,C=L}}else if(g<$){if(y+=w+g-$,($-=g)<q){q-=$;do L[c++]=b[y++];while(--$);if(y=0,g<q){q-=$=g;do L[c++]=b[y++];while(--$);y=c-m,C=L}}}else if(y+=g-$,$<q){q-=$;do L[c++]=b[y++];while(--$);y=c-m,C=L}for(;q>2;)L[c++]=C[y++],L[c++]=C[y++],L[c++]=C[y++],q-=3;q&&(L[c++]=C[y++],q>1&&(L[c++]=C[y++]))}else{y=c-m;do L[c++]=L[y++],L[c++]=L[y++],L[c++]=L[y++],q-=3;while(q>2);q&&(L[c++]=L[y++],q>1&&(L[c++]=L[y++]))}break}}break}}while(l<o&&c<f);l-=q=x>>3,R&=(1<<(x-=q<<3))-1,r.next_in=l,r.next_out=c,r.avail_in=l<o?o-l+5:5-(l-o),r.avail_out=c<f?f-c+257:257-(c-f),s.hold=R,s.bits=x}},function(e,t,n){var r=n(37),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(c,u,f,E,w,h,g,b){var R,x,F,M,A,d,I,$,q,m=b.bits,y=0,C=0,_=0,L=0,z=0,B=0,N=0,P=0,W=0,O=0,p=null,U=0,V=new r.Buf16(16),Q=new r.Buf16(16),ee=null,ne=0;for(y=0;y<=15;y++)V[y]=0;for(C=0;C<E;C++)V[u[f+C]]++;for(z=m,L=15;L>=1&&V[L]===0;L--);if(z>L&&(z=L),L===0)return w[h++]=20971520,w[h++]=20971520,b.bits=1,0;for(_=1;_<L&&V[_]===0;_++);for(z<_&&(z=_),P=1,y=1;y<=15;y++)if(P<<=1,(P-=V[y])<0)return-1;if(P>0&&(c===0||L!==1))return-1;for(Q[1]=0,y=1;y<15;y++)Q[y+1]=Q[y]+V[y];for(C=0;C<E;C++)u[f+C]!==0&&(g[Q[u[f+C]]++]=C);if(c===0?(p=ee=g,d=19):c===1?(p=i,U-=257,ee=s,ne-=257,d=256):(p=l,ee=o,d=-1),O=0,C=0,y=_,A=h,B=z,N=0,F=-1,M=(W=1<<z)-1,c===1&&W>852||c===2&&W>592)return 1;for(;;){I=y-N,g[C]<d?($=0,q=g[C]):g[C]>d?($=ee[ne+g[C]],q=p[U+g[C]]):($=96,q=0),R=1<<y-N,_=x=1<<B;do w[A+(O>>N)+(x-=R)]=I<<24|$<<16|q|0;while(x!==0);for(R=1<<y-1;O&R;)R>>=1;if(R!==0?(O&=R-1,O+=R):O=0,C++,--V[y]==0){if(y===L)break;y=u[f+g[C]]}if(y>z&&(O&M)!==F){for(N===0&&(N=z),A+=_,P=1<<(B=y-N);B+N<L&&!((P-=V[B+N])<=0);)B++,P<<=1;if(W+=1<<B,c===1&&W>852||c===2&&W>592)return 1;w[F=O&M]=z<<24|B<<16|A-h|0}}return O!==0&&(w[A+O]=y-N<<24|64<<16|0),b.bits=z,0}},function(e,t,n){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){},function(e,t,n){function r(u,f){var E=Object.keys(u);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);f&&(w=w.filter(function(h){return Object.getOwnPropertyDescriptor(u,h).enumerable})),E.push.apply(E,w)}return E}function i(u,f,E){return f in u?Object.defineProperty(u,f,{value:E,enumerable:!0,configurable:!0,writable:!0}):u[f]=E,u}function s(u,f){for(var E=0;E<f.length;E++){var w=f[E];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(u,w.key,w)}}var l=n(5).Buffer,o=n(181).inspect,c=o&&o.custom||"inspect";e.exports=function(){function u(){(function(w,h){if(!(w instanceof h))throw new TypeError("Cannot call a class as a function")})(this,u),this.head=null,this.tail=null,this.length=0}var f,E;return f=u,(E=[{key:"push",value:function(w){var h={data:w,next:null};this.length>0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(w){var h={data:w,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var h=this.head,g=""+h.data;h=h.next;)g+=w+h.data;return g}},{key:"concat",value:function(w){if(this.length===0)return l.alloc(0);for(var h,g,b,R=l.allocUnsafe(w>>>0),x=this.head,F=0;x;)h=x.data,g=R,b=F,l.prototype.copy.call(h,g,b),F+=x.data.length,x=x.next;return R}},{key:"consume",value:function(w,h){var g;return w<this.head.data.length?(g=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):g=w===this.head.data.length?this.shift():h?this._getString(w):this._getBuffer(w),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var h=this.head,g=1,b=h.data;for(w-=b.length;h=h.next;){var R=h.data,x=w>R.length?R.length:w;if(x===R.length?b+=R:b+=R.slice(0,w),(w-=x)==0){x===R.length?(++g,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=R.slice(x));break}++g}return this.length-=g,b}},{key:"_getBuffer",value:function(w){var h=l.allocUnsafe(w),g=this.head,b=1;for(g.data.copy(h),w-=g.data.length;g=g.next;){var R=g.data,x=w>R.length?R.length:w;if(R.copy(h,h.length-w,0,x),(w-=x)==0){x===R.length?(++b,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=R.slice(x));break}++b}return this.length-=b,h}},{key:c,value:function(w,h){return o(this,function(g){for(var b=1;b<arguments.length;b++){var R=arguments[b]!=null?arguments[b]:{};b%2?r(Object(R),!0).forEach(function(x){i(g,x,R[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(R)):r(Object(R)).forEach(function(x){Object.defineProperty(g,x,Object.getOwnPropertyDescriptor(R,x))})}return g}({},h,{depth:0,customInspect:!1}))}}])&&s(f.prototype,E),u}()},function(e,t){},function(e,t,n){(function(r){var i;function s(M,A,d){return A in M?Object.defineProperty(M,A,{value:d,enumerable:!0,configurable:!0,writable:!0}):M[A]=d,M}var l=n(49),o=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),E=Symbol("lastPromise"),w=Symbol("handlePromise"),h=Symbol("stream");function g(M,A){return{value:M,done:A}}function b(M){var A=M[o];if(A!==null){var d=M[h].read();d!==null&&(M[E]=null,M[o]=null,M[c]=null,A(g(d,!1)))}}function R(M){r.nextTick(b,M)}var x=Object.getPrototypeOf(function(){}),F=Object.setPrototypeOf((s(i={get stream(){return this[h]},next:function(){var M=this,A=this[u];if(A!==null)return Promise.reject(A);if(this[f])return Promise.resolve(g(void 0,!0));if(this[h].destroyed)return new Promise(function(q,m){r.nextTick(function(){M[u]?m(M[u]):q(g(void 0,!0))})});var d,I=this[E];if(I)d=new Promise(function(q,m){return function(y,C){q.then(function(){m[f]?y(g(void 0,!0)):m[w](y,C)},C)}}(I,this));else{var $=this[h].read();if($!==null)return Promise.resolve(g($,!1));d=new Promise(this[w])}return this[E]=d,d}},Symbol.asyncIterator,function(){return this}),s(i,"return",function(){var M=this;return new Promise(function(A,d){M[h].destroy(null,function(I){I?d(I):A(g(void 0,!0))})})}),i),x);e.exports=function(M){var A,d=Object.create(F,(s(A={},h,{value:M,writable:!0}),s(A,o,{value:null,writable:!0}),s(A,c,{value:null,writable:!0}),s(A,u,{value:null,writable:!0}),s(A,f,{value:M._readableState.endEmitted,writable:!0}),s(A,w,{value:function(I,$){var q=d[h].read();q?(d[E]=null,d[o]=null,d[c]=null,I(g(q,!1))):(d[o]=I,d[c]=$)},writable:!0}),A));return d[E]=null,l(M,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var $=d[c];return $!==null&&(d[E]=null,d[o]=null,d[c]=null,$(I)),void(d[u]=I)}var q=d[o];q!==null&&(d[E]=null,d[o]=null,d[c]=null,q(g(void 0,!0))),d[f]=!0}),M.on("readable",R.bind(null,d)),d}}).call(this,n(2))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){e.exports=i;var r=n(82);function i(s){if(!(this instanceof i))return new i(s);r.call(this,s)}n(7)(i,r),i.prototype._transform=function(s,l,o){o(null,s)}},function(e,t,n){var r,i=n(26).codes,s=i.ERR_MISSING_ARGS,l=i.ERR_STREAM_DESTROYED;function o(w){if(w)throw w}function c(w,h,g,b){b=function(F){var M=!1;return function(){M||(M=!0,F.apply(void 0,arguments))}}(b);var R=!1;w.on("close",function(){R=!0}),r===void 0&&(r=n(49)),r(w,{readable:h,writable:g},function(F){if(F)return b(F);R=!0,b()});var x=!1;return function(F){if(!R&&!x)return x=!0,function(M){return M.setHeader&&typeof M.abort=="function"}(w)?w.abort():typeof w.destroy=="function"?w.destroy():void b(F||new l("pipe"))}}function u(w){w()}function f(w,h){return w.pipe(h)}function E(w){return w.length?typeof w[w.length-1]!="function"?o:w.pop():o}e.exports=function(){for(var w=arguments.length,h=new Array(w),g=0;g<w;g++)h[g]=arguments[g];var b,R=E(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new s("streams");var x=h.map(function(F,M){var A=M<h.length-1;return c(F,A,M>0,function(d){b||(b=d),d&&x.forEach(u),A||(x.forEach(u),R(b))})});return h.reduce(f)}},function(e,t,n){var r=n(187)(function i(s,l){return(l=l||{}).namespace=s,l.prod=!0,l.dev=!1,l.force||i.force?i.yep(l):i.nope(l)});e.exports=r},function(e,t){var n=[],r=[],i=function(){};function s(g){return!~n.indexOf(g)&&(n.push(g),!0)}function l(g){i=g}function o(g){for(var b=[],R=0;R<n.length;R++)if(n[R].async)b.push(n[R]);else if(n[R](g))return!0;return!!b.length&&new Promise(function(x){Promise.all(b.map(function(F){return F(g)})).then(function(F){x(F.some(Boolean))})})}function c(g){return!~r.indexOf(g)&&(r.push(g),!0)}function u(){i.apply(i,arguments)}function f(g){for(var b=0;b<r.length;b++)g=r[b].apply(r[b],arguments);return g}function E(g,b){var R=Object.prototype.hasOwnProperty;for(var x in b)R.call(b,x)&&(g[x]=b[x]);return g}function w(g){return g.enabled=!1,g.modify=c,g.set=l,g.use=s,E(function(){return!1},g)}function h(g){return g.enabled=!0,g.modify=c,g.set=l,g.use=s,E(function(){var b=Array.prototype.slice.call(arguments,0);return u.call(u,g,f(b,g)),!0},g)}e.exports=function(g){return g.introduce=E,g.enabled=o,g.process=f,g.modify=c,g.write=u,g.nope=w,g.yep=h,g.set=l,g.use=s,g}},function(e,t,n){(function(r){var i=n(65),s=n(22).StringDecoder,l=n(32).Stream;function o(){}e.exports=function(c,u){var f=r.alloc(65536),E=new s("utf8"),w=new l,h="",g=0,b=0;return c.start===-1&&delete c.start,w.readable=!0,w.destroy=function(){w.destroyed=!0,w.emit("end"),w.emit("close")},i.open(c.file,"a+","0644",function(R,x){if(R)return u?u(R):w.emit("error",R),void w.destroy();(function F(){if(!w.destroyed)return i.read(x,f,0,f.length,g,function(M,A){if(M)return u?u(M):w.emit("error",M),void w.destroy();if(!A)return h&&((c.start==null||b>c.start)&&(u?u(null,h):w.emit("line",h)),b++,h=""),setTimeout(F,1e3);var d=E.write(f.slice(0,A));u||w.emit("data",d);for(var I=(d=(h+d).split(/\n+/)).length-1,$=0;$<I;$++)(c.start==null||b>c.start)&&(u?u(null,d[$]):w.emit("line",d[$])),b++;return h=d[I],g+=A,F()});i.close(x,o)})()}),u?w.destroy:w}}).call(this,n(5).Buffer)},function(e,t,n){(function(r,i){function s(M){return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(M)}function l(M,A){var d=Object.keys(M);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(M);A&&(I=I.filter(function($){return Object.getOwnPropertyDescriptor(M,$).enumerable})),d.push.apply(d,I)}return d}function o(M){for(var A=1;A<arguments.length;A++){var d=arguments[A]!=null?arguments[A]:{};A%2?l(Object(d),!0).forEach(function(I){c(M,I,d[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(d)):l(Object(d)).forEach(function(I){Object.defineProperty(M,I,Object.getOwnPropertyDescriptor(d,I))})}return M}function c(M,A,d){return A in M?Object.defineProperty(M,A,{value:d,enumerable:!0,configurable:!0,writable:!0}):M[A]=d,M}function u(M,A){if(!(M instanceof A))throw new TypeError("Cannot call a class as a function")}function f(M,A){for(var d=0;d<A.length;d++){var I=A[d];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(M,I.key,I)}}function E(M,A){return(E=Object.setPrototypeOf||function(d,I){return d.__proto__=I,d})(M,A)}function w(M){var A=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var d,I=g(M);if(A){var $=g(this).constructor;d=Reflect.construct(I,arguments,$)}else d=I.apply(this,arguments);return h(this,d)}}function h(M,A){return!A||s(A)!=="object"&&typeof A!="function"?function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(M):A}function g(M){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(M)}var b=n(83),R=n(200),x=n(32).Stream,F=n(20);e.exports=function(M){(function(q,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");q.prototype=Object.create(m&&m.prototype,{constructor:{value:q,writable:!0,configurable:!0}}),m&&E(q,m)})($,M);var A,d,I=w($);function $(){var q,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u(this,$),(q=I.call(this,m)).options=m,q.name=m.name||"http",q.ssl=!!m.ssl,q.host=m.host||"localhost",q.port=m.port,q.auth=m.auth,q.path=m.path||"",q.agent=m.agent,q.headers=m.headers||{},q.headers["content-type"]="application/json",q.port||(q.port=q.ssl?443:80),q}return A=$,(d=[{key:"log",value:function(q,m){var y=this;this._request(q,function(C,_){_&&_.statusCode!==200&&(C=new Error("Invalid HTTP Status Code: ".concat(_.statusCode))),C?y.emit("warn",C):y.emit("logged",q)}),m&&r(m)}},{key:"query",value:function(q,m){typeof q=="function"&&(m=q,q={}),(q={method:"query",params:this.normalizeQuery(q)}).params.path&&(q.path=q.params.path,delete q.params.path),q.params.auth&&(q.auth=q.params.auth,delete q.params.auth),this._request(q,function(y,C,_){if(C&&C.statusCode!==200&&(y=new Error("Invalid HTTP Status Code: ".concat(C.statusCode))),y)return m(y);if(typeof _=="string")try{_=JSON.parse(_)}catch(L){return m(L)}m(null,_)})}},{key:"stream",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=new x;(q={method:"stream",params:q}).params.path&&(q.path=q.params.path,delete q.params.path),q.params.auth&&(q.auth=q.params.auth,delete q.params.auth);var y="",C=this._request(q);return m.destroy=function(){return C.destroy()},C.on("data",function(_){for(var L=(_=(y+_).split(/\n+/)).length-1,z=0;z<L;z++)try{m.emit("log",JSON.parse(_[z]))}catch(B){m.emit("error",B)}y=_[L]}),C.on("error",function(_){return m.emit("error",_)}),m}},{key:"_request",value:function(q,m){var y=(q=q||{}).auth||this.auth,C=q.path||this.path||"";delete q.auth,delete q.path;var _=Object.assign({},this.headers);y&&y.bearer&&(_.Authorization="Bearer ".concat(y.bearer));var L=(this.ssl?R:b).request(o(o({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(C.replace(/^\//,"")),headers:_,auth:y&&y.username&&y.password?"".concat(y.username,":").concat(y.password):"",agent:this.agent}));L.on("error",m),L.on("response",function(z){return z.on("end",function(){return m(null,z)}).resume()}),L.end(i.from(JSON.stringify(q),"utf8"))}}])&&f(A.prototype,d),$}(F)}).call(this,n(15).setImmediate,n(5).Buffer)},function(e,t,n){(function(r,i,s){var l=n(84),o=n(7),c=n(85),u=n(31),f=n(191),E=c.IncomingMessage,w=c.readyStates,h=e.exports=function(b){var R,x=this;u.Writable.call(x),x._opts=b,x._body=[],x._headers={},b.auth&&x.setHeader("Authorization","Basic "+new r(b.auth).toString("base64")),Object.keys(b.headers).forEach(function(M){x.setHeader(M,b.headers[M])});var F=!0;if(b.mode==="disable-fetch"||"requestTimeout"in b&&!l.abortController)F=!1,R=!0;else if(b.mode==="prefer-streaming")R=!1;else if(b.mode==="allow-wrong-content-type")R=!l.overrideMimeType;else{if(b.mode&&b.mode!=="default"&&b.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");R=!0}x._mode=function(M,A){return l.fetch&&A?"fetch":l.mozchunkedarraybuffer?"moz-chunked-arraybuffer":l.msstream?"ms-stream":l.arraybuffer&&M?"arraybuffer":l.vbArray&&M?"text:vbarray":"text"}(R,F),x._fetchTimer=null,x.on("finish",function(){x._onFinish()})};o(h,u.Writable),h.prototype.setHeader=function(b,R){var x=b.toLowerCase();g.indexOf(x)===-1&&(this._headers[x]={name:b,value:R})},h.prototype.getHeader=function(b){var R=this._headers[b.toLowerCase()];return R?R.value:null},h.prototype.removeHeader=function(b){delete this._headers[b.toLowerCase()]},h.prototype._onFinish=function(){var b=this;if(!b._destroyed){var R=b._opts,x=b._headers,F=null;R.method!=="GET"&&R.method!=="HEAD"&&(F=l.arraybuffer?f(r.concat(b._body)):l.blobConstructor?new i.Blob(b._body.map(function($){return f($)}),{type:(x["content-type"]||{}).value||""}):r.concat(b._body).toString());var M=[];if(Object.keys(x).forEach(function($){var q=x[$].name,m=x[$].value;Array.isArray(m)?m.forEach(function(y){M.push([q,y])}):M.push([q,m])}),b._mode==="fetch"){var A=null;if(l.abortController){var d=new AbortController;A=d.signal,b._fetchAbortController=d,"requestTimeout"in R&&R.requestTimeout!==0&&(b._fetchTimer=i.setTimeout(function(){b.emit("requestTimeout"),b._fetchAbortController&&b._fetchAbortController.abort()},R.requestTimeout))}i.fetch(b._opts.url,{method:b._opts.method,headers:M,body:F||void 0,mode:"cors",credentials:R.withCredentials?"include":"same-origin",signal:A}).then(function($){b._fetchResponse=$,b._connect()},function($){i.clearTimeout(b._fetchTimer),b._destroyed||b.emit("error",$)})}else{var I=b._xhr=new i.XMLHttpRequest;try{I.open(b._opts.method,b._opts.url,!0)}catch($){return void s.nextTick(function(){b.emit("error",$)})}"responseType"in I&&(I.responseType=b._mode.split(":")[0]),"withCredentials"in I&&(I.withCredentials=!!R.withCredentials),b._mode==="text"&&"overrideMimeType"in I&&I.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in R&&(I.timeout=R.requestTimeout,I.ontimeout=function(){b.emit("requestTimeout")}),M.forEach(function($){I.setRequestHeader($[0],$[1])}),b._response=null,I.onreadystatechange=function(){switch(I.readyState){case w.LOADING:case w.DONE:b._onXHRProgress()}},b._mode==="moz-chunked-arraybuffer"&&(I.onprogress=function(){b._onXHRProgress()}),I.onerror=function(){b._destroyed||b.emit("error",new Error("XHR error"))};try{I.send(F)}catch($){return void s.nextTick(function(){b.emit("error",$)})}}}},h.prototype._onXHRProgress=function(){(function(b){try{var R=b.status;return R!==null&&R!==0}catch{return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var b=this;b._destroyed||(b._response=new E(b._xhr,b._fetchResponse,b._mode,b._fetchTimer),b._response.on("error",function(R){b.emit("error",R)}),b.emit("response",b._response))},h.prototype._write=function(b,R,x){this._body.push(b),x()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,i.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(b,R,x){typeof b=="function"&&(x=b,b=void 0),u.Writable.prototype.end.call(this,b,R,x)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n(5).Buffer,n(6),n(2))},function(e,t,n){var r=n(5).Buffer;e.exports=function(i){if(i instanceof Uint8Array){if(i.byteOffset===0&&i.byteLength===i.buffer.byteLength)return i.buffer;if(typeof i.buffer.slice=="function")return i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}if(r.isBuffer(i)){for(var s=new Uint8Array(i.length),l=i.length,o=0;o<l;o++)s[o]=i[o];return s.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var r={},i=0;i<arguments.length;i++){var s=arguments[i];for(var l in s)n.call(s,l)&&(r[l]=s[l])}return r};var n=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,n){(function(r,i){var s;(function(l){t&&t.nodeType,r&&r.nodeType;var o=typeof i=="object"&&i;o.global!==o&&o.window!==o&&o.self;var c,u=2147483647,f=/^xn--/,E=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,b=String.fromCharCode;function R(m){throw new RangeError(h[m])}function x(m,y){for(var C=m.length,_=[];C--;)_[C]=y(m[C]);return _}function F(m,y){var C=m.split("@"),_="";return C.length>1&&(_=C[0]+"@",m=C[1]),_+x((m=m.replace(w,".")).split("."),y).join(".")}function M(m){for(var y,C,_=[],L=0,z=m.length;L<z;)(y=m.charCodeAt(L++))>=55296&&y<=56319&&L<z?(64512&(C=m.charCodeAt(L++)))==56320?_.push(((1023&y)<<10)+(1023&C)+65536):(_.push(y),L--):_.push(y);return _}function A(m){return x(m,function(y){var C="";return y>65535&&(C+=b((y-=65536)>>>10&1023|55296),y=56320|1023&y),C+=b(y)}).join("")}function d(m,y){return m+22+75*(m<26)-((y!=0)<<5)}function I(m,y,C){var _=0;for(m=C?g(m/700):m>>1,m+=g(m/y);m>455;_+=36)m=g(m/35);return g(_+36*m/(m+38))}function $(m){var y,C,_,L,z,B,N,P,W,O,p,U=[],V=m.length,Q=0,ee=128,ne=72;for((C=m.lastIndexOf("-"))<0&&(C=0),_=0;_<C;++_)m.charCodeAt(_)>=128&&R("not-basic"),U.push(m.charCodeAt(_));for(L=C>0?C+1:0;L<V;){for(z=Q,B=1,N=36;L>=V&&R("invalid-input"),((P=(p=m.charCodeAt(L++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||P>g((u-Q)/B))&&R("overflow"),Q+=P*B,!(P<(W=N<=ne?1:N>=ne+26?26:N-ne));N+=36)B>g(u/(O=36-W))&&R("overflow"),B*=O;ne=I(Q-z,y=U.length+1,z==0),g(Q/y)>u-ee&&R("overflow"),ee+=g(Q/y),Q%=y,U.splice(Q++,0,ee)}return A(U)}function q(m){var y,C,_,L,z,B,N,P,W,O,p,U,V,Q,ee,ne=[];for(U=(m=M(m)).length,y=128,C=0,z=72,B=0;B<U;++B)(p=m[B])<128&&ne.push(b(p));for(_=L=ne.length,L&&ne.push("-");_<U;){for(N=u,B=0;B<U;++B)(p=m[B])>=y&&p<N&&(N=p);for(N-y>g((u-C)/(V=_+1))&&R("overflow"),C+=(N-y)*V,y=N,B=0;B<U;++B)if((p=m[B])<y&&++C>u&&R("overflow"),p==y){for(P=C,W=36;!(P<(O=W<=z?1:W>=z+26?26:W-z));W+=36)ee=P-O,Q=36-O,ne.push(b(d(O+ee%Q,0))),P=g(ee/Q);ne.push(b(d(P,0))),z=I(C,V,_==L),C=0,++_}++C,++y}return ne.join("")}c={version:"1.4.1",ucs2:{decode:M,encode:A},decode:$,encode:q,toASCII:function(m){return F(m,function(y){return E.test(y)?"xn--"+q(y):y})},toUnicode:function(m){return F(m,function(y){return f.test(y)?$(y.slice(4).toLowerCase()):y})}},(s=function(){return c}.call(t,n,t,r))===void 0||(r.exports=s)})()}).call(this,n(195)(e),n(6))},function(e,t){e.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(e,t,n){e.exports={isString:function(r){return typeof r=="string"},isObject:function(r){return typeof r=="object"&&r!==null},isNull:function(r){return r===null},isNullOrUndefined:function(r){return r==null}}},function(e,t,n){t.decode=t.parse=n(198),t.encode=t.stringify=n(199)},function(e,t,n){function r(s,l){return Object.prototype.hasOwnProperty.call(s,l)}e.exports=function(s,l,o,c){l=l||"&",o=o||"=";var u={};if(typeof s!="string"||s.length===0)return u;var f=/\+/g;s=s.split(l);var E=1e3;c&&typeof c.maxKeys=="number"&&(E=c.maxKeys);var w=s.length;E>0&&w>E&&(w=E);for(var h=0;h<w;++h){var g,b,R,x,F=s[h].replace(f,"%20"),M=F.indexOf(o);M>=0?(g=F.substr(0,M),b=F.substr(M+1)):(g=F,b=""),R=decodeURIComponent(g),x=decodeURIComponent(b),r(u,R)?i(u[R])?u[R].push(x):u[R]=[u[R],x]:u[R]=x}return u};var i=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"}},function(e,t,n){var r=function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}};e.exports=function(o,c,u,f){return c=c||"&",u=u||"=",o===null&&(o=void 0),typeof o=="object"?s(l(o),function(E){var w=encodeURIComponent(r(E))+u;return i(o[E])?s(o[E],function(h){return w+encodeURIComponent(r(h))}).join(c):w+encodeURIComponent(r(o[E]))}).join(c):f?encodeURIComponent(r(f))+u+encodeURIComponent(r(o)):""};var i=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function s(o,c){if(o.map)return o.map(c);for(var u=[],f=0;f<o.length;f++)u.push(c(o[f],f));return u}var l=Object.keys||function(o){var c=[];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&c.push(u);return c}},function(e,t,n){var r=n(83),i=n(86),s=e.exports;for(var l in r)r.hasOwnProperty(l)&&(s[l]=r[l]);function o(c){if(typeof c=="string"&&(c=i.parse(c)),c.protocol||(c.protocol="https:"),c.protocol!=="https:")throw new Error('Protocol "'+c.protocol+'" not supported. Expected "https:"');return c}s.request=function(c,u){return c=o(c),r.request.call(this,c,u)},s.get=function(c,u){return c=o(c),r.get.call(this,c,u)}},function(e,t,n){(function(r){function i(b){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(b)}function s(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")}function l(b,R){for(var x=0;x<R.length;x++){var F=R[x];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(b,F.key,F)}}function o(b,R){return(o=Object.setPrototypeOf||function(x,F){return x.__proto__=F,x})(b,R)}function c(b){var R=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var x,F=f(b);if(R){var M=f(this).constructor;x=Reflect.construct(F,arguments,M)}else x=F.apply(this,arguments);return u(this,x)}}function u(b,R){return!R||i(R)!=="object"&&typeof R!="function"?function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(b):R}function f(b){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(b)}var E=n(87),w=n(3).MESSAGE,h=n(18),g=n(20);e.exports=function(b){(function(A,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(d&&d.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),d&&o(A,d)})(M,b);var R,x,F=c(M);function M(){var A,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(s(this,M),A=F.call(this,d),!d.stream||!E(d.stream))throw new Error("options.stream is required.");return A._stream=d.stream,A._stream.setMaxListeners(1/0),A.isObjectMode=d.stream._writableState.objectMode,A.eol=d.eol||h.EOL,A}return R=M,(x=[{key:"log",value:function(A,d){var I=this;if(r(function(){return I.emit("logged",A)}),this.isObjectMode)return this._stream.write(A),void(d&&d());this._stream.write("".concat(A[w]).concat(this.eol)),d&&d()}}])&&l(R.prototype,x),M}(g)}).call(this,n(15).setImmediate)},function(e,t,n){(function(r){function i(_,L,z){return L in _?Object.defineProperty(_,L,{value:z,enumerable:!0,configurable:!0,writable:!0}):_[L]=z,_}function s(_){return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L})(_)}function l(_,L){for(var z=0;z<L.length;z++){var B=L[z];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(_,B.key,B)}}function o(_,L){return(o=Object.setPrototypeOf||function(z,B){return z.__proto__=B,z})(_,L)}function c(_){var L=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var z,B=f(_);if(L){var N=f(this).constructor;z=Reflect.construct(B,arguments,N)}else z=B.apply(this,arguments);return u(this,z)}}function u(_,L){return!L||s(L)!=="object"&&typeof L!="function"?function(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}(_):L}function f(_){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)})(_)}var E=n(32),w=E.Stream,h=E.Transform,g=n(51),b=n(3),R=b.LEVEL,x=b.SPLAT,F=n(87),M=n(89),A=n(93),d=n(206),I=n(207),$=n(61).warn,q=n(50),m=/%[scdjifoO%]/g,y=function(_){(function(P,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(W&&W.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),W&&o(P,W)})(N,_);var L,z,B=c(N);function N(P){var W;return function(O,p){if(!(O instanceof p))throw new TypeError("Cannot call a class as a function")}(this,N),(W=B.call(this,{objectMode:!0})).configure(P),W}return L=N,(z=[{key:"child",value:function(P){var W=this;return Object.create(W,{write:{value:function(O){var p=Object.assign({},P,O);O instanceof Error&&(p.stack=O.stack,p.message=O.message),W.write(p)}}})}},{key:"configure",value:function(){var P=this,W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=W.silent,p=W.format,U=W.defaultMeta,V=W.levels,Q=W.level,ee=Q===void 0?"info":Q,ne=W.exitOnError,Y=ne===void 0||ne,G=W.transports,S=W.colors,T=W.emitErrs,k=W.formatters,J=W.padLevels,K=W.rewriters,re=W.stripColors,se=W.exceptionHandlers,fe=W.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=O,this.format=p||this.format||n(208)(),this.defaultMeta=U||null,this.levels=V||this.levels||q.npm.levels,this.level=ee,this.exceptions=new M(this),this.rejections=new A(this),this.profilers={},this.exitOnError=Y,G&&(G=Array.isArray(G)?G:[G]).forEach(function(ve){return P.add(ve)}),S||T||k||J||K||re)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
44
+ `));se&&this.exceptions.handle(se),fe&&this.rejections.handle(fe)}},{key:"isLevelEnabled",value:function(P){var W=this,O=C(this.levels,P);if(O===null)return!1;var p=C(this.levels,this.level);return p!==null&&(this.transports&&this.transports.length!==0?this.transports.findIndex(function(U){var V=C(W.levels,U.level);return V===null&&(V=p),V>=O})!==-1:p>=O)}},{key:"log",value:function(P,W){for(var O,p,U=arguments.length,V=new Array(U>2?U-2:0),Q=2;Q<U;Q++)V[Q-2]=arguments[Q];if(arguments.length===1)return P[R]=P.level,this._addDefaultMeta(P),this.write(P),this;if(arguments.length===2)return W&&s(W)==="object"?(W[R]=W.level=P,this._addDefaultMeta(W),this.write(W),this):(this.write((i(p={},R,P),i(p,"level",P),i(p,"message",W),p)),this);var ee=V[0];if(s(ee)==="object"&&ee!==null){var ne=W&&W.match&&W.match(m);if(!ne){var Y,G=Object.assign({},this.defaultMeta,ee,(i(Y={},R,P),i(Y,x,V),i(Y,"level",P),i(Y,"message",W),Y));return ee.message&&(G.message="".concat(G.message," ").concat(ee.message)),ee.stack&&(G.stack=ee.stack),this.write(G),this}}return this.write(Object.assign({},this.defaultMeta,(i(O={},R,P),i(O,x,V),i(O,"level",P),i(O,"message",W),O))),this}},{key:"_transform",value:function(P,W,O){if(this.silent)return O();P[R]||(P[R]=P.level),this.levels[P[R]]||this.levels[P[R]]===0||console.error("[winston] Unknown logger level: %s",P[R]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports %j",P);try{this.push(this.format.transform(P,this.format.options))}catch(p){throw p}finally{O()}}},{key:"_final",value:function(P){var W=this.transports.slice();g(W,function(O,p){if(!O||O.finished)return r(p);O.once("finish",p),O.end()},P)}},{key:"add",value:function(P){var W=!F(P)||P.log.length>2?new d({transport:P}):P;if(!W._writableState||!W._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",W),this._onEvent("warn",W),this.pipe(W),P.handleExceptions&&this.exceptions.handle(),P.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(P){if(!P)return this;var W=P;return(!F(P)||P.log.length>2)&&(W=this.transports.filter(function(O){return O.transport===P})[0]),W&&this.unpipe(W),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){$.deprecated("setLevels")}},{key:"query",value:function(P,W){typeof P=="function"&&(W=P,P={}),P=P||{};var O={},p=Object.assign({},P.query||{});g(this.transports.filter(function(U){return!!U.query}),function(U,V){(function(Q,ee){P.query&&typeof Q.formatQuery=="function"&&(P.query=Q.formatQuery(p)),Q.query(P,function(ne,Y){if(ne)return ee(ne);typeof Q.formatResults=="function"&&(Y=Q.formatResults(Y,P.format)),ee(null,Y)})})(U,function(Q,ee){V&&((ee=Q||ee)&&(O[U.name]=ee),V()),V=null})},function(){return W(null,O)})}},{key:"stream",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},W=new w,O=[];return W._streams=O,W.destroy=function(){for(var p=O.length;p--;)O[p].destroy()},this.transports.filter(function(p){return!!p.stream}).forEach(function(p){var U=p.stream(P);U&&(O.push(U),U.on("log",function(V){V.transport=V.transport||[],V.transport.push(p.name),W.emit("log",V)}),U.on("error",function(V){V.transport=V.transport||[],V.transport.push(p.name),W.emit("error",V)}))}),W}},{key:"startTimer",value:function(){return new I(this)}},{key:"profile",value:function(P){var W=Date.now();if(this.profilers[P]){var O=this.profilers[P];delete this.profilers[P];for(var p=arguments.length,U=new Array(p>1?p-1:0),V=1;V<p;V++)U[V-1]=arguments[V];typeof U[U.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),U.pop());var Q=s(U[U.length-1])==="object"?U.pop():{};return Q.level=Q.level||"info",Q.durationMs=W-O,Q.message=Q.message||P,this.write(Q)}return this.profilers[P]=W,this}},{key:"handleExceptions",value:function(){var P;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(P=this.exceptions).handle.apply(P,arguments)}},{key:"unhandleExceptions",value:function(){var P;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(P=this.exceptions).unhandle.apply(P,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
45
+ `))}},{key:"_onEvent",value:function(P,W){W["__winston"+P]||(W["__winston"+P]=function(O){P!=="error"||this.transports.includes(W)||this.add(W),this.emit(P,O,W)}.bind(this),W.on(P,W["__winston"+P]))}},{key:"_addDefaultMeta",value:function(P){this.defaultMeta&&Object.assign(P,this.defaultMeta)}}])&&l(L.prototype,z),N}(h);function C(_,L){var z=_[L];return z||z===0?z:null}Object.defineProperty(y.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var _=this._readableState.pipes;return Array.isArray(_)?_:[_].filter(Boolean)}}),e.exports=y}).call(this,n(15).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(45)),i=f(n(46)),s=f(n(66)),l=f(n(67)),o=f(n(68)),c=f(n(25)),u=f(n(30));function f(h){return h&&h.__esModule?h:{default:h}}function E(h,g,b){b=(0,l.default)(b);var R=0,x=0,{length:F}=h,M=!1;function A(d,I){d===!1&&(M=!0),M!==!0&&(d?b(d):++x!==F&&I!==i.default||b(null))}for(F===0&&b(null);R<F;R++)g(h[R],R,(0,o.default)(A))}function w(h,g,b){return(0,s.default)(h,1/0,g,b)}t.default=(0,u.default)(function(h,g,b){return((0,r.default)(h)?E:w)(h,(0,c.default)(g),b)},3),e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return(i,s,l)=>r(i,l)},e.exports=t.default},function(e,t,n){var r=Object.prototype.toString;e.exports=function(i){if(typeof i.displayName=="string"&&i.constructor.name)return i.displayName;if(typeof i.name=="string"&&i.name)return i.name;if(typeof i=="object"&&i.constructor&&typeof i.constructor.name=="string")return i.constructor.name;var s=i.toString(),l=r.call(i).slice(8,-1);return(s=l==="Function"?s.substring(s.indexOf("(")+1,s.indexOf(")")):l)||"anonymous"}},function(e,t,n){const r=n(13),{LEVEL:i}=n(3),s=n(20),l=e.exports=function(o={}){if(s.call(this,o),!o.transport||typeof o.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=o.transport,this.level=this.level||o.transport.level,this.handleExceptions=this.handleExceptions||o.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(c){this.emit("error",c,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};r.inherits(l,s),l.prototype._write=function(o,c,u){if(this.silent||o.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[o[i]])&&this.transport.log(o[i],o.message,o,this._nop),u(null)},l.prototype._writev=function(o,c){for(let u=0;u<o.length;u++)this._accept(o[u])&&(this.transport.log(o[u].chunk[i],o[u].chunk.message,o[u].chunk,this._nop),o[u].callback());return c(null)},l.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
46
+ `))},l.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(s)}function i(s,l){for(var o=0;o<l.length;o++){var c=l[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,c.key,c)}}e.exports=function(){function s(c){if(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,s),!c)throw new Error("Logger is required for profiling.");this.logger=c,this.start=Date.now()}var l,o;return l=s,(o=[{key:"done",value:function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];typeof u[u.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),u.pop());var E=r(u[u.length-1])==="object"?u.pop():{};return E.level=E.level||"info",E.durationMs=Date.now()-this.start,this.logger.write(E)}}])&&i(l.prototype,o),s}()},function(e,t,n){(function(r){const i=n(209),{MESSAGE:s}=n(3),l=n(35);function o(c,u){return u instanceof r?u.toString("base64"):typeof u=="bigint"?u.toString():u}e.exports=i((c,u={})=>(c[s]=(u.stable?l.stableStringify:l)(c,u.replacer||o,u.space),c))}).call(this,n(5).Buffer)},function(e,t,n){class r extends Error{constructor(s){super(`Format functions must be synchronous taking a two arguments: (info, opts)
47
+ Found: ${s.toString().split(`
43
48
  `)[0]}
44
- `),Error.captureStackTrace(this,r)}}e.exports=o=>{if(o.length>2)throw new r(o);function l(i={}){this.options=i}function s(i){return new l(i)}return l.prototype.transform=o,s.Format=l,s}},function(e,t,n){function r(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function o(s,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}var l=n(88);e.exports=function(){function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,s),this.loggers=new Map,this.options=u}var i,c;return i=s,(c=[{key:"add",value:function(u,m){var R=this;if(!this.loggers.has(u)){var E=(m=Object.assign({},m||this.options)).transports||this.options.transports;m.transports=E?E.slice():[];var y=l(m);y.on("close",function(){return R._delete(u)}),this.loggers.set(u,y)}return this.loggers.get(u)}},{key:"get",value:function(u,m){return this.add(u,m)}},{key:"has",value:function(u){return!!this.loggers.has(u)}},{key:"close",value:function(u){var m=this;if(u)return this._removeLogger(u);this.loggers.forEach(function(R,E){return m._removeLogger(E)})}},{key:"_removeLogger",value:function(u){this.loggers.has(u)&&(this.loggers.get(u).close(),this._delete(u))}},{key:"_delete",value:function(u){this.loggers.delete(u)}}])&&o(i.prototype,c),s}()},function(e,t,n){(function(r){const o=n(52),l=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;e.exports=function(s,i,c,u){let m,R,E=!1,y=!1;const g=n(94);function _(V){u(i,V)}function T(V,M){let A=`"${i}" ${M}`;throw V&&(A=`${A}`),R&&(A=`${A}. An example of a valid value would be: ${R}`),new o(A)}const L={convertFromBase64:function(){return _("marking for base64 conversion"),E=!0,L},default:function(V){if(typeof V=="number")m=V.toString();else if(Array.isArray(V)||typeof V=="object"&&V!==null)m=JSON.stringify(V);else{if(typeof V!="string")throw new o("values passed to default() must be of Number, String, Array, or Object type");m=V}return _(`setting default value to "${m}"`),L},required:function(V){return V===void 0?(_("marked as required"),y=!0):(_(`setting required flag to ${V}`),y=V),L},example:function(V){return R=V,L}};return Object.entries({...g,...c}).forEach(([V,M])=>{L[V]=function(A){return function(){let f=s[i];if(_(`will be read from the environment using "${A.name}" accessor`),f===void 0)if(m===void 0&&y)_("was not found in the environment, but is required to be set"),T(void 0,"is a required variable, but it was not set");else{if(m===void 0)return void _("was not found in the environment, but is not required. returning undefined");_(`was not found in the environment, parsing default value "${m}" instead`),f=m}y&&(_("verifying variable value is not an empty string"),f.trim().length===0&&T(void 0,"is a required variable, but its value was empty")),E&&(_("verifying variable is a valid base64 string"),f.match(l)||T(f,"should be a valid base64 string if using convertFromBase64"),_("converting from base64 to utf8 string"),f=r.from(f,"base64").toString());const O=[f].concat(Array.prototype.slice.call(arguments));try{_(`passing value "${f}" to "${A.name}" accessor`);const Y=A.apply(A,O);return _(`parsed successfully, returning ${Y}`),Y}catch(Y){T(f,Y.message)}}}(M)}),L}}).call(this,n(5).Buffer)},function(e,t,n){const r=n(33);e.exports=function(o,l){return l=l||",",o.length?r(o).split(l).filter(Boolean):[]}},function(e,t,n){e.exports=function(r){const o=r.toLowerCase();if(o!=="false"&&o!=="true")throw new Error('should be either "true", "false", "TRUE", or "FALSE"');return o!=="false"}},function(e,t,n){e.exports=function(r){const o=r.toLowerCase();if(["false","0","true","1"].indexOf(o)===-1)throw new Error('should be either "true", "false", "TRUE", "FALSE", 1, or 0');return!(o==="0"||o==="false")}},function(e,t,n){const r=n(95);e.exports=function(o){var l=r(o);if(l>65535)throw new Error("cannot assign a port number greater than 65535");return l}},function(e,t,n){const r=n(33);e.exports=function(o,l){const s=r(o);if(l.indexOf(s)<0)throw new Error(`should be one of [${l.join(", ")}]`);return s}},function(e,t,n){const r=n(54);e.exports=function(o){const l=r(o);if(l>0)throw new Error("should be a negative float");return l}},function(e,t,n){const r=n(54);e.exports=function(o){const l=r(o);if(l<0)throw new Error("should be a positive float");return l}},function(e,t,n){const r=n(53);e.exports=function(o){const l=r(o);if(l>0)throw new Error("should be a negative integer");return l}},function(e,t,n){const r=n(55);e.exports=function(o){var l=r(o);if(!Array.isArray(l))throw new Error("should be a parseable JSON Array");return l}},function(e,t,n){const r=n(55);e.exports=function(o){var l=r(o);if(Array.isArray(l))throw new Error("should be a parseable JSON Object");return l}},function(e,t,n){e.exports=function(r,o){try{RegExp(void 0,o)}catch{throw new Error("invalid regexp flags")}try{return new RegExp(r,o)}catch{throw new Error("should be a valid regexp")}}},function(e,t,n){const r=n(96);e.exports=function(o){return r(o).toString()}},function(e,t,n){const r=n(33),o=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\u0001-\u0008\u000b\u000c\u000e-\u001f\u0021\u0023-\u005b\u005d-\u007f]|\\[\u0001-\u0009\u000b\u000c\u000e-\u007f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\u0001-\u0008\u000b\u000c\u000e-\u001f\u0021-\u005a\u0053-\u007f]|\\[\u0001-\u0009\u000b\u000c\u000e-\u007f])+)\])$/;e.exports=function(l){const s=r(l);if(!o.test(s))throw new Error("should be a valid email address");return s}},function(e,t,n){e.exports=function(r,o){return function(l,s){o&&o.match(/prod|production/)||r(`env-var (${l}): ${s}`)}}},function(e,t,n){(function(r){(function(){var o,l,s,i,c,u;typeof performance!="undefined"&&performance!==null&&performance.now?e.exports=function(){return performance.now()}:r!=null&&r.hrtime?(e.exports=function(){return(o()-c)/1e6},l=r.hrtime,i=(o=function(){var m;return 1e9*(m=l())[0]+m[1]})(),u=1e9*r.uptime(),c=i-u):Date.now?(e.exports=function(){return Date.now()-s},s=Date.now()):(e.exports=function(){return new Date().getTime()-s},s=new Date().getTime())}).call(this)}).call(this,n(2))},function(e,t,n){(function(r){(function(o){function l(i){if((i=i===void 0?"utf-8":i)!=="utf-8")throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+i+"') is invalid.")}function s(i,c){if(c=c===void 0?{fatal:!1}:c,(i=i===void 0?"utf-8":i)!=="utf-8")throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+i+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(o.TextEncoder&&o.TextDecoder)return!1;Object.defineProperty(l.prototype,"encoding",{value:"utf-8"}),l.prototype.encode=function(i,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");c=0;for(var u=i.length,m=0,R=Math.max(32,u+(u>>1)+7),E=new Uint8Array(R>>3<<3);c<u;){var y=i.charCodeAt(c++);if(55296<=y&&56319>=y){if(c<u){var g=i.charCodeAt(c);(64512&g)==56320&&(++c,y=((1023&y)<<10)+(1023&g)+65536)}if(55296<=y&&56319>=y)continue}if(m+4>E.length&&(R+=8,R=(R*=1+c/i.length*2)>>3<<3,(g=new Uint8Array(R)).set(E),E=g),(4294967168&y)==0)E[m++]=y;else{if((4294965248&y)==0)E[m++]=y>>6&31|192;else if((4294901760&y)==0)E[m++]=y>>12&15|224,E[m++]=y>>6&63|128;else{if((4292870144&y)!=0)continue;E[m++]=y>>18&7|240,E[m++]=y>>12&63|128,E[m++]=y>>6&63|128}E[m++]=63&y|128}}return E.slice(0,m)},Object.defineProperty(s.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(s.prototype,"fatal",{value:!1}),Object.defineProperty(s.prototype,"ignoreBOM",{value:!1}),s.prototype.decode=function(i,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");c=0;for(var u=(i=new Uint8Array(i)).length,m=[];c<u;){var R=i[c++];if(R===0)break;if((128&R)==0)m.push(R);else if((224&R)==192){var E=63&i[c++];m.push((31&R)<<6|E)}else if((240&R)==224){E=63&i[c++];var y=63&i[c++];m.push((31&R)<<12|E<<6|y)}else(248&R)==240&&(65535<(R=(7&R)<<18|(E=63&i[c++])<<12|(y=63&i[c++])<<6|63&i[c++])&&(R-=65536,m.push(R>>>10&1023|55296),R=56320|1023&R),m.push(R))}return String.fromCharCode.apply(null,m)},o.TextEncoder=l,o.TextDecoder=s})(typeof window!="undefined"?window:r!==void 0?r:this)}).call(this,n(6))},function(e,t,n){n.r(t),n.d(t,"AuthClient",function(){return l}),n.d(t,"RtcSignalingClient",function(){return i}),n.d(t,"Credentials",function(){return P}),n.d(t,"IRtcStream",function(){}),n.d(t,"SignalingPromiseClient",function(){return F.SignalingPromiseClient}),n.d(t,"IRtcClientConfigurationV1",function(){}),n.d(t,"IRtcClientConfiguration",function(){}),n.d(t,"IRtcConnectionStatsInfo",function(){}),n.d(t,"IRtcSendConfiguration",function(){}),n.d(t,"IRtcSessionMetricsMessageCounts",function(){}),n.d(t,"IRtcStreamMessage",function(){}),n.d(t,"IRtcStreamPayload",function(){}),n.d(t,"IStreamControl",function(){}),n.d(t,"RtcClient",function(){return vt}),n.d(t,"RtcClientV1",function(){return It}),n.d(t,"createRtcStreamMessage",function(){return Ee});var r=n(28),o=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class l extends r.a{adminSignup(x,W){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/admin-signup",{token:W,method:"POST",body:JSON.stringify(x)})})}login(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/login",{method:"POST",body:JSON.stringify(x),allowUnsafeRetries:!0})})}loginWithGoogleToken(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/login-google",{method:"POST",body:JSON.stringify(x),allowUnsafeRetries:!0})})}refresh(x,W){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:x,tokenExpirationSeconds:W}),allowUnsafeRetries:!0})})}respondToNewPasswordRequiredChallenge(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/respond-to-new-password-required-challenge",{method:"POST",body:JSON.stringify(x)})})}forgotPassword(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/forgot-password",{method:"POST",body:JSON.stringify({email:x})})})}confirmForgotPassword(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/confirm-forgot-password",{method:"POST",body:JSON.stringify(x)})})}resendInvitation(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/resend-invitation",{method:"POST",body:JSON.stringify({email:x})})})}changePassword({token:x,refreshToken:W,currentPassword:K,newPassword:re}){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/change-password",{token:x,method:"POST",body:JSON.stringify({refreshToken:W,currentPassword:K,newPassword:re})})})}getDeviceCredentials(x){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/device-credentials",{token:x,method:"POST",allowUnsafeRetries:!0})})}impersonate(x,W){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/impersonate",{token:x,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({userId:W})})})}createServiceAccount(x,W,K,re){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/service-account",{token:x,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({name:W,roleId:K,tags:re})})})}getFeatures(x){return o(this,void 0,void 0,function*(){return(yield this.fetch("auth/features",{token:x})).features})}}var s=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class i extends r.a{createPeer(x,W){return s(this,void 0,void 0,function*(){return yield this.fetch("peers",{token:x,method:"POST",body:JSON.stringify(W)})})}getPeers(x){return s(this,void 0,void 0,function*(){return(yield this.fetch("peers",{token:x})).items})}refreshPeer(x,W){return s(this,void 0,void 0,function*(){yield this.fetch(`peers/${W}/refresh`,{token:x,method:"POST",allowUnsafeRetries:!0})})}createSession(x,W){return s(this,void 0,void 0,function*(){return yield this.fetch("sessions",{token:x,method:"POST",body:JSON.stringify(W)})})}refreshSession(x,W){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${W}/refresh`,{token:x,method:"POST",allowUnsafeRetries:!0})})}deleteSession(x,W){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${W}`,{token:x,method:"DELETE",allowUnsafeRetries:!0})})}getSessions(x){return s(this,void 0,void 0,function*(){return(yield this.fetch("sessions",{token:x})).items})}getIceServers(x){return s(this,void 0,void 0,function*(){return(yield this.fetch("ice-servers",{token:x})).items})}addSignals(x,W,K){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${W}/add-signals`,{token:x,method:"POST",body:JSON.stringify(K)})})}takeSignals(x,W){return s(this,void 0,void 0,function*(){return(yield this.fetch(`sessions/${W}/take-signals`,{token:x,method:"POST"})).items})}}var c=n(1),u=n(8),m=n(14),R=n.n(m),E=n(104),y=n.n(E),g=n(0),_=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class T{constructor(x){this.name="LogReporter",this.type="simple",this.message=x}send(x){return _(this,void 0,void 0,function*(){var W,K;g.a.info(this.message,(W=x.reduce((re,oe)=>Object.assign(Object.assign({},re),{[oe.name]:oe.stat}),{}),K=re=>{const{sum:oe,count:he}=re,me=oe/he;return Object.assign(Object.assign({},re),{average:me})},Object.keys(W).reduce((re,oe)=>Object.assign(Object.assign({},re),{[oe]:K(W[oe])}),{})))})}}var L=n(4),V=n(39);function M(ye){return!!ye.match(/^[a-zA-Z0-9-_.,:?'"()@\/\\#$+ ]{1,255}$/)}var A=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};function f({func:ye,delay:x,immediate:W}){let K=!1,re=setTimeout(function he(){return A(this,void 0,void 0,function*(){if(K)return;const me=new Date().getTime();try{oe=ye(),yield oe}finally{if(!K){const pe=new Date().getTime();re=setTimeout(he,Math.max(x-(pe-me),0))}}})},W?0:x),oe=Promise.resolve();return{stop(){return A(this,void 0,void 0,function*(){K=!0,clearTimeout(re),yield oe})}}}var O=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};const Y=n(226),Z=!!L.c,d=new class{constructor(ye){this.samplePeriodSeconds=60,this.buffer={},this.reporters=[],this.flushInterval=f({func:()=>this.flushStats(),delay:this.samplePeriodSeconds*c.a.second}),this.tags=this.filterTags((ye==null?void 0:ye.tags)||{app:L.a,version:L.j,namespace:L.i,instanceId:V.a})}shutdown(){return O(this,void 0,void 0,function*(){yield this.flushInterval.stop(),yield this.flushStats(),yield Object(u.a)(2*c.a.second)})}aggregate(ye,x,W){this.addToBuffer(this.buffer,this.encodeKey({metric:ye,tags:this.filterTags(W||{})}),typeof x=="number"?{min:x,max:x,sum:x,count:1}:x)}increment(ye,x){this.aggregate(ye,1,x)}timer(ye,x,W){return O(this,void 0,void 0,function*(){const K=Y(),re=yield x(),oe=Y();return this.aggregate(ye,oe-K,W),re})}registerStatsReporter(ye){this.reporters.push(ye)}setTag(ye,x){const W=this.filterTags({[ye]:x});this.tags=Object.assign(Object.assign({},this.tags),W)}addToBuffer(ye,x,W){if(ye[x]){const{min:K,max:re,sum:oe,count:he}=ye[x];ye[x]={min:Math.min(K,W.min),max:Math.max(re,W.max),sum:oe+W.sum,count:he+W.count}}else ye[x]=W}write(ye){return O(this,void 0,void 0,function*(){yield Promise.all(this.reporters.map(x=>O(this,void 0,void 0,function*(){let W;const K={};switch(x.type){case"simple":for(const[oe,he]of Object.entries(ye)){const{metric:me}=this.decodeKey(oe);this.addToBuffer(K,this.encodeKey({metric:me}),he)}W=K;break;case"tagged":W=ye;break;default:(function(oe){throw new Error(`Unreachable type encountered (${oe})`)})(x.type)}const re=Object.entries(W);if(re.length>0)return x.send(re.map(([oe,he])=>{const{metric:me,tags:pe}=this.decodeKey(oe);return{name:me,tags:Object.assign(Object.assign({},pe),this.tags),stat:he}}),this.samplePeriodSeconds).catch(oe=>{g.a.debug(`Failed to write stats to ${x.name}`,{error:oe})})})))})}flushStats(){return O(this,void 0,void 0,function*(){yield this.write(this.buffer),this.buffer={}})}encodeKey(ye){return R()(Object.assign(Object.assign({},ye),Object.keys(ye.tags||{}).length>0?{tags:ye.tags}:{}))}decodeKey(ye){return JSON.parse(ye)}filterTags(ye){return Object.entries(ye||{}).reduce((x,[W,K])=>(M(W)&&M(K)&&(x[W]=K),x),{})}};Z||["local","on-prem"].includes(L.i)||d.registerStatsReporter(new T("stats"));var p=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class C extends class{constructor(x){this.options=x,this.cache=new y.a(Object.assign(Object.assign(Object.assign({},x.dispose||x.disposeAfter?{ttlAutopurge:!0}:{}),x),{dispose:(...W)=>{var K;W[2]==="evict"&&d.increment("lru-eviction",{name:x.name}),(K=x.dispose)===null||K===void 0||K.call(x,...W)},disposeAfter:(...W)=>{var K;this.updateStats(),(K=x.disposeAfter)===null||K===void 0||K.call(x,...W)}})),this.stringify=x.fastStringify?JSON.stringify:R.a}set(x,W,K){const re=this.stringify(x);if(!this.cache.set(re,W,{ttl:K})){const oe=this.cache.sizeCalculation?this.cache.sizeCalculation(W,re):"unknown";throw Error(`Value too large (${oe} > ${this.cache.max})`)}this.updateStats()}get(x){const{name:W}=this.options,K=this.stringify(x),re=this.cache.getRemainingTTL(K);return re<=0?d.increment("cache-miss",{name:W}):re!==1/0&&d.aggregate("cache-item-ttl",re,{name:W}),this.cache.get(K)}delete(x){this.cache.delete(this.stringify(x))}peek(x){return this.cache.peek(this.stringify(x))}size(){return this.cache.size}clear(){this.cache.clear()}forEach(x){this.cache.forEach(x)}purgeStale(){return this.cache.purgeStale()}updateStats(){const{name:x}=this.options;d.aggregate("cache-item-count",this.cache.size,{name:x}),this.cache.calculatedSize!==void 0&&d.aggregate("cache-length",this.cache.calculatedSize,{name:x})}}{constructor(x){if(super(x),this.expireRejectedPromiseValues=x.expireRejectedPromiseValues===void 0||x.expireRejectedPromiseValues,this.rejectedPromiseValueTtl=x.rejectedPromiseValueTtl!==void 0?x.rejectedPromiseValueTtl:c.a.second,this.rejectedPromiseValueTtl<0)throw new Error("rejectedPromiseValueTtl must not be negative")}set(x,W,K){super.set(x,W,K),this.expireRejectedPromiseValues&&W.catch(()=>p(this,void 0,void 0,function*(){yield Object(u.a)(this.rejectedPromiseValueTtl),this.peek(x)===W&&this.delete(x)}))}}var b=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class P{constructor(x,W,K){this.authClient=x,this.email=W,this.password=K,this.tokenTtlMs=1*c.a.hour,this.tokenCache=new C({name:"Credentials-tokenCache",max:100,ttl:this.tokenTtlMs-5*c.a.minute,fastStringify:!0})}getToken(){return b(this,void 0,void 0,function*(){let x=this.tokenCache.get(this.email);return x||(x=(()=>b(this,void 0,void 0,function*(){const{authentication:W}=yield this.authClient.login({email:this.email,password:this.password,tokenExpirationSeconds:this.tokenTtlMs/c.a.second});if(!W)throw new Error("User account not verified.");return W.accessToken}))(),this.tokenCache.set(this.email,x)),x})}}var F=n(97),D=n(40),I=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class N extends D.a{constructor(x){super(x)}postLanRtcOffer(x){return I(this,void 0,void 0,function*(){return yield this.fetch("v1/lan-rtc-offer",{method:"POST",body:JSON.stringify(x)})})}}var k=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};function w(ye){return k(this,void 0,void 0,function*(){return(yield Promise.all(ye.map(x=>x.catch(W=>W)))).filter(x=>x instanceof Error)})}function h(ye){if(ye!==void 0)return ye;throw new Error("Value is undefined")}function B(ye,x){const W=ye.reduce((K,re)=>[...K,...re.urls],[]).filter(K=>z(K,x)).sort(K=>X(K,"udp")?-1:0).shift();if(W)return Object.assign(Object.assign({},h(ye.find(K=>K.urls.includes(W)))),{urls:[W]})}function z(ye,x){switch(x){case"stun":return/^stuns?:/.test(ye);case"turn":return/^turns?:/.test(ye)}}function X(ye,x){return ye.endsWith(`transport=${x}`)}var Q=n(9),te=n(24),q=n(229),H=n(29);const v={ordered:!1,maxPacketLifeTime:300*c.a.millisecond},S={ordered:!0},U={ordered:!0},J={ordered:!1,maxRetransmits:0},$={ordered:!1,maxRetransmits:0},ne=ye=>"received"in ye&&ye.received!==void 0,se=ye=>!("received"in ye)||ye.received===void 0,ge=2*c.a.second;function ve(ye,x={}){const W=Array.from(ye.values()),K=W.filter(ne),re=K.length>0,oe=Math.max(...K.map(ue=>ue.received));let he;if(re){const ue=W.length,le=K.length,Re=K.map(je=>je.received-je.sent),{standardDeviation:Ie,mean:Be,jitter:He}=function(je){const ke=je.length;if(ke===0)return{mean:NaN,standardDeviation:-1,jitter:NaN};const $e=je.reduce((Je,ot)=>Je+ot,0)/ke,Ze=Math.sqrt(je.map(Je=>Math.pow(Je-$e,2)).reduce((Je,ot)=>Je+ot)/ke);let Ke=0;for(let Je=1;Je<ke;++Je)Ke+=Math.abs(je[Je]-je[Je-1]);return{mean:$e,standardDeviation:Ze,jitter:Ke/(ke-1)}}(Re),Xe=W.filter(je=>je.sent<oe-ge),Ye=Xe.filter(se),Ge=Ye.length===0?0:Ye.length/Xe.length;he={pingsSent:ue,pongsReceived:le,average:Be,standardDeviation:Ie,jitter:He,max:Math.max(...Re),min:Math.min(...Re),loss:Ge}}else he=null;const{temporalNow:me=Date.now()}=x,pe=(re?oe:me)-4*ge;return Array.from(ye.entries()).forEach(ue=>{const[le,Re]=ue;Re.sent<pe&&ye.delete(le)}),he}function Oe({entityId:ye,streamName:x,streamType:W}){return`${ye}.${x}.${W}`}var Se=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class Ce{constructor(x,W){this.sessionId=x,this.connection=W,this.counts={localSent:new Map,localReceived:new Map,remoteSent:new Map,remoteReceived:new Map},this.sessionId=x,this.connection=W}updateRemoteMessagesCounts(x){if(x.payload.streamsInfo){this.counts.remoteSent=new Map,this.counts.remoteReceived=new Map;for(const W of x.payload.streamsInfo.items)this.counts.remoteSent.set(W.streamId,W.sentCount),this.counts.remoteReceived.set(W.streamId,W.receivedCount)}}getLocalStreamsInfo(x){const{localSent:W,localReceived:K}=this.counts;return{items:[...new Set([...W.keys(),...K.keys()])].map(re=>{var oe,he;return{streamId:re,sentCount:(oe=W.get(re))!==null&&oe!==void 0?oe:0,receivedCount:(he=K.get(re))!==null&&he!==void 0?he:0}}),timestamp:x}}incrementLocalSent(x){const{localSent:W}=this.counts,K=Oe(x.header.stream);W.set(K,(W.get(K)||0)+1)}incrementLocalReceived(x){const{localReceived:W}=this.counts,K=Oe(x.header.stream),re=W.get(K)||0;if(re===0){const{streamName:oe,streamType:he}=x.header.stream;g.a.debug("RTC client received first message for stream",{streamName:oe,streamType:he})}W.set(K,re+1)}uploadMetrics(){return Se(this,void 0,void 0,function*(){const{sessionId:x}=this,W=yield this.connection.peerConnection.getStats(),K={};W.forEach(ue=>K[ue.id]=ue),g.a.debug("rtc-stats",Object.assign(Object.assign({},K),{sessionId:x}));const{localSent:re,localReceived:oe,remoteSent:he,remoteReceived:me}=this.counts,pe=[...new Set([...re.keys(),...oe.keys()])].reduce((ue,le)=>{const Re=re.get(le),Ie=oe.get(le),Be=he.get(le),He=me.get(le);return Object.assign(Object.assign({},ue),{[`local-${le}-sent`]:Re,[`local-${le}-received`]:Ie,[`remote-${le}-sent`]:Be,[`remote-${le}-received`]:He})},{sessionId:x});g.a.debug("rtc-message-report",Object.assign({deviceId:this.connection.getRemoteDeviceId()},pe))})}}function Ee(ye,x,W){return{header:{stream:ye,created:Date.now(),frameId:W||""},payload:x}}function Te(ye){return new Set(["disconnected","failed","closed"]).has(ye.iceConnectionState)}function De(ye){switch(ye.header.stream.streamType){case"twist":{const{twist:x}=ye.payload;if(!x)throw Error("twist not in payload of RTC message with type twist");return{header:ye.header,payload:{twist:{linear:Object.assign({x:0,y:0,z:0},x.linear),angular:Object.assign({x:0,y:0,z:0},x.angular)}}}}case"pose":{const{pose:x}=ye.payload;if(!x)throw Error("pose not in payload of RTC message with type pose");return{header:ye.header,payload:{pose:{translation:Object.assign({x:0,y:0,z:0},x.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},x.rotation)}}}}case"pose-with-covariance":{const{poseWithCovariance:x}=ye.payload;if(!x)throw Error("poseWithCovariance not in payload of RTC message with type pose-with-covariance");const W=new Array(36).fill(0);return x.covariance.forEach((K,re)=>{if(re>=36)throw Error("covariance contains more than 36 elements");W[re]=K}),{header:ye.header,payload:{poseWithCovariance:{pose:{translation:Object.assign({x:0,y:0,z:0},x.pose.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},x.pose.rotation)},covariance:W}}}}case"point":{const{point:x}=ye.payload;if(!x)throw Error("point not in payload of RTC message with type point");return{header:ye.header,payload:{point:Object.assign({x:0,y:0,z:0},x)}}}default:return ye}}var qe=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class Qe{constructor(x,W,K){this.peerConnection=x,this.config=W,this.dataChannelNotifier=K,this.connectTimeoutMs=20*c.a.second,this.iceGatheringTimeoutMs=15*c.a.second,this.pingUpdateTimeoutMs=1*c.a.second,this.pingV2UpdateTimeoutMs=250*c.a.millisecond,this.pingV2MetricsGatherTimeoutMs=1*c.a.second,this.streamsInfoUpdateTimeoutMs=2*c.a.second,this.reassemblyTimeoutMs=500*c.a.millisecond,this.reassemblyTableCleanupMs=1*c.a.second,this.heartbeatTimeoutMs=20*c.a.millisecond,this.streamLatestTimestamp=new Map,this.reassemblyTable=new Map,this.reassemblyTableLastTimestamp=new Map,this.closeCalled=!1,this.gotOffer=!1,this.hasIceCandidate=!1,this.pingV2Map=new Map,this.sendPingV2=()=>{const{latestTryOnceStreamChannel:oe}=this;if(!oe)return;const he=new Date().getTime(),me=Object(q.a)();this.sendSystemMessage(oe,{type:"ping-v2",payload:{timestamp:he,id:me}}),this.pingV2Map.set(me,{sent:he})},this.gatherPingV2Metrics=()=>{const oe=ve(this.pingV2Map);oe&&(this.pingInfo=oe,d.aggregate("rtc-ping-average",oe.average),d.aggregate("rtc-ping-loss",oe.loss),d.aggregate("rtc-jitter",oe.jitter))};const{isOffer:re}=W.baseConfig;re?this.initializeChannels(x):x.ondatachannel=oe=>{switch(oe.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=oe.channel;break;case"stream.reliable":this.reliableStreamChannel=oe.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=oe.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=oe.channel;break;case"heartbeat":return void(this.heartbeatChannel=oe.channel);default:return void this.dataChannelNotifier(oe.channel)}this.setupChannel(oe.channel)},this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:oe}=this;oe&&this.sendSystemMessage(oe,{type:"ping"})},this.pingUpdateTimeoutMs),this.pingV2UpdateTimeout=setInterval(this.sendPingV2,this.pingV2UpdateTimeoutMs),this.pingV2MetricsGatherTimeout=setInterval(this.gatherPingV2Metrics,this.pingV2MetricsGatherTimeoutMs),this.streamsInfoUpdateTimeout=setInterval(()=>{const{latestTtlStreamChannel:oe}=this;oe&&this.sendSystemMessage(oe,{type:"streams-info"})},this.streamsInfoUpdateTimeoutMs),this.reassemblyTableCleanupTimeout=setInterval(()=>{const oe=new Date().getTime();this.reassemblyTableLastTimestamp.forEach((he,me,pe)=>{oe>me+this.reassemblyTimeoutMs&&this.reassemblyTable.delete(he)})},this.reassemblyTableCleanupMs),this.heartbeatTimeout=setInterval(()=>{const{heartbeatChannel:oe}=this;oe&&oe.readyState==="open"&&oe.send(new Uint8Array([1]))},this.heartbeatTimeoutMs)}handleSignal(x){return qe(this,void 0,void 0,function*(){const{peerConnection:W}=this,{track:K}=this.config.baseConfig,re=(()=>{try{return JSON.parse(x.getPayload())}catch{return}})();if(!re)return void g.a.error("Received unparseable signal.");g.a.debug("Handling signal",{description:re});const{sdp:oe,type:he}=re;if(!oe||!he)return void g.a.warn("Received non-SDP signal");const{signalingState:me,connectionState:pe}=W;if(me!=="stable"||pe!=="connected")if(W.remoteDescription)g.a.warn(`Received SDP after remote description was set: ${oe}`);else{if(he==="offer"){if(me!=="stable")return void g.a.warn("Received offer SDP when signaling is ongoing.");yield W.setRemoteDescription(re);const ue=yield W.createAnswer();yield W.setLocalDescription(ue);const le=x.clone();return K==null||K("Answer Received",le),le.setPayload(JSON.stringify(ue)),le.setReceiverId(x.getSenderId()),le.setSenderId(x.getReceiverId()),le}if(he==="answer"){if(me==="stable")return void g.a.warn("Received answer SDP when signaling hasn't started.");yield W.setRemoteDescription(re)}}else g.a.warn(`Received SDP when already connected: ${oe}`)})}send(x,W){const K=this.getChannelFromLabel(W.channelLabel);K?this.sendOnChannel(K,x):g.a.warn("Send called with unexpected channel label",{channelLabel:W.channelLabel})}controlRemoteStream(x){this.sendSystemMessage(h(this.reliableStreamChannel),{type:"stream-control",streamControl:x})}isActive(){return new Set(["new","checking","connected","completed"]).has(this.peerConnection.iceConnectionState)||this.isReady()}isReady(){const{reliableStreamChannel:x,latestTtlStreamChannel:W,latestTryOnceStreamChannel:K,latestReliableStreamChannel:re}=this;return(x==null?void 0:x.readyState)==="open"&&(W==null?void 0:W.readyState)==="open"&&(K==null?void 0:K.readyState)==="open"&&(re==null?void 0:re.readyState)==="open"}close(){return qe(this,void 0,void 0,function*(){if(this.closeCalled)return;this.closeCalled=!0,this.sessionMetrics&&(yield this.sessionMetrics.uploadMetrics()),tt(this.pingUpdateTimeout),tt(this.pingV2UpdateTimeout),tt(this.pingV2MetricsGatherTimeout),tt(this.reassemblyTableCleanupTimeout),tt(this.streamsInfoUpdateTimeout),tt(this.heartbeatTimeout);const{peerConnection:x,reliableStreamChannel:W,latestTtlStreamChannel:K,latestTryOnceStreamChannel:re,latestReliableStreamChannel:oe}=this;x.close(),W==null||W.close(),K==null||K.close(),re==null||re.close(),oe==null||oe.close()})}getPing(){return this.pingTimeMs}getPingInfo(){return this.pingInfo}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionCreatedTimestamp(){var x;return(x=this.config.remoteConfig)===null||x===void 0?void 0:x.sessionCreatedTimestamp}setSessionCreatedTimestamp(x){this.config.remoteConfig&&(this.config.remoteConfig.sessionCreatedTimestamp=x)}getSessionId(){var x;return(x=this.config.remoteConfig)===null||x===void 0?void 0:x.sessionId}setSessionId(x){this.config.remoteConfig&&(this.config.remoteConfig.sessionId=x,this.sessionMetrics=new Ce(x,this))}getRemotePeerId(){return this.config.baseConfig.remotePeerId}getRemoteDeviceId(){var x;return(x=this.config.baseConfig)===null||x===void 0?void 0:x.remoteDeviceId}setRemoteDeviceId(x){this.config.baseConfig.remoteDeviceId=x}getSessionMetricsMessageCounts(){var x;return(x=this.sessionMetrics)===null||x===void 0?void 0:x.counts}getConnectionStatsInfo(){return qe(this,void 0,void 0,function*(){const{peerConnection:x}=this;if(!x)return;const W=yield x.getStats(null),K=[];W.forEach(pe=>{K.push(pe)});const re=K.find(pe=>pe.type==="transport");if(!re)return;const oe=K.find(pe=>(pe.type==="candidate-pair"||pe.type==="candidatepair")&&pe.id===re.selectedCandidatePairId);if(!oe)return;const he=K.find(pe=>pe.id===oe.localCandidateId),me=K.find(pe=>pe.id===oe.remoteCandidateId);return he&&me&&(he.address=he.address||he.ip,me.address=me.address||me.ip,he.address!==void 0&&me.address!==void 0)?{transport:re,localCandidate:he,remoteCandidate:me}:void 0})}initializeChannels(x){this.heartbeatChannel=x.createDataChannel("heartbeat",$),this.heartbeatChannel.binaryType="arraybuffer",this.latestTtlStreamChannel=x.createDataChannel("stream.latest-ttl",v),this.latestTtlStreamChannel.binaryType="arraybuffer",this.reliableStreamChannel=x.createDataChannel("stream.reliable",S),this.reliableStreamChannel.binaryType="arraybuffer",this.latestReliableStreamChannel=x.createDataChannel("stream.latest-reliable",U),this.latestReliableStreamChannel.binaryType="arraybuffer",this.latestTryOnceStreamChannel=x.createDataChannel("stream.latest-try-once",J),this.latestTryOnceStreamChannel.binaryType="arraybuffer",this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}getOffer(){var x,W,K;return qe(this,void 0,void 0,function*(){const{gotOffer:re}=this,{peerConnection:oe,config:he}=this;if(this.config.baseConfig.isLan)throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');const me=(x=this.config.remoteConfig)===null||x===void 0?void 0:x.sessionId;if(re)return void g.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,Te(this.peerConnection))return void g.a.debug("Failed to generate offer because the peer connection was inactive.");const pe=he.baseConfig.track;oe.onicecandidate=()=>{this.hasIceCandidate=!0},oe.oniceconnectionstatechange=()=>qe(this,void 0,void 0,function*(){const Be=oe.iceConnectionState;if(Be==="connected"||Be==="completed"){const He=yield this.getConnectionStatsInfo(),Xe=He?function(Ye){const Ge=Ye.localCandidate.candidateType,je=Ye.remoteCandidate.candidateType;return Ge==="host"&&je==="host"?"local":Ge==="relay"||je==="relay"?"TURN":"STUN"}(He):void 0;g.a.info(`ICE connection state changed to ${Be}`,{sessionId:me,connectionStatsInfo:He,iceMode:Xe}),pe==null||pe("ICE connection state change",{iceConnectionState:Be,sessionId:me,connectionStatsInfo:He,iceMode:Xe})}}),yield oe.setLocalDescription(yield oe.createOffer());const ue=new Date().getTime();for(;;){const Be=new Date().getTime()-ue;if(Be>this.connectTimeoutMs)return void g.a.debug("Failed to generate offer because ICE gathering timed out.");if(Be>this.iceGatheringTimeoutMs&&this.hasIceCandidate){g.a.debug("ICE gathering partially completed; proceeding",{iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Be}),pe==null||pe("ICE gathering partially completed",{sessionId:me,iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Be});break}if(oe.iceGatheringState==="complete"){g.a.debug("ICE gathering complete",{iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Be}),pe==null||pe("ICE gathering completed",{sessionId:me,iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Be});break}yield Object(u.a)(.1*c.a.second)}const le=(W=this.peerConnection.getConfiguration().iceServers)!==null&&W!==void 0?W:[];for(const Be of le)Be.credentialType=void 0;const Re=JSON.stringify(le),Ie=new Q.Signal;return Ie.setPayload(JSON.stringify(oe.localDescription)),Ie.setSenderId(this.config.baseConfig.localPeerId),Ie.setReceiverId(this.config.baseConfig.remotePeerId),Ie.setIceServers(Re),Ie.setIceTransportPolicy((K=this.peerConnection.getConfiguration().iceTransportPolicy)!==null&&K!==void 0?K:"all"),this.config.baseConfig.sessionType!==void 0?Ie.setSessionType(this.config.baseConfig.sessionType):Ie.setSessionType(Q.SessionType.TELEOP),g.a.debug("Sending offer signal with description",{description:Ie.getPayload()}),Ie})}getLanOffer(){return qe(this,void 0,void 0,function*(){const{peerConnection:x,gotOffer:W}=this;if(!this.config.baseConfig.isLan)throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');if(W)return void g.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,Te(this.peerConnection))return void g.a.debug("Failed to generate offer because the peer connection was inactive.");yield x.setLocalDescription(yield x.createOffer());const K=new Date().getTime();for(;;){if(new Date().getTime()-K>this.iceGatheringTimeoutMs)return void g.a.debug("Failed to generate offer because ICE gathering timed out.");if(x.iceGatheringState==="complete")break;yield Object(u.a)(.1*c.a.second)}const re=x.localDescription;if(re)return g.a.debug("Sending LAN offer signal with description",{description:re}),re;g.a.error("Failed to generate LAN offer description")})}handleLanAnswer(x){return qe(this,void 0,void 0,function*(){const{peerConnection:W}=this;if(!this.config.baseConfig.isLan)throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');yield W.setRemoteDescription(x)})}getChannelFromLabel(x){switch(x){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(x,W){let K;try{K=Object(H.encode)(JSON.stringify(W))}catch(re){return void g.a.warn("Failed to encode RTC message",{error:re})}try{x.send(K),this.sessionMetrics&&this.sessionMetrics.incrementLocalSent(W)}catch(re){g.a.warn("Failed to send message to channel",{error:re,channel:x.label})}}channelNotRecognized(x){return x!==this.latestTtlStreamChannel&&x!==this.latestReliableStreamChannel&&x!==this.latestTryOnceStreamChannel&&x!==this.reliableStreamChannel}setupChannel(x){x.onmessage=W=>{if(this.channelNotRecognized(x))return void g.a.warn("Received message on unrecognized data channel.");let K;try{K=JSON.parse(Object(H.decode)(W.data))}catch(re){return void g.a.warn("Received unparseable message on RTC stream data channel",{error:re,channel:x.label})}K.communicationType==="message-chunk"?this.receiveChannelMessageChunk(x,K):this.receiveChannelMessage(x,K)},x.onerror=W=>{g.a.warn(`Channel error: ${W.error}`,{error:W.error,sessionId:this.getSessionId(),channelLabel:x.label})},x.onopen=()=>{g.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:x.label})},x.onclose=()=>{const W={bufferedAmount:x.bufferedAmount,sessionId:this.getSessionId(),channelLabel:x.label};this.closeCalled===!1?g.a.debug("Unexpected channel closed",W):g.a.debug("Channel closed",W)}}receiveChannelMessage(x,W){const{config:K}=this,{remotePeerId:re}=this.config.baseConfig;this.lastMessageTimestamp=new Date().getTime(),W=De(W),this.sessionMetrics&&this.sessionMetrics.incrementLocalReceived(W),this.handleSystemMessage(x,W)||(x===this.latestTryOnceStreamChannel||x===this.latestTtlStreamChannel||x===this.latestReliableStreamChannel)&&!this.isLatestMessage(W)||K.baseConfig.receive(re,W)}receiveChannelMessageChunk(x,W){const K=this.reassemblyTable.get(W.id)||[];if(K.push(W),K.length===W.total){const re=function(oe){const he=oe.sort((me,pe)=>me.seq<pe.seq?-1:1).map(me=>me.part).reduce((me,pe)=>me+pe);try{return JSON.parse(he)}catch{return void g.a.warn("Could not reassemble RTC message chunks")}}(K);return re&&this.receiveChannelMessage(x,re),void this.reassemblyTable.delete(W.id)}this.reassemblyTable.set(W.id,K),this.reassemblyTableLastTimestamp.set(W.id,new Date().getTime())}handleSystemMessage(x,W){var K,re;const{config:oe}=this,{baseConfig:he}=oe,{remotePeerId:me}=he;switch(W.header.stream.streamType){case"ping":return this.sendSystemMessage(x,{type:"pong",timestamp:h(W.payload.ping)}),!0;case"pong":{const pe=new Date().getTime()-h(W.payload.pong);return this.pingTimeMs=pe,d.aggregate("rtc-ping-time",pe),!0}case"ping-v2":return this.sendPingV2(),!0;case"pong-v2":{const pe=h(W.payload.pongV2),ue=this.pingV2Map.get(pe.id);return(ue==null?void 0:ue.sent)!==pe.timestamp?(g.a.warn("Pong timestamp doesn't match stored value",{currentEntry:ue,pong:pe}),!0):(this.pingV2Map.set(pe.id,{sent:pe.timestamp,received:new Date().getTime()}),!0)}case"streams-info":{const{sessionMetrics:pe}=this,ue=(K=W.payload.streamsInfo)===null||K===void 0?void 0:K.timestamp;return!!ue&&(pe==null||pe.updateRemoteMessagesCounts(W),(re=he.onStreamsInfoUpdate)===null||re===void 0||re.call(he,me,ue),!0)}case"stream-control":return!0;default:return!1}}sendSystemMessage(x,W){var K;const{localUserId:re,localPeerId:oe}=this.config.baseConfig;if(x.readyState!=="open")return;const he={entityId:re!=null?re:oe,streamName:`$.${W.type}`,streamType:W.type};let me;switch(W.type){case"ping":me={ping:new Date().getTime()};break;case"pong":me={pong:W.timestamp};break;case"ping-v2":me={pingV2:W.payload};break;case"pong-v2":me={pongV2:W.payload};break;case"stream-control":me={streamControl:W.streamControl};break;case"streams-info":me={streamsInfo:(K=this.sessionMetrics)===null||K===void 0?void 0:K.getLocalStreamsInfo(new Date().getTime())}}this.sendOnChannel(x,Ee(he,me))}isLatestMessage(x){const W=Oe(x.header.stream),K=(this.streamLatestTimestamp.get(W)||0)<=x.header.created;return K&&this.streamLatestTimestamp.set(W,x.header.created),K}}function tt(ye){ye&&clearInterval(ye)}function Tt(ye){var x,W;return{userId:(x=ye.getUserId())===null||x===void 0?void 0:x.getValue(),deviceId:(W=ye.getDeviceId())===null||W===void 0?void 0:W.getValue(),organizationId:ye.getOrganizationId(),id:ye.getPeerId(),capabilities:[],capabilitySet:{}}}var Le=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class vt{constructor(x){this.config=x,this.grpcCallDeadline=5*c.a.second,this.refreshIntervalDelayMs=2*c.a.second,this.iceServersTtl=30*c.a.minute,this.connections=[],this.localConnections=[],this.isConnectionInitiator=new Map,this.isOutgoingConnection=new Map,this.peerDataChannelListeners=[];const{refreshIntervalDelayMs:W}=this;this.refreshInterval=f({func:()=>Le(this,void 0,void 0,function*(){try{yield this.update()}catch(K){g.a.warn("RTC refresh failed",{error:K})}}),delay:W,immediate:!0})}send(x,W,K){const re=this.getActiveConnection(x);re?re.isReady()?re.send(W,K):g.a.warn("Send called with unready connection."):g.a.warn("Send called with no connection.")}controlRemoteStream(x,W){const K=this.getActiveConnection(x);K?K.isReady()?K.controlRemoteStream(W):g.a.warn("controlRemoteStream called with unready connection."):g.a.warn("controlRemoteStream called with no connection.")}getLocalPeer(){return Le(this,void 0,void 0,function*(){for(;!this.localPeer;)yield Object(u.a)(.1*c.a.second);return Tt(this.localPeer)})}connect(x,W){var K,re,oe;return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode===!0)throw new Error("connect method called in local only mode.");const{track:he,signalingClient:me}=this.config,{localPeer:pe,receiveSignalStream:ue,iceServers:le}=this;if(!pe||!ue||!le)return void g.a.warn("Connect called prior to local peer, receiveSignalStream, and ICE servers ready");if(this.getActiveConnection(x))return void g.a.warn("Connect called for peer with existing connection.");if(this.isOutgoingConnection.get(x))return void g.a.warn("Connect called for peer with an existing outgoing connection offer.");this.isOutgoingConnection.set(x,!0);const Re=function(je,ke,$e){const{rtcIceTransportPolicies:Ze,rtcIceServerProtocol:Ke,useAllServers:Je}=ke||{},ot=je.map(it=>Object.assign(Object.assign({},it),{urls:it.urls.filter(ht=>{const _t=(Ze===void 0||Ze.some(St=>z(ht,St)))&&(Ke===void 0||X(ht,Ke));return _t||g.a.debug(`Ignoring ICE server: ${ht}`,{organizationId:$e}),_t})})).filter(({urls:it})=>it.filter(ht=>ht).length>0);return Je?ot:[B(ot,"stun"),B(ot,"turn")].filter(it=>it!==void 0).map(it=>h(it))}(le,W);g.a.debug("Received ICE servers:",le),g.a.debug("Using ICE servers:",Re);const Ie=new Qe(yield this.createRTCPeerConnection(Re),{baseConfig:{isOffer:!0,isLan:!1,receive:(je,ke)=>this.config.receive(je,ke),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(je,ke)=>{var $e,Ze;return(Ze=($e=this.config).onStreamsInfoUpdate)===null||Ze===void 0?void 0:Ze.call($e,je,ke)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(K=pe.getUserId())===null||K===void 0?void 0:K.getValue(),localPeerId:pe.getPeerId(),remotePeerId:x,sessionType:this.config.sessionType},remoteConfig:{}},je=>this.onCustomDataChannel(x,je)),Be=yield Ie.getOffer();if(!Be)return g.a.error("Failed to generate offer."),void this.isOutgoingConnection.delete(x);g.a.debug("Sending offer."),he==null||he("Sending offer",Be);const He=new Q.SendSignalRequest;He.setSignal(Be);const Xe=yield(()=>Le(this,void 0,void 0,function*(){try{return yield me.sendSignal(He,yield this.getMetadata({}))}catch(je){g.a.warn("Error when sending signal",{error:je})}}))();if(!this.isOutgoingConnection.get(x))return void g.a.debug("No offer set after receiving offer signal response.");g.a.debug("Offer sent.");const Ye=(re=Xe==null?void 0:Xe.getSessionId())===null||re===void 0?void 0:re.getValue(),Ge=(oe=Xe==null?void 0:Xe.getSessionCreatedTimestamp())===null||oe===void 0?void 0:oe.getValue();return Ye&&Ge?(Ie.setSessionId(Ye),Ie.setSessionCreatedTimestamp(Ge),this.isOutgoingConnection.delete(x),this.connections.push(Ie),this.isConnectionInitiator.set(Ie,!0),this.setupHandlers(Ie),Ye):(g.a.warn("No session ID or no session created timestamp on send signal response."),void this.isOutgoingConnection.delete(x))})}connectLan(x){var W,K;return Le(this,void 0,void 0,function*(){const re=new N(x),oe=new Qe(yield this.createRTCPeerConnection([]),{baseConfig:{isOffer:!0,isLan:!0,receive:(ue,le)=>this.config.receive(ue,le),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ue,le)=>{var Re,Ie;return(Ie=(Re=this.config).onStreamsInfoUpdate)===null||Ie===void 0?void 0:Ie.call(Re,ue,le)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(K=(W=this.localPeer)===null||W===void 0?void 0:W.getUserId())===null||K===void 0?void 0:K.getValue(),localPeerId:"lan_client",remotePeerId:x}},ue=>this.onCustomDataChannel(x,ue)),he=yield oe.getLanOffer();if(!he)return g.a.warn("Could not generate LAN offer"),!1;const me=yield re.postLanRtcOffer({offer:JSON.stringify(he)}),pe=new RTCSessionDescription(JSON.parse(me.answer));return yield oe.handleLanAnswer(pe),this.localConnections.push(oe),this.isConnectionInitiator.set(oe,!0),Object(q.a)()})}getConnections(){return[...this.connections,...this.localConnections]}createCustomDataChannel(x,W,K,re,oe){const he=this.getActiveConnection(x);if(he&&this.isConnectionInitiator.has(he)){const pe=he.peerConnection.createDataChannel("custom."+W,K);return re&&(pe.binaryType="arraybuffer"),oe(x,pe),()=>{}}const me=(pe,ue)=>{x===pe&&ue.label==="custom."+W&&oe(x,ue)};return this.peerDataChannelListeners.push(me),()=>{this.peerDataChannelListeners=this.peerDataChannelListeners.filter(pe=>pe!==me)}}onCustomDataChannel(x,W){this.peerDataChannelListeners.forEach(K=>K(x,W))}getConnectionStatus(x){if(this.isOutgoingConnection.get(x))return"connecting";const W=this.getActiveConnection(x);return W?W.isReady()?"connected":"connecting":"disconnected"}getConnectionStatsInfo(x){return Le(this,void 0,void 0,function*(){const W=this.getActiveConnection(x);if(W)return yield W.getConnectionStatsInfo()})}disconnect(x){return Le(this,void 0,void 0,function*(){const W=this.getActiveConnection(x);W&&(yield W.close())})}getPeers(){return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:x}=this.config,W=yield(()=>Le(this,void 0,void 0,function*(){try{return yield x.getPeers(new Q.GetPeersRequest,yield this.getMetadata({}))}catch(oe){g.a.warn("Error when getting peers",{error:oe})}}))();if(!W)return[];const K=W.getPeersList();if(!K)return[];const re=oe=>{var he,me;return(me=(he=oe.getPeerCreatedTimestamp())===null||he===void 0?void 0:he.getValue())!==null&&me!==void 0?me:0};return K.sort((oe,he)=>re(he)-re(oe)).map(oe=>Tt(oe))})}getSessions(){return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:x}=this.config,W=yield(()=>Le(this,void 0,void 0,function*(){try{return yield x.getPeers(new Q.GetPeersRequest,yield this.getMetadata({}))}catch(oe){g.a.warn("Error when getting peers",{error:oe})}}))();if(!W)return{};const K=W.getPeersList(),re={};for(const oe of K)re[oe.getPeerId()]=oe.getSessionIdsList();return re})}getPing(x){const W=this.getActiveConnection(x);if(W)return W.getPing();g.a.warn("Attempted to get ping time from inactive peer.")}getPingInfo(x){const W=this.getActiveConnection(x);if(W)return W.getPingInfo();g.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(x){const W=this.getActiveConnection(x);if(W)return W.getLastMessageTimestamp();g.a.warn("Attempted to get last message time from inactive peer.")}getSessionMetricsMessageCounts(x){const W=this.getActiveConnection(x);if(W)return W.getSessionMetricsMessageCounts();g.a.warn("Attempted to get session metrics counts from inactive peer.")}isReady(){if(this.config.lanOnlyMode)return!0;const{localPeer:x,receiveSignalStream:W,iceServers:K}=this;return!!(x&&W&&K)}shutdown(){return Le(this,void 0,void 0,function*(){g.a.info("Shutdown called on RTC client"),yield this.refreshInterval.stop(),this.receiveSignalStream&&this.receiveSignalStream.cancel();const x=this.connections;this.connections=[],yield this.closeConnections(x);const{localPeer:W}=this;if(!W||this.config.lanOnlyMode)return;const{signalingClient:K}=this.config;yield(()=>Le(this,void 0,void 0,function*(){try{const re=new Q.DeletePeerRequest;re.setPeerId(W.getPeerId()),yield K.deletePeer(re,yield this.getMetadata({}))}catch(re){return void g.a.warn("Error deleting local peer",{error:re})}}))()})}createPeer(){return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createPeer method cannot be used in local-only mode.");const{signalingClient:x}=this.config,W=yield(()=>Le(this,void 0,void 0,function*(){try{return yield x.createPeer(new Q.CreatePeerRequest,yield this.getMetadata({}))}catch(re){throw new Error(`Was not able to create peer: ${JSON.stringify(re)}`)}}))(),K=W==null?void 0:W.getPeer();if(!K)throw new Error("Response did not provide peer.");return this.localPeer=K})}createReceiveSignalStream(){return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");const{signalingClient:x}=this.config,{localPeer:W,iceServers:K}=this;if(!W||!K)return;const{receiveSignalStream:re}=this;re&&re.cancel();const oe=new Q.ReceiveSignalStreamRequest;oe.setPeerId(W.getPeerId());const he=yield(()=>Le(this,void 0,void 0,function*(){try{return x.receiveSignalStream(oe,yield this.getMetadata({hasDeadline:!1}))}catch(me){throw new Error(`Unable to create receive signal stream: ${JSON.stringify(me)}`)}}))();if(!he)throw new Error("Response did not provide stream.");return he.on("data",me=>Le(this,void 0,void 0,function*(){var pe,ue,le,Re;const Ie=me.getSignal(),Be=(pe=Ie==null?void 0:Ie.getSessionId())===null||pe===void 0?void 0:pe.getValue(),He=Ie==null?void 0:Ie.getSenderId(),Xe=Ie==null?void 0:Ie.getReceiverId(),Ye=(ue=Ie==null?void 0:Ie.getSessionCreatedTimestamp())===null||ue===void 0?void 0:ue.getValue();if(!(Ie&&Be&&He&&Xe&&Ye))return void g.a.warn("Received signal with missing information.");const Ge=this.getActiveConnection(He);if(Ge)if(Ge.getSessionId()!==Be){if(g.a.debug("Received signal: different session for a peer we're already connected to."),(Ge.getSessionCreatedTimestamp()||0)>Ye)return;const je=new Qe(yield this.createRTCPeerConnection(K),{baseConfig:{isOffer:!1,isLan:!1,receive:(ke,$e)=>this.config.receive(ke,$e),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ke,$e)=>{var Ze,Ke;return(Ke=(Ze=this.config).onStreamsInfoUpdate)===null||Ke===void 0?void 0:Ke.call(Ze,ke,$e)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:W.getPeerId(),localUserId:(Re=W.getUserId())===null||Re===void 0?void 0:Re.getValue(),remotePeerId:He},remoteConfig:{sessionId:Be,sessionCreatedTimestamp:Ye}},ke=>this.onCustomDataChannel(He,ke));yield je.handleSignal(Ie),this.connections.push(je)}else g.a.debug("Received signal: for an existing connection."),yield Ge.handleSignal(Ie);else{g.a.debug("Received signal: new connection.");const je=new Qe(yield this.createRTCPeerConnection(K),{baseConfig:{isOffer:!1,isLan:!1,receive:(ke,$e)=>this.config.receive(ke,$e),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ke,$e)=>{var Ze,Ke;return(Ke=(Ze=this.config).onStreamsInfoUpdate)===null||Ke===void 0?void 0:Ke.call(Ze,ke,$e)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:W.getPeerId(),localUserId:(le=W.getUserId())===null||le===void 0?void 0:le.getValue(),remotePeerId:He},remoteConfig:{sessionId:Be,sessionCreatedTimestamp:Ye}},ke=>this.onCustomDataChannel(He,ke));yield je.handleSignal(Ie),this.connections.push(je)}})),he.on("end",()=>{he.cancel(),this.receiveSignalStream=void 0}),he.on("error",me=>{switch(me.code){case te.StatusCode.CANCELLED:case te.StatusCode.UNAVAILABLE:case te.StatusCode.UNKNOWN:g.a.debug("Receive signal stream error",{error:me});break;case te.StatusCode.UNAUTHENTICATED:g.a.warn("Receive signal stream error",{error:me});break;default:g.a.error("Receive signal stream error",{error:me})}he.cancel(),this.receiveSignalStream=void 0}),this.receiveSignalStream=he})}createRTCPeerConnection(x){var W;return Le(this,void 0,void 0,function*(){const K=(W=this.config.alternateRTCPeerConnection)!==null&&W!==void 0?W:window.RTCPeerConnection;if(!K)throw function(){const{userAgent:re}=navigator;return re.includes("Firefox/")?"Firefox":re.includes("Edg/")?"Edge":re.includes("Chrome/")?"Chrome":re.includes("Safari/")?"Safari":re.includes("MSIE/")||re.includes("Trident/")?"IE":"Other"}()!=="Chrome"?new Error("WebRTC is not enabled. Please try again with the latest version of Google Chrome."):new Error("WebRTC is not enabled. Please ensure WebRTC is not disabled by ad blocking software.");return new K({iceServers:x})})}closeConnections(x){return Le(this,void 0,void 0,function*(){const W=yield w(x.map(K=>Le(this,void 0,void 0,function*(){yield K.close()})));for(const K of W)g.a.warn("Request to close session failed",{error:K})})}getActiveConnection(x){return this.getConnections().find(W=>W.getRemotePeerId()===x&&W.isActive())}update(){var x;return Le(this,void 0,void 0,function*(){if(this.localConnections=this.localConnections.filter(me=>me.isActive()),this.config.lanOnlyMode)return;const{signalingClient:W}=this.config;if(!this.localPeer||!this.receiveSignalStream||!this.iceServers)return this.localPeer||(yield this.createPeer()),this.iceServers||(yield this.updateIceServers()),void(this.receiveSignalStream||(yield this.createReceiveSignalStream()));yield this.closeConnections(this.connections.filter(me=>!me.isActive())),this.connections=this.connections.filter(me=>me.isActive());const{localPeer:K}=this,re=this.connections.filter(me=>me.getSessionId).map(me=>h(me.getSessionId()));K.setSessionIdsList(re);const oe=new Q.RefreshPeerRequest;oe.setPeer(K);try{yield W.refreshPeer(oe,yield this.getMetadata({}))}catch(me){me.code===te.StatusCode.NOT_FOUND?(g.a.warn("Peer expired, creating new peer",{peerId:K.getPeerId()}),yield this.reset()):g.a.warn("Error calling RefreshPeer",{error:me})}const he=yield this.getPeers();for(const me of this.connections)me.setRemoteDeviceId((x=he.find(pe=>pe.id===me.getRemotePeerId()))===null||x===void 0?void 0:x.deviceId)})}reset(){return Le(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.isOutgoingConnection=new Map,yield this.createPeer(),yield this.createReceiveSignalStream()})}updateIceServers(){return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)return;const{iceServersLastUpdate:x,iceServersTtl:W}=this,K=new Date().getTime();if(!x||K-x>W)try{const re=(yield this.config.signalingClient.getIceServers(new Q.GetIceServersRequest,yield this.getMetadata({}))).getIceServers();this.iceServers=JSON.parse(re),this.iceServersLastUpdate=K}catch(re){g.a.warn("Error in updateIceServers",{error:re})}})}setupHandlers(x){const{peerConnection:W}=x,K=x.getSessionCreatedTimestamp();W.onconnectionstatechange=()=>Le(this,void 0,void 0,function*(){const re=W.connectionState;if(K)switch(re){case"connected":d.aggregate("rtc-connect-time",new Date().getTime()-K);break;case"failed":d.increment("rtc-connect-failed")}})}getMetadata(x){return Le(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getMetadata method cannot be called in local-only mode");const{getToken:W}=this.config,{grpcCallDeadline:K}=this,{hasDeadline:re}=x,oe=re===!1?void 0:new Date().getTime()+K;return{authorization:yield W(),deadline:oe}})}}var gt=n(10),lt=n(11),At=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class Ot{constructor(x,W){this.sessionId=x,this.connection=W,this.sentMessagesCounts=new Map,this.receivedMessagesCounts=new Map,this.sessionId=x,this.connection=W}incrementMessageSent(x){const W=Oe(x.header.stream);this.sentMessagesCounts.set(W,(this.sentMessagesCounts.get(W)||0)+1)}incrementMessageReceived(x){const W=Oe(x.header.stream);this.receivedMessagesCounts.set(W,(this.receivedMessagesCounts.get(W)||0)+1)}uploadMetrics(){return At(this,void 0,void 0,function*(){const{sessionId:x}=this,W=yield this.connection.peerConnection.getStats(),K={};W.forEach(oe=>K[oe.id]=oe),g.a.debug("rtc-stats",Object.assign(Object.assign({},K),{sessionId:x}));const re=[...new Set(Array.from(this.sentMessagesCounts.keys()).concat(Array.from(this.receivedMessagesCounts.keys())))].reduce((oe,he)=>{const me=this.sentMessagesCounts.get(he),pe=this.receivedMessagesCounts.get(he);return Object.assign(Object.assign({},oe),{[`${he}-sent`]:me,[`${he}-received`]:pe})},{sessionId:x});g.a.debug("rtc-message-report",re)})}}function ut(ye,x){return Oe(ye)===Oe(x)}var et=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class Ct{constructor(x,W){this.peerConnection=x,this.config=W,this.connectTimeoutMs=10*c.a.second,this.gatherIceTimeoutMs=5*c.a.second,this.pingUpdateTimeoutMs=2*c.a.second,this.streamLatestTimestamp=new Map,this.closeCalled=!1,this.connectCalled=!1,this.sentOffer=!1,this.receivedIceCandidate=!1;const{isOffer:K}=W;K?this.initializeChannels(x):x.ondatachannel=re=>{switch(re.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=re.channel;break;case"stream.reliable":this.reliableStreamChannel=re.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=re.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=re.channel}this.setupChannel(re.channel)},this.sessionMetrics=new Ot(this.getSessionId(),this)}connect(){return et(this,void 0,void 0,function*(){if(this.connectCalled)return;this.connectCalled=!0,this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:re}=this;re&&this.sendSystemMessage(re,{type:"ping"})},this.pingUpdateTimeoutMs),this.connectTimeout=setTimeout(()=>et(this,void 0,void 0,function*(){this.isReady()||(g.a.warn("RTC connect timed out, closing connection"),yield this.close())}),this.connectTimeoutMs);const{peerConnection:x,config:{isOffer:W,sessionId:K}}=this;if(W){const re=yield x.createOffer();yield x.setLocalDescription(re)}W&&(this.gatherIceTimeout=setTimeout(()=>et(this,void 0,void 0,function*(){this.sentOffer||(g.a.warn("ICE gathering timed out"),this.receivedIceCandidate?(g.a.warn("Attempting to connect with partial ICE candidate pool"),yield this.sendOffer()):yield this.close())}),this.gatherIceTimeoutMs),x.onicecandidate=re=>et(this,void 0,void 0,function*(){re.candidate?this.receivedIceCandidate=!0:yield this.sendOffer()}),x.onicegatheringstatechange=()=>et(this,void 0,void 0,function*(){x.iceGatheringState==="complete"&&(yield this.sendOffer())}),x.onnegotiationneeded=()=>{g.a.debug("Negotiation needed",{sessionId:K})})})}handleSignal(x){return et(this,void 0,void 0,function*(){const{peerConnection:W,config:{sessionId:K,sendSignal:re}}=this,{description:oe}=JSON.parse(x.payload);if(g.a.debug("Handling signal",{sessionId:K,description:JSON.stringify(oe)}),oe)if(W.signalingState!=="stable"||W.connectionState!=="connected")if(W.remoteDescription)g.a.warn(`Received SDP signal during negotiation when remote description is already set: ${JSON.stringify(x)}`);else if(oe.type==="offer"){yield W.setRemoteDescription(oe);const he=yield W.createAnswer();yield W.setLocalDescription(he),yield re({payload:JSON.stringify({description:he})})}else oe.type==="answer"&&(yield W.setRemoteDescription(oe));else g.a.warn(`Received SDP signal when signaling is stable and connected: ${JSON.stringify(x)}`);else g.a.warn(`Received non-SDP signal: ${JSON.stringify(x)}`)})}send(x,W){const K=this.getChannelFromLabel(W.channelLabel);K?this.sendOnChannel(K,x):g.a.warn("Send called with unexpected channel label",{channelLabel:W.channelLabel})}controlRemoteStream(x){this.sendSystemMessage(h(this.reliableStreamChannel),{type:"stream-control",streamControl:x})}isActive(){return new Set(["new","connecting","connected"]).has(this.peerConnection.connectionState)}isReady(){const{peerConnection:x,latestTtlStreamChannel:W,reliableStreamChannel:K,latestTryOnceStreamChannel:re}=this;return!!(K&&W&&re)&&x.connectionState==="connected"&&K.readyState==="open"&&W.readyState==="open"&&re.readyState==="open"}isClosed(){const{peerConnection:x,reliableStreamChannel:W,latestTryOnceStreamChannel:K,latestTtlStreamChannel:re}=this;return!(x.connectionState!=="closed"||W!==void 0&&W.readyState!=="closed"||K!==void 0&&K.readyState!=="closed"||re!==void 0&&re.readyState!=="closed")}needsClosing(){const{peerConnection:x,latestTtlStreamChannel:W,reliableStreamChannel:K,latestTryOnceStreamChannel:re}=this;if(this.isClosed())return!1;const oe=new Set(["closing","closed"]),he=me=>me&&oe.has(me.readyState);return Te(x)||he(W)||he(K)||he(re)}close(){return et(this,void 0,void 0,function*(){this.closeCalled||(this.closeCalled=!0,yield this.sessionMetrics.uploadMetrics(),this.pingUpdateTimeout&&clearInterval(this.pingUpdateTimeout),this.connectTimeout&&clearTimeout(this.connectTimeout),this.gatherIceTimeout&&clearTimeout(this.gatherIceTimeout),this.peerConnection.close())})}getPing(){return this.pingTimeMs}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionId(){return this.config.sessionId}getRemotePeer(){return this.config.remotePeer}initializeChannels(x){this.latestTtlStreamChannel=x.createDataChannel("stream.latest-ttl",v),this.reliableStreamChannel=x.createDataChannel("stream.reliable",S),this.latestReliableStreamChannel=x.createDataChannel("stream.latest-reliable",U),this.latestTryOnceStreamChannel=x.createDataChannel("stream.latest-try-once",J),this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}sendOffer(){return et(this,void 0,void 0,function*(){if(this.sentOffer||(this.sentOffer=!0,Te(this.peerConnection)))return;const{peerConnection:x,config:{sendSignal:W}}=this,K=yield x.createOffer();yield x.setLocalDescription(K);const re={payload:JSON.stringify({description:K})};yield W(re)})}getChannelFromLabel(x){switch(x){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(x,W){let K;try{K=Object(H.encode)(JSON.stringify(W))}catch(re){return void g.a.warn("Failed to encode RTC message",{error:re})}try{x.send(K),this.sessionMetrics.incrementMessageSent(W)}catch(re){g.a.warn("Failed to send message to channel",{error:re,channel:x.label})}}channelNotRecognized(x){return x!==this.latestTtlStreamChannel&&x!==this.latestReliableStreamChannel&&x!==this.latestTryOnceStreamChannel&&x!==this.reliableStreamChannel}setupChannel(x){x.onmessage=W=>{if(this.channelNotRecognized(x))return void g.a.warn("Received message on unrecognized data channel.");let K;try{K=JSON.parse(Object(H.decode)(W.data))}catch(re){return void g.a.warn("Received unparseable RTC message",{error:re,channel:x.label})}if(this.lastMessageTimestamp=new Date().getTime(),K=De(K),this.sessionMetrics.incrementMessageReceived(K),!this.handleSystemMessage(x,K)){if(!this.hasCapabilities(K))return void g.a.warn("Received RTC message that was not within the capability scope of the connection.");(x===this.latestTryOnceStreamChannel||x===this.latestTtlStreamChannel||x===this.latestReliableStreamChannel)&&!this.isLatestMessage(K)||this.config.receive(this.config.remotePeer.id,K)}},x.onerror=W=>{g.a.warn(`Channel error: ${W.error}`,{error:W.error,sessionId:this.getSessionId(),channelLabel:x.label})},x.onopen=()=>{g.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:x.label})},x.onclose=()=>{const W={bufferedAmount:x.bufferedAmount,sessionId:this.getSessionId(),channelLabel:x.label};this.closeCalled===!1?g.a.debug("Unexpected channel closed",W):g.a.debug("Channel closed",W)}}handleSystemMessage(x,W){switch(W.header.stream.streamType){case"ping":return this.sendSystemMessage(x,{type:"pong",timestamp:h(W.payload.ping)}),!0;case"pong":{const K=new Date().getTime()-h(W.payload.pong);return this.pingTimeMs=K,d.aggregate("rtc-ping-time",K),!0}case"stream-control":return!0;default:return!1}}sendSystemMessage(x,W){if(x.readyState!=="open")return;const K={entityId:h(this.config.localPeer.deviceId||this.config.localPeer.userId),streamName:`$.${W.type}`,streamType:W.type};let re;switch(W.type){case"ping":re={ping:new Date().getTime()};break;case"pong":re={pong:W.timestamp};break;case"stream-control":re={streamControl:W.streamControl}}this.sendOnChannel(x,Ee(K,re))}hasCapabilities(x){var W,K;const{localPeer:re,remotePeer:oe}=this.config,he=(W=re.capabilitySet.streaming)===null||W===void 0?void 0:W.streams,me=he&&he.some(le=>le.receive&&ut(le.stream,x.header.stream)),pe=(K=oe.capabilitySet.streaming)===null||K===void 0?void 0:K.streams,ue=pe&&pe.some(le=>le.send&&ut(le.stream,x.header.stream));return me||ue}isLatestMessage(x){const W=Oe(x.header.stream),K=(this.streamLatestTimestamp.get(W)||0)<=x.header.created;return K&&this.streamLatestTimestamp.set(W,x.header.created),K}}var Ue=function(ye,x,W,K){return new(W||(W=Promise))(function(re,oe){function he(ue){try{pe(K.next(ue))}catch(le){oe(le)}}function me(ue){try{pe(K.throw(ue))}catch(le){oe(le)}}function pe(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof W?le:new W(function(Re){Re(le)})).then(he,me)}pe((K=K.apply(ye,x||[])).next())})};class It{constructor(x){this.config=x,this.connections=[],this.connectingSessions=new Map,this.updateInterval=f({func:()=>Ue(this,void 0,void 0,function*(){try{yield this.update()}catch(W){g.a.warn("RTC update failed",{error:W})}}),delay:250*c.a.millisecond,immediate:!0}),this.localPeer=this.createPeer()}send(x,W,K){const re=this.getActiveConnection(x);re?re.isReady()?re.send(W,K):g.a.warn("Attempted to send with an active connection to that peer which was not yet ready."):g.a.warn("Attempted to send with no active connection to that peer.")}controlRemoteStream(x,W){const K=this.getActiveConnection(x);K?K.isReady()?K.controlRemoteStream(W):g.a.warn("Attempted to control remote stream with an active connection to that peer which was not yet ready."):g.a.warn("Attempted to control remote stream with no active connection to that peer.")}connect(x){return Ue(this,void 0,void 0,function*(){const W=yield this.getLocalPeer();if(this.getActiveConnection(x))return void g.a.warn("Attempted to connect to peer with an already active connection.");let K;try{K=yield this.config.signalingClient.createSession(yield this.config.getToken(),{offerPeerId:W.id,answerPeerId:x})}catch(re){Object(gt.a)(re,lt.a,oe=>oe.statusCode===404),g.a.warn("Attempted to connect to peer that does not exist.")}if(K)for(this.connectingSessions.set(K.id,new Date().getTime()),yield this.connectToSession(K);;)switch(yield Object(u.a)(.1),this.getConnectionStatus(x)){case"connecting":continue;case"connected":return K.id;case"disconnected":return}})}getConnectionStatus(x){const W=this.getActiveConnection(x);return W?W.isReady()?"connected":"connecting":"disconnected"}getIceMode(x){const W=this.getActiveConnection(x);if(W)return W.iceMode}disconnect(x){return Ue(this,void 0,void 0,function*(){const W=this.getActiveConnection(x);W&&(yield this.closeConnection(W))})}getLocalPeer(){return Ue(this,void 0,void 0,function*(){return yield this.localPeer})}getPeers(){return Ue(this,void 0,void 0,function*(){return yield this.config.signalingClient.getPeers(yield this.config.getToken())})}getPing(x){const W=this.getActiveConnection(x);if(W)return W.getPing();g.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(x){const W=this.getActiveConnection(x);if(W)return W.getLastMessageTimestamp();g.a.warn("Attempted to get ping time from inactive peer.")}shutdown(){return Ue(this,void 0,void 0,function*(){yield this.updateInterval.stop();const x=this.connections;this.connections=[],yield this.closeConnections(x)})}closeConnection(x){return Ue(this,void 0,void 0,function*(){this.connectingSessions.delete(x.getSessionId()),yield x.close();try{yield this.config.signalingClient.deleteSession(yield this.config.getToken(),x.getSessionId())}catch(W){Object(gt.a)(W,lt.a,K=>K.statusCode===404)}})}getSessions(){return Ue(this,void 0,void 0,function*(){const x=yield this.getLocalPeer();return(yield this.config.signalingClient.getSessions(yield this.config.getToken())).filter(W=>W.offer.peer.id===x.id||W.answer.peer.id===x.id)})}createPeer(){return Ue(this,void 0,void 0,function*(){return yield this.config.signalingClient.createPeer(yield this.config.getToken(),{capabilitySet:this.config.capabilitySet||{}})})}createRTCPeerConnection(x={}){return Ue(this,void 0,void 0,function*(){return new(this.config.alternateRTCPeerConnection||RTCPeerConnection)(Object.assign({iceServers:yield this.config.signalingClient.getIceServers(yield this.config.getToken())},x))})}closeConnections(x){return Ue(this,void 0,void 0,function*(){const W=yield w(x.map(K=>Ue(this,void 0,void 0,function*(){yield this.closeConnection(K)})));for(const K of W)g.a.warn("Request to close session failed",{error:K})})}reset(){return Ue(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.connectingSessions=new Map,this.localPeer=this.createPeer(),yield this.localPeer})}getActiveConnection(x){return this.connections.find(W=>W.getRemotePeer().id===x&&W.isActive())}update(){return Ue(this,void 0,void 0,function*(){const x=yield this.getLocalPeer();try{yield this.config.signalingClient.refreshPeer(yield this.config.getToken(),x.id)}catch(W){Object(gt.a)(W,lt.a,K=>K.statusCode===404),g.a.warn("Peer expired, creating new peer",{peerId:x.id}),yield this.reset()}yield this.handleSessions(yield this.getSessions())})}handleSessions(x){return Ue(this,void 0,void 0,function*(){yield this.syncConnectionsAndSessions(x);const W=x.map(K=>({session:K,connection:this.connections.find(re=>re.getSessionId()===K.id)}));yield Promise.all(W.map(({session:K,connection:re})=>Ue(this,void 0,void 0,function*(){return yield this.maintainConnection(K,re)})))})}syncConnectionsAndSessions(x){return Ue(this,void 0,void 0,function*(){const W=new Set(x.map(oe=>oe.id)),K=oe=>W.has(oe.getSessionId())||this.connectingSessions.has(oe.getSessionId());this.connections=this.connections.filter(oe=>K(oe));const re=this.connections.filter(oe=>!K(oe)||oe.needsClosing());yield Promise.all(re.map(oe=>Ue(this,void 0,void 0,function*(){yield this.closeConnection(oe)})))})}maintainConnection(x,W){return Ue(this,void 0,void 0,function*(){const K=yield this.getLocalPeer(),re=x.offer.peer.id===K.id;if(W){if(W.isReady())try{yield this.config.signalingClient.refreshSession(yield this.config.getToken(),x.id)}catch(oe){Object(gt.a)(oe,lt.a,he=>he.statusCode===404),g.a.debug("Refresh session not found",{sessionId:x.id})}else if(W.isActive())try{yield this.consumeSignals(W)}catch(oe){g.a.warn("Failed to ingest signals, closing connection",{error:oe}),yield this.closeConnection(W)}}else{if(re)return;yield this.connectToSession(x)}})}connectToSession(x){return Ue(this,void 0,void 0,function*(){const W=yield this.getLocalPeer(),K=x.offer.peer.id===W.id,re=yield this.createRTCPeerConnection(),oe=new Ct(re,{localPeer:K?x.offer.peer:x.answer.peer,remotePeer:K?x.answer.peer:x.offer.peer,sessionId:x.id,isOffer:K,sendSignal:he=>this.sendSignal(x.id,he),receive:(he,me)=>this.config.receive(he,me)});if(this.connections.find(he=>he.getSessionId()===x.id))return g.a.warn("connectToSession called on a session that already has a connection.",{sessionId:x.id}),void(yield oe.close());this.setupHandlers(oe),this.connections.push(oe);try{yield oe.connect()}catch(he){g.a.warn("Failed to handle negotiation, closing connection",{error:he}),yield this.closeConnection(oe)}})}setupHandlers(x){const{peerConnection:W}=x,K=x.getSessionId();W.onconnectionstatechange=()=>Ue(this,void 0,void 0,function*(){const re=this.connectingSessions.get(K);if(re===void 0)return;const oe=W.connectionState;switch(Te(W)&&this.connectingSessions.delete(K),oe){case"connected":{this.connectingSessions.delete(K);const he=new Date().getTime()-re;d.aggregate("rtc-connect-time",he);break}case"failed":d.increment("rtc-connect-failed"),yield this.closeConnection(x)}})}consumeSignals(x){return Ue(this,void 0,void 0,function*(){let W=[];try{W=yield this.config.signalingClient.takeSignals(yield this.config.getToken(),x.getSessionId())}catch(K){Object(gt.a)(K,lt.a,re=>re.statusCode===404)}for(const K of W)yield x.handleSignal(K)})}sendSignal(x,W){return Ue(this,void 0,void 0,function*(){try{yield this.config.signalingClient.addSignals(yield this.config.getToken(),x,{signals:[W]})}catch(K){Object(gt.a)(K,lt.a,re=>re.statusCode===404)}})}}},function(e,t,n){var r={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const l=new Uint8Array(16);function s(){if(!o&&(o=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(l)}const i=[];for(let u=0;u<256;++u)i.push((u+256).toString(16).slice(1));function c(u,m=0){return(i[u[m+0]]+i[u[m+1]]+i[u[m+2]]+i[u[m+3]]+"-"+i[u[m+4]]+i[u[m+5]]+"-"+i[u[m+6]]+i[u[m+7]]+"-"+i[u[m+8]]+i[u[m+9]]+"-"+i[u[m+10]]+i[u[m+11]]+i[u[m+12]]+i[u[m+13]]+i[u[m+14]]+i[u[m+15]]).toLowerCase()}t.a=function(u,m,R){if(r.randomUUID&&!m&&!u)return r.randomUUID();const E=(u=u||{}).random||(u.rng||s)();if(E[6]=15&E[6]|64,E[8]=63&E[8]|128,m){R=R||0;for(let y=0;y<16;++y)m[R+y]=E[y];return m}return c(E)}},,function(e,t,n){n.r(t),n.d(t,"LogClient",function(){return i});var r=n(28),o=n(10),l=n(11),s=function(c,u,m,R){return new(m||(m=Promise))(function(E,y){function g(L){try{T(R.next(L))}catch(V){y(V)}}function _(L){try{T(R.throw(L))}catch(V){y(V)}}function T(L){var V;L.done?E(L.value):(V=L.value,V instanceof m?V:new m(function(M){M(V)})).then(g,_)}T((R=R.apply(c,u||[])).next())})};class i extends r.a{log(u){return s(this,void 0,void 0,function*(){const m=i.token;try{yield this.fetch("logs",{token:m,method:"POST",body:JSON.stringify({logs:u}),allowUnsafeRetries:!0})}catch(R){Object(o.a)(R,l.a,E=>E.statusCode===401&&m!==void 0),i.token===m&&delete i.token,yield this.log(u)}})}}}])})})(dist);function defined(e,t){if(e!==void 0)return e;throw new Error(t||"Value is undefined")}let FORMANT_API_URL="https://api.formant.io";typeof window!="undefined"&&(FORMANT_API_URL=window.FORMANT_API_URL||FORMANT_API_URL);let urlParams$2=new URLSearchParams("");typeof window!="undefined"&&(urlParams$2=new URLSearchParams(window.location.search));const envDev=urlParams$2.get("formant_dev");envDev&&(FORMANT_API_URL="https://api-dev.formant.io");const envStage=urlParams$2.get("formant_stage");envStage&&(FORMANT_API_URL="https://api-stage.formant.io");const envLocal=urlParams$2.get("formant_local");envLocal&&(FORMANT_API_URL="https://api.formant.local");const millisecond=1,second=1e3,minute=60*second,hour=60*minute,day=24*hour,week=7*day,month=30*day,year=365*day,duration={millisecond,second,minute,hour,day,week,month,year};function filterDataByType(e,t){return e.filter(n=>t.includes(n.type))}function filterDataByTime(e,t,n){const r=t.getTime(),o=n.getTime();return e.map(l=>({...l,points:l.points.filter(([s])=>s>=r&&s<o)})).filter(({points:l})=>l.length>0)}function fork(e){}class StoreCache{constructor({capacity:t,timeout:n}={}){Ae(this,"entries",new Map);Ae(this,"metadata",new Map);Ae(this,"capacity");Ae(this,"timeout");this.capacity=t||1e4,this.timeout=n||duration.minute}get(t,n){const r=this.keyToCacheKey(t),o=this.entries.get(r),l=this.metadata.get(r);return(o===void 0||l&&(l==null?void 0:l.expiration.getTime())<Date.now())&&!(l!=null&&l.generating)&&n&&this.generate(t,n()),o===void 0&&l&&l.lastValue!==void 0?l.lastValue:o}set(t,n){const r=this.keyToCacheKey(t);this.metadata.set(r,{generating:!1,expiration:new Date(Date.now()+this.timeout),lastValue:n}),this.entries.set(r,n),this.metadata.size>this.capacity&&this.deleteOldestEntry()}clear(){this.entries.clear(),[...this.metadata.values()].forEach(t=>t.generating=!1)}clearKey(t){this.metadata.delete(t),this.entries.delete(t)}keyToCacheKey(t){return JSON.stringify(t)}deleteOldestEntry(){if(this.metadata.size<1)return;const[t]=[...this.metadata.entries()].reduce(([n,r],[o,l])=>l.expiration.getTime()<r.expiration.getTime()?[o,l]:[n,r]);this.clearKey(t)}generate(t,n){const r=this.keyToCacheKey(t),o=this.metadata.get(r)||{};this.metadata.set(r,{...o,generating:!0,expiration:new Date(Date.now()+this.timeout)}),setTimeout(()=>{n.then(l=>{const s=this.metadata.get(r);!(s!=null&&s.generating)||this.set(t,l)})},0)}}class QueryStore{constructor(){Ae(this,"queryStoreCache",new StoreCache({capacity:1e4,timeout:20*duration.second}));Ae(this,"liveQueryStoreCache",new StoreCache({capacity:1e4,timeout:200*duration.millisecond}))}moduleQuery(t,n,r,o,l,s=!1){const i={...t,names:[...n],types:[...r]},c=this.query(i,o,l,s);return c===void 0||c==="too much data"?c:filterDataByType(c,r)}query(t,n,r,o=!1){const l={...t,start:dateFns.startOfMinute(n).toISOString(),end:o?r.toISOString():dateFns.addMinutes(dateFns.roundToNearestMinutes(r),1).toISOString(),latestOnly:o},s=r>dateFns.addSeconds(new Date,-20);let i;return s?i=this.liveQueryCache(l):i=this.queryCache(l),!i||i==="too much data"||o?i:filterDataByTime(i,n,r)}queryCache(t){return this.queryStoreCache.get(t,async()=>{try{return await Fleet.queryTelemetry(t)}catch(n){throw n}})}liveQueryCache(t){return this.liveQueryStoreCache.get(t,async()=>{try{return await Fleet.queryTelemetry(t)}catch(n){throw n}})}}const queryStore=new QueryStore;class App{static sendAppMessage(t){window.parent.postMessage(t,"*")}static getCurrentModuleContext(){let t=new URLSearchParams("");return typeof window!="undefined"&&(t=new URLSearchParams(window.location.search)),t.get("module")}static async getCurrentModuleConfiguration(){let t=new URLSearchParams("");typeof window!="undefined"&&(t=new URLSearchParams(window.location.search));const n=t.get("configuration");return n===null||n.trim()===""?void 0:(await(await fetch(`${FORMANT_API_URL}/v1/admin/module-configurations/`+n,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).configuration}static isModule(){return this.getCurrentModuleContext()!==null}static goToTime(t){this.sendAppMessage({type:"go_to_time",time:t.getTime()})}static goToDevice(t){this.sendAppMessage({type:"go_to_device",deviceId:t})}static showMessage(t){this.sendAppMessage({type:"show_message",message:t})}static requestModuleData(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"request_module_data",module:t})}static setModuleDateTimeRange(t,n){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"set_module_data_time_range",module:r,before:t,after:n||0})}static refreshAuthToken(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"refresh_auth_token",module:t})}static sendChannelData(t,n){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"send_channel_data",source:r,channel:t,data:n})}static setupModuleMenus(t){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"setup_module_menus",module:n,menus:t})}static addMenuListener(t){window.addEventListener("message",n=>{const r=n.data;r.type==="module_menu_item_clicked"&&t(r.menu)})}static addAccessTokenRefreshListener(t){window.addEventListener("message",n=>{const r=n.data;r.type==="auth_token"&&t(r.token)})}static addModuleDataListener(t){const n=this.getCurrentModuleContext();n&&this.sendAppMessage({type:"request_module_data",module:n}),window.addEventListener("message",r=>{const o=r.data;o.type==="module_data"&&t({streams:o.streams,time:o.time,queryRange:o.queryRange})})}static addStreamListener(t,n,r){const o=l=>{const s=l.data;if(s.type==="module_data"){const{start:i,end:c}=s.queryRange;r(queryStore.moduleQuery({},t,n,new Date(i),new Date(c),!1))}};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)}static addModuleConfigurationListener(t){window.addEventListener("message",n=>{const r=n.data;r.type==="module_configuration"&&t(r)})}static addChannelDataListener(t,n){window.addEventListener("message",r=>{const o=r.data;o.type==="channel_data"&&o.channel===t&&n({source:o.source,data:o.data})})}static requestOverviewDevices(t){this.sendAppMessage({type:"request_devices"}),window.addEventListener("message",n=>{const r=n.data;t(r)})}static async prompt(t,n){return new Promise(r=>{const o=Math.random().toString();this.sendAppMessage({type:"prompt",promptId:o,schema:t,okText:n==null?void 0:n.okText,cancelText:n==null?void 0:n.cancelText});const l=s=>{const i=s.data;i.type==="prompt_response"&&i.promptId===o&&r(i.data),window.removeEventListener("message",l)};window.addEventListener("message",l)})}}const Pe=class{static async login(t,n){try{const r=await fetch(`${FORMANT_API_URL}/v1/admin/auth/login`,{method:"POST",body:JSON.stringify({email:t,password:n}),headers:{"Content-Type":"application/json"}}),o=await r.json();if(r.status!==200)throw new Error(o.message);return await Pe.loginWithToken(o.authentication.accessToken,o.authentication.refreshToken),o.authentication}catch(r){return Pe.waitingForAuth.forEach(o=>o(!1)),Pe.waitingForAuth=[],Promise.reject(r)}}static async loginWithToken(t,n){const r=JSON.parse(atob(t.split(".")[1]));try{let o;if(Pe.isShareToken=r["formant:claims"]&&r["formant:claims"].type=="share",r["formant:claims"]&&(Pe.currentOrganization=r["formant:claims"].organizationId),r["custom:organization_id"]&&(Pe.currentOrganization=r["custom:organization_id"]),Pe.isShareToken||(o=r.sub),r["formant:claims"]&&r["formant:claims"].userId&&(o=r["formant:claims"].userId),o){const l=await fetch(`${FORMANT_API_URL}/v1/admin/users/${o}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}),s=await l.json();if(l.status!==200)throw new Error(s.message);Pe.currentUser=s}Pe.token=t,Pe.waitingForAuth.forEach(l=>l(!0))}catch(o){console.error(o),Pe.waitingForAuth.forEach(l=>l(!1))}Pe.waitingForAuth=[],n&&(Pe.refreshToken=n,setInterval(async()=>{if(Pe.refreshToken){const l=await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:Pe.refreshToken})})).json();Pe.token=l.authentication.accessToken}},1e3*60*60))}static isAuthenticated(){return Pe.token!==void 0}static getCurrentUser(){return Pe.currentUser}static async waitTilAuthenticated(){return Pe.token!==void 0?!0:new Promise(t=>{Pe.waitingForAuth.push(function(n){t(n)})})}static async listenForRefresh(){App.addAccessTokenRefreshListener(t=>{this.loginWithToken(t)}),setInterval(async()=>{App.refreshAuthToken()},1e3*60*60)}};let Authentication=Pe;Ae(Authentication,"token"),Ae(Authentication,"refreshToken"),Ae(Authentication,"currentUser"),Ae(Authentication,"currentOrganization"),Ae(Authentication,"isShareToken",!1),Ae(Authentication,"defaultDeviceId"),Ae(Authentication,"waitingForAuth",[]);function delay(e){return new Promise(t=>setTimeout(t,e))}class DataChannel{constructor(t){Ae(this,"ready",!1);Ae(this,"listeners",[]);Ae(this,"openListeners",[]);Ae(this,"closeListeners",[]);Ae(this,"errorListeners",[]);Ae(this,"binaryListeners",[]);Ae(this,"error");Ae(this,"decoder",new TextDecoder);this.dataChannel=t,this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=()=>{this.ready=!0,this.openListeners.forEach(n=>n())},this.dataChannel.onclose=()=>{this.ready=!1,this.closeListeners.forEach(n=>n())},this.dataChannel.onerror=n=>{console.error(n),this.error="An error occurred in DataChannel",this.errorListeners.forEach(r=>r(n))},this.dataChannel.onmessage=n=>{this.listeners.forEach(r=>{const o=new Uint8Array(n.data),l=this.decoder.decode(o);r(l)}),this.binaryListeners.forEach(r=>{r(new Uint8Array(n.data))})}}addOpenListener(t){this.openListeners.push(t)}removeOpenListener(t){this.openListeners=this.openListeners.filter(n=>n!==t)}addCloseListener(t){this.closeListeners.push(t)}removeCloseListener(t){this.closeListeners=this.closeListeners.filter(n=>n!==t)}addErrorListener(t){this.errorListeners.push(t)}removeErrorListener(t){this.errorListeners=this.errorListeners.filter(n=>n!==t)}async waitTilReady(){return this.ready?!0:new Promise((n,r)=>{let o=window.setInterval(()=>{this.ready&&(window.clearInterval(o),n(!0)),this.error&&r(this.error)},10)})}send(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}sendBinary(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);if(n===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.listeners.splice(n,1)}addBinaryListener(t){this.binaryListeners.push(t)}removeBinaryListener(t){const n=this.binaryListeners.indexOf(t);if(n===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.binaryListeners.splice(n,1)}}class CaptureStream{constructor(t){Ae(this,"token");this.captureSession=t}async ingestJSON(t){if(!this.token){const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions/${this.captureSession.code}/authenticate`,{method:"POST"})).json();this.token=r.token}await fetch(`${FORMANT_API_URL}/v1/ingest`,{method:"POST",body:JSON.stringify({deviceId:this.captureSession.deviceId,name:this.captureSession.streamName,type:"json",points:[[Date.now(),JSON.stringify(t)]]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+this.token}})}}class Manipulator{constructor(t,n){Ae(this,"currentListeners",[]);Ae(this,"onRealtimeMessage",(t,n)=>{n.payload.jointState&&this.currentListeners.forEach(r=>{n.payload.jointState&&r(n.payload.jointState)})});this.device=t,this.config=n}async synchronize(){this.device.addRealtimeListener(this.onRealtimeMessage),this.device.startListeningToRealtimeDataStream(this.config.currentJointStateStream)}async desynchronize(){this.device.removeRealtimeListener(this.onRealtimeMessage),this.device.stopListeningToRealtimeDataStream(this.config.currentJointStateStream)}async addCurrentJointStateListener(t){this.currentListeners.push(t)}}class RequestDataChannel{constructor(t,n,r){Ae(this,"channel");Ae(this,"requestIdToResponseMap",new Map);this.device=t,this.channel_name=n,this.timeout=r}addOpenListener(t){defined(this.channel,"channel not initalized").addOpenListener(t)}removeOpenListener(t){defined(this.channel,"channel not initalized").removeOpenListener(t)}addCloseListener(t){defined(this.channel,"channel not initalized").addCloseListener(t)}removeCloseListener(t){defined(this.channel,"channel not initalized").removeCloseListener(t)}addErrorListener(t){defined(this.channel,"channel not initalized").addErrorListener(t)}removeErrorListener(t){defined(this.channel,"channel not initalized").removeErrorListener(t)}}class BinaryRequestDataChannel extends RequestDataChannel{constructor(){super(...arguments);Ae(this,"RESPONSE_SUCCESS_BYTE",0);Ae(this,"decoder",new TextDecoder)}generateBinaryId(){const n=new Uint8Array(16);for(let r=0;r<n.length;r++)n[r]=Math.floor(Math.random()*256);return n}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addBinaryListener(n=>{const o=n.slice(0,16).toString();if(o.length===0)throw new Error("Invalid response");const l=n.slice(16);if(l.length===0)throw new Error("Invalid response");this.requestIdToResponseMap.has(o)&&this.requestIdToResponseMap.set(o,l)})}async request(n){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:r,requestIdToResponseMap:o,timeout:l}=this;await r.waitTilReady();const s=this.generateBinaryId(),i=s.toString();o.set(i,!0),r.sendBinary(new Uint8Array([...s,...n]));const c=new Date().getTime();for(;new Date().getTime()<c+l;)if(await delay(50),o.has(i)){const u=o.get(i);if(u!==!0){o.delete(i);const m=u[0]===this.RESPONSE_SUCCESS_BYTE,R=u.slice(1);if(m)return R;throw console.error({name:"AdapterError",message:this.decoder.decode(R)}),new Error("Binary request datachannel adapter error")}}throw o.delete(i),console.error({name:"TimeoutError",message:`Request timed out after ${l/1e3} seconds`}),new Error("Binary request data channel request timed out")}}class TextRequestDataChannel extends RequestDataChannel{generateTextId(){return Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2)}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addListener(t=>{const n=JSON.parse(t),{id:r,data:o,error:l}=n;if(!r)throw new Error("Invalid response");if(!o&&!l)throw new Error("Invalid response");this.requestIdToResponseMap.has(r)&&this.requestIdToResponseMap.set(r,n)})}async request(t){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:n,requestIdToResponseMap:r,timeout:o}=this;await n.waitTilReady();const l=this.generateTextId();r.set(l,!0),n.send(JSON.stringify({id:l,data:t}));const s=new Date().getTime();for(;new Date().getTime()<s+o;)if(await delay(50),r.has(l)){const i=r.get(l);if(i!==!0){r.delete(l);const{data:c,error:u}=i;if(c)return c;if(u)throw console.error({name:"AdapterError",message:u}),new Error("Text request datachannel adapter error")}}throw r.delete(l),console.error({name:"TimeoutError",message:`Request timed out after ${o/1e3} seconds`}),new Error("Text request datachannel request timed out")}}const urlParams$1=new URLSearchParams(window.location.search),rtcClientVersion=urlParams$1.get("rtc_client"),SessionType={Teleop:1,Observe:3};class Device{constructor(t,n,r){Ae(this,"rtcClient");Ae(this,"remoteDevicePeerId");Ae(this,"realtimeListeners",[]);Ae(this,"handleMessage",(t,n)=>{this.realtimeListeners.forEach(r=>r(t,n))});this.id=t,this.name=n,this.organizationId=r}async getLatestTelemetry(){return(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}async getConfiguration(){let t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});const n=await t.json();if(!n.state.reportedConfiguration)throw new Error("Device has no configuration, has it ever been turned on?");const r=n.state.reportedConfiguration.version;return t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}/configurations/${r}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),(await t.json()).document}async getFileUrl(t){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).fileUrls}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{let n;if(rtcClientVersion==="1"?n=new dist.exports.RtcClientV1({signalingClient:new dist.exports.RtcSignalingClient(FORMANT_API_URL+"/v1/signaling"),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage}):n=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage,sessionType:t}),n.isReady)for(;!n.isReady();)await delay(100);const o=(await n.getPeers()).find(l=>l.deviceId===this.id);if(!o)throw new Error("Cannot find peer, is the robot offline?");for(this.remoteDevicePeerId=o.id,await n.connect(this.remoteDevicePeerId);n.getConnectionStatus(this.remoteDevicePeerId)!=="connected";)await delay(100);this.rtcClient=n}}async sendRealtimeMessage(t,n={channelLabel:"stream.reliable"}){const r=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer();r.send(defined(o).id,t,n)}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const n=this.realtimeListeners.indexOf(t);if(n===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(n,1)}async getRealtimeAudioStreams(){var r,o,l,s,i,c;const t=await this.getConfiguration(),n=[];for(const u of(o=(r=t.teleop)==null?void 0:r.hardwareStreams)!=null?o:[])u.rtcStreamType==="audio-chunk"&&n.push({name:u.name});for(const u of(s=(l=t.teleop)==null?void 0:l.rosStreams)!=null?s:[])u.topicType=="audio_common_msgs/AudioData"&&n.push({name:u.topicName});for(const u of(c=(i=t.teleop)==null?void 0:i.customStreams)!=null?c:[])u.rtcStreamType==="audio-chunk"&&n.push({name:u.name});return n}async getRealtimeVideoStreams(){var r,o,l,s,i,c;const t=await this.getConfiguration(),n=[];for(const u of(o=(r=t.teleop)==null?void 0:r.hardwareStreams)!=null?o:[])u.rtcStreamType==="h264-video-frame"&&n.push({name:u.name});for(const u of(s=(l=t.teleop)==null?void 0:l.rosStreams)!=null?s:[])u.topicType=="formant/H264VideoFrame"&&n.push({name:u.topicName});for(const u of(c=(i=t.teleop)==null?void 0:i.customStreams)!=null?c:[])u.rtcStreamType==="h264-video-frame"&&n.push({name:u.name});return n}async getRealtimeManipulators(){var r;const t=await this.getConfiguration(),n=[];for(const o of(r=t.teleop.rosStreams)!=null?r:[])o.topicType=="sensor_msgs/JointState"&&n.push(new Manipulator(this,{currentJointStateStream:{name:o.topicName},plannedJointStateStream:o.plannedTopic?{name:o.plannedTopic}:void 0,planValidStream:o.planValidTopic?{name:o.planValidTopic}:void 0,endEffectorStream:o.endEffectorTopic?{name:o.endEffectorTopic}:void 0,endEffectorLinkName:o.endEffectorLinkName,baseReferenceFrame:o.baseReferenceFrame,localFrame:o.localFrame}));return n}async startListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async changeStreamAudioType(t,n){const r=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer();r.controlRemoteStream(defined(o).id,{streamName:t,setAudioFormat:n})}async disableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){const n=(await defined(this.rtcClient,"Realtime connection has not been started").getPeers()).find(r=>r.deviceId===this.id);return defined(n,"Could not find remote peer for device "+this.id)}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async isInRealtimeSession(){let t=await Fleet.getPeers(),n=await Fleet.getRealtimeSessions(),r=t.find(o=>o.deviceId===this.id);return r?n[r.id].length>0:!1}async getAvailableCommands(){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/command-templates/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(r=>({name:r.name,id:r.id,command:r.command,description:r.description,parameterEnabled:r.parameterEnabled,parameterValue:r.parameterValue,parameterMeta:r.parameterMeta,enabled:r.enabled}))}async sendCommand(t,n,r,o){var u;const s=(await this.getAvailableCommands()).find(m=>m.name===t);if(!s)throw new Error(`Could not find command with name "${t}"`);let i;if(n===void 0)if(s.parameterEnabled&&s.parameterValue)i=s.parameterValue;else throw new Error("Command has no default parameter value, you must provide one");else i=n;let c={value:i,scrubberTime:(r||new Date).toISOString(),meta:{...s.parameterMeta,...o}};await fetch(`${FORMANT_API_URL}/v1/admin/commands`,{method:"POST",body:JSON.stringify({commandTemplateId:s.id,organizationId:this.organizationId,deviceId:this.id,command:s.command,parameter:c,userId:(u=Authentication.currentUser)==null?void 0:u.id}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})}async createCustomDataChannel(t,n){if(rtcClientVersion==="1")throw new Error("createCustomDataChannel is not supported in rtcClientVersion 1");const r=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer(),l=await new Promise(s=>{r.createCustomDataChannel(defined(o).id,t,{ordered:!0,...n},!1,(i,c)=>{const u=new DataChannel(c);s(u)})});return await l.waitTilReady(),l}createCustomRequestDataChannel(t,n=3e3){return new TextRequestDataChannel(this,t,n)}createCustomBinaryRequestDataChannel(t,n=3e3){return new BinaryRequestDataChannel(this,t,n)}async createCaptureStream(t){const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions`,{method:"POST",body:JSON.stringify({deviceId:this.id,streamName:t,tags:{}}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return new CaptureStream(r)}async getTelemetry(t,n,r,o){return await Fleet.getTelemetry(this.id,t,n,r,o)}async getTelemetryStreams(){var i,c;const t=await this.getConfiguration(),n=await fetch(`${FORMANT_API_URL}/v1/queries/metadata/stream-names`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=[],o=[];return(c=(i=t.telemetry)==null?void 0:i.streams)==null||c.forEach(u=>{u.disabled!==!0&&r.push(u.name),u.onDemand===!0&&o.push(u.name)}),console.log(o),(await n.json()).items.filter(u=>!r.includes(u)).map(u=>({name:u,onDemand:o.includes(u)}))}async createInterventionRequest(t,n,r,o){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"POST",body:JSON.stringify({message:t,interventionType:n,time:new Date().toISOString(),deviceId:this.id,tags:o,data:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async addInterventionResponse(t,n,r){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-responses`,{method:"POST",body:JSON.stringify({interventionId:t,interventionType:n,data:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async getAnnotationCount(t,n){return await Fleet.getAnnotationCount({...t,deviceIds:[this.id]},n)}async getAnnotationCountByIntervals(t,n,r){return await Fleet.getAnnotationCountByIntervals({...t,deviceIds:[this.id]},n,r)}async eventsCounter(t,n,r,o,l){return await Fleet.eventsCounter(t,n,r,o,{...l,deviceIds:[this.id]})}}class PeerDevice{constructor(t){Ae(this,"rtcClient");Ae(this,"remoteDevicePeerId");Ae(this,"realtimeListeners",[]);Ae(this,"id");Ae(this,"handleMessage",(t,n)=>{this.realtimeListeners.forEach(r=>r(t,n))});this.peerUrl=t}async getLatestTelemetry(){const n=await(await fetch(`${this.peerUrl}/telemetry`)).json();return Object.entries(n).map(([o,l])=>({deviceId:this.id,streamName:o,streamType:"json",currentValue:l,currentValueTime:l.timestamp,tags:{}}))}async getDeviceId(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.id}async getConfiguration(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.document}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const n=new dist.exports.RtcClient({lanOnlyMode:!0,receive:this.handleMessage,sessionType:t});for(await n.connectLan(this.peerUrl);n.getConnectionStatus(this.peerUrl)!=="connected";)await delay(100);this.rtcClient=n}}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const n=this.realtimeListeners.indexOf(t);if(n===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(n,1)}async getRealtimeVideoStreams(){var r,o,l;const t=await this.getConfiguration(),n=[];for(const s of(r=t.teleop.hardwareStreams)!=null?r:[])s.rtcStreamType==="h264-video-frame"&&n.push({name:s.name});for(const s of(o=t.teleop.rosStreams)!=null?o:[])s.topicType=="formant/H264VideoFrame"&&n.push({name:s.topicName});for(const s of(l=t.teleop.customStreams)!=null?l:[])s.rtcStreamType==="h264-video-frame"&&n.push({name:s.name});return n}async getRealtimeManipulators(){var r;const t=await this.getConfiguration(),n=[];for(const o of(r=t.teleop.rosStreams)!=null?r:[])o.topicType=="sensor_msgs/JointState"&&n.push(new Manipulator(this,{currentJointStateStream:{name:o.topicName},plannedJointStateStream:o.plannedTopic?{name:o.plannedTopic}:void 0,planValidStream:o.planValidTopic?{name:o.planValidTopic}:void 0,endEffectorStream:o.endEffectorTopic?{name:o.endEffectorTopic}:void 0,endEffectorLinkName:o.endEffectorLinkName,baseReferenceFrame:o.baseReferenceFrame,localFrame:o.localFrame}));return n}async startListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async disableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){return{id:this.peerUrl,organizationId:"",deviceId:this.id,capabilities:[],capabilitySet:{}}}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async createCustomDataChannel(t,n){const r=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer(),l=await new Promise(s=>{r.createCustomDataChannel(defined(o).id,t,{ordered:!0,...n},!1,(i,c)=>{const u=new DataChannel(c);s(u)})});return await l.waitTilReady(),l}createCustomRequestDataChannel(t,n=3e3){return new TextRequestDataChannel(this,t,n)}createCustomBinaryRequestDataChannel(t,n=3e3){return new BinaryRequestDataChannel(this,t,n)}}const ze=class{static async setDefaultDevice(t){ze.defaultDeviceId=t}static async getCurrentDevice(){if(!Authentication.token)throw new Error("Not authenticated");if(!ze.defaultDeviceId)throw new Error("No known default device");const o=(await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.find(s=>s.id===ze.defaultDeviceId).name,l=new Device(ze.defaultDeviceId,o,defined(Authentication.currentOrganization));return ze.knownContext.push(new WeakRef(l)),l}static async getPeerDevice(t){const n=new PeerDevice(t);return n.id=await n.getDeviceId(),n}static async getDevice(t){if(!Authentication.token)throw new Error("Not authenticated");const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json(),o=r.name,l=new Device(t,o,r.organizationId);return ze.knownContext.push(new WeakRef(l)),l}static async getDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",body:JSON.stringify({enabled:!0,type:"default"}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return n.items,n.items.map(r=>new Device(r.id,r.name,r.organizationId))}static async queryDevices(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(o=>new Device(o.id,o.name,o.organizationId))}static async getOnlineDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=(await(await fetch(`${FORMANT_API_URL}/v1/queries/online-devices`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items;return(await ze.getDevices()).filter(l=>r.includes(l.id))}static async getPeers(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getPeers()}static async getRealtimeSessions(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getSessions()}static async getRealtimeDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=(await(await fetch(`${FORMANT_API_URL}/v1/signaling/peers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(l=>l.deviceId);return(await ze.getDevices()).filter(l=>r.includes(l.id))}static async getLatestTelemetry(t){let n=t;return t&&!Array.isArray(t)&&(t=[t]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getTelemetry(t,n,r,o,l){let s=t;Array.isArray(t)||(s=[t]);let i=n;return Array.isArray(n)||(i=[n]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify({deviceIds:s,end:o.toISOString(),names:i,start:r.toISOString(),tags:l}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getFileUrl(t){const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();if(r.fileUrls.length===0)throw new Error("File not found");return r.fileUrls[0]}static async queryTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async aggregateTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).aggregates}static async queryEvents(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getEvent(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query/id=${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getInterventions(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getCurrentGroup(){if(!Authentication.token)throw new Error("Not authenticated");let t=new URLSearchParams("");typeof window!="undefined"&&(t=new URLSearchParams(window.location.search));const n=t.get("group");if(n===null||n.trim()==="")return;const r=await fetch(`${FORMANT_API_URL}/v1/admin/groups/`+n,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),{tagKey:o,tagValue:l}=await r.json();return await this.queryDevices({tags:{[o]:[l]},enabled:!0,type:"default"})}static async getAnnotationCount(t,n){return(await this.queryEvents({...t,eventTypes:["annotation"]})).filter(s=>!!s.tags&&Object.keys(s.tags).includes(n)).reduce((s,i)=>{const c=i.tags[n];return c in s?(s[c]+=1,s):(s[c]=1,s)},{})}static async getAnnotationCountByIntervals(t,n,r){const{end:o,start:l}=t,i=aggregateByDateFunctions[r].interval({start:new Date(l),end:new Date(o)}),c=i.map((m,R)=>{const E=new Date(m).toISOString(),y=R===i.length-1?new Date(Date.now()).toISOString():new Date(i[R+1]);return this.getAnnotationCount({...t,start:E,end:y},n)}),u=await Promise.all(c);return i.map((m,R)=>({date:new Date(m).toISOString(),annotations:u[R]}))}static async getStreams(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/streams`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.filter(r=>r.enabled)}static async patchStream(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/admin/streams/${t.id}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async getViews(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/views`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async patchView(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/admin/views/${t.id}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async eventsCounter(t,n,r,o,l){const s=aggregateByDateFunctions[n];return await Promise.all(Array(r).fill(0).map(async(i,c)=>{const u=new Date(o),m=s.sub(s.start(u),r-c-1),R=s.sub(s.end(u),r-c-1),E=formatTimeFrameText(m.toLocaleDateString(),R.toLocaleDateString()),y=await ze.queryEvents({...l,eventTypes:t,start:new Date(m).toISOString(),end:new Date(R).toISOString()});return{date:E,events:y}}))}};let Fleet=ze;Ae(Fleet,"defaultDeviceId"),Ae(Fleet,"knownContext",[]);class KeyValue{static async set(t,n){try{const r=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"POST",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId,key:t,value:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),o=await r.json();if(r.status!==200)throw new Error(o.message)}catch(r){throw r}}static async get(t){try{const n=await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await n.json();if(n.status!==200)throw new Error(r.message);return r.value}catch(n){throw n}}static async list(){try{const t=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=await t.json();if(t.status!==200)throw new Error(n.message);return n.items}catch(t){throw t}}static async delete(t){try{if(!(await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).ok)throw new Error("Unable to handle request");return}catch(n){throw n}}}const aggregateFunctions=["interval","start","end","sub","get"];function getVariance(e){return e.count<2?0:e.sumOfSquares/(e.count-1)}function getStandardDeviation(e){return Math.sqrt(getVariance(e))}function getMax(e){return e.max}function getMin(e){return e.min}function getAverage(e){return e.count===0?-1:e.sum/e.count}function getSum(e){return e.sum}function getCount(e){return e.count}const aggregateFunctionMap={min:getMin,max:getMax,"standard deviation":getStandardDeviation,average:getAverage,sum:getSum,count:getCount},aggregateByDateFunctions={day:{interval:dateFns__namespace.eachDayOfInterval,start:dateFns__namespace.startOfDay,end:dateFns__namespace.endOfDay,sub:dateFns__namespace.subDays,get:dateFns__namespace.getDay},week:{interval:dateFns__namespace.eachWeekOfInterval,start:dateFns__namespace.startOfWeek,end:dateFns__namespace.endOfWeek,sub:dateFns__namespace.subWeeks,get:dateFns__namespace.getWeek},month:{interval:dateFns__namespace.eachMonthOfInterval,start:dateFns__namespace.startOfMonth,end:dateFns__namespace.endOfMonth,sub:dateFns__namespace.subMonths,get:dateFns__namespace.getMonth},year:{interval:dateFns__namespace.eachYearOfInterval,start:dateFns__namespace.startOfYear,end:dateFns__namespace.endOfYear,sub:dateFns__namespace.subYears,get:dateFns__namespace.getYear},hour:{interval:dateFns__namespace.eachHourOfInterval,start:dateFns__namespace.startOfHour,end:dateFns__namespace.endOfHour,sub:dateFns__namespace.subHours,get:dateFns__namespace.getHours},minute:{interval:dateFns__namespace.eachMinuteOfInterval,start:dateFns__namespace.startOfMinute,end:dateFns__namespace.endOfMinute,sub:dateFns__namespace.subMinutes,get:dateFns__namespace.getMinutes},quarter:{interval:dateFns__namespace.eachQuarterOfInterval,start:dateFns__namespace.startOfQuarter,end:dateFns__namespace.endOfQuarter,sub:dateFns__namespace.subQuarters,get:dateFns__namespace.getQuarter}},formatTimeFrameText=(e,t)=>e.split("/")[0]+"/"+e.split("/")[1]+"\u2013"+t.split("/")[0]+"/"+t.split("/")[1];function getZeroINumericSet(){return{min:Number.MAX_SAFE_INTEGER,max:0,sum:0,count:0,sumOfSquares:0}}function reduceNumericStreamAggregates(e){return e.aggregates.reduce((t,n)=>{const r=n[1];return combineNumericAggregates(r,t)},getZeroINumericSet())}function reduceNumericSetStreamAggregates(e,t){var n;return(n=e.aggregates.reduce((r,o)=>{const l=o[1];return combineNumericSetAggregates(l,r)},{})[t])==null?void 0:n.value}function combineNumericAggregates(e,t){return{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max),sum:e.sum+t.sum,count:e.count+t.count,sumOfSquares:e.sumOfSquares+t.sumOfSquares}}function combineNumericSetAggregates(e,t){return Object.keys(e).reduce((n,r)=>{var o,l;return{...n,[r]:{value:combineNumericAggregates(e[r].value,(l=(o=t[r])==null?void 0:o.value)!=null?l:getZeroINumericSet()),unit:e[r].unit}}},{})}function stringToArrayBuffer(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}function browser(){const{userAgent:e}=navigator;return e.includes("Firefox/")?"Firefox":e.includes("Edg/")?"Edge":e.includes("Chrome/")?"Chrome":e.includes("Safari/")?"Safari":e.includes("MSIE/")||e.includes("Trident/")?"IE":"Other"}const rtcAudioChunkStreamType="audio-chunk";class AudioPlayer{constructor(t,n){Ae(this,"muted",!1);Ae(this,"hasReceivedData",!1);Ae(this,"audioContext");Ae(this,"chunks",[]);Ae(this,"isPlaying",!1);Ae(this,"startTime",0);Ae(this,"lastChunkOffset",0);Ae(this,"bufferSize",3);Ae(this,"receive",async t=>{var s;const n=(s=t.payload.audioChunk)==null?void 0:s.chunk_data;if(!n)return;this.hasReceivedData||(this.hasReceivedData=!0);const{audioContext:r,muted:o}=this;if(!r||t.header.stream.streamType!==rtcAudioChunkStreamType||o!==!1)return;const l=stringToArrayBuffer(n);try{await r.decodeAudioData(l.buffer,this.scheduleChunk)}catch(i){console.warn("Error decoding audio buffer, changing audioWireFormat on agent",{error:i}),this.changeAudioWireFormat("wav")}});Ae(this,"scheduleChunk",t=>{const{audioContext:n}=this;if(!n)return;(this.chunks.length>this.bufferSize||this.isPlaying===!1)&&(this.chunks.forEach(o=>{o.stop()}),this.isPlaying=!1,this.chunks=[]);const r=this.createChunk(t);!r||!r.buffer||(this.isPlaying===!1&&(this.startTime=n.currentTime,this.lastChunkOffset=0,this.isPlaying=!0),r.start(this.startTime+this.lastChunkOffset,0,t.duration),this.lastChunkOffset+=r.buffer.duration,this.chunks.push(r))});this.device=t,this.stream=n,this.device.startListeningToRealtimeDataStream(n),this.device.addRealtimeListener((o,l)=>{this.receive(l)}),browser()==="Safari"||browser()==="IE"?this.changeAudioWireFormat("wav"):this.changeAudioWireFormat("opus");const r=window.AudioContext||window.webkitAudioContext;this.audioContext=new r}async play(){var t,n;((t=this.audioContext)==null?void 0:t.state)==="suspended"&&await((n=this.audioContext)==null?void 0:n.resume()),this.muted=!1}async pause(){await this.audioContext.suspend(),this.muted=!0}destroy(){this.device.stopListeningToRealtimeDataStream(this.stream)}createChunk(t){const{audioContext:n}=this;if(!n)return;const r=n.createBufferSource();return r.buffer=t,r.connect(n.destination),r.loop=!1,r.onended=o=>{this.chunks.splice(this.chunks.indexOf(r),1),this.chunks.length===0&&(this.isPlaying=!1)},r}changeAudioWireFormat(t){const{stream:n}=this;(async()=>await this.device.changeStreamAudioType(n.name,t))()}}const accessLevels=["viewer","operator","administrator"],viewer="viewer",operator="operator",administrator="administrator",aggregateLevels=["year","month","week","day","hour","minute"],annotationTypes=["tag","sheet","user"],eventTypes=["triggered-event","intervention-request","teleop-session-record","port-forwarding-session-record","command-request","command-response","command-delivery","custom","comment","system","annotation"],healthStatuses=["unknown","operational","offline","error"],interventionTypes=["selection","labeling","teleop"],severities=["info","warning","error","critical"],videoMimeTypes=["video/mp4"];let urlParams=new URLSearchParams("");typeof window!="undefined"&&(urlParams=new URLSearchParams(window.location.search));const urlDevice=urlParams.get("device");urlDevice&&Fleet.setDefaultDevice(urlDevice);const urlAuth=urlParams.get("auth");urlAuth&&Authentication.loginWithToken(urlAuth);const moduleName=urlParams.get("module");moduleName&&Authentication.listenForRefresh(),exports.App=App,exports.AudioPlayer=AudioPlayer,exports.Authentication=Authentication,exports.BinaryRequestDataChannel=BinaryRequestDataChannel,exports.CaptureStream=CaptureStream,exports.DataChannel=DataChannel,exports.Device=Device,exports.Fleet=Fleet,exports.IRtcSendConfiguration=dist.exports.IRtcSendConfiguration,exports.IRtcStreamMessage=dist.exports.IRtcStreamMessage,exports.IRtcStreamPayload=dist.exports.IRtcStreamPayload,exports.KeyValue=KeyValue,exports.Manipulator=Manipulator,exports.PeerDevice=PeerDevice,exports.SessionType=SessionType,exports.TextRequestDataChannel=TextRequestDataChannel,exports.accessLevels=accessLevels,exports.administrator=administrator,exports.aggregateByDateFunctions=aggregateByDateFunctions,exports.aggregateFunctionMap=aggregateFunctionMap,exports.aggregateFunctions=aggregateFunctions,exports.aggregateLevels=aggregateLevels,exports.annotationTypes=annotationTypes,exports.combineNumericAggregates=combineNumericAggregates,exports.combineNumericSetAggregates=combineNumericSetAggregates,exports.eventTypes=eventTypes,exports.formatTimeFrameText=formatTimeFrameText,exports.getAverage=getAverage,exports.getCount=getCount,exports.getMax=getMax,exports.getMin=getMin,exports.getStandardDeviation=getStandardDeviation,exports.getSum=getSum,exports.getVariance=getVariance,exports.getZeroINumericSet=getZeroINumericSet,exports.healthStatuses=healthStatuses,exports.interventionTypes=interventionTypes,exports.operator=operator,exports.reduceNumericSetStreamAggregates=reduceNumericSetStreamAggregates,exports.reduceNumericStreamAggregates=reduceNumericStreamAggregates,exports.severities=severities,exports.videoMimeTypes=videoMimeTypes,exports.viewer=viewer,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
49
+ `),Error.captureStackTrace(this,r)}}e.exports=i=>{if(i.length>2)throw new r(i);function s(o={}){this.options=o}function l(o){return new s(o)}return s.prototype.transform=i,l.Format=s,l}},function(e,t,n){function r(l,o){if(!(l instanceof o))throw new TypeError("Cannot call a class as a function")}function i(l,o){for(var c=0;c<o.length;c++){var u=o[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}var s=n(88);e.exports=function(){function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,l),this.loggers=new Map,this.options=u}var o,c;return o=l,(c=[{key:"add",value:function(u,f){var E=this;if(!this.loggers.has(u)){var w=(f=Object.assign({},f||this.options)).transports||this.options.transports;f.transports=w?w.slice():[];var h=s(f);h.on("close",function(){return E._delete(u)}),this.loggers.set(u,h)}return this.loggers.get(u)}},{key:"get",value:function(u,f){return this.add(u,f)}},{key:"has",value:function(u){return!!this.loggers.has(u)}},{key:"close",value:function(u){var f=this;if(u)return this._removeLogger(u);this.loggers.forEach(function(E,w){return f._removeLogger(w)})}},{key:"_removeLogger",value:function(u){this.loggers.has(u)&&(this.loggers.get(u).close(),this._delete(u))}},{key:"_delete",value:function(u){this.loggers.delete(u)}}])&&i(o.prototype,c),l}()},function(e,t,n){(function(r){const i=n(52),s=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;e.exports=function(l,o,c,u){let f,E,w=!1,h=!1;const g=n(94);function b(F){u(o,F)}function R(F,M){let A=`"${o}" ${M}`;throw F&&(A=`${A}`),E&&(A=`${A}. An example of a valid value would be: ${E}`),new i(A)}const x={convertFromBase64:function(){return b("marking for base64 conversion"),w=!0,x},default:function(F){if(typeof F=="number")f=F.toString();else if(Array.isArray(F)||typeof F=="object"&&F!==null)f=JSON.stringify(F);else{if(typeof F!="string")throw new i("values passed to default() must be of Number, String, Array, or Object type");f=F}return b(`setting default value to "${f}"`),x},required:function(F){return F===void 0?(b("marked as required"),h=!0):(b(`setting required flag to ${F}`),h=F),x},example:function(F){return E=F,x}};return Object.entries({...g,...c}).forEach(([F,M])=>{x[F]=function(A){return function(){let d=l[o];if(b(`will be read from the environment using "${A.name}" accessor`),d===void 0)if(f===void 0&&h)b("was not found in the environment, but is required to be set"),R(void 0,"is a required variable, but it was not set");else{if(f===void 0)return void b("was not found in the environment, but is not required. returning undefined");b(`was not found in the environment, parsing default value "${f}" instead`),d=f}h&&(b("verifying variable value is not an empty string"),d.trim().length===0&&R(void 0,"is a required variable, but its value was empty")),w&&(b("verifying variable is a valid base64 string"),d.match(s)||R(d,"should be a valid base64 string if using convertFromBase64"),b("converting from base64 to utf8 string"),d=r.from(d,"base64").toString());const I=[d].concat(Array.prototype.slice.call(arguments));try{b(`passing value "${d}" to "${A.name}" accessor`);const $=A.apply(A,I);return b(`parsed successfully, returning ${$}`),$}catch($){R(d,$.message)}}}(M)}),x}}).call(this,n(5).Buffer)},function(e,t,n){const r=n(33);e.exports=function(i,s){return s=s||",",i.length?r(i).split(s).filter(Boolean):[]}},function(e,t,n){e.exports=function(r){const i=r.toLowerCase();if(i!=="false"&&i!=="true")throw new Error('should be either "true", "false", "TRUE", or "FALSE"');return i!=="false"}},function(e,t,n){e.exports=function(r){const i=r.toLowerCase();if(["false","0","true","1"].indexOf(i)===-1)throw new Error('should be either "true", "false", "TRUE", "FALSE", 1, or 0');return!(i==="0"||i==="false")}},function(e,t,n){const r=n(95);e.exports=function(i){var s=r(i);if(s>65535)throw new Error("cannot assign a port number greater than 65535");return s}},function(e,t,n){const r=n(33);e.exports=function(i,s){const l=r(i);if(s.indexOf(l)<0)throw new Error(`should be one of [${s.join(", ")}]`);return l}},function(e,t,n){const r=n(54);e.exports=function(i){const s=r(i);if(s>0)throw new Error("should be a negative float");return s}},function(e,t,n){const r=n(54);e.exports=function(i){const s=r(i);if(s<0)throw new Error("should be a positive float");return s}},function(e,t,n){const r=n(53);e.exports=function(i){const s=r(i);if(s>0)throw new Error("should be a negative integer");return s}},function(e,t,n){const r=n(55);e.exports=function(i){var s=r(i);if(!Array.isArray(s))throw new Error("should be a parseable JSON Array");return s}},function(e,t,n){const r=n(55);e.exports=function(i){var s=r(i);if(Array.isArray(s))throw new Error("should be a parseable JSON Object");return s}},function(e,t,n){e.exports=function(r,i){try{RegExp(void 0,i)}catch{throw new Error("invalid regexp flags")}try{return new RegExp(r,i)}catch{throw new Error("should be a valid regexp")}}},function(e,t,n){const r=n(96);e.exports=function(i){return r(i).toString()}},function(e,t,n){const r=n(33),i=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\u0001-\u0008\u000b\u000c\u000e-\u001f\u0021\u0023-\u005b\u005d-\u007f]|\\[\u0001-\u0009\u000b\u000c\u000e-\u007f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\u0001-\u0008\u000b\u000c\u000e-\u001f\u0021-\u005a\u0053-\u007f]|\\[\u0001-\u0009\u000b\u000c\u000e-\u007f])+)\])$/;e.exports=function(s){const l=r(s);if(!i.test(l))throw new Error("should be a valid email address");return l}},function(e,t,n){e.exports=function(r,i){return function(s,l){i&&i.match(/prod|production/)||r(`env-var (${s}): ${l}`)}}},function(e,t,n){(function(r){(function(){var i,s,l,o,c,u;typeof performance<"u"&&performance!==null&&performance.now?e.exports=function(){return performance.now()}:r!=null&&r.hrtime?(e.exports=function(){return(i()-c)/1e6},s=r.hrtime,o=(i=function(){var f;return 1e9*(f=s())[0]+f[1]})(),u=1e9*r.uptime(),c=o-u):Date.now?(e.exports=function(){return Date.now()-l},l=Date.now()):(e.exports=function(){return new Date().getTime()-l},l=new Date().getTime())}).call(this)}).call(this,n(2))},function(e,t,n){(function(r){(function(i){function s(o){if((o=o===void 0?"utf-8":o)!=="utf-8")throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+o+"') is invalid.")}function l(o,c){if(c=c===void 0?{fatal:!1}:c,(o=o===void 0?"utf-8":o)!=="utf-8")throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+o+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(i.TextEncoder&&i.TextDecoder)return!1;Object.defineProperty(s.prototype,"encoding",{value:"utf-8"}),s.prototype.encode=function(o,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");c=0;for(var u=o.length,f=0,E=Math.max(32,u+(u>>1)+7),w=new Uint8Array(E>>3<<3);c<u;){var h=o.charCodeAt(c++);if(55296<=h&&56319>=h){if(c<u){var g=o.charCodeAt(c);(64512&g)==56320&&(++c,h=((1023&h)<<10)+(1023&g)+65536)}if(55296<=h&&56319>=h)continue}if(f+4>w.length&&(E+=8,E=(E*=1+c/o.length*2)>>3<<3,(g=new Uint8Array(E)).set(w),w=g),(4294967168&h)==0)w[f++]=h;else{if(!(4294965248&h))w[f++]=h>>6&31|192;else if(!(4294901760&h))w[f++]=h>>12&15|224,w[f++]=h>>6&63|128;else{if(4292870144&h)continue;w[f++]=h>>18&7|240,w[f++]=h>>12&63|128,w[f++]=h>>6&63|128}w[f++]=63&h|128}}return w.slice(0,f)},Object.defineProperty(l.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(l.prototype,"fatal",{value:!1}),Object.defineProperty(l.prototype,"ignoreBOM",{value:!1}),l.prototype.decode=function(o,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");c=0;for(var u=(o=new Uint8Array(o)).length,f=[];c<u;){var E=o[c++];if(E===0)break;if(!(128&E))f.push(E);else if((224&E)==192){var w=63&o[c++];f.push((31&E)<<6|w)}else if((240&E)==224){w=63&o[c++];var h=63&o[c++];f.push((31&E)<<12|w<<6|h)}else(248&E)==240&&(65535<(E=(7&E)<<18|(w=63&o[c++])<<12|(h=63&o[c++])<<6|63&o[c++])&&(E-=65536,f.push(E>>>10&1023|55296),E=56320|1023&E),f.push(E))}return String.fromCharCode.apply(null,f)},i.TextEncoder=s,i.TextDecoder=l})(typeof window<"u"?window:r!==void 0?r:this)}).call(this,n(6))},function(e,t,n){n.r(t),n.d(t,"AuthClient",function(){return s}),n.d(t,"RtcSignalingClient",function(){return o}),n.d(t,"Credentials",function(){return L}),n.d(t,"IRtcStream",function(){}),n.d(t,"SignalingPromiseClient",function(){return z.SignalingPromiseClient}),n.d(t,"IRtcClientConfigurationV1",function(){}),n.d(t,"IRtcClientConfiguration",function(){}),n.d(t,"IRtcConnectionStatsInfo",function(){}),n.d(t,"IRtcSendConfiguration",function(){}),n.d(t,"IRtcSessionMetricsMessageCounts",function(){}),n.d(t,"IRtcStreamMessage",function(){}),n.d(t,"IRtcStreamPayload",function(){}),n.d(t,"IStreamControl",function(){}),n.d(t,"RtcClient",function(){return vt}),n.d(t,"RtcClientV1",function(){return Mt}),n.d(t,"createRtcStreamMessage",function(){return Te});var r=n(28),i=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class s extends r.a{adminSignup(D,H){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/admin-signup",{token:H,method:"POST",body:JSON.stringify(D)})})}login(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/login",{method:"POST",body:JSON.stringify(D),allowUnsafeRetries:!0})})}loginWithGoogleToken(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/login-google",{method:"POST",body:JSON.stringify(D),allowUnsafeRetries:!0})})}refresh(D,H){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:D,tokenExpirationSeconds:H}),allowUnsafeRetries:!0})})}respondToNewPasswordRequiredChallenge(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/respond-to-new-password-required-challenge",{method:"POST",body:JSON.stringify(D)})})}forgotPassword(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/forgot-password",{method:"POST",body:JSON.stringify({email:D})})})}confirmForgotPassword(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/confirm-forgot-password",{method:"POST",body:JSON.stringify(D)})})}resendInvitation(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/resend-invitation",{method:"POST",body:JSON.stringify({email:D})})})}changePassword({token:D,refreshToken:H,currentPassword:X,newPassword:ie}){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/change-password",{token:D,method:"POST",body:JSON.stringify({refreshToken:H,currentPassword:X,newPassword:ie})})})}getDeviceCredentials(D){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/device-credentials",{token:D,method:"POST",allowUnsafeRetries:!0})})}impersonate(D,H){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/impersonate",{token:D,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({userId:H})})})}createServiceAccount(D,H,X,ie){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/service-account",{token:D,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({name:H,roleId:X,tags:ie})})})}getFeatures(D){return i(this,void 0,void 0,function*(){return(yield this.fetch("auth/features",{token:D})).features})}}var l=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class o extends r.a{createPeer(D,H){return l(this,void 0,void 0,function*(){return yield this.fetch("peers",{token:D,method:"POST",body:JSON.stringify(H)})})}getPeers(D){return l(this,void 0,void 0,function*(){return(yield this.fetch("peers",{token:D})).items})}refreshPeer(D,H){return l(this,void 0,void 0,function*(){yield this.fetch(`peers/${H}/refresh`,{token:D,method:"POST",allowUnsafeRetries:!0})})}createSession(D,H){return l(this,void 0,void 0,function*(){return yield this.fetch("sessions",{token:D,method:"POST",body:JSON.stringify(H)})})}refreshSession(D,H){return l(this,void 0,void 0,function*(){yield this.fetch(`sessions/${H}/refresh`,{token:D,method:"POST",allowUnsafeRetries:!0})})}deleteSession(D,H){return l(this,void 0,void 0,function*(){yield this.fetch(`sessions/${H}`,{token:D,method:"DELETE",allowUnsafeRetries:!0})})}getSessions(D){return l(this,void 0,void 0,function*(){return(yield this.fetch("sessions",{token:D})).items})}getIceServers(D){return l(this,void 0,void 0,function*(){return(yield this.fetch("ice-servers",{token:D})).items})}addSignals(D,H,X){return l(this,void 0,void 0,function*(){yield this.fetch(`sessions/${H}/add-signals`,{token:D,method:"POST",body:JSON.stringify(X)})})}takeSignals(D,H){return l(this,void 0,void 0,function*(){return(yield this.fetch(`sessions/${H}/take-signals`,{token:D,method:"POST"})).items})}}var c=n(1),u=n(8),f=n(14),E=n.n(f),w=n(104),h=n.n(w),g=n(0),b=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class R{constructor(D){this.name="LogReporter",this.type="simple",this.message=D}send(D){return b(this,void 0,void 0,function*(){var H,X;g.a.info(this.message,(H=D.reduce((ie,oe)=>Object.assign(Object.assign({},ie),{[oe.name]:oe.stat}),{}),X=ie=>{const{sum:oe,count:de}=ie,ye=oe/de;return Object.assign(Object.assign({},ie),{average:ye})},Object.keys(H).reduce((ie,oe)=>Object.assign(Object.assign({},ie),{[oe]:X(H[oe])}),{})))})}}var x=n(4),F=n(39);function M(be){return!!be.match(/^[a-zA-Z0-9-_.,:?'"()@\/\\#$+ ]{1,255}$/)}var A=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};function d({func:be,delay:D,immediate:H}){let X=!1,ie=setTimeout(function de(){return A(this,void 0,void 0,function*(){if(X)return;const ye=new Date().getTime();try{oe=be(),yield oe}finally{if(!X){const me=new Date().getTime();ie=setTimeout(de,Math.max(D-(me-ye),0))}}})},H?0:D),oe=Promise.resolve();return{stop(){return A(this,void 0,void 0,function*(){X=!0,clearTimeout(ie),yield oe})}}}var I=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};const $=n(226),q=!!x.c,m=new class{constructor(be){this.samplePeriodSeconds=60,this.buffer={},this.reporters=[],this.flushInterval=d({func:()=>this.flushStats(),delay:this.samplePeriodSeconds*c.a.second}),this.tags=this.filterTags((be==null?void 0:be.tags)||{app:x.a,version:x.j,namespace:x.i,instanceId:F.a})}shutdown(){return I(this,void 0,void 0,function*(){yield this.flushInterval.stop(),yield this.flushStats(),yield Object(u.a)(2*c.a.second)})}aggregate(be,D,H){this.addToBuffer(this.buffer,this.encodeKey({metric:be,tags:this.filterTags(H||{})}),typeof D=="number"?{min:D,max:D,sum:D,count:1}:D)}increment(be,D){this.aggregate(be,1,D)}timer(be,D,H){return I(this,void 0,void 0,function*(){const X=$(),ie=yield D(),oe=$();return this.aggregate(be,oe-X,H),ie})}registerStatsReporter(be){this.reporters.push(be)}setTag(be,D){const H=this.filterTags({[be]:D});this.tags=Object.assign(Object.assign({},this.tags),H)}addToBuffer(be,D,H){if(be[D]){const{min:X,max:ie,sum:oe,count:de}=be[D];be[D]={min:Math.min(X,H.min),max:Math.max(ie,H.max),sum:oe+H.sum,count:de+H.count}}else be[D]=H}write(be){return I(this,void 0,void 0,function*(){yield Promise.all(this.reporters.map(D=>I(this,void 0,void 0,function*(){let H;const X={};switch(D.type){case"simple":for(const[oe,de]of Object.entries(be)){const{metric:ye}=this.decodeKey(oe);this.addToBuffer(X,this.encodeKey({metric:ye}),de)}H=X;break;case"tagged":H=be;break;default:(function(oe){throw new Error(`Unreachable type encountered (${oe})`)})(D.type)}const ie=Object.entries(H);if(ie.length>0)return D.send(ie.map(([oe,de])=>{const{metric:ye,tags:me}=this.decodeKey(oe);return{name:ye,tags:Object.assign(Object.assign({},me),this.tags),stat:de}}),this.samplePeriodSeconds).catch(oe=>{g.a.debug(`Failed to write stats to ${D.name}`,{error:oe})})})))})}flushStats(){return I(this,void 0,void 0,function*(){yield this.write(this.buffer),this.buffer={}})}encodeKey(be){return E()(Object.assign(Object.assign({},be),Object.keys(be.tags||{}).length>0?{tags:be.tags}:{}))}decodeKey(be){return JSON.parse(be)}filterTags(be){return Object.entries(be||{}).reduce((D,[H,X])=>(M(H)&&M(X)&&(D[H]=X),D),{})}};q||["local","on-prem"].includes(x.i)||m.registerStatsReporter(new R("stats"));var y=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class C extends class{constructor(D){this.options=D,this.cache=new h.a(Object.assign(Object.assign(Object.assign({},D.dispose||D.disposeAfter?{ttlAutopurge:!0}:{}),D),{dispose:(...H)=>{var X;H[2]==="evict"&&m.increment("lru-eviction",{name:D.name}),(X=D.dispose)===null||X===void 0||X.call(D,...H)},disposeAfter:(...H)=>{var X;this.updateStats(),(X=D.disposeAfter)===null||X===void 0||X.call(D,...H)}})),this.stringify=D.fastStringify?JSON.stringify:E.a}set(D,H,X){const ie=this.stringify(D);if(!this.cache.set(ie,H,{ttl:X})){const oe=this.cache.sizeCalculation?this.cache.sizeCalculation(H,ie):"unknown";throw Error(`Value too large (${oe} > ${this.cache.max})`)}this.updateStats()}get(D){const{name:H}=this.options,X=this.stringify(D),ie=this.cache.getRemainingTTL(X);return ie<=0?m.increment("cache-miss",{name:H}):ie!==1/0&&m.aggregate("cache-item-ttl",ie,{name:H}),this.cache.get(X)}delete(D){this.cache.delete(this.stringify(D))}peek(D){return this.cache.peek(this.stringify(D))}size(){return this.cache.size}clear(){this.cache.clear()}forEach(D){this.cache.forEach(D)}purgeStale(){return this.cache.purgeStale()}updateStats(){const{name:D}=this.options;m.aggregate("cache-item-count",this.cache.size,{name:D}),this.cache.calculatedSize!==void 0&&m.aggregate("cache-length",this.cache.calculatedSize,{name:D})}}{constructor(D){if(super(D),this.expireRejectedPromiseValues=D.expireRejectedPromiseValues===void 0||D.expireRejectedPromiseValues,this.rejectedPromiseValueTtl=D.rejectedPromiseValueTtl!==void 0?D.rejectedPromiseValueTtl:c.a.second,this.rejectedPromiseValueTtl<0)throw new Error("rejectedPromiseValueTtl must not be negative")}set(D,H,X){super.set(D,H,X),this.expireRejectedPromiseValues&&H.catch(()=>y(this,void 0,void 0,function*(){yield Object(u.a)(this.rejectedPromiseValueTtl),this.peek(D)===H&&this.delete(D)}))}}var _=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class L{constructor(D,H,X){this.authClient=D,this.email=H,this.password=X,this.tokenTtlMs=1*c.a.hour,this.tokenCache=new C({name:"Credentials-tokenCache",max:100,ttl:this.tokenTtlMs-5*c.a.minute,fastStringify:!0})}getToken(){return _(this,void 0,void 0,function*(){let D=this.tokenCache.get(this.email);return D||(D=(()=>_(this,void 0,void 0,function*(){const{authentication:H}=yield this.authClient.login({email:this.email,password:this.password,tokenExpirationSeconds:this.tokenTtlMs/c.a.second});if(!H)throw new Error("User account not verified.");return H.accessToken}))(),this.tokenCache.set(this.email,D)),D})}}var z=n(97),B=n(40),N=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class P extends B.a{constructor(D){super(D)}postLanRtcOffer(D){return N(this,void 0,void 0,function*(){return yield this.fetch("v1/lan-rtc-offer",{method:"POST",body:JSON.stringify(D)})})}}var W=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};function O(be){return W(this,void 0,void 0,function*(){return(yield Promise.all(be.map(D=>D.catch(H=>H)))).filter(D=>D instanceof Error)})}function p(be){if(be!==void 0)return be;throw new Error("Value is undefined")}function U(be,D){const H=be.reduce((X,ie)=>[...X,...ie.urls],[]).filter(X=>V(X,D)).sort(X=>Q(X,"udp")?-1:0).shift();if(H)return Object.assign(Object.assign({},p(be.find(X=>X.urls.includes(H)))),{urls:[H]})}function V(be,D){switch(D){case"stun":return/^stuns?:/.test(be);case"turn":return/^turns?:/.test(be)}}function Q(be,D){return be.endsWith(`transport=${D}`)}var ee=n(9),ne=n(24),Y=n(229),G=n(29);const S={ordered:!1,maxPacketLifeTime:300*c.a.millisecond},T={ordered:!0},k={ordered:!0},J={ordered:!1,maxRetransmits:0},K={ordered:!1,maxRetransmits:0},re=be=>"received"in be&&be.received!==void 0,se=be=>!("received"in be)||be.received===void 0,fe=2*c.a.second;function ve(be,D={}){const H=Array.from(be.values()),X=H.filter(re),ie=X.length>0,oe=Math.max(...X.map(ce=>ce.received));let de;if(ie){const ce=H.length,ue=X.length,Ae=X.map(Ne=>Ne.received-Ne.sent),{standardDeviation:Me,mean:Ue,jitter:Ge}=function(Ne){const Fe=Ne.length;if(Fe===0)return{mean:NaN,standardDeviation:-1,jitter:NaN};const Ye=Ne.reduce((Je,ot)=>Je+ot,0)/Fe,Ke=Math.sqrt(Ne.map(Je=>Math.pow(Je-Ye,2)).reduce((Je,ot)=>Je+ot)/Fe);let Xe=0;for(let Je=1;Je<Fe;++Je)Xe+=Math.abs(Ne[Je]-Ne[Je-1]);return{mean:Ye,standardDeviation:Ke,jitter:Xe/(Fe-1)}}(Ae),Qe=H.filter(Ne=>Ne.sent<oe-fe),qe=Qe.filter(se),$e=qe.length===0?0:qe.length/Qe.length;de={pingsSent:ce,pongsReceived:ue,average:Ue,standardDeviation:Me,jitter:Ge,max:Math.max(...Ae),min:Math.min(...Ae),loss:$e}}else de=null;const{temporalNow:ye=Date.now()}=D,me=(ie?oe:ye)-4*fe;return Array.from(be.entries()).forEach(ce=>{const[ue,Ae]=ce;Ae.sent<me&&be.delete(ue)}),de}function Ie({entityId:be,streamName:D,streamType:H}){return`${be}.${D}.${H}`}var Se=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class Ce{constructor(D,H){this.sessionId=D,this.connection=H,this.counts={localSent:new Map,localReceived:new Map,remoteSent:new Map,remoteReceived:new Map},this.sessionId=D,this.connection=H}updateRemoteMessagesCounts(D){if(D.payload.streamsInfo){this.counts.remoteSent=new Map,this.counts.remoteReceived=new Map;for(const H of D.payload.streamsInfo.items)this.counts.remoteSent.set(H.streamId,H.sentCount),this.counts.remoteReceived.set(H.streamId,H.receivedCount)}}getLocalStreamsInfo(D){const{localSent:H,localReceived:X}=this.counts;return{items:[...new Set([...H.keys(),...X.keys()])].map(ie=>{var oe,de;return{streamId:ie,sentCount:(oe=H.get(ie))!==null&&oe!==void 0?oe:0,receivedCount:(de=X.get(ie))!==null&&de!==void 0?de:0}}),timestamp:D}}incrementLocalSent(D){const{localSent:H}=this.counts,X=Ie(D.header.stream);H.set(X,(H.get(X)||0)+1)}incrementLocalReceived(D){const{localReceived:H}=this.counts,X=Ie(D.header.stream),ie=H.get(X)||0;if(ie===0){const{streamName:oe,streamType:de}=D.header.stream;g.a.debug("RTC client received first message for stream",{streamName:oe,streamType:de})}H.set(X,ie+1)}uploadMetrics(){return Se(this,void 0,void 0,function*(){const{sessionId:D}=this,H=yield this.connection.peerConnection.getStats(),X={};H.forEach(ce=>X[ce.id]=ce),g.a.debug("rtc-stats",Object.assign(Object.assign({},X),{sessionId:D}));const{localSent:ie,localReceived:oe,remoteSent:de,remoteReceived:ye}=this.counts,me=[...new Set([...ie.keys(),...oe.keys()])].reduce((ce,ue)=>{const Ae=ie.get(ue),Me=oe.get(ue),Ue=de.get(ue),Ge=ye.get(ue);return Object.assign(Object.assign({},ce),{[`local-${ue}-sent`]:Ae,[`local-${ue}-received`]:Me,[`remote-${ue}-sent`]:Ue,[`remote-${ue}-received`]:Ge})},{sessionId:D});g.a.debug("rtc-message-report",Object.assign({deviceId:this.connection.getRemoteDeviceId()},me))})}}function Te(be,D,H){return{header:{stream:be,created:Date.now(),frameId:H||""},payload:D}}function Re(be){return new Set(["disconnected","failed","closed"]).has(be.iceConnectionState)}function Be(be){switch(be.header.stream.streamType){case"twist":{const{twist:D}=be.payload;if(!D)throw Error("twist not in payload of RTC message with type twist");return{header:be.header,payload:{twist:{linear:Object.assign({x:0,y:0,z:0},D.linear),angular:Object.assign({x:0,y:0,z:0},D.angular)}}}}case"pose":{const{pose:D}=be.payload;if(!D)throw Error("pose not in payload of RTC message with type pose");return{header:be.header,payload:{pose:{translation:Object.assign({x:0,y:0,z:0},D.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},D.rotation)}}}}case"pose-with-covariance":{const{poseWithCovariance:D}=be.payload;if(!D)throw Error("poseWithCovariance not in payload of RTC message with type pose-with-covariance");const H=new Array(36).fill(0);return D.covariance.forEach((X,ie)=>{if(ie>=36)throw Error("covariance contains more than 36 elements");H[ie]=X}),{header:be.header,payload:{poseWithCovariance:{pose:{translation:Object.assign({x:0,y:0,z:0},D.pose.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},D.pose.rotation)},covariance:H}}}}case"point":{const{point:D}=be.payload;if(!D)throw Error("point not in payload of RTC message with type point");return{header:be.header,payload:{point:Object.assign({x:0,y:0,z:0},D)}}}default:return be}}var Ze=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class et{constructor(D,H,X){this.peerConnection=D,this.config=H,this.dataChannelNotifier=X,this.connectTimeoutMs=20*c.a.second,this.iceGatheringTimeoutMs=15*c.a.second,this.pingUpdateTimeoutMs=1*c.a.second,this.pingV2UpdateTimeoutMs=250*c.a.millisecond,this.pingV2MetricsGatherTimeoutMs=1*c.a.second,this.streamsInfoUpdateTimeoutMs=2*c.a.second,this.reassemblyTimeoutMs=500*c.a.millisecond,this.reassemblyTableCleanupMs=1*c.a.second,this.heartbeatTimeoutMs=20*c.a.millisecond,this.streamLatestTimestamp=new Map,this.reassemblyTable=new Map,this.reassemblyTableLastTimestamp=new Map,this.closeCalled=!1,this.gotOffer=!1,this.hasIceCandidate=!1,this.pingV2Map=new Map,this.sendPingV2=()=>{const{latestTryOnceStreamChannel:oe}=this;if(!oe)return;const de=new Date().getTime(),ye=Object(Y.a)();this.sendSystemMessage(oe,{type:"ping-v2",payload:{timestamp:de,id:ye}}),this.pingV2Map.set(ye,{sent:de})},this.gatherPingV2Metrics=()=>{const oe=ve(this.pingV2Map);oe&&(this.pingInfo=oe,m.aggregate("rtc-ping-average",oe.average),m.aggregate("rtc-ping-loss",oe.loss),m.aggregate("rtc-jitter",oe.jitter))};const{isOffer:ie}=H.baseConfig;ie?this.initializeChannels(D):D.ondatachannel=oe=>{switch(oe.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=oe.channel;break;case"stream.reliable":this.reliableStreamChannel=oe.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=oe.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=oe.channel;break;case"heartbeat":return void(this.heartbeatChannel=oe.channel);default:return void this.dataChannelNotifier(oe.channel)}this.setupChannel(oe.channel)},this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:oe}=this;oe&&this.sendSystemMessage(oe,{type:"ping"})},this.pingUpdateTimeoutMs),this.pingV2UpdateTimeout=setInterval(this.sendPingV2,this.pingV2UpdateTimeoutMs),this.pingV2MetricsGatherTimeout=setInterval(this.gatherPingV2Metrics,this.pingV2MetricsGatherTimeoutMs),this.streamsInfoUpdateTimeout=setInterval(()=>{const{latestTtlStreamChannel:oe}=this;oe&&this.sendSystemMessage(oe,{type:"streams-info"})},this.streamsInfoUpdateTimeoutMs),this.reassemblyTableCleanupTimeout=setInterval(()=>{const oe=new Date().getTime();this.reassemblyTableLastTimestamp.forEach((de,ye,me)=>{oe>ye+this.reassemblyTimeoutMs&&this.reassemblyTable.delete(de)})},this.reassemblyTableCleanupMs),this.heartbeatTimeout=setInterval(()=>{const{heartbeatChannel:oe}=this;oe&&oe.readyState==="open"&&oe.send(new Uint8Array([1]))},this.heartbeatTimeoutMs)}handleSignal(D){return Ze(this,void 0,void 0,function*(){const{peerConnection:H}=this,{track:X}=this.config.baseConfig,ie=(()=>{try{return JSON.parse(D.getPayload())}catch{return}})();if(!ie)return void g.a.error("Received unparseable signal.");g.a.debug("Handling signal",{description:ie});const{sdp:oe,type:de}=ie;if(!oe||!de)return void g.a.warn("Received non-SDP signal");const{signalingState:ye,connectionState:me}=H;if(ye!=="stable"||me!=="connected")if(H.remoteDescription)g.a.warn(`Received SDP after remote description was set: ${oe}`);else{if(de==="offer"){if(ye!=="stable")return void g.a.warn("Received offer SDP when signaling is ongoing.");yield H.setRemoteDescription(ie);const ce=yield H.createAnswer();yield H.setLocalDescription(ce);const ue=D.clone();return X==null||X("Answer Received",ue),ue.setPayload(JSON.stringify(ce)),ue.setReceiverId(D.getSenderId()),ue.setSenderId(D.getReceiverId()),ue}if(de==="answer"){if(ye==="stable")return void g.a.warn("Received answer SDP when signaling hasn't started.");yield H.setRemoteDescription(ie)}}else g.a.warn(`Received SDP when already connected: ${oe}`)})}send(D,H){const X=this.getChannelFromLabel(H.channelLabel);X?this.sendOnChannel(X,D):g.a.warn("Send called with unexpected channel label",{channelLabel:H.channelLabel})}controlRemoteStream(D){this.sendSystemMessage(p(this.reliableStreamChannel),{type:"stream-control",streamControl:D})}isActive(){return new Set(["new","checking","connected","completed"]).has(this.peerConnection.iceConnectionState)||this.isReady()}isReady(){const{reliableStreamChannel:D,latestTtlStreamChannel:H,latestTryOnceStreamChannel:X,latestReliableStreamChannel:ie}=this;return(D==null?void 0:D.readyState)==="open"&&(H==null?void 0:H.readyState)==="open"&&(X==null?void 0:X.readyState)==="open"&&(ie==null?void 0:ie.readyState)==="open"}close(){return Ze(this,void 0,void 0,function*(){if(this.closeCalled)return;this.closeCalled=!0,this.sessionMetrics&&(yield this.sessionMetrics.uploadMetrics()),nt(this.pingUpdateTimeout),nt(this.pingV2UpdateTimeout),nt(this.pingV2MetricsGatherTimeout),nt(this.reassemblyTableCleanupTimeout),nt(this.streamsInfoUpdateTimeout),nt(this.heartbeatTimeout);const{peerConnection:D,reliableStreamChannel:H,latestTtlStreamChannel:X,latestTryOnceStreamChannel:ie,latestReliableStreamChannel:oe}=this;D.close(),H==null||H.close(),X==null||X.close(),ie==null||ie.close(),oe==null||oe.close()})}getPing(){return this.pingTimeMs}getPingInfo(){return this.pingInfo}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionCreatedTimestamp(){var D;return(D=this.config.remoteConfig)===null||D===void 0?void 0:D.sessionCreatedTimestamp}setSessionCreatedTimestamp(D){this.config.remoteConfig&&(this.config.remoteConfig.sessionCreatedTimestamp=D)}getSessionId(){var D;return(D=this.config.remoteConfig)===null||D===void 0?void 0:D.sessionId}setSessionId(D){this.config.remoteConfig&&(this.config.remoteConfig.sessionId=D,this.sessionMetrics=new Ce(D,this))}getRemotePeerId(){return this.config.baseConfig.remotePeerId}getRemoteDeviceId(){var D;return(D=this.config.baseConfig)===null||D===void 0?void 0:D.remoteDeviceId}setRemoteDeviceId(D){this.config.baseConfig.remoteDeviceId=D}getSessionMetricsMessageCounts(){var D;return(D=this.sessionMetrics)===null||D===void 0?void 0:D.counts}getConnectionStatsInfo(){return Ze(this,void 0,void 0,function*(){const{peerConnection:D}=this;if(!D)return;const H=yield D.getStats(null),X=[];H.forEach(me=>{X.push(me)});const ie=X.find(me=>me.type==="transport");if(!ie)return;const oe=X.find(me=>(me.type==="candidate-pair"||me.type==="candidatepair")&&me.id===ie.selectedCandidatePairId);if(!oe)return;const de=X.find(me=>me.id===oe.localCandidateId),ye=X.find(me=>me.id===oe.remoteCandidateId);return de&&ye&&(de.address=de.address||de.ip,ye.address=ye.address||ye.ip,de.address!==void 0&&ye.address!==void 0)?{transport:ie,localCandidate:de,remoteCandidate:ye}:void 0})}initializeChannels(D){this.heartbeatChannel=D.createDataChannel("heartbeat",K),this.heartbeatChannel.binaryType="arraybuffer",this.latestTtlStreamChannel=D.createDataChannel("stream.latest-ttl",S),this.latestTtlStreamChannel.binaryType="arraybuffer",this.reliableStreamChannel=D.createDataChannel("stream.reliable",T),this.reliableStreamChannel.binaryType="arraybuffer",this.latestReliableStreamChannel=D.createDataChannel("stream.latest-reliable",k),this.latestReliableStreamChannel.binaryType="arraybuffer",this.latestTryOnceStreamChannel=D.createDataChannel("stream.latest-try-once",J),this.latestTryOnceStreamChannel.binaryType="arraybuffer",this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}getOffer(){var D,H,X;return Ze(this,void 0,void 0,function*(){const{gotOffer:ie}=this,{peerConnection:oe,config:de}=this;if(this.config.baseConfig.isLan)throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');const ye=(D=this.config.remoteConfig)===null||D===void 0?void 0:D.sessionId;if(ie)return void g.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,Re(this.peerConnection))return void g.a.debug("Failed to generate offer because the peer connection was inactive.");const me=de.baseConfig.track;oe.onicecandidate=()=>{this.hasIceCandidate=!0},oe.oniceconnectionstatechange=()=>Ze(this,void 0,void 0,function*(){const Ue=oe.iceConnectionState;if(Ue==="connected"||Ue==="completed"){const Ge=yield this.getConnectionStatsInfo(),Qe=Ge?function(qe){const $e=qe.localCandidate.candidateType,Ne=qe.remoteCandidate.candidateType;return $e==="host"&&Ne==="host"?"local":$e==="relay"||Ne==="relay"?"TURN":"STUN"}(Ge):void 0;g.a.info(`ICE connection state changed to ${Ue}`,{sessionId:ye,connectionStatsInfo:Ge,iceMode:Qe}),me==null||me("ICE connection state change",{iceConnectionState:Ue,sessionId:ye,connectionStatsInfo:Ge,iceMode:Qe})}}),yield oe.setLocalDescription(yield oe.createOffer());const ce=new Date().getTime();for(;;){const Ue=new Date().getTime()-ce;if(Ue>this.connectTimeoutMs)return void g.a.debug("Failed to generate offer because ICE gathering timed out.");if(Ue>this.iceGatheringTimeoutMs&&this.hasIceCandidate){g.a.debug("ICE gathering partially completed; proceeding",{iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Ue}),me==null||me("ICE gathering partially completed",{sessionId:ye,iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Ue});break}if(oe.iceGatheringState==="complete"){g.a.debug("ICE gathering complete",{iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Ue}),me==null||me("ICE gathering completed",{sessionId:ye,iceTransportPolicy:oe.getConfiguration().iceTransportPolicy,waitTime:Ue});break}yield Object(u.a)(.1*c.a.second)}const ue=(H=this.peerConnection.getConfiguration().iceServers)!==null&&H!==void 0?H:[];for(const Ue of ue)Ue.credentialType=void 0;const Ae=JSON.stringify(ue),Me=new ee.Signal;return Me.setPayload(JSON.stringify(oe.localDescription)),Me.setSenderId(this.config.baseConfig.localPeerId),Me.setReceiverId(this.config.baseConfig.remotePeerId),Me.setIceServers(Ae),Me.setIceTransportPolicy((X=this.peerConnection.getConfiguration().iceTransportPolicy)!==null&&X!==void 0?X:"all"),this.config.baseConfig.sessionType!==void 0?Me.setSessionType(this.config.baseConfig.sessionType):Me.setSessionType(ee.SessionType.TELEOP),g.a.debug("Sending offer signal with description",{description:Me.getPayload()}),Me})}getLanOffer(){return Ze(this,void 0,void 0,function*(){const{peerConnection:D,gotOffer:H}=this;if(!this.config.baseConfig.isLan)throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');if(H)return void g.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,Re(this.peerConnection))return void g.a.debug("Failed to generate offer because the peer connection was inactive.");yield D.setLocalDescription(yield D.createOffer());const X=new Date().getTime();for(;;){if(new Date().getTime()-X>this.iceGatheringTimeoutMs)return void g.a.debug("Failed to generate offer because ICE gathering timed out.");if(D.iceGatheringState==="complete")break;yield Object(u.a)(.1*c.a.second)}const ie=D.localDescription;if(ie)return g.a.debug("Sending LAN offer signal with description",{description:ie}),ie;g.a.error("Failed to generate LAN offer description")})}handleLanAnswer(D){return Ze(this,void 0,void 0,function*(){const{peerConnection:H}=this;if(!this.config.baseConfig.isLan)throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');yield H.setRemoteDescription(D)})}getChannelFromLabel(D){switch(D){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(D,H){let X;try{X=Object(G.encode)(JSON.stringify(H))}catch(ie){return void g.a.warn("Failed to encode RTC message",{error:ie})}try{D.send(X),this.sessionMetrics&&this.sessionMetrics.incrementLocalSent(H)}catch(ie){g.a.warn("Failed to send message to channel",{error:ie,channel:D.label})}}channelNotRecognized(D){return D!==this.latestTtlStreamChannel&&D!==this.latestReliableStreamChannel&&D!==this.latestTryOnceStreamChannel&&D!==this.reliableStreamChannel}setupChannel(D){D.onmessage=H=>{if(this.channelNotRecognized(D))return void g.a.warn("Received message on unrecognized data channel.");let X;try{X=JSON.parse(Object(G.decode)(H.data))}catch(ie){return void g.a.warn("Received unparseable message on RTC stream data channel",{error:ie,channel:D.label})}X.communicationType==="message-chunk"?this.receiveChannelMessageChunk(D,X):this.receiveChannelMessage(D,X)},D.onerror=H=>{g.a.warn(`Channel error: ${H.error}`,{error:H.error,sessionId:this.getSessionId(),channelLabel:D.label})},D.onopen=()=>{g.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:D.label})},D.onclose=()=>{const H={bufferedAmount:D.bufferedAmount,sessionId:this.getSessionId(),channelLabel:D.label};this.closeCalled===!1?g.a.debug("Unexpected channel closed",H):g.a.debug("Channel closed",H)}}receiveChannelMessage(D,H){const{config:X}=this,{remotePeerId:ie}=this.config.baseConfig;this.lastMessageTimestamp=new Date().getTime(),H=Be(H),this.sessionMetrics&&this.sessionMetrics.incrementLocalReceived(H),this.handleSystemMessage(D,H)||(D===this.latestTryOnceStreamChannel||D===this.latestTtlStreamChannel||D===this.latestReliableStreamChannel)&&!this.isLatestMessage(H)||X.baseConfig.receive(ie,H)}receiveChannelMessageChunk(D,H){const X=this.reassemblyTable.get(H.id)||[];if(X.push(H),X.length===H.total){const ie=function(oe){const de=oe.sort((ye,me)=>ye.seq<me.seq?-1:1).map(ye=>ye.part).reduce((ye,me)=>ye+me);try{return JSON.parse(de)}catch{return void g.a.warn("Could not reassemble RTC message chunks")}}(X);return ie&&this.receiveChannelMessage(D,ie),void this.reassemblyTable.delete(H.id)}this.reassemblyTable.set(H.id,X),this.reassemblyTableLastTimestamp.set(H.id,new Date().getTime())}handleSystemMessage(D,H){var X,ie;const{config:oe}=this,{baseConfig:de}=oe,{remotePeerId:ye}=de;switch(H.header.stream.streamType){case"ping":return this.sendSystemMessage(D,{type:"pong",timestamp:p(H.payload.ping)}),!0;case"pong":{const me=new Date().getTime()-p(H.payload.pong);return this.pingTimeMs=me,m.aggregate("rtc-ping-time",me),!0}case"ping-v2":return this.sendPingV2(),!0;case"pong-v2":{const me=p(H.payload.pongV2),ce=this.pingV2Map.get(me.id);return(ce==null?void 0:ce.sent)!==me.timestamp?(g.a.warn("Pong timestamp doesn't match stored value",{currentEntry:ce,pong:me}),!0):(this.pingV2Map.set(me.id,{sent:me.timestamp,received:new Date().getTime()}),!0)}case"streams-info":{const{sessionMetrics:me}=this,ce=(X=H.payload.streamsInfo)===null||X===void 0?void 0:X.timestamp;return!!ce&&(me==null||me.updateRemoteMessagesCounts(H),(ie=de.onStreamsInfoUpdate)===null||ie===void 0||ie.call(de,ye,ce),!0)}case"stream-control":return!0;default:return!1}}sendSystemMessage(D,H){var X;const{localUserId:ie,localPeerId:oe}=this.config.baseConfig;if(D.readyState!=="open")return;const de={entityId:ie??oe,streamName:`$.${H.type}`,streamType:H.type};let ye;switch(H.type){case"ping":ye={ping:new Date().getTime()};break;case"pong":ye={pong:H.timestamp};break;case"ping-v2":ye={pingV2:H.payload};break;case"pong-v2":ye={pongV2:H.payload};break;case"stream-control":ye={streamControl:H.streamControl};break;case"streams-info":ye={streamsInfo:(X=this.sessionMetrics)===null||X===void 0?void 0:X.getLocalStreamsInfo(new Date().getTime())}}this.sendOnChannel(D,Te(de,ye))}isLatestMessage(D){const H=Ie(D.header.stream),X=(this.streamLatestTimestamp.get(H)||0)<=D.header.created;return X&&this.streamLatestTimestamp.set(H,D.header.created),X}}function nt(be){be&&clearInterval(be)}function Rt(be){var D,H;return{userId:(D=be.getUserId())===null||D===void 0?void 0:D.getValue(),deviceId:(H=be.getDeviceId())===null||H===void 0?void 0:H.getValue(),organizationId:be.getOrganizationId(),id:be.getPeerId(),capabilities:[],capabilitySet:{}}}var Pe=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class vt{constructor(D){this.config=D,this.grpcCallDeadline=5*c.a.second,this.refreshIntervalDelayMs=2*c.a.second,this.iceServersTtl=30*c.a.minute,this.connections=[],this.localConnections=[],this.isConnectionInitiator=new Map,this.isOutgoingConnection=new Map,this.peerDataChannelListeners=[];const{refreshIntervalDelayMs:H}=this;this.refreshInterval=d({func:()=>Pe(this,void 0,void 0,function*(){try{yield this.update()}catch(X){g.a.warn("RTC refresh failed",{error:X})}}),delay:H,immediate:!0})}send(D,H,X){const ie=this.getActiveConnection(D);ie?ie.isReady()?ie.send(H,X):g.a.warn("Send called with unready connection."):g.a.warn("Send called with no connection.")}controlRemoteStream(D,H){const X=this.getActiveConnection(D);X?X.isReady()?X.controlRemoteStream(H):g.a.warn("controlRemoteStream called with unready connection."):g.a.warn("controlRemoteStream called with no connection.")}getLocalPeer(){return Pe(this,void 0,void 0,function*(){for(;!this.localPeer;)yield Object(u.a)(.1*c.a.second);return Rt(this.localPeer)})}connect(D,H){var X,ie,oe;return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode===!0)throw new Error("connect method called in local only mode.");const{track:de,signalingClient:ye}=this.config,{localPeer:me,receiveSignalStream:ce,iceServers:ue}=this;if(!me||!ce||!ue)return void g.a.warn("Connect called prior to local peer, receiveSignalStream, and ICE servers ready");if(this.getActiveConnection(D))return void g.a.warn("Connect called for peer with existing connection.");if(this.isOutgoingConnection.get(D))return void g.a.warn("Connect called for peer with an existing outgoing connection offer.");this.isOutgoingConnection.set(D,!0);const Ae=function(Ne,Fe,Ye){const{rtcIceTransportPolicies:Ke,rtcIceServerProtocol:Xe,useAllServers:Je}=Fe||{},ot=Ne.map(at=>Object.assign(Object.assign({},at),{urls:at.urls.filter(dt=>{const wt=(Ke===void 0||Ke.some(St=>V(dt,St)))&&(Xe===void 0||Q(dt,Xe));return wt||g.a.debug(`Ignoring ICE server: ${dt}`,{organizationId:Ye}),wt})})).filter(({urls:at})=>at.filter(dt=>dt).length>0);return Je?ot:[U(ot,"stun"),U(ot,"turn")].filter(at=>at!==void 0).map(at=>p(at))}(ue,H);g.a.debug("Received ICE servers:",ue),g.a.debug("Using ICE servers:",Ae);const Me=new et(yield this.createRTCPeerConnection(Ae),{baseConfig:{isOffer:!0,isLan:!1,receive:(Ne,Fe)=>this.config.receive(Ne,Fe),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Ne,Fe)=>{var Ye,Ke;return(Ke=(Ye=this.config).onStreamsInfoUpdate)===null||Ke===void 0?void 0:Ke.call(Ye,Ne,Fe)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(X=me.getUserId())===null||X===void 0?void 0:X.getValue(),localPeerId:me.getPeerId(),remotePeerId:D,sessionType:this.config.sessionType},remoteConfig:{}},Ne=>this.onCustomDataChannel(D,Ne)),Ue=yield Me.getOffer();if(!Ue)return g.a.error("Failed to generate offer."),void this.isOutgoingConnection.delete(D);g.a.debug("Sending offer."),de==null||de("Sending offer",Ue);const Ge=new ee.SendSignalRequest;Ge.setSignal(Ue);const Qe=yield(()=>Pe(this,void 0,void 0,function*(){try{return yield ye.sendSignal(Ge,yield this.getMetadata({}))}catch(Ne){g.a.warn("Error when sending signal",{error:Ne})}}))();if(!this.isOutgoingConnection.get(D))return void g.a.debug("No offer set after receiving offer signal response.");g.a.debug("Offer sent.");const qe=(ie=Qe==null?void 0:Qe.getSessionId())===null||ie===void 0?void 0:ie.getValue(),$e=(oe=Qe==null?void 0:Qe.getSessionCreatedTimestamp())===null||oe===void 0?void 0:oe.getValue();return qe&&$e?(Me.setSessionId(qe),Me.setSessionCreatedTimestamp($e),this.isOutgoingConnection.delete(D),this.connections.push(Me),this.isConnectionInitiator.set(Me,!0),this.setupHandlers(Me),qe):(g.a.warn("No session ID or no session created timestamp on send signal response."),void this.isOutgoingConnection.delete(D))})}connectLan(D){var H,X;return Pe(this,void 0,void 0,function*(){const ie=new P(D),oe=new et(yield this.createRTCPeerConnection([]),{baseConfig:{isOffer:!0,isLan:!0,receive:(ce,ue)=>this.config.receive(ce,ue),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ce,ue)=>{var Ae,Me;return(Me=(Ae=this.config).onStreamsInfoUpdate)===null||Me===void 0?void 0:Me.call(Ae,ce,ue)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(X=(H=this.localPeer)===null||H===void 0?void 0:H.getUserId())===null||X===void 0?void 0:X.getValue(),localPeerId:"lan_client",remotePeerId:D}},ce=>this.onCustomDataChannel(D,ce)),de=yield oe.getLanOffer();if(!de)return g.a.warn("Could not generate LAN offer"),!1;const ye=yield ie.postLanRtcOffer({offer:JSON.stringify(de)}),me=new RTCSessionDescription(JSON.parse(ye.answer));return yield oe.handleLanAnswer(me),this.localConnections.push(oe),this.isConnectionInitiator.set(oe,!0),Object(Y.a)()})}getConnections(){return[...this.connections,...this.localConnections]}createCustomDataChannel(D,H,X,ie,oe){const de=this.getActiveConnection(D);if(de&&this.isConnectionInitiator.has(de)){const me=de.peerConnection.createDataChannel("custom."+H,X);return ie&&(me.binaryType="arraybuffer"),oe(D,me),()=>{}}const ye=(me,ce)=>{D===me&&ce.label==="custom."+H&&oe(D,ce)};return this.peerDataChannelListeners.push(ye),()=>{this.peerDataChannelListeners=this.peerDataChannelListeners.filter(me=>me!==ye)}}onCustomDataChannel(D,H){this.peerDataChannelListeners.forEach(X=>X(D,H))}getConnectionStatus(D){if(this.isOutgoingConnection.get(D))return"connecting";const H=this.getActiveConnection(D);return H?H.isReady()?"connected":"connecting":"disconnected"}getConnectionStatsInfo(D){return Pe(this,void 0,void 0,function*(){const H=this.getActiveConnection(D);if(H)return yield H.getConnectionStatsInfo()})}disconnect(D){return Pe(this,void 0,void 0,function*(){const H=this.getActiveConnection(D);H&&(yield H.close())})}getPeers(){return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:D}=this.config,H=yield(()=>Pe(this,void 0,void 0,function*(){try{return yield D.getPeers(new ee.GetPeersRequest,yield this.getMetadata({}))}catch(oe){g.a.warn("Error when getting peers",{error:oe})}}))();if(!H)return[];const X=H.getPeersList();if(!X)return[];const ie=oe=>{var de,ye;return(ye=(de=oe.getPeerCreatedTimestamp())===null||de===void 0?void 0:de.getValue())!==null&&ye!==void 0?ye:0};return X.sort((oe,de)=>ie(de)-ie(oe)).map(oe=>Rt(oe))})}getSessions(){return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:D}=this.config,H=yield(()=>Pe(this,void 0,void 0,function*(){try{return yield D.getPeers(new ee.GetPeersRequest,yield this.getMetadata({}))}catch(oe){g.a.warn("Error when getting peers",{error:oe})}}))();if(!H)return{};const X=H.getPeersList(),ie={};for(const oe of X)ie[oe.getPeerId()]=oe.getSessionIdsList();return ie})}getPing(D){const H=this.getActiveConnection(D);if(H)return H.getPing();g.a.warn("Attempted to get ping time from inactive peer.")}getPingInfo(D){const H=this.getActiveConnection(D);if(H)return H.getPingInfo();g.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(D){const H=this.getActiveConnection(D);if(H)return H.getLastMessageTimestamp();g.a.warn("Attempted to get last message time from inactive peer.")}getSessionMetricsMessageCounts(D){const H=this.getActiveConnection(D);if(H)return H.getSessionMetricsMessageCounts();g.a.warn("Attempted to get session metrics counts from inactive peer.")}isReady(){if(this.config.lanOnlyMode)return!0;const{localPeer:D,receiveSignalStream:H,iceServers:X}=this;return!!(D&&H&&X)}shutdown(){return Pe(this,void 0,void 0,function*(){g.a.info("Shutdown called on RTC client"),yield this.refreshInterval.stop(),this.receiveSignalStream&&this.receiveSignalStream.cancel();const D=this.connections;this.connections=[],yield this.closeConnections(D);const{localPeer:H}=this;if(!H||this.config.lanOnlyMode)return;const{signalingClient:X}=this.config;yield(()=>Pe(this,void 0,void 0,function*(){try{const ie=new ee.DeletePeerRequest;ie.setPeerId(H.getPeerId()),yield X.deletePeer(ie,yield this.getMetadata({}))}catch(ie){return void g.a.warn("Error deleting local peer",{error:ie})}}))()})}createPeer(){return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createPeer method cannot be used in local-only mode.");const{signalingClient:D}=this.config,H=yield(()=>Pe(this,void 0,void 0,function*(){try{return yield D.createPeer(new ee.CreatePeerRequest,yield this.getMetadata({}))}catch(ie){throw new Error(`Was not able to create peer: ${JSON.stringify(ie)}`)}}))(),X=H==null?void 0:H.getPeer();if(!X)throw new Error("Response did not provide peer.");return this.localPeer=X})}createReceiveSignalStream(){return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");const{signalingClient:D}=this.config,{localPeer:H,iceServers:X}=this;if(!H||!X)return;const{receiveSignalStream:ie}=this;ie&&ie.cancel();const oe=new ee.ReceiveSignalStreamRequest;oe.setPeerId(H.getPeerId());const de=yield(()=>Pe(this,void 0,void 0,function*(){try{return D.receiveSignalStream(oe,yield this.getMetadata({hasDeadline:!1}))}catch(ye){throw new Error(`Unable to create receive signal stream: ${JSON.stringify(ye)}`)}}))();if(!de)throw new Error("Response did not provide stream.");return de.on("data",ye=>Pe(this,void 0,void 0,function*(){var me,ce,ue,Ae;const Me=ye.getSignal(),Ue=(me=Me==null?void 0:Me.getSessionId())===null||me===void 0?void 0:me.getValue(),Ge=Me==null?void 0:Me.getSenderId(),Qe=Me==null?void 0:Me.getReceiverId(),qe=(ce=Me==null?void 0:Me.getSessionCreatedTimestamp())===null||ce===void 0?void 0:ce.getValue();if(!(Me&&Ue&&Ge&&Qe&&qe))return void g.a.warn("Received signal with missing information.");const $e=this.getActiveConnection(Ge);if($e)if($e.getSessionId()!==Ue){if(g.a.debug("Received signal: different session for a peer we're already connected to."),($e.getSessionCreatedTimestamp()||0)>qe)return;const Ne=new et(yield this.createRTCPeerConnection(X),{baseConfig:{isOffer:!1,isLan:!1,receive:(Fe,Ye)=>this.config.receive(Fe,Ye),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Fe,Ye)=>{var Ke,Xe;return(Xe=(Ke=this.config).onStreamsInfoUpdate)===null||Xe===void 0?void 0:Xe.call(Ke,Fe,Ye)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:H.getPeerId(),localUserId:(Ae=H.getUserId())===null||Ae===void 0?void 0:Ae.getValue(),remotePeerId:Ge},remoteConfig:{sessionId:Ue,sessionCreatedTimestamp:qe}},Fe=>this.onCustomDataChannel(Ge,Fe));yield Ne.handleSignal(Me),this.connections.push(Ne)}else g.a.debug("Received signal: for an existing connection."),yield $e.handleSignal(Me);else{g.a.debug("Received signal: new connection.");const Ne=new et(yield this.createRTCPeerConnection(X),{baseConfig:{isOffer:!1,isLan:!1,receive:(Fe,Ye)=>this.config.receive(Fe,Ye),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Fe,Ye)=>{var Ke,Xe;return(Xe=(Ke=this.config).onStreamsInfoUpdate)===null||Xe===void 0?void 0:Xe.call(Ke,Fe,Ye)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:H.getPeerId(),localUserId:(ue=H.getUserId())===null||ue===void 0?void 0:ue.getValue(),remotePeerId:Ge},remoteConfig:{sessionId:Ue,sessionCreatedTimestamp:qe}},Fe=>this.onCustomDataChannel(Ge,Fe));yield Ne.handleSignal(Me),this.connections.push(Ne)}})),de.on("end",()=>{de.cancel(),this.receiveSignalStream=void 0}),de.on("error",ye=>{switch(ye.code){case ne.StatusCode.CANCELLED:case ne.StatusCode.UNAVAILABLE:case ne.StatusCode.UNKNOWN:g.a.debug("Receive signal stream error",{error:ye});break;case ne.StatusCode.UNAUTHENTICATED:g.a.warn("Receive signal stream error",{error:ye});break;default:g.a.error("Receive signal stream error",{error:ye})}de.cancel(),this.receiveSignalStream=void 0}),this.receiveSignalStream=de})}createRTCPeerConnection(D){var H;return Pe(this,void 0,void 0,function*(){const X=(H=this.config.alternateRTCPeerConnection)!==null&&H!==void 0?H:window.RTCPeerConnection;if(!X)throw function(){const{userAgent:ie}=navigator;return ie.includes("Firefox/")?"Firefox":ie.includes("Edg/")?"Edge":ie.includes("Chrome/")?"Chrome":ie.includes("Safari/")?"Safari":ie.includes("MSIE/")||ie.includes("Trident/")?"IE":"Other"}()!=="Chrome"?new Error("WebRTC is not enabled. Please try again with the latest version of Google Chrome."):new Error("WebRTC is not enabled. Please ensure WebRTC is not disabled by ad blocking software.");return new X({iceServers:D})})}closeConnections(D){return Pe(this,void 0,void 0,function*(){const H=yield O(D.map(X=>Pe(this,void 0,void 0,function*(){yield X.close()})));for(const X of H)g.a.warn("Request to close session failed",{error:X})})}getActiveConnection(D){return this.getConnections().find(H=>H.getRemotePeerId()===D&&H.isActive())}update(){var D;return Pe(this,void 0,void 0,function*(){if(this.localConnections=this.localConnections.filter(ye=>ye.isActive()),this.config.lanOnlyMode)return;const{signalingClient:H}=this.config;if(!this.localPeer||!this.receiveSignalStream||!this.iceServers)return this.localPeer||(yield this.createPeer()),this.iceServers||(yield this.updateIceServers()),void(this.receiveSignalStream||(yield this.createReceiveSignalStream()));yield this.closeConnections(this.connections.filter(ye=>!ye.isActive())),this.connections=this.connections.filter(ye=>ye.isActive());const{localPeer:X}=this,ie=this.connections.filter(ye=>ye.getSessionId).map(ye=>p(ye.getSessionId()));X.setSessionIdsList(ie);const oe=new ee.RefreshPeerRequest;oe.setPeer(X);try{yield H.refreshPeer(oe,yield this.getMetadata({}))}catch(ye){ye.code===ne.StatusCode.NOT_FOUND?(g.a.warn("Peer expired, creating new peer",{peerId:X.getPeerId()}),yield this.reset()):g.a.warn("Error calling RefreshPeer",{error:ye})}const de=yield this.getPeers();for(const ye of this.connections)ye.setRemoteDeviceId((D=de.find(me=>me.id===ye.getRemotePeerId()))===null||D===void 0?void 0:D.deviceId)})}reset(){return Pe(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.isOutgoingConnection=new Map,yield this.createPeer(),yield this.createReceiveSignalStream()})}updateIceServers(){return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)return;const{iceServersLastUpdate:D,iceServersTtl:H}=this,X=new Date().getTime();if(!D||X-D>H)try{const ie=(yield this.config.signalingClient.getIceServers(new ee.GetIceServersRequest,yield this.getMetadata({}))).getIceServers();this.iceServers=JSON.parse(ie),this.iceServersLastUpdate=X}catch(ie){g.a.warn("Error in updateIceServers",{error:ie})}})}setupHandlers(D){const{peerConnection:H}=D,X=D.getSessionCreatedTimestamp();H.onconnectionstatechange=()=>Pe(this,void 0,void 0,function*(){const ie=H.connectionState;if(X)switch(ie){case"connected":m.aggregate("rtc-connect-time",new Date().getTime()-X);break;case"failed":m.increment("rtc-connect-failed")}})}getMetadata(D){return Pe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getMetadata method cannot be called in local-only mode");const{getToken:H}=this.config,{grpcCallDeadline:X}=this,{hasDeadline:ie}=D,oe=ie===!1?void 0:new Date().getTime()+X;return{authorization:yield H(),deadline:oe}})}}var ft=n(10),ut=n(11),Ot=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class It{constructor(D,H){this.sessionId=D,this.connection=H,this.sentMessagesCounts=new Map,this.receivedMessagesCounts=new Map,this.sessionId=D,this.connection=H}incrementMessageSent(D){const H=Ie(D.header.stream);this.sentMessagesCounts.set(H,(this.sentMessagesCounts.get(H)||0)+1)}incrementMessageReceived(D){const H=Ie(D.header.stream);this.receivedMessagesCounts.set(H,(this.receivedMessagesCounts.get(H)||0)+1)}uploadMetrics(){return Ot(this,void 0,void 0,function*(){const{sessionId:D}=this,H=yield this.connection.peerConnection.getStats(),X={};H.forEach(oe=>X[oe.id]=oe),g.a.debug("rtc-stats",Object.assign(Object.assign({},X),{sessionId:D}));const ie=[...new Set(Array.from(this.sentMessagesCounts.keys()).concat(Array.from(this.receivedMessagesCounts.keys())))].reduce((oe,de)=>{const ye=this.sentMessagesCounts.get(de),me=this.receivedMessagesCounts.get(de);return Object.assign(Object.assign({},oe),{[`${de}-sent`]:ye,[`${de}-received`]:me})},{sessionId:D});g.a.debug("rtc-message-report",ie)})}}function ct(be,D){return Ie(be)===Ie(D)}var tt=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class Ct{constructor(D,H){this.peerConnection=D,this.config=H,this.connectTimeoutMs=10*c.a.second,this.gatherIceTimeoutMs=5*c.a.second,this.pingUpdateTimeoutMs=2*c.a.second,this.streamLatestTimestamp=new Map,this.closeCalled=!1,this.connectCalled=!1,this.sentOffer=!1,this.receivedIceCandidate=!1;const{isOffer:X}=H;X?this.initializeChannels(D):D.ondatachannel=ie=>{switch(ie.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=ie.channel;break;case"stream.reliable":this.reliableStreamChannel=ie.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=ie.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=ie.channel}this.setupChannel(ie.channel)},this.sessionMetrics=new It(this.getSessionId(),this)}connect(){return tt(this,void 0,void 0,function*(){if(this.connectCalled)return;this.connectCalled=!0,this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:ie}=this;ie&&this.sendSystemMessage(ie,{type:"ping"})},this.pingUpdateTimeoutMs),this.connectTimeout=setTimeout(()=>tt(this,void 0,void 0,function*(){this.isReady()||(g.a.warn("RTC connect timed out, closing connection"),yield this.close())}),this.connectTimeoutMs);const{peerConnection:D,config:{isOffer:H,sessionId:X}}=this;if(H){const ie=yield D.createOffer();yield D.setLocalDescription(ie)}H&&(this.gatherIceTimeout=setTimeout(()=>tt(this,void 0,void 0,function*(){this.sentOffer||(g.a.warn("ICE gathering timed out"),this.receivedIceCandidate?(g.a.warn("Attempting to connect with partial ICE candidate pool"),yield this.sendOffer()):yield this.close())}),this.gatherIceTimeoutMs),D.onicecandidate=ie=>tt(this,void 0,void 0,function*(){ie.candidate?this.receivedIceCandidate=!0:yield this.sendOffer()}),D.onicegatheringstatechange=()=>tt(this,void 0,void 0,function*(){D.iceGatheringState==="complete"&&(yield this.sendOffer())}),D.onnegotiationneeded=()=>{g.a.debug("Negotiation needed",{sessionId:X})})})}handleSignal(D){return tt(this,void 0,void 0,function*(){const{peerConnection:H,config:{sessionId:X,sendSignal:ie}}=this,{description:oe}=JSON.parse(D.payload);if(g.a.debug("Handling signal",{sessionId:X,description:JSON.stringify(oe)}),oe)if(H.signalingState!=="stable"||H.connectionState!=="connected")if(H.remoteDescription)g.a.warn(`Received SDP signal during negotiation when remote description is already set: ${JSON.stringify(D)}`);else if(oe.type==="offer"){yield H.setRemoteDescription(oe);const de=yield H.createAnswer();yield H.setLocalDescription(de),yield ie({payload:JSON.stringify({description:de})})}else oe.type==="answer"&&(yield H.setRemoteDescription(oe));else g.a.warn(`Received SDP signal when signaling is stable and connected: ${JSON.stringify(D)}`);else g.a.warn(`Received non-SDP signal: ${JSON.stringify(D)}`)})}send(D,H){const X=this.getChannelFromLabel(H.channelLabel);X?this.sendOnChannel(X,D):g.a.warn("Send called with unexpected channel label",{channelLabel:H.channelLabel})}controlRemoteStream(D){this.sendSystemMessage(p(this.reliableStreamChannel),{type:"stream-control",streamControl:D})}isActive(){return new Set(["new","connecting","connected"]).has(this.peerConnection.connectionState)}isReady(){const{peerConnection:D,latestTtlStreamChannel:H,reliableStreamChannel:X,latestTryOnceStreamChannel:ie}=this;return!!(X&&H&&ie)&&D.connectionState==="connected"&&X.readyState==="open"&&H.readyState==="open"&&ie.readyState==="open"}isClosed(){const{peerConnection:D,reliableStreamChannel:H,latestTryOnceStreamChannel:X,latestTtlStreamChannel:ie}=this;return!(D.connectionState!=="closed"||H!==void 0&&H.readyState!=="closed"||X!==void 0&&X.readyState!=="closed"||ie!==void 0&&ie.readyState!=="closed")}needsClosing(){const{peerConnection:D,latestTtlStreamChannel:H,reliableStreamChannel:X,latestTryOnceStreamChannel:ie}=this;if(this.isClosed())return!1;const oe=new Set(["closing","closed"]),de=ye=>ye&&oe.has(ye.readyState);return Re(D)||de(H)||de(X)||de(ie)}close(){return tt(this,void 0,void 0,function*(){this.closeCalled||(this.closeCalled=!0,yield this.sessionMetrics.uploadMetrics(),this.pingUpdateTimeout&&clearInterval(this.pingUpdateTimeout),this.connectTimeout&&clearTimeout(this.connectTimeout),this.gatherIceTimeout&&clearTimeout(this.gatherIceTimeout),this.peerConnection.close())})}getPing(){return this.pingTimeMs}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionId(){return this.config.sessionId}getRemotePeer(){return this.config.remotePeer}initializeChannels(D){this.latestTtlStreamChannel=D.createDataChannel("stream.latest-ttl",S),this.reliableStreamChannel=D.createDataChannel("stream.reliable",T),this.latestReliableStreamChannel=D.createDataChannel("stream.latest-reliable",k),this.latestTryOnceStreamChannel=D.createDataChannel("stream.latest-try-once",J),this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}sendOffer(){return tt(this,void 0,void 0,function*(){if(this.sentOffer||(this.sentOffer=!0,Re(this.peerConnection)))return;const{peerConnection:D,config:{sendSignal:H}}=this,X=yield D.createOffer();yield D.setLocalDescription(X);const ie={payload:JSON.stringify({description:X})};yield H(ie)})}getChannelFromLabel(D){switch(D){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(D,H){let X;try{X=Object(G.encode)(JSON.stringify(H))}catch(ie){return void g.a.warn("Failed to encode RTC message",{error:ie})}try{D.send(X),this.sessionMetrics.incrementMessageSent(H)}catch(ie){g.a.warn("Failed to send message to channel",{error:ie,channel:D.label})}}channelNotRecognized(D){return D!==this.latestTtlStreamChannel&&D!==this.latestReliableStreamChannel&&D!==this.latestTryOnceStreamChannel&&D!==this.reliableStreamChannel}setupChannel(D){D.onmessage=H=>{if(this.channelNotRecognized(D))return void g.a.warn("Received message on unrecognized data channel.");let X;try{X=JSON.parse(Object(G.decode)(H.data))}catch(ie){return void g.a.warn("Received unparseable RTC message",{error:ie,channel:D.label})}if(this.lastMessageTimestamp=new Date().getTime(),X=Be(X),this.sessionMetrics.incrementMessageReceived(X),!this.handleSystemMessage(D,X)){if(!this.hasCapabilities(X))return void g.a.warn("Received RTC message that was not within the capability scope of the connection.");(D===this.latestTryOnceStreamChannel||D===this.latestTtlStreamChannel||D===this.latestReliableStreamChannel)&&!this.isLatestMessage(X)||this.config.receive(this.config.remotePeer.id,X)}},D.onerror=H=>{g.a.warn(`Channel error: ${H.error}`,{error:H.error,sessionId:this.getSessionId(),channelLabel:D.label})},D.onopen=()=>{g.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:D.label})},D.onclose=()=>{const H={bufferedAmount:D.bufferedAmount,sessionId:this.getSessionId(),channelLabel:D.label};this.closeCalled===!1?g.a.debug("Unexpected channel closed",H):g.a.debug("Channel closed",H)}}handleSystemMessage(D,H){switch(H.header.stream.streamType){case"ping":return this.sendSystemMessage(D,{type:"pong",timestamp:p(H.payload.ping)}),!0;case"pong":{const X=new Date().getTime()-p(H.payload.pong);return this.pingTimeMs=X,m.aggregate("rtc-ping-time",X),!0}case"stream-control":return!0;default:return!1}}sendSystemMessage(D,H){if(D.readyState!=="open")return;const X={entityId:p(this.config.localPeer.deviceId||this.config.localPeer.userId),streamName:`$.${H.type}`,streamType:H.type};let ie;switch(H.type){case"ping":ie={ping:new Date().getTime()};break;case"pong":ie={pong:H.timestamp};break;case"stream-control":ie={streamControl:H.streamControl}}this.sendOnChannel(D,Te(X,ie))}hasCapabilities(D){var H,X;const{localPeer:ie,remotePeer:oe}=this.config,de=(H=ie.capabilitySet.streaming)===null||H===void 0?void 0:H.streams,ye=de&&de.some(ue=>ue.receive&&ct(ue.stream,D.header.stream)),me=(X=oe.capabilitySet.streaming)===null||X===void 0?void 0:X.streams,ce=me&&me.some(ue=>ue.send&&ct(ue.stream,D.header.stream));return ye||ce}isLatestMessage(D){const H=Ie(D.header.stream),X=(this.streamLatestTimestamp.get(H)||0)<=D.header.created;return X&&this.streamLatestTimestamp.set(H,D.header.created),X}}var ke=function(be,D,H,X){return new(H||(H=Promise))(function(ie,oe){function de(ce){try{me(X.next(ce))}catch(ue){oe(ue)}}function ye(ce){try{me(X.throw(ce))}catch(ue){oe(ue)}}function me(ce){var ue;ce.done?ie(ce.value):(ue=ce.value,ue instanceof H?ue:new H(function(Ae){Ae(ue)})).then(de,ye)}me((X=X.apply(be,D||[])).next())})};class Mt{constructor(D){this.config=D,this.connections=[],this.connectingSessions=new Map,this.updateInterval=d({func:()=>ke(this,void 0,void 0,function*(){try{yield this.update()}catch(H){g.a.warn("RTC update failed",{error:H})}}),delay:250*c.a.millisecond,immediate:!0}),this.localPeer=this.createPeer()}send(D,H,X){const ie=this.getActiveConnection(D);ie?ie.isReady()?ie.send(H,X):g.a.warn("Attempted to send with an active connection to that peer which was not yet ready."):g.a.warn("Attempted to send with no active connection to that peer.")}controlRemoteStream(D,H){const X=this.getActiveConnection(D);X?X.isReady()?X.controlRemoteStream(H):g.a.warn("Attempted to control remote stream with an active connection to that peer which was not yet ready."):g.a.warn("Attempted to control remote stream with no active connection to that peer.")}connect(D){return ke(this,void 0,void 0,function*(){const H=yield this.getLocalPeer();if(this.getActiveConnection(D))return void g.a.warn("Attempted to connect to peer with an already active connection.");let X;try{X=yield this.config.signalingClient.createSession(yield this.config.getToken(),{offerPeerId:H.id,answerPeerId:D})}catch(ie){Object(ft.a)(ie,ut.a,oe=>oe.statusCode===404),g.a.warn("Attempted to connect to peer that does not exist.")}if(X)for(this.connectingSessions.set(X.id,new Date().getTime()),yield this.connectToSession(X);;)switch(yield Object(u.a)(.1),this.getConnectionStatus(D)){case"connecting":continue;case"connected":return X.id;case"disconnected":return}})}getConnectionStatus(D){const H=this.getActiveConnection(D);return H?H.isReady()?"connected":"connecting":"disconnected"}getIceMode(D){const H=this.getActiveConnection(D);if(H)return H.iceMode}disconnect(D){return ke(this,void 0,void 0,function*(){const H=this.getActiveConnection(D);H&&(yield this.closeConnection(H))})}getLocalPeer(){return ke(this,void 0,void 0,function*(){return yield this.localPeer})}getPeers(){return ke(this,void 0,void 0,function*(){return yield this.config.signalingClient.getPeers(yield this.config.getToken())})}getPing(D){const H=this.getActiveConnection(D);if(H)return H.getPing();g.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(D){const H=this.getActiveConnection(D);if(H)return H.getLastMessageTimestamp();g.a.warn("Attempted to get ping time from inactive peer.")}shutdown(){return ke(this,void 0,void 0,function*(){yield this.updateInterval.stop();const D=this.connections;this.connections=[],yield this.closeConnections(D)})}closeConnection(D){return ke(this,void 0,void 0,function*(){this.connectingSessions.delete(D.getSessionId()),yield D.close();try{yield this.config.signalingClient.deleteSession(yield this.config.getToken(),D.getSessionId())}catch(H){Object(ft.a)(H,ut.a,X=>X.statusCode===404)}})}getSessions(){return ke(this,void 0,void 0,function*(){const D=yield this.getLocalPeer();return(yield this.config.signalingClient.getSessions(yield this.config.getToken())).filter(H=>H.offer.peer.id===D.id||H.answer.peer.id===D.id)})}createPeer(){return ke(this,void 0,void 0,function*(){return yield this.config.signalingClient.createPeer(yield this.config.getToken(),{capabilitySet:this.config.capabilitySet||{}})})}createRTCPeerConnection(D={}){return ke(this,void 0,void 0,function*(){return new(this.config.alternateRTCPeerConnection||RTCPeerConnection)(Object.assign({iceServers:yield this.config.signalingClient.getIceServers(yield this.config.getToken())},D))})}closeConnections(D){return ke(this,void 0,void 0,function*(){const H=yield O(D.map(X=>ke(this,void 0,void 0,function*(){yield this.closeConnection(X)})));for(const X of H)g.a.warn("Request to close session failed",{error:X})})}reset(){return ke(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.connectingSessions=new Map,this.localPeer=this.createPeer(),yield this.localPeer})}getActiveConnection(D){return this.connections.find(H=>H.getRemotePeer().id===D&&H.isActive())}update(){return ke(this,void 0,void 0,function*(){const D=yield this.getLocalPeer();try{yield this.config.signalingClient.refreshPeer(yield this.config.getToken(),D.id)}catch(H){Object(ft.a)(H,ut.a,X=>X.statusCode===404),g.a.warn("Peer expired, creating new peer",{peerId:D.id}),yield this.reset()}yield this.handleSessions(yield this.getSessions())})}handleSessions(D){return ke(this,void 0,void 0,function*(){yield this.syncConnectionsAndSessions(D);const H=D.map(X=>({session:X,connection:this.connections.find(ie=>ie.getSessionId()===X.id)}));yield Promise.all(H.map(({session:X,connection:ie})=>ke(this,void 0,void 0,function*(){return yield this.maintainConnection(X,ie)})))})}syncConnectionsAndSessions(D){return ke(this,void 0,void 0,function*(){const H=new Set(D.map(oe=>oe.id)),X=oe=>H.has(oe.getSessionId())||this.connectingSessions.has(oe.getSessionId());this.connections=this.connections.filter(oe=>X(oe));const ie=this.connections.filter(oe=>!X(oe)||oe.needsClosing());yield Promise.all(ie.map(oe=>ke(this,void 0,void 0,function*(){yield this.closeConnection(oe)})))})}maintainConnection(D,H){return ke(this,void 0,void 0,function*(){const X=yield this.getLocalPeer(),ie=D.offer.peer.id===X.id;if(H){if(H.isReady())try{yield this.config.signalingClient.refreshSession(yield this.config.getToken(),D.id)}catch(oe){Object(ft.a)(oe,ut.a,de=>de.statusCode===404),g.a.debug("Refresh session not found",{sessionId:D.id})}else if(H.isActive())try{yield this.consumeSignals(H)}catch(oe){g.a.warn("Failed to ingest signals, closing connection",{error:oe}),yield this.closeConnection(H)}}else{if(ie)return;yield this.connectToSession(D)}})}connectToSession(D){return ke(this,void 0,void 0,function*(){const H=yield this.getLocalPeer(),X=D.offer.peer.id===H.id,ie=yield this.createRTCPeerConnection(),oe=new Ct(ie,{localPeer:X?D.offer.peer:D.answer.peer,remotePeer:X?D.answer.peer:D.offer.peer,sessionId:D.id,isOffer:X,sendSignal:de=>this.sendSignal(D.id,de),receive:(de,ye)=>this.config.receive(de,ye)});if(this.connections.find(de=>de.getSessionId()===D.id))return g.a.warn("connectToSession called on a session that already has a connection.",{sessionId:D.id}),void(yield oe.close());this.setupHandlers(oe),this.connections.push(oe);try{yield oe.connect()}catch(de){g.a.warn("Failed to handle negotiation, closing connection",{error:de}),yield this.closeConnection(oe)}})}setupHandlers(D){const{peerConnection:H}=D,X=D.getSessionId();H.onconnectionstatechange=()=>ke(this,void 0,void 0,function*(){const ie=this.connectingSessions.get(X);if(ie===void 0)return;const oe=H.connectionState;switch(Re(H)&&this.connectingSessions.delete(X),oe){case"connected":{this.connectingSessions.delete(X);const de=new Date().getTime()-ie;m.aggregate("rtc-connect-time",de);break}case"failed":m.increment("rtc-connect-failed"),yield this.closeConnection(D)}})}consumeSignals(D){return ke(this,void 0,void 0,function*(){let H=[];try{H=yield this.config.signalingClient.takeSignals(yield this.config.getToken(),D.getSessionId())}catch(X){Object(ft.a)(X,ut.a,ie=>ie.statusCode===404)}for(const X of H)yield D.handleSignal(X)})}sendSignal(D,H){return ke(this,void 0,void 0,function*(){try{yield this.config.signalingClient.addSignals(yield this.config.getToken(),D,{signals:[H]})}catch(X){Object(ft.a)(X,ut.a,ie=>ie.statusCode===404)}})}}},function(e,t,n){var r={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const s=new Uint8Array(16);function l(){if(!i&&(i=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}const o=[];for(let u=0;u<256;++u)o.push((u+256).toString(16).slice(1));function c(u,f=0){return(o[u[f+0]]+o[u[f+1]]+o[u[f+2]]+o[u[f+3]]+"-"+o[u[f+4]]+o[u[f+5]]+"-"+o[u[f+6]]+o[u[f+7]]+"-"+o[u[f+8]]+o[u[f+9]]+"-"+o[u[f+10]]+o[u[f+11]]+o[u[f+12]]+o[u[f+13]]+o[u[f+14]]+o[u[f+15]]).toLowerCase()}t.a=function(u,f,E){if(r.randomUUID&&!f&&!u)return r.randomUUID();const w=(u=u||{}).random||(u.rng||l)();if(w[6]=15&w[6]|64,w[8]=63&w[8]|128,f){E=E||0;for(let h=0;h<16;++h)f[E+h]=w[h];return f}return c(w)}},,function(e,t,n){n.r(t),n.d(t,"LogClient",function(){return o});var r=n(28),i=n(10),s=n(11),l=function(c,u,f,E){return new(f||(f=Promise))(function(w,h){function g(x){try{R(E.next(x))}catch(F){h(F)}}function b(x){try{R(E.throw(x))}catch(F){h(F)}}function R(x){var F;x.done?w(x.value):(F=x.value,F instanceof f?F:new f(function(M){M(F)})).then(g,b)}R((E=E.apply(c,u||[])).next())})};class o extends r.a{log(u){return l(this,void 0,void 0,function*(){const f=o.token;try{yield this.fetch("logs",{token:f,method:"POST",body:JSON.stringify({logs:u}),allowUnsafeRetries:!0})}catch(E){Object(i.a)(E,s.a,w=>w.statusCode===401&&f!==void 0),o.token===f&&delete o.token,yield this.log(u)}})}}}])})})(dist);function defined(e,t){if(e!==void 0)return e;throw new Error(t||"Value is undefined")}let FORMANT_API_URL="https://api.formant.io";typeof window<"u"&&(FORMANT_API_URL=window.FORMANT_API_URL||FORMANT_API_URL);let urlParams$2=new URLSearchParams("");typeof window<"u"&&(urlParams$2=new URLSearchParams(window.location.search));const envDev=urlParams$2.get("formant_dev");envDev&&(FORMANT_API_URL="https://api-dev.formant.io");const envStage=urlParams$2.get("formant_stage");envStage&&(FORMANT_API_URL="https://api-stage.formant.io");const envLocal=urlParams$2.get("formant_local");envLocal&&(FORMANT_API_URL="https://api.formant.local");const millisecond=1,second=1e3,minute=60*second,hour=60*minute,day=24*hour,week=7*day,month=30*day,year=365*day,duration={millisecond,second,minute,hour,day,week,month,year};function filterDataByType(e,t){return e.filter(n=>t.includes(n.type))}function filterDataByTime(e,t,n){const r=t.getTime(),i=n.getTime();return e.map(s=>({...s,points:s.points.filter(([l])=>l>=r&&l<i)})).filter(({points:s})=>s.length>0)}function fork(e){}class StoreCache{constructor({capacity:t,timeout:n}={}){Oe(this,"entries",new Map);Oe(this,"metadata",new Map);Oe(this,"capacity");Oe(this,"timeout");this.capacity=t||1e4,this.timeout=n||duration.minute}get(t,n){const r=this.keyToCacheKey(t),i=this.entries.get(r),s=this.metadata.get(r);return(i===void 0||s&&(s==null?void 0:s.expiration.getTime())<Date.now())&&!(s!=null&&s.generating)&&n&&this.generate(t,n()),i===void 0&&s&&s.lastValue!==void 0?s.lastValue:i}set(t,n){const r=this.keyToCacheKey(t);this.metadata.set(r,{generating:!1,expiration:new Date(Date.now()+this.timeout),lastValue:n}),this.entries.set(r,n),this.metadata.size>this.capacity&&this.deleteOldestEntry()}clear(){this.entries.clear(),[...this.metadata.values()].forEach(t=>t.generating=!1)}clearKey(t){this.metadata.delete(t),this.entries.delete(t)}keyToCacheKey(t){return JSON.stringify(t)}deleteOldestEntry(){if(this.metadata.size<1)return;const[t]=[...this.metadata.entries()].reduce(([n,r],[i,s])=>s.expiration.getTime()<r.expiration.getTime()?[i,s]:[n,r]);this.clearKey(t)}generate(t,n){const r=this.keyToCacheKey(t),i=this.metadata.get(r)||{};this.metadata.set(r,{...i,generating:!0,expiration:new Date(Date.now()+this.timeout)}),setTimeout(()=>{n.then(s=>{const l=this.metadata.get(r);!(l!=null&&l.generating)||this.set(t,s)})},0)}}class QueryStore{constructor(){Oe(this,"queryStoreCache",new StoreCache({capacity:1e4,timeout:20*duration.second}));Oe(this,"liveQueryStoreCache",new StoreCache({capacity:1e4,timeout:200*duration.millisecond}))}moduleQuery(t,n,r,i,s,l=!1){const o={...t,names:[...n],types:[...r]},c=this.query(o,i,s,l);return c===void 0||c==="too much data"?c:filterDataByType(c,r)}query(t,n,r,i=!1){const s={...t,start:dateFns.startOfMinute(n).toISOString(),end:i?r.toISOString():dateFns.addMinutes(dateFns.roundToNearestMinutes(r),1).toISOString(),latestOnly:i},l=r>dateFns.addSeconds(new Date,-20);let o;return l?o=this.liveQueryCache(s):o=this.queryCache(s),!o||o==="too much data"||i?o:filterDataByTime(o,n,r)}queryCache(t){return this.queryStoreCache.get(t,async()=>{try{return await Fleet.queryTelemetry(t)}catch(n){throw n}})}liveQueryCache(t){return this.liveQueryStoreCache.get(t,async()=>{try{return await Fleet.queryTelemetry(t)}catch(n){throw n}})}}const queryStore=new QueryStore;class App{static sendAppMessage(t){window.parent.postMessage(t,"*")}static getCurrentModuleContext(){let t=new URLSearchParams("");return typeof window<"u"&&(t=new URLSearchParams(window.location.search)),t.get("module")}static async getCurrentModuleConfiguration(){let t=new URLSearchParams("");typeof window<"u"&&(t=new URLSearchParams(window.location.search));const n=t.get("configuration");return n===null||n.trim()===""?void 0:(await(await fetch(`${FORMANT_API_URL}/v1/admin/module-configurations/`+n,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).configuration}static isModule(){return this.getCurrentModuleContext()!==null}static goToTime(t){this.sendAppMessage({type:"go_to_time",time:t.getTime()})}static goToDevice(t){this.sendAppMessage({type:"go_to_device",deviceId:t})}static showMessage(t){this.sendAppMessage({type:"show_message",message:t})}static requestModuleData(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"request_module_data",module:t})}static setModuleDateTimeRange(t,n){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"set_module_data_time_range",module:r,before:t,after:n||0})}static refreshAuthToken(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"refresh_auth_token",module:t})}static sendChannelData(t,n){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"send_channel_data",source:r,channel:t,data:n})}static setupModuleMenus(t){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"setup_module_menus",module:n,menus:t})}static addMenuListener(t){window.addEventListener("message",n=>{const r=n.data;r.type==="module_menu_item_clicked"&&t(r.menu)})}static addAccessTokenRefreshListener(t){window.addEventListener("message",n=>{const r=n.data;r.type==="auth_token"&&t(r.token)})}static addModuleDataListener(t){const n=this.getCurrentModuleContext();n&&this.sendAppMessage({type:"request_module_data",module:n}),window.addEventListener("message",r=>{const i=r.data;i.type==="module_data"&&t({streams:i.streams,time:i.time,queryRange:i.queryRange})})}static addStreamListener(t,n,r){const i=s=>{const l=s.data;if(l.type==="module_data"){const{start:o,end:c}=l.queryRange;r(queryStore.moduleQuery({},t,n,new Date(o),new Date(c),!1))}};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)}static addModuleConfigurationListener(t){window.addEventListener("message",n=>{const r=n.data;r.type==="module_configuration"&&t(r)})}static addChannelDataListener(t,n){window.addEventListener("message",r=>{const i=r.data;i.type==="channel_data"&&i.channel===t&&n({source:i.source,data:i.data})})}static requestOverviewDevices(t){this.sendAppMessage({type:"request_devices"}),window.addEventListener("message",n=>{const r=n.data;t(r)})}static async prompt(t,n){return new Promise(r=>{const i=Math.random().toString();this.sendAppMessage({type:"prompt",promptId:i,schema:t,okText:n==null?void 0:n.okText,cancelText:n==null?void 0:n.cancelText});const s=l=>{const o=l.data;o.type==="prompt_response"&&o.promptId===i&&r(o.data),window.removeEventListener("message",s)};window.addEventListener("message",s)})}}const je=class{static async login(t,n){try{const r=await fetch(`${FORMANT_API_URL}/v1/admin/auth/login`,{method:"POST",body:JSON.stringify({email:t,password:n}),headers:{"Content-Type":"application/json"}}),i=await r.json();if(r.status!==200)throw new Error(i.message);return await je.loginWithToken(i.authentication.accessToken,i.authentication.refreshToken),i.authentication}catch(r){return je.waitingForAuth.forEach(i=>i(!1)),je.waitingForAuth=[],Promise.reject(r)}}static async loginWithToken(t,n){const r=JSON.parse(atob(t.split(".")[1]));try{let i;if(je.isShareToken=r["formant:claims"]&&r["formant:claims"].type=="share",r["formant:claims"]&&(je.currentOrganization=r["formant:claims"].organizationId),r["custom:organization_id"]&&(je.currentOrganization=r["custom:organization_id"]),je.isShareToken||(i=r.sub),r["formant:claims"]&&r["formant:claims"].userId&&(i=r["formant:claims"].userId),i){const s=await fetch(`${FORMANT_API_URL}/v1/admin/users/${i}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}),l=await s.json();if(s.status!==200)throw new Error(l.message);je.currentUser=l}je.token=t,je.waitingForAuth.forEach(s=>s(!0))}catch(i){console.error(i),je.waitingForAuth.forEach(s=>s(!1))}je.waitingForAuth=[],n&&(je.refreshToken=n,setInterval(async()=>{if(je.refreshToken){const s=await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:je.refreshToken})})).json();je.token=s.authentication.accessToken}},1e3*60*60))}static isAuthenticated(){return je.token!==void 0}static getCurrentUser(){return je.currentUser}static async waitTilAuthenticated(){return je.token!==void 0?!0:new Promise(t=>{je.waitingForAuth.push(function(n){t(n)})})}static async listenForRefresh(){App.addAccessTokenRefreshListener(t=>{this.loginWithToken(t)}),setInterval(async()=>{App.refreshAuthToken()},1e3*60*60)}static async forgotPassword(t){await fetch(`${FORMANT_API_URL}/v1/admin/auth/forgot-password`,{method:"POST",body:JSON.stringify({email:t}),headers:{"Content-Type":"application/json"}})}static async confirmForgotPassword(t){return(await fetch(`${FORMANT_API_URL}/v1/admin/auth/confirm-forgot-password`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})).ok}static async respondToNewPasswordRequiredChallenge(t){return await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/respond-to-new-password-required-challenge`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})).json()}static async loginWithGoogle(t){return await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/login-google`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})).json()}};let Authentication=je;Oe(Authentication,"token"),Oe(Authentication,"refreshToken"),Oe(Authentication,"currentUser"),Oe(Authentication,"currentOrganization"),Oe(Authentication,"isShareToken",!1),Oe(Authentication,"defaultDeviceId"),Oe(Authentication,"waitingForAuth",[]);function delay(e){return new Promise(t=>setTimeout(t,e))}class DataChannel{constructor(t){Oe(this,"ready",!1);Oe(this,"listeners",[]);Oe(this,"openListeners",[]);Oe(this,"closeListeners",[]);Oe(this,"errorListeners",[]);Oe(this,"binaryListeners",[]);Oe(this,"error");Oe(this,"decoder",new TextDecoder);this.dataChannel=t,this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=()=>{this.ready=!0,this.openListeners.forEach(n=>n())},this.dataChannel.onclose=()=>{this.ready=!1,this.closeListeners.forEach(n=>n())},this.dataChannel.onerror=n=>{console.error(n),this.error="An error occurred in DataChannel",this.errorListeners.forEach(r=>r(n))},this.dataChannel.onmessage=n=>{this.listeners.forEach(r=>{const i=new Uint8Array(n.data),s=this.decoder.decode(i);r(s)}),this.binaryListeners.forEach(r=>{r(new Uint8Array(n.data))})}}addOpenListener(t){this.openListeners.push(t)}removeOpenListener(t){this.openListeners=this.openListeners.filter(n=>n!==t)}addCloseListener(t){this.closeListeners.push(t)}removeCloseListener(t){this.closeListeners=this.closeListeners.filter(n=>n!==t)}addErrorListener(t){this.errorListeners.push(t)}removeErrorListener(t){this.errorListeners=this.errorListeners.filter(n=>n!==t)}async waitTilReady(){return this.ready?!0:new Promise((n,r)=>{let i=window.setInterval(()=>{this.ready&&(window.clearInterval(i),n(!0)),this.error&&r(this.error)},10)})}send(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}sendBinary(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);if(n===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.listeners.splice(n,1)}addBinaryListener(t){this.binaryListeners.push(t)}removeBinaryListener(t){const n=this.binaryListeners.indexOf(t);if(n===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.binaryListeners.splice(n,1)}}class CaptureStream{constructor(t){Oe(this,"token");this.captureSession=t}async ingestJSON(t){if(!this.token){const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions/${this.captureSession.code}/authenticate`,{method:"POST"})).json();this.token=r.token}await fetch(`${FORMANT_API_URL}/v1/ingest`,{method:"POST",body:JSON.stringify({deviceId:this.captureSession.deviceId,name:this.captureSession.streamName,type:"json",points:[[Date.now(),JSON.stringify(t)]]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+this.token}})}}class Manipulator{constructor(t,n){Oe(this,"currentListeners",[]);Oe(this,"onRealtimeMessage",(t,n)=>{n.payload.jointState&&this.currentListeners.forEach(r=>{n.payload.jointState&&r(n.payload.jointState)})});this.device=t,this.config=n}async synchronize(){this.device.addRealtimeListener(this.onRealtimeMessage),this.device.startListeningToRealtimeDataStream(this.config.currentJointStateStream)}async desynchronize(){this.device.removeRealtimeListener(this.onRealtimeMessage),this.device.stopListeningToRealtimeDataStream(this.config.currentJointStateStream)}async addCurrentJointStateListener(t){this.currentListeners.push(t)}}class RequestDataChannel{constructor(t,n,r){Oe(this,"channel");Oe(this,"requestIdToResponseMap",new Map);this.device=t,this.channel_name=n,this.timeout=r}addOpenListener(t){defined(this.channel,"channel not initalized").addOpenListener(t)}removeOpenListener(t){defined(this.channel,"channel not initalized").removeOpenListener(t)}addCloseListener(t){defined(this.channel,"channel not initalized").addCloseListener(t)}removeCloseListener(t){defined(this.channel,"channel not initalized").removeCloseListener(t)}addErrorListener(t){defined(this.channel,"channel not initalized").addErrorListener(t)}removeErrorListener(t){defined(this.channel,"channel not initalized").removeErrorListener(t)}}class BinaryRequestDataChannel extends RequestDataChannel{constructor(){super(...arguments);Oe(this,"RESPONSE_SUCCESS_BYTE",0);Oe(this,"decoder",new TextDecoder)}generateBinaryId(){const n=new Uint8Array(16);for(let r=0;r<n.length;r++)n[r]=Math.floor(Math.random()*256);return n}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addBinaryListener(n=>{const i=n.slice(0,16).toString();if(i.length===0)throw new Error("Invalid response");const s=n.slice(16);if(s.length===0)throw new Error("Invalid response");this.requestIdToResponseMap.has(i)&&this.requestIdToResponseMap.set(i,s)})}async request(n){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:r,requestIdToResponseMap:i,timeout:s}=this;await r.waitTilReady();const l=this.generateBinaryId(),o=l.toString();i.set(o,!0),r.sendBinary(new Uint8Array([...l,...n]));const c=new Date().getTime();for(;new Date().getTime()<c+s;)if(await delay(50),i.has(o)){const u=i.get(o);if(u!==!0){i.delete(o);const f=u[0]===this.RESPONSE_SUCCESS_BYTE,E=u.slice(1);if(f)return E;throw console.error({name:"AdapterError",message:this.decoder.decode(E)}),new Error("Binary request datachannel adapter error")}}throw i.delete(o),console.error({name:"TimeoutError",message:`Request timed out after ${s/1e3} seconds`}),new Error("Binary request data channel request timed out")}}class TextRequestDataChannel extends RequestDataChannel{generateTextId(){return Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2)}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addListener(t=>{const n=JSON.parse(t),{id:r,data:i,error:s}=n;if(!r)throw new Error("Invalid response");if(!i&&!s)throw new Error("Invalid response");this.requestIdToResponseMap.has(r)&&this.requestIdToResponseMap.set(r,n)})}async request(t){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:n,requestIdToResponseMap:r,timeout:i}=this;await n.waitTilReady();const s=this.generateTextId();r.set(s,!0),n.send(JSON.stringify({id:s,data:t}));const l=new Date().getTime();for(;new Date().getTime()<l+i;)if(await delay(50),r.has(s)){const o=r.get(s);if(o!==!0){r.delete(s);const{data:c,error:u}=o;if(c)return c;if(u)throw console.error({name:"AdapterError",message:u}),new Error("Text request datachannel adapter error")}}throw r.delete(s),console.error({name:"TimeoutError",message:`Request timed out after ${i/1e3} seconds`}),new Error("Text request datachannel request timed out")}}const urlParams$1=new URLSearchParams(window.location.search),rtcClientVersion=urlParams$1.get("rtc_client"),SessionType={Teleop:1,Observe:3};class Device{constructor(t,n,r){Oe(this,"rtcClient");Oe(this,"remoteDevicePeerId");Oe(this,"realtimeListeners",[]);Oe(this,"handleMessage",(t,n)=>{this.realtimeListeners.forEach(r=>r(t,n))});this.id=t,this.name=n,this.organizationId=r}async getLatestTelemetry(){return(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}async getConfiguration(){let t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});const n=await t.json();if(!n.state.reportedConfiguration)throw new Error("Device has no configuration, has it ever been turned on?");const r=n.state.reportedConfiguration.version;return t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}/configurations/${r}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),(await t.json()).document}async getFileUrl(t){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).fileUrls}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{let n;if(rtcClientVersion==="1"?n=new distExports.RtcClientV1({signalingClient:new distExports.RtcSignalingClient(FORMANT_API_URL+"/v1/signaling"),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage}):n=new distExports.RtcClient({signalingClient:new distExports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage,sessionType:t}),n.isReady)for(;!n.isReady();)await delay(100);const i=(await n.getPeers()).find(s=>s.deviceId===this.id);if(!i)throw new Error("Cannot find peer, is the robot offline?");for(this.remoteDevicePeerId=i.id,await n.connect(this.remoteDevicePeerId);n.getConnectionStatus(this.remoteDevicePeerId)!=="connected";)await delay(100);this.rtcClient=n}}async sendRealtimeMessage(t,n={channelLabel:"stream.reliable"}){const r=defined(this.rtcClient,"Realtime connection has not been started"),i=await this.getRemotePeer();r.send(defined(i).id,t,n)}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const n=this.realtimeListeners.indexOf(t);if(n===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(n,1)}async getRealtimeAudioStreams(){var r,i,s;const t=await this.getConfiguration(),n=[];for(const l of((r=t.teleop)==null?void 0:r.hardwareStreams)??[])l.rtcStreamType==="audio-chunk"&&n.push({name:l.name});for(const l of((i=t.teleop)==null?void 0:i.rosStreams)??[])l.topicType=="audio_common_msgs/AudioData"&&n.push({name:l.topicName});for(const l of((s=t.teleop)==null?void 0:s.customStreams)??[])l.rtcStreamType==="audio-chunk"&&n.push({name:l.name});return n}async getRealtimeVideoStreams(){var r,i,s;const t=await this.getConfiguration(),n=[];for(const l of((r=t.teleop)==null?void 0:r.hardwareStreams)??[])l.rtcStreamType==="h264-video-frame"&&n.push({name:l.name});for(const l of((i=t.teleop)==null?void 0:i.rosStreams)??[])l.topicType=="formant/H264VideoFrame"&&n.push({name:l.topicName});for(const l of((s=t.teleop)==null?void 0:s.customStreams)??[])l.rtcStreamType==="h264-video-frame"&&n.push({name:l.name});return n}async getRealtimeManipulators(){const t=await this.getConfiguration(),n=[];for(const r of t.teleop.rosStreams??[])r.topicType=="sensor_msgs/JointState"&&n.push(new Manipulator(this,{currentJointStateStream:{name:r.topicName},plannedJointStateStream:r.plannedTopic?{name:r.plannedTopic}:void 0,planValidStream:r.planValidTopic?{name:r.planValidTopic}:void 0,endEffectorStream:r.endEffectorTopic?{name:r.endEffectorTopic}:void 0,endEffectorLinkName:r.endEffectorLinkName,baseReferenceFrame:r.baseReferenceFrame,localFrame:r.localFrame}));return n}async startListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async changeStreamAudioType(t,n){const r=defined(this.rtcClient,"Realtime connection has not been started"),i=await this.getRemotePeer();r.controlRemoteStream(defined(i).id,{streamName:t,setAudioFormat:n})}async disableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){const n=(await defined(this.rtcClient,"Realtime connection has not been started").getPeers()).find(r=>r.deviceId===this.id);return defined(n,"Could not find remote peer for device "+this.id)}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async isInRealtimeSession(){let t=await Fleet.getPeers(),n=await Fleet.getRealtimeSessions(),r=t.find(i=>i.deviceId===this.id);return r?n[r.id].length>0:!1}async getAvailableCommands(){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/command-templates/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(r=>({name:r.name,id:r.id,command:r.command,description:r.description,parameterEnabled:r.parameterEnabled,parameterValue:r.parameterValue,parameterMeta:r.parameterMeta,enabled:r.enabled}))}async sendCommand(t,n,r,i){var u;const l=(await this.getAvailableCommands()).find(f=>f.name===t);if(!l)throw new Error(`Could not find command with name "${t}"`);let o="";n===void 0?l.parameterEnabled&&l.parameterValue&&(o=l.parameterValue):o=n;let c={value:o,scrubberTime:(r||new Date).toISOString(),meta:{...l.parameterMeta,...i}};await fetch(`${FORMANT_API_URL}/v1/admin/commands`,{method:"POST",body:JSON.stringify({commandTemplateId:l.id,organizationId:this.organizationId,deviceId:this.id,command:l.command,parameter:c,userId:(u=Authentication.currentUser)==null?void 0:u.id}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})}async createCustomDataChannel(t,n){if(rtcClientVersion==="1")throw new Error("createCustomDataChannel is not supported in rtcClientVersion 1");const r=defined(this.rtcClient,"Realtime connection has not been started"),i=await this.getRemotePeer(),s=await new Promise(l=>{r.createCustomDataChannel(defined(i).id,t,{ordered:!0,...n},!1,(o,c)=>{const u=new DataChannel(c);l(u)})});return await s.waitTilReady(),s}createCustomRequestDataChannel(t,n=3e3){return new TextRequestDataChannel(this,t,n)}createCustomBinaryRequestDataChannel(t,n=3e3){return new BinaryRequestDataChannel(this,t,n)}async createCaptureStream(t){const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions`,{method:"POST",body:JSON.stringify({deviceId:this.id,streamName:t,tags:{}}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return new CaptureStream(r)}async getTelemetry(t,n,r,i){return await Fleet.getTelemetry(this.id,t,n,r,i)}async getTelemetryStreams(){var o,c;const t=await this.getConfiguration(),n=await fetch(`${FORMANT_API_URL}/v1/queries/metadata/stream-names`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=[],i=[];return(c=(o=t.telemetry)==null?void 0:o.streams)==null||c.forEach(u=>{u.disabled!==!0&&r.push(u.name),u.onDemand===!0&&i.push(u.name)}),console.log(i),(await n.json()).items.filter(u=>!r.includes(u)).map(u=>({name:u,onDemand:i.includes(u)}))}async createInterventionRequest(t,n,r,i){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"POST",body:JSON.stringify({message:t,interventionType:n,time:new Date().toISOString(),deviceId:this.id,tags:i,data:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async addInterventionResponse(t,n,r){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-responses`,{method:"POST",body:JSON.stringify({interventionId:t,interventionType:n,data:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async getAnnotationCount(t,n){return await Fleet.getAnnotationCount({...t,deviceIds:[this.id]},n)}async getAnnotationCountByIntervals(t,n,r){return await Fleet.getAnnotationCountByIntervals({...t,deviceIds:[this.id]},n,r)}async eventsCounter(t,n,r,i,s){return await Fleet.eventsCounter(t,n,r,i,{...s,deviceIds:[this.id]})}async createShareLink(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/admin/shares`,{method:"POST",body:JSON.stringify({...t,deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}}class PeerDevice{constructor(t){Oe(this,"rtcClient");Oe(this,"remoteDevicePeerId");Oe(this,"realtimeListeners",[]);Oe(this,"id");Oe(this,"handleMessage",(t,n)=>{this.realtimeListeners.forEach(r=>r(t,n))});this.peerUrl=t}async getLatestTelemetry(){const n=await(await fetch(`${this.peerUrl}/telemetry`)).json();return Object.entries(n).map(([i,s])=>({deviceId:this.id,streamName:i,streamType:"json",currentValue:s,currentValueTime:s.timestamp,tags:{}}))}async getDeviceId(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.id}async getConfiguration(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.document}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const n=new distExports.RtcClient({lanOnlyMode:!0,receive:this.handleMessage,sessionType:t});for(await n.connectLan(this.peerUrl);n.getConnectionStatus(this.peerUrl)!=="connected";)await delay(100);this.rtcClient=n}}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const n=this.realtimeListeners.indexOf(t);if(n===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(n,1)}async getRealtimeVideoStreams(){const t=await this.getConfiguration(),n=[];for(const r of t.teleop.hardwareStreams??[])r.rtcStreamType==="h264-video-frame"&&n.push({name:r.name});for(const r of t.teleop.rosStreams??[])r.topicType=="formant/H264VideoFrame"&&n.push({name:r.topicName});for(const r of t.teleop.customStreams??[])r.rtcStreamType==="h264-video-frame"&&n.push({name:r.name});return n}async getRealtimeManipulators(){const t=await this.getConfiguration(),n=[];for(const r of t.teleop.rosStreams??[])r.topicType=="sensor_msgs/JointState"&&n.push(new Manipulator(this,{currentJointStateStream:{name:r.topicName},plannedJointStateStream:r.plannedTopic?{name:r.plannedTopic}:void 0,planValidStream:r.planValidTopic?{name:r.planValidTopic}:void 0,endEffectorStream:r.endEffectorTopic?{name:r.endEffectorTopic}:void 0,endEffectorLinkName:r.endEffectorLinkName,baseReferenceFrame:r.baseReferenceFrame,localFrame:r.localFrame}));return n}async startListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async disableRealtimeTelemetryPriorityIngestion(t){const n=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();n.controlRemoteStream(defined(r).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){return{id:this.peerUrl,organizationId:"",deviceId:this.id,capabilities:[],capabilitySet:{}}}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async createCustomDataChannel(t,n){const r=defined(this.rtcClient,"Realtime connection has not been started"),i=await this.getRemotePeer(),s=await new Promise(l=>{r.createCustomDataChannel(defined(i).id,t,{ordered:!0,...n},!1,(o,c)=>{const u=new DataChannel(c);l(u)})});return await s.waitTilReady(),s}createCustomRequestDataChannel(t,n=3e3){return new TextRequestDataChannel(this,t,n)}createCustomBinaryRequestDataChannel(t,n=3e3){return new BinaryRequestDataChannel(this,t,n)}}const Ve=class{static async setDefaultDevice(t){Ve.defaultDeviceId=t}static async getCurrentDevice(){if(!Authentication.token)throw new Error("Not authenticated");if(!Ve.defaultDeviceId)throw new Error("No known default device");const i=(await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.find(l=>l.id===Ve.defaultDeviceId).name,s=new Device(Ve.defaultDeviceId,i,defined(Authentication.currentOrganization));return Ve.knownContext.push(new WeakRef(s)),s}static async getPeerDevice(t){const n=new PeerDevice(t);return n.id=await n.getDeviceId(),n}static async getDevice(t){if(!Authentication.token)throw new Error("Not authenticated");const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json(),i=r.name,s=new Device(t,i,r.organizationId);return Ve.knownContext.push(new WeakRef(s)),s}static async getDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",body:JSON.stringify({enabled:!0,type:"default"}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return n.items,n.items.map(r=>new Device(r.id,r.name,r.organizationId))}static async queryDevices(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(i=>new Device(i.id,i.name,i.organizationId))}static async getOnlineDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=(await(await fetch(`${FORMANT_API_URL}/v1/queries/online-devices`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items;return(await Ve.getDevices()).filter(s=>r.includes(s.id))}static async getPeers(){if(!Authentication.token)throw new Error("Not authenticated");return await new distExports.RtcClient({signalingClient:new distExports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getPeers()}static async getRealtimeSessions(){if(!Authentication.token)throw new Error("Not authenticated");return await new distExports.RtcClient({signalingClient:new distExports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getSessions()}static async getRealtimeDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=(await(await fetch(`${FORMANT_API_URL}/v1/signaling/peers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(s=>s.deviceId);return(await Ve.getDevices()).filter(s=>r.includes(s.id))}static async getLatestTelemetry(t){let n=t;return t&&!Array.isArray(t)&&(t=[t]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getTelemetry(t,n,r,i,s){let l=t;Array.isArray(t)||(l=[t]);let o=n;return Array.isArray(n)||(o=[n]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify({deviceIds:l,end:i.toISOString(),names:o,start:r.toISOString(),tags:s}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getFileUrl(t){const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();if(r.fileUrls.length===0)throw new Error("File not found");return r.fileUrls[0]}static async queryTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async aggregateTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).aggregates}static async queryEvents(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getEvent(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query/id=${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getInterventions(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getCurrentGroup(){if(!Authentication.token)throw new Error("Not authenticated");let t=new URLSearchParams("");typeof window<"u"&&(t=new URLSearchParams(window.location.search));const n=t.get("group");if(n===null||n.trim()==="")return;const r=await fetch(`${FORMANT_API_URL}/v1/admin/groups/`+n,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),{tagKey:i,tagValue:s}=await r.json();return await this.queryDevices({tags:{[i]:[s]},enabled:!0,type:"default"})}static async getAnnotationCount(t,n){return(await this.queryEvents({...t,eventTypes:["annotation"]})).filter(l=>!!l.tags&&Object.keys(l.tags).includes(n)).reduce((l,o)=>{const c=o.tags[n];return c in l?(l[c]+=1,l):(l[c]=1,l)},{})}static async getAnnotationCountByIntervals(t,n,r){const{end:i,start:s}=t,o=aggregateByDateFunctions[r].interval({start:new Date(s),end:new Date(i)}),c=o.map((f,E)=>{const w=new Date(f).toISOString(),h=E===o.length-1?new Date(Date.now()).toISOString():new Date(o[E+1]);return this.getAnnotationCount({...t,start:w,end:h},n)}),u=await Promise.all(c);return o.map((f,E)=>({date:new Date(f).toISOString(),annotations:u[E]}))}static async getStreams(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/streams`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.filter(r=>r.enabled)}static async patchStream(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/admin/streams/${t.id}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async getViews(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/views`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async patchView(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/admin/views/${t.id}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async eventsCounter(t,n,r,i,s){const l=aggregateByDateFunctions[n];return await Promise.all(Array(r).fill(0).map(async(o,c)=>{const u=new Date(i),f=l.sub(l.start(u),r-c-1),E=l.sub(l.end(u),r-c-1),w=formatTimeFrameText(f.toLocaleDateString(),E.toLocaleDateString()),h=await Ve.queryEvents({...s,eventTypes:t,start:new Date(f).toISOString(),end:new Date(E).toISOString()});return{date:w,events:h}}))}static async getAnalyticsModules(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/analytics-modules`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getAnalyticStreams(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/analytics/streams`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getTaskReportTables(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/analytics/task-reports`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async queryAnalytics(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/queries/analytics`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async getAnalyticsRows(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/queries/analytics/rows`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async getTaskReportRows(t){if(!Authentication.token)throw new Error("Not authenticated");return await(await fetch(`${FORMANT_API_URL}/v1/queries/analytics/task-report-rows`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}static async createShareLink(t){if(!Authentication.token)throw new Error("Not authenticated");const n=await fetch(`${FORMANT_API_URL}/v1/admin/shares`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=FORMANT_API_URL.replace("api","app"),{code:i}=await n.json();return`${r}/shares/${i}/${serializeHash({module:"pause",speed:1,time:t.time})}`}};let Fleet=Ve;Oe(Fleet,"defaultDeviceId"),Oe(Fleet,"knownContext",[]);class KeyValue{static async set(t,n){try{const r=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"POST",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId,key:t,value:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),i=await r.json();if(r.status!==200)throw new Error(i.message)}catch(r){throw r}}static async get(t){try{const n=await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await n.json();if(n.status!==200)throw new Error(r.message);return r.value}catch(n){throw n}}static async list(){try{const t=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=await t.json();if(t.status!==200)throw new Error(n.message);return n.items}catch(t){throw t}}static async delete(t){try{if(!(await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).ok)throw new Error("Unable to handle request");return}catch(n){throw n}}}const vailableAggregationIntervals=["day","week","month","year","hour","minute","quarter"],aggregateFunctions=["interval","start","end","sub","get"];function getVariance(e){return e.count<2?0:e.sumOfSquares/(e.count-1)}function getStandardDeviation(e){return Math.sqrt(getVariance(e))}function getMax(e){return e.max}function getMin(e){return e.min}function getAverage(e){return e.count===0?-1:e.sum/e.count}function getSum(e){return e.sum}function getCount(e){return e.count}const aggregateFunctionMap={min:getMin,max:getMax,"standard deviation":getStandardDeviation,average:getAverage,sum:getSum,count:getCount},aggregateByDateFunctions={day:{interval:dateFns__namespace.eachDayOfInterval,start:dateFns__namespace.startOfDay,end:dateFns__namespace.endOfDay,sub:dateFns__namespace.subDays,get:dateFns__namespace.getDay},week:{interval:dateFns__namespace.eachWeekOfInterval,start:dateFns__namespace.startOfWeek,end:dateFns__namespace.endOfWeek,sub:dateFns__namespace.subWeeks,get:dateFns__namespace.getWeek},month:{interval:dateFns__namespace.eachMonthOfInterval,start:dateFns__namespace.startOfMonth,end:dateFns__namespace.endOfMonth,sub:dateFns__namespace.subMonths,get:dateFns__namespace.getMonth},year:{interval:dateFns__namespace.eachYearOfInterval,start:dateFns__namespace.startOfYear,end:dateFns__namespace.endOfYear,sub:dateFns__namespace.subYears,get:dateFns__namespace.getYear},hour:{interval:dateFns__namespace.eachHourOfInterval,start:dateFns__namespace.startOfHour,end:dateFns__namespace.endOfHour,sub:dateFns__namespace.subHours,get:dateFns__namespace.getHours},minute:{interval:dateFns__namespace.eachMinuteOfInterval,start:dateFns__namespace.startOfMinute,end:dateFns__namespace.endOfMinute,sub:dateFns__namespace.subMinutes,get:dateFns__namespace.getMinutes},quarter:{interval:dateFns__namespace.eachQuarterOfInterval,start:dateFns__namespace.startOfQuarter,end:dateFns__namespace.endOfQuarter,sub:dateFns__namespace.subQuarters,get:dateFns__namespace.getQuarter}},formatTimeFrameText=(e,t)=>e.split("/")[0]+"/"+e.split("/")[1]+"–"+t.split("/")[0]+"/"+t.split("/")[1];function getZeroINumericSet(){return{min:Number.MAX_SAFE_INTEGER,max:0,sum:0,count:0,sumOfSquares:0}}function reduceNumericStreamAggregates(e){return e.aggregates.reduce((t,n)=>{const r=n[1];return combineNumericAggregates(r,t)},getZeroINumericSet())}function reduceNumericSetStreamAggregates(e,t){var n;return(n=e.aggregates.reduce((r,i)=>{const s=i[1];return combineNumericSetAggregates(s,r)},{})[t])==null?void 0:n.value}function combineNumericAggregates(e,t){return{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max),sum:e.sum+t.sum,count:e.count+t.count,sumOfSquares:e.sumOfSquares+t.sumOfSquares}}function combineNumericSetAggregates(e,t){return Object.keys(e).reduce((n,r)=>{var i;return{...n,[r]:{value:combineNumericAggregates(e[r].value,((i=t[r])==null?void 0:i.value)??getZeroINumericSet()),unit:e[r].unit}}},{})}const timeout=e=>new Promise(t=>setTimeout(t,e*1e3));function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var cachedSetTimeout=defaultSetTimout,cachedClearTimeout=defaultClearTimeout;typeof global$1.setTimeout=="function"&&(cachedSetTimeout=setTimeout),typeof global$1.clearTimeout=="function"&&(cachedClearTimeout=clearTimeout);function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch{try{return cachedSetTimeout.call(null,e,0)}catch{return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch{try{return cachedClearTimeout.call(null,e)}catch{return cachedClearTimeout.call(this,e)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function nextTick(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];queue.push(new Item(e,t)),queue.length===1&&!draining&&runTimeout(drainQueue)}function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)};var title="browser",platform="browser",browser$1=!0,env={},argv=[],version="",versions={},release={},config={};function noop(){}var on=noop,addListener=noop,once=noop,off=noop,removeListener=noop,removeAllListeners=noop,emit=noop;function binding$1(e){throw new Error("process.binding is not supported")}function cwd(){return"/"}function chdir(e){throw new Error("process.chdir is not supported")}function umask(){return 0}var performance$1=global$1.performance||{},performanceNow=performance$1.now||performance$1.mozNow||performance$1.msNow||performance$1.oNow||performance$1.webkitNow||function(){return new Date().getTime()};function hrtime(e){var t=performanceNow.call(performance$1)*.001,n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n=n-e[0],r=r-e[1],r<0&&(n--,r+=1e9)),[n,r]}var startTime=new Date;function uptime(){var e=new Date,t=e-startTime;return t/1e3}var browser$1$1={nextTick,title,browser:browser$1,env,argv,version,versions,on,addListener,once,off,removeListener,removeAllListeners,emit,binding:binding$1,cwd,chdir,umask,hrtime,platform,release,config,uptime},domain;function EventHandlers(){}EventHandlers.prototype=Object.create(null);function EventEmitter(){EventEmitter.init.call(this)}EventEmitter.EventEmitter=EventEmitter,EventEmitter.usingDomains=!1,EventEmitter.prototype.domain=void 0,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.init=function(){this.domain=null,EventEmitter.usingDomains&&domain.active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new EventHandlers,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function e(t){if(typeof t!="number"||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this};function $getMaxListeners(e){return e._maxListeners===void 0?EventEmitter.defaultMaxListeners:e._maxListeners}EventEmitter.prototype.getMaxListeners=function e(){return $getMaxListeners(this)};function emitNone(e,t,n){if(t)e.call(n);else for(var r=e.length,i=arrayClone(e,r),s=0;s<r;++s)i[s].call(n)}function emitOne(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,s=arrayClone(e,i),l=0;l<i;++l)s[l].call(n,r)}function emitTwo(e,t,n,r,i){if(t)e.call(n,r,i);else for(var s=e.length,l=arrayClone(e,s),o=0;o<s;++o)l[o].call(n,r,i)}function emitThree(e,t,n,r,i,s){if(t)e.call(n,r,i,s);else for(var l=e.length,o=arrayClone(e,l),c=0;c<l;++c)o[c].call(n,r,i,s)}function emitMany(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,s=arrayClone(e,i),l=0;l<i;++l)s[l].apply(n,r)}EventEmitter.prototype.emit=function e(t){var n,r,i,s,l,o,c,u=t==="error";if(o=this._events,o)u=u&&o.error==null;else if(!u)return!1;if(c=this.domain,u){if(n=arguments[1],c)n||(n=new Error('Uncaught, unspecified "error" event')),n.domainEmitter=this,n.domain=c,n.domainThrown=!1,c.emit("error",n);else{if(n instanceof Error)throw n;var f=new Error('Uncaught, unspecified "error" event. ('+n+")");throw f.context=n,f}return!1}if(r=o[t],!r)return!1;var E=typeof r=="function";switch(i=arguments.length,i){case 1:emitNone(r,E,this);break;case 2:emitOne(r,E,this,arguments[1]);break;case 3:emitTwo(r,E,this,arguments[1],arguments[2]);break;case 4:emitThree(r,E,this,arguments[1],arguments[2],arguments[3]);break;default:for(s=new Array(i-1),l=1;l<i;l++)s[l-1]=arguments[l];emitMany(r,E,this,s)}return!0};function _addListener(e,t,n,r){var i,s,l;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(s=e._events,s?(s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),l=s[t]):(s=e._events=new EventHandlers,e._eventsCount=0),!l)l=s[t]=n,++e._eventsCount;else if(typeof l=="function"?l=s[t]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),!l.warned&&(i=$getMaxListeners(e),i&&i>0&&l.length>i)){l.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=t,o.count=l.length,emitWarning(o)}return e}function emitWarning(e){typeof console.warn=="function"?console.warn(e):console.log(e)}EventEmitter.prototype.addListener=function e(t,n){return _addListener(this,t,n,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function e(t,n){return _addListener(this,t,n,!0)};function _onceWrap(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}EventEmitter.prototype.once=function e(t,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,_onceWrap(this,t,n)),this},EventEmitter.prototype.prependOnceListener=function e(t,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,_onceWrap(this,t,n)),this},EventEmitter.prototype.removeListener=function e(t,n){var r,i,s,l,o;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(i=this._events,!i)return this;if(r=i[t],!r)return this;if(r===n||r.listener&&r.listener===n)--this._eventsCount===0?this._events=new EventHandlers:(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(s=-1,l=r.length;l-- >0;)if(r[l]===n||r[l].listener&&r[l].listener===n){o=r[l].listener,s=l;break}if(s<0)return this;if(r.length===1){if(r[0]=void 0,--this._eventsCount===0)return this._events=new EventHandlers,this;delete i[t]}else spliceOne(r,s);i.removeListener&&this.emit("removeListener",t,o||n)}return this},EventEmitter.prototype.removeAllListeners=function e(t){var n,r;if(r=this._events,!r)return this;if(!r.removeListener)return arguments.length===0?(this._events=new EventHandlers,this._eventsCount=0):r[t]&&(--this._eventsCount===0?this._events=new EventHandlers:delete r[t]),this;if(arguments.length===0){for(var i=Object.keys(r),s=0,l;s<i.length;++s)l=i[s],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=new EventHandlers,this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n)do this.removeListener(t,n[n.length-1]);while(n[0]);return this},EventEmitter.prototype.listeners=function e(t){var n,r,i=this._events;return i?(n=i[t],n?typeof n=="function"?r=[n.listener||n]:r=unwrapListeners(n):r=[]):r=[],r},EventEmitter.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):listenerCount$1.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount$1;function listenerCount$1(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}EventEmitter.prototype.eventNames=function e(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}function arrayClone(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function unwrapListeners(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}var inherits;typeof Object.create=="function"?inherits=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:inherits=function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t};const inherits$1=inherits;var formatRegExp=/%[sdj%]/g;function format(e){if(!isString(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(inspect(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,i=r.length,s=String(e).replace(formatRegExp,function(o){if(o==="%%")return"%";if(n>=i)return o;switch(o){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}default:return o}}),l=r[n];n<i;l=r[++n])isNull(l)||!isObject(l)?s+=" "+l:s+=" "+inspect(l);return s}function deprecate(e,t){if(isUndefined(global$1.process))return function(){return deprecate(e,t).apply(this,arguments)};if(browser$1$1.noDeprecation===!0)return e;var n=!1;function r(){if(!n){if(browser$1$1.throwDeprecation)throw new Error(t);browser$1$1.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}return r}var debugs={},debugEnviron;function debuglog(e){if(isUndefined(debugEnviron)&&(debugEnviron=browser$1$1.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var t=0;debugs[e]=function(){var n=format.apply(null,arguments);console.error("%s %d: %s",e,t,n)}}else debugs[e]=function(){};return debugs[e]}function inspect(e,t){var n={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),isBoolean(t)?n.showHidden=t:t&&_extend(n,t),isUndefined(n.showHidden)&&(n.showHidden=!1),isUndefined(n.depth)&&(n.depth=2),isUndefined(n.colors)&&(n.colors=!1),isUndefined(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=stylizeWithColor),formatValue(n,e,n.depth)}inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(e,t){var n=inspect.styles[t];return n?"\x1B["+inspect.colors[n][0]+"m"+e+"\x1B["+inspect.colors[n][1]+"m":e}function stylizeNoColor(e,t){return e}function arrayToHash(e){var t={};return e.forEach(function(n,r){t[n]=!0}),t}function formatValue(e,t,n){if(e.customInspect&&t&&isFunction(t.inspect)&&t.inspect!==inspect&&!(t.constructor&&t.constructor.prototype===t)){var r=t.inspect(n,e);return isString(r)||(r=formatValue(e,r,n)),r}var i=formatPrimitive(e,t);if(i)return i;var s=Object.keys(t),l=arrayToHash(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),isError(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return formatError(t);if(s.length===0){if(isFunction(t)){var o=t.name?": "+t.name:"";return e.stylize("[Function"+o+"]","special")}if(isRegExp(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(isDate(t))return e.stylize(Date.prototype.toString.call(t),"date");if(isError(t))return formatError(t)}var c="",u=!1,f=["{","}"];if(isArray(t)&&(u=!0,f=["[","]"]),isFunction(t)){var E=t.name?": "+t.name:"";c=" [Function"+E+"]"}if(isRegExp(t)&&(c=" "+RegExp.prototype.toString.call(t)),isDate(t)&&(c=" "+Date.prototype.toUTCString.call(t)),isError(t)&&(c=" "+formatError(t)),s.length===0&&(!u||t.length==0))return f[0]+c+f[1];if(n<0)return isRegExp(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var w;return u?w=formatArray(e,t,n,l,s):w=s.map(function(h){return formatProperty(e,t,n,l,h,u)}),e.seen.pop(),reduceToSingleString(w,c,f)}function formatPrimitive(e,t){if(isUndefined(t))return e.stylize("undefined","undefined");if(isString(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(isNumber(t))return e.stylize(""+t,"number");if(isBoolean(t))return e.stylize(""+t,"boolean");if(isNull(t))return e.stylize("null","null")}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,t,n,r,i){for(var s=[],l=0,o=t.length;l<o;++l)hasOwnProperty(t,String(l))?s.push(formatProperty(e,t,n,r,String(l),!0)):s.push("");return i.forEach(function(c){c.match(/^\d+$/)||s.push(formatProperty(e,t,n,r,c,!0))}),s}function formatProperty(e,t,n,r,i,s){var l,o,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?c.set?o=e.stylize("[Getter/Setter]","special"):o=e.stylize("[Getter]","special"):c.set&&(o=e.stylize("[Setter]","special")),hasOwnProperty(r,i)||(l="["+i+"]"),o||(e.seen.indexOf(c.value)<0?(isNull(n)?o=formatValue(e,c.value,null):o=formatValue(e,c.value,n-1),o.indexOf(`
50
+ `)>-1&&(s?o=o.split(`
51
+ `).map(function(u){return" "+u}).join(`
52
+ `).substr(2):o=`
53
+ `+o.split(`
54
+ `).map(function(u){return" "+u}).join(`
55
+ `))):o=e.stylize("[Circular]","special")),isUndefined(l)){if(s&&i.match(/^\d+$/))return o;l=JSON.stringify(""+i),l.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=e.stylize(l,"name")):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=e.stylize(l,"string"))}return l+": "+o}function reduceToSingleString(e,t,n){var r=e.reduce(function(i,s){return s.indexOf(`
56
+ `)>=0,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return r>60?n[0]+(t===""?"":t+`
57
+ `)+" "+e.join(`,
58
+ `)+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return typeof e=="boolean"}function isNull(e){return e===null}function isNumber(e){return typeof e=="number"}function isString(e){return typeof e=="string"}function isUndefined(e){return e===void 0}function isRegExp(e){return isObject(e)&&objectToString(e)==="[object RegExp]"}function isObject(e){return typeof e=="object"&&e!==null}function isDate(e){return isObject(e)&&objectToString(e)==="[object Date]"}function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}function isFunction(e){return typeof e=="function"}function objectToString(e){return Object.prototype.toString.call(e)}function _extend(e,t){if(!t||!isObject(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function BufferList(){this.head=null,this.tail=null,this.length=0}BufferList.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},BufferList.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},BufferList.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(e){if(this.length===0)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},BufferList.prototype.concat=function(e){if(this.length===0)return Buffer.alloc(0);if(this.length===1)return this.head.data;for(var t=Buffer.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var isBufferEncoding=Buffer.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function assertEncoding(e){if(e&&!isBufferEncoding(e))throw new Error("Unknown encoding: "+e)}function StringDecoder(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0}StringDecoder.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(i>=55296&&i<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived),t+=e.toString(this.encoding,0,r);var r=t.length-1,i=t.charCodeAt(r);if(i>=55296&&i<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,r)}return t},StringDecoder.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(t==1&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},StringDecoder.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t};function passThroughWrite(e){return e.toString(this.encoding)}function utf16DetectIncompleteChar(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Readable.ReadableState=ReadableState;var debug=debuglog("stream");inherits$1(Readable,EventEmitter);function prependListener(e,t,n){if(typeof e.prependListener=="function")return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function listenerCount(e,t){return e.listeners(t).length}function ReadableState(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),EventEmitter.call(this)}Readable.prototype.push=function(e,t){var n=this._readableState;return!n.objectMode&&typeof e=="string"&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=Buffer.from(e,t),t="")),readableAddChunk(this,n,e,t,!1)},Readable.prototype.unshift=function(e){var t=this._readableState;return readableAddChunk(this,t,e,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};function readableAddChunk(e,t,n,r,i){var s=chunkInvalid(t,n);if(s)e.emit("error",s);else if(n===null)t.reading=!1,onEofChunk(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var l=new Error("stream.push() after EOF");e.emit("error",l)}else if(t.endEmitted&&i){var o=new Error("stream.unshift() after end event");e.emit("error",o)}else{var c;t.decoder&&!i&&!r&&(n=t.decoder.write(n),c=!t.objectMode&&n.length===0),i||(t.reading=!1),c||(t.flowing&&t.length===0&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&emitReadable(e))),maybeReadMore(e,t)}else i||(t.reading=!1);return needMoreData(t)}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Readable.prototype.setEncoding=function(e){return this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e,this};var MAX_HWM=8388608;function computeNewHighWaterMark(e){return e>=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Readable.prototype.read=function(e){debug("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?endReadable(this):emitReadable(this),null;if(e=howMuchToRead(e,t),e===0&&t.ended)return t.length===0&&endReadable(this),null;var r=t.needReadable;debug("need readable",r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,debug("length less than watermark",r)),t.ended||t.reading?(r=!1,debug("reading or ended",r)):r&&(debug("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(n,t)));var i;return e>0?i=fromList(e,t):i=null,i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&endReadable(this)),i!==null&&this.emit("data",i),i};function chunkInvalid(e,t){var n=null;return!Buffer.isBuffer(t)&&typeof t!="string"&&t!==null&&t!==void 0&&!e.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n}function onEofChunk(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,emitReadable(e)}}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?nextTick(emitReadable_,e):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,nextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(debug("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}Readable.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e);break}r.pipesCount+=1,debug("pipe count=%d opts=%j",r.pipesCount,t);var i=!t||t.end!==!1,s=i?o:f;r.endEmitted?nextTick(s):n.once("end",s),e.on("unpipe",l);function l(x){debug("onunpipe"),x===n&&f()}function o(){debug("onend"),e.end()}var c=pipeOnDrain(n);e.on("drain",c);var u=!1;function f(){debug("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",l),n.removeListener("end",o),n.removeListener("end",f),n.removeListener("data",w),u=!0,r.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}var E=!1;n.on("data",w);function w(x){debug("ondata"),E=!1;var F=e.write(x);F===!1&&!E&&((r.pipesCount===1&&r.pipes===e||r.pipesCount>1&&indexOf(r.pipes,e)!==-1)&&!u&&(debug("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,E=!0),n.pause())}function h(x){debug("onerror",x),R(),e.removeListener("error",h),listenerCount(e,"error")===0&&e.emit("error",x)}prependListener(e,"error",h);function g(){e.removeListener("finish",b),R()}e.once("close",g);function b(){debug("onfinish"),e.removeListener("close",g),R()}e.once("finish",b);function R(){debug("unpipe"),n.unpipe(e)}return e.emit("pipe",n),r.flowing||(debug("pipe resume"),n.resume()),e};function pipeOnDrain(e){return function(){var t=e._readableState;debug("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&e.listeners("data").length&&(t.flowing=!0,flow(e))}}Readable.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var s=indexOf(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},Readable.prototype.on=function(e,t){var n=EventEmitter.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var r=this._readableState;!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&emitReadable(this):nextTick(nReadingNextTick,this))}return n},Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(e){debug("readable nexttick read 0"),e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!0,resume(this,e)),this};function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,nextTick(resume_,e,t))}function resume_(e,t){t.reading||(debug("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),flow(e),t.flowing&&!t.reading&&e.read(0)}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(e){var t=e._readableState;for(debug("flow",t.flowing);t.flowing&&e.read()!==null;);}Readable.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(debug("wrapped end"),t.decoder&&!t.ended){var l=t.decoder.end();l&&l.length&&r.push(l)}r.push(null)}),e.on("data",function(l){if(debug("wrapped data"),t.decoder&&(l=t.decoder.write(l)),!(t.objectMode&&l==null)&&!(!t.objectMode&&(!l||!l.length))){var o=r.push(l);o||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(l){return function(){return e[l].apply(e,arguments)}}(i));var s=["error","close","destroy","pause","resume"];return forEach(s,function(l){e.on(l,r.emit.bind(r,l))}),r._read=function(l){debug("wrapped _read",l),n&&(n=!1,e.resume())},r},Readable._fromList=fromList;function fromList(e,t){if(t.length===0)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(t.decoder?n=t.buffer.join(""):t.buffer.length===1?n=t.buffer.head.data:n=t.buffer.concat(t.length),t.buffer.clear()):n=fromListPartial(e,t.buffer,t.decoder),n}function fromListPartial(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?r=t.shift():r=n?copyFromBufferString(e,t):copyFromBuffer(e,t),r}function copyFromBufferString(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var s=n.data,l=e>s.length?s.length:e;if(l===s.length?i+=s:i+=s.slice(0,e),e-=l,e===0){l===s.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(l));break}++r}return t.length-=r,i}function copyFromBuffer(e,t){var n=Buffer.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var s=r.data,l=e>s.length?s.length:e;if(s.copy(n,n.length-e,0,l),e-=l,e===0){l===s.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(l));break}++i}return t.length-=i,n}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,nextTick(endReadableNT,t,e))}function endReadableNT(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function forEach(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function indexOf(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Writable.WritableState=WritableState,inherits$1(Writable,EventEmitter);function nop(){}function WriteReq(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function WritableState(e,t){Object.defineProperty(this,"buffer",{get:deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){onwrite(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n};function Writable(e){if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(e);this._writableState=new WritableState(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev)),EventEmitter.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var n=new Error("write after end");e.emit("error",n),nextTick(t,n)}function validChunk(e,t,n,r){var i=!0,s=!1;return n===null?s=new TypeError("May not write null values to stream"):!Buffer.isBuffer(n)&&typeof n!="string"&&n!==void 0&&!t.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),nextTick(r,s),i=!1),i}Writable.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return typeof t=="function"&&(n=t,t=null),Buffer.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),typeof n!="function"&&(n=nop),r.ended?writeAfterEnd(this,n):validChunk(this,r,e,n)&&(r.pendingcb++,i=writeOrBuffer(this,r,e,t,n)),i},Writable.prototype.cork=function(){var e=this._writableState;e.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function e(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function decodeChunk(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Buffer.from(t,n)),t}function writeOrBuffer(e,t,n,r,i){n=decodeChunk(t,n,r),Buffer.isBuffer(n)&&(r="buffer");var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var o=t.lastBufferedRequest;t.lastBufferedRequest=new WriteReq(n,r,i),o?o.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,s,n,r,i);return l}function doWrite(e,t,n,r,i,s,l){t.writelen=r,t.writecb=l,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function onwriteError(e,t,n,r,i){--t.pendingcb,n?nextTick(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(onwriteStateUpdate(n),t)onwriteError(e,n,r,t,i);else{var s=needFinish(n);!s&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&clearBuffer(e,n),r?nextTick(afterWrite,e,n,s,i):afterWrite(e,n,s,i)}}function afterWrite(e,t,n,r){n||onwriteDrain(e,t),t.pendingcb--,r(),finishMaybe(e,t)}function onwriteDrain(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),s=t.corkedRequestsFree;s.entry=n;for(var l=0;n;)i[l]=n,n=n.next,l+=1;doWrite(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new CorkedRequest(t)}else{for(;n;){var o=n.chunk,c=n.encoding,u=n.callback,f=t.objectMode?1:o.length;if(doWrite(e,t,!1,f,o,c,u),n=n.next,t.writing)break}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}Writable.prototype._write=function(e,t,n){n(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,n){var r=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),!r.ending&&!r.finished&&endWritable(this,r,n)};function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function prefinish(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function finishMaybe(e,t){var n=needFinish(t);return n&&(t.pendingcb===0?(prefinish(e,t),t.finished=!0,e.emit("finish")):prefinish(e,t)),n}function endWritable(e,t,n){t.ending=!0,finishMaybe(e,t),n&&(t.finished?nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}inherits$1(Duplex,Readable);for(var keys=Object.keys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);Readable.call(this,e),Writable.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||nextTick(onEndNT,this)}function onEndNT(e){e.end()}inherits$1(Transform,Duplex);function TransformState(e){this.afterTransform=function(t,n){return afterTransform(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,n!=null&&e.push(n),i(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}function Transform(e){if(!(this instanceof Transform))return new Transform(e);Duplex.call(this,e),this._transformState=new TransformState(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(n){done(t,n)}):done(t)})}Transform.prototype.push=function(e,t){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,e,t)},Transform.prototype._transform=function(e,t,n){throw new Error("Not implemented")},Transform.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Transform.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};function done(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}inherits$1(PassThrough,Transform);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);Transform.call(this,e)}PassThrough.prototype._transform=function(e,t,n){n(null,e)},inherits$1(Stream,EventEmitter),Stream.Readable=Readable,Stream.Writable=Writable,Stream.Duplex=Duplex,Stream.Transform=Transform,Stream.PassThrough=PassThrough,Stream.Stream=Stream;function Stream(){EventEmitter.call(this)}Stream.prototype.pipe=function(e,t){var n=this;function r(f){e.writable&&e.write(f)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",l),n.on("close",o));var s=!1;function l(){s||(s=!0,e.end())}function o(){s||(s=!0,typeof e.destroy=="function"&&e.destroy())}function c(f){if(u(),EventEmitter.listenerCount(this,"error")===0)throw f}n.on("error",c),e.on("error",c);function u(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",l),n.removeListener("close",o),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e};const msg={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function arraySet(e,t,n,r,i){if(t.subarray&&e.subarray){e.set(t.subarray(n,n+r),i);return}for(var s=0;s<r;s++)e[i+s]=t[n+s]}var Buf8=Uint8Array,Buf16=Uint16Array,Buf32=Int32Array,Z_FIXED$2=4,Z_BINARY$1=0,Z_TEXT$1=1,Z_UNKNOWN$2=2;function zero$1(e){for(var t=e.length;--t>=0;)e[t]=0}var STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);var static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);var _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);var base_length=new Array(LENGTH_CODES$1);zero$1(base_length);var base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function d_code(e){return e<256?_dist_code[e]:_dist_code[256+(e>>>7)]}function put_short(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function send_bits(e,t,n){e.bi_valid>Buf_size-n?(e.bi_buf|=t<<e.bi_valid&65535,put_short(e,e.bi_buf),e.bi_buf=t>>Buf_size-e.bi_valid,e.bi_valid+=n-Buf_size):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function send_code(e,t,n){send_bits(e,n[t*2],n[t*2+1])}function bi_reverse(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function bi_flush(e){e.bi_valid===16?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function gen_bitlen(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length,u,f,E,w,h,g,b=0;for(w=0;w<=MAX_BITS$1;w++)e.bl_count[w]=0;for(n[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<HEAP_SIZE$1;u++)f=e.heap[u],w=n[n[f*2+1]*2+1]+1,w>c&&(w=c,b++),n[f*2+1]=w,!(f>r)&&(e.bl_count[w]++,h=0,f>=o&&(h=l[f-o]),g=n[f*2],e.opt_len+=g*(w+h),s&&(e.static_len+=g*(i[f*2+1]+h)));if(b!==0){do{for(w=c-1;e.bl_count[w]===0;)w--;e.bl_count[w]--,e.bl_count[w+1]+=2,e.bl_count[c]--,b-=2}while(b>0);for(w=c;w!==0;w--)for(f=e.bl_count[w];f!==0;)E=e.heap[--u],!(E>r)&&(n[E*2+1]!==w&&(e.opt_len+=(w-n[E*2+1])*n[E*2],n[E*2+1]=w),f--)}}function gen_codes(e,t,n){var r=new Array(MAX_BITS$1+1),i=0,s,l;for(s=1;s<=MAX_BITS$1;s++)r[s]=i=i+n[s-1]<<1;for(l=0;l<=t;l++){var o=e[l*2+1];o!==0&&(e[l*2]=bi_reverse(r[o]++,o))}}function tr_static_init(){var e,t,n,r,i,s=new Array(MAX_BITS$1+1);for(n=0,r=0;r<LENGTH_CODES$1-1;r++)for(base_length[r]=n,e=0;e<1<<extra_lbits[r];e++)_length_code[n++]=r;for(_length_code[n-1]=r,i=0,r=0;r<16;r++)for(base_dist[r]=i,e=0;e<1<<extra_dbits[r];e++)_dist_code[i++]=r;for(i>>=7;r<D_CODES$1;r++)for(base_dist[r]=i<<7,e=0;e<1<<extra_dbits[r]-7;e++)_dist_code[256+i++]=r;for(t=0;t<=MAX_BITS$1;t++)s[t]=0;for(e=0;e<=143;)static_ltree[e*2+1]=8,e++,s[8]++;for(;e<=255;)static_ltree[e*2+1]=9,e++,s[9]++;for(;e<=279;)static_ltree[e*2+1]=7,e++,s[7]++;for(;e<=287;)static_ltree[e*2+1]=8,e++,s[8]++;for(gen_codes(static_ltree,L_CODES$1+1,s),e=0;e<D_CODES$1;e++)static_dtree[e*2+1]=5,static_dtree[e*2]=bi_reverse(e,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)}function init_block(e){var t;for(t=0;t<L_CODES$1;t++)e.dyn_ltree[t*2]=0;for(t=0;t<D_CODES$1;t++)e.dyn_dtree[t*2]=0;for(t=0;t<BL_CODES$1;t++)e.bl_tree[t*2]=0;e.dyn_ltree[END_BLOCK*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function bi_windup(e){e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function copy_block(e,t,n,r){bi_windup(e),r&&(put_short(e,n),put_short(e,~n)),arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function smaller(e,t,n,r){var i=t*2,s=n*2;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]}function pqdownheap(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&smaller(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!smaller(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function compress_block(e,t,n){var r,i,s=0,l,o;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+s*2]<<8|e.pending_buf[e.d_buf+s*2+1],i=e.pending_buf[e.l_buf+s],s++,r===0?send_code(e,i,t):(l=_length_code[i],send_code(e,l+LITERALS$1+1,t),o=extra_lbits[l],o!==0&&(i-=base_length[l],send_bits(e,i,o)),r--,l=d_code(r),send_code(e,l,n),o=extra_dbits[l],o!==0&&(r-=base_dist[l],send_bits(e,r,o)));while(s<e.last_lit);send_code(e,END_BLOCK,t)}function build_tree(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems,l,o,c=-1,u;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,l=0;l<s;l++)n[l*2]!==0?(e.heap[++e.heap_len]=c=l,e.depth[l]=0):n[l*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=c<2?++c:0,n[u*2]=1,e.depth[u]=0,e.opt_len--,i&&(e.static_len-=r[u*2+1]);for(t.max_code=c,l=e.heap_len>>1;l>=1;l--)pqdownheap(e,n,l);u=s;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,n,1),o=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=o,n[u*2]=n[l*2]+n[o*2],e.depth[u]=(e.depth[l]>=e.depth[o]?e.depth[l]:e.depth[o])+1,n[l*2+1]=n[o*2+1]=u,e.heap[1]=u++,pqdownheap(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,t),gen_codes(n,c,e.bl_count)}function scan_tree(e,t,n){var r,i=-1,s,l=t[0*2+1],o=0,c=7,u=4;for(l===0&&(c=138,u=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)s=l,l=t[(r+1)*2+1],!(++o<c&&s===l)&&(o<u?e.bl_tree[s*2]+=o:s!==0?(s!==i&&e.bl_tree[s*2]++,e.bl_tree[REP_3_6*2]++):o<=10?e.bl_tree[REPZ_3_10*2]++:e.bl_tree[REPZ_11_138*2]++,o=0,i=s,l===0?(c=138,u=3):s===l?(c=6,u=3):(c=7,u=4))}function send_tree(e,t,n){var r,i=-1,s,l=t[0*2+1],o=0,c=7,u=4;for(l===0&&(c=138,u=3),r=0;r<=n;r++)if(s=l,l=t[(r+1)*2+1],!(++o<c&&s===l)){if(o<u)do send_code(e,s,e.bl_tree);while(--o!==0);else s!==0?(s!==i&&(send_code(e,s,e.bl_tree),o--),send_code(e,REP_3_6,e.bl_tree),send_bits(e,o-3,2)):o<=10?(send_code(e,REPZ_3_10,e.bl_tree),send_bits(e,o-3,3)):(send_code(e,REPZ_11_138,e.bl_tree),send_bits(e,o-11,7));o=0,i=s,l===0?(c=138,u=3):s===l?(c=6,u=3):(c=7,u=4)}}function build_bl_tree(e){var t;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),t=BL_CODES$1-1;t>=3&&e.bl_tree[bl_order[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function send_all_trees(e,t,n,r){var i;for(send_bits(e,t-257,5),send_bits(e,n-1,5),send_bits(e,r-4,4),i=0;i<r;i++)send_bits(e,e.bl_tree[bl_order[i]*2+1],3);send_tree(e,e.dyn_ltree,t-1),send_tree(e,e.dyn_dtree,n-1)}function detect_data_type(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return Z_BINARY$1;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Z_TEXT$1;for(n=32;n<LITERALS$1;n++)if(e.dyn_ltree[n*2]!==0)return Z_TEXT$1;return Z_BINARY$1}var static_init_done=!1;function _tr_init(e){static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)}function _tr_stored_block(e,t,n,r){send_bits(e,(STORED_BLOCK<<1)+(r?1:0),3),copy_block(e,t,n,!0)}function _tr_align(e){send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)}function _tr_flush_block(e,t,n,r){var i,s,l=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$2&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),l=build_bl_tree(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&t!==-1?_tr_stored_block(e,t,n,r):e.strategy===Z_FIXED$2||s===i?(send_bits(e,(STATIC_TREES<<1)+(r?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(r?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),r&&bi_windup(e)}function _tr_tally(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(_length_code[n]+LITERALS$1+1)*2]++,e.dyn_dtree[d_code(t)*2]++),e.last_lit===e.lit_bufsize-1}function adler32(e,t,n,r){for(var i=e&65535|0,s=e>>>16&65535|0,l=0;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,s=s+i|0;while(--l);i%=65521,s%=65521}return i|s<<16|0}function makeTable(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var crcTable=makeTable();function crc32(e,t,n,r){var i=crcTable,s=r+n;e^=-1;for(var l=r;l<s;l++)e=e>>>8^i[(e^t[l])&255];return e^-1}var Z_NO_FLUSH$1=0,Z_PARTIAL_FLUSH$1=1,Z_FULL_FLUSH$1=3,Z_FINISH$2=4,Z_BLOCK$2=5,Z_OK$2=0,Z_STREAM_END$2=1,Z_STREAM_ERROR$2=-2,Z_DATA_ERROR$2=-3,Z_BUF_ERROR$2=-5,Z_DEFAULT_COMPRESSION$1=-1,Z_FILTERED$1=1,Z_HUFFMAN_ONLY$1=2,Z_RLE$1=3,Z_FIXED$1=4,Z_UNKNOWN$1=2,Z_DEFLATED$2=8,MAX_MEM_LEVEL=9,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3;function err(e,t){return e.msg=msg[t],t}function rank(e){return(e<<1)-(e>4?9:0)}function zero(e){for(var t=e.length;--t>=0;)e[t]=0}function flush_pending(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function flush_block_only(e,t){_tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,flush_pending(e.strm)}function put_byte(e,t){e.pending_buf[e.pending++]=t}function putShortMSB(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function read_buf(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=adler32(e.adler,t,i,n):e.state.wrap===2&&(e.adler=crc32(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function longest_match(e,t){var n=e.max_chain_length,r=e.strstart,i,s,l=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,u=e.window,f=e.w_mask,E=e.prev,w=e.strstart+MAX_MATCH,h=u[r+l-1],g=u[r+l];e.prev_length>=e.good_match&&(n>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(u[i+l]!==g||u[i+l-1]!==h||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<w);if(s=MAX_MATCH-(w-r),r=w-MAX_MATCH,s>l){if(e.match_start=t,l=s,s>=o)break;h=u[r+l-1],g=u[r+l]}}while((t=E[t&f])>c&&--n!==0);return l<=e.lookahead?l:e.lookahead}function fill_window(e){var t=e.w_size,n,r,i,s,l;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-MIN_LOOKAHEAD)){arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);s+=t}if(e.strm.avail_in===0)break;if(r=read_buf(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=r,e.lookahead+e.insert>=MIN_MATCH)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+MIN_MATCH-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<MIN_MATCH)););}while(e.lookahead<MIN_LOOKAHEAD&&e.strm.avail_in!==0)}function deflate_stored(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(fill_window(e),e.lookahead===0&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,flush_block_only(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-MIN_LOOKAHEAD&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):(e.strstart>e.block_start&&(flush_block_only(e,!1),e.strm.avail_out===0),BS_NEED_MORE)}function deflate_fast(e,t){for(var n,r;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(e.lookahead===0)break}if(n=0,e.lookahead>=MIN_MATCH&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,n)),e.match_length>=MIN_MATCH)if(r=_tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$2?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_slow(e,t){for(var n,r,i;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(e.lookahead===0)break}if(n=0,e.lookahead>=MIN_MATCH&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,n),e.match_length<=5&&(e.strategy===Z_FILTERED$1||e.match_length===MIN_MATCH&&e.strstart-e.match_start>4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-MIN_MATCH,r=_tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,r&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}else if(e.match_available){if(r=_tr_tally(e,0,e.window[e.strstart-1]),r&&flush_block_only(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=_tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$2?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_rle(e,t){for(var n,r,i,s,l=e.window;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(i=e.strstart-1,r=l[i],r===l[++i]&&r===l[++i]&&r===l[++i])){s=e.strstart+MAX_MATCH;do;while(r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&i<s);e.match_length=MAX_MATCH-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(n=_tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_huff(e,t){for(var n;;){if(e.lookahead===0&&(fill_window(e),e.lookahead===0)){if(t===Z_NO_FLUSH$1)return BS_NEED_MORE;break}if(e.match_length=0,n=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE}function Config(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var configuration_table;configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(e){e.window_size=2*e.w_size,zero(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0}function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Buf16(HEAP_SIZE*2),this.dyn_dtree=new Buf16((2*D_CODES+1)*2),this.bl_tree=new Buf16((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Buf16(MAX_BITS+1),this.heap=new Buf16(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Buf16(2*L_CODES+1),zero(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function deflateResetKeep(e){var t;return!e||!e.state?err(e,Z_STREAM_ERROR$2):(e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN$1,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?INIT_STATE:BUSY_STATE,e.adler=t.wrap===2?0:1,t.last_flush=Z_NO_FLUSH$1,_tr_init(t),Z_OK$2)}function deflateReset(e){var t=deflateResetKeep(e);return t===Z_OK$2&&lm_init(e.state),t}function deflateInit2(e,t,n,r,i,s){if(!e)return Z_STREAM_ERROR$2;var l=1;if(t===Z_DEFAULT_COMPRESSION$1&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>MAX_MEM_LEVEL||n!==Z_DEFLATED$2||r<8||r>15||t<0||t>9||s<0||s>Z_FIXED$1)return err(e,Z_STREAM_ERROR$2);r===8&&(r=9);var o=new DeflateState;return e.state=o,o.strm=e,o.wrap=l,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+MIN_MATCH-1)/MIN_MATCH),o.window=new Buf8(o.w_size*2),o.head=new Buf16(o.hash_size),o.prev=new Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=(1+2)*o.lit_bufsize,o.level=t,o.strategy=s,o.method=n,deflateReset(e)}function deflate(e,t){var n,r,i,s;if(!e||!e.state||t>Z_BLOCK$2||t<0)return e?err(e,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===FINISH_STATE&&t!==Z_FINISH$2)return err(e,e.avail_out===0?Z_BUF_ERROR$2:Z_STREAM_ERROR$2);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===INIT_STATE)if(r.wrap===2)e.adler=0,put_byte(r,31),put_byte(r,139),put_byte(r,8),r.gzhead?(put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),put_byte(r,r.gzhead.time&255),put_byte(r,r.gzhead.time>>8&255),put_byte(r,r.gzhead.time>>16&255),put_byte(r,r.gzhead.time>>24&255),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY$1||r.level<2?4:0),put_byte(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(put_byte(r,r.gzhead.extra.length&255),put_byte(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=crc32(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=EXTRA_STATE):(put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY$1||r.level<2?4:0),put_byte(r,OS_CODE),r.status=BUSY_STATE);else{var l=Z_DEFLATED$2+(r.w_bits-8<<4)<<8,o=-1;r.strategy>=Z_HUFFMAN_ONLY$1||r.level<2?o=0:r.level<6?o=1:r.level===6?o=2:o=3,l|=o<<6,r.strstart!==0&&(l|=PRESET_DICT),l+=31-l%31,r.status=BUSY_STATE,putShortMSB(r,l),r.strstart!==0&&(putShortMSB(r,e.adler>>>16),putShortMSB(r,e.adler&65535)),e.adler=1}if(r.status===EXTRA_STATE)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32(e.adler,r.pending_buf,r.pending-i,i)),flush_pending(e),i=r.pending,r.pending===r.pending_buf_size));)put_byte(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=NAME_STATE)}else r.status=NAME_STATE;if(r.status===NAME_STATE)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32(e.adler,r.pending_buf,r.pending-i,i)),flush_pending(e),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}r.gzindex<r.gzhead.name.length?s=r.gzhead.name.charCodeAt(r.gzindex++)&255:s=0,put_byte(r,s)}while(s!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32(e.adler,r.pending_buf,r.pending-i,i)),s===0&&(r.gzindex=0,r.status=COMMENT_STATE)}else r.status=COMMENT_STATE;if(r.status===COMMENT_STATE)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32(e.adler,r.pending_buf,r.pending-i,i)),flush_pending(e),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}r.gzindex<r.gzhead.comment.length?s=r.gzhead.comment.charCodeAt(r.gzindex++)&255:s=0,put_byte(r,s)}while(s!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32(e.adler,r.pending_buf,r.pending-i,i)),s===0&&(r.status=HCRC_STATE)}else r.status=HCRC_STATE;if(r.status===HCRC_STATE&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&flush_pending(e),r.pending+2<=r.pending_buf_size&&(put_byte(r,e.adler&255),put_byte(r,e.adler>>8&255),e.adler=0,r.status=BUSY_STATE)):r.status=BUSY_STATE),r.pending!==0){if(flush_pending(e),e.avail_out===0)return r.last_flush=-1,Z_OK$2}else if(e.avail_in===0&&rank(t)<=rank(n)&&t!==Z_FINISH$2)return err(e,Z_BUF_ERROR$2);if(r.status===FINISH_STATE&&e.avail_in!==0)return err(e,Z_BUF_ERROR$2);if(e.avail_in!==0||r.lookahead!==0||t!==Z_NO_FLUSH$1&&r.status!==FINISH_STATE){var c=r.strategy===Z_HUFFMAN_ONLY$1?deflate_huff(r,t):r.strategy===Z_RLE$1?deflate_rle(r,t):configuration_table[r.level].func(r,t);if((c===BS_FINISH_STARTED||c===BS_FINISH_DONE)&&(r.status=FINISH_STATE),c===BS_NEED_MORE||c===BS_FINISH_STARTED)return e.avail_out===0&&(r.last_flush=-1),Z_OK$2;if(c===BS_BLOCK_DONE&&(t===Z_PARTIAL_FLUSH$1?_tr_align(r):t!==Z_BLOCK$2&&(_tr_stored_block(r,0,0,!1),t===Z_FULL_FLUSH$1&&(zero(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),flush_pending(e),e.avail_out===0))return r.last_flush=-1,Z_OK$2}return t!==Z_FINISH$2?Z_OK$2:r.wrap<=0?Z_STREAM_END$2:(r.wrap===2?(put_byte(r,e.adler&255),put_byte(r,e.adler>>8&255),put_byte(r,e.adler>>16&255),put_byte(r,e.adler>>24&255),put_byte(r,e.total_in&255),put_byte(r,e.total_in>>8&255),put_byte(r,e.total_in>>16&255),put_byte(r,e.total_in>>24&255)):(putShortMSB(r,e.adler>>>16),putShortMSB(r,e.adler&65535)),flush_pending(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Z_OK$2:Z_STREAM_END$2)}function deflateEnd(e){var t;return!e||!e.state?Z_STREAM_ERROR$2:(t=e.state.status,t!==INIT_STATE&&t!==EXTRA_STATE&&t!==NAME_STATE&&t!==COMMENT_STATE&&t!==HCRC_STATE&&t!==BUSY_STATE&&t!==FINISH_STATE?err(e,Z_STREAM_ERROR$2):(e.state=null,t===BUSY_STATE?err(e,Z_DATA_ERROR$2):Z_OK$2))}var BAD$1=30,TYPE$1=12;function inflate_fast(e,t){var n,r,i,s,l,o,c,u,f,E,w,h,g,b,R,x,F,M,A,d,I,$,q,m,y;n=e.state,r=e.next_in,m=e.input,i=r+(e.avail_in-5),s=e.next_out,y=e.output,l=s-(t-e.avail_out),o=s+(e.avail_out-257),c=n.dmax,u=n.wsize,f=n.whave,E=n.wnext,w=n.window,h=n.hold,g=n.bits,b=n.lencode,R=n.distcode,x=(1<<n.lenbits)-1,F=(1<<n.distbits)-1;e:do{g<15&&(h+=m[r++]<<g,g+=8,h+=m[r++]<<g,g+=8),M=b[h&x];t:for(;;){if(A=M>>>24,h>>>=A,g-=A,A=M>>>16&255,A===0)y[s++]=M&65535;else if(A&16){d=M&65535,A&=15,A&&(g<A&&(h+=m[r++]<<g,g+=8),d+=h&(1<<A)-1,h>>>=A,g-=A),g<15&&(h+=m[r++]<<g,g+=8,h+=m[r++]<<g,g+=8),M=R[h&F];n:for(;;){if(A=M>>>24,h>>>=A,g-=A,A=M>>>16&255,A&16){if(I=M&65535,A&=15,g<A&&(h+=m[r++]<<g,g+=8,g<A&&(h+=m[r++]<<g,g+=8)),I+=h&(1<<A)-1,I>c){e.msg="invalid distance too far back",n.mode=BAD$1;break e}if(h>>>=A,g-=A,A=s-l,I>A){if(A=I-A,A>f&&n.sane){e.msg="invalid distance too far back",n.mode=BAD$1;break e}if($=0,q=w,E===0){if($+=u-A,A<d){d-=A;do y[s++]=w[$++];while(--A);$=s-I,q=y}}else if(E<A){if($+=u+E-A,A-=E,A<d){d-=A;do y[s++]=w[$++];while(--A);if($=0,E<d){A=E,d-=A;do y[s++]=w[$++];while(--A);$=s-I,q=y}}}else if($+=E-A,A<d){d-=A;do y[s++]=w[$++];while(--A);$=s-I,q=y}for(;d>2;)y[s++]=q[$++],y[s++]=q[$++],y[s++]=q[$++],d-=3;d&&(y[s++]=q[$++],d>1&&(y[s++]=q[$++]))}else{$=s-I;do y[s++]=y[$++],y[s++]=y[$++],y[s++]=y[$++],d-=3;while(d>2);d&&(y[s++]=y[$++],d>1&&(y[s++]=y[$++]))}}else if(A&64){e.msg="invalid distance code",n.mode=BAD$1;break e}else{M=R[(M&65535)+(h&(1<<A)-1)];continue n}break}}else if(A&64)if(A&32){n.mode=TYPE$1;break e}else{e.msg="invalid literal/length code",n.mode=BAD$1;break e}else{M=b[(M&65535)+(h&(1<<A)-1)];continue t}break}}while(r<i&&s<o);d=g>>3,r-=d,g-=d<<3,h&=(1<<g)-1,e.next_in=r,e.next_out=s,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=s<o?257+(o-s):257-(s-o),n.hold=h,n.bits=g}var MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lext=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],dbase=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],dext=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function inflate_table(e,t,n,r,i,s,l,o){var c=o.bits,u=0,f=0,E=0,w=0,h=0,g=0,b=0,R=0,x=0,F=0,M,A,d,I,$,q=null,m=0,y,C=new Buf16(MAXBITS+1),_=new Buf16(MAXBITS+1),L=null,z=0,B,N,P;for(u=0;u<=MAXBITS;u++)C[u]=0;for(f=0;f<r;f++)C[t[n+f]]++;for(h=c,w=MAXBITS;w>=1&&C[w]===0;w--);if(h>w&&(h=w),w===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,o.bits=1,0;for(E=1;E<w&&C[E]===0;E++);for(h<E&&(h=E),R=1,u=1;u<=MAXBITS;u++)if(R<<=1,R-=C[u],R<0)return-1;if(R>0&&(e===CODES$1||w!==1))return-1;for(_[1]=0,u=1;u<MAXBITS;u++)_[u+1]=_[u]+C[u];for(f=0;f<r;f++)t[n+f]!==0&&(l[_[t[n+f]]++]=f);if(e===CODES$1?(q=L=l,y=19):e===LENS$1?(q=lbase,m-=257,L=lext,z-=257,y=256):(q=dbase,L=dext,y=-1),F=0,f=0,u=E,$=s,g=h,b=0,d=-1,x=1<<h,I=x-1,e===LENS$1&&x>ENOUGH_LENS$1||e===DISTS$1&&x>ENOUGH_DISTS$1)return 1;for(;;){B=u-b,l[f]<y?(N=0,P=l[f]):l[f]>y?(N=L[z+l[f]],P=q[m+l[f]]):(N=32+64,P=0),M=1<<u-b,A=1<<g,E=A;do A-=M,i[$+(F>>b)+A]=B<<24|N<<16|P|0;while(A!==0);for(M=1<<u-1;F&M;)M>>=1;if(M!==0?(F&=M-1,F+=M):F=0,f++,--C[u]===0){if(u===w)break;u=t[n+l[f]]}if(u>h&&(F&I)!==d){for(b===0&&(b=h),$+=E,g=u-b,R=1<<g;g+b<w&&(R-=C[g+b],!(R<=0));)g++,R<<=1;if(x+=1<<g,e===LENS$1&&x>ENOUGH_LENS$1||e===DISTS$1&&x>ENOUGH_DISTS$1)return 1;d=F&I,i[d]=h<<24|g<<16|$-s|0}}return F!==0&&(i[$+F]=u-b<<24|64<<16|0),o.bits=h,0}var CODES=0,LENS=1,DISTS=2,Z_FINISH$1=4,Z_BLOCK$1=5,Z_TREES$1=6,Z_OK$1=0,Z_STREAM_END$1=1,Z_NEED_DICT$1=2,Z_STREAM_ERROR$1=-2,Z_DATA_ERROR$1=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR$1=-5,Z_DEFLATED$1=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Buf16(320),this.work=new Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return!e||!e.state?Z_STREAM_ERROR$1:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK$1)}function inflateReset(e){var t;return!e||!e.state?Z_STREAM_ERROR$1:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e))}function inflateReset2(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Z_STREAM_ERROR$1:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,inflateReset(e))}function inflateInit2(e,t){var n,r;return e?(r=new InflateState,e.state=r,r.window=null,n=inflateReset2(e,t),n!==Z_OK$1&&(e.state=null),n):Z_STREAM_ERROR$1}var virgin=!0,lenfix,distfix;function fixedtables(e){if(virgin){var t;for(lenfix=new Buf32(512),distfix=new Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inflate_table(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inflate_table(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,n,r){var i,s=e.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Buf8(s.wsize)),r>=s.wsize?(arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),arraySet(s.window,t,n-r,i,s.wnext),r-=i,r?(arraySet(s.window,t,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}function inflate(e,t){var n,r,i,s,l,o,c,u,f,E,w,h,g,b,R=0,x,F,M,A,d,I,$,q,m=new Buf8(4),y,C,_=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Z_STREAM_ERROR$1;n=e.state,n.mode===TYPE&&(n.mode=TYPEDO),l=e.next_out,i=e.output,c=e.avail_out,s=e.next_in,r=e.input,o=e.avail_in,u=n.hold,f=n.bits,E=o,w=c,q=Z_OK$1;e:for(;;)switch(n.mode){case HEAD:if(n.wrap===0){n.mode=TYPEDO;break}for(;f<16;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(n.wrap&2&&u===35615){n.check=0,m[0]=u&255,m[1]=u>>>8&255,n.check=crc32(n.check,m,2,0),u=0,f=0,n.mode=FLAGS;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=BAD;break}if((u&15)!==Z_DEFLATED$1){e.msg="unknown compression method",n.mode=BAD;break}if(u>>>=4,f-=4,$=(u&15)+8,n.wbits===0)n.wbits=$;else if($>n.wbits){e.msg="invalid window size",n.mode=BAD;break}n.dmax=1<<$,e.adler=n.check=1,n.mode=u&512?DICTID:TYPE,u=0,f=0;break;case FLAGS:for(;f<16;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(n.flags=u,(n.flags&255)!==Z_DEFLATED$1){e.msg="unknown compression method",n.mode=BAD;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=BAD;break}n.head&&(n.head.text=u>>8&1),n.flags&512&&(m[0]=u&255,m[1]=u>>>8&255,n.check=crc32(n.check,m,2,0)),u=0,f=0,n.mode=TIME;case TIME:for(;f<32;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}n.head&&(n.head.time=u),n.flags&512&&(m[0]=u&255,m[1]=u>>>8&255,m[2]=u>>>16&255,m[3]=u>>>24&255,n.check=crc32(n.check,m,4,0)),u=0,f=0,n.mode=OS;case OS:for(;f<16;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}n.head&&(n.head.xflags=u&255,n.head.os=u>>8),n.flags&512&&(m[0]=u&255,m[1]=u>>>8&255,n.check=crc32(n.check,m,2,0)),u=0,f=0,n.mode=EXLEN;case EXLEN:if(n.flags&1024){for(;f<16;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}n.length=u,n.head&&(n.head.extra_len=u),n.flags&512&&(m[0]=u&255,m[1]=u>>>8&255,n.check=crc32(n.check,m,2,0)),u=0,f=0}else n.head&&(n.head.extra=null);n.mode=EXTRA;case EXTRA:if(n.flags&1024&&(h=n.length,h>o&&(h=o),h&&(n.head&&($=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),arraySet(n.head.extra,r,s,h,$)),n.flags&512&&(n.check=crc32(n.check,r,h,s)),o-=h,s+=h,n.length-=h),n.length))break e;n.length=0,n.mode=NAME;case NAME:if(n.flags&2048){if(o===0)break e;h=0;do $=r[s+h++],n.head&&$&&n.length<65536&&(n.head.name+=String.fromCharCode($));while($&&h<o);if(n.flags&512&&(n.check=crc32(n.check,r,h,s)),o-=h,s+=h,$)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=COMMENT;case COMMENT:if(n.flags&4096){if(o===0)break e;h=0;do $=r[s+h++],n.head&&$&&n.length<65536&&(n.head.comment+=String.fromCharCode($));while($&&h<o);if(n.flags&512&&(n.check=crc32(n.check,r,h,s)),o-=h,s+=h,$)break e}else n.head&&(n.head.comment=null);n.mode=HCRC;case HCRC:if(n.flags&512){for(;f<16;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(u!==(n.check&65535)){e.msg="header crc mismatch",n.mode=BAD;break}u=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=TYPE;break;case DICTID:for(;f<32;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}e.adler=n.check=zswap32(u),u=0,f=0,n.mode=DICT;case DICT:if(n.havedict===0)return e.next_out=l,e.avail_out=c,e.next_in=s,e.avail_in=o,n.hold=u,n.bits=f,Z_NEED_DICT$1;e.adler=n.check=1,n.mode=TYPE;case TYPE:if(t===Z_BLOCK$1||t===Z_TREES$1)break e;case TYPEDO:if(n.last){u>>>=f&7,f-=f&7,n.mode=CHECK;break}for(;f<3;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}switch(n.last=u&1,u>>>=1,f-=1,u&3){case 0:n.mode=STORED;break;case 1:if(fixedtables(n),n.mode=LEN_,t===Z_TREES$1){u>>>=2,f-=2;break e}break;case 2:n.mode=TABLE;break;case 3:e.msg="invalid block type",n.mode=BAD}u>>>=2,f-=2;break;case STORED:for(u>>>=f&7,f-=f&7;f<32;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=BAD;break}if(n.length=u&65535,u=0,f=0,n.mode=COPY_,t===Z_TREES$1)break e;case COPY_:n.mode=COPY;case COPY:if(h=n.length,h){if(h>o&&(h=o),h>c&&(h=c),h===0)break e;arraySet(i,r,s,h,l),o-=h,s+=h,c-=h,l+=h,n.length-=h;break}n.mode=TYPE;break;case TABLE:for(;f<14;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(n.nlen=(u&31)+257,u>>>=5,f-=5,n.ndist=(u&31)+1,u>>>=5,f-=5,n.ncode=(u&15)+4,u>>>=4,f-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=BAD;break}n.have=0,n.mode=LENLENS;case LENLENS:for(;n.have<n.ncode;){for(;f<3;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}n.lens[_[n.have++]]=u&7,u>>>=3,f-=3}for(;n.have<19;)n.lens[_[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,y={bits:n.lenbits},q=inflate_table(CODES,n.lens,0,19,n.lencode,0,n.work,y),n.lenbits=y.bits,q){e.msg="invalid code lengths set",n.mode=BAD;break}n.have=0,n.mode=CODELENS;case CODELENS:for(;n.have<n.nlen+n.ndist;){for(;R=n.lencode[u&(1<<n.lenbits)-1],x=R>>>24,F=R>>>16&255,M=R&65535,!(x<=f);){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(M<16)u>>>=x,f-=x,n.lens[n.have++]=M;else{if(M===16){for(C=x+2;f<C;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(u>>>=x,f-=x,n.have===0){e.msg="invalid bit length repeat",n.mode=BAD;break}$=n.lens[n.have-1],h=3+(u&3),u>>>=2,f-=2}else if(M===17){for(C=x+3;f<C;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}u>>>=x,f-=x,$=0,h=3+(u&7),u>>>=3,f-=3}else{for(C=x+7;f<C;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}u>>>=x,f-=x,$=0,h=11+(u&127),u>>>=7,f-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=BAD;break}for(;h--;)n.lens[n.have++]=$}}if(n.mode===BAD)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=BAD;break}if(n.lenbits=9,y={bits:n.lenbits},q=inflate_table(LENS,n.lens,0,n.nlen,n.lencode,0,n.work,y),n.lenbits=y.bits,q){e.msg="invalid literal/lengths set",n.mode=BAD;break}if(n.distbits=6,n.distcode=n.distdyn,y={bits:n.distbits},q=inflate_table(DISTS,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,y),n.distbits=y.bits,q){e.msg="invalid distances set",n.mode=BAD;break}if(n.mode=LEN_,t===Z_TREES$1)break e;case LEN_:n.mode=LEN;case LEN:if(o>=6&&c>=258){e.next_out=l,e.avail_out=c,e.next_in=s,e.avail_in=o,n.hold=u,n.bits=f,inflate_fast(e,w),l=e.next_out,i=e.output,c=e.avail_out,s=e.next_in,r=e.input,o=e.avail_in,u=n.hold,f=n.bits,n.mode===TYPE&&(n.back=-1);break}for(n.back=0;R=n.lencode[u&(1<<n.lenbits)-1],x=R>>>24,F=R>>>16&255,M=R&65535,!(x<=f);){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(F&&!(F&240)){for(A=x,d=F,I=M;R=n.lencode[I+((u&(1<<A+d)-1)>>A)],x=R>>>24,F=R>>>16&255,M=R&65535,!(A+x<=f);){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}u>>>=A,f-=A,n.back+=A}if(u>>>=x,f-=x,n.back+=x,n.length=M,F===0){n.mode=LIT;break}if(F&32){n.back=-1,n.mode=TYPE;break}if(F&64){e.msg="invalid literal/length code",n.mode=BAD;break}n.extra=F&15,n.mode=LENEXT;case LENEXT:if(n.extra){for(C=n.extra;f<C;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=DIST;case DIST:for(;R=n.distcode[u&(1<<n.distbits)-1],x=R>>>24,F=R>>>16&255,M=R&65535,!(x<=f);){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(!(F&240)){for(A=x,d=F,I=M;R=n.distcode[I+((u&(1<<A+d)-1)>>A)],x=R>>>24,F=R>>>16&255,M=R&65535,!(A+x<=f);){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}u>>>=A,f-=A,n.back+=A}if(u>>>=x,f-=x,n.back+=x,F&64){e.msg="invalid distance code",n.mode=BAD;break}n.offset=M,n.extra=F&15,n.mode=DISTEXT;case DISTEXT:if(n.extra){for(C=n.extra;f<C;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=BAD;break}n.mode=MATCH;case MATCH:if(c===0)break e;if(h=w-c,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=BAD;break}h>n.wnext?(h-=n.wnext,g=n.wsize-h):g=n.wnext-h,h>n.length&&(h=n.length),b=n.window}else b=i,g=l-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do i[l++]=b[g++];while(--h);n.length===0&&(n.mode=LEN);break;case LIT:if(c===0)break e;i[l++]=n.length,c--,n.mode=LEN;break;case CHECK:if(n.wrap){for(;f<32;){if(o===0)break e;o--,u|=r[s++]<<f,f+=8}if(w-=c,e.total_out+=w,n.total+=w,w&&(e.adler=n.check=n.flags?crc32(n.check,i,w,l-w):adler32(n.check,i,w,l-w)),w=c,(n.flags?u:zswap32(u))!==n.check){e.msg="incorrect data check",n.mode=BAD;break}u=0,f=0}n.mode=LENGTH;case LENGTH:if(n.wrap&&n.flags){for(;f<32;){if(o===0)break e;o--,u+=r[s++]<<f,f+=8}if(u!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=BAD;break}u=0,f=0}n.mode=DONE;case DONE:q=Z_STREAM_END$1;break e;case BAD:q=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR;case SYNC:default:return Z_STREAM_ERROR$1}return e.next_out=l,e.avail_out=c,e.next_in=s,e.avail_in=o,n.hold=u,n.bits=f,(n.wsize||w!==e.avail_out&&n.mode<BAD&&(n.mode<CHECK||t!==Z_FINISH$1))&&updatewindow(e,e.output,e.next_out,w-e.avail_out),E-=e.avail_in,w-=e.avail_out,e.total_in+=E,e.total_out+=w,n.total+=w,n.wrap&&w&&(e.adler=n.check=n.flags?crc32(n.check,i,w,e.next_out-w):adler32(n.check,i,w,e.next_out-w)),e.data_type=n.bits+(n.last?64:0)+(n.mode===TYPE?128:0)+(n.mode===LEN_||n.mode===COPY_?256:0),(E===0&&w===0||t===Z_FINISH$1)&&q===Z_OK$1&&(q=Z_BUF_ERROR$1),q}function inflateEnd(e){if(!e||!e.state)return Z_STREAM_ERROR$1;var t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK$1}var NONE=0,DEFLATE=1,INFLATE=2,GZIP=3,GUNZIP=4,DEFLATERAW=5,INFLATERAW=6,UNZIP=7,Z_NO_FLUSH=0,Z_PARTIAL_FLUSH=1,Z_SYNC_FLUSH=2,Z_FULL_FLUSH=3,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_ERRNO=-1,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_BUF_ERROR=-5,Z_NO_COMPRESSION=0,Z_BEST_SPEED=1,Z_BEST_COMPRESSION=9,Z_DEFAULT_COMPRESSION=-1,Z_FILTERED=1,Z_HUFFMAN_ONLY=2,Z_RLE=3,Z_FIXED=4,Z_DEFAULT_STRATEGY=0,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN=2,Z_DEFLATED=8;function Zlib$1(e){if(e<DEFLATE||e>UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}Zlib$1.prototype.init=function(e,t,n,r,i){this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=r,(this.mode===GZIP||this.mode===GUNZIP)&&(this.windowBits+=16),this.mode===UNZIP&&(this.windowBits+=32),(this.mode===DEFLATERAW||this.mode===INFLATERAW)&&(this.windowBits=-this.windowBits),this.strm=new ZStream;var s;switch(this.mode){case DEFLATE:case GZIP:case DEFLATERAW:s=deflateInit2(this.strm,this.level,Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case INFLATE:case GUNZIP:case INFLATERAW:case UNZIP:s=inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(s!==Z_OK){this._error(s);return}this.write_in_progress=!1,this.init_done=!0},Zlib$1.prototype.params=function(){throw new Error("deflateParams Not supported")},Zlib$1.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Zlib$1.prototype.write=function(e,t,n,r,i,s,l){this._writeCheck(),this.write_in_progress=!0;var o=this;return browser$1$1.nextTick(function(){o.write_in_progress=!1;var c=o._write(e,t,n,r,i,s,l);o.callback(c[0],c[1]),o.pending_close&&o.close()}),this};function bufferSet(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}Zlib$1.prototype.writeSync=function(e,t,n,r,i,s,l){return this._writeCheck(),this._write(e,t,n,r,i,s,l)},Zlib$1.prototype._write=function(e,t,n,r,i,s,l){if(this.write_in_progress=!0,e!==Z_NO_FLUSH&&e!==Z_PARTIAL_FLUSH&&e!==Z_SYNC_FLUSH&&e!==Z_FULL_FLUSH&&e!==Z_FINISH&&e!==Z_BLOCK)throw new Error("Invalid flush value");t==null&&(t=new Buffer(0),r=0,n=0),i._set?i.set=i._set:i.set=bufferSet;var o=this.strm;o.avail_in=r,o.input=t,o.next_in=n,o.avail_out=l,o.output=i,o.next_out=s;var c;switch(this.mode){case DEFLATE:case GZIP:case DEFLATERAW:c=deflate(o,e);break;case UNZIP:case INFLATE:case GUNZIP:case INFLATERAW:c=inflate(o,e);break;default:throw new Error("Unknown mode "+this.mode)}return c!==Z_STREAM_END&&c!==Z_OK&&this._error(c),this.write_in_progress=!1,[o.avail_in,o.avail_out]},Zlib$1.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,this.mode===DEFLATE||this.mode===GZIP||this.mode===DEFLATERAW?deflateEnd(this.strm):inflateEnd(this.strm),this.mode=NONE};var status;Zlib$1.prototype.reset=function(){switch(this.mode){case DEFLATE:case DEFLATERAW:status=deflateReset(this.strm);break;case INFLATE:case INFLATERAW:status=inflateReset(this.strm);break}status!==Z_OK&&this._error(status)},Zlib$1.prototype._error=function(e){this.onerror(msg[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};const _binding=Object.freeze(Object.defineProperty({__proto__:null,DEFLATE,DEFLATERAW,GUNZIP,GZIP,INFLATE,INFLATERAW,NONE,UNZIP,Z_BEST_COMPRESSION,Z_BEST_SPEED,Z_BINARY,Z_BLOCK,Z_BUF_ERROR,Z_DATA_ERROR,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED,Z_ERRNO,Z_FILTERED,Z_FINISH,Z_FIXED,Z_FULL_FLUSH,Z_HUFFMAN_ONLY,Z_NEED_DICT,Z_NO_COMPRESSION,Z_NO_FLUSH,Z_OK,Z_PARTIAL_FLUSH,Z_RLE,Z_STREAM_END,Z_STREAM_ERROR,Z_SYNC_FLUSH,Z_TEXT,Z_TREES,Z_UNKNOWN,Zlib:Zlib$1},Symbol.toStringTag,{value:"Module"}));function assert(e,t){if(!e)throw new Error(t)}var binding={};Object.keys(_binding).forEach(function(e){binding[e]=_binding[e]}),binding.Z_MIN_WINDOWBITS=8,binding.Z_MAX_WINDOWBITS=15,binding.Z_DEFAULT_WINDOWBITS=15,binding.Z_MIN_CHUNK=64,binding.Z_MAX_CHUNK=1/0,binding.Z_DEFAULT_CHUNK=16*1024,binding.Z_MIN_MEMLEVEL=1,binding.Z_MAX_MEMLEVEL=9,binding.Z_DEFAULT_MEMLEVEL=8,binding.Z_MIN_LEVEL=-1,binding.Z_MAX_LEVEL=9,binding.Z_DEFAULT_LEVEL=binding.Z_DEFAULT_COMPRESSION;var codes={Z_OK:binding.Z_OK,Z_STREAM_END:binding.Z_STREAM_END,Z_NEED_DICT:binding.Z_NEED_DICT,Z_ERRNO:binding.Z_ERRNO,Z_STREAM_ERROR:binding.Z_STREAM_ERROR,Z_DATA_ERROR:binding.Z_DATA_ERROR,Z_MEM_ERROR:binding.Z_MEM_ERROR,Z_BUF_ERROR:binding.Z_BUF_ERROR,Z_VERSION_ERROR:binding.Z_VERSION_ERROR};Object.keys(codes).forEach(function(e){codes[codes[e]]=e});function deflateSync(e,t){return zlibBufferSync(new Deflate(t),e)}function inflateSync(e,t){return zlibBufferSync(new Inflate(t),e)}function zlibBufferSync(e,t){if(typeof t=="string"&&(t=new Buffer(t)),!Buffer.isBuffer(t))throw new TypeError("Not a string or buffer");var n=binding.Z_FINISH;return e._processChunk(t,n)}function Deflate(e){if(!(this instanceof Deflate))return new Deflate(e);Zlib.call(this,e,binding.DEFLATE)}function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);Zlib.call(this,e,binding.INFLATE)}function Gzip(e){if(!(this instanceof Gzip))return new Gzip(e);Zlib.call(this,e,binding.GZIP)}function Gunzip(e){if(!(this instanceof Gunzip))return new Gunzip(e);Zlib.call(this,e,binding.GUNZIP)}function DeflateRaw(e){if(!(this instanceof DeflateRaw))return new DeflateRaw(e);Zlib.call(this,e,binding.DEFLATERAW)}function InflateRaw(e){if(!(this instanceof InflateRaw))return new InflateRaw(e);Zlib.call(this,e,binding.INFLATERAW)}function Unzip(e){if(!(this instanceof Unzip))return new Unzip(e);Zlib.call(this,e,binding.UNZIP)}function Zlib(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||binding.Z_DEFAULT_CHUNK,Transform.call(this,e),e.flush&&e.flush!==binding.Z_NO_FLUSH&&e.flush!==binding.Z_PARTIAL_FLUSH&&e.flush!==binding.Z_SYNC_FLUSH&&e.flush!==binding.Z_FULL_FLUSH&&e.flush!==binding.Z_FINISH&&e.flush!==binding.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||binding.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<binding.Z_MIN_CHUNK||e.chunkSize>binding.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<binding.Z_MIN_WINDOWBITS||e.windowBits>binding.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<binding.Z_MIN_LEVEL||e.level>binding.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<binding.Z_MIN_MEMLEVEL||e.memLevel>binding.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=binding.Z_FILTERED&&e.strategy!=binding.Z_HUFFMAN_ONLY&&e.strategy!=binding.Z_RLE&&e.strategy!=binding.Z_FIXED&&e.strategy!=binding.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Buffer.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new binding.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(s,l){n._binding=null,n._hadError=!0;var o=new Error(s);o.errno=l,o.code=binding.codes[l],n.emit("error",o)};var r=binding.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(r=e.level);var i=binding.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(i=e.strategy),this._binding.init(e.windowBits||binding.Z_DEFAULT_WINDOWBITS,r,e.memLevel||binding.Z_DEFAULT_MEMLEVEL,i,e.dictionary),this._buffer=new Buffer(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=i,this.once("end",this.close)}inherits$1(Zlib,Transform),Zlib.prototype.params=function(e,t,n){if(e<binding.Z_MIN_LEVEL||e>binding.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=binding.Z_FILTERED&&t!=binding.Z_HUFFMAN_ONLY&&t!=binding.Z_RLE&&t!=binding.Z_FIXED&&t!=binding.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(binding.Z_SYNC_FLUSH,function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())})}else browser$1$1.nextTick(n)},Zlib.prototype.reset=function(){return this._binding.reset()},Zlib.prototype._flush=function(e){this._transform(new Buffer(0),"",e)},Zlib.prototype.flush=function(e,t){var n=this._writableState;if((typeof e=="function"||e===void 0&&!t)&&(t=e,e=binding.Z_FULL_FLUSH),n.ended)t&&browser$1$1.nextTick(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",function(){r.flush(t)})}else this._flushFlag=e,this.write(new Buffer(0),"",t)},Zlib.prototype.close=function(e){if(e&&browser$1$1.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;browser$1$1.nextTick(function(){t.emit("close")})}},Zlib.prototype._transform=function(e,t,n){var r,i=this._writableState,s=i.ending||i.ended,l=s&&(!e||i.length===e.length);if(!e===null&&!Buffer.isBuffer(e))return n(new Error("invalid input"));l?r=binding.Z_FINISH:(r=this._flushFlag,e.length>=i.length&&(this._flushFlag=this._opts.flush||binding.Z_NO_FLUSH)),this._processChunk(e,r,n)},Zlib.prototype._processChunk=function(e,t,n){var r=e&&e.length,i=this._chunkSize-this._offset,s=0,l=this,o=typeof n=="function";if(!o){var c=[],u=0,f;this.on("error",function(b){f=b});do var E=this._binding.writeSync(t,e,s,r,this._buffer,this._offset,i);while(!this._hadError&&g(E[0],E[1]));if(this._hadError)throw f;var w=Buffer.concat(c,u);return this.close(),w}var h=this._binding.write(t,e,s,r,this._buffer,this._offset,i);h.buffer=e,h.callback=g;function g(b,R){if(!l._hadError){var x=i-R;if(assert(x>=0,"have should not go down"),x>0){var F=l._buffer.slice(l._offset,l._offset+x);l._offset+=x,o?l.push(F):(c.push(F),u+=F.length)}if((R===0||l._offset>=l._chunkSize)&&(i=l._chunkSize,l._offset=0,l._buffer=new Buffer(l._chunkSize)),R===0){if(s+=r-b,r=b,!o)return!0;var M=l._binding.write(t,e,s,r,l._buffer,l._offset,l._chunkSize);M.callback=g,M.buffer=e;return}if(!o)return!1;n()}}},inherits$1(Deflate,Zlib),inherits$1(Inflate,Zlib),inherits$1(Gzip,Zlib),inherits$1(Gunzip,Zlib),inherits$1(DeflateRaw,Zlib),inherits$1(InflateRaw,Zlib),inherits$1(Unzip,Zlib);function serializeHash(e){return deflateSync(Buffer.from(JSON.stringify(e),"utf8")).toString("base64")}function deserializeHash(e){return JSON.parse(inflateSync(Buffer.from(e,"base64")).toString("utf8"))}function stringToArrayBuffer(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}function browser(){const{userAgent:e}=navigator;return e.includes("Firefox/")?"Firefox":e.includes("Edg/")?"Edge":e.includes("Chrome/")?"Chrome":e.includes("Safari/")?"Safari":e.includes("MSIE/")||e.includes("Trident/")?"IE":"Other"}const rtcAudioChunkStreamType="audio-chunk";class AudioPlayer{constructor(t,n){Oe(this,"muted",!1);Oe(this,"hasReceivedData",!1);Oe(this,"audioContext");Oe(this,"chunks",[]);Oe(this,"isPlaying",!1);Oe(this,"startTime",0);Oe(this,"lastChunkOffset",0);Oe(this,"bufferSize",3);Oe(this,"receive",async t=>{var l;const n=(l=t.payload.audioChunk)==null?void 0:l.chunk_data;if(!n)return;this.hasReceivedData||(this.hasReceivedData=!0);const{audioContext:r,muted:i}=this;if(!r||t.header.stream.streamType!==rtcAudioChunkStreamType||i!==!1)return;const s=stringToArrayBuffer(n);try{await r.decodeAudioData(s.buffer,this.scheduleChunk)}catch(o){console.warn("Error decoding audio buffer, changing audioWireFormat on agent",{error:o}),this.changeAudioWireFormat("wav")}});Oe(this,"scheduleChunk",t=>{const{audioContext:n}=this;if(!n)return;(this.chunks.length>this.bufferSize||this.isPlaying===!1)&&(this.chunks.forEach(i=>{i.stop()}),this.isPlaying=!1,this.chunks=[]);const r=this.createChunk(t);r&&r.buffer&&(this.isPlaying===!1&&(this.startTime=n.currentTime,this.lastChunkOffset=0,this.isPlaying=!0),r.start(this.startTime+this.lastChunkOffset,0,t.duration),this.lastChunkOffset+=r.buffer.duration,this.chunks.push(r))});this.device=t,this.stream=n,this.device.startListeningToRealtimeDataStream(n),this.device.addRealtimeListener((i,s)=>{this.receive(s)}),browser()==="Safari"||browser()==="IE"?this.changeAudioWireFormat("wav"):this.changeAudioWireFormat("opus");const r=window.AudioContext||window.webkitAudioContext;this.audioContext=new r}async play(){var t,n;((t=this.audioContext)==null?void 0:t.state)==="suspended"&&await((n=this.audioContext)==null?void 0:n.resume()),this.muted=!1}async pause(){await this.audioContext.suspend(),this.muted=!0}destroy(){this.device.stopListeningToRealtimeDataStream(this.stream)}createChunk(t){const{audioContext:n}=this;if(!n)return;const r=n.createBufferSource();return r.buffer=t,r.connect(n.destination),r.loop=!1,r.onended=i=>{this.chunks.splice(this.chunks.indexOf(r),1),this.chunks.length===0&&(this.isPlaying=!1)},r}changeAudioWireFormat(t){const{stream:n}=this;(async()=>await this.device.changeStreamAudioType(n.name,t))()}}const accessLevels=["viewer","operator","administrator"],viewer="viewer",operator="operator",administrator="administrator",aggregateLevels=["year","month","week","day","hour","minute"],annotationTypes=["tag","sheet","user"],eventTypes=["triggered-event","intervention-request","teleop-session-record","port-forwarding-session-record","command-request","command-response","command-delivery","custom","comment","system","annotation"],healthStatuses=["unknown","operational","offline","error"],interventionTypes=["selection","labeling","teleop"],severities=["info","warning","error","critical"],videoMimeTypes=["video/mp4"];window.Buffer=Buffer;let urlParams=new URLSearchParams("");typeof window<"u"&&(urlParams=new URLSearchParams(window.location.search));const urlDevice=urlParams.get("device");urlDevice&&Fleet.setDefaultDevice(urlDevice);const urlAuth=urlParams.get("auth");urlAuth&&Authentication.loginWithToken(urlAuth);const moduleName=urlParams.get("module");moduleName&&Authentication.listenForRefresh(),exports.App=App,exports.AudioPlayer=AudioPlayer,exports.Authentication=Authentication,exports.BinaryRequestDataChannel=BinaryRequestDataChannel,exports.CaptureStream=CaptureStream,exports.DataChannel=DataChannel,exports.Device=Device,exports.Fleet=Fleet,exports.IRtcSendConfiguration=distExports.IRtcSendConfiguration,exports.IRtcStreamMessage=distExports.IRtcStreamMessage,exports.IRtcStreamPayload=distExports.IRtcStreamPayload,exports.KeyValue=KeyValue,exports.Manipulator=Manipulator,exports.PeerDevice=PeerDevice,exports.SessionType=SessionType,exports.TextRequestDataChannel=TextRequestDataChannel,exports.accessLevels=accessLevels,exports.administrator=administrator,exports.aggregateByDateFunctions=aggregateByDateFunctions,exports.aggregateFunctionMap=aggregateFunctionMap,exports.aggregateFunctions=aggregateFunctions,exports.aggregateLevels=aggregateLevels,exports.annotationTypes=annotationTypes,exports.combineNumericAggregates=combineNumericAggregates,exports.combineNumericSetAggregates=combineNumericSetAggregates,exports.deserializeHash=deserializeHash,exports.eventTypes=eventTypes,exports.formatTimeFrameText=formatTimeFrameText,exports.getAverage=getAverage,exports.getCount=getCount,exports.getMax=getMax,exports.getMin=getMin,exports.getStandardDeviation=getStandardDeviation,exports.getSum=getSum,exports.getVariance=getVariance,exports.getZeroINumericSet=getZeroINumericSet,exports.healthStatuses=healthStatuses,exports.interventionTypes=interventionTypes,exports.operator=operator,exports.reduceNumericSetStreamAggregates=reduceNumericSetStreamAggregates,exports.reduceNumericStreamAggregates=reduceNumericStreamAggregates,exports.serializeHash=serializeHash,exports.severities=severities,exports.timeout=timeout,exports.vailableAggregationIntervals=vailableAggregationIntervals,exports.videoMimeTypes=videoMimeTypes,exports.viewer=viewer,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});