@squidcloud/client 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/src/ai-assistant.context.d.ts +11 -11
- package/dist/common/src/ai-assistant.schemas.d.ts +210 -210
- package/dist/common/src/ai-assistant.types.d.ts +81 -81
- package/dist/common/src/api-call.context.d.ts +12 -12
- package/dist/common/src/api.types.d.ts +24 -24
- package/dist/common/src/application.schemas.d.ts +1060 -1060
- package/dist/common/src/application.types.d.ts +224 -224
- package/dist/common/src/auth.types.d.ts +4 -4
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.types.d.ts +7 -7
- package/dist/common/src/backend-run.types.d.ts +53 -53
- package/dist/common/src/bundle-api.types.d.ts +68 -68
- package/dist/common/src/bundle-data.types.d.ts +59 -59
- package/dist/common/src/communication.types.d.ts +4 -4
- package/dist/common/src/context.types.d.ts +32 -32
- package/dist/common/src/distributed-lock.context.d.ts +5 -5
- package/dist/common/src/document.types.d.ts +37 -37
- package/dist/common/src/graphql.context.d.ts +6 -6
- package/dist/common/src/graphql.types.d.ts +11 -11
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +54 -54
- package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -30
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/auth.types.d.ts +22 -22
- package/dist/common/src/integrations/database.types.d.ts +236 -236
- package/dist/common/src/integrations/index.d.ts +97 -97
- package/dist/common/src/integrations/observability.types.d.ts +22 -22
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/metrics.types.d.ts +58 -58
- package/dist/common/src/mutation.context.d.ts +10 -10
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.types.d.ts +72 -72
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.schemas.d.ts +3 -3
- package/dist/common/src/named-query.types.d.ts +9 -9
- package/dist/common/src/query/index.d.ts +2 -2
- package/dist/common/src/query/query-context.d.ts +37 -37
- package/dist/common/src/query/simple-query-builder.d.ts +137 -137
- package/dist/common/src/query.schemas.d.ts +5 -5
- package/dist/common/src/query.types.d.ts +118 -118
- package/dist/common/src/regions.d.ts +22 -22
- package/dist/common/src/schema/schema.types.d.ts +54 -54
- package/dist/common/src/secret.schemas.d.ts +6 -6
- package/dist/common/src/secret.types.d.ts +49 -49
- package/dist/common/src/security.types.d.ts +3 -3
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.types.d.ts +108 -108
- package/dist/common/src/time-units.d.ts +5 -5
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/types.d.ts +15 -15
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/assert.d.ts +8 -8
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/lock.manager.d.ts +14 -14
- package/dist/common/src/utils/nullish.d.ts +1 -1
- package/dist/common/src/utils/object.d.ts +6 -6
- package/dist/common/src/utils/serialization.d.ts +6 -6
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/validation.d.ts +30 -30
- package/dist/common/src/webhook-response.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/ai-assistant-client.d.ts +66 -66
- package/dist/typescript-client/src/ai-client.factory.d.ts +13 -13
- package/dist/typescript-client/src/api.manager.d.ts +15 -15
- package/dist/typescript-client/src/auth.manager.d.ts +23 -23
- package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
- package/dist/typescript-client/src/client-id.service.d.ts +24 -24
- package/dist/typescript-client/src/collection-reference.d.ts +81 -81
- package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
- package/dist/typescript-client/src/data.manager.d.ts +172 -172
- package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +19 -19
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +134 -134
- package/dist/typescript-client/src/document-reference.factory.d.ts +9 -9
- package/dist/typescript-client/src/document-store.d.ts +11 -11
- package/dist/typescript-client/src/graphql-client.d.ts +12 -12
- package/dist/typescript-client/src/graphql-client.factory.d.ts +9 -9
- package/dist/typescript-client/src/index.d.ts +8 -8
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +12 -12
- package/dist/typescript-client/src/named-query.manager.d.ts +14 -14
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +72 -72
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +83 -83
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +64 -64
- package/dist/typescript-client/src/query/query.types.d.ts +14 -14
- package/dist/typescript-client/src/rpc.manager.d.ts +28 -28
- package/dist/typescript-client/src/socket.manager.d.ts +32 -32
- package/dist/typescript-client/src/squid.d.ts +188 -188
- package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
- package/dist/typescript-client/src/state/actions.d.ts +29 -29
- package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
- package/dist/typescript-client/src/state/state.service.d.ts +22 -22
- package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
- package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
- package/dist/typescript-client/src/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|| ${a} === "boolean" || ${i} === null`).assign(u,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${u} !== undefined`,(()=>{n.assign(i,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,u)}))}(e,t,a):h(e)}))}return c};const l=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=u.Correct){const i=n===u.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===u.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=p;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,d)}t.reportTypeError=h},1481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(5669),i=r(8936);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:u}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let l=n._`${c} === undefined`;"empty"===u.useDefaults&&(l=n._`${l} || ${c} === null || ${c} === ""`),o.if(l,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},1686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(2171),i=r(7332),o=r(9073),s=r(7332),a=r(1481),u=r(5782),c=r(8878),l=r(5669),f=r(5247),p=r(6696),d=r(8936),h=r(6930);function y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,l._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${v(r,i)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,l._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,l._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,l._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,l._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,l._`""`),e.var(f.default.parentData,l._`undefined`),e.var(f.default.parentDataProperty,l._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`{}`)}))}(e,i),e.code(o)})):e.func(t,l._`${f.default.data}, ${function(e){return l._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?l._`, ${f.default.dynamicAnchors}={}`:l.nil}}={}`}(i)}`,n.$async,(()=>e.code(v(r,i)).code(o)))}function v(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function g(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return O(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);O(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(l._`${f.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=l.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(l._`${f.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function O(e,t,r,n){const{gen:i,schema:a,data:u,allErrors:c,opts:p,self:h}=e,{RULES:y}=h;function v(d){(0,o.shouldUseGroup)(a,d)&&(d.type?(i.if((0,s.checkDataType)(d.type,u,p.strictNumbers)),S(e,d),1===t.length&&t[0]===d.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):S(e,d),c||i.if(l._`${f.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(a,y)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||I(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&I(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&I(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of y.rules)v(e);v(y.post)}))):i.block((()=>j(e,"$ref",y.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&j(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function I(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(g(e),m(e))?function(e){const{schema:t,opts:r,gen:n}=e;y(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(l._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(l._`new ${i}(${f.default.vErrors})`))):(t.assign(l._`${n}.errors`,f.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r),n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${f.default.errors} === 0`))}(e)}))}(e):y(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class T{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",A(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){b(e)&&(g(e),m(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",f.default.errors);_(e,o),n.var(t,l._`${o} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function j(e,t,r,n){const i=new T(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,u.funcKeywordCode)(i,r):"macro"in r?(0,u.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(i,r)}t.KeywordCxt=T;const P=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!P.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{const s=x.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=l._`${o}${(0,l.getProperty)((0,d.unescapeJsonPointer)(e))}`,s=l._`${s} && ${o}`);return s;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},5782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(5669),i=r(5247),o=r(3499),s=r(6930);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function u(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,c=t.macro.call(a.self,o,s,a),l=u(r,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:l,schema:f,parentSchema:p,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const y=!d&&t.compile?t.compile.call(h.self,f,p,h):t.validate,v=u(c,l,y),m=c.let("valid");function b(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!d||!1===t.schema);c.assign(m,n._`${r}${(0,o.callValidateCode)(e,v,s,a)}`,t.modifying)}function g(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:m),e)}e.block$data(m,(function(){if(!1===t.errors)b(),t.modifying&&a(e),g((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(n._`await `)),(t=>c.assign(m,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${v}.errors`;return c.assign(e,null),b(n.nil),e}();t.modifying&&a(e),g((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:m)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},8878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(5669),i=r(8936);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:u}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:u}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(l(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==u&&(e.propertyName=u)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},8355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(5669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(6448),s=r(1578),a=r(2881),u=r(7382),c=r(5669),l=r(6696),f=r(7332),p=r(8936),d=r(1143),h=r(407),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,n,i,o,s,a,u,c,l,f,p,d,v,m,b,g,_,w,O,S,E,I,T,j;const P=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===x||void 0===x?1:x||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:y,M=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:P)||void 0===s||s,strictNumbers:null===(u=null!==(a=e.strictNumbers)&&void 0!==a?a:P)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:P)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(f=e.strictTuples)&&void 0!==f?f:P)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(d=e.strictRequired)&&void 0!==d?d:P)&&void 0!==v&&v,code:e.code?{...e.code,optimize:A,regExp:N}:{optimize:A,regExp:N},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(I=e.validateFormats)||void 0===I||I,unicodeRegExp:null===(T=e.unicodeRegExp)||void 0===T||T,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:M}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return P;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),O.call(this,b,e,"NOT SUPPORTED"),O.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=j.call(this),e.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await u.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(t=u.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>N.call(this,e))),this;k.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>N.call(this,e,n):e=>n.type.forEach((t=>N.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(o||r);const c=l.getSchemaRefs.call(this,e,r);return a=new u.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):u.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,e)}finally{this.opts=t}}}function O(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function S(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function I(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function j(){const e={...this.opts};for(const t of v)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=s.default;const P={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function N(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?M.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function M(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function k(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},4285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6471);n.code='require("ajv/dist/runtime/equal").default',t.default=n},9161:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2371);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},8891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(5669),i=r(8936),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:u}=e;u.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(u,o)){const o=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),u.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},4943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(5247),s=r(8936),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:p}=l;if(l.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(l,r))return;const d=(0,n.allSchemaProperties)(a.properties),h=(0,n.allSchemaProperties)(a.patternProperties);function y(e){t.code(i._`delete ${u}[${e}]`)}function v(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)y(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===p.removeAdditional?(m(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),y(n)}))):(m(n,r),f||t.if((0,i.not)(r),(()=>t.break())))}}}function m(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",u,(r=>{d.length||h.length?t.if(function(r){let o;if(d.length>8){const e=(0,s.schemaRefOrVal)(l,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=d.length?(0,i.or)(...d.map((e=>i._`${r} === ${e}`))):i.nil;return h.length&&(o=(0,i.or)(o,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>v(r))):v(r)})),e.ok(i._`${c} === ${o.default.errors}`)}};t.default=a},2609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},4279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},5609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let u,c;const{minContains:l,maxContains:f}=o;a.opts.next?(u=void 0===l?1:l,c=f):u=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${p} <= ${c}`),void e.pass(t)}a.items=!0;const d=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);y(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(d,!1).break())),1===u?t.assign(d,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0))))}(r)))))}function y(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?y(d,(()=>t.if(d,(()=>t.break())))):0===u?(t.let(d,!0),void 0!==c&&t.if(n._`${s}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,(()=>e.reset()))}};t.default=o},5747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(5669),i=r(8936),o=r(3499);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
|
|
6
6
|
missingProperty: ${i},
|
|
7
7
|
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,o.propertyInData)(r,i,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(a,t[c])||(r.if((0,o.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),u=s(o,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8891),i=r(1162),o=r(8634),s=r(5151),a=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),p=r(8103),d=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[d.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5669),i=r(8936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const l=o.name("valid"),f=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),s=r(8891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},2869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},8103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s=r(8936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),c.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=a},1162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},4243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1686),i=r(3499),o=r(8936),s=r(4943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),c.props));const f=l.filter((e=>!(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},3021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},5316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(5669),i=r(8936),o=r(5247),s=r(8936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(c(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:u},c,l,f){const p=f?n._`${e}, ${t}, ${i}${s}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return l!==n.nil?n._`${c}.call(${l}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?f:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`),e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},1018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},2101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1018),i=r(1939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},1939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(1578),i=r(3499),o=r(5669),s=r(5247),a=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:u,validateName:c,opts:p,self:d}=i,{root:h}=u;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(u===h)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const y=a.resolveRef.call(d,h,s,r);if(void 0===y)throw new n.default(i.opts.uriResolver,s,r);return y instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(y)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:p}=c,d=p.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),y(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>y(t)),(()=>h(t)))}t.getValidate=l,t.callRef=f,t.default=c},2:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(7421),o=r(7382),s=r(8936),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let t=0;t<l.length;t++){let u=l[t];(null==u?void 0:u.$ref)&&!(0,s.schemaHasRulesButRef)(u,c.self.RULES)&&(u=o.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==u?void 0:u.$ref),u instanceof o.SchemaEnv&&(u=u.schema));const p=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),a(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function a(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=a},7421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},5671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2101),i=r(7499),o=r(6951),s=r(4480),a=r(2480),u=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},3599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===o)return;const[a,u,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof u?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(3599).default];t.default=n},2480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},8549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(l||s)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",u,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);d=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=s},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),s=r(1216),a=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),p=r(9450),d=[n.default,i.default,o.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},1135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},9507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(9161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},1337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},34:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${u}))`)}};t.default=i},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${c}.test(${t})`)}};t.default=o},6962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),s=r(4285),a={message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,s){const a=t.name("item"),u=(0,n.checkDataTypes)(d,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(u,i._`continue`),d.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,i._`${c}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${c}[${a}] = ${o}`)}))}function y(n,a){const u=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(p)}};t.default=u},8682:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,u,c,l,f),o){var d=o[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,i,d[h],s+"/"+p+"/"+h,a,s,p,o,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)r(e,n,i,d[y],s+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,o,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,i,d,s+"/"+p,a,s,p,o)}i(o,s,a,u,c,l,f)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BSONError:()=>w,BSONRegExp:()=>rt,BSONSymbol:()=>nt,BSONTypeError:()=>O,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>ve,BSON_BINARY_SUBTYPE_COLUMN:()=>we,BSON_BINARY_SUBTYPE_DEFAULT:()=>he,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>_e,BSON_BINARY_SUBTYPE_FUNCTION:()=>ye,BSON_BINARY_SUBTYPE_MD5:()=>ge,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>Oe,BSON_BINARY_SUBTYPE_UUID:()=>me,BSON_BINARY_SUBTYPE_UUID_NEW:()=>be,BSON_DATA_ARRAY:()=>G,BSON_DATA_BINARY:()=>J,BSON_DATA_BOOLEAN:()=>ee,BSON_DATA_CODE:()=>oe,BSON_DATA_CODE_W_SCOPE:()=>ae,BSON_DATA_DATE:()=>te,BSON_DATA_DBPOINTER:()=>ie,BSON_DATA_DECIMAL128:()=>fe,BSON_DATA_INT:()=>ue,BSON_DATA_LONG:()=>le,BSON_DATA_MAX_KEY:()=>de,BSON_DATA_MIN_KEY:()=>pe,BSON_DATA_NULL:()=>re,BSON_DATA_NUMBER:()=>W,BSON_DATA_OBJECT:()=>K,BSON_DATA_OID:()=>X,BSON_DATA_REGEXP:()=>ne,BSON_DATA_STRING:()=>H,BSON_DATA_SYMBOL:()=>se,BSON_DATA_TIMESTAMP:()=>ce,BSON_DATA_UNDEFINED:()=>Z,BSON_INT32_MAX:()=>B,BSON_INT32_MIN:()=>U,BSON_INT64_MAX:()=>V,BSON_INT64_MIN:()=>z,Binary:()=>Se,Code:()=>Ie,DBRef:()=>je,Decimal128:()=>We,Double:()=>He,EJSON:()=>yt,Int32:()=>Ke,Long:()=>De,LongWithoutOverridesClass:()=>it,Map:()=>vt,MaxKey:()=>Ge,MinKey:()=>Je,ObjectID:()=>tt,ObjectId:()=>tt,Timestamp:()=>ot,UUID:()=>Ee,calculateObjectSize:()=>vr,default:()=>br,deserialize:()=>yr,deserializeStream:()=>mr,serialize:()=>dr,serializeWithBufferAndIndex:()=>hr,setInternalBufferSize:()=>pr});for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;var l,f,p=function(e){var t,r,n=u(e),s=n[0],a=n[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},d=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,u=r-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")},h=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},y=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=h,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=h,s/=256,c-=8);e[r+d-h]|=128*y},v=(l=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var s=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return a(e),i(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,o.prototype),n}function f(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function v(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return j(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function O(e,t,r,n){return B(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return B(L(t),e,r,n)}function I(e,t,r,n){return B(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?d(e):d(e.slice(t,r))}function j(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=P));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(U(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i)}i+=s.length}return n},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?j(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){s=c[f],a=l[f];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=z[e[o]];return i}function M(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),y(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),y(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return p(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},l(f={exports:{}},f.exports),f.exports),m=v.Buffer;v.SlowBuffer,v.INSPECT_MAX_BYTES,v.kMaxLength;var b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b(e,t)};function g(e,t){function r(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var _=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},w=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),O=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function S(e){return e&&e.Math==Math&&e}function E(){return S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof r.g&&r.g)||Function("return this")()}function I(e){return e.toString().replace("function(","function (")}var T=function(e){var t,r="object"==typeof(t=E()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(r);for(var n=m.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},j=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(m.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(m.alloc(e))}:T}();function P(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function x(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function A(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function N(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function M(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function k(e){return D(e)&&"[object Date]"===Object.prototype.toString.call(e)}function D(e){return"object"==typeof e&&null!==e}function R(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function C(e){if(ArrayBuffer.isView(e))return m.from(e.buffer,e.byteOffset,e.byteLength);if(P(e))return m.from(e);throw new O("Must use either Buffer or TypedArray")}var $=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,F=function(e){return"string"==typeof e&&$.test(e)},q=function(e){if(!F(e))throw new O('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return m.from(t,"hex")},L=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},B=2147483647,U=-2147483648,V=Math.pow(2,63)-1,z=-Math.pow(2,63),Q=Math.pow(2,53),Y=-Math.pow(2,53),W=1,H=2,K=3,G=4,J=5,Z=6,X=7,ee=8,te=9,re=10,ne=11,ie=12,oe=13,se=14,ae=15,ue=16,ce=17,le=18,fe=19,pe=255,de=127,he=0,ye=1,ve=2,me=3,be=4,ge=5,_e=6,we=7,Oe=128,Se=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new O("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=m.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=m.from(t,"binary"):Array.isArray(t)?this.buffer=m.from(t):this.buffer=C(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new O("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new O("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new O("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=m.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=m.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(C(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Ee(this.buffer.slice(0,this.position));throw new w('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=m.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=m.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=q(t.$uuid)),!n)throw new O("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===be?new Ee(n):new e(n,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Se.prototype,"_bsontype",{value:"Binary"});var Ee=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=m.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=C(r);else{if("string"!=typeof r)throw new O("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");n=q(r)}return(o=e.call(this,n,be)||this).__id=i,o}return g(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=L(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=L(this.id,e);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new Se(this.id,Se.SUBTYPE_UUID)},t.generate=function(){var e=j(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,m.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?F(e):!!x(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(q(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Se),Ie=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function Te(e){return D(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(Ie.prototype,"_bsontype",{value:"Code"});var je=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(je.prototype,"_bsontype",{value:"DBRef"});var Pe=void 0;try{Pe=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var xe=4294967296,Ae=0x10000000000000000,Ne=Ae/2,Me={},ke={},De=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=ke[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(ke[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Me[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Me[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ae)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Ne)return e.MIN_VALUE;if(t+1>=Ne)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%xe|0,t/xe|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));s=s.mul(l).add(e.fromNumber(c))}else s=(s=s.mul(o)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},e.isLong=function(e){return D(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,p=0;return f+=(p+=o+(65535&t.low))>>>16,p&=65535,l+=(f+=i+u)>>>16,f&=65535,c+=(l+=n+a)>>>16,l&=65535,c+=r+s,c&=65535,e.fromBits(f<<16|p,c<<16|l,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Pe){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?Pe.div_u:Pe.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=a,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,r=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(r&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Pe){var r=(this.unsigned?Pe.rem_u:Pe.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Pe){var r=Pe.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,p=0,d=0,h=0;return d+=(h+=s*l)>>>16,h&=65535,p+=(d+=o*l)>>>16,d&=65535,p+=(d+=s*c)>>>16,d&=65535,f+=(p+=i*l)>>>16,p&=65535,f+=(p+=o*c)>>>16,p&=65535,f+=(p+=s*u)>>>16,p&=65535,f+=n*l+i*c+o*u+s*a,f&=65535,e.fromBits(d<<16|h,f<<16|p,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*xe+(this.low>>>0):this.high*xe+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(t);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(De.prototype,"__isLong__",{value:!0}),Object.defineProperty(De.prototype,"_bsontype",{value:"Long"});var Re=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ce=/^(\+|-)?(Infinity|inf)$/i,$e=/^(\+|-)?NaN$/i,Fe=6111,qe=-6176,Le=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Be=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ue=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ve=/^([-+])?(\d+)?$/;function ze(e){return!isNaN(parseInt(e,10))}function Qe(e){var t=De.fromNumber(1e9),r=De.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new De(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function Ye(e,t){throw new O('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var We=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!x(t))throw new O("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new O("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,l=0,f=[0],p=0,d=0,h=0,y=0,v=0,b=0,g=new De(0,0),_=new De(0,0),w=0;if(t.length>=7e3)throw new O(t+" not a valid Decimal128 string");var S=t.match(Re),E=t.match(Ce),I=t.match($e);if(!S&&!E&&!I||0===t.length)throw new O(t+" not a valid Decimal128 string");if(S){var T=S[2],j=S[4],P=S[5],x=S[6];j&&void 0===x&&Ye(t,"missing exponent power"),j&&void 0===T&&Ye(t,"missing exponent base"),void 0===j&&(P||x)&&Ye(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!ze(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(m.from(n?Be:Ue));if("N"===t[w])return new e(m.from(Le))}for(;ze(t[w])||"."===t[w];)"."!==t[w]?(p<34&&("0"!==t[w]||o)&&(o||(l=a),o=!0,f[d++]=parseInt(t[w],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,w+=1):(i&&Ye(t,"contains multiple periods"),i=!0,w+=1);if(i&&!a)throw new O(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var A=t.substr(++w).match(Ve);if(!A||!A[2])return new e(m.from(Le));v=parseInt(A[0],10),w+=A[0].length}if(t[w])return new e(m.from(Le));if(h=0,p){if(y=p-1,1!==(s=u))for(;0===f[l+s-1];)s-=1}else h=0,y=0,f[0]=0,u=1,p=1,s=0;for(v<=c&&c-v>16384?v=qe:v-=c;v>Fe;){if((y+=1)-h>34){if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}v-=1}for(;v<qe||p<u;){if(0===y&&s<p){v=qe,s=0;break}if(p<u?u-=1:y-=1,v<Fe)v+=1;else{if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}}if(y-h+1<s){var N=a;i&&(l+=1,N+=1),n&&(l+=1,N+=1);var M=parseInt(t[l+y+1],10),k=0;if(M>=5&&(k=1,5===M))for(k=f[y]%2==1?1:0,b=l+y+2;b<N;b++)if(parseInt(t[b],10)){k=1;break}if(k)for(var D=y;D>=0;D--)if(++f[D]>9&&(f[D]=0,0===D)){if(!(v<Fe))return new e(m.from(n?Be:Ue));v+=1,f[D]=1}}if(g=De.fromNumber(0),_=De.fromNumber(0),0===s)g=De.fromNumber(0),_=De.fromNumber(0);else if(y-h<17)for(D=h,_=De.fromNumber(f[D++]),g=new De(0,0);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));else{for(D=h,g=De.fromNumber(f[D++]);D<=y-17;D++)g=(g=g.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));for(_=De.fromNumber(f[D++]);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]))}var R,C,$,F,q=function(e,t){if(!e&&!t)return{high:De.fromNumber(0),low:De.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new De(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new De(t.getLowBits(),0),s=r.multiply(i),a=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new De(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new De(c.getLowBits(),0))}}(g,De.fromString("100000000000000000"));q.low=q.low.add(_),C=_,(($=(R=q.low).high>>>0)<(F=C.high>>>0)||$===F&&R.low>>>0<C.low>>>0)&&(q.high=q.high.add(De.fromNumber(1))),r=v+6176;var L={low:De.fromNumber(0),high:De.fromNumber(0)};q.high.shiftRightUnsigned(49).and(De.fromNumber(1)).equals(De.fromNumber(1))?(L.high=L.high.or(De.fromNumber(3).shiftLeft(61)),L.high=L.high.or(De.fromNumber(r).and(De.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(q.high.and(De.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(De.fromNumber(16383&r).shiftLeft(49)),L.high=L.high.or(q.high.and(De.fromNumber(562949953421311)))),L.low=q.low,n&&(L.high=L.high.or(De.fromString("9223372036854775808")));var B=m.alloc(16);return w=0,B[w++]=255&L.low.low,B[w++]=L.low.low>>8&255,B[w++]=L.low.low>>16&255,B[w++]=L.low.low>>24&255,B[w++]=255&L.low.high,B[w++]=L.low.high>>8&255,B[w++]=L.low.high>>16&255,B[w++]=L.low.high>>24&255,B[w++]=255&L.high.low,B[w++]=L.high.low>>8&255,B[w++]=L.high.low>>16&255,B[w++]=L.high.low>>24&255,B[w++]=255&L.high.high,B[w++]=L.high.high>>8&255,B[w++]=L.high.high>>16&255,B[w++]=L.high.high>>24&255,new e(B)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},l=[];a=0;var f=this.bytes,p=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,d=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,h=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,y=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24;a=0,(new De(p,d),new De(h,y)).lessThan(De.ZERO)&&l.push("-");var v=y>>26&31;if(v>>3==3){if(30===v)return l.join("")+"Infinity";if(31===v)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=h,c.parts[2]=d,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var b=0,g=Qe(c);if(c=g.quotient,b=g.rem.low)for(o=8;o>=0;o--)r[9*s+o]=b%10,b=Math.floor(b/10)}if(u)t=1,r[a]=0;else for(t=36;!r[a];)t-=1,a+=1;var _=t-1+m;if(_>=34||_<=-7||m>0){if(t>34)return l.push("".concat(0)),m>0?l.push("E+".concat(m)):m<0&&l.push("E".concat(m)),l.join("");for(l.push("".concat(r[a++])),(t-=1)&&l.push("."),n=0;n<t;n++)l.push("".concat(r[a++]));l.push("E"),_>0?l.push("+".concat(_)):l.push("".concat(_))}else if(m>=0)for(n=0;n<t;n++)l.push("".concat(r[a++]));else{var w=t+m;if(w>0)for(n=0;n<w;n++)l.push("".concat(r[a++]));else l.push("0");for(l.push(".");w++<0;)l.push("0");for(n=0;n<t-Math.max(w-1,0);n++)l.push("".concat(r[a++]))}return l.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(We.prototype,"_bsontype",{value:"Decimal128"});var He=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(He.prototype,"_bsontype",{value:"Double"});var Ke=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Ke.prototype,"_bsontype",{value:"Int32"});var Ge=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Ge.prototype,"_bsontype",{value:"MaxKey"});var Je=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Je.prototype,"_bsontype",{value:"MinKey"});var Ze=new RegExp("^[0-9a-fA-F]{24}$"),Xe=null,et=Symbol("id"),tt=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new O("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?m.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[et]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[et]=r instanceof m?r:C(r);else{if("string"!=typeof r)throw new O("Argument passed in does not match the accepted types");if(12===r.length){var n=m.from(r);if(12!==n.byteLength)throw new O("Argument passed in must be a string of 12 bytes");this[et]=n}else{if(24!==r.length||!Ze.test(r))throw new O("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[et]=m.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[et]},set:function(t){this[et]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var r=e.getInc(),n=m.alloc(12);return n.writeUInt32BE(t,0),null===Xe&&(Xe=j(5)),n[4]=Xe[0],n[5]=Xe[1],n[6]=Xe[2],n[7]=Xe[3],n[8]=Xe[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[et][11]===t[et][11]&&this[et].equals(t[et]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&x(this.id))return t===m.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return m.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var r=m.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new O("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(m.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(tt.prototype,"generate",{value:R((function(e){return tt.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(tt.prototype,"getInc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"_bsontype",{value:"ObjectID"});var rt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new w("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new w("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new w("The regular expression option [".concat(this.options[n],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new O("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(rt.prototype,"_bsontype",{value:"BSONRegExp"});var nt=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(nt.prototype,"_bsontype",{value:"Symbol"});var it=De,ot=function(e){function t(r,n){var i=this;return i instanceof t?(i=De.isLong(r)?e.call(this,r.low,r.high,!0)||this:D(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return g(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(De.fromInt(e,!0))},t.fromNumber=function(e){return new t(De.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(De.fromString(e,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=De.MAX_UNSIGNED_VALUE,t}(it);function st(e){return D(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var at=2147483647,ut=-2147483648,ct=0x8000000000000000,lt=-0x8000000000000000,ft={$oid:tt,$binary:Se,$uuid:Se,$symbol:nt,$numberInt:Ke,$numberDecimal:We,$numberDouble:He,$numberLong:De,$minKey:Je,$maxKey:Ge,$regex:rt,$regularExpression:rt,$timestamp:ot};function pt(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=ut&&e<=at)return new Ke(e);if(e>=lt&&e<=ct)return De.fromNumber(e)}return new He(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),n=0;n<r.length;n++){var i=ft[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,s=new Date;return t.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):De.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&s.setTime(o),s}if(null!=e.$code){var a=Object.assign({},e);return e.$scope&&(a.$scope=pt(e.$scope)),Ie.fromExtendedJSON(e)}if(Te(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof je)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),l=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(l=!1)})),l)return je.fromExtendedJSON(u)}return e}function dt(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function ht(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==r){var n=t.seenObjects.map((function(e){return e.propertyName})),i=n.slice(0,r).map((function(e){return"".concat(e," -> ")})).join(""),o=n[r],s=" -> "+n.slice(r+1,n.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new O("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return ht(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||k(e)){var l=e.getTime(),f=l>-1&&l<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:dt(e)}:t.relaxed&&f?{$date:dt(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=lt&&e<=ct;if(e>=ut&&e<=at)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M(e)){var d=e.flags;if(void 0===d){var h=e.toString().match(/[gimuy]*$/);h&&(d=h[0])}return new rt(e.source,d).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new w("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=ht(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(st(e)){var s=e;if("function"!=typeof s.toExtendedJSON){var a=mt[e._bsontype];if(!a)throw new O("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return"Code"===r&&s.scope?s=new Ie(s.code,ht(s.scope,t)):"DBRef"===r&&s.oid&&(s=new je(ht(s.collection,t),ht(s.oid,t),ht(s.db,t),ht(s.fields,t))),s.toExtendedJSON(t)}throw new w("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var yt,vt,mt={Binary:function(e){return new Se(e.value(),e.sub_type)},Code:function(e){return new Ie(e.code,e.scope)},DBRef:function(e){return new je(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new We(e.bytes)},Double:function(e){return new He(e.value)},Int32:function(e){return new Ke(e.value)},Long:function(e){return De.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Ge},MinKey:function(){return new Je},ObjectID:function(e){return new tt(e)},ObjectId:function(e){return new tt(e)},BSONRegExp:function(e){return new rt(e.pattern,e.options)},Symbol:function(e){return new nt(e.value)},Timestamp:function(e){return ot.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new w("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return pt(t,r)}))}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=ht(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(yt||(yt={}));var bt=E();function gt(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=_t(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=_t(o,e[o],t,!1,r);return n}function _t(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+m.byteLength(e,"utf8")+1+4+m.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Y&&t<=Q&&t>=U&&t<=B?(null!=e?m.byteLength(e,"utf8")+1:0)+5:(null!=e?m.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?m.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?m.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||k(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||P(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(t.code.toString(),"utf8")+1+gt(t.scope,r,i):(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Se.SUBTYPE_BYTE_ARRAY?(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+m.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var s=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(s.$db=t.db),(null!=e?m.byteLength(e,"utf8")+1:0)+1+gt(s,r,i)}return t instanceof RegExp||M(t)?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.pattern,"utf8")+1+m.byteLength(t.options,"utf8")+1:(null!=e?m.byteLength(e,"utf8")+1:0)+gt(t,r,i)+1;case"function":if(t instanceof RegExp||M(t)||"[object RegExp]"===String.call(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(I(t),"utf8")+1+gt(t.scope,r,i);if(r)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(I(t),"utf8")+1}return 0}vt=bt.Map?bt.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var wt=128,Ot=192,St=224,Et=240,It=248,Tt=192,jt=224,Pt=240,xt=128;function At(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if((o&Ot)!==xt)return!1;n-=1}else if(o&wt)if((o&St)===Tt)n=1;else if((o&Et)===jt)n=2;else{if((o&It)!==Pt)return!1;n=3}}return!n}var Nt=De.fromNumber(Q),Mt=De.fromNumber(Y),kt={};function Dt(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new w("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new w("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new w("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new w("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new w("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return Ct(e,n,t,r)}var Rt=/^\$ref$|^\$id$|^\$db$/;function Ct(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,s=null!=r.cacheFunctions&&r.cacheFunctions,a=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,f=null==r.promoteLongs||r.promoteLongs,p=null==r.promoteValues||r.promoteValues,d=null==r.validation?{utf8:!0}:r.validation,h=!0,y=new Set,v=d.utf8;if("boolean"==typeof v)i=v;else{h=!1;var b=Object.keys(v).map((function(e){return v[e]}));if(0===b.length)throw new w("UTF-8 validation setting cannot be empty");if("boolean"!=typeof b[0])throw new w("Invalid UTF-8 validation option, must specify boolean values");if(i=b[0],!b.every((function(e){return e===i})))throw new w("Invalid UTF-8 validation option - keys must be all true or all false")}if(!h)for(var g=0,O=Object.keys(v);g<O.length;g++){var S=O[g];y.add(S)}var E=t;if(e.length<5)throw new w("corrupt bson message < 5 bytes long");var I=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(I<5||I>e.length)throw new w("corrupt bson message");for(var T=n?[]:{},j=0,P=!n&&null,x=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var A=e[t++];if(0===A)break;for(var N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.byteLength)throw new w("Bad BSON Document: illegal CString");var M,k=n?j++:e.toString("utf8",t,N);M=h||y.has(k)?i:!i,!1!==P&&"$"===k[0]&&(P=Rt.test(k));var D=void 0;if(t=N+1,A===H){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");D=Ft(e,t,t+Ae-1,M),t+=Ae}else if(A===X){var R=m.alloc(12);e.copy(R,0,t,t+12),D=new tt(R),t+=12}else if(A===ue&&!1===p)D=new Ke(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(A===ue)D=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(A===W&&!1===p)D=new He(x.getFloat64(t,!0)),t+=8;else if(A===W)D=x.getFloat64(t,!0),t+=8;else if(A===te){var C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;D=new Date(new De(C,$).toNumber())}else if(A===ee){if(0!==e[t]&&1!==e[t])throw new w("illegal boolean type value");D=1===e[t++]}else if(A===K){var F=t;if((Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Pe>e.length-t)throw new w("bad embedded document length in bson");if(u)D=e.slice(t,t+Pe);else{var q=r;h||(q=_(_({},r),{validation:{utf8:M}})),D=Ct(e,F,q,!1)}t+=Pe}else if(A===G){F=t;var L=r,B=t+(Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(a&&a[k]){for(var U in L={},r)L[U]=r[U];L.raw=!0}if(h||(L=_(_({},L),{validation:{utf8:M}})),D=Ct(e,F,L,!0),0!==e[(t+=Pe)-1])throw new w("invalid array terminator byte");if(t!==B)throw new w("corrupted array bson")}else if(A===Z)D=void 0;else if(A===re)D=null;else if(A===le){C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var V=new De(C,$);D=f&&!0===p&&V.lessThanOrEqual(Nt)&&V.greaterThanOrEqual(Mt)?V.toNumber():V}else if(A===fe){var z=m.alloc(16);e.copy(z,0,t,t+16),t+=16;var Q=new We(z);D="toObject"in Q&&"function"==typeof Q.toObject?Q.toObject():Q}else if(A===J){var Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,he=Y,ye=e[t++];if(Y<0)throw new w("Negative binary type element size found");if(Y>e.byteLength)throw new w("Binary type size larger than document size");if(null!=e.slice){if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}l&&p?D=e.slice(t,t+Y):(D=new Se(e.slice(t,t+Y),ye),ye===be&&(D=D.toUUID()))}else{var ve=m.alloc(Y);if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}for(N=0;N<Y;N++)ve[N]=e[t+N];D=l&&p?ve:ye===be?new Se(e.slice(t,t+Y),ye).toUUID():new Se(e.slice(t,t+Y),ye)}t+=Y}else if(A===ne&&!1===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var me=e.toString("utf8",t,N);for(N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var ge=e.toString("utf8",t,N);t=N+1;var _e=new Array(ge.length);for(N=0;N<ge.length;N++)switch(ge[N]){case"m":_e[N]="m";break;case"s":_e[N]="g";break;case"i":_e[N]="i"}D=new RegExp(me,_e.join(""))}else if(A===ne&&!0===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");for(me=e.toString("utf8",t,N),N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");ge=e.toString("utf8",t,N),t=N+1,D=new rt(me,ge)}else if(A===se){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var we=Ft(e,t,t+Ae-1,M);D=p?we:new nt(we),t+=Ae}else if(A===ce)C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new ot(C,$);else if(A===pe)D=new Je;else if(A===de)D=new Ge;else if(A===oe){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var Oe=Ft(e,t,t+Ae-1,M);D=o?s?$t(Oe,kt,T):$t(Oe):new Ie(Oe),t+=Ae}else if(A===ae){var Ee=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Ee<13)throw new w("code_w_scope total size shorter minimum expected length");if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");Oe=Ft(e,t,t+Ae-1,M),F=t+=Ae;var Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,xe=Ct(e,F,r,!1);if(t+=Pe,Ee<8+Pe+Ae)throw new w("code_w_scope total size is too short, truncating scope");if(Ee>8+Pe+Ae)throw new w("code_w_scope total size is too long, clips outer document");o?(D=s?$t(Oe,kt,T):$t(Oe)).scope=xe:D=new Ie(Oe,xe)}else{if(A!==ie)throw new w("Detected unknown BSON type ".concat(A.toString(16),' for fieldname "').concat(k,'"'));var Ae;if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");if(null!=d&&d.utf8&&!At(e,t,t+Ae-1))throw new w("Invalid UTF-8 string in BSON document");var Ne=e.toString("utf8",t,t+Ae-1);t+=Ae;var Me=m.alloc(12);e.copy(Me,0,t,t+12),R=new tt(Me),t+=12,D=new je(Ne,R)}"__proto__"===k?Object.defineProperty(T,k,{value:D,writable:!0,enumerable:!0,configurable:!0}):T[k]=D}if(I!==t-E){if(n)throw new w("corrupt array bson");throw new w("corrupt object bson")}if(!P)return T;if(Te(T)){var ke=Object.assign({},T);return delete ke.$ref,delete ke.$id,delete ke.$db,new je(T.$ref,T.$id,T.$db,ke)}return T}function $t(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function Ft(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!At(e,t,r))throw new w("Invalid UTF-8 string in BSON document");break}return i}var qt=/\x00/,Lt=new Set(["$db","$ref","$id","$clusterTime"]);function Bt(e,t,r,n,i){e[n++]=H;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var s=e.write(r,n+4,void 0,"utf8");return e[n+3]=s+1>>24&255,e[n+2]=s+1>>16&255,e[n+1]=s+1>>8&255,e[n]=s+1&255,n=n+4+s,e[n++]=0,n}var Ut=new Uint8Array(8),Vt=new DataView(Ut.buffer,Ut.byteOffset,Ut.byteLength);function zt(e,t,r,n,i){return Number.isInteger(r)&&r>=U&&r<=B?(e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r,!0),e.set(Ut,n),n+=8),n}function Qt(e,t,r,n,i){return e[n++]=re,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Yt(e,t,r,n,i){return e[n++]=ee,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function Wt(e,t,r,n,i){e[n++]=te,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=De.fromNumber(r.getTime()),s=o.getLowBits(),a=o.getHighBits();return e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function Ht(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(qt))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function Kt(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(qt))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function Gt(e,t,r,n,i){return null===r?e[n++]=re:"MinKey"===r._bsontype?e[n++]=pe:e[n++]=de,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Jt(e,t,r,n,i){if(e[n++]=X,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!x(r.id))throw new O("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function Zt(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=he,e.set(C(r),n),n+o}function Xt(e,t,r,n,i,o,s,a,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var l=0;l<c.length;l++)if(c[l]===r)throw new w("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?G:K,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var f=cr(e,r,i,n,o+1,s,a,c);return c.pop(),f}function er(e,t,r,n,i){return e[n++]=fe,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function tr(e,t,r,n,i){e[n++]="Long"===r._bsontype?le:ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),s=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function rr(e,t,r,n,i){return r=r.valueOf(),e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function nr(e,t,r,n,i){return e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r.value,!0),e.set(Ut,n),n+8}function ir(e,t,r,n,i,o,s){e[n++]=oe,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=I(r),u=e.write(a,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function or(e,t,r,n,i,o,s,a,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=ae,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,l="string"==typeof r.code?r.code:r.code.toString();n+=4;var f=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&f,e[n+1]=f>>8&255,e[n+2]=f>>16&255,e[n+3]=f>>24&255,e[n+4+f-1]=0,n=n+f+4;var p=cr(e,r.scope,i,n,o+1,s,a);n=p-1;var d=p-c;e[c++]=255&d,e[c++]=d>>8&255,e[c++]=d>>16&255,e[c++]=d>>24&255,e[n++]=0}else{e[n++]=oe,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,l=r.code.toString();var h=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&h,e[n+1]=h>>8&255,e[n+2]=h>>16&255,e[n+3]=h>>24&255,n=n+4+h-1,e[n++]=0}return n}function sr(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),s=r.position;return r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s+=4),e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=r.sub_type,r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s-=4,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255),e.set(o,n),n+r.position}function ar(e,t,r,n,i){e[n++]=se,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function ur(e,t,r,n,i,o,s){e[n++]=K,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=cr(e,u=Object.assign(u,r.fields),!1,n,i+1,o),l=c-a;return e[a++]=255&l,e[a++]=l>>8&255,e[a++]=l>>16&255,e[a++]=l>>24&255,c}function cr(e,t,r,n,i,o,s,a){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=[]),n=n||0,(a=a||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var f="".concat(l);if("function"==typeof(null==(v=t[l])?void 0:v.toBSON)&&(v=v.toBSON()),"string"==typeof v)c=Bt(e,f,v,c,!0);else if("number"==typeof v)c=zt(e,f,v,c,!0);else{if("bigint"==typeof v)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof v)c=Yt(e,f,v,c,!0);else if(v instanceof Date||k(v))c=Wt(e,f,v,c,!0);else if(void 0===v)c=Qt(e,f,0,c,!0);else if(null===v)c=Qt(e,f,0,c,!0);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c,!0);else if(x(v))c=Zt(e,f,v,c,!0);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c,!0);else if("object"==typeof v&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!0,a);else if("object"==typeof v&&st(v)&&"Decimal128"===v._bsontype)c=er(e,f,v,c,!0);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c,!0);else if("Double"===v._bsontype)c=nr(e,f,v,c,!0);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,!0);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s,!0);else if("Binary"===v._bsontype)c=sr(e,f,v,c,!0);else if("Symbol"===v._bsontype)c=ar(e,f,v,c,!0);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o,!0);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c,!0);else if("Int32"===v._bsontype)c=rr(e,f,v,c,!0);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c,!0);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}else if(t instanceof vt||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var p=t.entries(),d=!1;!d;){var h=p.next();if(!(d=!!h.done)){f=h.value[0];var y=typeof(v=h.value[1]);if("string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y||A(v)||N(v))throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(null===v||void 0===v&&!1===s)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new O("toBSON function did not return an object");for(var f in t){var v;if("function"==typeof(null==(v=t[f])?void 0:v.toBSON)&&(v=v.toBSON()),y=typeof v,"string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(void 0===v)!1===s&&(c=Qt(e,f,0,c));else if(null===v)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}a.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var lr=17825792,fr=m.alloc(lr);function pr(e){fr.length<e&&(fr=m.alloc(e))}function dr(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:lr;fr.length<o&&(fr=m.alloc(o));var s=cr(fr,e,r,0,0,n,i,[]),a=m.alloc(s);return fr.copy(a,0,0,a.length),a}function hr(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,s="number"==typeof r.index?r.index:0,a=cr(fr,e,n,0,0,i,o);return fr.copy(t,s,0,a),s+a-1}function yr(e,t){return void 0===t&&(t={}),Dt(e instanceof m?e:C(e),t)}function vr(e,t){return void 0===t&&(t={}),gt(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function mr(e,t,r,n,i,o){for(var s=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),a=C(e),u=t,c=0;c<r;c++){var l=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24;s.index=u,n[i+c]=Dt(a,s),u+=l}return u}const br={Binary:Se,Code:Ie,DBRef:je,Decimal128:We,Double:He,Int32:Ke,Long:De,UUID:Ee,Map:vt,MaxKey:Ge,MinKey:Je,ObjectId:tt,ObjectID:tt,BSONRegExp:rt,BSONSymbol:nt,Timestamp:ot,EJSON:yt,setInternalBufferSize:pr,serialize:dr,serializeWithBufferAndIndex:hr,deserialize:yr,calculateObjectSize:vr,deserializeStream:mr,BSONError:w,BSONTypeError:O}},2091:function(e,t,r){var n,i;i=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,r){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function s(e,t){s.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function u(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach((function(e){t+=f(e)})),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var i="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(i)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function p(e,t,r,n,u,l,d,h){r=r||[],d=d||[];var y=(u=u||[]).slice(0);if(null!=l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var v=n.normalize(y,l,e,t);v&&(e=v[0],t=v[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var m,b,g,_,w=typeof e,O=typeof t,S="undefined"!==w||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,l),E="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new s(y,e));else if(c(e)!==c(t))r.push(new i(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new i(y,e,t));else if("object"===w&&null!==e&&null!==t){for(m=d.length-1;m>-1;--m)if(d[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return f(e)-f(t)})),t.sort((function(e,t){return f(e)-f(t)}))),m=t.length-1,b=e.length-1;m>b;)r.push(new a(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new a(y,b,new s(void 0,e[b--])));for(;m>=0;--m)p(e[m],t[m],r,n,y,m,d,h)}else{var I=Object.keys(e),T=Object.keys(t);for(m=0;m<I.length;++m)g=I[m],(_=T.indexOf(g))>=0?(p(e[g],t[g],r,n,y,g,d,h),T[_]=null):p(e[g],void 0,r,n,y,g,d,h);for(m=0;m<T.length;++m)(g=T[m])&&p(void 0,t[g],r,n,y,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===w&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function d(e,t,r,n,i){var o=[];if(p(e,t,o,n,null,null,null,i),r)for(var s=0;s<o.length;++s)r(o[s]);return o}function h(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(i.length?i:void 0)}function y(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":y(i[r.path[n]],r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}else switch(r.kind){case"A":y(e[t],r.index,r.item);break;case"D":e=u(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function v(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var i=e,o=-1,s=n.path?n.path.length-1:0;++o<s;)void 0===i[n.path[o]]&&(i[n.path[o]]=void 0!==n.path[o+1]&&"number"==typeof n.path[o+1]?[]:{}),i=i[n.path[o]];switch(n.kind){case"A":n.path&&void 0===i[n.path[o]]&&(i[n.path[o]]=[]),y(n.path?i[n.path[o]]:i,n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}}function m(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":m(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}else switch(r.kind){case"A":m(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=u(e,t)}return e}return r(i,n),r(o,n),r(s,n),r(a,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,s){return p(e,t,r,n,i,o,s,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&d(e,t,(function(n){r&&!r(e,t,n)||v(e,t,n)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,i,o=e;for(i=r.path.length-1,n=0;n<i;n++)void 0===o[r.path[n]]&&(o[r.path[n]]={}),o=o[r.path[n]];switch(r.kind){case"A":m(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},6471:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},8784:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",I="[object Promise]",T="[object RegExp]",j="[object Set]",P="[object String]",x="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",M="[object DataView]",k="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,W=RegExp(Q.source),H=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="["+we+"]",xe="["+je+"]",Ae="["+Oe+"]",Ne="\\d+",Me="["+Se+"]",ke="["+Ee+"]",De="[^"+we+je+Ne+Se+Ee+Ie+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+we+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ie+"]",Le="\\u200d",Be="(?:"+ke+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ae+"|"+Re+")?",Ye="["+Te+"]?",We=Ye+Qe+"(?:"+Le+"(?:"+[Ce,$e,Fe].join("|")+")"+Ye+Qe+")*",He="(?:"+[Me,$e,Fe].join("|")+")"+We,Ke="(?:"+[Ce+Ae+"?",Ae,$e,Fe,Pe].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ke+We,"g"),Xe=RegExp([qe+"?"+ke+"+"+Ve+"(?="+[xe,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[xe,qe+Be,"$"].join("|")+")",qe+"?"+Be+"+"+Ve,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,He].join("|"),"g"),et=RegExp("["+Le+we+Oe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[k]=it[D]=it[R]=it[C]=it[$]=it[F]=it[q]=it[L]=it[B]=!0,it[y]=it[v]=it[N]=it[m]=it[M]=it[b]=it[g]=it[_]=it[O]=it[S]=it[E]=it[T]=it[j]=it[P]=it[A]=!1;var ot={};ot[y]=ot[v]=ot[N]=ot[M]=ot[m]=ot[b]=ot[k]=ot[D]=ot[R]=ot[C]=ot[$]=ot[O]=ot[S]=ot[E]=ot[T]=ot[j]=ot[P]=ot[x]=ot[F]=ot[q]=ot[L]=ot[B]=!0,ot[g]=ot[_]=ot[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,yt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,Ot=vt&&vt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function xt(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Mt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function kt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Dt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ct=Vt("length");function $t(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ft(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Bt,r)}function Lt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:p}function Vt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Yt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Wt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ht(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Gt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function Xt(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var er=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function ir(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function or(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ct(e)}function lr(e){return nr(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pr=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,ie=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Ie=t.RegExp,Te=t.String,je=t.TypeError,Pe=n.prototype,xe=Oe.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],Me=xe.toString,ke=Ae.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=Ae.toString,$e=Me.call(Ee),Fe=ft._,qe=Ie("^"+Me.call(ke).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Be=t.Symbol,Ue=t.Uint8Array,Ve=Le?Le.allocUnsafe:i,ze=or(Ee.getPrototypeOf,Ee),Qe=Ee.create,Ye=Ae.propertyIsEnumerable,We=Pe.splice,He=Be?Be.isConcatSpreadable:i,Ke=Be?Be.iterator:i,Ze=Be?Be.toStringTag:i,et=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Se.ceil,dt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=Pe.join,hr=or(Ee.keys,Ee),yr=Se.max,vr=Se.min,mr=ie.now,br=t.parseInt,gr=Se.random,_r=Pe.reverse,wr=uo(t,"DataView"),Or=uo(t,"Map"),Sr=uo(t,"Promise"),Er=uo(t,"Set"),Ir=uo(t,"WeakMap"),Tr=uo(Ee,"create"),jr=Ir&&new Ir,Pr={},xr=$o(wr),Ar=$o(Or),Nr=$o(Sr),Mr=$o(Er),kr=$o(Ir),Dr=Be?Be.prototype:i,Rr=Dr?Dr.valueOf:i,Cr=Dr?Dr.toString:i;function $r(e){if(ea(e)&&!Vs(e)&&!(e instanceof Br)){if(e instanceof Lr)return e;if(ke.call(e,"__wrapped__"))return Fo(e)}return new Lr(e)}var Fr=function(){function e(){}return function(t){if(!Xs(t))return{};if(Qe)return Qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function qr(){}function Lr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Wr(e,t){var r=Vs(e),n=!r&&Us(e),i=!r&&!n&&Ws(e),o=!r&&!n&&!i&&ua(e),s=r||n||i||o,a=s?Wt(e.length,Te):[],u=a.length;for(var c in e)!t&&!ke.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||a.push(c);return a}function Hr(e){var t=e.length;return t?e[Qn(0,t-1)]:i}function Kr(e,t){return Mo(Ti(e),on(t,0,e.length))}function Gr(e){return Mo(Ti(e))}function Jr(e,t,r){(r!==i&&!qs(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];ke.call(e,t)&&qs(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Xr(e,t){for(var r=e.length;r--;)if(qs(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function tn(e,t){return e&&ji(t,Aa(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ia(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!Xs(e))return e;var f=Vs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ke.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ti(e,a)}else{var p=fo(e),d=p==_||p==w;if(Ws(e))return _i(e,u);if(p==E||p==y||d&&!o){if(a=c||d?{}:ho(e),!u)return c?function(e,t){return ji(e,lo(e),t)}(e,function(e,t){return e&&ji(t,Na(t),e)}(a,e)):function(e,t){return ji(e,co(e),t)}(e,tn(a,e))}else{if(!ot[p])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case N:return wi(e);case m:case b:return new i(+e);case M:return function(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case k:case D:case R:case C:case $:case F:case q:case L:case B:return Oi(e,r);case O:return new i;case S:case P:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new i;case x:return n=e,Rr?Ee(Rr.call(n)):{}}}(e,p,u)}}s||(s=new Yr);var h=s.get(e);if(h)return h;s.set(e,a),oa(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,i){a.set(i,sn(n,t,r,i,e,s))}));var v=f?i:(l?c?to:eo:c?Na:Aa)(e);return It(v||e,(function(n,i){v&&(n=e[i=n]),Zr(a,i,sn(n,t,r,i,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new je(o);return Po((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Nt(t,Kt(r))),n?(o=At,s=!1):t.length>=200&&(o=Jt,s=!1,t=new Qr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}$r.templateSettings={escape:K,evaluate:G,interpolate:J,variable:"",imports:{_:$r}},$r.prototype=qr.prototype,$r.prototype.constructor=$r,Lr.prototype=Fr(qr.prototype),Lr.prototype.constructor=Lr,Br.prototype=Fr(qr.prototype),Br.prototype.constructor=Br,Ur.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},Ur.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ur.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===s?i:r}return ke.call(t,e)?t[e]:i},Ur.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==i:ke.call(t,e)},Ur.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=Xr(t,e);return!(r<0||(r==t.length-1?t.pop():We.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=Xr(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return Xr(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Xr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(Or||Vr),string:new Ur}},zr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return so(this,e).get(e)},zr.prototype.has=function(e){return so(this,e).has(e)},zr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Qr.prototype.add=Qr.prototype.push=function(e){return this.__data__.set(e,s),this},Qr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var ln=Ai(bn),fn=Ai(gn,!0);function pn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function dn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function hn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function yn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yn(a,t-1,r,n,i):Mt(i,a):n||(i[i.length]=a)}return i}var vn=Ni(),mn=Ni(!0);function bn(e,t){return e&&vn(e,t,Aa)}function gn(e,t){return e&&mn(e,t,Aa)}function _n(e,t){return Pt(t,(function(t){return Gs(e[t])}))}function wn(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&r<n;)e=e[Co(t[r++])];return r&&r==n?e:i}function On(e,t,r){var n=t(e);return Vs(e)?n:Mt(n,r(e))}function Sn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=ke.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(e){}var o=Ce.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Ce.call(e)}(e)}function En(e,t){return e>t}function In(e,t){return null!=e&&ke.call(e,t)}function Tn(e,t){return null!=e&&t in Ee(e)}function jn(e,t,r){for(var o=r?At:xt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Nt(p,Kt(t))),l=vr(p.length,l),c[u]=!r&&(t||s>=120&&p.length>=120)?new Qr(u&&p):i}p=e[0];var d=-1,h=c[0];e:for(;++d<s&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=a;--u;){var m=c[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}h&&h.push(v),f.push(y)}}return f}function Pn(e,t,r){var n=null==(e=Io(e,t=vi(t,e)))?e:e[Co(Ko(t))];return null==n?i:St(n,e,r)}function xn(e){return ea(e)&&Sn(e)==y}function An(e,t,r,n,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Vs(e),u=Vs(t),c=a?v:fo(e),l=u?v:fo(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ws(e)){if(!Ws(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new Yr),a||ua(e)?Zi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return qs(+e,+t);case g:return e.name==t.name&&e.message==t.message;case T:case P:return e==t+"";case O:var a=ir;case j:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Zi(a(e),a(t),n,i,o,s);return s.delete(e),l;case x:if(Rr)return Rr.call(e)==Rr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var h=f&&ke.call(e,"__wrapped__"),_=p&&ke.call(t,"__wrapped__");if(h||_){var w=h?e.value():e,I=_?t.value():t;return s||(s=new Yr),o(w,I,r,n,s)}}return!!d&&(s||(s=new Yr),function(e,t,r,n,o,s){var a=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:ke.call(t,f)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=a?n(m,v,f,t,e,s):n(v,m,f,e,t,s);if(!(b===i?v===m||o(v,m,r,n,s):b)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,An,o))}function Nn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Yr;if(n)var d=n(l,f,c,e,t,p);if(!(d===i?An(f,l,3,n,p):d))return!1}}return!0}function Mn(e){return!(!Xs(e)||(t=e,Re&&Re in t))&&(Gs(e)?qe:ye).test($o(e));var t}function kn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?Fn(e[0],e[1]):$n(e):fu(e)}function Dn(e){if(!wo(e))return hr(e);var t=[];for(var r in Ee(e))ke.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Rn(e,t){return e<t}function Cn(e,t){var r=-1,i=Qs(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function $n(e){var t=ao(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Fn(e,t){return bo(e)&&Oo(t)?So(Co(e),t):function(r){var n=Ia(r,e);return n===i&&n===t?Ta(r,e):An(t,n,3)}}function qn(e,t,r,n,o){e!==t&&vn(t,(function(s,a){if(o||(o=new Yr),Xs(s))!function(e,t,r,n,o,s,a){var u=To(e,r),c=To(t,r),l=a.get(c);if(l)Jr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,p=f===i;if(p){var d=Vs(c),h=!d&&Ws(c),y=!d&&!h&&ua(c);f=c,d||h||y?Vs(u)?f=u:Ys(u)?f=Ti(u):h?(p=!1,f=_i(c,!0)):y?(p=!1,f=Oi(c,!0)):f=[]:na(c)||Us(c)?(f=u,Us(u)?f=va(u):Xs(u)&&!Gs(u)||(f=ho(c))):p=!1}p&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Jr(e,r,f)}}(e,t,a,r,qn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Jr(e,a,u)}}),Na)}function Ln(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Bn(e,t,r){t=t.length?Nt(t,(function(e){return Vs(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Nt(t,Kt(oo()));var i=Cn(e,(function(e,r,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Si(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=wn(e,s);r(a,s)&&Gn(o,vi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Lt:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),r&&(a=Nt(e,Kt(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&We.call(a,u,1),We.call(e,u,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;vo(i)?We.call(e,i,1):ui(e,i)}}return e}function Qn(e,t){return e+dt(gr()*(t-e+1))}function Yn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Wn(e,t){return xo(Eo(e,t,ru),e+"")}function Hn(e){return Hr(qa(e))}function Kn(e,t){var r=qa(e);return Mo(r,on(t,0,r.length))}function Gn(e,t,r,n){if(!Xs(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Co(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Xs(f)?f:vo(t[o+1])?[]:{})}Zr(u,c,l),u=u[c]}return e}var Jn=jr?function(e,t){return jr.set(e,t),e}:ru,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:ru;function Xn(e){return Mo(qa(e))}function ei(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ri(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===i;o<s;){var f=dt((o+s)/2),p=r(e[f]),d=p!==i,h=null===p,y=p==p,v=aa(p);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!h):c?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=t:p<t);m?o=f+1:s=f}return vr(s,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!qs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Vs(e))return Nt(e,si)+"";if(aa(e))return Cr?Cr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,r){var n=-1,i=xt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=At;else if(o>=200){var c=t?null:Yi(e);if(c)return ar(c);s=!1,i=Jt,u=new Qr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ui(e,t){return null==(e=Io(e,t=vi(t,e)))||delete e[Co(Ko(t))]}function ci(e,t,r,n){return Gn(e,t,r(wn(e,t)),n)}function li(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ei(e,n?0:o,n?o+1:i):ei(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Br&&(r=r.value()),kt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ai(yn(s,1),t,r)}function di(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function hi(e){return Ys(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function vi(e,t){return Vs(e)?e:bo(e,t)?[e]:Ro(ma(e))}var mi=Wn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ei(e,t,r)}var gi=st||function(e){return ft.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function wi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Oi(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<a;)(p||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ii(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),p=n(f+l),d=!i;++o<f;)p[o]=e[o];for(var h=o;++c<l;)p[h+c]=t[c];for(;++a<u;)(d||o<s)&&(p[h+r[a]]=e[o++]);return p}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function ji(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?rn(r,u,c):Zr(r,u,c)}return r}function Pi(e,t){return function(r,n){var i=Vs(r)?Et:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function xi(e){return Wn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ai(e,t){return function(r,n){if(null==r)return r;if(!Qs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ni(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=nr(t=ma(t))?lr(t):i,n=r?r[0]:t.charAt(0),o=r?bi(r,1).join(""):t.slice(1);return n[e]()+o}}function ki(e){return function(t){return kt(Ga(Ua(t).replace(Ge,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Fr(e.prototype),n=e.apply(r,t);return Xs(n)?n:r}}function Ri(e){return function(t,r,n){var o=Ee(t);if(!Qs(t)){var s=oo(r,3);t=Aa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Ci(e){return Xi((function(t){var r=t.length,n=r,s=Lr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new je(o);if(s&&!u&&"wrapper"==no(a))var u=new Lr([],!0)}for(n=u?n:r;++n<r;){var c=no(a=t[n]),l="wrapper"==c?ro(a):i;u=l&&go(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&go(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Vs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function $i(e,t,r,o,s,a,u,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,m=512&t,b=y?i:Di(e);return function c(){for(var g=arguments.length,_=n(g),w=g;w--;)_[w]=arguments[w];if(v)var O=io(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,O);if(o&&(_=Ei(_,o,s,v)),a&&(_=Ii(_,a,u,v)),g-=S,v&&g<p){var E=sr(_,O);return zi(e,t,$i,c.placeholder,r,_,E,l,f,p-g)}var I=h?r:this,T=y?I[e]:e;return g=_.length,l?_=function(e,t){for(var r=e.length,n=vr(t.length,r),o=Ti(e);n--;){var s=t[n];e[n]=vo(s,r)?o[s]:i}return e}(_,l):m&&g>1&&_.reverse(),d&&f<g&&(_.length=f),this&&this!==ft&&this instanceof c&&(T=b||Di(T)),T.apply(I,_)}}function Fi(e,t){return function(r,n){return function(e,t,r,n){return bn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function qi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Li(e){return Xi((function(t){return t=Nt(t,Kt(oo())),Wn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Bi(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?Yn(t,e):t;var n=Yn(t,pt(e/cr(t)));return nr(t)?bi(lr(n),0,e).join(""):n.slice(0,e)}function Ui(e){return function(t,r,o){return o&&"number"!=typeof o&&mo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=yr(pt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function zi(e,t,r,n,o,s,a,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,o,p?s:i,p?a:i,p?i:s,p?i:a,c,l,f],h=r.apply(i,d);return go(e)&&jo(h,d),h.placeholder=n,Ao(h,e,t)}function Qi(e){var t=Se[e];return function(e,r){if(e=ya(e),(r=null==r?0:vr(da(r),292))&&Ct(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yi=Er&&1/ar(new Er([,-0]))[1]==l?function(e){return new Er(e)}:au;function Wi(e){return function(t){var r=fo(t);return r==O?ir(t):r==j?ur(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Hi(e,t,r,s,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new je(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),p=p===i?p:yr(da(p),0),d=d===i?d:da(d),y-=l?l.length:0,64&t){var v=s,m=l;s=l=i}var b=h?i:ro(e),g=[e,t,r,s,l,v,m,f,p,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ei(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ii(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:vr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,b),e=g[0],t=g[1],r=g[2],s=g[3],l=g[4],!(d=g[9]=g[9]===i?h?0:e.length:yr(g[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var o=Di(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=io(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?zi(e,t,$i,s.placeholder,i,u,f,i,i,r-a):St(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?$i.apply(i,g):function(e,t,r,i){var o=1&t,s=Di(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),p=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return St(p,o?r:this,f)}}(e,t,r,s);else var _=function(e,t,r){var n=1&t,i=Di(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Ao((b?Jn:jo)(_,g),e,t)}function Ki(e,t,r,n){return e===i||qs(e,Ae[r])&&!ke.call(n,r)?t:e}function Gi(e,t,r,n,o,s){return Xs(e)&&Xs(t)&&(s.set(t,e),qn(e,t,i,Gi,s),s.delete(t)),e}function Ji(e){return na(e)?i:e}function Zi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&r?new Qr:i;for(s.set(e,t),s.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var m=a?n(v,y,p,t,e,s):n(y,v,p,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,s)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Xi(e){return xo(Eo(e,i,zo),e+"")}function eo(e){return On(e,Aa,co)}function to(e){return On(e,Na,lo)}var ro=jr?function(e){return jr.get(e)}:au;function no(e){for(var t=e.name+"",r=Pr[t],n=ke.call(Pr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(ke.call($r,"placeholder")?$r:e).placeholder}function oo(){var e=$r.iteratee||nu;return e=e===nu?kn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=Aa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Oo(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Mn(r)?r:i}var co=yt?function(e){return null==e?[]:(e=Ee(e),Pt(yt(e),(function(t){return Ye.call(e,t)})))}:hu,lo=yt?function(e){for(var t=[];e;)Mt(t,co(e)),e=ze(e);return t}:hu,fo=Sn;function po(e,t,r){for(var n=-1,i=(t=vi(t,e)).length,o=!1;++n<i;){var s=Co(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Zs(i)&&vo(s,i)&&(Vs(e)||Us(e))}function ho(e){return"function"!=typeof e.constructor||wo(e)?{}:Fr(ze(e))}function yo(e){return Vs(e)||Us(e)||!!(He&&e&&e[He])}function vo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Xs(r))return!1;var n=typeof t;return!!("number"==n?Qs(r)&&vo(t,r.length):"string"==n&&t in r)&&qs(r[t],e)}function bo(e,t){if(Vs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function go(e){var t=no(e),r=$r[t];if("function"!=typeof r||!(t in Br.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(wr&&fo(new wr(new ArrayBuffer(1)))!=M||Or&&fo(new Or)!=O||Sr&&fo(Sr.resolve())!=I||Er&&fo(new Er)!=j||Ir&&fo(new Ir)!=A)&&(fo=function(e){var t=Sn(e),r=t==E?e.constructor:i,n=r?$o(r):"";if(n)switch(n){case xr:return M;case Ar:return O;case Nr:return I;case Mr:return j;case kr:return A}return t});var _o=Ne?Gs:yu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oo(e){return e==e&&!Xs(e)}function So(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function Eo(e,t,r){return t=yr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),St(e,this,u)}}function Io(e,t){return t.length<2?e:wn(e,ei(t,0,-1))}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=No(Jn),Po=lt||function(e,t){return ft.setTimeout(e,t)},xo=No(Zn);function Ao(e,t,r){var n=t+"";return xo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return It(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function No(e){var t=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Mo(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Qn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var ko,Do,Ro=(ko=ks((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Do.size&&Do.clear(),e})),Do=ko.cache,ko);function Co(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $o(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof Br)return e.clone();var t=new Lr(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var qo=Wn((function(e,t){return Ys(e)?cn(e,yn(t,1,Ys,!0)):[]})),Lo=Wn((function(e,t){var r=Ko(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),oo(r,2)):[]})),Bo=Wn((function(e,t){var r=Ko(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),i,r):[]}));function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ft(e,oo(t,3),i)}function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=da(r),o=r<0?yr(n+o,0):vr(o,n-1)),Ft(e,oo(t,3),o,!0)}function zo(e){return null!=e&&e.length?yn(e,1):[]}function Qo(e){return e&&e.length?e[0]:i}var Yo=Wn((function(e){var t=Nt(e,hi);return t.length&&t[0]===e[0]?jn(t):[]})),Wo=Wn((function(e){var t=Ko(e),r=Nt(e,hi);return t===Ko(r)?t=i:r.pop(),r.length&&r[0]===e[0]?jn(r,oo(t,2)):[]})),Ho=Wn((function(e){var t=Ko(e),r=Nt(e,hi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?jn(r,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Go=Wn(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var Zo=Xi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return zn(e,Nt(t,(function(e){return vo(e,r)?+e:e})).sort(Si)),n}));function Xo(e){return null==e?e:_r.call(e)}var es=Wn((function(e){return ai(yn(e,1,Ys,!0))})),ts=Wn((function(e){var t=Ko(e);return Ys(t)&&(t=i),ai(yn(e,1,Ys,!0),oo(t,2))})),rs=Wn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,ai(yn(e,1,Ys,!0),i,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Ys(e))return t=yr(e.length,t),!0})),Wt(t,(function(t){return Nt(e,Vt(t))}))}function is(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Nt(r,(function(e){return St(t,i,e)}))}var os=Wn((function(e,t){return Ys(e)?cn(e,t):[]})),ss=Wn((function(e){return pi(Pt(e,Ys))})),as=Wn((function(e){var t=Ko(e);return Ys(t)&&(t=i),pi(Pt(e,Ys),oo(t,2))})),us=Wn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,pi(Pt(e,Ys),i,t)})),cs=Wn(ns),ls=Wn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)}));function fs(e){var t=$r(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ds=Xi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Br&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new Lr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),hs=Pi((function(e,t,r){ke.call(e,r)?++e[r]:rn(e,r,1)})),ys=Ri(Uo),vs=Ri(Vo);function ms(e,t){return(Vs(e)?It:ln)(e,oo(t,3))}function bs(e,t){return(Vs(e)?Tt:fn)(e,oo(t,3))}var gs=Pi((function(e,t,r){ke.call(e,r)?e[r].push(t):rn(e,r,[t])})),_s=Wn((function(e,t,r){var i=-1,o="function"==typeof t,s=Qs(e)?n(e.length):[];return ln(e,(function(e){s[++i]=o?St(t,e,r):Pn(e,t,r)})),s})),ws=Pi((function(e,t,r){rn(e,r,t)}));function Os(e,t){return(Vs(e)?Nt:Cn)(e,oo(t,3))}var Ss=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Es=Wn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,yn(t,1),[])})),Is=ct||function(){return ft.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Hi(e,c,i,i,i,i,t)}function js(e,t){var r;if("function"!=typeof t)throw new je(o);return e=da(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ps=Wn((function(e,t,r){var n=1;if(r.length){var i=sr(r,io(Ps));n|=u}return Hi(e,n,t,r,i)})),xs=Wn((function(e,t,r){var n=3;if(r.length){var i=sr(r,io(xs));n|=u}return Hi(t,n,e,r,i)}));function As(e,t,r){var n,s,a,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new je(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function v(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function m(){var e=Is();if(v(e))return b(e);c=Po(m,function(e){var r=t-(e-l);return d?vr(r,a-(e-f)):r}(e))}function b(e){return c=i,h&&n?y(e):(n=s=i,u)}function g(){var e=Is(),r=v(e);if(n=arguments,s=this,l=e,r){if(c===i)return function(e){return f=e,c=Po(m,t),p?y(e):u}(l);if(d)return gi(c),c=Po(m,t),y(l)}return c===i&&(c=Po(m,t)),u}return t=ya(t)||0,Xs(r)&&(p=!!r.leading,a=(d="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),g.cancel=function(){c!==i&&gi(c),f=0,n=l=s=c=i},g.flush=function(){return c===i?u:b(Is())},g}var Ns=Wn((function(e,t){return un(e,1,t)})),Ms=Wn((function(e,t,r){return un(e,ya(t)||0,r)}));function ks(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ks.Cache||zr),r}function Ds(e){if("function"!=typeof e)throw new je(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ks.Cache=zr;var Rs=mi((function(e,t){var r=(t=1==t.length&&Vs(t[0])?Nt(t[0],Kt(oo())):Nt(yn(t,1),Kt(oo()))).length;return Wn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Cs=Wn((function(e,t){var r=sr(t,io(Cs));return Hi(e,u,i,t,r)})),$s=Wn((function(e,t){var r=sr(t,io($s));return Hi(e,64,i,t,r)})),Fs=Xi((function(e,t){return Hi(e,256,i,i,i,t)}));function qs(e,t){return e===t||e!=e&&t!=t}var Ls=Vi(En),Bs=Vi((function(e,t){return e>=t})),Us=xn(function(){return arguments}())?xn:function(e){return ea(e)&&ke.call(e,"callee")&&!Ye.call(e,"callee")},Vs=n.isArray,zs=mt?Kt(mt):function(e){return ea(e)&&Sn(e)==N};function Qs(e){return null!=e&&Zs(e.length)&&!Gs(e)}function Ys(e){return ea(e)&&Qs(e)}var Ws=vt||yu,Hs=bt?Kt(bt):function(e){return ea(e)&&Sn(e)==b};function Ks(e){if(!ea(e))return!1;var t=Sn(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Gs(e){if(!Xs(e))return!1;var t=Sn(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Js(e){return"number"==typeof e&&e==da(e)}function Zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=gt?Kt(gt):function(e){return ea(e)&&fo(e)==O};function ra(e){return"number"==typeof e||ea(e)&&Sn(e)==S}function na(e){if(!ea(e)||Sn(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=ke.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==$e}var ia=_t?Kt(_t):function(e){return ea(e)&&Sn(e)==T},oa=wt?Kt(wt):function(e){return ea(e)&&fo(e)==j};function sa(e){return"string"==typeof e||!Vs(e)&&ea(e)&&Sn(e)==P}function aa(e){return"symbol"==typeof e||ea(e)&&Sn(e)==x}var ua=Ot?Kt(Ot):function(e){return ea(e)&&Zs(e.length)&&!!it[Sn(e)]},ca=Vi(Rn),la=Vi((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Qs(e))return sa(e)?lr(e):Ti(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=fo(e);return(t==O?ir:t==j?ar:qa)(e)}function pa(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ha(e){return e?on(da(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return p;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):de.test(e)?p:+e}function va(e){return ji(e,Na(e))}function ma(e){return null==e?"":si(e)}var ba=xi((function(e,t){if(wo(t)||Qs(t))ji(t,Aa(t),e);else for(var r in t)ke.call(t,r)&&Zr(e,r,t[r])})),ga=xi((function(e,t){ji(t,Na(t),e)})),_a=xi((function(e,t,r,n){ji(t,Na(t),e,n)})),wa=xi((function(e,t,r,n){ji(t,Aa(t),e,n)})),Oa=Xi(nn),Sa=Wn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||qs(f,Ae[l])&&!ke.call(e,l))&&(e[l]=s[l])}return e})),Ea=Wn((function(e){return e.push(i,Gi),St(ka,i,e)}));function Ia(e,t,r){var n=null==e?i:wn(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,Tn)}var ja=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),Xa(ru)),Pa=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ke.call(e,t)?e[t].push(r):e[t]=[r]}),oo),xa=Wn(Pn);function Aa(e){return Qs(e)?Wr(e):Dn(e)}function Na(e){return Qs(e)?Wr(e,!0):function(e){if(!Xs(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=wo(e),r=[];for(var n in e)("constructor"!=n||!t&&ke.call(e,n))&&r.push(n);return r}(e)}var Ma=xi((function(e,t,r){qn(e,t,r)})),ka=xi((function(e,t,r,n){qn(e,t,r,n)})),Da=Xi((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),ji(e,to(e),r),n&&(r=sn(r,7,Ji));for(var i=t.length;i--;)ui(r,t[i]);return r})),Ra=Xi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function Ca(e,t){if(null==e)return{};var r=Nt(to(e),(function(e){return[e]}));return t=oo(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var $a=Wi(Aa),Fa=Wi(Na);function qa(e){return null==e?[]:Gt(e,Aa(e))}var La=ki((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ka(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(be,er).replace(Je,"")}var Va=ki((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=ki((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Qa=Mi("toLowerCase"),Ya=ki((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Wa=ki((function(e,t,r){return e+(r?" ":"")+Ka(t)})),Ha=ki((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ka=Mi("toUpperCase");function Ga(e,t,r){return e=ma(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ja=Wn((function(e,t){try{return St(e,i,t)}catch(e){return Ks(e)?e:new we(e)}})),Za=Xi((function(e,t){return It(t,(function(t){t=Co(t),rn(e,t,Ps(e[t],e))})),e}));function Xa(e){return function(){return e}}var eu=Ci(),tu=Ci(!0);function ru(e){return e}function nu(e){return kn("function"==typeof e?e:sn(e,1))}var iu=Wn((function(e,t){return function(r){return Pn(r,e,t)}})),ou=Wn((function(e,t){return function(r){return Pn(e,r,t)}}));function su(e,t,r){var n=Aa(t),i=_n(t,n);null!=r||Xs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=_n(t,Aa(t)));var o=!(Xs(r)&&"chain"in r&&!r.chain),s=Gs(e);return It(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ti(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function au(){}var uu=Li(Nt),cu=Li(jt),lu=Li(Rt);function fu(e){return bo(e)?Vt(Co(e)):function(e){return function(t){return wn(t,e)}}(e)}var pu=Ui(),du=Ui(!0);function hu(){return[]}function yu(){return!1}var vu,mu=qi((function(e,t){return e+t}),0),bu=Qi("ceil"),gu=qi((function(e,t){return e/t}),1),_u=Qi("floor"),wu=qi((function(e,t){return e*t}),1),Ou=Qi("round"),Su=qi((function(e,t){return e-t}),0);return $r.after=function(e,t){if("function"!=typeof t)throw new je(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},$r.ary=Ts,$r.assign=ba,$r.assignIn=ga,$r.assignInWith=_a,$r.assignWith=wa,$r.at=Oa,$r.before=js,$r.bind=Ps,$r.bindAll=Za,$r.bindKey=xs,$r.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},$r.chain=fs,$r.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(pt(o/t));s<o;)u[a++]=ei(e,s,s+=t);return u},$r.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},$r.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(Vs(r)?Ti(r):[r],yn(t,1))},$r.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new je(o);return[r(e[0]),e[1]]})):[],Wn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},$r.conforms=function(e){return function(e){var t=Aa(e);return function(r){return an(r,e,t)}}(sn(e,1))},$r.constant=Xa,$r.countBy=hs,$r.create=function(e,t){var r=Fr(e);return null==t?r:tn(r,t)},$r.curry=function e(t,r,n){var o=Hi(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.curryRight=function e(t,r,n){var o=Hi(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.debounce=As,$r.defaults=Sa,$r.defaultsDeep=Ea,$r.defer=Ns,$r.delay=Ms,$r.difference=qo,$r.differenceBy=Lo,$r.differenceWith=Bo,$r.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:da(t))<0?0:t,n):[]},$r.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:da(t)))<0?0:t):[]},$r.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},$r.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},$r.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&mo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=da(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:da(n))<0&&(n+=o),n=r>n?0:ha(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},$r.filter=function(e,t){return(Vs(e)?Pt:hn)(e,oo(t,3))},$r.flatMap=function(e,t){return yn(Os(e,t),1)},$r.flatMapDeep=function(e,t){return yn(Os(e,t),l)},$r.flatMapDepth=function(e,t,r){return r=r===i?1:da(r),yn(Os(e,t),r)},$r.flatten=zo,$r.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},$r.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:da(t)):[]},$r.flip=function(e){return Hi(e,512)},$r.flow=eu,$r.flowRight=tu,$r.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},$r.functions=function(e){return null==e?[]:_n(e,Aa(e))},$r.functionsIn=function(e){return null==e?[]:_n(e,Na(e))},$r.groupBy=gs,$r.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},$r.intersection=Yo,$r.intersectionBy=Wo,$r.intersectionWith=Ho,$r.invert=ja,$r.invertBy=Pa,$r.invokeMap=_s,$r.iteratee=nu,$r.keyBy=ws,$r.keys=Aa,$r.keysIn=Na,$r.map=Os,$r.mapKeys=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,t(e,n,i),e)})),r},$r.mapValues=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,n,t(e,n,i))})),r},$r.matches=function(e){return $n(sn(e,1))},$r.matchesProperty=function(e,t){return Fn(e,sn(t,1))},$r.memoize=ks,$r.merge=Ma,$r.mergeWith=ka,$r.method=iu,$r.methodOf=ou,$r.mixin=su,$r.negate=Ds,$r.nthArg=function(e){return e=da(e),Wn((function(t){return Ln(t,e)}))},$r.omit=Da,$r.omitBy=function(e,t){return Ca(e,Ds(oo(t)))},$r.once=function(e){return js(2,e)},$r.orderBy=function(e,t,r,n){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(r=n?i:r)||(r=null==r?[]:[r]),Bn(e,t,r))},$r.over=uu,$r.overArgs=Rs,$r.overEvery=cu,$r.overSome=lu,$r.partial=Cs,$r.partialRight=$s,$r.partition=Ss,$r.pick=Ra,$r.pickBy=Ca,$r.property=fu,$r.propertyOf=function(e){return function(t){return null==e?i:wn(e,t)}},$r.pull=Go,$r.pullAll=Jo,$r.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,oo(r,2)):e},$r.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},$r.pullAt=Zo,$r.range=pu,$r.rangeRight=du,$r.rearg=Fs,$r.reject=function(e,t){return(Vs(e)?Pt:hn)(e,Ds(oo(t,3)))},$r.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=oo(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return zn(e,i),r},$r.rest=function(e,t){if("function"!=typeof e)throw new je(o);return Wn(e,t=t===i?t:da(t))},$r.reverse=Xo,$r.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),(Vs(e)?Kr:Kn)(e,t)},$r.set=function(e,t,r){return null==e?e:Gn(e,t,r)},$r.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Gn(e,t,r,n)},$r.shuffle=function(e){return(Vs(e)?Gr:Xn)(e)},$r.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&mo(e,t,r)?(t=0,r=n):(t=null==t?0:da(t),r=r===i?n:da(r)),ei(e,t,r)):[]},$r.sortBy=Es,$r.sortedUniq=function(e){return e&&e.length?ii(e):[]},$r.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},$r.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},$r.spread=function(e,t){if("function"!=typeof e)throw new je(o);return t=null==t?0:yr(da(t),0),Wn((function(r){var n=r[t],i=bi(r,0,t);return n&&Mt(i,n),St(e,this,i)}))},$r.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},$r.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:da(t))<0?0:t):[]},$r.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:da(t)))<0?0:t,n):[]},$r.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},$r.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},$r.tap=function(e,t){return t(e),e},$r.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new je(o);return Xs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),As(e,t,{leading:n,maxWait:t,trailing:i})},$r.thru=ps,$r.toArray=fa,$r.toPairs=$a,$r.toPairsIn=Fa,$r.toPath=function(e){return Vs(e)?Nt(e,Co):aa(e)?[e]:Ti(Ro(ma(e)))},$r.toPlainObject=va,$r.transform=function(e,t,r){var n=Vs(e),i=n||Ws(e)||ua(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Xs(e)&&Gs(o)?Fr(ze(e)):{}}return(i?It:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},$r.unary=function(e){return Ts(e,1)},$r.union=es,$r.unionBy=ts,$r.unionWith=rs,$r.uniq=function(e){return e&&e.length?ai(e):[]},$r.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},$r.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},$r.unset=function(e,t){return null==e||ui(e,t)},$r.unzip=ns,$r.unzipWith=is,$r.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},$r.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},$r.values=qa,$r.valuesIn=function(e){return null==e?[]:Gt(e,Na(e))},$r.without=os,$r.words=Ga,$r.wrap=function(e,t){return Cs(yi(t),e)},$r.xor=ss,$r.xorBy=as,$r.xorWith=us,$r.zip=cs,$r.zipObject=function(e,t){return di(e||[],t||[],Zr)},$r.zipObjectDeep=function(e,t){return di(e||[],t||[],Gn)},$r.zipWith=ls,$r.entries=$a,$r.entriesIn=Fa,$r.extend=ga,$r.extendWith=_a,su($r,$r),$r.add=mu,$r.attempt=Ja,$r.camelCase=La,$r.capitalize=Ba,$r.ceil=bu,$r.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},$r.clone=function(e){return sn(e,4)},$r.cloneDeep=function(e){return sn(e,5)},$r.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},$r.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},$r.conformsTo=function(e,t){return null==t||an(e,t,Aa(t))},$r.deburr=Ua,$r.defaultTo=function(e,t){return null==e||e!=e?t:e},$r.divide=gu,$r.endsWith=function(e,t,r){e=ma(e),t=si(t);var n=e.length,o=r=r===i?n:on(da(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},$r.eq=qs,$r.escape=function(e){return(e=ma(e))&&H.test(e)?e.replace(Y,tr):e},$r.escapeRegExp=function(e){return(e=ma(e))&&re.test(e)?e.replace(te,"\\$&"):e},$r.every=function(e,t,r){var n=Vs(e)?jt:pn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.find=ys,$r.findIndex=Uo,$r.findKey=function(e,t){return $t(e,oo(t,3),bn)},$r.findLast=vs,$r.findLastIndex=Vo,$r.findLastKey=function(e,t){return $t(e,oo(t,3),gn)},$r.floor=_u,$r.forEach=ms,$r.forEachRight=bs,$r.forIn=function(e,t){return null==e?e:vn(e,oo(t,3),Na)},$r.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),Na)},$r.forOwn=function(e,t){return e&&bn(e,oo(t,3))},$r.forOwnRight=function(e,t){return e&&gn(e,oo(t,3))},$r.get=Ia,$r.gt=Ls,$r.gte=Bs,$r.has=function(e,t){return null!=e&&po(e,t,In)},$r.hasIn=Ta,$r.head=Qo,$r.identity=ru,$r.includes=function(e,t,r,n){e=Qs(e)?e:qa(e),r=r&&!n?da(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),sa(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},$r.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),qt(e,t,i)},$r.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},$r.invoke=xa,$r.isArguments=Us,$r.isArray=Vs,$r.isArrayBuffer=zs,$r.isArrayLike=Qs,$r.isArrayLikeObject=Ys,$r.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Sn(e)==m},$r.isBuffer=Ws,$r.isDate=Hs,$r.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},$r.isEmpty=function(e){if(null==e)return!0;if(Qs(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ws(e)||ua(e)||Us(e)))return!e.length;var t=fo(e);if(t==O||t==j)return!e.size;if(wo(e))return!Dn(e).length;for(var r in e)if(ke.call(e,r))return!1;return!0},$r.isEqual=function(e,t){return An(e,t)},$r.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?An(e,t,i,r):!!n},$r.isError=Ks,$r.isFinite=function(e){return"number"==typeof e&&Ct(e)},$r.isFunction=Gs,$r.isInteger=Js,$r.isLength=Zs,$r.isMap=ta,$r.isMatch=function(e,t){return e===t||Nn(e,t,ao(t))},$r.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Nn(e,t,ao(t),r)},$r.isNaN=function(e){return ra(e)&&e!=+e},$r.isNative=function(e){if(_o(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},$r.isNil=function(e){return null==e},$r.isNull=function(e){return null===e},$r.isNumber=ra,$r.isObject=Xs,$r.isObjectLike=ea,$r.isPlainObject=na,$r.isRegExp=ia,$r.isSafeInteger=function(e){return Js(e)&&e>=-9007199254740991&&e<=f},$r.isSet=oa,$r.isString=sa,$r.isSymbol=aa,$r.isTypedArray=ua,$r.isUndefined=function(e){return e===i},$r.isWeakMap=function(e){return ea(e)&&fo(e)==A},$r.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Sn(e)},$r.join=function(e,t){return null==e?"":zt.call(e,t)},$r.kebabCase=Va,$r.last=Ko,$r.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=da(r))<0?yr(n+o,0):vr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ft(e,Bt,o,!0)},$r.lowerCase=za,$r.lowerFirst=Qa,$r.lt=ca,$r.lte=la,$r.max=function(e){return e&&e.length?dn(e,ru,En):i},$r.maxBy=function(e,t){return e&&e.length?dn(e,oo(t,2),En):i},$r.mean=function(e){return Ut(e,ru)},$r.meanBy=function(e,t){return Ut(e,oo(t,2))},$r.min=function(e){return e&&e.length?dn(e,ru,Rn):i},$r.minBy=function(e,t){return e&&e.length?dn(e,oo(t,2),Rn):i},$r.stubArray=hu,$r.stubFalse=yu,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=wu,$r.nth=function(e,t){return e&&e.length?Ln(e,da(t)):i},$r.noConflict=function(){return ft._===this&&(ft._=Fe),this},$r.noop=au,$r.now=Is,$r.pad=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Bi(dt(i),r)+e+Bi(pt(i),r)},$r.padEnd=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?e+Bi(t-n,r):e},$r.padStart=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?Bi(t-n,r)+e:e},$r.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ma(e).replace(ne,""),t||0)},$r.random=function(e,t,r){if(r&&"boolean"!=typeof r&&mo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=gr();return vr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Qn(e,t)},$r.reduce=function(e,t,r){var n=Vs(e)?kt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},$r.reduceRight=function(e,t,r){var n=Vs(e)?Dt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},$r.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),Yn(ma(e),t)},$r.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$r.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Co(t[n])];s===i&&(n=o,s=r),e=Gs(s)?s.call(e):s}return e},$r.round=Ou,$r.runInContext=e,$r.sample=function(e){return(Vs(e)?Hr:Hn)(e)},$r.size=function(e){if(null==e)return 0;if(Qs(e))return sa(e)?cr(e):e.length;var t=fo(e);return t==O||t==j?e.size:Dn(e).length},$r.snakeCase=Ya,$r.some=function(e,t,r){var n=Vs(e)?Rt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.sortedIndex=function(e,t){return ri(e,t)},$r.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},$r.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&qs(e[n],t))return n}return-1},$r.sortedLastIndex=function(e,t){return ri(e,t,!0)},$r.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},$r.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(qs(e[r],t))return r}return-1},$r.startCase=Wa,$r.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:on(da(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},$r.subtract=Su,$r.sum=function(e){return e&&e.length?Yt(e,ru):0},$r.sumBy=function(e,t){return e&&e.length?Yt(e,oo(t,2)):0},$r.template=function(e,t,r){var n=$r.templateSettings;r&&mo(e,t,r)&&(t=i),e=ma(e),t=_a({},t,n,Ki);var o,s,a=_a({},t.imports,n.imports,Ki),u=Aa(a),c=Gt(a,u),l=0,f=t.interpolate||ge,p="__p += '",d=Ie((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),p+=e.slice(l,u).replace(_e,rr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var y=ke.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(U,""):p).replace(V,"$1").replace(z,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Ja((function(){return Oe(u,h+"return "+p).apply(i,c)}));if(v.source=p,Ks(v))throw v;return v},$r.times=function(e,t){if((e=da(e))<1||e>f)return[];var r=d,n=vr(e,d);t=oo(t),e-=d;for(var i=Wt(n,t);++r<e;)t(r);return i},$r.toFinite=pa,$r.toInteger=da,$r.toLength=ha,$r.toLower=function(e){return ma(e).toLowerCase()},$r.toNumber=ya,$r.toSafeInteger=function(e){return e?on(da(e),-9007199254740991,f):0===e?e:0},$r.toString=ma,$r.toUpper=function(e){return ma(e).toUpperCase()},$r.trim=function(e,t,r){if((e=ma(e))&&(r||t===i))return Ht(e);if(!e||!(t=si(t)))return e;var n=lr(e),o=lr(t);return bi(n,Zt(n,o),Xt(n,o)+1).join("")},$r.trimEnd=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,0,Xt(n,lr(t))+1).join("")},$r.trimStart=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,Zt(n,lr(t))).join("")},$r.truncate=function(e,t){var r=30,n="...";if(Xs(t)){var o="separator"in t?t.separator:o;r="length"in t?da(t.length):r,n="omission"in t?si(t.omission):n}var s=(e=ma(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),ia(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,ma(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},$r.unescape=function(e){return(e=ma(e))&&W.test(e)?e.replace(Q,pr):e},$r.uniqueId=function(e){var t=++De;return ma(e)+t},$r.upperCase=Ha,$r.upperFirst=Ka,$r.each=ms,$r.eachRight=bs,$r.first=Qo,su($r,(vu={},bn($r,(function(e,t){ke.call($r.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),$r.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$r[e].placeholder=$r})),It(["drop","take"],(function(e,t){Br.prototype[e]=function(r){r=r===i?1:yr(da(r),0);var n=this.__filtered__&&!t?new Br(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Br.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Br.prototype[e]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(ru)},Br.prototype.find=function(e){return this.filter(e).head()},Br.prototype.findLast=function(e){return this.reverse().find(e)},Br.prototype.invokeMap=Wn((function(e,t){return"function"==typeof e?new Br(this):this.map((function(r){return Pn(r,e,t)}))})),Br.prototype.reject=function(e){return this.filter(Ds(oo(e)))},Br.prototype.slice=function(e,t){e=da(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Br(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=da(t))<0?r.dropRight(-t):r.take(t-e)),r)},Br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Br.prototype.toArray=function(){return this.take(d)},bn(Br.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=$r[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&($r.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Br,c=a[0],l=u||Vs(t),f=function(e){var t=o.apply($r,Mt([e],a));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=s&&!p,y=u&&!d;if(!s&&l){t=y?t:new Br(this);var v=e.apply(t,a);return v.__actions__.push({func:ps,args:[f],thisArg:i}),new Lr(v,p)}return h&&y?e.apply(this,a):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);$r.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Vs(i)?i:[],e)}return this[r]((function(r){return t.apply(Vs(r)?r:[],e)}))}})),bn(Br.prototype,(function(e,t){var r=$r[t];if(r){var n=r.name+"";ke.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:t,func:r})}})),Pr[$i(i,2).name]=[{name:"wrapper",func:i}],Br.prototype.clone=function(){var e=new Br(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Br.prototype.reverse=function(){if(this.__filtered__){var e=new Br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,p=0,d=vr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,g=m.type,_=b(v);if(2==g)v=_;else if(!_){if(1==g)continue e;break e}}h[p++]=v}return h},$r.prototype.at=ds,$r.prototype.chain=function(){return fs(this)},$r.prototype.commit=function(){return new Lr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},$r.prototype.plant=function(e){for(var t,r=this;r instanceof qr;){var n=Fo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},$r.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Br){var t=e;return this.__actions__.length&&(t=new Br(this)),(t=t.reverse()).__actions__.push({func:ps,args:[Xo],thisArg:i}),new Lr(t,this.__chain__)}return this.thru(Xo)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,Ke&&($r.prototype[Ke]=function(){return this}),$r}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2937:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var o=r(5271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=r(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(9520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(8042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var p=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return p.AsyncSubject}});var d=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var h=r(4617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var y=r(8344);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return y.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return y.queueScheduler}});var v=r(6192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var m=r(8847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var b=r(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=r(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(1403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(9144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var I=r(1211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return I.isObservable}});var T=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var j=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return j.firstValueFrom}});var P=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var x=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var A=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var N=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return N.ObjectUnsubscribedError}});var M=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return M.SequenceError}});var k=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return k.TimeoutError}});var D=r(5463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return D.UnsubscriptionError}});var R=r(1253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return R.bindCallback}});var C=r(1009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return C.bindNodeCallback}});var $=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return $.combineLatest}});var F=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var q=r(1663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return q.connectable}});var L=r(5401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var B=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return B.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var V=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return V.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var Q=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Q.fromEventPattern}});var Y=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var W=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return W.iif}});var H=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return H.interval}});var K=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var G=r(7423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return G.never}});var J=r(7443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return J.of}});var Z=r(1282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(5259);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(1945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(6971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=r(1727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(7423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(9251),t);var le=r(3782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var pe=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return pe.auditTime}});var de=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var he=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var ye=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ye.bufferTime}});var ve=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var me=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return me.bufferWhen}});var be=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Ie=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Ie.concatWith}});var Te=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Te.connect}});var je=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return je.count}});var Pe=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Pe.debounce}});var xe=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ae=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var Ne=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ne.delay}});var Me=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Me.delayWhen}});var ke=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return ke.dematerialize}});var De=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return De.distinct}});var Re=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Re.distinctUntilChanged}});var Ce=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Ce.distinctUntilKeyChanged}});var $e=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return $e.elementAt}});var Fe=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var qe=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return qe.every}});var Le=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Be=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Be.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Ve=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ve.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Qe=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Qe.finalize}});var Ye=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var We=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return We.findIndex}});var He=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return He.first}});var Ke=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ge=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ge.ignoreElements}});var Je=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Je.isEmpty}});var Ze=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var pt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pt.pairwise}});var dt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var ht=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var yt=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var vt=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var mt=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var _t=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return _t.repeat}});var wt=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Et=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Et.refCount}});var It=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return It.sample}});var Tt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Tt.sampleTime}});var jt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var Pt=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Pt.sequenceEqual}});var xt=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return xt.share}});var At=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return At.shareReplay}});var Nt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Nt.single}});var Mt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var kt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return kt.skipLast}});var Dt=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Dt.skipUntil}});var Rt=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Rt.skipWhile}});var Ct=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ct.startWith}});var $t=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $t.subscribeOn}});var Ft=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var qt=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return qt.switchMap}});var Lt=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Bt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Bt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Vt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Vt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Qt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qt.takeWhile}});var Yt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Wt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Wt.throttle}});var Ht=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ht.throttleTime}});var Kt=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Kt.throwIfEmpty}});var Gt=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Gt.timeInterval}});var Jt=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Zt=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var er=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return er.toArray}});var tr=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tr.window}});var rr=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rr.windowCount}});var nr=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return nr.windowTime}});var ir=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var or=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var sr=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sr.withLatestFrom}});var ar=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ar.zipAll}});var ur=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},7257:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(9520).Subject);t.AsyncSubject=o},8042:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(9520).Subject);t.BehaviorSubject=o},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(1727),o=r(7443),s=r(859),a=r(4432);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var r,n,i,o=e,s=o.kind,a=o.value,u=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},3380:(e,t)=>{"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},5271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(1403),i=r(7215),o=r(2138),s=r(5966),a=r(3782),u=r(4432),c=r(4770),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},216:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(9520),s=r(1713),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},3980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(1713),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},9520:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var s=r(5271),a=r(7215),u=r(7392),c=r(2447),l=r(4770),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(s.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=p},1403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(4432),s=r(7215),a=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),p=r(4770),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new m(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=d;var h=Function.prototype.bind;function y(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),m=function(e){function t(t,r,n){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,s),error:t.error&&y(t.error,s),complete:t.complete&&y(t.complete,s)}):i=t,u.destination=new v(i),u}return i(t,e),t}(d);function b(e){a.config.useDeprecatedSynchronousErrorHandling?p.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=m,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(4432),a=r(5463),u=r(2447),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var p=n(f),d=p.next();!d.done;d=p.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(s.isFunction(h))try{h()}catch(e){c=e instanceof a.UnsubscriptionError?e.errors:[e]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var v=n(y),m=v.next();!m.done;m=v.next()){var b=m.value;try{l(b)}catch(e){c=null!=c?c:[],e instanceof a.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(r)throw r.error}}}if(c)throw new a.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},3782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},7447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(8032),i=r(1403);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},1263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(8032);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},3739:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(5271),s=r(7215),a=r(2711),u=r(5079),c=r(4024),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},1253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(6414);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},6414:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(6551),s=r(5271),a=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,p){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,p).apply(this,n).pipe(u.mapOneOrManyArgs(f))};p=f}return p?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(p),c.observeOn(p))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new l.AsyncSubject,c=!0;return new s.Observable((function(s){var a=u.subscribe(s);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return a}))}}},1009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(6414);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(5271),i=r(4744),o=r(6216),s=r(9144),a=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function p(e,t,r){return void 0===r&&(r=s.identity),function(n){d(t,(function(){for(var i=e.length,s=new Array(i),a=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,u--),u||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,h=f.keys;if(0===d.length)return o.from([],r);var y=new n.Observable(p(d,r,h?function(e){return c.createObject(h,e)}:s.identity));return l?y.pipe(a.mapOneOrManyArgs(l)):y},t.combineLatestInit=p},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(4554),i=r(2619),o=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},1663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(9520),i=r(5271),o=r(5401),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,u=void 0===a||a,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},5401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(5271),i=r(9451);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(5271),i=r(1241),o=r(6741);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(5271);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(5271),i=r(4744),o=r(9451),s=r(2619),a=r(5079),u=r(4666),c=r(1589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,p=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(p?c.createObject(p,r):r),e.complete())})))},u=0;u<t;u++)s(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},6216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(3200),i=r(9451);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},6767:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),s=r(9010),a=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],p=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,h,y){if(u.isFunction(h)&&(y=h,h=void 0),y)return e(t,r,h).pipe(c.mapOneOrManyArgs(y));var v=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,h)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?p.map(d(t,r)):[],2),m=v[0],b=v[1];if(!m&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,h)}))(i.innerFrom(t));if(!m)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return m(t),function(){return b(t)}}))}},4366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(5271),i=r(4432),o=r(4666);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},2160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(5271);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},6103:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),s=r(5401),a=r(8840);t.generate=function(e,t,r,u,c){var l,f,p,d;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,p(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,p=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(p=i.identity,c=u):p=u),s.defer(c?function(){return a.scheduleIterable(h(),c)}:h)}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5401);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9451:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var a=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),p=r(4883),d=r(6380),h=r(9266),y=r(4432),v=r(7234),m=r(2138);function b(e){return new c.Observable((function(t){var r=e[m.observable]();if(y.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,v.reportUnhandledError)}))}function w(e){return new c.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,s,a,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return b(e);if(a.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(h.isReadableStreamLike(e))return S(e)}throw p.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},4449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(4617),i=r(5710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},5847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(4594),i=r(9451),o=r(1727),s=r(2619),a=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),u=s.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(a.from(c,r)):o.EMPTY}},7423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(5271),i=r(5729);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},7443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(2619),i=r(6216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(1727),i=r(4764),o=r(4475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(o.argsOrArgArray(e))(n.EMPTY)}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(6216);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763),o=r(9451);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(5271),i=r(9451),o=r(4475),s=r(5079);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},6971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(5271),i=r(1727);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(5271),i=r(4432);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},5710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(5271),i=r(4617),o=r(6551),s=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},3687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(5271),i=r(9451),o=r(1727);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},2042:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(5271),s=r(9451),a=r(4475),u=r(1727),c=r(5079),l=r(2619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(c.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)a(u);return function(){t=o=null}})):u.EMPTY}},5079:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(1403);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(4024),i=r(9451),o=r(5079);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,u=!1,c=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}u&&r.complete()},l=function(){a=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!a||a.closed)&&r.complete()})))}))}},5188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(4617),i=r(3533),o=r(5710);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},4514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(4024),i=r(5729),o=r(5079);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},2537:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(4024),o=r(5079),s=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,p=null;u++%t==0&&a.push([]);try{for(var d=n(a),h=d.next();!h.done;h=d.next())(m=h.value).push(r),e<=m.length&&(p=null!=p?p:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(p)try{for(var y=n(p),v=y.next();!v.done;v=y.next()){var m=v.value;s.arrRemove(a,m),i.next(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},8720:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(7215),o=r(4024),s=r(5079),a=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):u=!0,f();var p=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var u=a.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==p||p.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(p)}))}},7932:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(7215),o=r(4024),s=r(9451),a=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,u=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9451),i=r(5079),o=r(4024);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,u=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0}))),u&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},4163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(9893);t.combineAll=n.combineLatestAll},8169:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(1047),s=r(4024),a=r(4475),u=r(4666),c=r(5966),l=r(2619);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},9893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(1047),i=r(7534);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7230:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(8169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},4098:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(4024),s=r(4554),a=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},4554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(4594);t.concatAll=function(){return n.mergeAll(1)}},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(9010),i=r(4432);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(1048),i=r(4432);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},4724:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(4098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},4347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(9520),i=r(9451),o=r(4024),s=r(2160),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},6944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(1678);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,a=t,u=o.createOperatorSubscriber(r,c,i.noop),s.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){a=u=null})))}))}},8157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(4617),i=r(4024),o=r(5079);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){s=i=null})))}))}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(4024),i=r(5079);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},1030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(4617),i=r(6405),o=r(5710);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},6405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(79),i=r(7138),o=r(3470),s=r(4791),a=r(9010);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),s.mapTo(e))}))}},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},2307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(4024),i=r(5079),o=r(5729);t.distinct=function(e,t){return n.operate((function(r,n){var s=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;s.has(r)||(s.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return s.clear()}),o.noop))}))}},9131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(9144),i=r(4024),o=r(5079);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},6659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9131);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(6809),i=r(2763),o=r(8062),s=r(1714),a=r(7138);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},4707:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(79),s=r(7443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},9276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(4024),i=r(5079);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(3977);t.exhaust=n.exhaustAll},3977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(368),i=r(9144);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(5079);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(4024),i=r(7163);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},2763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(4024),i=r(5079);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(4024);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},8759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(4024),i=r(5079);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},3999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(4024),i=r(8759);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},5194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(8032),i=r(2763),o=r(7138),s=r(1714),a=r(8062),u=r(9144);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},2735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(9010);t.flatMap=n.mergeMap},1664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(5271),i=r(9451),o=r(9520),s=r(4024),a=r(5079);t.groupBy=function(e,t,r,u){return s.operate((function(s,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,p=function(e){f.forEach(e),e(c)},d=function(e){return p((function(t){return t.error(e)}))},h=0,y=!1,v=new a.OperatorSubscriber(c,(function(t){try{var s=e(t),p=f.get(s);if(!p){f.set(s,p=u?u():new o.Subject);var m=(g=s,_=p,(w=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,w);if(c.next(m),r){var b=a.createOperatorSubscriber(p,(function(){p.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));v.add(i.innerFrom(r(m)).subscribe(b))}}p.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return p((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return y=!0,0===h}));s.subscribe(v)}))}},3470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(4024),i=r(5079),o=r(5729);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},9549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(4024),i=r(5079);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},7534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(9144),i=r(4666),o=r(5966),s=r(9010),a=r(2378);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},9582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(8032),i=r(2763),o=r(4288),s=r(8062),a=r(1714),u=r(9144);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(4024),i=r(5079);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(4338);t.mapTo=function(e){return n.map((function(){return e}))}},9318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(1678),i=r(4432);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},6094:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(4024),s=r(4475),a=r(4594),u=r(2619),c=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popNumber(e,1/0);return e=s.argsOrArgArray(e),o.operate((function(t,o){a.mergeAll(l)(c.from(i([t],n(e)),r)).subscribe(o)}))}},4594:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(9010),i=r(9144);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},7163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9451),i=r(5421),o=r(5079);t.mergeInternals=function(e,t,r,s,a,u,c,l){var f=[],p=0,d=0,h=!1,y=function(){!h||f.length||p||t.complete()},v=function(e){return p<s?m(e):f.push(e)},m=function(e){u&&t.next(e),p++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{p--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&p<s;)e();y()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,v,(function(){h=!0,y()}))),function(){null==l||l()}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(7163),a=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,u)})))}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(9010),i=r(4432);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},2170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(4024),i=r(7163);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},3674:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(6094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},1446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(1678),i=r(4432);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},2318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(3739),i=r(4432),o=r(4347);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(5421),i=r(4024),o=r(5079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},4764:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var o=r(4024),s=r(9451),a=r(4475),u=r(5079),c=r(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),a=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=s.innerFrom(o.shift())}catch(e){return void a()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(a)}else t.complete()};a()}))}},402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(4024),i=r(5079);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},5658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(4338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},3881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(9520),i=r(2318),o=r(4347);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},1755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(8042),i=r(3739);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},9801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(7257),i=r(3739);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(216),i=r(2318),o=r(4432);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},2749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(4475),s=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},9925:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(7779),s=r(4024),a=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(2181),i=r(4024);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(4024),i=r(5079);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(1727),i=r(4024),o=r(5079),s=r(9451),a=r(5710);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},7085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.repeatWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=!1,c=!1,l=function(){return c&&u&&(r.complete(),!0)},f=function(){c=!1,i=t.subscribe(o.createOperatorSubscriber(r,void 0,(function(){c=!0,!l()&&(s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){i?f():a=!0}),(function(){u=!0,l()})))),s).next()}))),a&&(i.unsubscribe(),i=null,a=!1,f())};f()}))}},7524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(4024),i=r(5079),o=r(9144),s=r(5710),a=r(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var p="number"==typeof c?s.timer(c):a.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));p.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.retryWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():a=!0})))),s&&s.next(t)}))),a&&(i.unsubscribe(),i=null,a=!1,u())};u()}))}},6577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(4024),i=r(5729),o=r(5079);t.sample=function(e){return n.operate((function(t,r){var n=!1,s=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,s=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=s;s=null,r.next(e)}}),i.noop))}))}},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(4617),i=r(6577),o=r(4449);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},7250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(4024),i=r(2181);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},2181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(5079);t.scanInternals=function(e,t,r,i,o){return function(s,a){var u=r,c=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&a.next(c)}),o&&function(){u&&a.next(c),a.complete()}))}}},842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(4024),i=r(5079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var o={buffer:[],complete:!1},s={buffer:[],complete:!1},a=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?a(!1):e.buffer.push(n):!t(n,i.shift())&&a(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&a(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,s)),e.subscribe(u(s,o))}))}},9728:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9451),s=r(9520),a=r(1403),u=r(4024);function c(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0!==t){if(!1!==t){var s=new a.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(s)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,p=e.resetOnRefCountZero,d=void 0===p||p;return function(e){var t,n,s,l=0,p=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=s=void 0,p=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||p||y();var b=s=null!=s?s:r();u.add((function(){0!=--l||h||p||(n=c(m,d))})),b.subscribe(u),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){p=!0,y(),n=c(v,f),b.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},7768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(216),i=r(9728);t.shareReplay=function(e,t,r){var o,s,a,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},2445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(8032),i=r(6228),o=r(1137),s=r(4024),a=r(5079);t.single=function(e){return s.operate((function(t,r){var s,u=!1,c=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,s=n)}),(function(){u?(r.next(s),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},6262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(2763);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},7397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(9144),i=r(4024),o=r(5079);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},1620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(4024),i=r(5079);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(79),i=r(2619),o=r(4024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(4024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(7222),i=r(9144);t.switchAll=function(){return n.switchMap(i.identity)}},7222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9451),i=r(4024),o=r(5079);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,u=!1,c=function(){return u&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var u=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){s=null,c()})))}),(function(){u=!0,c()})))}))}},6464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(7222),i=r(4432);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},4434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(7222),i=r(4024);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(1727),i=r(4024),o=r(5079);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4288:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(1727),o=r(4024),s=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},7341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(4024),i=r(5079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},8668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(4432),i=r(4024),o=r(5079),s=r(9144);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},9466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var n=r(4024),i=r(5079),o=r(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),n.operate((function(t,n){var s=r.leading,a=r.trailing,u=!1,c=null,l=null,f=!1,p=function(){null==l||l.unsubscribe(),l=null,a&&(y(),f&&n.complete())},d=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,p,d))},y=function(){if(u){u=!1;var e=c;c=null,n.next(e),!f&&h(e)}};t.subscribe(i.createOperatorSubscriber(n,(function(e){u=!0,c=e,(!l||l.closed)&&(s?y():h(e))}),(function(){f=!0,(!(a&&u&&l)||l.closed)&&n.complete()})))}))}},9705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(4617),i=r(9466),o=r(5710);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler),void 0===r&&(r=i.defaultThrottleConfig);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},8062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(8032),i=r(4024),o=r(5079);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},6610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(4617),i=r(4024),o=r(5079);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},6279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(4617),i=r(7761),o=r(4024),s=r(9451),a=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,p=r.with,d=void 0===p?l:p,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,y,(function(){try{r.unsubscribe(),s.innerFrom(d({meta:m,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-y.now():f)}))}},8132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(4617),i=r(7761),o=r(6279);t.timeoutWith=function(e,t,r){var s,a,u;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:u})}},4553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(1713),i=r(4338);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(1678),i=r(4024),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},4768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var a=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),a)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,a)),function(){null==i||i.unsubscribe(),i=null}}))}},131:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(9520),o=r(4024),s=r(5079);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],u=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,c;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var p=u-e+1;if(p>=0&&p%r==0&&a.shift().complete(),++u%r==0){var d=new i.Subject;a.push(d),o.next(d.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(9520),i=r(4617),o=r(7215),s=r(4024),a=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,d,(function(){return c(a)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):s=!0,f();var p=function(e){return i.slice().forEach(e)},v=function(e){p((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){p((function(t){t.window.next(e),y<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){i=null}}))}},752:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(9520),o=r(7215),s=r(4024),a=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],p=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(u.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void p(e)}s.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,p)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),p,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void u(e)}t.subscribe(a=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==a||a.unsubscribe(),i=null})))}))}},4255:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(4024),s=r(5079),a=r(9451),u=r(9144),c=r(5729),l=r(2619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),p=e.map((function(){return!1})),d=!1,h=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,d||p[t]||(p[t]=!0,(d=p.every(u.identity))&&(p=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},3253:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(2042),s=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},7220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(2042),i=r(7534);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},9287:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(3253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},3584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(5271);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},1659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(5271),i=r(5421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(5271),i=r(5686),o=r(4432),s=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},5704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9451),i=r(3165),o=r(831);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9451),i=r(3165),o=r(831);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},3035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(1659),i=r(9266);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5704),i=r(4644),o=r(3584),s=r(8840),a=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),p=r(7707),d=r(4883),h=r(9266),y=r(3035);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(p.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4756:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(7215).Subscription);t.Action=o},5364:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(1172),s=r(6741),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},1834:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AnimationFrameScheduler=o},3761:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(1172),s=r(6703),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=a},1386:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AsapScheduler=o},1172:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(4756),s=r(9678),a=r(2447),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},6759:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(3980),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},6354:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(1172).AsyncAction);t.QueueAction=o},3144:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(6759).AsyncScheduler);t.QueueScheduler=o},8847:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(1172),s=r(7215),a=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(6759).AsyncScheduler);t.VirtualTimeScheduler=a;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(o.AsyncAction);t.VirtualAction=u},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(5364),i=r(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},6741:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(7215);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},4502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(3761),i=r(1386);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},4617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(1172),i=r(6759);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},1713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6703:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2534),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},9678:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},1241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},8344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(6354),i=r(3144);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8972:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},5686:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},2138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},9251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9876);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},8032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9876);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},1137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9876);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9876);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},6228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9876);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9876);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},2619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(4432),i=r(6551);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},4475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},2447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},9876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},1589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},4770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3782),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},5421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},9144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8219:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},7707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(4432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},7761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},4432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},3292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2138),i=r(4432);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},6380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(5686),i=r(4432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},1211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(5271),i=r(4432);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(4432);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9266:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(4432);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},6551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(4432);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},4024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(4432);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},4666:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(4338),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},5966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(9144);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3782),i=r(8972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},4883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},9978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var u=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var p=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return p.combineLatestAll}});var d=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var h=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var y=r(4098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return y.concat}});var v=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var m=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return m.concatMap}});var b=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var I=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return I.delay}});var T=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var j=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return j.dematerialize}});var P=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return P.distinct}});var x=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var A=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var N=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return N.elementAt}});var M=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return M.endWith}});var k=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return k.every}});var D=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return D.exhaust}});var R=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return R.exhaustAll}});var C=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return C.exhaustMap}});var $=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return $.expand}});var F=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var q=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return q.finalize}});var L=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var B=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return B.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var V=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return V.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var Q=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Q.isEmpty}});var Y=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var W=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return W.map}});var H=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return H.mapTo}});var K=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var G=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return G.max}});var J=r(6094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Z=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ue=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(5960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var pe=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return pe.publishBehavior}});var de=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var he=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var ye=r(2749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ye.race}});var ve=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var me=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return me.reduce}});var be=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Ie=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ie.scan}});var Te=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Te.sequenceEqual}});var je=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return je.share}});var Pe=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Pe.shareReplay}});var xe=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ae=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var Ne=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ne.skipLast}});var Me=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Me.skipUntil}});var ke=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return ke.skipWhile}});var De=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return De.startWith}});var Re=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Re.subscribeOn}});var Ce=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ce.switchAll}});var $e=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return $e.switchMap}});var Fe=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var qe=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return qe.switchScan}});var Le=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Be=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Be.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Ve=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ve.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Qe=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Qe.throttle}});var Ye=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var We=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return We.throwIfEmpty}});var He=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return He.timeInterval}});var Ke=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ge=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ge.timeoutWith}});var Je=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Je.timestamp}});var Ze=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(3253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},9380:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutationContext=t.AiAssistantChatContext=void 0,t.AiAssistantChatContext=class{constructor(e){this.profileId=e.profileId,this.prompt=e.prompt}},t.AiAssistantMutationContext=class{constructor(e){this.profileId=e.profileId,this.type=e.type,this.resource=e.resource,this.payload=e.payload}}},7698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutateRequestSchema=t.AiAssistantChatRequestSchema=void 0,t.AiAssistantChatRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},clientId:{type:"string"},clientRequestId:{type:"string"},prompt:{type:"string"}},required:["profileId","integrationId","clientId","clientRequestId","prompt"]},t.AiAssistantMutateRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},type:{type:"string",enum:["insert","update","delete"]},resource:{type:"string",enum:["instruction","context","profile"]}},required:["profileId","integrationId","type","resource"],oneOf:[{properties:{type:{const:"insert"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}},required:["modelName","strictContext"]}}},{properties:{type:{const:"insert"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"insert"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}},required:["id","title","context"]}}},{properties:{type:{const:"update"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}}}}},{properties:{type:{const:"update"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"update"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}}}}},{properties:{type:{const:"delete"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"profile"},payload:{type:"object"}}}]}},6614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenAiModelData=void 0,t.OpenAiModelData={"gpt-4":{tokens:8192},"gpt-3.5-turbo":{tokens:4096}}},2943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiCallContext=void 0,t.ApiCallContext=class{constructor(e){this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.headers=e.headers,this.body=e.body,this.queryParams=e.queryParams,this.pathParams=e.pathParams,this.serverUrlOverride=e.serverUrlOverride}}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiSchemaRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const n=r(133);t.UpdateOpenIdProviderRequestSchema={type:"object",required:["openIdProvider"],properties:{openIdProvider:{type:"object",required:["providerType","clientId","domain"],properties:{providerType:{type:"string",const:"auth0"},clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}};const i={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},o={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",nullable:!1}}},a={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!0},sslEnabled:{type:"boolean",nullable:!0},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}},sslCertificate:{type:"string",nullable:!0,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},u={type:"object",nullable:!1,required:["connectionString"],properties:{connectionString:{type:"string",nullable:!1},user:{type:"string",nullable:!0},secrets:{type:"object",nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},maxPoolSize:{type:"number",nullable:!1},minPoolSize:{type:"number",nullable:!1},socketTimeoutMS:{type:"number",nullable:!1},keepAlive:{type:"boolean",nullable:!1},directConnection:{type:"boolean",nullable:!1},ssl:{type:"object",nullable:!1,required:["certificateFile","validate"],properties:{certificateFile:{type:"string",nullable:!1},validate:{type:"boolean",nullable:!1}}}}},c={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}},l={type:"object",required:[],properties:{account:{type:"string",nullable:!1},username:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!1},warehouse:{type:"string",nullable:!1},role:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:n.IntegrationType.built_in_db}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.api},configuration:{type:"object",nullable:!0,required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",nullable:!1,required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",nullable:!1}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.datadog},configuration:{type:"object",nullable:!1,required:["apiKey","appKey","datadogRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},appKey:{type:"string",nullable:!1,isSecret:{}},datadogRegion:{type:"string",nullable:!1,enum:Object.keys(n.datadogRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.newrelic},configuration:{type:"object",nullable:!1,required:["apiKey","newRelicRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},newRelicRegion:{type:"string",nullable:!1,enum:Object.keys(n.newRelicRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.auth0},configuration:{type:"object",nullable:!1,required:["clientId","domain"],properties:{clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_rsa},configuration:{type:"object",nullable:!1,required:["jwksUri"],properties:{jwksUri:{type:"string",nullable:!1},validations:{type:"object",nullable:!0,properties:{iss:{type:"string",nullable:!0},aud:{type:"string",nullable:!0}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_hmac},configuration:{type:"object",nullable:!1,required:["verifyUri"],properties:{verifyUri:{type:"string",nullable:!1}}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.ai_assistant},configuration:{type:"object",nullable:!1,required:[],properties:{apiKey:{type:"string",nullable:!1}}}}}]},t.DeleteIntegrationRequestSchema={type:"object",required:["integrationId"],properties:{integrationId:{type:"string",nullable:!1}}},t.TestDataConnectionRequestSchema={type:"object",required:["type","configuration"],oneOf:[{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:c}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.oracledb},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mssql},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:l}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mongo},connectionOptions:u}},{type:"object",properties:{integrationType:{const:n.IntegrationType.built_in_db}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:n.IntegrationType.graphql},connectionOptions:c}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiSchemaRequestSchema={type:"object",required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}}}},8030:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CronExpression=void 0,(r=t.CronExpression||(t.CronExpression={})).EVERY_SECOND="* * * * * *",r.EVERY_5_SECONDS="*/5 * * * * *",r.EVERY_10_SECONDS="*/10 * * * * *",r.EVERY_30_SECONDS="*/30 * * * * *",r.EVERY_MINUTE="*/1 * * * *",r.EVERY_5_MINUTES="0 */5 * * * *",r.EVERY_10_MINUTES="0 */10 * * * *",r.EVERY_30_MINUTES="0 */30 * * * *",r.EVERY_HOUR="0 0-23/1 * * *",r.EVERY_2_HOURS="0 0-23/2 * * *",r.EVERY_3_HOURS="0 0-23/3 * * *",r.EVERY_4_HOURS="0 0-23/4 * * *",r.EVERY_5_HOURS="0 0-23/5 * * *",r.EVERY_6_HOURS="0 0-23/6 * * *",r.EVERY_7_HOURS="0 0-23/7 * * *",r.EVERY_8_HOURS="0 0-23/8 * * *",r.EVERY_9_HOURS="0 0-23/9 * * *",r.EVERY_10_HOURS="0 0-23/10 * * *",r.EVERY_11_HOURS="0 0-23/11 * * *",r.EVERY_12_HOURS="0 0-23/12 * * *",r.EVERY_DAY_AT_1AM="0 01 * * *",r.EVERY_DAY_AT_2AM="0 02 * * *",r.EVERY_DAY_AT_3AM="0 03 * * *",r.EVERY_DAY_AT_4AM="0 04 * * *",r.EVERY_DAY_AT_5AM="0 05 * * *",r.EVERY_DAY_AT_6AM="0 06 * * *",r.EVERY_DAY_AT_7AM="0 07 * * *",r.EVERY_DAY_AT_8AM="0 08 * * *",r.EVERY_DAY_AT_9AM="0 09 * * *",r.EVERY_DAY_AT_10AM="0 10 * * *",r.EVERY_DAY_AT_11AM="0 11 * * *",r.EVERY_DAY_AT_NOON="0 12 * * *",r.EVERY_DAY_AT_1PM="0 13 * * *",r.EVERY_DAY_AT_2PM="0 14 * * *",r.EVERY_DAY_AT_3PM="0 15 * * *",r.EVERY_DAY_AT_4PM="0 16 * * *",r.EVERY_DAY_AT_5PM="0 17 * * *",r.EVERY_DAY_AT_6PM="0 18 * * *",r.EVERY_DAY_AT_7PM="0 19 * * *",r.EVERY_DAY_AT_8PM="0 20 * * *",r.EVERY_DAY_AT_9PM="0 21 * * *",r.EVERY_DAY_AT_10PM="0 22 * * *",r.EVERY_DAY_AT_11PM="0 23 * * *",r.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",r.EVERY_WEEK="0 0 * * 0",r.EVERY_WEEKDAY="0 0 * * 1-5",r.EVERY_WEEKEND="0 0 * * 6,0",r.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",r.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",r.EVERY_2ND_HOUR="0 */2 * * *",r.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",r.EVERY_2ND_MONTH="0 0 1 */2 *",r.EVERY_QUARTER="0 0 1 */3 *",r.EVERY_6_MONTHS="0 0 1 */6 *",r.EVERY_YEAR="0 0 1 0 *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",r.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",r.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",r.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"},9903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId","clientId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},9235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformResponse=t.transformParams=t.ExecuteFunctionSecureAnnotations=void 0;const n=r(9380),i=r(2943),o=r(7627),s=r(326),a=r(2251),u=r(5250),c=r(2574);t.ExecuteFunctionSecureAnnotations=["secureDistributedLock","secureQuery","secureMutation","secureNamedQuery","secureGraphQL","secureApi","secureAiAssistantChat","secureAiAssistantMutation"],t.transformParams=function(e,t){switch(t){case"webhook":case"executable":case"trigger":case"transformRead":case"transformWrite":case"metadata":return e;case"scheduler":return[];case"secureQuery":return[new c.QueryContext(e[0].query)];case"secureMutation":return[new a.MutationContext(e[0].mutation,e[0].beforeAndAfterDocs,e[0].serverTimestamp)];case"secureNamedQuery":return[new u.NamedQueryContext(e[0])];case"secureDistributedLock":return[new o.DistributedLockContext(e[0].mutex,e[0].exclusive)];case"secureGraphQL":return[new s.GraphqlContext(e[0])];case"secureApi":return[new i.ApiCallContext(e[0])];case"secureAiAssistantChat":return[new n.AiAssistantChatContext(e[0])];case"secureAiAssistantMutation":return[new n.AiAssistantMutationContext(e[0])]}},t.transformResponse=function(e,r){return t.ExecuteFunctionSecureAnnotations.includes(r)?{rulesPassed:e,docsToHash:e?{}:void 0}:e}},1277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockContext=void 0,t.DistributedLockContext=class{constructor(e,t){this.mutex=e,this.exclusive=t}}},4385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasDocumentDiff=t.getSquidDocId=t.parseSquidDocId=void 0;const n=r(9312).__importDefault(r(2091)),i=r(1636),o=r(4684);function s(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=s,t.getSquidDocId=function(...e){const[t,r,n]=e,i="object"==typeof t?t:{docId:t,collectionName:r,integrationId:n};return i.integrationId||(i.integrationId=void 0),(0,o.normalizeJsonAsString)(i)},t.hasDocumentDiff=function(e,t){const r=(0,n.default)(e,t)||[],a=["__docId__","__ts__"],u=r.find((e=>{var t;return"__docId__"===(null===(t=e.path)||void 0===t?void 0:t[0])}));if(u){if("E"!==u.kind||!u.rhs)throw new Error(`Unexpected diff for __docId__: ${(0,o.normalizeJsonAsString)(u)}`);const e=s(u.rhs+"");a.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(a.includes(null===(r=e.path)||void 0===r?void 0:r[0]))return!1;switch(e.kind){case"N":return(0,i.isNotNullish)(e.rhs);case"E":case"D":case"A":return!0}return!1})))}},326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphqlContext=void 0,t.GraphqlContext=class{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}},9231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyIntrospection=void 0,t.EmptyIntrospection={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:null,subscriptionType:null,types:[{name:"Query",kind:"OBJECT",fields:[{name:"isEmpty",type:{kind:"SCALAR",name:"Boolean"},args:[],isDeprecated:!1,deprecationReason:null}],interfaces:[]},{name:"Boolean",kind:"SCALAR"}],directives:[]}}},7008:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(r=t.HttpStatus||(t.HttpStatus={}))[r.CONTINUE=100]="CONTINUE",r[r.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",r[r.PROCESSING=102]="PROCESSING",r[r.EARLYHINTS=103]="EARLYHINTS",r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.ACCEPTED=202]="ACCEPTED",r[r.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.RESET_CONTENT=205]="RESET_CONTENT",r[r.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",r[r.AMBIGUOUS=300]="AMBIGUOUS",r[r.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",r[r.FOUND=302]="FOUND",r[r.SEE_OTHER=303]="SEE_OTHER",r[r.NOT_MODIFIED=304]="NOT_MODIFIED",r[r.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",r[r.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",r[r.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",r[r.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",r[r.CONFLICT=409]="CONFLICT",r[r.GONE=410]="GONE",r[r.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",r[r.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",r[r.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",r[r.URI_TOO_LONG=414]="URI_TOO_LONG",r[r.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",r[r.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",r[r.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",r[r.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",r[r.MISDIRECTED=421]="MISDIRECTED",r[r.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",r[r.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",r[r.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",r[r.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",r[r.BAD_GATEWAY=502]="BAD_GATEWAY",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r[r.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",r[r.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(7698),t),n.__exportStar(r(6614),t),n.__exportStar(r(2943),t),n.__exportStar(r(5218),t),n.__exportStar(r(4125),t),n.__exportStar(r(8030),t),n.__exportStar(r(9903),t),n.__exportStar(r(7545),t),n.__exportStar(r(9235),t),n.__exportStar(r(6421),t),n.__exportStar(r(1277),t),n.__exportStar(r(3889),t),n.__exportStar(r(720),t),n.__exportStar(r(3085),t),n.__exportStar(r(7627),t),n.__exportStar(r(4385),t),n.__exportStar(r(326),t),n.__exportStar(r(9231),t),n.__exportStar(r(7008),t),n.__exportStar(r(133),t),n.__exportStar(r(6778),t),n.__exportStar(r(3858),t),n.__exportStar(r(2251),t),n.__exportStar(r(5263),t),n.__exportStar(r(2792),t),n.__exportStar(r(5250),t),n.__exportStar(r(7581),t),n.__exportStar(r(1012),t),n.__exportStar(r(2574),t),n.__exportStar(r(2972),t),n.__exportStar(r(791),t),n.__exportStar(r(1906),t),n.__exportStar(r(6504),t),n.__exportStar(r(5098),t),n.__exportStar(r(1391),t),n.__exportStar(r(3851),t),n.__exportStar(r(5791),t),n.__exportStar(r(7104),t),n.__exportStar(r(9132),t),n.__exportStar(r(7682),t),n.__exportStar(r(3185),t),n.__exportStar(r(4825),t),n.__exportStar(r(7850),t),n.__exportStar(r(8255),t),n.__exportStar(r(7142),t),n.__exportStar(r(6485),t),n.__exportStar(r(3589),t),n.__exportStar(r(1636),t),n.__exportStar(r(8038),t),n.__exportStar(r(4684),t),n.__exportStar(r(8932),t),n.__exportStar(r(2608),t),n.__exportStar(r(8315),t),n.__exportStar(r(3811),t)},3583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthIntegration=t.isAuthIntegrationType=t.isDataIntegration=t.isDataIntegrationType=t.AuthIntegrationTypes=t.ObservabilityIntegrationTypes=t.ApiIntegrationTypes=t.DatabaseIntegrationTypes=t.IntegrationType=t.IntegrationCategory=void 0;const n=r(9312);var i,o;function s(e){return t.DatabaseIntegrationTypes.includes(e)}function a(e){return t.AuthIntegrationTypes.includes(e)}n.__exportStar(r(3583),t),n.__exportStar(r(677),t),n.__exportStar(r(2605),t),n.__exportStar(r(4001),t),n.__exportStar(r(6855),t),(o=t.IntegrationCategory||(t.IntegrationCategory={})).database="database",o.api="api",o.observability="observability",o.crm="crm",o.auth="auth",o.ai="ai",function(e){e.built_in_db="built_in_db",e.mongo="mongo",e.mysql="mysql",e.mssql="mssql",e.postgres="postgres",e.cockroach="cockroach",e.api="api",e.graphql="graphql",e.snowflake="snowflake",e.datadog="datadog",e.newrelic="newrelic",e.auth0="auth0",e.jwt_rsa="jwt_rsa",e.jwt_hmac="jwt_hmac",e.ai_assistant="ai_assistant",e.algolia="algolia",e.elastic_observability="elastic_observability",e.elastic_search="elastic_search",e.elastic_enterprise_search="elastic_enterprise_search",e.sentry="sentry",e.sap_hana="sap_hana",e.salesforce_crm="salesforce_crm",e.documentdb="documentdb",e.dynamodb="dynamodb",e.cassandra="cassandra",e.clickhouse="clickhouse",e.alloydb="alloydb",e.spanner="spanner",e.db2="db2",e.mariadb="mariadb",e.oracledb="oracledb",e.redis="redis",e.xata="xata",e.azure_sql="azure_sql"}(i=t.IntegrationType||(t.IntegrationType={})),t.DatabaseIntegrationTypes=[i.built_in_db,i.mongo,i.mysql,i.mssql,i.postgres,i.cockroach,i.snowflake,i.oracledb],t.ApiIntegrationTypes=[i.api,i.graphql],t.ObservabilityIntegrationTypes=[i.datadog,i.newrelic],t.AuthIntegrationTypes=[i.auth0,i.jwt_rsa,i.jwt_hmac],t.isDataIntegrationType=s,t.isDataIntegration=function(e){return s(e.type)},t.isAuthIntegrationType=a,t.isAuthIntegration=function(e){return a(e.type)}},6855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newRelicRegionMap=t.datadogRegionMap=void 0,t.datadogRegionMap={us1:"US1 - East",us3:"US3 - West",us5:"US5 - Central",eu1:"EU1 - Europe","us1-fed":"US1-FED (FedRamp)"},t.newRelicRegionMap={worldwide:"Worldwide",eu:"Europe"}},6778:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={})).TRACE="trace",r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error"},3858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregationPeriodMap=void 0,t.aggregationPeriodMap={"1m":1,"5m":5,"15m":15,"1h":60,"1d":1440,"1w":10080}},2251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const n=r(9312).__importStar(r(8784));t.MutationContext=class{constructor(e,t,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=r}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?n.get(this.beforeAndAfterDocs.before,e):void 0,r=this.beforeAndAfterDocs.after?n.get(this.beforeAndAfterDocs.after,e):void 0;return!n.isEqual(t,r)}}},5263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const r={type:"string"},n={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:r,integrationId:r,collectionName:r}},i={oneOf:[{type:"object",required:["type","properties","squidDocIdObj"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},squidDocIdObj:n}},{type:"object",required:["type","squidDocIdObj"],properties:{type:{type:"string",const:"delete"},squidDocIdObj:n}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},squidDocIdObj:n,properties:{type:"object",patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]+":{type:"array",minItems:1,items:{oneOf:[{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyNumericFn"},fn:{type:"string",const:"increment"},value:{type:"number"}}},{type:"object",required:["type"],properties:{type:{type:"string",const:"removeProperty"}}},{type:"object",required:["type","value"],properties:{type:{type:"string",const:"update"},value:{}}},{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"extendString"},value:r}},{type:"object",required:["type","fn"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"trim"}}}]}}}}}}]};t.MutationRequestSchema={type:"object",required:["clientId","integrationId","mutations"],properties:{clientId:r,integrationId:r,mutations:{type:"array",items:i}}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const n=r(9312).__importStar(r(8784)),i=r(2937),o=r(7850),s=r(8038);function a(e,t){switch(t.type){case"applyNumericFn":return function(e,t){if("increment"===t.fn)return null==e?t.value:e+t.value;throw new Error("Unknown numeric function: "+JSON.stringify(t))}(e,t);case"applyStringFn":return function(e,t){switch(t.fn){case"trim":return"string"!=typeof e?e:e.trim();case"extendString":return null==e?t.value:e+t.value;default:throw new Error("Unknown string function: "+JSON.stringify(t))}}(e,t);case"update":return"object"==typeof t.value?n.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function u(e){return Object.entries(e.properties).sort((([e],[t])=>e.split(".").length-t.split(".").length))}function c(e,t){if("insert"===t.type)return t;if("delete"===t.type)return t;if("delete"===e.type)throw new Error("Cannot delete and then update");if((0,o.assertTruthy)("update"===t.type,"Invalid mutation type"),"update"===e.type)return function(e,t){const r=n.cloneDeep(e);t=n.cloneDeep(t);for(const[e]of u(r)){const n=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&n>t.split(".").length))&&delete r.properties[e]}for(const[e,n]of u(t))r.properties[e]=[...r.properties[e]||[],...n];return r}(e,t);const r=n.cloneDeep(e);for(const[e,n]of u(t)){const t=n;for(const n of t){const t=a((0,s.getInPath)(r.properties,e),n);void 0===t?(0,s.deleteInPath)(r.properties,e):(0,s.setInPath)(r.properties,e,t)}}return r}t.sortUpdateMutationProperties=u,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const r=Object.assign({},e),n=u(t);for(const[e,t]of n){const n=t;for(const t of n){const n=a((0,s.getInPath)(r,e),t);void 0===n?(0,s.deleteInPath)(r,e):(0,s.setInPath)(r,e,n)}}return r},t.convertInsertToUpdate=function(e){const t={type:"update",squidDocIdObj:e.squidDocIdObj,properties:{}};for(const[r,n]of Object.entries(e.properties))t.properties[r]=[{type:"update",value:n}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.squidDocIdObj.integrationId}${e.squidDocIdObj.collectionName}/${e.squidDocIdObj.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},5250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryContext=void 0,t.NamedQueryContext=class{constructor(e){this.params=e}}},7581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteNamedQueryRequestSchema=void 0,t.ExecuteNamedQueryRequestSchema={type:"object",required:["integrationId","queryName","paramsRecordStr","clientRequestId","clientId"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},1012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryUnsubscribeRequestSchema=t.QueryRequestSchema=t.QuerySchema=void 0,t.QuerySchema={$id:"querySchema",type:"object",required:["collectionName","integrationId"],properties:{collectionName:{type:"string",nullable:!1},integrationId:{type:"string",nullable:!1},conditions:{type:"array",nullable:!1,items:{type:"object",nullable:!1,required:["fieldName","operator","value"],properties:{fieldName:{type:"string",nullable:!1},operator:{type:"string",nullable:!1,enum:["==",">=","<=",">","<","!=","like","not like","like_cs","not like_cs"]},value:{$ref:"querySchema#/definitions/conditionValueSchema"}}}},sortOrder:{type:"array",nullable:!1,items:{type:"object",required:["fieldName","asc"],properties:{fieldName:{type:"string"},asc:{type:"boolean"}}}},limit:{type:"number",nullable:!1}},definitions:{conditionValueSchema:{oneOf:[{type:"null",nullable:!0},{type:"string",nullable:!1},{type:"number",nullable:!1},{type:"boolean",nullable:!1},{type:"array",nullable:!1,items:{$ref:"querySchema#/definitions/conditionValueSchema"}},{type:"object",nullable:!1,patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]{1,64}":{$ref:"querySchema#/definitions/conditionValueSchema"}}}]}}},t.QueryRequestSchema={type:"object",required:["clientId","clientRequestId","query","subscribe"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientId","clientRequestId"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1}}}},791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const n=r(1636),i=r(8038),o=r(4684);class s{}function a(e,t){var r;const s=[...e.unconditional||[]],a=new Set,c=new Map;for(const[s,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(s);for(const[s,f]of Object.entries(l)){const l=[],p=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,d=(0,o.encodeValueForMapping)(p);switch(s){case"==":l.push(...f[d]||[]);break;case"!=":{(f[d]||[]).forEach((e=>a.add(e)));const e=Object.entries(f).filter((([e])=>e!==d));for(const[t,r]of e)l.push(...r);break}case"<":case"<=":case">":case">=":case"like":case"not like":case"like_cs":case"not like_cs":(0,n.isNotNullish)(p)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),p,s))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+s)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())a.has(t)||r>=e.queriesMetadata[t].condCount&&s.push(t);return s}function u(e,t,r){if(null===e||null===t)return!1;switch(r){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&c(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&c(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!0));default:throw new Error(`Unsupported operator comparison: ${r}`)}}function c(e,t,r){r||(e=e.toLowerCase(),t=t.toLowerCase());const n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%/g,".*");return new RegExp(`^${n}$`).test(e)}t.QueryMappingManager=s,t.SimpleQueryMappingManager=class extends s{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?a(i,t):[]}},t.findQueriesForDocumentSync=a,t.compareOperator=u,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(8556),t),n.__exportStar(r(1515),t)},8556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const n=r(8784),i={"in:in":(e,t)=>e.every((e=>t.includes(e))),"in:not in":(e,t)=>e.every((e=>!t.includes(e))),"not in:not in":(e,t)=>t.every((t=>e.includes(t))),">:not in":(e,t)=>t.every((t=>e>=t)),">=:not in":(e,t)=>t.every((t=>e>t)),"<:not in":(e,t)=>t.every((t=>e<=t)),"<=:not in":(e,t)=>t.every((t=>e<t)),">:>":(e,t)=>e>=t,">=:>":(e,t)=>e>t,"in:>":(e,t)=>e.every((e=>e>t)),">:>=":(e,t)=>e>=t,">=:>=":(e,t)=>e>=t,"in:>=":(e,t)=>e.every((e=>e>=t)),"<:<":(e,t)=>e<=t,"<=:<":(e,t)=>e<t,"in:<":(e,t)=>e.every((e=>e<t)),"<:<=":(e,t)=>e<=t,"<=:<=":(e,t)=>e<=t,"in:<=":(e,t)=>e.every((e=>e<=t))};t.QueryContext=class{constructor(e){this.query=e,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(e){return!e.find(((e,t)=>{var r;return!(0,n.isEqual)(this.query.sortOrder[t],Object.assign(Object.assign({},e),{asc:null===(r=e.asc)||void 0===r||r}))}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}includes(e,t,r){return this.includesCondition({fieldName:e,operator:t,value:r})}includesCondition(e){const t=this.parsedConditions.filter((t=>t.fieldName===e.fieldName));return!!t.length&&!!t.find((t=>this.evaluateIncludes(t,e)))}includesConditions(e){return this.parseConditions(e).every((e=>this.includesCondition(e)))}matchesConditions(e){const t=this.parseConditions(e);return this.parsedConditions.length===t.length&&t.every((e=>this.includesCondition(e)))}matchesQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.matchesConditions(e.conditions),r=this.sortedByExact(e.sortOrder),n=this.limit===e.limit;return t&&r&&n}isSubsetOf(e,t,r){return this.isSubsetOfCondition({fieldName:e,operator:t,value:r})}isSubsetOfCondition(e){return!!this.parsedConditions.filter((t=>t.fieldName===e.fieldName)).find((t=>this.evaluateSubset(t,e)))}isSubsetOfConditions(e){return this.parseConditions(e).every((e=>this.isSubsetOfCondition(e)))}isSubsetOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.isSubsetOfConditions(e.conditions),r=this.sortedBy(e.sortOrder),n=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&r&&n}getConditionsFor(...e){return this.parsedConditions.filter((t=>e.includes(t.fieldName)))}getConditionsForField(e){return this.parsedConditions.filter((t=>t.fieldName===e))}evaluateSubset(e,t){const{operator:r,value:n}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=i[`${r}:${o}`];return!!a&&a(n,s)}evaluateIncludes(e,t){const{operator:r,value:i}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=Array.isArray(i)?i.sort():i,u=Array.isArray(s)?s.sort():s;return o===r&&(0,n.isEqual)(u,a)}parseConditions(e){const t=[],r=new Map,n=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),r.forEach(((e,r)=>{t.push({fieldName:r,operator:"in",value:e})})),n.forEach(((e,r)=>{t.push({fieldName:r,operator:"not in",value:e})})),t}}},1515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);t.SimpleQueryBuilder=class{constructor(e,t){this.collectionName=e,this.integrationId=t,this.query={integrationId:t,collectionName:e,conditions:[],limit:-1,sortOrder:[]}}where(e,t,r){if("in"===t||"not in"===t){const n=r instanceof Array?[...r]:[r];for(const r of n)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:r});return this}return this.query.conditions.push({fieldName:e,operator:t,value:r}),this}eq(e,t){return this.where(e,"==",t)}neq(e,t){return this.where(e,"!=",t)}in(e,t){return this.where(e,"in",t)}nin(e,t){return this.where(e,"not in",t)}gt(e,t){return this.where(e,">",t)}gte(e,t){return this.where(e,">=",t)}lt(e,t){return this.where(e,"<",t)}lte(e,t){return this.where(e,"<=",t)}like(e,t,r=!0){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r=!0){return this.where(e,r?"not like_cs":"not like",t)}limit(e){return(0,o.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const r={asc:t,fieldName:e};return(0,o.validateFieldSort)(r),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(r),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=n.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const r of Object.values(t)){const t=n.groupBy(r,(e=>e.operator));for(const[r,i]of Object.entries(t)){if("=="===r||"!="===r){e.push(...i);continue}const t=n.sortBy(i,(e=>e.value));">"===r||">="===r?e.push(t[t.length-1]):e.push(t[0])}}return e}}},1906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromSquidRegion=t.convertToSquidRegion=t.getSquidSupportedCloudMap=t.squidSupportedRegionMap=t.supportedSquidRegions=void 0;const n=r(1636);t.supportedSquidRegions=["us-east-1.aws","local"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},local:{id:"local",name:"Local"}},t.getSquidSupportedCloudMap=function(e=!1){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[e?t.squidSupportedRegionMap.local:void 0,t.squidSupportedRegionMap["us-east-1.aws"]].filter(n.isNotNullish)},gcp:{id:"gcp",name:"Google Cloud Platform",icon:"gcp_icon",tooltip:"Google Cloud (GCP) support is coming soon!",regions:[]},azure:{id:"azure",name:"Microsoft Azure",icon:"azure_icon",tooltip:"Microsoft Azure support is coming soon!",regions:[]}}},t.convertToSquidRegion=function(e,t){return"local"===t?"local":`${t}.${e}`},t.convertFromSquidRegion=function(e){if("local"===e)return{cloudId:"aws",region:"local"};const t=e.split(".");return{cloudId:t[1],region:t[0]}}},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const n=r(9312),i=n.__importDefault(r(6236)),o=n.__importDefault(r(8414)),s=n.__importDefault(r(2091)),a=r(7008),u=r(7850),c=r(8315),l=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function f(e){return l.compile(e)}function p(e,t){const r={exactMatch:[],parentsMatch:[]};if(!e.length)return r.exactMatch.push(t),r;r.parentsMatch.push(t);const n=[...e];for(;n.length;){const e=d(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=p(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function d(e,t){var r,n;const i=(null===(r=e.properties)||void 0===r?void 0:r[t])?[null===(n=e.properties)||void 0===n?void 0:n[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,o.default)(l),l.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),l.addKeyword({keyword:"isJSON",type:"object",validate:(e,t)=>{try{const e=JSON.stringify(t);return JSON.parse(e),!0}catch(e){return!1}}}),l.addKeyword({keyword:"isComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"isDefaultComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),l.addKeyword({keyword:"dataType",validate:(e,t)=>!0}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=f,t.validateSchema=function(e,t,r=[],n={}){const i=f(e),o=i(t);if(!r.length&&!o)throw new c.ValidationError("The data does not conform with the collection schema.",a.HttpStatus.BAD_REQUEST,{errors:i.errors});if(!o&&r.length)for(const e of(0,u.truthy)(i.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",r.some((e=>t.startsWith(e+"."))))throw new c.ValidationError(`${t} does not conform with the collection schema.`,a.HttpStatus.BAD_REQUEST)}!function(e,t,r){if(r&&t.readOnly||!1===t.insertable&&!r)throw new c.ValidationError("The schema does not allow this action",a.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=p((0,u.truthy)(n.path),t);for(const t of i.exactMatch){if(t.readOnly&&"E"===n.kind)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,a.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,a.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,s.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=d},5098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenerateNewApiKeyRequestSchema=t.DeleteApiKeyRequestSchema=t.DeleteCustomSecretRequestSchema=t.SetCustomSecretRequestSchema=void 0,t.SetCustomSecretRequestSchema={type:"object",required:["key","value"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_+]",nullable:!1},value:{type:"string",nullable:!1}}},t.DeleteCustomSecretRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}},t.DeleteApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{collection:"apiKeys"}}}},t.GenerateNewApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}}},1391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromClientSchema=void 0,t.MessageFromClientSchema={type:"object",required:["type"],oneOf:[{required:["payload"],properties:{type:{const:"acknowledge"},payload:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},{properties:{type:{const:"catchup"}}},{properties:{type:{const:"kill"}}},{properties:{type:{const:"acquireLock"},payload:{type:"object",required:["mutex","exclusive","clientRequestId"],properties:{mutex:{type:"string"},exclusive:{type:"boolean"},clientRequestId:{type:"string"}}}}},{properties:{type:{const:"releaseLock"},payload:{type:"object",required:["lockId","clientRequestId"],properties:{lockId:{type:"string"},clientRequestId:{type:"string"}}}}}]}},7104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECONDS_PER_MONTH=t.SECONDS_PER_WEEK=t.SECONDS_PER_DAY=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=void 0,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=60*t.SECONDS_PER_MINUTE,t.SECONDS_PER_DAY=24*t.SECONDS_PER_HOUR,t.SECONDS_PER_WEEK=7*t.SECONDS_PER_DAY,t.SECONDS_PER_MONTH=30*t.SECONDS_PER_DAY},7682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMergeCustomizer=t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0;const n=r(8784);function i(e,t,r=((e,t)=>e>t?1:e<t?-1:0),n=0,o=e.length-1){if(o<n)return-1;const s=Math.trunc((n+o)/2);return 0===r(t,e[s])?s:r(t,e[s])>0?i(e,t,r,s+1,o):i(e,t,r,n,s-1)}t.binarySearch=i,t.insertSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){let n;for(n=e.length-1;n>=0&&r(e[n],t)>0;n--)e[n+1]=e[n];e[n+1]=t},t.removeSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){const n=i(e,t,r);n>-1&&e.splice(n,1)},t.asyncGroupBy=async function(e,t){const r={};for(const n of e){const e=await t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},t.arrayMergeCustomizer=(e,t)=>(0,n.isArray)(e)?e.concat(t):void 0},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.notNullish=t.truthy=t.assertValidateTruthy=t.assertNotNullish=t.assertTruthy=void 0;const n=r(7008),i=r(1636),o=r(8315);function s(e,t){if(e)return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function a(e,t){if((0,i.isNotNullish)(e))return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function u(e,t){return s(e,t),e}t.assertTruthy=s,t.assertNotNullish=a,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){s(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return a(e,t),e},t.validateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){return u(e,(()=>new o.ValidationError(t,r,i)))}},8255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class r extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=r},7142:(e,t)=>{"use strict";function r(e){return/^local/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationHttpHeaders=t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL("https://squid.cloud");n.host=`${t}.${e}.${n.host}`,r(e)&&(n.protocol="http",n.port="8000",function(e){return/android$/.test(e)}(e)?n.host="10.0.2.2":function(e){return/ios$/.test(e)}(e)&&(n.host="localhost"));const i=n.toString();return i.endsWith("/")?i:i+"/"},t.getApplicationHttpHeaders=function(e,t){const n={};return r(e)&&(n["X-Squid-AppId"]=t),n}},6485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateShortId=t.generateId=void 0,t.generateId=function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.generateShortId=function(e=18){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()));return t}},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const n=r(2937),i=r(7850);t.LockManager=class{constructor(){this.locks={}}async lock(...e){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));await(0,n.lastValueFrom)((0,n.combineLatest)(t).pipe((0,n.filter)((e=>!e.includes(!0))),(0,n.take)(1))),await this.lock(...e)}release(...e){for(const t of e){const e=(0,i.truthy)(this.locks[t]);e.next(!1),e.complete(),delete this.locks[t]}}canGetLock(...e){return!e.some((e=>{var t;return null===(t=this.locks[e])||void 0===t?void 0:t.value}))}lockSync(...e){(0,i.assertTruthy)(this.canGetLock(...e),"Cannot acquire lock sync");for(const t of e)this.locks[t]=new n.BehaviorSubject(!0)}}},1636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNullish=void 0,t.isNotNullish=function(e){return null!=e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceKeyInRecord=t.replaceKeyInMap=t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850);function o(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t,r="."){const n=t.split(r);let o,s=e;for(;s&&n.length;){const e=(0,i.truthy)(n.shift());if(!(s instanceof Object&&e in s))return;o=s[e],s=o}return o},t.setInPath=function(e,t,r,s="."){var a;const u=t.split(s);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(a=n.clone(c[e]))&&void 0!==a?a:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var s;const a=t.split(r);let u=e;for(;a.length;){const e=(0,i.truthy)(a.shift());if(a.length){const t=o(u[e])&&null!==(s=n.clone(u[e]))&&void 0!==s?s:{};u[e]=t,u=t}else delete u[e]}},t.deepReplace=function e(t,r,n){for(const i in t)i===r?t[i]=n(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,r,n))):"object"==typeof t[i]&&e(t[i],r,n)},t.replaceKeyInMap=function(e,t,r){if(e.has(t)){const n=e.get(t);e.delete(t),e.set(r,n)}},t.replaceKeyInRecord=function(e,t,r){const n=e[t];void 0!==n&&(e[r]=n,delete e[t])}},4684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recodeValue=t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const n=r(5382);function i(e){if(Array.isArray(e))return e.map((e=>i(e)));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),r={};return t.sort().forEach((t=>{r[t]=i(e[t])})),r}function o(e){try{return n.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}function s(e){return n.EJSON.parse(e)}function a(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(o(e))}function u(e){return s(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=s,t.encodeValueForMapping=a,t.decodeValueForMapping=u,t.recodeValue=function(e){return u(a(e))}},8932:(e,t)=>{"use strict";function r(e){return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}:${(e.getUTCSeconds()+"").padStart(2,"0")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.dateToTimeString=t.msPastMidnightToTimeString=t.kafkaConnectStringToInterval=t.base64ToBinary=t.base64ToString=t.isoStringToDate=t.msToDate=t.daysPastEpochToDate=t.moneyStringToNumber=t.JSONToString=t.stringToJSON=t.stringToBuffer=t.bufferToString=t.numberToString=t.stringToNumber=t.intToBoolean=t.booleanToInt=t.unchanged=void 0,t.unchanged=function(e){return e},t.booleanToInt=function(e){return e?1:0},t.intToBoolean=function(e){return!!e},t.stringToNumber=function(e){return Number(e)},t.numberToString=function(e){return e+""},t.bufferToString=function(e){return e.toString()},t.stringToBuffer=function(e){return Buffer.from(e)},t.stringToJSON=function(e){return JSON.parse(e)},t.JSONToString=function(e){return JSON.stringify(e)},t.moneyStringToNumber=function(e){return Number(e.replace(/[^0-9\.]+/g,""))},t.daysPastEpochToDate=function(e){return new Date(864e5*e)},t.msToDate=function(e){return new Date(e)},t.isoStringToDate=function(e){return new Date(e)},t.base64ToString=function(e){return atob(e)},t.base64ToBinary=function(e){const t=atob(e);let r="";for(let e=0;e<t.length;e++)r+=t[e].charCodeAt(0).toString(2);return r},t.kafkaConnectStringToInterval=function(e){const t=e.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);if(!t)throw new Error(`Interval string is not properly formatted: ${e}`);return{years:parseInt(t[1])||0,months:parseInt(t[2])||0,days:parseInt(t[3])||0,hours:parseInt(t[4])||0,minutes:parseInt(t[5])||0,seconds:parseInt(t[6])||0}},t.msPastMidnightToTimeString=function(e){return r(new Date(e))},t.dateToTimeString=r},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendQueryParams=void 0,t.appendQueryParams=function(e,t){const r=new URL(e),n=new URLSearchParams(r.search);for(const e in t)t.hasOwnProperty(e)&&n.set(e,t[e]);return r.search=n.toString(),r.toString()}},8315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOnlyKeys=t.isRightType=t.isNotEmpty=t.validateQueryLimit=t.validateMutations=t.validateOpenIdProviderType=t.validateOpenIdProvider=t.validateFieldSort=t.ValidationError=void 0;const n=r(7850);class i extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.details=r}}function o(e){if(!e||!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A document id and a collection id can contain only a-z, A-Z, 0-9,!@#$%^&*~_, startingwith a letter, at least one character, and up to 50.")}function s(e){if(!e||"string"!=typeof e)throw new Error("Field name has to be a non-empty string");if("__docId__"!==e&&!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A Field name can contain only a-z, A-Z, 0-9,!@#$%^&*~_, starting with a letter, at least one character, and up to 50. Field name: "+e)}function a(e){(0,n.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function u(e){if(!e||"object"!=typeof e)throw new Error("Property mutation need to be a JSON object.");if(!["update","applyNumericFn","applyStringFn"].includes(e.type))throw new Error("Property mutation can be of type 'update', 'applyNumericFn', 'applyStringFn'");switch(e.type){case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Update value property mutation has to be of type update");if(void 0===e.value)throw new Error("Value has to exist in an update value property mutation..")}(e);break;case"applyNumericFn":!function(e){if(!e||"applyNumericFn"!==e.type)throw new Error("Apply numeric fn mutation has to be of type applyNumericFn");if(!["increment"].includes(e.fn))throw new Error("Invalid fn for apply numeric fn.");if("number"!=typeof e.value)throw new Error("The value in an apply numeric fn function has to be numeric.")}(e);break;case"applyStringFn":!function(e){if(!e||"applyStringFn"!==e.type)throw new Error("Apply string fn mutation has to be of type applyStringFn");if(!["trim","extendString"].includes(e.fn))throw new Error("Invalid fn for apply string fn.");if("string"!=typeof e.value)throw new Error("The value in an apply string fn function has to be a string.")}(e)}}function c(e){if(!e)throw new Error("Mutation cannot be empty");if(!["insert","delete","update"].includes(e.type))throw new Error("Mutation type has to be one of 'insert', 'delete', or 'update'");switch(function(e){if("string"!=typeof e||!e)throw new Error("Collection path has to be a non empty string");o(e)}(e.squidDocIdObj.collectionName),o(e.squidDocIdObj.docId),e.type){case"delete":!function(e){if(!e||"delete"!==e.type)throw new Error("Mutation has to be non empty with type delete.")}(e);break;case"insert":!function(e){if(!e||"insert"!==e.type)throw new Error("Mutation has to be non empty with type insert.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in insert mutation need to be a JSON object.");for(const[t]of Object.entries(e.properties))s(t)}(e);break;case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Mutation has to be non empty with type update.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in update mutation need to be a JSON object.");const t=Object.entries(e.properties);for(const[e,r]of t){s(e);for(const e of r)u(e)}}(e)}}function l(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function f(e,t){return!Array.isArray(e)&&[...Object.keys(e)].every((e=>t.includes(e)))}t.ValidationError=i,t.validateFieldSort=function(e){if(!(e instanceof Object))throw new Error("Field sort has to be an object");(0,n.assertTruthy)(f(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,n.assertTruthy)(l(e.asc,"boolean"),"Asc needs to be boolean"),s(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),a(e.providerType),(0,n.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=a,t.validateMutations=function(e){if(!(e&&e instanceof Array&&e.length))throw new Error("The list of mutations has to be a non-empty array.");for(const t of e)c(t)},t.validateQueryLimit=function(e){(0,n.assertTruthy)(l(e,"number"),"Limit needs to be a number"),-1!==e&&((0,n.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,n.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,n.assertTruthy)(e<=2e4,"Limit can be maximum 20000"))},t.isNotEmpty=function(e){return function(e){if(null!=e&&"string"!=typeof e)throw new Error("Unexpected input type "+typeof e)}(e),"string"==typeof e&&!!e},t.isRightType=l,t.hasOnlyKeys=f},3811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebhookResponse=void 0,t.isWebhookResponse=function(e){return e&&e.__isWebhookResponse__}},6808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantClient=void 0;const n=r(575),i=r(2937),o=r(9978);t.AiAssistantClient=class{constructor(e,t,r,n){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.integrationId=n,this.ongoingChatRequests={},this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"aiAssistant"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleChatResponse(e)}))}profile(e){return new s(this,this.integrationId,e)}async mutate(e){await this.rpcManager.post("ai/assistant/mutate",e)}chat(e,t){const r=(0,n.generateId)(),o=new i.BehaviorSubject("");this.ongoingChatRequests[r]=o;const s={profileId:e,prompt:t,clientId:this.clientIdService.getClientId(),integrationId:this.integrationId,clientRequestId:r};return this.rpcManager.post("ai/assistant/chat",s).catch((e=>{o.error(e),o.complete()})),o.pipe((0,i.finalize)((()=>{delete this.ongoingChatRequests[r]})),(0,i.share)())}handleChatResponse(e){const t=this.ongoingChatRequests[e.clientRequestId];t&&(e.payload.complete?t.complete():t.next(t.value+e.payload.token))}};class s{constructor(e,t,r){this.client=e,this.integrationId=t,this.profileId=r}chat(e){return this.client.chat(this.profileId,e)}context(e){return new a(this.client,this.integrationId,this.profileId,e)}instruction(e){return new u(this.client,this.integrationId,this.profileId,e)}insert(e){const{modelName:t,strictContext:r}=e,n={type:"insert",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}update(e){const{modelName:t,strictContext:r}=e,n={type:"update",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"profile",profileId:this.profileId,integrationId:this.integrationId,payload:{}};return this.client.mutate(e)}}class a{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{title:t,context:r}=e,n={type:"insert",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}update(e){const{title:t,context:r}=e,n={type:"update",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}class u{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{instruction:t}=e,r={type:"insert",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}update(e){const{instruction:t}=e,r={type:"update",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}delete(){const e={type:"delete",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}},5969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiClientFactory=void 0;const n=r(6808);t.AiClientFactory=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.assistantsMap=new Map}getAssistant(e){let t=this.assistantsMap.get(e);return t||(t=new n.AiAssistantClient(this.clientIdService,this.rpcManager,this.socketManager,e),this.assistantsMap.set(e,t),t)}}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const n=r(575),i=r(8784),o=r(2937),s=r(9978);t.ApiManager=class{constructor(e,t,r,n={}){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.apiServerUrlOverrideMapping=n,this.ongoingApiExecutions={},r.observeNotifications().pipe((0,o.filter)((e=>"api"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,r){const i=(0,n.generateId)(),a=new o.Subject;this.ongoingApiExecutions[i]=a;const u={integrationId:e,endpointId:t,request:r,clientId:this.clientIdService.getClientId(),clientRequestId:i,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",u).catch((n=>{console.error("Got error while calling API",e,t,r,n),a.error(n),a.complete()})),(0,o.race)(a.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)()),this.clientIdService.observeClientTooOld().pipe((0,s.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}async handleApiResponse(e,t){const r=this.ongoingApiExecutions[e];r&&(t.success?r.next((0,n.deserializeObj)(t.payload)):r.error((0,i.pick)(t,"httpStatus","payload")),r.complete())}}},9526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthManager=void 0;const n=r(2937);t.AuthManager=class{constructor(e,t){this.destructManager=e,this.apiKey=t,this.authIdTokenSet=new n.BehaviorSubject(!1),this.authIdTokenObservableSubject=new n.Subject,this.shouldWaitForAuth=!1,this.observeAuthIdToken().subscribe((e=>{this.idToken=e.token,this.integrationId=e.integrationId,this.authIdTokenSet.next(!0)}))}setAuthIdToken(e,t){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1);const r=e&&"string"!=typeof e?(0,n.from)(e).pipe((0,n.map)((e=>({token:e,integrationId:t})))):(0,n.of)({token:e,integrationId:t});this.authIdTokenObservableSubject.next(r)}observeAuthIdToken(){return this.authIdTokenObservableSubject.pipe((0,n.switchMap)((e=>e)),(0,n.takeUntil)(this.destructManager.isDestructingObservable))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.isDestructingObservable))}getApiKey(){return this.apiKey}getAuthToken(){return this.apiKey?{type:"ApiKey",token:this.apiKey}:this.idToken?{type:"Bearer",token:this.idToken,integrationId:this.integrationId}:void 0}}},8862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.BackendFunctionManager=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.ongoingFunctionExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const r=(0,n.generateId)(),s=new i.Subject;this.ongoingFunctionExecutions[r]=s;const a={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientId:this.clientIdService.getClientId(),clientRequestId:r};return this.rpcManager.post("backend-function/execute",a).catch((t=>{console.error("Got error while executing function",e,t),s.error(t),s.complete()})),(0,i.race)(s.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[r]})),(0,i.share)()),this.clientIdService.observeClientTooOld().pipe((0,o.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}handleFunctionResponse(e,t){const r=this.ongoingFunctionExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.response):(r.error(new Error(i.response)),r.complete())}}},7378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientIdService=void 0;const n=r(2937),i=r(575);t.ClientIdService=class{constructor(e){this.destructManager=e,this.clientTooOldSubject=new n.BehaviorSubject(!1),this.clientId=(0,i.generateId)(),this.destructManager.onDestruct((()=>{this.clientTooOldSubject.complete()}))}observeClientTooOld(){return this.clientTooOldSubject.pipe((0,n.filter)((e=>e)),(0,n.map)((e=>{})))}notifyClientTooOld(){this.clientTooOldSubject.next(!0),this.clientId=(0,i.generateId)()}notifyClientReadyToBeRegenerated(){this.clientTooOldSubject.next(!1)}observeClientReadyToBeRegenerated(){return this.clientTooOldSubject.pipe((0,n.skip)(1),(0,n.filter)((e=>!e)),(0,n.map)((e=>{})))}getClientId(){return this.clientId}isClientTooOld(){return this.clientTooOldSubject.value}}},1600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const n=r(5660);t.CollectionReferenceFactory=class{constructor(e,t,r,n){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.joinQueryBuilderFactory=r,this.documentIdentityService=n,this.collections=new Map,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this))}get(e,t){let r=this.collections.get(t);r||(r=new Map,this.collections.set(t,r));let i=r.get(e);return i||(i=new n.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory),r.set(e,i),i)}migrateDocIds(e){this.collections.forEach((t=>{for(const[r,n]of t)n.migrateDocIds(e)}))}}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const n=r(575),i=r(2937);t.CollectionReference=class{constructor(e,t,r,i,o){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=r,this.queryBuilderFactory=i,this.joinQueryBuilderFactory=o,this.documents=new Map,this.refId=(0,n.generateId)()}doc(e){if(e&&"string"!=typeof e&&"object"!=typeof e&&!Array.isArray(e))throw new Error("Invalid doc id. Can be only object or string.");if(this.integrationId!==n.IntegrationType.built_in_db)if(e){if("object"!=typeof e)throw new Error("Invalid doc id. String doc ids are only supported for the built_in_db integration. For all other integrations, the doc id must be an object.")}else e={__squidId:(0,n.generateId)()};else e=e&&"string"!=typeof e?{__id:(0,n.normalizeJsonAsString)(e)}:{__id:e||(0,n.generateId)()};const t=(0,n.normalizeJsonAsString)(e),r=(0,n.getSquidDocId)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(r,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.joinQueryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}or(...e){return new o(...e)}migrateDocIds(e){for(const[t,r]of this.documents)r.migrateDocIds(e);Object.entries(e).forEach((([e,t])=>{const r=(0,n.parseSquidDocId)(e),i=(0,n.parseSquidDocId)(t);(0,n.replaceKeyInMap)(this.documents,r.docId,i.docId)}))}};class o{constructor(...e){if(0===e.length)throw new Error("At least one query builder must be provided");this.builders=e}changes(){throw new Error("Changes are not supported for merged queries")}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e){const t=this.builders.map((t=>t.snapshots(e)));return this.or(this.builders[0].getSortOrder(),...t)}or(e,...t){return(0,i.combineLatest)([...t]).pipe((0,i.map)((t=>{const r=new Set,n=t.flat(),i=[];for(const e of n)r.has(e.data)||(r.add(e.data),i.push(e));return i.sort(((t,r)=>{for(const{fieldName:n,asc:i}of e){const e=t.data[n],o=r.data[n];if(e<o)return i?-1:1;if(e>o)return i?1:-1}return 0}))})))}getSortOrder(){throw new Error("getSortOrder is not supported for merged queries")}}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const n=r(575),i=r(3910),o=r(2937),s=r(9978),a="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,s,a,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=s,this.destructManager=a,this.documentIdentityService=u,this.docIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docIdToServerTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.pendingOutgoingMutationsChanged=new o.Subject,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.knownDirtyDocs=new Set,this.failedDocsToResync=[],this.refreshDocIdToTimestamp=new Map,this.handleIncomingMessagesForTests=!0,this.destructManager.onDestruct((()=>{this.destruct()})),this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.documentStore.getDocumentOrUndefined(e)}isDirty(e){var t;if(this.knownDirtyDocs.has(e))return!0;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const r=this.docIdToServerTimestamp.get(e),n=r&&!r.expireTimestamp?r.timestamp:void 0,i=this.docIdToLocalTimestamp.get(e);return!((!i||n)&&!this.isForgotten(e)&&!this.isLocalOnly(e)&&i===n)}async runInTransaction(e,t){return t?((0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(a)?this.lockManager.lockSync(a):await this.lockManager.lock(a),new Promise((async(t,r)=>{try{this.currentTransactionId=(0,n.generateId)();try{return await e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:r})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i);this.knownDirtyDocs.add(o),t||(await this.lockManager.lock(a),this.lockManager.release(a)),this.knownDirtyDocs.delete(o);const s=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,n.reduceMutations)([s.mutation,e])[0],this.outgoingMutationsEmpty.next(!1);else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},r=this.pendingOutgoingMutations.get(o)||[];r.push(t),this.pendingOutgoingMutations.set(o,r),this.outgoingMutationsEmpty.next(!1),this.pendingOutgoingMutationsChanged.next()}return this.runInTransaction((async()=>{const t=this.documentStore.getDocumentOrUndefined(o),r="delete"===e.type?void 0:"update"===e.type?(0,n.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.updateDocumentFromSnapshot(o,r)&&("insert"===e.type&&this.docIdToLocalTimestamp.set(o,(new Date).getTime()),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,r).forEach((e=>this.batchClientRequestIds.add(e))))}),t)}async runInTransactionSync(e,t){if(t)return(0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);await this.lockManager.lock(a);try{this.currentTransactionId=(0,n.generateId)();try{return e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction()}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.properties.__docId__,delete t.properties.__ts__,t}handleNotifications(){this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"mutations"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingMutations(e.payload)}))})),this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"query"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingQuerySnapshots(e.payload)}))}))}handleIncomingMutations(e){if(!this.handleIncomingMessagesForTests)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.squidDocId]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessagesForTests)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),r={};for(const i of e.docs){const e=(0,n.getSquidDocId)(i.__docId__,t.collectionName,t.integrationId);r[e]={properties:i,timestamp:i.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(r,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let r=!1;const n=new Set;for(const[t,i]of Object.entries(e))this.addPendingIncomingUpdate(t,i),this.pendingIncomingUpdates.get(t)||(r=!0),n.add(t);return this.runInTransactionSync((()=>{for(const e of n)this.maybeApplyIncomingUpdate(e)}),t).then(),r}addPendingIncomingUpdate(e,t){const r=this.pendingIncomingUpdates.get(e),n=this.docIdToServerTimestamp.get(e);r&&r.timestamp>t.timestamp||n&&n.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const r=this.pendingOutgoingMutations.get(e);r&&r.length||(this.updateDocumentFromSnapshot(e,t.properties),this.acknowledgeDocument(e,t.timestamp,!t.properties),this.docIdToLocalTimestamp.set(e,t.timestamp),this.pendingIncomingUpdates.delete(e),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(e,t.properties).forEach((e=>{this.batchClientRequestIds.add(e)})),t.properties&&(this.querySubscriptionManager.findQueriesForDocument(t.properties,e).length||this.forgetDocument(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docIdToServerTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now()||this.isTracked(e))));for(const[t]of e)this.docIdToServerTimestamp.delete(t),this.forgetDocument(t)}),1e4)}isTracked(e){if(this.pendingIncomingUpdates.get(e))return!0;const t=this.pendingOutgoingMutations.get(e);return!(!t||!t.length)||this.querySubscriptionManager.hasOngoingQueryForDocId(e)}isForgotten(e){return this.documentStore.hasData(e)&&!this.isTracked(e)}isLocalOnly(e){return!this.hasBeenAcknowledged(e)&&this.documentStore.hasData(e)}hasBeenAcknowledged(e){return this.docIdToServerTimestamp.has(e)}updateDocumentFromSnapshot(e,t){const r=this.documentStore.getDocumentOrUndefined(e);return!(!r&&!t||r===t)&&((!r||!t||(0,n.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,n.normalizeJsonAsString)(r))&&(this.documentStore.saveDocument(e,t),!0))}finishTransaction(e){this.currentTransactionId=void 0;const t=[...this.batchClientRequestIds.values()];this.batchClientRequestIds.clear(),this.querySubscriptionManager.notifyAllSubscriptions(t),this.sendAllUnsentOutgoingMutations(e).then()}async sendAllUnsentOutgoingMutations(e){const t=this.groupOutgoingMutationsByIntegrationId();try{await i.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((async([e,t])=>{await this.sendMutationsForIntegration([...t],e)})),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),await this.refreshUpdatedDocuments(),this.hasPendingSentMutations()?(await(0,o.firstValueFrom)(this.pendingOutgoingMutationsChanged.pipe((0,o.filter)((()=>!this.hasPendingSentMutations())))),null==e||e.resolve()):null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),await this.resyncFailedUpdates()),null==e||e.reject(t)}}async sendMutationsForIntegration(e,t){try{const{timestamp:r,idResolutionMap:n={},refreshList:i=[]}=await this.mutationSender.sendMutations(e.map((e=>e.mutation)),t);await this.documentIdentityService.migrate(n),i.forEach((e=>{this.refreshDocIdToTimestamp.set(n[e]||e,r)}));for(const t of e){let e=this.removeOutgoingMutation(t);n[e]&&(e=n[e]),this.acknowledgeDocument(e,r),this.isTracked(e)||(this.setExpiration(e,!0),this.forgetDocument(e))}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.forgetDocument(e),(this.hasBeenAcknowledged(e)||"insert"===t.mutation.type)&&this.failedDocsToResync.push(e)}throw t}}removeOutgoingMutation(e){const t=(0,n.getSquidDocId)(e.mutation.squidDocIdObj),r=(0,n.truthy)(this.pendingOutgoingMutations.get(t));return r.splice(r.indexOf(e),1),r.length||this.pendingOutgoingMutations.delete(t),this.pendingOutgoingMutationsChanged.next(),t}async resyncFailedUpdates(){const e=[...this.failedDocsToResync];this.failedDocsToResync.splice(0);for(const t of e){this.setExpiration(t,!0);try{const e=await this.queryBuilderFactory.getForDocument(t).snapshot();if((0,n.truthy)(e.length<=1,"Got more than one doc for the same id:"+t),!e.length){this.forgetDocument(t);const e=this.querySubscriptionManager.setClientRequestIdsForLocalDoc(t,void 0);this.querySubscriptionManager.notifyAllSubscriptions(e)}}catch(e){this.querySubscriptionManager.errorOutAllQueries(t,e)}}}async refreshUpdatedDocuments(){var e;const t=[];for(const[r,n]of this.refreshDocIdToTimestamp.entries()){const i=null===(e=this.docIdToServerTimestamp.get(r))||void 0===e?void 0:e.timestamp;i&&i>n||t.push(r)}this.refreshDocIdToTimestamp.clear();for(const e of t)try{await this.queryBuilderFactory.getForDocument(e).snapshot()}catch(e){}}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,r]of[...this.pendingOutgoingMutations.entries()]){const t=r[r.length-1];if(t&&!t.sentToServer){const r=t.mutation.squidDocIdObj.integrationId;(e[r]||(e[r]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isTracked(t)||this.forgetDocument(t)}))}acknowledgeDocument(e,t,r=!1){this.docIdToServerTimestamp.set(e,{timestamp:t}),this.setExpiration(e,r)}setExpiration(e,t){const r=this.docIdToServerTimestamp.get(e);r&&(r.expireTimestamp=t?Date.now()+2e4:void 0)}forgetDocument(e){this.docIdToLocalTimestamp.delete(e),this.setExpiration(e,!0)}migrateDocIds(e){Object.entries(e).forEach((([e,t])=>{(0,n.replaceKeyInMap)(this.docIdToLocalTimestamp,e,t),(0,n.replaceKeyInMap)(this.docIdToServerTimestamp,e,t)}))}hasPendingSentMutations(){for(const e of this.pendingOutgoingMutations.values())for(const t of e)if(t.sentToServer)return!0;return!1}}},7787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0;const n=r(2937);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}get isDestructingObservable(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean))}onPreDestruct(e){this.predestructors.push(e)}onDestruct(e){this.destructors.push(e)}async destruct(){if(this.isDestructing)return;this.isDestructedSubject.next(!0);const e=this.predestructors.concat(this.destructors);let t=e.shift();for(;t;){try{await t()}catch(e){console.error("Error while destructing Squid",e)}t=e.shift()}}}},4605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockImpl=t.DistributedLockManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.DistributedLockManager=class{constructor(e,t){this.socketManager=e,this.destructManager=t,this.ongoingLocks={},this.acquireLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockAcquired"===e.type))),this.releaseLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockReleased"===e.type))),this.lockWaitForConnectionThreshold=2e3,t.onPreDestruct((()=>{this.releaseAllLocks()})),this.socketManager.observeConnectionReady().subscribe((e=>{e||this.releaseAllLocks()})),this.releaseLockMessagesFromServer.subscribe((e=>{const t=this.ongoingLocks[e.payload.clientRequestId];void 0!==t&&t.release().then()}))}async lock(e,t){if(!await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(this.lockWaitForConnectionThreshold).pipe((0,o.map)((()=>!1))),this.socketManager.observeConnectionReady().pipe((0,i.filter)(Boolean)),this.destructManager.isDestructingObservable)))return Promise.reject("CLIENT_NOT_CONNECTED");const r=(0,n.generateId)(),a={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(a);const u=await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(5e3).pipe((0,i.take)(1),(0,o.map)((()=>({payload:{error:"TIMEOUT_GETTING_LOCK",lockId:void 0}})))),this.acquireLockMessagesFromServer.pipe((0,i.filter)((e=>e.payload.clientRequestId===r)))));if(!u.payload.lockId)throw new Error(`Failed to acquire lock: ${u.payload.error}`);const c=u.payload.lockId,l=new s(c,r,this.ongoingLocks,this.socketManager);return this.ongoingLocks[c]=l,l}releaseAllLocks(){for(const[e,t]of Object.entries(this.ongoingLocks))t.release().then(),delete this.ongoingLocks[e]}};class s{constructor(e,t,r,n){this.lockId=e,this.clientRequestId=t,this.ongoingLocks=r,this.socketManager=n,this.released=!1,this.onReleaseSubject=new i.Subject}async release(){if(this.released)return;this.released=!0,delete this.ongoingLocks[this.lockId];const e={type:"releaseLock",payload:{lockId:this.lockId,clientRequestId:this.clientRequestId}};this.socketManager.sendMessage(e),this.onReleaseSubject.next()}observeRelease(){return this.onReleaseSubject.asObservable()}isReleased(){return this.released}}t.DistributedLockImpl=s},2256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2937);t.default=class{constructor(e,t){this.documentStore=e,this.destructManager=t,this.changeNotifier=new n.BehaviorSubject({}),this.destructManager.onDestruct((()=>{this.changeNotifier.complete()}))}migrate(e){Object.entries(e).forEach((([e,t])=>{this.documentStore.migrateDocId(e,t)})),this.changeNotifier.next(e)}observeChanges(){return this.changeNotifier.asObservable()}}},2417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const n=r(575),i=r(4516);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,n.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937);t.DocumentReference=class{constructor(e,t,r){this._squidDocId=e,this.dataManager=t,this.queryBuilderFactory=r,this.refId=(0,i.generateId)()}get squidDocId(){return this._squidDocId}get data(){return(0,i.truthy)(this.dataManager.getProperties(this.squidDocId))}get hasData(){return!!this.dataManager.getProperties(this.squidDocId)}async snapshot(){if(this.isTracked()&&this.dataManager.getProperties(this.squidDocId))return this;const e=await this.queryBuilderFactory.getForDocument(this.squidDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0}snapshots(){return this.queryBuilderFactory.getForDocument(this.squidDocId).snapshots().pipe((0,s.map)((e=>((0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0))))}isDirty(){return this.dataManager.isDirty(this.squidDocId)}isTracked(){return this.dataManager.isTracked(this.squidDocId)}async update(e,t){const r={};Object.entries(e).forEach((([e,t])=>{const n=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};r[e]=[n]}));const n={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:r};return this.dataManager.applyOutgoingMutation(n,t)}async setInPath(e,t,r){return this.update({[e]:o.cloneDeep(t)},r)}async deleteInPath(e,t){return this.update({[e]:void 0},t)}incrementInPath(e,t,r){const n={type:"applyNumericFn",fn:"increment",value:t},o={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:{[e]:[n]}};return this.dataManager.applyOutgoingMutation(o,r)}decrementInPath(e,t,r){return this.incrementInPath(e,-t,r)}async insert(e,t){const r=(0,i.parseSquidDocId)(this.squidDocId);let n=(0,i.deserializeObj)(r.docId);n.__squidId&&(n={});const o={type:"insert",squidDocIdObj:r,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:r.docId}),n)};return this.dataManager.applyOutgoingMutation(o,t)}async delete(e){const t={type:"delete",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId)};return this.dataManager.applyOutgoingMutation(t,e)}migrateDocIds(e){const t=e[this.squidDocId];t&&(this._squidDocId=t)}}},5182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentStore=void 0;const n=r(575),i=r(8784);t.DocumentStore=class{constructor(){this.squidDocIdToDoc=new Map}saveDocument(e,t){const r=this.squidDocIdToDoc.get(e);if(void 0===r&&!t)return;if(void 0!==r){if(t){const r=(0,i.cloneDeep)(t),n=this.removeInternalProperties(r);return this.squidDocIdToDoc.set(e,n),n}return void this.squidDocIdToDoc.delete(e)}const n=this.removeInternalProperties(t);return this.squidDocIdToDoc.set(e,n),t}hasData(e){return void 0!==this.squidDocIdToDoc.get(e)}getDocument(e){return(0,n.truthy)(this.getDocumentOrUndefined(e))}getDocumentOrUndefined(e){return this.squidDocIdToDoc.get(e)}sortAndLimitDocs(e,t){if(!e||0===e.size)return[];const r=[...e].map((e=>this.squidDocIdToDoc.get(e))).filter(n.isNotNullish),{sortOrder:o,limit:s}=t,a=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,a,u);return s<0?c:r.slice(0,s)}removeInternalProperties(e){if(!e)return;const t=Object.assign({},e);return delete t.__ts__,t}migrateDocId(e,t){const r=this.getDocument(e);(0,n.replaceKeyInMap)(this.squidDocIdToDoc,e,t);const i=(0,n.parseSquidDocId)(t),o=(0,n.deserializeObj)(i.docId);this.saveDocument(t,Object.assign(Object.assign(Object.assign({},r),o),{__docId__:i.docId}))}}},5621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const n=r(5857);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new n.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},5857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const n=r(9312),i=r(2948),o=n.__importDefault(r(9031));t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const r=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${r}`,headers:this.rpcManager.getStaticHeaders(),fetch:o.default}),cache:new i.InMemoryCache})}async query(e){return(await this.client.query({query:i.gql`
|
|
8
|
+
deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,o.propertyInData)(r,i,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(a,t[c])||(r.if((0,o.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),u=s(o,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8891),i=r(1162),o=r(8634),s=r(5151),a=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),p=r(8103),d=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[d.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5669),i=r(8936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const l=o.name("valid"),f=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),s=r(8891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},2869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},8103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s=r(8936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),c.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=a},1162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},4243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1686),i=r(3499),o=r(8936),s=r(4943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),c.props));const f=l.filter((e=>!(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},3021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},5316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(5669),i=r(8936),o=r(5247),s=r(8936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(c(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:u},c,l,f){const p=f?n._`${e}, ${t}, ${i}${s}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return l!==n.nil?n._`${c}.call(${l}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?f:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`),e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},1018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},2101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1018),i=r(1939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},1939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(1578),i=r(3499),o=r(5669),s=r(5247),a=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:u,validateName:c,opts:p,self:d}=i,{root:h}=u;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(u===h)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const y=a.resolveRef.call(d,h,s,r);if(void 0===y)throw new n.default(i.opts.uriResolver,s,r);return y instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(y)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:p}=c,d=p.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),y(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>y(t)),(()=>h(t)))}t.getValidate=l,t.callRef=f,t.default=c},2:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(7421),o=r(7382),s=r(8936),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let t=0;t<l.length;t++){let u=l[t];(null==u?void 0:u.$ref)&&!(0,s.schemaHasRulesButRef)(u,c.self.RULES)&&(u=o.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==u?void 0:u.$ref),u instanceof o.SchemaEnv&&(u=u.schema));const p=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),a(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function a(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=a},7421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},5671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2101),i=r(7499),o=r(6951),s=r(4480),a=r(2480),u=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},3599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===o)return;const[a,u,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof u?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(3599).default];t.default=n},2480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},8549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(l||s)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",u,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);d=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=s},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),s=r(1216),a=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),p=r(9450),d=[n.default,i.default,o.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},1135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},9507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(9161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},1337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},34:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${u}))`)}};t.default=i},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${c}.test(${t})`)}};t.default=o},6962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),s=r(4285),a={message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,s){const a=t.name("item"),u=(0,n.checkDataTypes)(d,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(u,i._`continue`),d.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,i._`${c}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${c}[${a}] = ${o}`)}))}function y(n,a){const u=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(p)}};t.default=u},8682:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,u,c,l,f),o){var d=o[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,i,d[h],s+"/"+p+"/"+h,a,s,p,o,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)r(e,n,i,d[y],s+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,o,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,i,d,s+"/"+p,a,s,p,o)}i(o,s,a,u,c,l,f)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BSONError:()=>w,BSONRegExp:()=>rt,BSONSymbol:()=>nt,BSONTypeError:()=>O,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>ve,BSON_BINARY_SUBTYPE_COLUMN:()=>we,BSON_BINARY_SUBTYPE_DEFAULT:()=>he,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>_e,BSON_BINARY_SUBTYPE_FUNCTION:()=>ye,BSON_BINARY_SUBTYPE_MD5:()=>ge,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>Oe,BSON_BINARY_SUBTYPE_UUID:()=>me,BSON_BINARY_SUBTYPE_UUID_NEW:()=>be,BSON_DATA_ARRAY:()=>G,BSON_DATA_BINARY:()=>J,BSON_DATA_BOOLEAN:()=>ee,BSON_DATA_CODE:()=>oe,BSON_DATA_CODE_W_SCOPE:()=>ae,BSON_DATA_DATE:()=>te,BSON_DATA_DBPOINTER:()=>ie,BSON_DATA_DECIMAL128:()=>fe,BSON_DATA_INT:()=>ue,BSON_DATA_LONG:()=>le,BSON_DATA_MAX_KEY:()=>de,BSON_DATA_MIN_KEY:()=>pe,BSON_DATA_NULL:()=>re,BSON_DATA_NUMBER:()=>W,BSON_DATA_OBJECT:()=>K,BSON_DATA_OID:()=>X,BSON_DATA_REGEXP:()=>ne,BSON_DATA_STRING:()=>H,BSON_DATA_SYMBOL:()=>se,BSON_DATA_TIMESTAMP:()=>ce,BSON_DATA_UNDEFINED:()=>Z,BSON_INT32_MAX:()=>B,BSON_INT32_MIN:()=>U,BSON_INT64_MAX:()=>V,BSON_INT64_MIN:()=>z,Binary:()=>Se,Code:()=>Ie,DBRef:()=>je,Decimal128:()=>We,Double:()=>He,EJSON:()=>yt,Int32:()=>Ke,Long:()=>De,LongWithoutOverridesClass:()=>it,Map:()=>vt,MaxKey:()=>Ge,MinKey:()=>Je,ObjectID:()=>tt,ObjectId:()=>tt,Timestamp:()=>ot,UUID:()=>Ee,calculateObjectSize:()=>vr,default:()=>br,deserialize:()=>yr,deserializeStream:()=>mr,serialize:()=>dr,serializeWithBufferAndIndex:()=>hr,setInternalBufferSize:()=>pr});for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;var l,f,p=function(e){var t,r,n=u(e),s=n[0],a=n[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},d=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,u=r-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")},h=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},y=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=h,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=h,s/=256,c-=8);e[r+d-h]|=128*y},v=(l=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var s=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return a(e),i(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,o.prototype),n}function f(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function v(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return j(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function O(e,t,r,n){return B(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return B(L(t),e,r,n)}function I(e,t,r,n){return B(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?d(e):d(e.slice(t,r))}function j(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=P));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(U(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i)}i+=s.length}return n},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?j(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){s=c[f],a=l[f];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=z[e[o]];return i}function M(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),y(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),y(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),h(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),h(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return p(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},l(f={exports:{}},f.exports),f.exports),m=v.Buffer;v.SlowBuffer,v.INSPECT_MAX_BYTES,v.kMaxLength;var b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b(e,t)};function g(e,t){function r(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var _=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},w=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),O=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function S(e){return e&&e.Math==Math&&e}function E(){return S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof r.g&&r.g)||Function("return this")()}function I(e){return e.toString().replace("function(","function (")}var T=function(e){var t,r="object"==typeof(t=E()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(r);for(var n=m.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},j=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(m.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(m.alloc(e))}:T}();function P(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function x(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function A(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function N(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function M(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function k(e){return D(e)&&"[object Date]"===Object.prototype.toString.call(e)}function D(e){return"object"==typeof e&&null!==e}function R(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function C(e){if(ArrayBuffer.isView(e))return m.from(e.buffer,e.byteOffset,e.byteLength);if(P(e))return m.from(e);throw new O("Must use either Buffer or TypedArray")}var $=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,F=function(e){return"string"==typeof e&&$.test(e)},q=function(e){if(!F(e))throw new O('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return m.from(t,"hex")},L=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},B=2147483647,U=-2147483648,V=Math.pow(2,63)-1,z=-Math.pow(2,63),Q=Math.pow(2,53),Y=-Math.pow(2,53),W=1,H=2,K=3,G=4,J=5,Z=6,X=7,ee=8,te=9,re=10,ne=11,ie=12,oe=13,se=14,ae=15,ue=16,ce=17,le=18,fe=19,pe=255,de=127,he=0,ye=1,ve=2,me=3,be=4,ge=5,_e=6,we=7,Oe=128,Se=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new O("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=m.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=m.from(t,"binary"):Array.isArray(t)?this.buffer=m.from(t):this.buffer=C(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new O("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new O("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new O("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=m.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=m.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(C(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Ee(this.buffer.slice(0,this.position));throw new w('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=m.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=m.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=q(t.$uuid)),!n)throw new O("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===be?new Ee(n):new e(n,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Se.prototype,"_bsontype",{value:"Binary"});var Ee=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=m.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=C(r);else{if("string"!=typeof r)throw new O("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");n=q(r)}return(o=e.call(this,n,be)||this).__id=i,o}return g(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=L(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=L(this.id,e);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new Se(this.id,Se.SUBTYPE_UUID)},t.generate=function(){var e=j(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,m.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?F(e):!!x(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(q(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Se),Ie=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function Te(e){return D(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(Ie.prototype,"_bsontype",{value:"Code"});var je=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(je.prototype,"_bsontype",{value:"DBRef"});var Pe=void 0;try{Pe=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var xe=4294967296,Ae=0x10000000000000000,Ne=Ae/2,Me={},ke={},De=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=ke[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(ke[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Me[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Me[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ae)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Ne)return e.MIN_VALUE;if(t+1>=Ne)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%xe|0,t/xe|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));s=s.mul(l).add(e.fromNumber(c))}else s=(s=s.mul(o)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},e.isLong=function(e){return D(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,p=0;return f+=(p+=o+(65535&t.low))>>>16,p&=65535,l+=(f+=i+u)>>>16,f&=65535,c+=(l+=n+a)>>>16,l&=65535,c+=r+s,c&=65535,e.fromBits(f<<16|p,c<<16|l,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Pe){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?Pe.div_u:Pe.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=a,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,r=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(r&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Pe){var r=(this.unsigned?Pe.rem_u:Pe.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Pe){var r=Pe.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Pe.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,p=0,d=0,h=0;return d+=(h+=s*l)>>>16,h&=65535,p+=(d+=o*l)>>>16,d&=65535,p+=(d+=s*c)>>>16,d&=65535,f+=(p+=i*l)>>>16,p&=65535,f+=(p+=o*c)>>>16,p&=65535,f+=(p+=s*u)>>>16,p&=65535,f+=n*l+i*c+o*u+s*a,f&=65535,e.fromBits(d<<16|h,f<<16|p,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*xe+(this.low>>>0):this.high*xe+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(t);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(De.prototype,"__isLong__",{value:!0}),Object.defineProperty(De.prototype,"_bsontype",{value:"Long"});var Re=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ce=/^(\+|-)?(Infinity|inf)$/i,$e=/^(\+|-)?NaN$/i,Fe=6111,qe=-6176,Le=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Be=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ue=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ve=/^([-+])?(\d+)?$/;function ze(e){return!isNaN(parseInt(e,10))}function Qe(e){var t=De.fromNumber(1e9),r=De.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new De(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function Ye(e,t){throw new O('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var We=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!x(t))throw new O("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new O("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,l=0,f=[0],p=0,d=0,h=0,y=0,v=0,b=0,g=new De(0,0),_=new De(0,0),w=0;if(t.length>=7e3)throw new O(t+" not a valid Decimal128 string");var S=t.match(Re),E=t.match(Ce),I=t.match($e);if(!S&&!E&&!I||0===t.length)throw new O(t+" not a valid Decimal128 string");if(S){var T=S[2],j=S[4],P=S[5],x=S[6];j&&void 0===x&&Ye(t,"missing exponent power"),j&&void 0===T&&Ye(t,"missing exponent base"),void 0===j&&(P||x)&&Ye(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!ze(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(m.from(n?Be:Ue));if("N"===t[w])return new e(m.from(Le))}for(;ze(t[w])||"."===t[w];)"."!==t[w]?(p<34&&("0"!==t[w]||o)&&(o||(l=a),o=!0,f[d++]=parseInt(t[w],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,w+=1):(i&&Ye(t,"contains multiple periods"),i=!0,w+=1);if(i&&!a)throw new O(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var A=t.substr(++w).match(Ve);if(!A||!A[2])return new e(m.from(Le));v=parseInt(A[0],10),w+=A[0].length}if(t[w])return new e(m.from(Le));if(h=0,p){if(y=p-1,1!==(s=u))for(;0===f[l+s-1];)s-=1}else h=0,y=0,f[0]=0,u=1,p=1,s=0;for(v<=c&&c-v>16384?v=qe:v-=c;v>Fe;){if((y+=1)-h>34){if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}v-=1}for(;v<qe||p<u;){if(0===y&&s<p){v=qe,s=0;break}if(p<u?u-=1:y-=1,v<Fe)v+=1;else{if(f.join("").match(/^0+$/)){v=Fe;break}Ye(t,"overflow")}}if(y-h+1<s){var N=a;i&&(l+=1,N+=1),n&&(l+=1,N+=1);var M=parseInt(t[l+y+1],10),k=0;if(M>=5&&(k=1,5===M))for(k=f[y]%2==1?1:0,b=l+y+2;b<N;b++)if(parseInt(t[b],10)){k=1;break}if(k)for(var D=y;D>=0;D--)if(++f[D]>9&&(f[D]=0,0===D)){if(!(v<Fe))return new e(m.from(n?Be:Ue));v+=1,f[D]=1}}if(g=De.fromNumber(0),_=De.fromNumber(0),0===s)g=De.fromNumber(0),_=De.fromNumber(0);else if(y-h<17)for(D=h,_=De.fromNumber(f[D++]),g=new De(0,0);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));else{for(D=h,g=De.fromNumber(f[D++]);D<=y-17;D++)g=(g=g.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]));for(_=De.fromNumber(f[D++]);D<=y;D++)_=(_=_.multiply(De.fromNumber(10))).add(De.fromNumber(f[D]))}var R,C,$,F,q=function(e,t){if(!e&&!t)return{high:De.fromNumber(0),low:De.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new De(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new De(t.getLowBits(),0),s=r.multiply(i),a=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new De(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new De(c.getLowBits(),0))}}(g,De.fromString("100000000000000000"));q.low=q.low.add(_),C=_,(($=(R=q.low).high>>>0)<(F=C.high>>>0)||$===F&&R.low>>>0<C.low>>>0)&&(q.high=q.high.add(De.fromNumber(1))),r=v+6176;var L={low:De.fromNumber(0),high:De.fromNumber(0)};q.high.shiftRightUnsigned(49).and(De.fromNumber(1)).equals(De.fromNumber(1))?(L.high=L.high.or(De.fromNumber(3).shiftLeft(61)),L.high=L.high.or(De.fromNumber(r).and(De.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(q.high.and(De.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(De.fromNumber(16383&r).shiftLeft(49)),L.high=L.high.or(q.high.and(De.fromNumber(562949953421311)))),L.low=q.low,n&&(L.high=L.high.or(De.fromString("9223372036854775808")));var B=m.alloc(16);return w=0,B[w++]=255&L.low.low,B[w++]=L.low.low>>8&255,B[w++]=L.low.low>>16&255,B[w++]=L.low.low>>24&255,B[w++]=255&L.low.high,B[w++]=L.low.high>>8&255,B[w++]=L.low.high>>16&255,B[w++]=L.low.high>>24&255,B[w++]=255&L.high.low,B[w++]=L.high.low>>8&255,B[w++]=L.high.low>>16&255,B[w++]=L.high.low>>24&255,B[w++]=255&L.high.high,B[w++]=L.high.high>>8&255,B[w++]=L.high.high>>16&255,B[w++]=L.high.high>>24&255,new e(B)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},l=[];a=0;var f=this.bytes,p=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,d=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,h=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,y=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24;a=0,(new De(p,d),new De(h,y)).lessThan(De.ZERO)&&l.push("-");var v=y>>26&31;if(v>>3==3){if(30===v)return l.join("")+"Infinity";if(31===v)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=h,c.parts[2]=d,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var b=0,g=Qe(c);if(c=g.quotient,b=g.rem.low)for(o=8;o>=0;o--)r[9*s+o]=b%10,b=Math.floor(b/10)}if(u)t=1,r[a]=0;else for(t=36;!r[a];)t-=1,a+=1;var _=t-1+m;if(_>=34||_<=-7||m>0){if(t>34)return l.push("".concat(0)),m>0?l.push("E+".concat(m)):m<0&&l.push("E".concat(m)),l.join("");for(l.push("".concat(r[a++])),(t-=1)&&l.push("."),n=0;n<t;n++)l.push("".concat(r[a++]));l.push("E"),_>0?l.push("+".concat(_)):l.push("".concat(_))}else if(m>=0)for(n=0;n<t;n++)l.push("".concat(r[a++]));else{var w=t+m;if(w>0)for(n=0;n<w;n++)l.push("".concat(r[a++]));else l.push("0");for(l.push(".");w++<0;)l.push("0");for(n=0;n<t-Math.max(w-1,0);n++)l.push("".concat(r[a++]))}return l.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(We.prototype,"_bsontype",{value:"Decimal128"});var He=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(He.prototype,"_bsontype",{value:"Double"});var Ke=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Ke.prototype,"_bsontype",{value:"Int32"});var Ge=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Ge.prototype,"_bsontype",{value:"MaxKey"});var Je=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Je.prototype,"_bsontype",{value:"MinKey"});var Ze=new RegExp("^[0-9a-fA-F]{24}$"),Xe=null,et=Symbol("id"),tt=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new O("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?m.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[et]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[et]=r instanceof m?r:C(r);else{if("string"!=typeof r)throw new O("Argument passed in does not match the accepted types");if(12===r.length){var n=m.from(r);if(12!==n.byteLength)throw new O("Argument passed in must be a string of 12 bytes");this[et]=n}else{if(24!==r.length||!Ze.test(r))throw new O("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[et]=m.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[et]},set:function(t){this[et]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var r=e.getInc(),n=m.alloc(12);return n.writeUInt32BE(t,0),null===Xe&&(Xe=j(5)),n[4]=Xe[0],n[5]=Xe[1],n[6]=Xe[2],n[7]=Xe[3],n[8]=Xe[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[et][11]===t[et][11]&&this[et].equals(t[et]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&x(this.id))return t===m.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return m.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var r=m.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new O("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(m.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(tt.prototype,"generate",{value:R((function(e){return tt.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(tt.prototype,"getInc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt,"get_inc",{value:R((function(){return tt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(tt.prototype,"_bsontype",{value:"ObjectID"});var rt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new w("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new w("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new w("The regular expression option [".concat(this.options[n],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new O("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(rt.prototype,"_bsontype",{value:"BSONRegExp"});var nt=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(nt.prototype,"_bsontype",{value:"Symbol"});var it=De,ot=function(e){function t(r,n){var i=this;return i instanceof t?(i=De.isLong(r)?e.call(this,r.low,r.high,!0)||this:D(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return g(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(De.fromInt(e,!0))},t.fromNumber=function(e){return new t(De.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(De.fromString(e,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=De.MAX_UNSIGNED_VALUE,t}(it);function st(e){return D(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var at=2147483647,ut=-2147483648,ct=0x8000000000000000,lt=-0x8000000000000000,ft={$oid:tt,$binary:Se,$uuid:Se,$symbol:nt,$numberInt:Ke,$numberDecimal:We,$numberDouble:He,$numberLong:De,$minKey:Je,$maxKey:Ge,$regex:rt,$regularExpression:rt,$timestamp:ot};function pt(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=ut&&e<=at)return new Ke(e);if(e>=lt&&e<=ct)return De.fromNumber(e)}return new He(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),n=0;n<r.length;n++){var i=ft[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,s=new Date;return t.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):De.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&s.setTime(o),s}if(null!=e.$code){var a=Object.assign({},e);return e.$scope&&(a.$scope=pt(e.$scope)),Ie.fromExtendedJSON(e)}if(Te(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof je)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),l=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(l=!1)})),l)return je.fromExtendedJSON(u)}return e}function dt(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function ht(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==r){var n=t.seenObjects.map((function(e){return e.propertyName})),i=n.slice(0,r).map((function(e){return"".concat(e," -> ")})).join(""),o=n[r],s=" -> "+n.slice(r+1,n.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new O("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return ht(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||k(e)){var l=e.getTime(),f=l>-1&&l<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:dt(e)}:t.relaxed&&f?{$date:dt(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=lt&&e<=ct;if(e>=ut&&e<=at)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M(e)){var d=e.flags;if(void 0===d){var h=e.toString().match(/[gimuy]*$/);h&&(d=h[0])}return new rt(e.source,d).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new w("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=ht(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(st(e)){var s=e;if("function"!=typeof s.toExtendedJSON){var a=mt[e._bsontype];if(!a)throw new O("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return"Code"===r&&s.scope?s=new Ie(s.code,ht(s.scope,t)):"DBRef"===r&&s.oid&&(s=new je(ht(s.collection,t),ht(s.oid,t),ht(s.db,t),ht(s.fields,t))),s.toExtendedJSON(t)}throw new w("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var yt,vt,mt={Binary:function(e){return new Se(e.value(),e.sub_type)},Code:function(e){return new Ie(e.code,e.scope)},DBRef:function(e){return new je(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new We(e.bytes)},Double:function(e){return new He(e.value)},Int32:function(e){return new Ke(e.value)},Long:function(e){return De.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Ge},MinKey:function(){return new Je},ObjectID:function(e){return new tt(e)},ObjectId:function(e){return new tt(e)},BSONRegExp:function(e){return new rt(e.pattern,e.options)},Symbol:function(e){return new nt(e.value)},Timestamp:function(e){return ot.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new w("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return pt(t,r)}))}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=ht(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(yt||(yt={}));var bt=E();function gt(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=_t(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=_t(o,e[o],t,!1,r);return n}function _t(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+m.byteLength(e,"utf8")+1+4+m.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Y&&t<=Q&&t>=U&&t<=B?(null!=e?m.byteLength(e,"utf8")+1:0)+5:(null!=e?m.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?m.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?m.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||k(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||P(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(t.code.toString(),"utf8")+1+gt(t.scope,r,i):(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Se.SUBTYPE_BYTE_ARRAY?(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?m.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?m.byteLength(e,"utf8")+1:0)+m.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var s=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(s.$db=t.db),(null!=e?m.byteLength(e,"utf8")+1:0)+1+gt(s,r,i)}return t instanceof RegExp||M(t)?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.pattern,"utf8")+1+m.byteLength(t.options,"utf8")+1:(null!=e?m.byteLength(e,"utf8")+1:0)+gt(t,r,i)+1;case"function":if(t instanceof RegExp||M(t)||"[object RegExp]"===String.call(t))return(null!=e?m.byteLength(e,"utf8")+1:0)+1+m.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+4+m.byteLength(I(t),"utf8")+1+gt(t.scope,r,i);if(r)return(null!=e?m.byteLength(e,"utf8")+1:0)+1+4+m.byteLength(I(t),"utf8")+1}return 0}vt=bt.Map?bt.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var wt=128,Ot=192,St=224,Et=240,It=248,Tt=192,jt=224,Pt=240,xt=128;function At(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if((o&Ot)!==xt)return!1;n-=1}else if(o&wt)if((o&St)===Tt)n=1;else if((o&Et)===jt)n=2;else{if((o&It)!==Pt)return!1;n=3}}return!n}var Nt=De.fromNumber(Q),Mt=De.fromNumber(Y),kt={};function Dt(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new w("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new w("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new w("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new w("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new w("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return Ct(e,n,t,r)}var Rt=/^\$ref$|^\$id$|^\$db$/;function Ct(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,s=null!=r.cacheFunctions&&r.cacheFunctions,a=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,f=null==r.promoteLongs||r.promoteLongs,p=null==r.promoteValues||r.promoteValues,d=null==r.validation?{utf8:!0}:r.validation,h=!0,y=new Set,v=d.utf8;if("boolean"==typeof v)i=v;else{h=!1;var b=Object.keys(v).map((function(e){return v[e]}));if(0===b.length)throw new w("UTF-8 validation setting cannot be empty");if("boolean"!=typeof b[0])throw new w("Invalid UTF-8 validation option, must specify boolean values");if(i=b[0],!b.every((function(e){return e===i})))throw new w("Invalid UTF-8 validation option - keys must be all true or all false")}if(!h)for(var g=0,O=Object.keys(v);g<O.length;g++){var S=O[g];y.add(S)}var E=t;if(e.length<5)throw new w("corrupt bson message < 5 bytes long");var I=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(I<5||I>e.length)throw new w("corrupt bson message");for(var T=n?[]:{},j=0,P=!n&&null,x=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var A=e[t++];if(0===A)break;for(var N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.byteLength)throw new w("Bad BSON Document: illegal CString");var M,k=n?j++:e.toString("utf8",t,N);M=h||y.has(k)?i:!i,!1!==P&&"$"===k[0]&&(P=Rt.test(k));var D=void 0;if(t=N+1,A===H){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");D=Ft(e,t,t+Ae-1,M),t+=Ae}else if(A===X){var R=m.alloc(12);e.copy(R,0,t,t+12),D=new tt(R),t+=12}else if(A===ue&&!1===p)D=new Ke(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(A===ue)D=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(A===W&&!1===p)D=new He(x.getFloat64(t,!0)),t+=8;else if(A===W)D=x.getFloat64(t,!0),t+=8;else if(A===te){var C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;D=new Date(new De(C,$).toNumber())}else if(A===ee){if(0!==e[t]&&1!==e[t])throw new w("illegal boolean type value");D=1===e[t++]}else if(A===K){var F=t;if((Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Pe>e.length-t)throw new w("bad embedded document length in bson");if(u)D=e.slice(t,t+Pe);else{var q=r;h||(q=_(_({},r),{validation:{utf8:M}})),D=Ct(e,F,q,!1)}t+=Pe}else if(A===G){F=t;var L=r,B=t+(Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(a&&a[k]){for(var U in L={},r)L[U]=r[U];L.raw=!0}if(h||(L=_(_({},L),{validation:{utf8:M}})),D=Ct(e,F,L,!0),0!==e[(t+=Pe)-1])throw new w("invalid array terminator byte");if(t!==B)throw new w("corrupted array bson")}else if(A===Z)D=void 0;else if(A===re)D=null;else if(A===le){C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var V=new De(C,$);D=f&&!0===p&&V.lessThanOrEqual(Nt)&&V.greaterThanOrEqual(Mt)?V.toNumber():V}else if(A===fe){var z=m.alloc(16);e.copy(z,0,t,t+16),t+=16;var Q=new We(z);D="toObject"in Q&&"function"==typeof Q.toObject?Q.toObject():Q}else if(A===J){var Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,he=Y,ye=e[t++];if(Y<0)throw new w("Negative binary type element size found");if(Y>e.byteLength)throw new w("Binary type size larger than document size");if(null!=e.slice){if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}l&&p?D=e.slice(t,t+Y):(D=new Se(e.slice(t,t+Y),ye),ye===be&&(D=D.toUUID()))}else{var ve=m.alloc(Y);if(ye===Se.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new w("Negative binary type element size found for subtype 0x02");if(Y>he-4)throw new w("Binary type with subtype 0x02 contains too long binary size");if(Y<he-4)throw new w("Binary type with subtype 0x02 contains too short binary size")}for(N=0;N<Y;N++)ve[N]=e[t+N];D=l&&p?ve:ye===be?new Se(e.slice(t,t+Y),ye).toUUID():new Se(e.slice(t,t+Y),ye)}t+=Y}else if(A===ne&&!1===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var me=e.toString("utf8",t,N);for(N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");var ge=e.toString("utf8",t,N);t=N+1;var _e=new Array(ge.length);for(N=0;N<ge.length;N++)switch(ge[N]){case"m":_e[N]="m";break;case"s":_e[N]="g";break;case"i":_e[N]="i"}D=new RegExp(me,_e.join(""))}else if(A===ne&&!0===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");for(me=e.toString("utf8",t,N),N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new w("Bad BSON Document: illegal CString");ge=e.toString("utf8",t,N),t=N+1,D=new rt(me,ge)}else if(A===se){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var we=Ft(e,t,t+Ae-1,M);D=p?we:new nt(we),t+=Ae}else if(A===ce)C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new ot(C,$);else if(A===pe)D=new Je;else if(A===de)D=new Ge;else if(A===oe){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");var Oe=Ft(e,t,t+Ae-1,M);D=o?s?$t(Oe,kt,T):$t(Oe):new Ie(Oe),t+=Ae}else if(A===ae){var Ee=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Ee<13)throw new w("code_w_scope total size shorter minimum expected length");if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");Oe=Ft(e,t,t+Ae-1,M),F=t+=Ae;var Pe=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,xe=Ct(e,F,r,!1);if(t+=Pe,Ee<8+Pe+Ae)throw new w("code_w_scope total size is too short, truncating scope");if(Ee>8+Pe+Ae)throw new w("code_w_scope total size is too long, clips outer document");o?(D=s?$t(Oe,kt,T):$t(Oe)).scope=xe:D=new Ie(Oe,xe)}else{if(A!==ie)throw new w("Detected unknown BSON type ".concat(A.toString(16),' for fieldname "').concat(k,'"'));var Ae;if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new w("bad string length in bson");if(null!=d&&d.utf8&&!At(e,t,t+Ae-1))throw new w("Invalid UTF-8 string in BSON document");var Ne=e.toString("utf8",t,t+Ae-1);t+=Ae;var Me=m.alloc(12);e.copy(Me,0,t,t+12),R=new tt(Me),t+=12,D=new je(Ne,R)}"__proto__"===k?Object.defineProperty(T,k,{value:D,writable:!0,enumerable:!0,configurable:!0}):T[k]=D}if(I!==t-E){if(n)throw new w("corrupt array bson");throw new w("corrupt object bson")}if(!P)return T;if(Te(T)){var ke=Object.assign({},T);return delete ke.$ref,delete ke.$id,delete ke.$db,new je(T.$ref,T.$id,T.$db,ke)}return T}function $t(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function Ft(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!At(e,t,r))throw new w("Invalid UTF-8 string in BSON document");break}return i}var qt=/\x00/,Lt=new Set(["$db","$ref","$id","$clusterTime"]);function Bt(e,t,r,n,i){e[n++]=H;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var s=e.write(r,n+4,void 0,"utf8");return e[n+3]=s+1>>24&255,e[n+2]=s+1>>16&255,e[n+1]=s+1>>8&255,e[n]=s+1&255,n=n+4+s,e[n++]=0,n}var Ut=new Uint8Array(8),Vt=new DataView(Ut.buffer,Ut.byteOffset,Ut.byteLength);function zt(e,t,r,n,i){return Number.isInteger(r)&&r>=U&&r<=B?(e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r,!0),e.set(Ut,n),n+=8),n}function Qt(e,t,r,n,i){return e[n++]=re,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Yt(e,t,r,n,i){return e[n++]=ee,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function Wt(e,t,r,n,i){e[n++]=te,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=De.fromNumber(r.getTime()),s=o.getLowBits(),a=o.getHighBits();return e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function Ht(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(qt))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function Kt(e,t,r,n,i){if(e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(qt))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function Gt(e,t,r,n,i){return null===r?e[n++]=re:"MinKey"===r._bsontype?e[n++]=pe:e[n++]=de,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Jt(e,t,r,n,i){if(e[n++]=X,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!x(r.id))throw new O("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function Zt(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=he,e.set(C(r),n),n+o}function Xt(e,t,r,n,i,o,s,a,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var l=0;l<c.length;l++)if(c[l]===r)throw new w("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?G:K,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var f=cr(e,r,i,n,o+1,s,a,c);return c.pop(),f}function er(e,t,r,n,i){return e[n++]=fe,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function tr(e,t,r,n,i){e[n++]="Long"===r._bsontype?le:ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),s=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function rr(e,t,r,n,i){return r=r.valueOf(),e[n++]=ue,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function nr(e,t,r,n,i){return e[n++]=W,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Vt.setFloat64(0,r.value,!0),e.set(Ut,n),n+8}function ir(e,t,r,n,i,o,s){e[n++]=oe,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=I(r),u=e.write(a,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function or(e,t,r,n,i,o,s,a,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=ae,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,l="string"==typeof r.code?r.code:r.code.toString();n+=4;var f=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&f,e[n+1]=f>>8&255,e[n+2]=f>>16&255,e[n+3]=f>>24&255,e[n+4+f-1]=0,n=n+f+4;var p=cr(e,r.scope,i,n,o+1,s,a);n=p-1;var d=p-c;e[c++]=255&d,e[c++]=d>>8&255,e[c++]=d>>16&255,e[c++]=d>>24&255,e[n++]=0}else{e[n++]=oe,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,l=r.code.toString();var h=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&h,e[n+1]=h>>8&255,e[n+2]=h>>16&255,e[n+3]=h>>24&255,n=n+4+h-1,e[n++]=0}return n}function sr(e,t,r,n,i){e[n++]=J,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),s=r.position;return r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s+=4),e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=r.sub_type,r.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(s-=4,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255),e.set(o,n),n+r.position}function ar(e,t,r,n,i){e[n++]=se,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function ur(e,t,r,n,i,o,s){e[n++]=K,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=cr(e,u=Object.assign(u,r.fields),!1,n,i+1,o),l=c-a;return e[a++]=255&l,e[a++]=l>>8&255,e[a++]=l>>16&255,e[a++]=l>>24&255,c}function cr(e,t,r,n,i,o,s,a){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=[]),n=n||0,(a=a||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var f="".concat(l);if("function"==typeof(null==(v=t[l])?void 0:v.toBSON)&&(v=v.toBSON()),"string"==typeof v)c=Bt(e,f,v,c,!0);else if("number"==typeof v)c=zt(e,f,v,c,!0);else{if("bigint"==typeof v)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof v)c=Yt(e,f,v,c,!0);else if(v instanceof Date||k(v))c=Wt(e,f,v,c,!0);else if(void 0===v)c=Qt(e,f,0,c,!0);else if(null===v)c=Qt(e,f,0,c,!0);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c,!0);else if(x(v))c=Zt(e,f,v,c,!0);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c,!0);else if("object"==typeof v&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!0,a);else if("object"==typeof v&&st(v)&&"Decimal128"===v._bsontype)c=er(e,f,v,c,!0);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c,!0);else if("Double"===v._bsontype)c=nr(e,f,v,c,!0);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,!0);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s,!0);else if("Binary"===v._bsontype)c=sr(e,f,v,c,!0);else if("Symbol"===v._bsontype)c=ar(e,f,v,c,!0);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o,!0);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c,!0);else if("Int32"===v._bsontype)c=rr(e,f,v,c,!0);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c,!0);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}else if(t instanceof vt||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var p=t.entries(),d=!1;!d;){var h=p.next();if(!(d=!!h.done)){f=h.value[0];var y=typeof(v=h.value[1]);if("string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y||A(v)||N(v))throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(null===v||void 0===v&&!1===s)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new O("toBSON function did not return an object");for(var f in t){var v;if("function"==typeof(null==(v=t[f])?void 0:v.toBSON)&&(v=v.toBSON()),y=typeof v,"string"==typeof f&&!Lt.has(f)){if(null!=f.match(qt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Bt(e,f,v,c);else if("number"===y)c=zt(e,f,v,c);else{if("bigint"===y)throw new O("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Yt(e,f,v,c);else if(v instanceof Date||k(v))c=Wt(e,f,v,c);else if(void 0===v)!1===s&&(c=Qt(e,f,0,c));else if(null===v)c=Qt(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Jt(e,f,v,c);else if(x(v))c=Zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Ht(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Xt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=er(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=tr(e,f,v,c);else if("Double"===v._bsontype)c=nr(e,f,v,c);else if("Code"===v._bsontype)c=or(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=ir(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=sr(e,f,v,c);else if("Symbol"===v._bsontype)c=ar(e,f,v,c);else if("DBRef"===v._bsontype)c=ur(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Kt(e,f,v,c);else if("Int32"===v._bsontype)c=rr(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Gt(e,f,v,c);else if(void 0!==v._bsontype)throw new O("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}a.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var lr=17825792,fr=m.alloc(lr);function pr(e){fr.length<e&&(fr=m.alloc(e))}function dr(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:lr;fr.length<o&&(fr=m.alloc(o));var s=cr(fr,e,r,0,0,n,i,[]),a=m.alloc(s);return fr.copy(a,0,0,a.length),a}function hr(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,s="number"==typeof r.index?r.index:0,a=cr(fr,e,n,0,0,i,o);return fr.copy(t,s,0,a),s+a-1}function yr(e,t){return void 0===t&&(t={}),Dt(e instanceof m?e:C(e),t)}function vr(e,t){return void 0===t&&(t={}),gt(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function mr(e,t,r,n,i,o){for(var s=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),a=C(e),u=t,c=0;c<r;c++){var l=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24;s.index=u,n[i+c]=Dt(a,s),u+=l}return u}const br={Binary:Se,Code:Ie,DBRef:je,Decimal128:We,Double:He,Int32:Ke,Long:De,UUID:Ee,Map:vt,MaxKey:Ge,MinKey:Je,ObjectId:tt,ObjectID:tt,BSONRegExp:rt,BSONSymbol:nt,Timestamp:ot,EJSON:yt,setInternalBufferSize:pr,serialize:dr,serializeWithBufferAndIndex:hr,deserialize:yr,calculateObjectSize:vr,deserializeStream:mr,BSONError:w,BSONTypeError:O}},2091:function(e,t,r){var n,i;i=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,r){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function s(e,t){s.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function u(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach((function(e){t+=f(e)})),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var i="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(i)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function p(e,t,r,n,u,l,d,h){r=r||[],d=d||[];var y=(u=u||[]).slice(0);if(null!=l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var v=n.normalize(y,l,e,t);v&&(e=v[0],t=v[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var m,b,g,_,w=typeof e,O=typeof t,S="undefined"!==w||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,l),E="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new s(y,e));else if(c(e)!==c(t))r.push(new i(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new i(y,e,t));else if("object"===w&&null!==e&&null!==t){for(m=d.length-1;m>-1;--m)if(d[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return f(e)-f(t)})),t.sort((function(e,t){return f(e)-f(t)}))),m=t.length-1,b=e.length-1;m>b;)r.push(new a(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new a(y,b,new s(void 0,e[b--])));for(;m>=0;--m)p(e[m],t[m],r,n,y,m,d,h)}else{var I=Object.keys(e),T=Object.keys(t);for(m=0;m<I.length;++m)g=I[m],(_=T.indexOf(g))>=0?(p(e[g],t[g],r,n,y,g,d,h),T[_]=null):p(e[g],void 0,r,n,y,g,d,h);for(m=0;m<T.length;++m)(g=T[m])&&p(void 0,t[g],r,n,y,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===w&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function d(e,t,r,n,i){var o=[];if(p(e,t,o,n,null,null,null,i),r)for(var s=0;s<o.length;++s)r(o[s]);return o}function h(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(i.length?i:void 0)}function y(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":y(i[r.path[n]],r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}else switch(r.kind){case"A":y(e[t],r.index,r.item);break;case"D":e=u(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function v(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var i=e,o=-1,s=n.path?n.path.length-1:0;++o<s;)void 0===i[n.path[o]]&&(i[n.path[o]]=void 0!==n.path[o+1]&&"number"==typeof n.path[o+1]?[]:{}),i=i[n.path[o]];switch(n.kind){case"A":n.path&&void 0===i[n.path[o]]&&(i[n.path[o]]=[]),y(n.path?i[n.path[o]]:i,n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}}function m(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":m(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}else switch(r.kind){case"A":m(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=u(e,t)}return e}return r(i,n),r(o,n),r(s,n),r(a,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,s){return p(e,t,r,n,i,o,s,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&d(e,t,(function(n){r&&!r(e,t,n)||v(e,t,n)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,i,o=e;for(i=r.path.length-1,n=0;n<i;n++)void 0===o[r.path[n]]&&(o[r.path[n]]={}),o=o[r.path[n]];switch(r.kind){case"A":m(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},6471:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},8784:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",I="[object Promise]",T="[object RegExp]",j="[object Set]",P="[object String]",x="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",M="[object DataView]",k="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,W=RegExp(Q.source),H=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="["+we+"]",xe="["+je+"]",Ae="["+Oe+"]",Ne="\\d+",Me="["+Se+"]",ke="["+Ee+"]",De="[^"+we+je+Ne+Se+Ee+Ie+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+we+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ie+"]",Le="\\u200d",Be="(?:"+ke+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ae+"|"+Re+")?",Ye="["+Te+"]?",We=Ye+Qe+"(?:"+Le+"(?:"+[Ce,$e,Fe].join("|")+")"+Ye+Qe+")*",He="(?:"+[Me,$e,Fe].join("|")+")"+We,Ke="(?:"+[Ce+Ae+"?",Ae,$e,Fe,Pe].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ke+We,"g"),Xe=RegExp([qe+"?"+ke+"+"+Ve+"(?="+[xe,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[xe,qe+Be,"$"].join("|")+")",qe+"?"+Be+"+"+Ve,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,He].join("|"),"g"),et=RegExp("["+Le+we+Oe+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[k]=it[D]=it[R]=it[C]=it[$]=it[F]=it[q]=it[L]=it[B]=!0,it[y]=it[v]=it[N]=it[m]=it[M]=it[b]=it[g]=it[_]=it[O]=it[S]=it[E]=it[T]=it[j]=it[P]=it[A]=!1;var ot={};ot[y]=ot[v]=ot[N]=ot[M]=ot[m]=ot[b]=ot[k]=ot[D]=ot[R]=ot[C]=ot[$]=ot[O]=ot[S]=ot[E]=ot[T]=ot[j]=ot[P]=ot[x]=ot[F]=ot[q]=ot[L]=ot[B]=!0,ot[g]=ot[_]=ot[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,yt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,Ot=vt&&vt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function xt(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Mt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function kt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Dt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ct=Vt("length");function $t(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ft(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Bt,r)}function Lt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:p}function Vt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Yt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Wt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ht(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Gt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function Xt(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var er=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function ir(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function or(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ct(e)}function lr(e){return nr(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pr=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,ie=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Ie=t.RegExp,Te=t.String,je=t.TypeError,Pe=n.prototype,xe=Oe.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],Me=xe.toString,ke=Ae.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=Ae.toString,$e=Me.call(Ee),Fe=ft._,qe=Ie("^"+Me.call(ke).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Be=t.Symbol,Ue=t.Uint8Array,Ve=Le?Le.allocUnsafe:i,ze=or(Ee.getPrototypeOf,Ee),Qe=Ee.create,Ye=Ae.propertyIsEnumerable,We=Pe.splice,He=Be?Be.isConcatSpreadable:i,Ke=Be?Be.iterator:i,Ze=Be?Be.toStringTag:i,et=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Se.ceil,dt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=Pe.join,hr=or(Ee.keys,Ee),yr=Se.max,vr=Se.min,mr=ie.now,br=t.parseInt,gr=Se.random,_r=Pe.reverse,wr=uo(t,"DataView"),Or=uo(t,"Map"),Sr=uo(t,"Promise"),Er=uo(t,"Set"),Ir=uo(t,"WeakMap"),Tr=uo(Ee,"create"),jr=Ir&&new Ir,Pr={},xr=$o(wr),Ar=$o(Or),Nr=$o(Sr),Mr=$o(Er),kr=$o(Ir),Dr=Be?Be.prototype:i,Rr=Dr?Dr.valueOf:i,Cr=Dr?Dr.toString:i;function $r(e){if(ea(e)&&!Vs(e)&&!(e instanceof Br)){if(e instanceof Lr)return e;if(ke.call(e,"__wrapped__"))return Fo(e)}return new Lr(e)}var Fr=function(){function e(){}return function(t){if(!Xs(t))return{};if(Qe)return Qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function qr(){}function Lr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Wr(e,t){var r=Vs(e),n=!r&&Us(e),i=!r&&!n&&Ws(e),o=!r&&!n&&!i&&ua(e),s=r||n||i||o,a=s?Wt(e.length,Te):[],u=a.length;for(var c in e)!t&&!ke.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||a.push(c);return a}function Hr(e){var t=e.length;return t?e[Qn(0,t-1)]:i}function Kr(e,t){return Mo(Ti(e),on(t,0,e.length))}function Gr(e){return Mo(Ti(e))}function Jr(e,t,r){(r!==i&&!qs(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];ke.call(e,t)&&qs(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Xr(e,t){for(var r=e.length;r--;)if(qs(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function tn(e,t){return e&&ji(t,Aa(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ia(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!Xs(e))return e;var f=Vs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ke.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ti(e,a)}else{var p=fo(e),d=p==_||p==w;if(Ws(e))return _i(e,u);if(p==E||p==y||d&&!o){if(a=c||d?{}:ho(e),!u)return c?function(e,t){return ji(e,lo(e),t)}(e,function(e,t){return e&&ji(t,Na(t),e)}(a,e)):function(e,t){return ji(e,co(e),t)}(e,tn(a,e))}else{if(!ot[p])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case N:return wi(e);case m:case b:return new i(+e);case M:return function(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case k:case D:case R:case C:case $:case F:case q:case L:case B:return Oi(e,r);case O:return new i;case S:case P:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new i;case x:return n=e,Rr?Ee(Rr.call(n)):{}}}(e,p,u)}}s||(s=new Yr);var h=s.get(e);if(h)return h;s.set(e,a),oa(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,i){a.set(i,sn(n,t,r,i,e,s))}));var v=f?i:(l?c?to:eo:c?Na:Aa)(e);return It(v||e,(function(n,i){v&&(n=e[i=n]),Zr(a,i,sn(n,t,r,i,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new je(o);return Po((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Nt(t,Kt(r))),n?(o=At,s=!1):t.length>=200&&(o=Jt,s=!1,t=new Qr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}$r.templateSettings={escape:K,evaluate:G,interpolate:J,variable:"",imports:{_:$r}},$r.prototype=qr.prototype,$r.prototype.constructor=$r,Lr.prototype=Fr(qr.prototype),Lr.prototype.constructor=Lr,Br.prototype=Fr(qr.prototype),Br.prototype.constructor=Br,Ur.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},Ur.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ur.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===s?i:r}return ke.call(t,e)?t[e]:i},Ur.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==i:ke.call(t,e)},Ur.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=Xr(t,e);return!(r<0||(r==t.length-1?t.pop():We.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=Xr(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return Xr(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Xr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(Or||Vr),string:new Ur}},zr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return so(this,e).get(e)},zr.prototype.has=function(e){return so(this,e).has(e)},zr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Qr.prototype.add=Qr.prototype.push=function(e){return this.__data__.set(e,s),this},Qr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var ln=Ai(bn),fn=Ai(gn,!0);function pn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function dn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function hn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function yn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yn(a,t-1,r,n,i):Mt(i,a):n||(i[i.length]=a)}return i}var vn=Ni(),mn=Ni(!0);function bn(e,t){return e&&vn(e,t,Aa)}function gn(e,t){return e&&mn(e,t,Aa)}function _n(e,t){return Pt(t,(function(t){return Gs(e[t])}))}function wn(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&r<n;)e=e[Co(t[r++])];return r&&r==n?e:i}function On(e,t,r){var n=t(e);return Vs(e)?n:Mt(n,r(e))}function Sn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=ke.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(e){}var o=Ce.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Ce.call(e)}(e)}function En(e,t){return e>t}function In(e,t){return null!=e&&ke.call(e,t)}function Tn(e,t){return null!=e&&t in Ee(e)}function jn(e,t,r){for(var o=r?At:xt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Nt(p,Kt(t))),l=vr(p.length,l),c[u]=!r&&(t||s>=120&&p.length>=120)?new Qr(u&&p):i}p=e[0];var d=-1,h=c[0];e:for(;++d<s&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=a;--u;){var m=c[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}h&&h.push(v),f.push(y)}}return f}function Pn(e,t,r){var n=null==(e=Io(e,t=vi(t,e)))?e:e[Co(Ko(t))];return null==n?i:St(n,e,r)}function xn(e){return ea(e)&&Sn(e)==y}function An(e,t,r,n,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Vs(e),u=Vs(t),c=a?v:fo(e),l=u?v:fo(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ws(e)){if(!Ws(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new Yr),a||ua(e)?Zi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return qs(+e,+t);case g:return e.name==t.name&&e.message==t.message;case T:case P:return e==t+"";case O:var a=ir;case j:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Zi(a(e),a(t),n,i,o,s);return s.delete(e),l;case x:if(Rr)return Rr.call(e)==Rr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var h=f&&ke.call(e,"__wrapped__"),_=p&&ke.call(t,"__wrapped__");if(h||_){var w=h?e.value():e,I=_?t.value():t;return s||(s=new Yr),o(w,I,r,n,s)}}return!!d&&(s||(s=new Yr),function(e,t,r,n,o,s){var a=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:ke.call(t,f)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=a?n(m,v,f,t,e,s):n(v,m,f,e,t,s);if(!(b===i?v===m||o(v,m,r,n,s):b)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,An,o))}function Nn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Yr;if(n)var d=n(l,f,c,e,t,p);if(!(d===i?An(f,l,3,n,p):d))return!1}}return!0}function Mn(e){return!(!Xs(e)||(t=e,Re&&Re in t))&&(Gs(e)?qe:ye).test($o(e));var t}function kn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?Fn(e[0],e[1]):$n(e):fu(e)}function Dn(e){if(!wo(e))return hr(e);var t=[];for(var r in Ee(e))ke.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Rn(e,t){return e<t}function Cn(e,t){var r=-1,i=Qs(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function $n(e){var t=ao(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Fn(e,t){return bo(e)&&Oo(t)?So(Co(e),t):function(r){var n=Ia(r,e);return n===i&&n===t?Ta(r,e):An(t,n,3)}}function qn(e,t,r,n,o){e!==t&&vn(t,(function(s,a){if(o||(o=new Yr),Xs(s))!function(e,t,r,n,o,s,a){var u=To(e,r),c=To(t,r),l=a.get(c);if(l)Jr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,p=f===i;if(p){var d=Vs(c),h=!d&&Ws(c),y=!d&&!h&&ua(c);f=c,d||h||y?Vs(u)?f=u:Ys(u)?f=Ti(u):h?(p=!1,f=_i(c,!0)):y?(p=!1,f=Oi(c,!0)):f=[]:na(c)||Us(c)?(f=u,Us(u)?f=va(u):Xs(u)&&!Gs(u)||(f=ho(c))):p=!1}p&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Jr(e,r,f)}}(e,t,a,r,qn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Jr(e,a,u)}}),Na)}function Ln(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Bn(e,t,r){t=t.length?Nt(t,(function(e){return Vs(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Nt(t,Kt(oo()));var i=Cn(e,(function(e,r,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Si(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=wn(e,s);r(a,s)&&Gn(o,vi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Lt:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),r&&(a=Nt(e,Kt(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&We.call(a,u,1),We.call(e,u,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;vo(i)?We.call(e,i,1):ui(e,i)}}return e}function Qn(e,t){return e+dt(gr()*(t-e+1))}function Yn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Wn(e,t){return xo(Eo(e,t,ru),e+"")}function Hn(e){return Hr(qa(e))}function Kn(e,t){var r=qa(e);return Mo(r,on(t,0,r.length))}function Gn(e,t,r,n){if(!Xs(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Co(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Xs(f)?f:vo(t[o+1])?[]:{})}Zr(u,c,l),u=u[c]}return e}var Jn=jr?function(e,t){return jr.set(e,t),e}:ru,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:ru;function Xn(e){return Mo(qa(e))}function ei(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ri(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===i;o<s;){var f=dt((o+s)/2),p=r(e[f]),d=p!==i,h=null===p,y=p==p,v=aa(p);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!h):c?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=t:p<t);m?o=f+1:s=f}return vr(s,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!qs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Vs(e))return Nt(e,si)+"";if(aa(e))return Cr?Cr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,r){var n=-1,i=xt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=At;else if(o>=200){var c=t?null:Yi(e);if(c)return ar(c);s=!1,i=Jt,u=new Qr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ui(e,t){return null==(e=Io(e,t=vi(t,e)))||delete e[Co(Ko(t))]}function ci(e,t,r,n){return Gn(e,t,r(wn(e,t)),n)}function li(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ei(e,n?0:o,n?o+1:i):ei(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Br&&(r=r.value()),kt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ai(yn(s,1),t,r)}function di(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function hi(e){return Ys(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function vi(e,t){return Vs(e)?e:bo(e,t)?[e]:Ro(ma(e))}var mi=Wn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ei(e,t,r)}var gi=st||function(e){return ft.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function wi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Oi(e,t){var r=t?wi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<a;)(p||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ii(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),p=n(f+l),d=!i;++o<f;)p[o]=e[o];for(var h=o;++c<l;)p[h+c]=t[c];for(;++a<u;)(d||o<s)&&(p[h+r[a]]=e[o++]);return p}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function ji(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?rn(r,u,c):Zr(r,u,c)}return r}function Pi(e,t){return function(r,n){var i=Vs(r)?Et:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function xi(e){return Wn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ai(e,t){return function(r,n){if(null==r)return r;if(!Qs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ni(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=nr(t=ma(t))?lr(t):i,n=r?r[0]:t.charAt(0),o=r?bi(r,1).join(""):t.slice(1);return n[e]()+o}}function ki(e){return function(t){return kt(Ga(Ua(t).replace(Ge,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Fr(e.prototype),n=e.apply(r,t);return Xs(n)?n:r}}function Ri(e){return function(t,r,n){var o=Ee(t);if(!Qs(t)){var s=oo(r,3);t=Aa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Ci(e){return Xi((function(t){var r=t.length,n=r,s=Lr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new je(o);if(s&&!u&&"wrapper"==no(a))var u=new Lr([],!0)}for(n=u?n:r;++n<r;){var c=no(a=t[n]),l="wrapper"==c?ro(a):i;u=l&&go(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&go(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Vs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function $i(e,t,r,o,s,a,u,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,m=512&t,b=y?i:Di(e);return function c(){for(var g=arguments.length,_=n(g),w=g;w--;)_[w]=arguments[w];if(v)var O=io(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,O);if(o&&(_=Ei(_,o,s,v)),a&&(_=Ii(_,a,u,v)),g-=S,v&&g<p){var E=sr(_,O);return zi(e,t,$i,c.placeholder,r,_,E,l,f,p-g)}var I=h?r:this,T=y?I[e]:e;return g=_.length,l?_=function(e,t){for(var r=e.length,n=vr(t.length,r),o=Ti(e);n--;){var s=t[n];e[n]=vo(s,r)?o[s]:i}return e}(_,l):m&&g>1&&_.reverse(),d&&f<g&&(_.length=f),this&&this!==ft&&this instanceof c&&(T=b||Di(T)),T.apply(I,_)}}function Fi(e,t){return function(r,n){return function(e,t,r,n){return bn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function qi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Li(e){return Xi((function(t){return t=Nt(t,Kt(oo())),Wn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Bi(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?Yn(t,e):t;var n=Yn(t,pt(e/cr(t)));return nr(t)?bi(lr(n),0,e).join(""):n.slice(0,e)}function Ui(e){return function(t,r,o){return o&&"number"!=typeof o&&mo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=yr(pt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function zi(e,t,r,n,o,s,a,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,o,p?s:i,p?a:i,p?i:s,p?i:a,c,l,f],h=r.apply(i,d);return go(e)&&jo(h,d),h.placeholder=n,Ao(h,e,t)}function Qi(e){var t=Se[e];return function(e,r){if(e=ya(e),(r=null==r?0:vr(da(r),292))&&Ct(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yi=Er&&1/ar(new Er([,-0]))[1]==l?function(e){return new Er(e)}:au;function Wi(e){return function(t){var r=fo(t);return r==O?ir(t):r==j?ur(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Hi(e,t,r,s,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new je(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),p=p===i?p:yr(da(p),0),d=d===i?d:da(d),y-=l?l.length:0,64&t){var v=s,m=l;s=l=i}var b=h?i:ro(e),g=[e,t,r,s,l,v,m,f,p,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ei(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ii(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:vr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,b),e=g[0],t=g[1],r=g[2],s=g[3],l=g[4],!(d=g[9]=g[9]===i?h?0:e.length:yr(g[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var o=Di(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=io(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?zi(e,t,$i,s.placeholder,i,u,f,i,i,r-a):St(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?$i.apply(i,g):function(e,t,r,i){var o=1&t,s=Di(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),p=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return St(p,o?r:this,f)}}(e,t,r,s);else var _=function(e,t,r){var n=1&t,i=Di(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Ao((b?Jn:jo)(_,g),e,t)}function Ki(e,t,r,n){return e===i||qs(e,Ae[r])&&!ke.call(n,r)?t:e}function Gi(e,t,r,n,o,s){return Xs(e)&&Xs(t)&&(s.set(t,e),qn(e,t,i,Gi,s),s.delete(t)),e}function Ji(e){return na(e)?i:e}function Zi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&r?new Qr:i;for(s.set(e,t),s.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var m=a?n(v,y,p,t,e,s):n(y,v,p,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,s)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Xi(e){return xo(Eo(e,i,zo),e+"")}function eo(e){return On(e,Aa,co)}function to(e){return On(e,Na,lo)}var ro=jr?function(e){return jr.get(e)}:au;function no(e){for(var t=e.name+"",r=Pr[t],n=ke.call(Pr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(ke.call($r,"placeholder")?$r:e).placeholder}function oo(){var e=$r.iteratee||nu;return e=e===nu?kn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=Aa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Oo(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Mn(r)?r:i}var co=yt?function(e){return null==e?[]:(e=Ee(e),Pt(yt(e),(function(t){return Ye.call(e,t)})))}:hu,lo=yt?function(e){for(var t=[];e;)Mt(t,co(e)),e=ze(e);return t}:hu,fo=Sn;function po(e,t,r){for(var n=-1,i=(t=vi(t,e)).length,o=!1;++n<i;){var s=Co(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Zs(i)&&vo(s,i)&&(Vs(e)||Us(e))}function ho(e){return"function"!=typeof e.constructor||wo(e)?{}:Fr(ze(e))}function yo(e){return Vs(e)||Us(e)||!!(He&&e&&e[He])}function vo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Xs(r))return!1;var n=typeof t;return!!("number"==n?Qs(r)&&vo(t,r.length):"string"==n&&t in r)&&qs(r[t],e)}function bo(e,t){if(Vs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function go(e){var t=no(e),r=$r[t];if("function"!=typeof r||!(t in Br.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(wr&&fo(new wr(new ArrayBuffer(1)))!=M||Or&&fo(new Or)!=O||Sr&&fo(Sr.resolve())!=I||Er&&fo(new Er)!=j||Ir&&fo(new Ir)!=A)&&(fo=function(e){var t=Sn(e),r=t==E?e.constructor:i,n=r?$o(r):"";if(n)switch(n){case xr:return M;case Ar:return O;case Nr:return I;case Mr:return j;case kr:return A}return t});var _o=Ne?Gs:yu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Oo(e){return e==e&&!Xs(e)}function So(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function Eo(e,t,r){return t=yr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),St(e,this,u)}}function Io(e,t){return t.length<2?e:wn(e,ei(t,0,-1))}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=No(Jn),Po=lt||function(e,t){return ft.setTimeout(e,t)},xo=No(Zn);function Ao(e,t,r){var n=t+"";return xo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return It(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function No(e){var t=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Mo(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Qn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var ko,Do,Ro=(ko=ks((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Do.size&&Do.clear(),e})),Do=ko.cache,ko);function Co(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $o(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof Br)return e.clone();var t=new Lr(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var qo=Wn((function(e,t){return Ys(e)?cn(e,yn(t,1,Ys,!0)):[]})),Lo=Wn((function(e,t){var r=Ko(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),oo(r,2)):[]})),Bo=Wn((function(e,t){var r=Ko(t);return Ys(r)&&(r=i),Ys(e)?cn(e,yn(t,1,Ys,!0),i,r):[]}));function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ft(e,oo(t,3),i)}function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=da(r),o=r<0?yr(n+o,0):vr(o,n-1)),Ft(e,oo(t,3),o,!0)}function zo(e){return null!=e&&e.length?yn(e,1):[]}function Qo(e){return e&&e.length?e[0]:i}var Yo=Wn((function(e){var t=Nt(e,hi);return t.length&&t[0]===e[0]?jn(t):[]})),Wo=Wn((function(e){var t=Ko(e),r=Nt(e,hi);return t===Ko(r)?t=i:r.pop(),r.length&&r[0]===e[0]?jn(r,oo(t,2)):[]})),Ho=Wn((function(e){var t=Ko(e),r=Nt(e,hi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?jn(r,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Go=Wn(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var Zo=Xi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return zn(e,Nt(t,(function(e){return vo(e,r)?+e:e})).sort(Si)),n}));function Xo(e){return null==e?e:_r.call(e)}var es=Wn((function(e){return ai(yn(e,1,Ys,!0))})),ts=Wn((function(e){var t=Ko(e);return Ys(t)&&(t=i),ai(yn(e,1,Ys,!0),oo(t,2))})),rs=Wn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,ai(yn(e,1,Ys,!0),i,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Ys(e))return t=yr(e.length,t),!0})),Wt(t,(function(t){return Nt(e,Vt(t))}))}function is(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Nt(r,(function(e){return St(t,i,e)}))}var os=Wn((function(e,t){return Ys(e)?cn(e,t):[]})),ss=Wn((function(e){return pi(Pt(e,Ys))})),as=Wn((function(e){var t=Ko(e);return Ys(t)&&(t=i),pi(Pt(e,Ys),oo(t,2))})),us=Wn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,pi(Pt(e,Ys),i,t)})),cs=Wn(ns),ls=Wn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)}));function fs(e){var t=$r(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ds=Xi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Br&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new Lr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),hs=Pi((function(e,t,r){ke.call(e,r)?++e[r]:rn(e,r,1)})),ys=Ri(Uo),vs=Ri(Vo);function ms(e,t){return(Vs(e)?It:ln)(e,oo(t,3))}function bs(e,t){return(Vs(e)?Tt:fn)(e,oo(t,3))}var gs=Pi((function(e,t,r){ke.call(e,r)?e[r].push(t):rn(e,r,[t])})),_s=Wn((function(e,t,r){var i=-1,o="function"==typeof t,s=Qs(e)?n(e.length):[];return ln(e,(function(e){s[++i]=o?St(t,e,r):Pn(e,t,r)})),s})),ws=Pi((function(e,t,r){rn(e,r,t)}));function Os(e,t){return(Vs(e)?Nt:Cn)(e,oo(t,3))}var Ss=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Es=Wn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,yn(t,1),[])})),Is=ct||function(){return ft.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Hi(e,c,i,i,i,i,t)}function js(e,t){var r;if("function"!=typeof t)throw new je(o);return e=da(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ps=Wn((function(e,t,r){var n=1;if(r.length){var i=sr(r,io(Ps));n|=u}return Hi(e,n,t,r,i)})),xs=Wn((function(e,t,r){var n=3;if(r.length){var i=sr(r,io(xs));n|=u}return Hi(t,n,e,r,i)}));function As(e,t,r){var n,s,a,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new je(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function v(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function m(){var e=Is();if(v(e))return b(e);c=Po(m,function(e){var r=t-(e-l);return d?vr(r,a-(e-f)):r}(e))}function b(e){return c=i,h&&n?y(e):(n=s=i,u)}function g(){var e=Is(),r=v(e);if(n=arguments,s=this,l=e,r){if(c===i)return function(e){return f=e,c=Po(m,t),p?y(e):u}(l);if(d)return gi(c),c=Po(m,t),y(l)}return c===i&&(c=Po(m,t)),u}return t=ya(t)||0,Xs(r)&&(p=!!r.leading,a=(d="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),g.cancel=function(){c!==i&&gi(c),f=0,n=l=s=c=i},g.flush=function(){return c===i?u:b(Is())},g}var Ns=Wn((function(e,t){return un(e,1,t)})),Ms=Wn((function(e,t,r){return un(e,ya(t)||0,r)}));function ks(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ks.Cache||zr),r}function Ds(e){if("function"!=typeof e)throw new je(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ks.Cache=zr;var Rs=mi((function(e,t){var r=(t=1==t.length&&Vs(t[0])?Nt(t[0],Kt(oo())):Nt(yn(t,1),Kt(oo()))).length;return Wn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Cs=Wn((function(e,t){var r=sr(t,io(Cs));return Hi(e,u,i,t,r)})),$s=Wn((function(e,t){var r=sr(t,io($s));return Hi(e,64,i,t,r)})),Fs=Xi((function(e,t){return Hi(e,256,i,i,i,t)}));function qs(e,t){return e===t||e!=e&&t!=t}var Ls=Vi(En),Bs=Vi((function(e,t){return e>=t})),Us=xn(function(){return arguments}())?xn:function(e){return ea(e)&&ke.call(e,"callee")&&!Ye.call(e,"callee")},Vs=n.isArray,zs=mt?Kt(mt):function(e){return ea(e)&&Sn(e)==N};function Qs(e){return null!=e&&Zs(e.length)&&!Gs(e)}function Ys(e){return ea(e)&&Qs(e)}var Ws=vt||yu,Hs=bt?Kt(bt):function(e){return ea(e)&&Sn(e)==b};function Ks(e){if(!ea(e))return!1;var t=Sn(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Gs(e){if(!Xs(e))return!1;var t=Sn(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Js(e){return"number"==typeof e&&e==da(e)}function Zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=gt?Kt(gt):function(e){return ea(e)&&fo(e)==O};function ra(e){return"number"==typeof e||ea(e)&&Sn(e)==S}function na(e){if(!ea(e)||Sn(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=ke.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==$e}var ia=_t?Kt(_t):function(e){return ea(e)&&Sn(e)==T},oa=wt?Kt(wt):function(e){return ea(e)&&fo(e)==j};function sa(e){return"string"==typeof e||!Vs(e)&&ea(e)&&Sn(e)==P}function aa(e){return"symbol"==typeof e||ea(e)&&Sn(e)==x}var ua=Ot?Kt(Ot):function(e){return ea(e)&&Zs(e.length)&&!!it[Sn(e)]},ca=Vi(Rn),la=Vi((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Qs(e))return sa(e)?lr(e):Ti(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=fo(e);return(t==O?ir:t==j?ar:qa)(e)}function pa(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ha(e){return e?on(da(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return p;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):de.test(e)?p:+e}function va(e){return ji(e,Na(e))}function ma(e){return null==e?"":si(e)}var ba=xi((function(e,t){if(wo(t)||Qs(t))ji(t,Aa(t),e);else for(var r in t)ke.call(t,r)&&Zr(e,r,t[r])})),ga=xi((function(e,t){ji(t,Na(t),e)})),_a=xi((function(e,t,r,n){ji(t,Na(t),e,n)})),wa=xi((function(e,t,r,n){ji(t,Aa(t),e,n)})),Oa=Xi(nn),Sa=Wn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||qs(f,Ae[l])&&!ke.call(e,l))&&(e[l]=s[l])}return e})),Ea=Wn((function(e){return e.push(i,Gi),St(ka,i,e)}));function Ia(e,t,r){var n=null==e?i:wn(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,Tn)}var ja=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),Xa(ru)),Pa=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ke.call(e,t)?e[t].push(r):e[t]=[r]}),oo),xa=Wn(Pn);function Aa(e){return Qs(e)?Wr(e):Dn(e)}function Na(e){return Qs(e)?Wr(e,!0):function(e){if(!Xs(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=wo(e),r=[];for(var n in e)("constructor"!=n||!t&&ke.call(e,n))&&r.push(n);return r}(e)}var Ma=xi((function(e,t,r){qn(e,t,r)})),ka=xi((function(e,t,r,n){qn(e,t,r,n)})),Da=Xi((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),ji(e,to(e),r),n&&(r=sn(r,7,Ji));for(var i=t.length;i--;)ui(r,t[i]);return r})),Ra=Xi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function Ca(e,t){if(null==e)return{};var r=Nt(to(e),(function(e){return[e]}));return t=oo(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var $a=Wi(Aa),Fa=Wi(Na);function qa(e){return null==e?[]:Gt(e,Aa(e))}var La=ki((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ka(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(be,er).replace(Je,"")}var Va=ki((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=ki((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Qa=Mi("toLowerCase"),Ya=ki((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Wa=ki((function(e,t,r){return e+(r?" ":"")+Ka(t)})),Ha=ki((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ka=Mi("toUpperCase");function Ga(e,t,r){return e=ma(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ja=Wn((function(e,t){try{return St(e,i,t)}catch(e){return Ks(e)?e:new we(e)}})),Za=Xi((function(e,t){return It(t,(function(t){t=Co(t),rn(e,t,Ps(e[t],e))})),e}));function Xa(e){return function(){return e}}var eu=Ci(),tu=Ci(!0);function ru(e){return e}function nu(e){return kn("function"==typeof e?e:sn(e,1))}var iu=Wn((function(e,t){return function(r){return Pn(r,e,t)}})),ou=Wn((function(e,t){return function(r){return Pn(e,r,t)}}));function su(e,t,r){var n=Aa(t),i=_n(t,n);null!=r||Xs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=_n(t,Aa(t)));var o=!(Xs(r)&&"chain"in r&&!r.chain),s=Gs(e);return It(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ti(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function au(){}var uu=Li(Nt),cu=Li(jt),lu=Li(Rt);function fu(e){return bo(e)?Vt(Co(e)):function(e){return function(t){return wn(t,e)}}(e)}var pu=Ui(),du=Ui(!0);function hu(){return[]}function yu(){return!1}var vu,mu=qi((function(e,t){return e+t}),0),bu=Qi("ceil"),gu=qi((function(e,t){return e/t}),1),_u=Qi("floor"),wu=qi((function(e,t){return e*t}),1),Ou=Qi("round"),Su=qi((function(e,t){return e-t}),0);return $r.after=function(e,t){if("function"!=typeof t)throw new je(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},$r.ary=Ts,$r.assign=ba,$r.assignIn=ga,$r.assignInWith=_a,$r.assignWith=wa,$r.at=Oa,$r.before=js,$r.bind=Ps,$r.bindAll=Za,$r.bindKey=xs,$r.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},$r.chain=fs,$r.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(pt(o/t));s<o;)u[a++]=ei(e,s,s+=t);return u},$r.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},$r.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(Vs(r)?Ti(r):[r],yn(t,1))},$r.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new je(o);return[r(e[0]),e[1]]})):[],Wn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},$r.conforms=function(e){return function(e){var t=Aa(e);return function(r){return an(r,e,t)}}(sn(e,1))},$r.constant=Xa,$r.countBy=hs,$r.create=function(e,t){var r=Fr(e);return null==t?r:tn(r,t)},$r.curry=function e(t,r,n){var o=Hi(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.curryRight=function e(t,r,n){var o=Hi(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},$r.debounce=As,$r.defaults=Sa,$r.defaultsDeep=Ea,$r.defer=Ns,$r.delay=Ms,$r.difference=qo,$r.differenceBy=Lo,$r.differenceWith=Bo,$r.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:da(t))<0?0:t,n):[]},$r.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:da(t)))<0?0:t):[]},$r.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},$r.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},$r.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&mo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=da(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:da(n))<0&&(n+=o),n=r>n?0:ha(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},$r.filter=function(e,t){return(Vs(e)?Pt:hn)(e,oo(t,3))},$r.flatMap=function(e,t){return yn(Os(e,t),1)},$r.flatMapDeep=function(e,t){return yn(Os(e,t),l)},$r.flatMapDepth=function(e,t,r){return r=r===i?1:da(r),yn(Os(e,t),r)},$r.flatten=zo,$r.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},$r.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:da(t)):[]},$r.flip=function(e){return Hi(e,512)},$r.flow=eu,$r.flowRight=tu,$r.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},$r.functions=function(e){return null==e?[]:_n(e,Aa(e))},$r.functionsIn=function(e){return null==e?[]:_n(e,Na(e))},$r.groupBy=gs,$r.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},$r.intersection=Yo,$r.intersectionBy=Wo,$r.intersectionWith=Ho,$r.invert=ja,$r.invertBy=Pa,$r.invokeMap=_s,$r.iteratee=nu,$r.keyBy=ws,$r.keys=Aa,$r.keysIn=Na,$r.map=Os,$r.mapKeys=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,t(e,n,i),e)})),r},$r.mapValues=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,n,t(e,n,i))})),r},$r.matches=function(e){return $n(sn(e,1))},$r.matchesProperty=function(e,t){return Fn(e,sn(t,1))},$r.memoize=ks,$r.merge=Ma,$r.mergeWith=ka,$r.method=iu,$r.methodOf=ou,$r.mixin=su,$r.negate=Ds,$r.nthArg=function(e){return e=da(e),Wn((function(t){return Ln(t,e)}))},$r.omit=Da,$r.omitBy=function(e,t){return Ca(e,Ds(oo(t)))},$r.once=function(e){return js(2,e)},$r.orderBy=function(e,t,r,n){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(r=n?i:r)||(r=null==r?[]:[r]),Bn(e,t,r))},$r.over=uu,$r.overArgs=Rs,$r.overEvery=cu,$r.overSome=lu,$r.partial=Cs,$r.partialRight=$s,$r.partition=Ss,$r.pick=Ra,$r.pickBy=Ca,$r.property=fu,$r.propertyOf=function(e){return function(t){return null==e?i:wn(e,t)}},$r.pull=Go,$r.pullAll=Jo,$r.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,oo(r,2)):e},$r.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},$r.pullAt=Zo,$r.range=pu,$r.rangeRight=du,$r.rearg=Fs,$r.reject=function(e,t){return(Vs(e)?Pt:hn)(e,Ds(oo(t,3)))},$r.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=oo(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return zn(e,i),r},$r.rest=function(e,t){if("function"!=typeof e)throw new je(o);return Wn(e,t=t===i?t:da(t))},$r.reverse=Xo,$r.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),(Vs(e)?Kr:Kn)(e,t)},$r.set=function(e,t,r){return null==e?e:Gn(e,t,r)},$r.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Gn(e,t,r,n)},$r.shuffle=function(e){return(Vs(e)?Gr:Xn)(e)},$r.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&mo(e,t,r)?(t=0,r=n):(t=null==t?0:da(t),r=r===i?n:da(r)),ei(e,t,r)):[]},$r.sortBy=Es,$r.sortedUniq=function(e){return e&&e.length?ii(e):[]},$r.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},$r.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},$r.spread=function(e,t){if("function"!=typeof e)throw new je(o);return t=null==t?0:yr(da(t),0),Wn((function(r){var n=r[t],i=bi(r,0,t);return n&&Mt(i,n),St(e,this,i)}))},$r.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},$r.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:da(t))<0?0:t):[]},$r.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:da(t)))<0?0:t,n):[]},$r.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},$r.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},$r.tap=function(e,t){return t(e),e},$r.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new je(o);return Xs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),As(e,t,{leading:n,maxWait:t,trailing:i})},$r.thru=ps,$r.toArray=fa,$r.toPairs=$a,$r.toPairsIn=Fa,$r.toPath=function(e){return Vs(e)?Nt(e,Co):aa(e)?[e]:Ti(Ro(ma(e)))},$r.toPlainObject=va,$r.transform=function(e,t,r){var n=Vs(e),i=n||Ws(e)||ua(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Xs(e)&&Gs(o)?Fr(ze(e)):{}}return(i?It:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},$r.unary=function(e){return Ts(e,1)},$r.union=es,$r.unionBy=ts,$r.unionWith=rs,$r.uniq=function(e){return e&&e.length?ai(e):[]},$r.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},$r.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},$r.unset=function(e,t){return null==e||ui(e,t)},$r.unzip=ns,$r.unzipWith=is,$r.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},$r.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},$r.values=qa,$r.valuesIn=function(e){return null==e?[]:Gt(e,Na(e))},$r.without=os,$r.words=Ga,$r.wrap=function(e,t){return Cs(yi(t),e)},$r.xor=ss,$r.xorBy=as,$r.xorWith=us,$r.zip=cs,$r.zipObject=function(e,t){return di(e||[],t||[],Zr)},$r.zipObjectDeep=function(e,t){return di(e||[],t||[],Gn)},$r.zipWith=ls,$r.entries=$a,$r.entriesIn=Fa,$r.extend=ga,$r.extendWith=_a,su($r,$r),$r.add=mu,$r.attempt=Ja,$r.camelCase=La,$r.capitalize=Ba,$r.ceil=bu,$r.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},$r.clone=function(e){return sn(e,4)},$r.cloneDeep=function(e){return sn(e,5)},$r.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},$r.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},$r.conformsTo=function(e,t){return null==t||an(e,t,Aa(t))},$r.deburr=Ua,$r.defaultTo=function(e,t){return null==e||e!=e?t:e},$r.divide=gu,$r.endsWith=function(e,t,r){e=ma(e),t=si(t);var n=e.length,o=r=r===i?n:on(da(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},$r.eq=qs,$r.escape=function(e){return(e=ma(e))&&H.test(e)?e.replace(Y,tr):e},$r.escapeRegExp=function(e){return(e=ma(e))&&re.test(e)?e.replace(te,"\\$&"):e},$r.every=function(e,t,r){var n=Vs(e)?jt:pn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.find=ys,$r.findIndex=Uo,$r.findKey=function(e,t){return $t(e,oo(t,3),bn)},$r.findLast=vs,$r.findLastIndex=Vo,$r.findLastKey=function(e,t){return $t(e,oo(t,3),gn)},$r.floor=_u,$r.forEach=ms,$r.forEachRight=bs,$r.forIn=function(e,t){return null==e?e:vn(e,oo(t,3),Na)},$r.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),Na)},$r.forOwn=function(e,t){return e&&bn(e,oo(t,3))},$r.forOwnRight=function(e,t){return e&&gn(e,oo(t,3))},$r.get=Ia,$r.gt=Ls,$r.gte=Bs,$r.has=function(e,t){return null!=e&&po(e,t,In)},$r.hasIn=Ta,$r.head=Qo,$r.identity=ru,$r.includes=function(e,t,r,n){e=Qs(e)?e:qa(e),r=r&&!n?da(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),sa(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},$r.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),qt(e,t,i)},$r.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},$r.invoke=xa,$r.isArguments=Us,$r.isArray=Vs,$r.isArrayBuffer=zs,$r.isArrayLike=Qs,$r.isArrayLikeObject=Ys,$r.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Sn(e)==m},$r.isBuffer=Ws,$r.isDate=Hs,$r.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},$r.isEmpty=function(e){if(null==e)return!0;if(Qs(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ws(e)||ua(e)||Us(e)))return!e.length;var t=fo(e);if(t==O||t==j)return!e.size;if(wo(e))return!Dn(e).length;for(var r in e)if(ke.call(e,r))return!1;return!0},$r.isEqual=function(e,t){return An(e,t)},$r.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?An(e,t,i,r):!!n},$r.isError=Ks,$r.isFinite=function(e){return"number"==typeof e&&Ct(e)},$r.isFunction=Gs,$r.isInteger=Js,$r.isLength=Zs,$r.isMap=ta,$r.isMatch=function(e,t){return e===t||Nn(e,t,ao(t))},$r.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Nn(e,t,ao(t),r)},$r.isNaN=function(e){return ra(e)&&e!=+e},$r.isNative=function(e){if(_o(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},$r.isNil=function(e){return null==e},$r.isNull=function(e){return null===e},$r.isNumber=ra,$r.isObject=Xs,$r.isObjectLike=ea,$r.isPlainObject=na,$r.isRegExp=ia,$r.isSafeInteger=function(e){return Js(e)&&e>=-9007199254740991&&e<=f},$r.isSet=oa,$r.isString=sa,$r.isSymbol=aa,$r.isTypedArray=ua,$r.isUndefined=function(e){return e===i},$r.isWeakMap=function(e){return ea(e)&&fo(e)==A},$r.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Sn(e)},$r.join=function(e,t){return null==e?"":zt.call(e,t)},$r.kebabCase=Va,$r.last=Ko,$r.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=da(r))<0?yr(n+o,0):vr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ft(e,Bt,o,!0)},$r.lowerCase=za,$r.lowerFirst=Qa,$r.lt=ca,$r.lte=la,$r.max=function(e){return e&&e.length?dn(e,ru,En):i},$r.maxBy=function(e,t){return e&&e.length?dn(e,oo(t,2),En):i},$r.mean=function(e){return Ut(e,ru)},$r.meanBy=function(e,t){return Ut(e,oo(t,2))},$r.min=function(e){return e&&e.length?dn(e,ru,Rn):i},$r.minBy=function(e,t){return e&&e.length?dn(e,oo(t,2),Rn):i},$r.stubArray=hu,$r.stubFalse=yu,$r.stubObject=function(){return{}},$r.stubString=function(){return""},$r.stubTrue=function(){return!0},$r.multiply=wu,$r.nth=function(e,t){return e&&e.length?Ln(e,da(t)):i},$r.noConflict=function(){return ft._===this&&(ft._=Fe),this},$r.noop=au,$r.now=Is,$r.pad=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Bi(dt(i),r)+e+Bi(pt(i),r)},$r.padEnd=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?e+Bi(t-n,r):e},$r.padStart=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?Bi(t-n,r)+e:e},$r.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ma(e).replace(ne,""),t||0)},$r.random=function(e,t,r){if(r&&"boolean"!=typeof r&&mo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=gr();return vr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Qn(e,t)},$r.reduce=function(e,t,r){var n=Vs(e)?kt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},$r.reduceRight=function(e,t,r){var n=Vs(e)?Dt:Qt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},$r.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),Yn(ma(e),t)},$r.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$r.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Co(t[n])];s===i&&(n=o,s=r),e=Gs(s)?s.call(e):s}return e},$r.round=Ou,$r.runInContext=e,$r.sample=function(e){return(Vs(e)?Hr:Hn)(e)},$r.size=function(e){if(null==e)return 0;if(Qs(e))return sa(e)?cr(e):e.length;var t=fo(e);return t==O||t==j?e.size:Dn(e).length},$r.snakeCase=Ya,$r.some=function(e,t,r){var n=Vs(e)?Rt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},$r.sortedIndex=function(e,t){return ri(e,t)},$r.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},$r.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&qs(e[n],t))return n}return-1},$r.sortedLastIndex=function(e,t){return ri(e,t,!0)},$r.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},$r.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(qs(e[r],t))return r}return-1},$r.startCase=Wa,$r.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:on(da(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},$r.subtract=Su,$r.sum=function(e){return e&&e.length?Yt(e,ru):0},$r.sumBy=function(e,t){return e&&e.length?Yt(e,oo(t,2)):0},$r.template=function(e,t,r){var n=$r.templateSettings;r&&mo(e,t,r)&&(t=i),e=ma(e),t=_a({},t,n,Ki);var o,s,a=_a({},t.imports,n.imports,Ki),u=Aa(a),c=Gt(a,u),l=0,f=t.interpolate||ge,p="__p += '",d=Ie((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),p+=e.slice(l,u).replace(_e,rr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var y=ke.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(U,""):p).replace(V,"$1").replace(z,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Ja((function(){return Oe(u,h+"return "+p).apply(i,c)}));if(v.source=p,Ks(v))throw v;return v},$r.times=function(e,t){if((e=da(e))<1||e>f)return[];var r=d,n=vr(e,d);t=oo(t),e-=d;for(var i=Wt(n,t);++r<e;)t(r);return i},$r.toFinite=pa,$r.toInteger=da,$r.toLength=ha,$r.toLower=function(e){return ma(e).toLowerCase()},$r.toNumber=ya,$r.toSafeInteger=function(e){return e?on(da(e),-9007199254740991,f):0===e?e:0},$r.toString=ma,$r.toUpper=function(e){return ma(e).toUpperCase()},$r.trim=function(e,t,r){if((e=ma(e))&&(r||t===i))return Ht(e);if(!e||!(t=si(t)))return e;var n=lr(e),o=lr(t);return bi(n,Zt(n,o),Xt(n,o)+1).join("")},$r.trimEnd=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,0,Xt(n,lr(t))+1).join("")},$r.trimStart=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,Zt(n,lr(t))).join("")},$r.truncate=function(e,t){var r=30,n="...";if(Xs(t)){var o="separator"in t?t.separator:o;r="length"in t?da(t.length):r,n="omission"in t?si(t.omission):n}var s=(e=ma(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),ia(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,ma(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},$r.unescape=function(e){return(e=ma(e))&&W.test(e)?e.replace(Q,pr):e},$r.uniqueId=function(e){var t=++De;return ma(e)+t},$r.upperCase=Ha,$r.upperFirst=Ka,$r.each=ms,$r.eachRight=bs,$r.first=Qo,su($r,(vu={},bn($r,(function(e,t){ke.call($r.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),$r.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$r[e].placeholder=$r})),It(["drop","take"],(function(e,t){Br.prototype[e]=function(r){r=r===i?1:yr(da(r),0);var n=this.__filtered__&&!t?new Br(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Br.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Br.prototype[e]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(ru)},Br.prototype.find=function(e){return this.filter(e).head()},Br.prototype.findLast=function(e){return this.reverse().find(e)},Br.prototype.invokeMap=Wn((function(e,t){return"function"==typeof e?new Br(this):this.map((function(r){return Pn(r,e,t)}))})),Br.prototype.reject=function(e){return this.filter(Ds(oo(e)))},Br.prototype.slice=function(e,t){e=da(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Br(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=da(t))<0?r.dropRight(-t):r.take(t-e)),r)},Br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Br.prototype.toArray=function(){return this.take(d)},bn(Br.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=$r[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&($r.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Br,c=a[0],l=u||Vs(t),f=function(e){var t=o.apply($r,Mt([e],a));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=s&&!p,y=u&&!d;if(!s&&l){t=y?t:new Br(this);var v=e.apply(t,a);return v.__actions__.push({func:ps,args:[f],thisArg:i}),new Lr(v,p)}return h&&y?e.apply(this,a):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);$r.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Vs(i)?i:[],e)}return this[r]((function(r){return t.apply(Vs(r)?r:[],e)}))}})),bn(Br.prototype,(function(e,t){var r=$r[t];if(r){var n=r.name+"";ke.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:t,func:r})}})),Pr[$i(i,2).name]=[{name:"wrapper",func:i}],Br.prototype.clone=function(){var e=new Br(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Br.prototype.reverse=function(){if(this.__filtered__){var e=new Br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,p=0,d=vr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,g=m.type,_=b(v);if(2==g)v=_;else if(!_){if(1==g)continue e;break e}}h[p++]=v}return h},$r.prototype.at=ds,$r.prototype.chain=function(){return fs(this)},$r.prototype.commit=function(){return new Lr(this.value(),this.__chain__)},$r.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},$r.prototype.plant=function(e){for(var t,r=this;r instanceof qr;){var n=Fo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},$r.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Br){var t=e;return this.__actions__.length&&(t=new Br(this)),(t=t.reverse()).__actions__.push({func:ps,args:[Xo],thisArg:i}),new Lr(t,this.__chain__)}return this.thru(Xo)},$r.prototype.toJSON=$r.prototype.valueOf=$r.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},$r.prototype.first=$r.prototype.head,Ke&&($r.prototype[Ke]=function(){return this}),$r}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2937:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var o=r(5271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=r(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(9520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(8042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var p=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return p.AsyncSubject}});var d=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var h=r(4617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var y=r(8344);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return y.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return y.queueScheduler}});var v=r(6192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var m=r(8847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var b=r(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=r(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(1403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(9144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var I=r(1211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return I.isObservable}});var T=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var j=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return j.firstValueFrom}});var P=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var x=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var A=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var N=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return N.ObjectUnsubscribedError}});var M=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return M.SequenceError}});var k=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return k.TimeoutError}});var D=r(5463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return D.UnsubscriptionError}});var R=r(1253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return R.bindCallback}});var C=r(1009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return C.bindNodeCallback}});var $=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return $.combineLatest}});var F=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var q=r(1663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return q.connectable}});var L=r(5401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var B=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return B.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var V=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return V.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var Q=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Q.fromEventPattern}});var Y=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var W=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return W.iif}});var H=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return H.interval}});var K=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var G=r(7423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return G.never}});var J=r(7443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return J.of}});var Z=r(1282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(5259);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(1945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(6971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=r(1727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(7423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(9251),t);var le=r(3782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var pe=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return pe.auditTime}});var de=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var he=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var ye=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ye.bufferTime}});var ve=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var me=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return me.bufferWhen}});var be=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Ie=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Ie.concatWith}});var Te=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Te.connect}});var je=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return je.count}});var Pe=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Pe.debounce}});var xe=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ae=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var Ne=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ne.delay}});var Me=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Me.delayWhen}});var ke=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return ke.dematerialize}});var De=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return De.distinct}});var Re=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Re.distinctUntilChanged}});var Ce=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Ce.distinctUntilKeyChanged}});var $e=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return $e.elementAt}});var Fe=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var qe=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return qe.every}});var Le=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Be=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Be.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Ve=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ve.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Qe=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Qe.finalize}});var Ye=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var We=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return We.findIndex}});var He=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return He.first}});var Ke=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ge=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ge.ignoreElements}});var Je=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Je.isEmpty}});var Ze=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var pt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pt.pairwise}});var dt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var ht=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var yt=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var vt=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var mt=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var _t=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return _t.repeat}});var wt=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Et=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Et.refCount}});var It=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return It.sample}});var Tt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Tt.sampleTime}});var jt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var Pt=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Pt.sequenceEqual}});var xt=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return xt.share}});var At=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return At.shareReplay}});var Nt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Nt.single}});var Mt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var kt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return kt.skipLast}});var Dt=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Dt.skipUntil}});var Rt=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Rt.skipWhile}});var Ct=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ct.startWith}});var $t=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $t.subscribeOn}});var Ft=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var qt=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return qt.switchMap}});var Lt=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Bt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Bt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Vt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Vt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Qt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qt.takeWhile}});var Yt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Wt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Wt.throttle}});var Ht=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ht.throttleTime}});var Kt=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Kt.throwIfEmpty}});var Gt=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Gt.timeInterval}});var Jt=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Zt=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var er=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return er.toArray}});var tr=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tr.window}});var rr=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rr.windowCount}});var nr=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return nr.windowTime}});var ir=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var or=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var sr=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sr.withLatestFrom}});var ar=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ar.zipAll}});var ur=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},7257:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(9520).Subject);t.AsyncSubject=o},8042:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(9520).Subject);t.BehaviorSubject=o},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(1727),o=r(7443),s=r(859),a=r(4432);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var r,n,i,o=e,s=o.kind,a=o.value,u=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},3380:(e,t)=>{"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},5271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(1403),i=r(7215),o=r(2138),s=r(5966),a=r(3782),u=r(4432),c=r(4770),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},216:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(9520),s=r(1713),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},3980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(1713),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},9520:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var s=r(5271),a=r(7215),u=r(7392),c=r(2447),l=r(4770),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(s.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=p},1403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(4432),s=r(7215),a=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),p=r(4770),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new m(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=d;var h=Function.prototype.bind;function y(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),m=function(e){function t(t,r,n){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,s),error:t.error&&y(t.error,s),complete:t.complete&&y(t.complete,s)}):i=t,u.destination=new v(i),u}return i(t,e),t}(d);function b(e){a.config.useDeprecatedSynchronousErrorHandling?p.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=m,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(4432),a=r(5463),u=r(2447),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var p=n(f),d=p.next();!d.done;d=p.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(s.isFunction(h))try{h()}catch(e){c=e instanceof a.UnsubscriptionError?e.errors:[e]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var v=n(y),m=v.next();!m.done;m=v.next()){var b=m.value;try{l(b)}catch(e){c=null!=c?c:[],e instanceof a.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(r)throw r.error}}}if(c)throw new a.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},3782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},7447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(8032),i=r(1403);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},1263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(8032);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},3739:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(5271),s=r(7215),a=r(2711),u=r(5079),c=r(4024),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},1253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(6414);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},6414:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(6551),s=r(5271),a=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,p){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,p).apply(this,n).pipe(u.mapOneOrManyArgs(f))};p=f}return p?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(p),c.observeOn(p))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new l.AsyncSubject,c=!0;return new s.Observable((function(s){var a=u.subscribe(s);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return a}))}}},1009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(6414);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(5271),i=r(4744),o=r(6216),s=r(9144),a=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function p(e,t,r){return void 0===r&&(r=s.identity),function(n){d(t,(function(){for(var i=e.length,s=new Array(i),a=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,u--),u||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,h=f.keys;if(0===d.length)return o.from([],r);var y=new n.Observable(p(d,r,h?function(e){return c.createObject(h,e)}:s.identity));return l?y.pipe(a.mapOneOrManyArgs(l)):y},t.combineLatestInit=p},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(4554),i=r(2619),o=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},1663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(9520),i=r(5271),o=r(5401),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,u=void 0===a||a,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},5401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(5271),i=r(9451);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(5271),i=r(1241),o=r(6741);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(5271);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(5271),i=r(4744),o=r(9451),s=r(2619),a=r(5079),u=r(4666),c=r(1589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,p=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(p?c.createObject(p,r):r),e.complete())})))},u=0;u<t;u++)s(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},6216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(3200),i=r(9451);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},6767:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),s=r(9010),a=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],p=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,h,y){if(u.isFunction(h)&&(y=h,h=void 0),y)return e(t,r,h).pipe(c.mapOneOrManyArgs(y));var v=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,h)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?p.map(d(t,r)):[],2),m=v[0],b=v[1];if(!m&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,h)}))(i.innerFrom(t));if(!m)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return m(t),function(){return b(t)}}))}},4366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(5271),i=r(4432),o=r(4666);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},2160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(5271);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},6103:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),s=r(5401),a=r(8840);t.generate=function(e,t,r,u,c){var l,f,p,d;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,p(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,p=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(p=i.identity,c=u):p=u),s.defer(c?function(){return a.scheduleIterable(h(),c)}:h)}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5401);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9451:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var a=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),p=r(4883),d=r(6380),h=r(9266),y=r(4432),v=r(7234),m=r(2138);function b(e){return new c.Observable((function(t){var r=e[m.observable]();if(y.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,v.reportUnhandledError)}))}function w(e){return new c.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,s,a,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return b(e);if(a.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(h.isReadableStreamLike(e))return S(e)}throw p.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},4449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(4617),i=r(5710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},5847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(4594),i=r(9451),o=r(1727),s=r(2619),a=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),u=s.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(a.from(c,r)):o.EMPTY}},7423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(5271),i=r(5729);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},7443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(2619),i=r(6216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(1727),i=r(4764),o=r(4475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(o.argsOrArgArray(e))(n.EMPTY)}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(6216);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763),o=r(9451);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(5271),i=r(9451),o=r(4475),s=r(5079);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},6971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(5271),i=r(1727);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(5271),i=r(4432);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},5710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(5271),i=r(4617),o=r(6551),s=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},3687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(5271),i=r(9451),o=r(1727);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},2042:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(5271),s=r(9451),a=r(4475),u=r(1727),c=r(5079),l=r(2619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(c.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)a(u);return function(){t=o=null}})):u.EMPTY}},5079:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(1403);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(4024),i=r(9451),o=r(5079);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,u=!1,c=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}u&&r.complete()},l=function(){a=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!a||a.closed)&&r.complete()})))}))}},5188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(4617),i=r(3533),o=r(5710);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},4514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(4024),i=r(5729),o=r(5079);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},2537:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(4024),o=r(5079),s=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,p=null;u++%t==0&&a.push([]);try{for(var d=n(a),h=d.next();!h.done;h=d.next())(m=h.value).push(r),e<=m.length&&(p=null!=p?p:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(p)try{for(var y=n(p),v=y.next();!v.done;v=y.next()){var m=v.value;s.arrRemove(a,m),i.next(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},8720:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(7215),o=r(4024),s=r(5079),a=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):u=!0,f();var p=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var u=a.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==p||p.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(p)}))}},7932:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(7215),o=r(4024),s=r(9451),a=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,u=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9451),i=r(5079),o=r(4024);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,u=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0}))),u&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},4163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(9893);t.combineAll=n.combineLatestAll},8169:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(1047),s=r(4024),a=r(4475),u=r(4666),c=r(5966),l=r(2619);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},9893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(1047),i=r(7534);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7230:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(8169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},4098:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(4024),s=r(4554),a=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},4554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(4594);t.concatAll=function(){return n.mergeAll(1)}},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(9010),i=r(4432);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(1048),i=r(4432);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},4724:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(4098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},4347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(9520),i=r(9451),o=r(4024),s=r(2160),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},6944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(1678);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,a=t,u=o.createOperatorSubscriber(r,c,i.noop),s.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){a=u=null})))}))}},8157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(4617),i=r(4024),o=r(5079);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){s=i=null})))}))}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(4024),i=r(5079);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},1030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(4617),i=r(6405),o=r(5710);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},6405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(79),i=r(7138),o=r(3470),s=r(4791),a=r(9010);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),s.mapTo(e))}))}},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},2307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(4024),i=r(5079),o=r(5729);t.distinct=function(e,t){return n.operate((function(r,n){var s=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;s.has(r)||(s.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return s.clear()}),o.noop))}))}},9131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(9144),i=r(4024),o=r(5079);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},6659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9131);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(6809),i=r(2763),o=r(8062),s=r(1714),a=r(7138);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},4707:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(79),s=r(7443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},9276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(4024),i=r(5079);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(3977);t.exhaust=n.exhaustAll},3977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(368),i=r(9144);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(5079);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(4024),i=r(7163);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},2763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(4024),i=r(5079);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(4024);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},8759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(4024),i=r(5079);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},3999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(4024),i=r(8759);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},5194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(8032),i=r(2763),o=r(7138),s=r(1714),a=r(8062),u=r(9144);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},2735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(9010);t.flatMap=n.mergeMap},1664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(5271),i=r(9451),o=r(9520),s=r(4024),a=r(5079);t.groupBy=function(e,t,r,u){return s.operate((function(s,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,p=function(e){f.forEach(e),e(c)},d=function(e){return p((function(t){return t.error(e)}))},h=0,y=!1,v=new a.OperatorSubscriber(c,(function(t){try{var s=e(t),p=f.get(s);if(!p){f.set(s,p=u?u():new o.Subject);var m=(g=s,_=p,(w=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,w);if(c.next(m),r){var b=a.createOperatorSubscriber(p,(function(){p.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));v.add(i.innerFrom(r(m)).subscribe(b))}}p.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return p((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return y=!0,0===h}));s.subscribe(v)}))}},3470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(4024),i=r(5079),o=r(5729);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},9549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(4024),i=r(5079);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},7534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(9144),i=r(4666),o=r(5966),s=r(9010),a=r(2378);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},9582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(8032),i=r(2763),o=r(4288),s=r(8062),a=r(1714),u=r(9144);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(4024),i=r(5079);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(4338);t.mapTo=function(e){return n.map((function(){return e}))}},9318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(1678),i=r(4432);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},6094:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(4024),s=r(4475),a=r(4594),u=r(2619),c=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popNumber(e,1/0);return e=s.argsOrArgArray(e),o.operate((function(t,o){a.mergeAll(l)(c.from(i([t],n(e)),r)).subscribe(o)}))}},4594:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(9010),i=r(9144);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},7163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9451),i=r(5421),o=r(5079);t.mergeInternals=function(e,t,r,s,a,u,c,l){var f=[],p=0,d=0,h=!1,y=function(){!h||f.length||p||t.complete()},v=function(e){return p<s?m(e):f.push(e)},m=function(e){u&&t.next(e),p++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{p--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&p<s;)e();y()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,v,(function(){h=!0,y()}))),function(){null==l||l()}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(7163),a=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,u)})))}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(9010),i=r(4432);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},2170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(4024),i=r(7163);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},3674:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(6094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},1446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(1678),i=r(4432);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},2318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(3739),i=r(4432),o=r(4347);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(5421),i=r(4024),o=r(5079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},4764:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var o=r(4024),s=r(9451),a=r(4475),u=r(5079),c=r(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),a=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=s.innerFrom(o.shift())}catch(e){return void a()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(a)}else t.complete()};a()}))}},402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(4024),i=r(5079);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},5658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(4338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},3881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(9520),i=r(2318),o=r(4347);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},1755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(8042),i=r(3739);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},9801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(7257),i=r(3739);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(216),i=r(2318),o=r(4432);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},2749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(4475),s=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},9925:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(7779),s=r(4024),a=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(2181),i=r(4024);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(4024),i=r(5079);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(1727),i=r(4024),o=r(5079),s=r(9451),a=r(5710);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},7085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.repeatWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=!1,c=!1,l=function(){return c&&u&&(r.complete(),!0)},f=function(){c=!1,i=t.subscribe(o.createOperatorSubscriber(r,void 0,(function(){c=!0,!l()&&(s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){i?f():a=!0}),(function(){u=!0,l()})))),s).next()}))),a&&(i.unsubscribe(),i=null,a=!1,f())};f()}))}},7524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(4024),i=r(5079),o=r(9144),s=r(5710),a=r(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var p="number"==typeof c?s.timer(c):a.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));p.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.retryWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():a=!0})))),s&&s.next(t)}))),a&&(i.unsubscribe(),i=null,a=!1,u())};u()}))}},6577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(4024),i=r(5729),o=r(5079);t.sample=function(e){return n.operate((function(t,r){var n=!1,s=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,s=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=s;s=null,r.next(e)}}),i.noop))}))}},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(4617),i=r(6577),o=r(4449);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},7250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(4024),i=r(2181);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},2181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(5079);t.scanInternals=function(e,t,r,i,o){return function(s,a){var u=r,c=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&a.next(c)}),o&&function(){u&&a.next(c),a.complete()}))}}},842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(4024),i=r(5079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var o={buffer:[],complete:!1},s={buffer:[],complete:!1},a=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?a(!1):e.buffer.push(n):!t(n,i.shift())&&a(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&a(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,s)),e.subscribe(u(s,o))}))}},9728:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9451),s=r(9520),a=r(1403),u=r(4024);function c(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0!==t){if(!1!==t){var s=new a.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(s)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,p=e.resetOnRefCountZero,d=void 0===p||p;return function(e){var t,n,s,l=0,p=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=s=void 0,p=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||p||y();var b=s=null!=s?s:r();u.add((function(){0!=--l||h||p||(n=c(m,d))})),b.subscribe(u),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){p=!0,y(),n=c(v,f),b.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},7768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(216),i=r(9728);t.shareReplay=function(e,t,r){var o,s,a,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},2445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(8032),i=r(6228),o=r(1137),s=r(4024),a=r(5079);t.single=function(e){return s.operate((function(t,r){var s,u=!1,c=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,s=n)}),(function(){u?(r.next(s),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},6262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(2763);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},7397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(9144),i=r(4024),o=r(5079);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},1620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(4024),i=r(5079);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(79),i=r(2619),o=r(4024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(4024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(7222),i=r(9144);t.switchAll=function(){return n.switchMap(i.identity)}},7222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9451),i=r(4024),o=r(5079);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,u=!1,c=function(){return u&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var u=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){s=null,c()})))}),(function(){u=!0,c()})))}))}},6464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(7222),i=r(4432);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},4434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(7222),i=r(4024);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(1727),i=r(4024),o=r(5079);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4288:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(1727),o=r(4024),s=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},7341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(4024),i=r(5079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},8668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(4432),i=r(4024),o=r(5079),s=r(9144);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},9466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var n=r(4024),i=r(5079),o=r(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),n.operate((function(t,n){var s=r.leading,a=r.trailing,u=!1,c=null,l=null,f=!1,p=function(){null==l||l.unsubscribe(),l=null,a&&(y(),f&&n.complete())},d=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,p,d))},y=function(){if(u){u=!1;var e=c;c=null,n.next(e),!f&&h(e)}};t.subscribe(i.createOperatorSubscriber(n,(function(e){u=!0,c=e,(!l||l.closed)&&(s?y():h(e))}),(function(){f=!0,(!(a&&u&&l)||l.closed)&&n.complete()})))}))}},9705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(4617),i=r(9466),o=r(5710);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler),void 0===r&&(r=i.defaultThrottleConfig);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},8062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(8032),i=r(4024),o=r(5079);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},6610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(4617),i=r(4024),o=r(5079);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},6279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(4617),i=r(7761),o=r(4024),s=r(9451),a=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,p=r.with,d=void 0===p?l:p,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,y,(function(){try{r.unsubscribe(),s.innerFrom(d({meta:m,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-y.now():f)}))}},8132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(4617),i=r(7761),o=r(6279);t.timeoutWith=function(e,t,r){var s,a,u;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:u})}},4553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(1713),i=r(4338);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(1678),i=r(4024),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},4768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var a=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),a)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,a)),function(){null==i||i.unsubscribe(),i=null}}))}},131:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(9520),o=r(4024),s=r(5079);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],u=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,c;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var p=u-e+1;if(p>=0&&p%r==0&&a.shift().complete(),++u%r==0){var d=new i.Subject;a.push(d),o.next(d.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(9520),i=r(4617),o=r(7215),s=r(4024),a=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,d,(function(){return c(a)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):s=!0,f();var p=function(e){return i.slice().forEach(e)},v=function(e){p((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){p((function(t){t.window.next(e),y<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){i=null}}))}},752:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(9520),o=r(7215),s=r(4024),a=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],p=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(u.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void p(e)}s.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,p)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),p,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void u(e)}t.subscribe(a=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==a||a.unsubscribe(),i=null})))}))}},4255:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(4024),s=r(5079),a=r(9451),u=r(9144),c=r(5729),l=r(2619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),p=e.map((function(){return!1})),d=!1,h=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,d||p[t]||(p[t]=!0,(d=p.every(u.identity))&&(p=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},3253:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(2042),s=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},7220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(2042),i=r(7534);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},9287:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(3253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},3584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(5271);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},1659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(5271),i=r(5421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(5271),i=r(5686),o=r(4432),s=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},5704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9451),i=r(3165),o=r(831);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9451),i=r(3165),o=r(831);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},3035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(1659),i=r(9266);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5704),i=r(4644),o=r(3584),s=r(8840),a=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),p=r(7707),d=r(4883),h=r(9266),y=r(3035);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(p.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4756:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(7215).Subscription);t.Action=o},5364:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(1172),s=r(6741),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},1834:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AnimationFrameScheduler=o},3761:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(1172),s=r(6703),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=a},1386:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AsapScheduler=o},1172:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(4756),s=r(9678),a=r(2447),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},6759:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(3980),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},6354:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(1172).AsyncAction);t.QueueAction=o},3144:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(6759).AsyncScheduler);t.QueueScheduler=o},8847:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(1172),s=r(7215),a=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(6759).AsyncScheduler);t.VirtualTimeScheduler=a;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(o.AsyncAction);t.VirtualAction=u},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(5364),i=r(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},6741:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(7215);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},4502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(3761),i=r(1386);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},4617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(1172),i=r(6759);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},1713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6703:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2534),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},9678:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},1241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},8344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(6354),i=r(3144);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8972:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},5686:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},2138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},9251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9876);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},8032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9876);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},1137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9876);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9876);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},6228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9876);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9876);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},2619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(4432),i=r(6551);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},4475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},2447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},9876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},1589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},4770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3782),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},5421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},9144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8219:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},7707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(4432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},7761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},4432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},3292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2138),i=r(4432);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},6380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(5686),i=r(4432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},1211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(5271),i=r(4432);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(4432);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9266:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(4432);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},6551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(4432);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},4024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(4432);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},4666:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(4338),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},5966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(9144);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3782),i=r(8972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},4883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},9978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var u=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var p=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return p.combineLatestAll}});var d=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var h=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var y=r(4098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return y.concat}});var v=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var m=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return m.concatMap}});var b=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var I=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return I.delay}});var T=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var j=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return j.dematerialize}});var P=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return P.distinct}});var x=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var A=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var N=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return N.elementAt}});var M=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return M.endWith}});var k=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return k.every}});var D=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return D.exhaust}});var R=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return R.exhaustAll}});var C=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return C.exhaustMap}});var $=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return $.expand}});var F=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var q=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return q.finalize}});var L=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var B=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return B.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var V=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return V.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var Q=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Q.isEmpty}});var Y=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var W=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return W.map}});var H=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return H.mapTo}});var K=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var G=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return G.max}});var J=r(6094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Z=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ue=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(5960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var pe=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return pe.publishBehavior}});var de=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var he=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var ye=r(2749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ye.race}});var ve=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var me=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return me.reduce}});var be=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Ie=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ie.scan}});var Te=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Te.sequenceEqual}});var je=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return je.share}});var Pe=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Pe.shareReplay}});var xe=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ae=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var Ne=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ne.skipLast}});var Me=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Me.skipUntil}});var ke=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return ke.skipWhile}});var De=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return De.startWith}});var Re=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Re.subscribeOn}});var Ce=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ce.switchAll}});var $e=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return $e.switchMap}});var Fe=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var qe=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return qe.switchScan}});var Le=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Be=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Be.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Ve=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ve.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Qe=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Qe.throttle}});var Ye=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var We=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return We.throwIfEmpty}});var He=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return He.timeInterval}});var Ke=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ge=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ge.timeoutWith}});var Je=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Je.timestamp}});var Ze=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(3253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},9380:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutationContext=t.AiAssistantChatContext=void 0,t.AiAssistantChatContext=class{constructor(e){this.profileId=e.profileId,this.prompt=e.prompt}},t.AiAssistantMutationContext=class{constructor(e){this.profileId=e.profileId,this.type=e.type,this.resource=e.resource,this.payload=e.payload}}},7698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantMutateRequestSchema=t.AiAssistantChatRequestSchema=void 0,t.AiAssistantChatRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},clientId:{type:"string"},clientRequestId:{type:"string"},prompt:{type:"string"}},required:["profileId","integrationId","clientId","clientRequestId","prompt"]},t.AiAssistantMutateRequestSchema={type:"object",properties:{profileId:{type:"string"},integrationId:{type:"string"},type:{type:"string",enum:["insert","update","delete"]},resource:{type:"string",enum:["instruction","context","profile"]}},required:["profileId","integrationId","type","resource"],oneOf:[{properties:{type:{const:"insert"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}},required:["modelName","strictContext"]}}},{properties:{type:{const:"insert"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"insert"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}},required:["id","title","context"]}}},{properties:{type:{const:"update"},resource:{const:"profile"},payload:{type:"object",properties:{modelName:{type:"string",enum:["gpt-3.5-turbo","gpt-4"]},strictContext:{type:"boolean"}}}}},{properties:{type:{const:"update"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"},instruction:{type:"string"}},required:["id","instruction"]}}},{properties:{type:{const:"update"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"},title:{type:"string"},context:{type:"string"}}}}},{properties:{type:{const:"delete"},resource:{const:"instruction"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"context"},payload:{type:"object",properties:{id:{type:"string"}},required:["id"]}}},{properties:{type:{const:"delete"},resource:{const:"profile"},payload:{type:"object"}}}]}},6614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenAiModelData=void 0,t.OpenAiModelData={"gpt-4":{tokens:8192},"gpt-3.5-turbo":{tokens:4096}}},2943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiCallContext=void 0,t.ApiCallContext=class{constructor(e){this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.headers=e.headers,this.body=e.body,this.queryParams=e.queryParams,this.pathParams=e.pathParams,this.serverUrlOverride=e.serverUrlOverride}}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiSchemaRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const n=r(133);t.UpdateOpenIdProviderRequestSchema={type:"object",required:["openIdProvider"],properties:{openIdProvider:{type:"object",required:["providerType","clientId","domain"],properties:{providerType:{type:"string",const:"auth0"},clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}};const i={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},o={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",nullable:!1}}},a={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!0},sslEnabled:{type:"boolean",nullable:!0},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}},sslCertificate:{type:"string",nullable:!0,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},u={type:"object",nullable:!1,required:["connectionString"],properties:{connectionString:{type:"string",nullable:!1},user:{type:"string",nullable:!0},secrets:{type:"object",nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},maxPoolSize:{type:"number",nullable:!1},minPoolSize:{type:"number",nullable:!1},socketTimeoutMS:{type:"number",nullable:!1},keepAlive:{type:"boolean",nullable:!1},directConnection:{type:"boolean",nullable:!1},ssl:{type:"object",nullable:!1,required:["certificateFile","validate"],properties:{certificateFile:{type:"string",nullable:!1},validate:{type:"boolean",nullable:!1}}}}},c={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}},l={type:"object",required:[],properties:{account:{type:"string",nullable:!1},username:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!1},warehouse:{type:"string",nullable:!1},role:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:n.IntegrationType.built_in_db}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.api},configuration:{type:"object",nullable:!0,required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",nullable:!1,required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",nullable:!1}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.datadog},configuration:{type:"object",nullable:!1,required:["apiKey","appKey","datadogRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},appKey:{type:"string",nullable:!1,isSecret:{}},datadogRegion:{type:"string",nullable:!1,enum:Object.keys(n.datadogRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.newrelic},configuration:{type:"object",nullable:!1,required:["apiKey","newRelicRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},newRelicRegion:{type:"string",nullable:!1,enum:Object.keys(n.newRelicRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.auth0},configuration:{type:"object",nullable:!1,required:["clientId","domain"],properties:{clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_rsa},configuration:{type:"object",nullable:!1,required:["jwksUri"],properties:{jwksUri:{type:"string",nullable:!1},validations:{type:"object",nullable:!0,properties:{iss:{type:"string",nullable:!0},aud:{type:"string",nullable:!0}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.jwt_hmac},configuration:{type:"object",nullable:!1,required:["verifyUri"],properties:{verifyUri:{type:"string",nullable:!1}}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.ai_assistant},configuration:{type:"object",nullable:!1,required:[],properties:{apiKey:{type:"string",nullable:!1}}}}}]},t.DeleteIntegrationRequestSchema={type:"object",required:["integrationId"],properties:{integrationId:{type:"string",nullable:!1}}},t.TestDataConnectionRequestSchema={type:"object",required:["type","configuration"],oneOf:[{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.oracledb},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:l}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:c}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.oracledb},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mssql},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:l}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mongo},connectionOptions:u}},{type:"object",properties:{integrationType:{const:n.IntegrationType.built_in_db}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:n.IntegrationType.graphql},connectionOptions:c}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiSchemaRequestSchema={type:"object",required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}}}},8030:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CronExpression=void 0,(r=t.CronExpression||(t.CronExpression={})).EVERY_SECOND="* * * * * *",r.EVERY_5_SECONDS="*/5 * * * * *",r.EVERY_10_SECONDS="*/10 * * * * *",r.EVERY_30_SECONDS="*/30 * * * * *",r.EVERY_MINUTE="*/1 * * * *",r.EVERY_5_MINUTES="0 */5 * * * *",r.EVERY_10_MINUTES="0 */10 * * * *",r.EVERY_30_MINUTES="0 */30 * * * *",r.EVERY_HOUR="0 0-23/1 * * *",r.EVERY_2_HOURS="0 0-23/2 * * *",r.EVERY_3_HOURS="0 0-23/3 * * *",r.EVERY_4_HOURS="0 0-23/4 * * *",r.EVERY_5_HOURS="0 0-23/5 * * *",r.EVERY_6_HOURS="0 0-23/6 * * *",r.EVERY_7_HOURS="0 0-23/7 * * *",r.EVERY_8_HOURS="0 0-23/8 * * *",r.EVERY_9_HOURS="0 0-23/9 * * *",r.EVERY_10_HOURS="0 0-23/10 * * *",r.EVERY_11_HOURS="0 0-23/11 * * *",r.EVERY_12_HOURS="0 0-23/12 * * *",r.EVERY_DAY_AT_1AM="0 01 * * *",r.EVERY_DAY_AT_2AM="0 02 * * *",r.EVERY_DAY_AT_3AM="0 03 * * *",r.EVERY_DAY_AT_4AM="0 04 * * *",r.EVERY_DAY_AT_5AM="0 05 * * *",r.EVERY_DAY_AT_6AM="0 06 * * *",r.EVERY_DAY_AT_7AM="0 07 * * *",r.EVERY_DAY_AT_8AM="0 08 * * *",r.EVERY_DAY_AT_9AM="0 09 * * *",r.EVERY_DAY_AT_10AM="0 10 * * *",r.EVERY_DAY_AT_11AM="0 11 * * *",r.EVERY_DAY_AT_NOON="0 12 * * *",r.EVERY_DAY_AT_1PM="0 13 * * *",r.EVERY_DAY_AT_2PM="0 14 * * *",r.EVERY_DAY_AT_3PM="0 15 * * *",r.EVERY_DAY_AT_4PM="0 16 * * *",r.EVERY_DAY_AT_5PM="0 17 * * *",r.EVERY_DAY_AT_6PM="0 18 * * *",r.EVERY_DAY_AT_7PM="0 19 * * *",r.EVERY_DAY_AT_8PM="0 20 * * *",r.EVERY_DAY_AT_9PM="0 21 * * *",r.EVERY_DAY_AT_10PM="0 22 * * *",r.EVERY_DAY_AT_11PM="0 23 * * *",r.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",r.EVERY_WEEK="0 0 * * 0",r.EVERY_WEEKDAY="0 0 * * 1-5",r.EVERY_WEEKEND="0 0 * * 6,0",r.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",r.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",r.EVERY_2ND_HOUR="0 */2 * * *",r.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",r.EVERY_2ND_MONTH="0 0 1 */2 *",r.EVERY_QUARTER="0 0 1 */3 *",r.EVERY_6_MONTHS="0 0 1 */6 *",r.EVERY_YEAR="0 0 1 0 *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",r.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",r.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",r.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"},9903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId","clientId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},9235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformResponse=t.transformParams=t.ExecuteFunctionSecureAnnotations=void 0;const n=r(9380),i=r(2943),o=r(7627),s=r(326),a=r(2251),u=r(5250),c=r(2574);t.ExecuteFunctionSecureAnnotations=["secureDistributedLock","secureQuery","secureMutation","secureNamedQuery","secureGraphQL","secureApi","secureAiAssistantChat","secureAiAssistantMutation"],t.transformParams=function(e,t){switch(t){case"webhook":case"executable":case"trigger":case"transformRead":case"transformWrite":case"metadata":return e;case"scheduler":return[];case"secureQuery":return[new c.QueryContext(e[0].query)];case"secureMutation":return[new a.MutationContext(e[0].mutation,e[0].beforeAndAfterDocs,e[0].serverTimestamp)];case"secureNamedQuery":return[new u.NamedQueryContext(e[0])];case"secureDistributedLock":return[new o.DistributedLockContext(e[0].mutex,e[0].exclusive)];case"secureGraphQL":return[new s.GraphqlContext(e[0])];case"secureApi":return[new i.ApiCallContext(e[0])];case"secureAiAssistantChat":return[new n.AiAssistantChatContext(e[0])];case"secureAiAssistantMutation":return[new n.AiAssistantMutationContext(e[0])]}},t.transformResponse=function(e,r){return t.ExecuteFunctionSecureAnnotations.includes(r)?{rulesPassed:e,docsToHash:e?{}:void 0}:e}},1277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockContext=void 0,t.DistributedLockContext=class{constructor(e,t){this.mutex=e,this.exclusive=t}}},4385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasDocumentDiff=t.getSquidDocId=t.parseSquidDocId=void 0;const n=r(9312).__importDefault(r(2091)),i=r(1636),o=r(4684);function s(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=s,t.getSquidDocId=function(...e){const[t,r,n]=e,i="object"==typeof t?t:{docId:t,collectionName:r,integrationId:n};return i.integrationId||(i.integrationId=void 0),(0,o.normalizeJsonAsString)(i)},t.hasDocumentDiff=function(e,t){const r=(0,n.default)(e,t)||[],a=["__docId__","__ts__"],u=r.find((e=>{var t;return"__docId__"===(null===(t=e.path)||void 0===t?void 0:t[0])}));if(u){if("E"!==u.kind||!u.rhs)throw new Error(`Unexpected diff for __docId__: ${(0,o.normalizeJsonAsString)(u)}`);const e=s(u.rhs+"");a.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(a.includes(null===(r=e.path)||void 0===r?void 0:r[0]))return!1;switch(e.kind){case"N":return(0,i.isNotNullish)(e.rhs);case"E":case"D":case"A":return!0}return!1})))}},326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphqlContext=void 0,t.GraphqlContext=class{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}},9231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyIntrospection=void 0,t.EmptyIntrospection={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:null,subscriptionType:null,types:[{name:"Query",kind:"OBJECT",fields:[{name:"isEmpty",type:{kind:"SCALAR",name:"Boolean"},args:[],isDeprecated:!1,deprecationReason:null}],interfaces:[]},{name:"Boolean",kind:"SCALAR"}],directives:[]}}},7008:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(r=t.HttpStatus||(t.HttpStatus={}))[r.CONTINUE=100]="CONTINUE",r[r.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",r[r.PROCESSING=102]="PROCESSING",r[r.EARLYHINTS=103]="EARLYHINTS",r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.ACCEPTED=202]="ACCEPTED",r[r.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.RESET_CONTENT=205]="RESET_CONTENT",r[r.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",r[r.AMBIGUOUS=300]="AMBIGUOUS",r[r.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",r[r.FOUND=302]="FOUND",r[r.SEE_OTHER=303]="SEE_OTHER",r[r.NOT_MODIFIED=304]="NOT_MODIFIED",r[r.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",r[r.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",r[r.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",r[r.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",r[r.CONFLICT=409]="CONFLICT",r[r.GONE=410]="GONE",r[r.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",r[r.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",r[r.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",r[r.URI_TOO_LONG=414]="URI_TOO_LONG",r[r.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",r[r.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",r[r.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",r[r.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",r[r.MISDIRECTED=421]="MISDIRECTED",r[r.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",r[r.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",r[r.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",r[r.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",r[r.BAD_GATEWAY=502]="BAD_GATEWAY",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r[r.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",r[r.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(7698),t),n.__exportStar(r(6614),t),n.__exportStar(r(2943),t),n.__exportStar(r(5218),t),n.__exportStar(r(4125),t),n.__exportStar(r(8030),t),n.__exportStar(r(9903),t),n.__exportStar(r(7545),t),n.__exportStar(r(9235),t),n.__exportStar(r(6421),t),n.__exportStar(r(1277),t),n.__exportStar(r(3889),t),n.__exportStar(r(720),t),n.__exportStar(r(3085),t),n.__exportStar(r(7627),t),n.__exportStar(r(4385),t),n.__exportStar(r(326),t),n.__exportStar(r(9231),t),n.__exportStar(r(7008),t),n.__exportStar(r(133),t),n.__exportStar(r(6778),t),n.__exportStar(r(3858),t),n.__exportStar(r(2251),t),n.__exportStar(r(5263),t),n.__exportStar(r(2792),t),n.__exportStar(r(5250),t),n.__exportStar(r(7581),t),n.__exportStar(r(1012),t),n.__exportStar(r(2574),t),n.__exportStar(r(2972),t),n.__exportStar(r(791),t),n.__exportStar(r(1906),t),n.__exportStar(r(6504),t),n.__exportStar(r(5098),t),n.__exportStar(r(1391),t),n.__exportStar(r(3851),t),n.__exportStar(r(5791),t),n.__exportStar(r(7104),t),n.__exportStar(r(9132),t),n.__exportStar(r(7682),t),n.__exportStar(r(3185),t),n.__exportStar(r(4825),t),n.__exportStar(r(7850),t),n.__exportStar(r(8255),t),n.__exportStar(r(7142),t),n.__exportStar(r(6485),t),n.__exportStar(r(3589),t),n.__exportStar(r(1636),t),n.__exportStar(r(8038),t),n.__exportStar(r(4684),t),n.__exportStar(r(8932),t),n.__exportStar(r(2608),t),n.__exportStar(r(8315),t),n.__exportStar(r(3811),t)},3583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthIntegration=t.isAuthIntegrationType=t.isDataIntegration=t.isDataIntegrationType=t.AuthIntegrationTypes=t.ObservabilityIntegrationTypes=t.ApiIntegrationTypes=t.DatabaseIntegrationTypes=t.IntegrationType=t.IntegrationCategory=void 0;const n=r(9312);var i,o;function s(e){return t.DatabaseIntegrationTypes.includes(e)}function a(e){return t.AuthIntegrationTypes.includes(e)}n.__exportStar(r(3583),t),n.__exportStar(r(677),t),n.__exportStar(r(2605),t),n.__exportStar(r(4001),t),n.__exportStar(r(6855),t),(o=t.IntegrationCategory||(t.IntegrationCategory={})).database="database",o.api="api",o.observability="observability",o.crm="crm",o.auth="auth",o.ai="ai",function(e){e.built_in_db="built_in_db",e.mongo="mongo",e.mysql="mysql",e.mssql="mssql",e.postgres="postgres",e.cockroach="cockroach",e.api="api",e.graphql="graphql",e.snowflake="snowflake",e.datadog="datadog",e.newrelic="newrelic",e.auth0="auth0",e.jwt_rsa="jwt_rsa",e.jwt_hmac="jwt_hmac",e.ai_assistant="ai_assistant",e.algolia="algolia",e.elastic_observability="elastic_observability",e.elastic_search="elastic_search",e.elastic_enterprise_search="elastic_enterprise_search",e.sentry="sentry",e.sap_hana="sap_hana",e.salesforce_crm="salesforce_crm",e.documentdb="documentdb",e.dynamodb="dynamodb",e.cassandra="cassandra",e.clickhouse="clickhouse",e.alloydb="alloydb",e.spanner="spanner",e.db2="db2",e.mariadb="mariadb",e.oracledb="oracledb",e.redis="redis",e.xata="xata",e.azure_sql="azure_sql"}(i=t.IntegrationType||(t.IntegrationType={})),t.DatabaseIntegrationTypes=[i.built_in_db,i.mongo,i.mysql,i.mssql,i.postgres,i.cockroach,i.snowflake,i.oracledb],t.ApiIntegrationTypes=[i.api,i.graphql],t.ObservabilityIntegrationTypes=[i.datadog,i.newrelic],t.AuthIntegrationTypes=[i.auth0,i.jwt_rsa,i.jwt_hmac],t.isDataIntegrationType=s,t.isDataIntegration=function(e){return s(e.type)},t.isAuthIntegrationType=a,t.isAuthIntegration=function(e){return a(e.type)}},6855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newRelicRegionMap=t.datadogRegionMap=void 0,t.datadogRegionMap={us1:"US1 - East",us3:"US3 - West",us5:"US5 - Central",eu1:"EU1 - Europe","us1-fed":"US1-FED (FedRamp)"},t.newRelicRegionMap={worldwide:"Worldwide",eu:"Europe"}},6778:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={})).TRACE="trace",r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error"},3858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregationPeriodMap=void 0,t.aggregationPeriodMap={"1m":1,"5m":5,"15m":15,"1h":60,"1d":1440,"1w":10080}},2251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const n=r(9312).__importStar(r(8784));t.MutationContext=class{constructor(e,t,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=r}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?n.get(this.beforeAndAfterDocs.before,e):void 0,r=this.beforeAndAfterDocs.after?n.get(this.beforeAndAfterDocs.after,e):void 0;return!n.isEqual(t,r)}}},5263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const r={type:"string"},n={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:r,integrationId:r,collectionName:r}},i={oneOf:[{type:"object",required:["type","properties","squidDocIdObj"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},squidDocIdObj:n}},{type:"object",required:["type","squidDocIdObj"],properties:{type:{type:"string",const:"delete"},squidDocIdObj:n}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},squidDocIdObj:n,properties:{type:"object",patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]+":{type:"array",minItems:1,items:{oneOf:[{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyNumericFn"},fn:{type:"string",const:"increment"},value:{type:"number"}}},{type:"object",required:["type"],properties:{type:{type:"string",const:"removeProperty"}}},{type:"object",required:["type","value"],properties:{type:{type:"string",const:"update"},value:{}}},{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"extendString"},value:r}},{type:"object",required:["type","fn"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"trim"}}}]}}}}}}]};t.MutationRequestSchema={type:"object",required:["clientId","integrationId","mutations"],properties:{clientId:r,integrationId:r,mutations:{type:"array",items:i}}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const n=r(9312).__importStar(r(8784)),i=r(2937),o=r(7850),s=r(8038);function a(e,t){switch(t.type){case"applyNumericFn":return function(e,t){if("increment"===t.fn)return null==e?t.value:e+t.value;throw new Error("Unknown numeric function: "+JSON.stringify(t))}(e,t);case"applyStringFn":return function(e,t){switch(t.fn){case"trim":return"string"!=typeof e?e:e.trim();case"extendString":return null==e?t.value:e+t.value;default:throw new Error("Unknown string function: "+JSON.stringify(t))}}(e,t);case"update":return"object"==typeof t.value?n.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function u(e){return Object.entries(e.properties).sort((([e],[t])=>e.split(".").length-t.split(".").length))}function c(e,t){if("insert"===t.type)return t;if("delete"===t.type)return t;if("delete"===e.type)throw new Error("Cannot delete and then update");if((0,o.assertTruthy)("update"===t.type,"Invalid mutation type"),"update"===e.type)return function(e,t){const r=n.cloneDeep(e);t=n.cloneDeep(t);for(const[e]of u(r)){const n=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&n>t.split(".").length))&&delete r.properties[e]}for(const[e,n]of u(t))r.properties[e]=[...r.properties[e]||[],...n];return r}(e,t);const r=n.cloneDeep(e);for(const[e,n]of u(t)){const t=n;for(const n of t){const t=a((0,s.getInPath)(r.properties,e),n);void 0===t?(0,s.deleteInPath)(r.properties,e):(0,s.setInPath)(r.properties,e,t)}}return r}t.sortUpdateMutationProperties=u,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const r=Object.assign({},e),n=u(t);for(const[e,t]of n){const n=t;for(const t of n){const n=a((0,s.getInPath)(r,e),t);void 0===n?(0,s.deleteInPath)(r,e):(0,s.setInPath)(r,e,n)}}return r},t.convertInsertToUpdate=function(e){const t={type:"update",squidDocIdObj:e.squidDocIdObj,properties:{}};for(const[r,n]of Object.entries(e.properties))t.properties[r]=[{type:"update",value:n}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.squidDocIdObj.integrationId}${e.squidDocIdObj.collectionName}/${e.squidDocIdObj.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},5250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryContext=void 0,t.NamedQueryContext=class{constructor(e){this.params=e}}},7581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteNamedQueryRequestSchema=void 0,t.ExecuteNamedQueryRequestSchema={type:"object",required:["integrationId","queryName","paramsRecordStr","clientRequestId","clientId"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},1012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryUnsubscribeRequestSchema=t.QueryRequestSchema=t.QuerySchema=void 0,t.QuerySchema={$id:"querySchema",type:"object",required:["collectionName","integrationId"],properties:{collectionName:{type:"string",nullable:!1},integrationId:{type:"string",nullable:!1},conditions:{type:"array",nullable:!1,items:{type:"object",nullable:!1,required:["fieldName","operator","value"],properties:{fieldName:{type:"string",nullable:!1},operator:{type:"string",nullable:!1,enum:["==",">=","<=",">","<","!=","like","not like","like_cs","not like_cs"]},value:{$ref:"querySchema#/definitions/conditionValueSchema"}}}},sortOrder:{type:"array",nullable:!1,items:{type:"object",required:["fieldName","asc"],properties:{fieldName:{type:"string"},asc:{type:"boolean"}}}},limit:{type:"number",nullable:!1}},definitions:{conditionValueSchema:{oneOf:[{type:"null",nullable:!0},{type:"string",nullable:!1},{type:"number",nullable:!1},{type:"boolean",nullable:!1},{type:"array",nullable:!1,items:{$ref:"querySchema#/definitions/conditionValueSchema"}},{type:"object",nullable:!1,patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]{1,64}":{$ref:"querySchema#/definitions/conditionValueSchema"}}}]}}},t.QueryRequestSchema={type:"object",required:["clientId","clientRequestId","query","subscribe"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientId","clientRequestId"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1}}}},791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const n=r(1636),i=r(8038),o=r(4684);class s{}function a(e,t){var r;const s=[...e.unconditional||[]],a=new Set,c=new Map;for(const[s,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(s);for(const[s,f]of Object.entries(l)){const l=[],p=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,d=(0,o.encodeValueForMapping)(p);switch(s){case"==":l.push(...f[d]||[]);break;case"!=":{(f[d]||[]).forEach((e=>a.add(e)));const e=Object.entries(f).filter((([e])=>e!==d));for(const[t,r]of e)l.push(...r);break}case"<":case"<=":case">":case">=":case"like":case"not like":case"like_cs":case"not like_cs":(0,n.isNotNullish)(p)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),p,s))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+s)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())a.has(t)||r>=e.queriesMetadata[t].condCount&&s.push(t);return s}function u(e,t,r){if(null===e||null===t)return!1;switch(r){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&c(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&c(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!0));default:throw new Error(`Unsupported operator comparison: ${r}`)}}function c(e,t,r){r||(e=e.toLowerCase(),t=t.toLowerCase());const n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%/g,".*");return new RegExp(`^${n}$`).test(e)}t.QueryMappingManager=s,t.SimpleQueryMappingManager=class extends s{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?a(i,t):[]}},t.findQueriesForDocumentSync=a,t.compareOperator=u,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(8556),t),n.__exportStar(r(1515),t)},8556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const n=r(8784),i={"in:in":(e,t)=>e.every((e=>t.includes(e))),"in:not in":(e,t)=>e.every((e=>!t.includes(e))),"not in:not in":(e,t)=>t.every((t=>e.includes(t))),">:not in":(e,t)=>t.every((t=>e>=t)),">=:not in":(e,t)=>t.every((t=>e>t)),"<:not in":(e,t)=>t.every((t=>e<=t)),"<=:not in":(e,t)=>t.every((t=>e<t)),">:>":(e,t)=>e>=t,">=:>":(e,t)=>e>t,"in:>":(e,t)=>e.every((e=>e>t)),">:>=":(e,t)=>e>=t,">=:>=":(e,t)=>e>=t,"in:>=":(e,t)=>e.every((e=>e>=t)),"<:<":(e,t)=>e<=t,"<=:<":(e,t)=>e<t,"in:<":(e,t)=>e.every((e=>e<t)),"<:<=":(e,t)=>e<=t,"<=:<=":(e,t)=>e<=t,"in:<=":(e,t)=>e.every((e=>e<=t))};t.QueryContext=class{constructor(e){this.query=e,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(e){return!e.find(((e,t)=>{var r;return!(0,n.isEqual)(this.query.sortOrder[t],Object.assign(Object.assign({},e),{asc:null===(r=e.asc)||void 0===r||r}))}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}includes(e,t,r){return this.includesCondition({fieldName:e,operator:t,value:r})}includesCondition(e){const t=this.parsedConditions.filter((t=>t.fieldName===e.fieldName));return!!t.length&&!!t.find((t=>this.evaluateIncludes(t,e)))}includesConditions(e){return this.parseConditions(e).every((e=>this.includesCondition(e)))}matchesConditions(e){const t=this.parseConditions(e);return this.parsedConditions.length===t.length&&t.every((e=>this.includesCondition(e)))}matchesQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.matchesConditions(e.conditions),r=this.sortedByExact(e.sortOrder),n=this.limit===e.limit;return t&&r&&n}isSubsetOf(e,t,r){return this.isSubsetOfCondition({fieldName:e,operator:t,value:r})}isSubsetOfCondition(e){return!!this.parsedConditions.filter((t=>t.fieldName===e.fieldName)).find((t=>this.evaluateSubset(t,e)))}isSubsetOfConditions(e){return this.parseConditions(e).every((e=>this.isSubsetOfCondition(e)))}isSubsetOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.isSubsetOfConditions(e.conditions),r=this.sortedBy(e.sortOrder),n=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&r&&n}getConditionsFor(...e){return this.parsedConditions.filter((t=>e.includes(t.fieldName)))}getConditionsForField(e){return this.parsedConditions.filter((t=>t.fieldName===e))}evaluateSubset(e,t){const{operator:r,value:n}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=i[`${r}:${o}`];return!!a&&a(n,s)}evaluateIncludes(e,t){const{operator:r,value:i}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=Array.isArray(i)?i.sort():i,u=Array.isArray(s)?s.sort():s;return o===r&&(0,n.isEqual)(u,a)}parseConditions(e){const t=[],r=new Map,n=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),r.forEach(((e,r)=>{t.push({fieldName:r,operator:"in",value:e})})),n.forEach(((e,r)=>{t.push({fieldName:r,operator:"not in",value:e})})),t}}},1515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);t.SimpleQueryBuilder=class{constructor(e,t){this.collectionName=e,this.integrationId=t,this.query={integrationId:t,collectionName:e,conditions:[],limit:-1,sortOrder:[]}}where(e,t,r){if("in"===t||"not in"===t){const n=r instanceof Array?[...r]:[r];for(const r of n)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:r});return this}return this.query.conditions.push({fieldName:e,operator:t,value:r}),this}eq(e,t){return this.where(e,"==",t)}neq(e,t){return this.where(e,"!=",t)}in(e,t){return this.where(e,"in",t)}nin(e,t){return this.where(e,"not in",t)}gt(e,t){return this.where(e,">",t)}gte(e,t){return this.where(e,">=",t)}lt(e,t){return this.where(e,"<",t)}lte(e,t){return this.where(e,"<=",t)}like(e,t,r=!0){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r=!0){return this.where(e,r?"not like_cs":"not like",t)}limit(e){return(0,o.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const r={asc:t,fieldName:e};return(0,o.validateFieldSort)(r),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(r),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=n.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const r of Object.values(t)){const t=n.groupBy(r,(e=>e.operator));for(const[r,i]of Object.entries(t)){if("=="===r||"!="===r){e.push(...i);continue}const t=n.sortBy(i,(e=>e.value));">"===r||">="===r?e.push(t[t.length-1]):e.push(t[0])}}return e}}},1906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromSquidRegion=t.convertToSquidRegion=t.getSquidSupportedCloudMap=t.squidSupportedRegionMap=t.SupportedSquidRegions=void 0;const n=r(1636);t.SupportedSquidRegions=["us-east-1.aws","local"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},local:{id:"local",name:"Local"}},t.getSquidSupportedCloudMap=function(e=!1){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[e?t.squidSupportedRegionMap.local:void 0,t.squidSupportedRegionMap["us-east-1.aws"]].filter(n.isNotNullish)},gcp:{id:"gcp",name:"Google Cloud Platform",icon:"gcp_icon",tooltip:"Google Cloud (GCP) support is coming soon!",regions:[]},azure:{id:"azure",name:"Microsoft Azure",icon:"azure_icon",tooltip:"Microsoft Azure support is coming soon!",regions:[]}}},t.convertToSquidRegion=function(e,t){return"local"===t?"local":`${t}.${e}`},t.convertFromSquidRegion=function(e){if("local"===e)return{cloudId:"aws",region:"local"};const t=e.split(".");return{cloudId:t[1],region:t[0]}}},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const n=r(9312),i=n.__importDefault(r(6236)),o=n.__importDefault(r(8414)),s=n.__importDefault(r(2091)),a=r(7008),u=r(7850),c=r(8315),l=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function f(e){return l.compile(e)}function p(e,t){const r={exactMatch:[],parentsMatch:[]};if(!e.length)return r.exactMatch.push(t),r;r.parentsMatch.push(t);const n=[...e];for(;n.length;){const e=d(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=p(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function d(e,t){var r,n;const i=(null===(r=e.properties)||void 0===r?void 0:r[t])?[null===(n=e.properties)||void 0===n?void 0:n[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,o.default)(l),l.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),l.addKeyword({keyword:"isJSON",type:"object",validate:(e,t)=>{try{const e=JSON.stringify(t);return JSON.parse(e),!0}catch(e){return!1}}}),l.addKeyword({keyword:"isComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"isDefaultComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),l.addKeyword({keyword:"dataType",validate:(e,t)=>!0}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=f,t.validateSchema=function(e,t,r=[],n={}){const i=f(e),o=i(t);if(!r.length&&!o)throw new c.ValidationError("The data does not conform with the collection schema.",a.HttpStatus.BAD_REQUEST,{errors:i.errors});if(!o&&r.length)for(const e of(0,u.truthy)(i.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",r.some((e=>t.startsWith(e+"."))))throw new c.ValidationError(`${t} does not conform with the collection schema.`,a.HttpStatus.BAD_REQUEST)}!function(e,t,r){if(r&&t.readOnly||!1===t.insertable&&!r)throw new c.ValidationError("The schema does not allow this action",a.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=p((0,u.truthy)(n.path),t);for(const t of i.exactMatch){if(t.readOnly&&"E"===n.kind)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,a.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,a.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,s.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=d},5098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenerateNewApiKeyRequestSchema=t.DeleteApiKeyRequestSchema=t.DeleteCustomSecretRequestSchema=t.SetCustomSecretRequestSchema=void 0,t.SetCustomSecretRequestSchema={type:"object",required:["key","value"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_+]",nullable:!1},value:{type:"string",nullable:!1}}},t.DeleteCustomSecretRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}},t.DeleteApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{collection:"apiKeys"}}}},t.GenerateNewApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}}},1391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromClientSchema=void 0,t.MessageFromClientSchema={type:"object",required:["type"],oneOf:[{required:["payload"],properties:{type:{const:"acknowledge"},payload:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},{properties:{type:{const:"catchup"}}},{properties:{type:{const:"kill"}}},{properties:{type:{const:"acquireLock"},payload:{type:"object",required:["mutex","exclusive","clientRequestId"],properties:{mutex:{type:"string"},exclusive:{type:"boolean"},clientRequestId:{type:"string"}}}}},{properties:{type:{const:"releaseLock"},payload:{type:"object",required:["lockId","clientRequestId"],properties:{lockId:{type:"string"},clientRequestId:{type:"string"}}}}}]}},7104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECONDS_PER_MONTH=t.SECONDS_PER_WEEK=t.SECONDS_PER_DAY=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=void 0,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=60*t.SECONDS_PER_MINUTE,t.SECONDS_PER_DAY=24*t.SECONDS_PER_HOUR,t.SECONDS_PER_WEEK=7*t.SECONDS_PER_DAY,t.SECONDS_PER_MONTH=30*t.SECONDS_PER_DAY},7682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMergeCustomizer=t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0;const n=r(8784);function i(e,t,r=((e,t)=>e>t?1:e<t?-1:0),n=0,o=e.length-1){if(o<n)return-1;const s=Math.trunc((n+o)/2);return 0===r(t,e[s])?s:r(t,e[s])>0?i(e,t,r,s+1,o):i(e,t,r,n,s-1)}t.binarySearch=i,t.insertSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){let n;for(n=e.length-1;n>=0&&r(e[n],t)>0;n--)e[n+1]=e[n];e[n+1]=t},t.removeSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){const n=i(e,t,r);n>-1&&e.splice(n,1)},t.asyncGroupBy=async function(e,t){const r={};for(const n of e){const e=await t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},t.arrayMergeCustomizer=(e,t)=>(0,n.isArray)(e)?e.concat(t):void 0},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.notNullish=t.truthy=t.assertValidateTruthy=t.assertNotNullish=t.assertTruthy=void 0;const n=r(7008),i=r(1636),o=r(8315);function s(e,t){if(e)return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function a(e,t){if((0,i.isNotNullish)(e))return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function u(e,t){return s(e,t),e}t.assertTruthy=s,t.assertNotNullish=a,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){s(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return a(e,t),e},t.validateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){return u(e,(()=>new o.ValidationError(t,r,i)))}},8255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class r extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=r},7142:(e,t)=>{"use strict";function r(e){return/^local/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationHttpHeaders=t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL("https://squid.cloud");n.host=`${t}.${e}.${n.host}`,r(e)&&(n.protocol="http",n.port="8000",function(e){return/android$/.test(e)}(e)?n.host="10.0.2.2":function(e){return/ios$/.test(e)}(e)&&(n.host="localhost"));const i=n.toString();return i.endsWith("/")?i:i+"/"},t.getApplicationHttpHeaders=function(e,t){const n={};return r(e)&&(n["X-Squid-AppId"]=t),n}},6485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateShortId=t.generateId=void 0,t.generateId=function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.generateShortId=function(e=18){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()));return t}},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const n=r(2937),i=r(7850);t.LockManager=class{constructor(){this.locks={}}async lock(...e){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));await(0,n.lastValueFrom)((0,n.combineLatest)(t).pipe((0,n.filter)((e=>!e.includes(!0))),(0,n.take)(1))),await this.lock(...e)}release(...e){for(const t of e){const e=(0,i.truthy)(this.locks[t]);e.next(!1),e.complete(),delete this.locks[t]}}canGetLock(...e){return!e.some((e=>{var t;return null===(t=this.locks[e])||void 0===t?void 0:t.value}))}lockSync(...e){(0,i.assertTruthy)(this.canGetLock(...e),"Cannot acquire lock sync");for(const t of e)this.locks[t]=new n.BehaviorSubject(!0)}}},1636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNullish=void 0,t.isNotNullish=function(e){return null!=e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceKeyInRecord=t.replaceKeyInMap=t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850);function o(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t,r="."){const n=t.split(r);let o,s=e;for(;s&&n.length;){const e=(0,i.truthy)(n.shift());if(!(s instanceof Object&&e in s))return;o=s[e],s=o}return o},t.setInPath=function(e,t,r,s="."){var a;const u=t.split(s);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(a=n.clone(c[e]))&&void 0!==a?a:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var s;const a=t.split(r);let u=e;for(;a.length;){const e=(0,i.truthy)(a.shift());if(a.length){const t=o(u[e])&&null!==(s=n.clone(u[e]))&&void 0!==s?s:{};u[e]=t,u=t}else delete u[e]}},t.deepReplace=function e(t,r,n){for(const i in t)i===r?t[i]=n(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,r,n))):"object"==typeof t[i]&&e(t[i],r,n)},t.replaceKeyInMap=function(e,t,r){if(e.has(t)){const n=e.get(t);e.delete(t),e.set(r,n)}},t.replaceKeyInRecord=function(e,t,r){const n=e[t];void 0!==n&&(e[r]=n,delete e[t])}},4684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recodeValue=t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const n=r(5382);function i(e){if(Array.isArray(e))return e.map((e=>i(e)));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),r={};return t.sort().forEach((t=>{r[t]=i(e[t])})),r}function o(e){try{return n.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}function s(e){return n.EJSON.parse(e)}function a(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(o(e))}function u(e){return s(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=s,t.encodeValueForMapping=a,t.decodeValueForMapping=u,t.recodeValue=function(e){return u(a(e))}},8932:(e,t)=>{"use strict";function r(e){return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}:${(e.getUTCSeconds()+"").padStart(2,"0")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.dateToTimeString=t.msPastMidnightToTimeString=t.kafkaConnectStringToInterval=t.base64ToBinary=t.base64ToString=t.isoStringToDate=t.msToDate=t.daysPastEpochToDate=t.moneyStringToNumber=t.JSONToString=t.stringToJSON=t.stringToBuffer=t.bufferToString=t.numberToString=t.stringToNumber=t.intToBoolean=t.booleanToInt=t.unchanged=void 0,t.unchanged=function(e){return e},t.booleanToInt=function(e){return e?1:0},t.intToBoolean=function(e){return!!e},t.stringToNumber=function(e){return Number(e)},t.numberToString=function(e){return e+""},t.bufferToString=function(e){return e.toString()},t.stringToBuffer=function(e){return Buffer.from(e)},t.stringToJSON=function(e){return JSON.parse(e)},t.JSONToString=function(e){return JSON.stringify(e)},t.moneyStringToNumber=function(e){return Number(e.replace(/[^0-9\.]+/g,""))},t.daysPastEpochToDate=function(e){return new Date(864e5*e)},t.msToDate=function(e){return new Date(e)},t.isoStringToDate=function(e){return new Date(e)},t.base64ToString=function(e){return atob(e)},t.base64ToBinary=function(e){const t=atob(e);let r="";for(let e=0;e<t.length;e++)r+=t[e].charCodeAt(0).toString(2);return r},t.kafkaConnectStringToInterval=function(e){const t=e.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);if(!t)throw new Error(`Interval string is not properly formatted: ${e}`);return{years:parseInt(t[1])||0,months:parseInt(t[2])||0,days:parseInt(t[3])||0,hours:parseInt(t[4])||0,minutes:parseInt(t[5])||0,seconds:parseInt(t[6])||0}},t.msPastMidnightToTimeString=function(e){return r(new Date(e))},t.dateToTimeString=r},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendQueryParams=void 0,t.appendQueryParams=function(e,t){const r=new URL(e),n=new URLSearchParams(r.search);for(const e in t)t.hasOwnProperty(e)&&n.set(e,t[e]);return r.search=n.toString(),r.toString()}},8315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOnlyKeys=t.isRightType=t.isNotEmpty=t.validateQueryLimit=t.validateMutations=t.validateOpenIdProviderType=t.validateOpenIdProvider=t.validateFieldSort=t.ValidationError=void 0;const n=r(7850);class i extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.details=r}}function o(e){if(!e||!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A document id and a collection id can contain only a-z, A-Z, 0-9,!@#$%^&*~_, startingwith a letter, at least one character, and up to 50.")}function s(e){if(!e||"string"!=typeof e)throw new Error("Field name has to be a non-empty string");if("__docId__"!==e&&!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A Field name can contain only a-z, A-Z, 0-9,!@#$%^&*~_, starting with a letter, at least one character, and up to 50. Field name: "+e)}function a(e){(0,n.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function u(e){if(!e||"object"!=typeof e)throw new Error("Property mutation need to be a JSON object.");if(!["update","applyNumericFn","applyStringFn"].includes(e.type))throw new Error("Property mutation can be of type 'update', 'applyNumericFn', 'applyStringFn'");switch(e.type){case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Update value property mutation has to be of type update");if(void 0===e.value)throw new Error("Value has to exist in an update value property mutation..")}(e);break;case"applyNumericFn":!function(e){if(!e||"applyNumericFn"!==e.type)throw new Error("Apply numeric fn mutation has to be of type applyNumericFn");if(!["increment"].includes(e.fn))throw new Error("Invalid fn for apply numeric fn.");if("number"!=typeof e.value)throw new Error("The value in an apply numeric fn function has to be numeric.")}(e);break;case"applyStringFn":!function(e){if(!e||"applyStringFn"!==e.type)throw new Error("Apply string fn mutation has to be of type applyStringFn");if(!["trim","extendString"].includes(e.fn))throw new Error("Invalid fn for apply string fn.");if("string"!=typeof e.value)throw new Error("The value in an apply string fn function has to be a string.")}(e)}}function c(e){if(!e)throw new Error("Mutation cannot be empty");if(!["insert","delete","update"].includes(e.type))throw new Error("Mutation type has to be one of 'insert', 'delete', or 'update'");switch(function(e){if("string"!=typeof e||!e)throw new Error("Collection path has to be a non empty string");o(e)}(e.squidDocIdObj.collectionName),o(e.squidDocIdObj.docId),e.type){case"delete":!function(e){if(!e||"delete"!==e.type)throw new Error("Mutation has to be non empty with type delete.")}(e);break;case"insert":!function(e){if(!e||"insert"!==e.type)throw new Error("Mutation has to be non empty with type insert.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in insert mutation need to be a JSON object.");for(const[t]of Object.entries(e.properties))s(t)}(e);break;case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Mutation has to be non empty with type update.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in update mutation need to be a JSON object.");const t=Object.entries(e.properties);for(const[e,r]of t){s(e);for(const e of r)u(e)}}(e)}}function l(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function f(e,t){return!Array.isArray(e)&&[...Object.keys(e)].every((e=>t.includes(e)))}t.ValidationError=i,t.validateFieldSort=function(e){if(!(e instanceof Object))throw new Error("Field sort has to be an object");(0,n.assertTruthy)(f(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,n.assertTruthy)(l(e.asc,"boolean"),"Asc needs to be boolean"),s(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),a(e.providerType),(0,n.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=a,t.validateMutations=function(e){if(!(e&&e instanceof Array&&e.length))throw new Error("The list of mutations has to be a non-empty array.");for(const t of e)c(t)},t.validateQueryLimit=function(e){(0,n.assertTruthy)(l(e,"number"),"Limit needs to be a number"),-1!==e&&((0,n.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,n.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,n.assertTruthy)(e<=2e4,"Limit can be maximum 20000"))},t.isNotEmpty=function(e){return function(e){if(null!=e&&"string"!=typeof e)throw new Error("Unexpected input type "+typeof e)}(e),"string"==typeof e&&!!e},t.isRightType=l,t.hasOnlyKeys=f},3811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebhookResponse=void 0,t.isWebhookResponse=function(e){return e&&e.__isWebhookResponse__}},6808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAssistantClient=void 0;const n=r(575),i=r(2937),o=r(9978);t.AiAssistantClient=class{constructor(e,t,r,n){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.integrationId=n,this.ongoingChatRequests={},this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"aiAssistant"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleChatResponse(e)}))}profile(e){return new s(this,this.integrationId,e)}async mutate(e){await this.rpcManager.post("ai/assistant/mutate",e)}chat(e,t){const r=(0,n.generateId)(),o=new i.BehaviorSubject("");this.ongoingChatRequests[r]=o;const s={profileId:e,prompt:t,clientId:this.clientIdService.getClientId(),integrationId:this.integrationId,clientRequestId:r};return this.rpcManager.post("ai/assistant/chat",s).catch((e=>{o.error(e),o.complete()})),o.pipe((0,i.finalize)((()=>{delete this.ongoingChatRequests[r]})),(0,i.share)())}handleChatResponse(e){const t=this.ongoingChatRequests[e.clientRequestId];t&&(e.payload.complete?t.complete():t.next(t.value+e.payload.token))}};class s{constructor(e,t,r){this.client=e,this.integrationId=t,this.profileId=r}chat(e){return this.client.chat(this.profileId,e)}context(e){return new a(this.client,this.integrationId,this.profileId,e)}instruction(e){return new u(this.client,this.integrationId,this.profileId,e)}insert(e){const{modelName:t,strictContext:r}=e,n={type:"insert",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}update(e){const{modelName:t,strictContext:r}=e,n={type:"update",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:r},integrationId:this.integrationId};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"profile",profileId:this.profileId,integrationId:this.integrationId,payload:{}};return this.client.mutate(e)}}class a{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{title:t,context:r}=e,n={type:"insert",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}update(e){const{title:t,context:r}=e,n={type:"update",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,title:t,context:r}};return this.client.mutate(n)}delete(){const e={type:"delete",resource:"context",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}class u{constructor(e,t,r,i){this.client=e,this.integrationId=t,this.profileId=r,this.id=i||(0,n.generateId)()}insert(e){const{instruction:t}=e,r={type:"insert",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}update(e){const{instruction:t}=e,r={type:"update",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id,instruction:t}};return this.client.mutate(r)}delete(){const e={type:"delete",resource:"instruction",profileId:this.profileId,integrationId:this.integrationId,payload:{id:this.id}};return this.client.mutate(e)}}},5969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiClientFactory=void 0;const n=r(6808);t.AiClientFactory=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.assistantsMap=new Map}getAssistant(e){let t=this.assistantsMap.get(e);return t||(t=new n.AiAssistantClient(this.clientIdService,this.rpcManager,this.socketManager,e),this.assistantsMap.set(e,t),t)}}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const n=r(575),i=r(8784),o=r(2937),s=r(9978);t.ApiManager=class{constructor(e,t,r,n={}){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.apiServerUrlOverrideMapping=n,this.ongoingApiExecutions={},r.observeNotifications().pipe((0,o.filter)((e=>"api"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,r){const i=(0,n.generateId)(),a=new o.Subject;this.ongoingApiExecutions[i]=a;const u={integrationId:e,endpointId:t,request:r,clientId:this.clientIdService.getClientId(),clientRequestId:i,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",u).catch((n=>{console.error("Got error while calling API",e,t,r,n),a.error(n),a.complete()})),(0,o.race)(a.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)()),this.clientIdService.observeClientTooOld().pipe((0,s.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}async handleApiResponse(e,t){const r=this.ongoingApiExecutions[e];r&&(t.success?r.next((0,n.deserializeObj)(t.payload)):r.error((0,i.pick)(t,"httpStatus","payload")),r.complete())}}},9526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthManager=void 0;const n=r(2937);t.AuthManager=class{constructor(e,t){this.destructManager=e,this.apiKey=t,this.authIdTokenSet=new n.BehaviorSubject(!1),this.authIdTokenObservableSubject=new n.Subject,this.shouldWaitForAuth=!1,this.observeAuthIdToken().subscribe((e=>{this.idToken=e.token,this.integrationId=e.integrationId,this.authIdTokenSet.next(!0)}))}setAuthIdToken(e,t){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1);const r=e&&"string"!=typeof e?(0,n.from)(e).pipe((0,n.map)((e=>({token:e,integrationId:t})))):(0,n.of)({token:e,integrationId:t});this.authIdTokenObservableSubject.next(r)}observeAuthIdToken(){return this.authIdTokenObservableSubject.pipe((0,n.switchMap)((e=>e)),(0,n.takeUntil)(this.destructManager.isDestructingObservable))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.isDestructingObservable))}getApiKey(){return this.apiKey}getAuthToken(){return this.apiKey?{type:"ApiKey",token:this.apiKey}:this.idToken?{type:"Bearer",token:this.idToken,integrationId:this.integrationId}:void 0}}},8862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.BackendFunctionManager=class{constructor(e,t,r){this.clientIdService=e,this.rpcManager=t,this.socketManager=r,this.ongoingFunctionExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const r=(0,n.generateId)(),s=new i.Subject;this.ongoingFunctionExecutions[r]=s;const a={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientId:this.clientIdService.getClientId(),clientRequestId:r};return this.rpcManager.post("backend-function/execute",a).catch((t=>{console.error("Got error while executing function",e,t),s.error(t),s.complete()})),(0,i.race)(s.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[r]})),(0,i.share)()),this.clientIdService.observeClientTooOld().pipe((0,o.map)((()=>{throw new Error("CLIENT_NOT_CONNECTED")}))))}handleFunctionResponse(e,t){const r=this.ongoingFunctionExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.response):(r.error(new Error(i.response)),r.complete())}}},7378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientIdService=void 0;const n=r(2937),i=r(575);t.ClientIdService=class{constructor(e){this.destructManager=e,this.clientTooOldSubject=new n.BehaviorSubject(!1),this.clientId=(0,i.generateId)(),this.destructManager.onDestruct((()=>{this.clientTooOldSubject.complete()}))}observeClientTooOld(){return this.clientTooOldSubject.pipe((0,n.filter)((e=>e)),(0,n.map)((e=>{})))}notifyClientTooOld(){this.clientTooOldSubject.next(!0),this.clientId=(0,i.generateId)()}notifyClientReadyToBeRegenerated(){this.clientTooOldSubject.next(!1)}observeClientReadyToBeRegenerated(){return this.clientTooOldSubject.pipe((0,n.skip)(1),(0,n.filter)((e=>!e)),(0,n.map)((e=>{})))}getClientId(){return this.clientId}isClientTooOld(){return this.clientTooOldSubject.value}}},1600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const n=r(5660);t.CollectionReferenceFactory=class{constructor(e,t,r,n){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.joinQueryBuilderFactory=r,this.documentIdentityService=n,this.collections=new Map,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this))}get(e,t){let r=this.collections.get(t);r||(r=new Map,this.collections.set(t,r));let i=r.get(e);return i||(i=new n.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory),r.set(e,i),i)}migrateDocIds(e){this.collections.forEach((t=>{for(const[r,n]of t)n.migrateDocIds(e)}))}}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const n=r(575),i=r(2937);t.CollectionReference=class{constructor(e,t,r,i,o){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=r,this.queryBuilderFactory=i,this.joinQueryBuilderFactory=o,this.documents=new Map,this.refId=(0,n.generateId)()}doc(e){if(e&&"string"!=typeof e&&"object"!=typeof e&&!Array.isArray(e))throw new Error("Invalid doc id. Can be only object or string.");if(this.integrationId!==n.IntegrationType.built_in_db)if(e){if("object"!=typeof e)throw new Error("Invalid doc id. String doc ids are only supported for the built_in_db integration. For all other integrations, the doc id must be an object.")}else e={__squidId:(0,n.generateId)()};else e=e&&"string"!=typeof e?{__id:(0,n.normalizeJsonAsString)(e)}:{__id:e||(0,n.generateId)()};const t=(0,n.normalizeJsonAsString)(e),r=(0,n.getSquidDocId)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(r,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.joinQueryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}or(...e){return new o(...e)}migrateDocIds(e){for(const[t,r]of this.documents)r.migrateDocIds(e);Object.entries(e).forEach((([e,t])=>{const r=(0,n.parseSquidDocId)(e),i=(0,n.parseSquidDocId)(t);(0,n.replaceKeyInMap)(this.documents,r.docId,i.docId)}))}};class o{constructor(...e){if(0===e.length)throw new Error("At least one query builder must be provided");this.builders=e}changes(){throw new Error("Changes are not supported for merged queries")}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e){const t=this.builders.map((t=>t.snapshots(e)));return this.or(this.builders[0].getSortOrder(),...t)}or(e,...t){return(0,i.combineLatest)([...t]).pipe((0,i.map)((t=>{const r=new Set,n=t.flat(),i=[];for(const e of n)r.has(e.data)||(r.add(e.data),i.push(e));return i.sort(((t,r)=>{for(const{fieldName:n,asc:i}of e){const e=t.data[n],o=r.data[n];if(e<o)return i?-1:1;if(e>o)return i?1:-1}return 0}))})))}getSortOrder(){throw new Error("getSortOrder is not supported for merged queries")}}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const n=r(575),i=r(3910),o=r(2937),s=r(9978),a="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,s,a,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=s,this.destructManager=a,this.documentIdentityService=u,this.docIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docIdToServerTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.pendingOutgoingMutationsChanged=new o.Subject,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.knownDirtyDocs=new Set,this.failedDocsToResync=[],this.refreshDocIdToTimestamp=new Map,this.handleIncomingMessagesForTests=!0,this.destructManager.onDestruct((()=>{this.destruct()})),this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.documentStore.getDocumentOrUndefined(e)}isDirty(e){var t;if(this.knownDirtyDocs.has(e))return!0;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const r=this.docIdToServerTimestamp.get(e),n=r&&!r.expireTimestamp?r.timestamp:void 0,i=this.docIdToLocalTimestamp.get(e);return!((!i||n)&&!this.isForgotten(e)&&!this.isLocalOnly(e)&&i===n)}async runInTransaction(e,t){return t?((0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(a)?this.lockManager.lockSync(a):await this.lockManager.lock(a),new Promise((async(t,r)=>{try{this.currentTransactionId=(0,n.generateId)();try{return await e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:r})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i);this.knownDirtyDocs.add(o),t||(await this.lockManager.lock(a),this.lockManager.release(a)),this.knownDirtyDocs.delete(o);const s=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,n.reduceMutations)([s.mutation,e])[0],this.outgoingMutationsEmpty.next(!1);else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},r=this.pendingOutgoingMutations.get(o)||[];r.push(t),this.pendingOutgoingMutations.set(o,r),this.outgoingMutationsEmpty.next(!1),this.pendingOutgoingMutationsChanged.next()}return this.runInTransaction((async()=>{const t=this.documentStore.getDocumentOrUndefined(o),r="delete"===e.type?void 0:"update"===e.type?(0,n.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.updateDocumentFromSnapshot(o,r)&&("insert"===e.type&&this.docIdToLocalTimestamp.set(o,(new Date).getTime()),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,r).forEach((e=>this.batchClientRequestIds.add(e))))}),t)}async runInTransactionSync(e,t){if(t)return(0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);await this.lockManager.lock(a);try{this.currentTransactionId=(0,n.generateId)();try{return e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction()}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.properties.__docId__,delete t.properties.__ts__,t}handleNotifications(){this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"mutations"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingMutations(e.payload)}))})),this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"query"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingQuerySnapshots(e.payload)}))}))}handleIncomingMutations(e){if(!this.handleIncomingMessagesForTests)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.squidDocId]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessagesForTests)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),r={};for(const i of e.docs){const e=(0,n.getSquidDocId)(i.__docId__,t.collectionName,t.integrationId);r[e]={properties:i,timestamp:i.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(r,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let r=!1;const n=new Set;for(const[t,i]of Object.entries(e))this.addPendingIncomingUpdate(t,i),this.pendingIncomingUpdates.get(t)||(r=!0),n.add(t);return this.runInTransactionSync((()=>{for(const e of n)this.maybeApplyIncomingUpdate(e)}),t).then(),r}addPendingIncomingUpdate(e,t){const r=this.pendingIncomingUpdates.get(e),n=this.docIdToServerTimestamp.get(e);r&&r.timestamp>t.timestamp||n&&n.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const r=this.pendingOutgoingMutations.get(e);r&&r.length||(this.updateDocumentFromSnapshot(e,t.properties),this.acknowledgeDocument(e,t.timestamp,!t.properties),this.docIdToLocalTimestamp.set(e,t.timestamp),this.pendingIncomingUpdates.delete(e),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(e,t.properties).forEach((e=>{this.batchClientRequestIds.add(e)})),t.properties&&(this.querySubscriptionManager.findQueriesForDocument(t.properties,e).length||this.forgetDocument(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docIdToServerTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now()||this.isTracked(e))));for(const[t]of e)this.docIdToServerTimestamp.delete(t),this.forgetDocument(t)}),1e4)}isTracked(e){if(this.pendingIncomingUpdates.get(e))return!0;const t=this.pendingOutgoingMutations.get(e);return!(!t||!t.length)||this.querySubscriptionManager.hasOngoingQueryForDocId(e)}isForgotten(e){return this.documentStore.hasData(e)&&!this.isTracked(e)}isLocalOnly(e){return!this.hasBeenAcknowledged(e)&&this.documentStore.hasData(e)}hasBeenAcknowledged(e){return this.docIdToServerTimestamp.has(e)}updateDocumentFromSnapshot(e,t){const r=this.documentStore.getDocumentOrUndefined(e);return!(!r&&!t||r===t)&&((!r||!t||(0,n.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,n.normalizeJsonAsString)(r))&&(this.documentStore.saveDocument(e,t),!0))}finishTransaction(e){this.currentTransactionId=void 0;const t=[...this.batchClientRequestIds.values()];this.batchClientRequestIds.clear(),this.querySubscriptionManager.notifyAllSubscriptions(t),this.sendAllUnsentOutgoingMutations(e).then()}async sendAllUnsentOutgoingMutations(e){const t=this.groupOutgoingMutationsByIntegrationId();try{await i.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((async([e,t])=>{await this.sendMutationsForIntegration([...t],e)})),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),await this.refreshUpdatedDocuments(),this.hasPendingSentMutations()?(await(0,o.firstValueFrom)(this.pendingOutgoingMutationsChanged.pipe((0,o.filter)((()=>!this.hasPendingSentMutations())))),null==e||e.resolve()):null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),await this.resyncFailedUpdates()),null==e||e.reject(t)}}async sendMutationsForIntegration(e,t){try{const{timestamp:r,idResolutionMap:n={},refreshList:i=[]}=await this.mutationSender.sendMutations(e.map((e=>e.mutation)),t);await this.documentIdentityService.migrate(n),i.forEach((e=>{this.refreshDocIdToTimestamp.set(n[e]||e,r)}));for(const t of e){let e=this.removeOutgoingMutation(t);n[e]&&(e=n[e]),this.acknowledgeDocument(e,r),this.isTracked(e)||(this.setExpiration(e,!0),this.forgetDocument(e))}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.forgetDocument(e),(this.hasBeenAcknowledged(e)||"insert"===t.mutation.type)&&this.failedDocsToResync.push(e)}throw t}}removeOutgoingMutation(e){const t=(0,n.getSquidDocId)(e.mutation.squidDocIdObj),r=(0,n.truthy)(this.pendingOutgoingMutations.get(t));return r.splice(r.indexOf(e),1),r.length||this.pendingOutgoingMutations.delete(t),this.pendingOutgoingMutationsChanged.next(),t}async resyncFailedUpdates(){const e=[...this.failedDocsToResync];this.failedDocsToResync.splice(0);for(const t of e){this.setExpiration(t,!0);try{const e=await this.queryBuilderFactory.getForDocument(t).snapshot();if((0,n.truthy)(e.length<=1,"Got more than one doc for the same id:"+t),!e.length){this.forgetDocument(t);const e=this.querySubscriptionManager.setClientRequestIdsForLocalDoc(t,void 0);this.querySubscriptionManager.notifyAllSubscriptions(e)}}catch(e){this.querySubscriptionManager.errorOutAllQueries(t,e)}}}async refreshUpdatedDocuments(){var e;const t=[];for(const[r,n]of this.refreshDocIdToTimestamp.entries()){const i=null===(e=this.docIdToServerTimestamp.get(r))||void 0===e?void 0:e.timestamp;i&&i>n||t.push(r)}this.refreshDocIdToTimestamp.clear();for(const e of t)try{await this.queryBuilderFactory.getForDocument(e).snapshot()}catch(e){}}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,r]of[...this.pendingOutgoingMutations.entries()]){const t=r[r.length-1];if(t&&!t.sentToServer){const r=t.mutation.squidDocIdObj.integrationId;(e[r]||(e[r]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isTracked(t)||this.forgetDocument(t)}))}acknowledgeDocument(e,t,r=!1){this.docIdToServerTimestamp.set(e,{timestamp:t}),this.setExpiration(e,r)}setExpiration(e,t){const r=this.docIdToServerTimestamp.get(e);r&&(r.expireTimestamp=t?Date.now()+2e4:void 0)}forgetDocument(e){this.docIdToLocalTimestamp.delete(e),this.setExpiration(e,!0)}migrateDocIds(e){Object.entries(e).forEach((([e,t])=>{(0,n.replaceKeyInMap)(this.docIdToLocalTimestamp,e,t),(0,n.replaceKeyInMap)(this.docIdToServerTimestamp,e,t)}))}hasPendingSentMutations(){for(const e of this.pendingOutgoingMutations.values())for(const t of e)if(t.sentToServer)return!0;return!1}}},7787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0;const n=r(2937);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}get isDestructingObservable(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean))}onPreDestruct(e){this.predestructors.push(e)}onDestruct(e){this.destructors.push(e)}async destruct(){if(this.isDestructing)return;this.isDestructedSubject.next(!0);const e=this.predestructors.concat(this.destructors);let t=e.shift();for(;t;){try{await t()}catch(e){console.error("Error while destructing Squid",e)}t=e.shift()}}}},4605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockImpl=t.DistributedLockManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.DistributedLockManager=class{constructor(e,t){this.socketManager=e,this.destructManager=t,this.ongoingLocks={},this.acquireLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockAcquired"===e.type))),this.releaseLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockReleased"===e.type))),this.lockWaitForConnectionThreshold=2e3,t.onPreDestruct((()=>{this.releaseAllLocks()})),this.socketManager.observeConnectionReady().subscribe((e=>{e||this.releaseAllLocks()})),this.releaseLockMessagesFromServer.subscribe((e=>{const t=this.ongoingLocks[e.payload.clientRequestId];void 0!==t&&t.release().then()}))}async lock(e,t){if(!await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(this.lockWaitForConnectionThreshold).pipe((0,o.map)((()=>!1))),this.socketManager.observeConnectionReady().pipe((0,i.filter)(Boolean)),this.destructManager.isDestructingObservable)))return Promise.reject("CLIENT_NOT_CONNECTED");const r=(0,n.generateId)(),a={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(a);const u=await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(5e3).pipe((0,i.take)(1),(0,o.map)((()=>({payload:{error:"TIMEOUT_GETTING_LOCK",lockId:void 0}})))),this.acquireLockMessagesFromServer.pipe((0,i.filter)((e=>e.payload.clientRequestId===r)))));if(!u.payload.lockId)throw new Error(`Failed to acquire lock: ${u.payload.error}`);const c=u.payload.lockId,l=new s(c,r,this.ongoingLocks,this.socketManager);return this.ongoingLocks[c]=l,l}releaseAllLocks(){for(const[e,t]of Object.entries(this.ongoingLocks))t.release().then(),delete this.ongoingLocks[e]}};class s{constructor(e,t,r,n){this.lockId=e,this.clientRequestId=t,this.ongoingLocks=r,this.socketManager=n,this.released=!1,this.onReleaseSubject=new i.Subject}async release(){if(this.released)return;this.released=!0,delete this.ongoingLocks[this.lockId];const e={type:"releaseLock",payload:{lockId:this.lockId,clientRequestId:this.clientRequestId}};this.socketManager.sendMessage(e),this.onReleaseSubject.next()}observeRelease(){return this.onReleaseSubject.asObservable()}isReleased(){return this.released}}t.DistributedLockImpl=s},2256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2937);t.default=class{constructor(e,t){this.documentStore=e,this.destructManager=t,this.changeNotifier=new n.BehaviorSubject({}),this.destructManager.onDestruct((()=>{this.changeNotifier.complete()}))}migrate(e){Object.entries(e).forEach((([e,t])=>{this.documentStore.migrateDocId(e,t)})),this.changeNotifier.next(e)}observeChanges(){return this.changeNotifier.asObservable()}}},2417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const n=r(575),i=r(4516);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,n.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937);t.DocumentReference=class{constructor(e,t,r){this._squidDocId=e,this.dataManager=t,this.queryBuilderFactory=r,this.refId=(0,i.generateId)()}get squidDocId(){return this._squidDocId}get data(){return(0,i.truthy)(this.dataManager.getProperties(this.squidDocId))}get hasData(){return!!this.dataManager.getProperties(this.squidDocId)}async snapshot(){if(this.isTracked()&&this.dataManager.getProperties(this.squidDocId))return this;const e=await this.queryBuilderFactory.getForDocument(this.squidDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0}snapshots(){return this.queryBuilderFactory.getForDocument(this.squidDocId).snapshots().pipe((0,s.map)((e=>((0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0))))}isDirty(){return this.dataManager.isDirty(this.squidDocId)}isTracked(){return this.dataManager.isTracked(this.squidDocId)}async update(e,t){const r={};Object.entries(e).forEach((([e,t])=>{const n=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};r[e]=[n]}));const n={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:r};return this.dataManager.applyOutgoingMutation(n,t)}async setInPath(e,t,r){return this.update({[e]:o.cloneDeep(t)},r)}async deleteInPath(e,t){return this.update({[e]:void 0},t)}incrementInPath(e,t,r){const n={type:"applyNumericFn",fn:"increment",value:t},o={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:{[e]:[n]}};return this.dataManager.applyOutgoingMutation(o,r)}decrementInPath(e,t,r){return this.incrementInPath(e,-t,r)}async insert(e,t){const r=(0,i.parseSquidDocId)(this.squidDocId);let n=(0,i.deserializeObj)(r.docId);n.__squidId&&(n={});const o={type:"insert",squidDocIdObj:r,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:r.docId}),n)};return this.dataManager.applyOutgoingMutation(o,t)}async delete(e){const t={type:"delete",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId)};return this.dataManager.applyOutgoingMutation(t,e)}migrateDocIds(e){const t=e[this.squidDocId];t&&(this._squidDocId=t)}}},5182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentStore=void 0;const n=r(575),i=r(8784);t.DocumentStore=class{constructor(){this.squidDocIdToDoc=new Map}saveDocument(e,t){const r=this.squidDocIdToDoc.get(e);if(void 0===r&&!t)return;if(void 0!==r){if(t){const r=(0,i.cloneDeep)(t),n=this.removeInternalProperties(r);return this.squidDocIdToDoc.set(e,n),n}return void this.squidDocIdToDoc.delete(e)}const n=this.removeInternalProperties(t);return this.squidDocIdToDoc.set(e,n),t}hasData(e){return void 0!==this.squidDocIdToDoc.get(e)}getDocument(e){return(0,n.truthy)(this.getDocumentOrUndefined(e))}getDocumentOrUndefined(e){return this.squidDocIdToDoc.get(e)}sortAndLimitDocs(e,t){if(!e||0===e.size)return[];const r=[...e].map((e=>this.squidDocIdToDoc.get(e))).filter(n.isNotNullish),{sortOrder:o,limit:s}=t,a=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,a,u);return s<0?c:r.slice(0,s)}removeInternalProperties(e){if(!e)return;const t=Object.assign({},e);return delete t.__ts__,t}migrateDocId(e,t){const r=this.getDocument(e);(0,n.replaceKeyInMap)(this.squidDocIdToDoc,e,t);const i=(0,n.parseSquidDocId)(t),o=(0,n.deserializeObj)(i.docId);this.saveDocument(t,Object.assign(Object.assign(Object.assign({},r),o),{__docId__:i.docId}))}}},5621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const n=r(5857);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new n.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},5857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const n=r(9312),i=r(2948),o=n.__importDefault(r(9031));t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const r=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${r}`,headers:this.rpcManager.getStaticHeaders(),fetch:o.default}),cache:new i.InMemoryCache})}async query(e){return(await this.client.query({query:i.gql`
|
|
9
9
|
${e.query}
|
|
10
10
|
`,variables:e.variables})).data}async mutate(e){return(await this.client.mutate({mutation:i.gql`
|
|
11
11
|
${e.query}
|