@squidcloud/client 1.0.75 → 1.0.77
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/cjs/index.js +12 -0
- package/dist/common/src/ai-assistant.context.d.ts +12 -12
- package/dist/common/src/ai-assistant.schemas.d.ts +1 -1
- package/dist/common/src/ai-assistant.types.d.ts +2 -2
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api.types.d.ts +4 -4
- package/dist/common/src/application.schemas.d.ts +1 -1
- package/dist/common/src/application.types.d.ts +184 -184
- package/dist/common/src/backend-function.schemas.d.ts +1 -1
- package/dist/common/src/backend-function.types.d.ts +1 -1
- package/dist/common/src/backend-run.types.d.ts +2 -2
- package/dist/common/src/bundle-api.types.d.ts +36 -36
- package/dist/common/src/bundle-data.types.d.ts +4 -4
- package/dist/common/src/communication.types.d.ts +12 -12
- package/dist/common/src/context.types.d.ts +40 -40
- package/dist/common/src/distributed-lock.context.d.ts +5 -5
- package/dist/common/src/document.types.d.ts +22 -22
- package/dist/common/src/graphql.context.d.ts +7 -7
- package/dist/common/src/graphql.types.d.ts +9 -9
- package/dist/common/src/heartbeat.types.d.ts +1 -1
- 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 +39 -39
- package/dist/common/src/integrations/database.types.d.ts +236 -236
- package/dist/common/src/integrations/index.d.ts +101 -101
- package/dist/common/src/integrations/observability.types.d.ts +23 -22
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/metrics.types.d.ts +1 -1
- package/dist/common/src/mutation.context.d.ts +14 -14
- package/dist/common/src/mutation.schemas.d.ts +1 -1
- package/dist/common/src/mutation.types.d.ts +53 -53
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.schemas.d.ts +1 -1
- package/dist/common/src/named-query.types.d.ts +1 -1
- package/dist/common/src/query/index.d.ts +2 -2
- package/dist/common/src/query/query-context.d.ts +42 -42
- package/dist/common/src/query/simple-query-builder.d.ts +117 -117
- package/dist/common/src/query.schemas.d.ts +3 -3
- package/dist/common/src/query.types.d.ts +57 -57
- package/dist/common/src/regions.d.ts +1 -1
- package/dist/common/src/schema/schema.types.d.ts +54 -54
- package/dist/common/src/secret.schemas.d.ts +1 -1
- package/dist/common/src/secret.types.d.ts +8 -8
- package/dist/common/src/security.types.d.ts +1 -1
- package/dist/common/src/socket.schemas.d.ts +1 -1
- package/dist/common/src/socket.types.d.ts +1 -1
- package/dist/common/src/time-units.d.ts +1 -1
- package/dist/common/src/trigger.types.d.ts +1 -1
- package/dist/common/src/types.d.ts +8 -8
- package/dist/common/src/utils/array.d.ts +1 -1
- package/dist/common/src/utils/assert.d.ts +1 -1
- 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 +1 -1
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.LICENSE.txt +10 -0
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/ai-assistant-client.d.ts +167 -167
- package/dist/typescript-client/src/ai-client.factory.d.ts +11 -11
- 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 +25 -25
- 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/connection-details.d.ts +23 -23
- 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 +10 -10
- package/dist/typescript-client/src/named-query.manager.d.ts +12 -12
- 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 +89 -89
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +135 -135
- 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 +218 -218
- 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 +3 -2
- package/dist/index.js +0 -12
- /package/dist/{index.js.LICENSE.txt → cjs/index.js.LICENSE.txt} +0 -0
package/dist/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={8278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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});const o=r(8599);t.default=o.PromisePool,i(r(8278),t),i(r(8599),t),i(r(5607),t),i(r(6784),t),i(r(9446),t),i(r(4204),t)},5607:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.raw=e,this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},4027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(8599),i=r(5607),o=r(9446),a=r(4204);t.PromisePoolExecutor=class{constructor(){this.meta={tasks:[],items:[],errors:[],results:[],stopped:!1,concurrency:10,shouldResultsCorrespond:!1,processedItems:[],taskTimeout:0},this.handler=()=>{},this.errorHandler=void 0,this.onTaskStartedHandlers=[],this.onTaskFinishedHandlers=[]}useConcurrency(e){if(!this.isValidConcurrency(e))throw a.ValidationError.createFrom(`"concurrency" must be a number, 1 or up. Received "${e}" (${typeof e})`);return this.meta.concurrency=e,this}isValidConcurrency(e){return"number"==typeof e&&e>=1}withTaskTimeout(e){return this.meta.taskTimeout=e,this}concurrency(){return this.meta.concurrency}useCorrespondingResults(e){return this.meta.shouldResultsCorrespond=e,this}shouldUseCorrespondingResults(){return this.meta.shouldResultsCorrespond}taskTimeout(){return this.meta.taskTimeout}for(e){return this.meta.items=e,this}items(){return this.meta.items}itemsCount(){return this.items().length}tasks(){return this.meta.tasks}activeTaskCount(){return this.activeTasksCount()}activeTasksCount(){return this.tasks().length}processedItems(){return this.meta.processedItems}processedCount(){return this.processedItems().length}processedPercentage(){return this.processedCount()/this.itemsCount()*100}results(){return this.meta.results}errors(){return this.meta.errors}withHandler(e){return this.handler=e,this}hasErrorHandler(){return!!this.errorHandler}handleError(e){return this.errorHandler=e,this}onTaskStarted(e){return this.onTaskStartedHandlers=e,this}onTaskFinished(e){return this.onTaskFinishedHandlers=e,this}hasReachedConcurrencyLimit(){return this.activeTasksCount()>=this.concurrency()}stop(){throw this.markAsStopped(),new o.StopThePromisePoolError}markAsStopped(){return this.meta.stopped=!0,this}isStopped(){return this.meta.stopped}async start(){return await this.validateInputs().prepareResultsArray().process()}validateInputs(){if("function"!=typeof this.handler)throw a.ValidationError.createFrom("The first parameter for the .process(fn) method must be a function");const e=this.taskTimeout();if(!(null==e||"number"==typeof e&&e>=0))throw a.ValidationError.createFrom(`"timeout" must be undefined or a number. A number must be 0 or up. Received "${String(e)}" (${typeof e})`);if(!Array.isArray(this.items()))throw a.ValidationError.createFrom(`"items" must be an array. Received "${typeof this.items()}"`);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw a.ValidationError.createFrom(`The error handler must be a function. Received "${typeof this.errorHandler}"`);return this.onTaskStartedHandlers.forEach((e=>{if(e&&"function"!=typeof e)throw a.ValidationError.createFrom(`The onTaskStarted handler must be a function. Received "${typeof e}"`)})),this.onTaskFinishedHandlers.forEach((e=>{if(e&&"function"!=typeof e)throw a.ValidationError.createFrom(`The error handler must be a function. Received "${typeof e}"`)})),this}prepareResultsArray(){return this.shouldUseCorrespondingResults()&&(this.meta.results=Array(this.items().length).fill(n.PromisePool.notRun)),this}async process(){for(const[e,t]of this.items().entries()){if(this.isStopped())break;await this.waitForProcessingSlot(),this.startProcessing(t,e)}return await this.drained()}async waitForProcessingSlot(){for(;this.hasReachedConcurrencyLimit();)await this.waitForActiveTaskToFinish()}async waitForActiveTaskToFinish(){await Promise.race(this.tasks())}startProcessing(e,t){const r=this.createTaskFor(e,t).then((e=>{this.save(e,t).removeActive(r)})).catch((async n=>{await this.handleErrorFor(n,e,t),this.removeActive(r)})).finally((()=>{this.processedItems().push(e),this.runOnTaskFinishedHandlers(e)}));this.tasks().push(r),this.runOnTaskStartedHandlers(e)}async createTaskFor(e,t){return void 0===this.taskTimeout()?this.handler(e,t,this):Promise.race([this.handler(e,t,this),this.createTaskTimeout(e)])}async createTaskTimeout(e){return new Promise(((t,r)=>{setTimeout((()=>{r(new i.PromisePoolError(`Promise in pool timed out after ${this.taskTimeout()}ms`,e))}),this.taskTimeout())}))}save(e,t){return this.shouldUseCorrespondingResults()?this.results()[t]=e:this.results().push(e),this}removeActive(e){return this.tasks().splice(this.tasks().indexOf(e),1),this}async handleErrorFor(e,t,r){if(this.shouldUseCorrespondingResults()&&(this.results()[r]=n.PromisePool.failed),!this.isStoppingThePoolError(e)){if(this.isValidationError(e))throw this.markAsStopped(),e;this.hasErrorHandler()?await this.runErrorHandlerFor(e,t):this.saveErrorFor(e,t)}}isStoppingThePoolError(e){return e instanceof o.StopThePromisePoolError}isValidationError(e){return e instanceof a.ValidationError}async runErrorHandlerFor(e,t){var r;try{await(null===(r=this.errorHandler)||void 0===r?void 0:r.call(this,e,t,this))}catch(e){this.rethrowIfNotStoppingThePool(e)}}runOnTaskStartedHandlers(e){this.onTaskStartedHandlers.forEach((t=>{t(e,this)}))}runOnTaskFinishedHandlers(e){this.onTaskFinishedHandlers.forEach((t=>{t(e,this)}))}rethrowIfNotStoppingThePool(e){if(!this.isStoppingThePoolError(e))throw e}saveErrorFor(e,t){this.errors().push(i.PromisePoolError.createFrom(e,t))}async drained(){return await this.drainActiveTasks(),{errors:this.errors(),results:this.results()}}async drainActiveTasks(){await Promise.all(this.tasks())}}},8599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(4027);class i{constructor(e){this.timeout=void 0,this.concurrency=10,this.shouldResultsCorrespond=!1,this.items=null!=e?e:[],this.errorHandler=void 0,this.onTaskStartedHandlers=[],this.onTaskFinishedHandlers=[]}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}withTaskTimeout(e){return this.timeout=e,this}static withTaskTimeout(e){return(new this).withTaskTimeout(e)}for(e){return"number"==typeof this.timeout?new i(e).withConcurrency(this.concurrency).withTaskTimeout(this.timeout):new i(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}onTaskStarted(e){return this.onTaskStartedHandlers.push(e),this}onTaskFinished(e){return this.onTaskFinishedHandlers.push(e),this}useCorrespondingResults(){return this.shouldResultsCorrespond=!0,this}async process(e){return(new n.PromisePoolExecutor).useConcurrency(this.concurrency).useCorrespondingResults(this.shouldResultsCorrespond).withTaskTimeout(this.timeout).withHandler(e).handleError(this.errorHandler).onTaskStarted(this.onTaskStartedHandlers).onTaskFinished(this.onTaskFinishedHandlers).for(this.items).start()}}t.PromisePool=i,i.notRun=Symbol("notRun"),i.failed=Symbol("failed")},6784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9446:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopThePromisePoolError=void 0;class r extends Error{}t.StopThePromisePoolError=r},4204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=void 0;class r extends Error{constructor(e){super(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e){return new this(e)}}t.ValidationError=r},3747:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(o,a),time:r(u,c),"date-time":r((function(e){const t=e.split(l);return 2===t.length&&o(t[0])&&u(t[1],!0)}),f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return d.test(e)&&p.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=v&&e>=y}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:m},double:{type:"number",validate:m},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],o=+t[2],a=+t[3];return o>=1&&o<=12&&a>=1&&a<=(2===o&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:i[o])}function a(e,t){if(e&&t)return e>t?1:e<t?-1:0}const s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(e,t){const r=s.exec(e);if(!r)return!1;const n=+r[1],i=+r[2],o=+r[3],a=r[5];return(n<=23&&i<=59&&o<=59||23===n&&59===i&&60===o)&&(!t||""!==a)}function c(e,t){if(!e||!t)return;const r=s.exec(e),n=s.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const l=/t|\s/i;function f(e,t){if(!e||!t)return;const[r,n]=e.split(l),[i,o]=t.split(l),s=a(r,i);return void 0!==s?s||c(n,o):void 0}const d=/\/|:/,p=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,y=-(2**31),v=2**31-1;function m(){return!0}const b=/[^\\]\\Z/},8414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3747),i=r(9262),o=r(5669),a=new o.Name("fullFormats"),s=new o.Name("fastFormats"),u=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;const[r,o]="fast"===t.mode?[n.fastFormats,s]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,r,o),t.keywords&&i.default(e),e};function c(e,t,r,n){var i,a;null!==(i=(a=e.opts.code).formats)&&void 0!==i||(a.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}u.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},9262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(6236),i=r(5669),o=i.operators,a={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:e,schemaCode:t})=>i.str`should be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${a[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:s,code(e){const{gen:t,data:r,schemaCode:o,keyword:s,it:u}=e,{opts:c,self:l}=u;if(!c.validateFormats)return;const f=new n.KeywordCxt(u,l.RULES.all.format.definition,"format");function d(e){return i._`${e}.compare(${r}, ${o}) ${a[s].fail} 0`}f.$data?function(){const r=t.scopeValue("formats",{ref:l.formats,code:c.code.formats}),n=t.const("fmt",i._`${r}[${f.schemaCode}]`);e.fail$data(i.or(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,d(n)))}():function(){const r=f.schema,n=l.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${s}": format "${r}" does not define "compare" function`);const o=t.scopeValue("formats",{key:r,ref:n,code:c.code.formats?i._`${c.code.formats}${i.getProperty(r)}`:void 0});e.fail$data(d(o))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(8355),i=r(5671),o=r(2),a=r(1512),s=["/properties"],u="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var f=r(5669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var d=r(6448);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=r(1578);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},6545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)u(r,t[n]),r.push(e[++n]);return new i(r)}t._Code=i,t.nil=new i(""),t._=o;const a=new i("+");function s(e,...t){const r=[l(e[0])];let n=0;for(;n<t.length;)r.push(a),u(r,t[n]),r.push(a,l(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new i(r)}function u(e,t){var r;t instanceof i?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:l(Array.isArray(r)?r.join(","):r))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=s,t.addCodeArg=u,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},t.stringify=function(e){return new i(l(e))},t.safeStringify=l,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},5669:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(6545),i=r(9187);var o=r(6545);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var a=r(9187);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class u extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=k(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=k(this.rhs,e,t),this}get names(){return x(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class y extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(M(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class v extends y{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends y{}class b extends v{}b.kind="else";class g extends v{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(N(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){const e=super.names;return x(e,this.condition),this.else&&A(e,this.else.names),e}}g.kind="if";class _ extends v{}_.kind="for";class O extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class w extends _{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=x(super.names,this.from);return x(e,this.to)}}class S extends _{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class E extends v{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class I extends y{render(e){return"return "+super.render(e)}}I.kind="return";class P extends v{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class T extends v{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}T.kind="catch";class j extends v{render(e){return"finally"+super.render(e)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function x(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function k(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function M(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${F(e)}`}j.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new u(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(g,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new O(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const a=this._scope.toName(e);return this._for(new w(o,a,t,r),(()=>n(a)))}forOf(e,t,r,o=i.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(a,n._`${e}[${t}]`),r(a)}))}return this._for(new S("of",o,a,t),(()=>r(a)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new S("in",o,a,t),(()=>r(a)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new I;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(I)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new P;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new T(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(T,j)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new E(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=N;const D=C(t.operators.AND);t.and=function(...e){return e.reduce(D)};const R=C(t.operators.OR);function C(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${F(t)} ${e} ${F(r)}`}function F(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},9187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(6545);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class s extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=s;const u=n._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:n.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[i];if(a){const e=a.get(o);if(e)return e}else a=this._values[i]=new Map;a.set(o,n);const s=this._scope[i]||(this._scope[i]=[]),u=s.length;return s[u]=t.ref,n.setValue(t,{property:i,itemIndex:u}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},s){let u=n.nil;for(const c in e){const l=e[c];if(!l)continue;const f=a[c]=a[c]||new Map;l.forEach((e=>{if(f.has(e))return;f.set(e,o.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;u=n._`${u}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(e)))throw new i(e);u=n._`${u}${a}${this.opts._n}`}f.set(e,o.Completed)}))}return u}}},6930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(5669),i=r(8936),o=r(5247);function a(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function s(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:u}=e,{gen:l,compositeRule:f,allErrors:d}=u,p=c(e,r,i);(null!=o?o:f||d)?a(l,p):s(u,n._`[${p}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:u,compositeRule:l,allErrors:f}=i;a(u,c(e,r,n)),l||f||s(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const u=e.name("err");e.forRange("i",a,o.default.errors,(a=>{e.const(u,n._`${o.default.vErrors}[${a}]`),e.if(n._`${u}.instancePath === undefined`,(()=>e.assign(n._`${u}.instancePath`,(0,n.strConcat)(o.default.instancePath,s.errorPath)))),e.assign(n._`${u}.schemaPath`,n.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(n._`${u}.schema`,r),e.assign(n._`${u}.data`,i))}))};const u={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:a}=e,s=[l(a,r),f(e,r)];return function(e,{params:t,message:r},i){const{keyword:a,data:s,schemaValue:c,it:l}=e,{opts:f,propertyName:d,topSchemaRef:p,schemaPath:h}=l;i.push([u.keyword,a],[u.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&i.push([u.message,"function"==typeof r?r(e):r]),f.verbose&&i.push([u.schema,c],[u.parentSchema,n._`${p}${h}`],[o.default.data,s]),d&&i.push([u.propertyName,d])}(e,t,s),i.object(...s)}(e,t,r)}function l({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let a=o?t:n.str`${t}/${e}`;return r&&(a=n.str`${a}${(0,i.getErrorPath)(r,i.Type.Str)}`),[u.schemaPath,a]}},7382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(5669),i=r(6448),o=r(5247),a=r(6696),s=r(8936),u=r(1686);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,a.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function l(e){const t=d.call(this,e);if(t)return t;const r=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:l}=this.opts,f=new n.CodeGen(this.scope,{es5:s,lines:c,ownProperties:l});let p;e.$async&&(p=f.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=f.scopeName("validate");e.validateName=h;const y={gen:f,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(e),(0,u.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);const t=f.toString();v=`${f.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(v=this.opts.code.process(v,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,v)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,v&&this.logger.error("Error compiling schema, function code:",v),t}finally{this._compilations.delete(e)}}function f(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function d(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,a._getFullPath)(this.opts.uriResolver,r);let i=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return v.call(this,r,e);const o=(0,a.normalizeId)(n),s=this.refs[o]||this.schemas[o];if("string"==typeof s){const t=h.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return v.call(this,r,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||l.call(this,s),o===(0,a.normalizeId)(t)){const{schema:t}=s,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,a.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return v.call(this,r,s)}}t.SchemaEnv=c,t.compileSchema=l,t.resolveRef=function(e,t,r){var n;r=(0,a.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=p.call(this,e,r);if(void 0===o){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:a}=this.opts;i&&(o=new c({schema:i,schemaId:a,root:e,baseId:t}))}return void 0!==o?e.refs[r]=f.call(this,o):void 0},t.getCompilingSchema=d,t.resolveSchema=h;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,s.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(n)&&i&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,i))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,s.schemaHasRulesButRef)(r,this.RULES)){const e=(0,a.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=h.call(this,n,e)}const{schemaId:u}=this.opts;return o=o||new c({schema:r,schemaId:u,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},5247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},1578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6696);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},6696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(8936),i=r(6471),o=r(8682),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&c(e)<=t)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(s.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(u))return!0;if("object"==typeof r&&u(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!a.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function l(e,t="",r){!1!==r&&(t=p(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=f;const d=/#\/?$/;function p(e){return e?e.replace(d,""):""}t.normalizeId=p,t.resolveUrl=function(e,t,r){return r=p(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,a=p(e[r]||t),s={"":a},u=l(n,a,!1),c={},f=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=u+t;let a=s[i];function l(t){const r=this.opts.uriResolver.resolve;if(t=p(a?r(a,t):t),f.has(t))throw y(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?d(e,n.schema,t):t!==p(o)&&("#"===t[0]?(d(e,c[t],t),c[t]=e):this.refs[t]=o),t}function v(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[r]&&(a=l.call(this,e[r])),v.call(this,e.$anchor),v.call(this,e.$dynamicAnchor),s[t]=a})),c;function d(e,t,r){if(void 0!==t&&!i(e,t))throw y(r)}function y(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},2881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},8936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(5669),i=r(6545);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||h(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,a,s,u)=>{const c=void 0===s?a:s instanceof n.Name?(a instanceof n.Name?e(o,a,s):t(o,a,s),s):a instanceof n.Name?(t(o,s,a),a):r(a,s);return u!==n.Name||c instanceof n.Name?c:i(o,c)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&f(e,r,t),r}function f(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return u(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=u,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),f(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=f;const d={};var p;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===p.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+s(e)},t.checkStrictMode=h},9073:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},2171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(6930),i=r(5669),o=r(5247),a={message:"boolean schema is false"};function s(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),s(e)):r.var(t,!0)}},7332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(2881),i=r(9073),o=r(6930),a=r(5669),s=r(8936);var u;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(u=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,s=function(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=d(t,n,o.strictNumbers,u.Wrong);r.if(i,(()=>{s.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,s=n.let("dataType",a._`typeof ${i}`),u=n.let("coerced",a._`undefined`);"array"===o.coerceTypes&&n.if(a._`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,a._`${i}[0]`).assign(s,a._`typeof ${i}`).if(d(t,i,o.strictNumbers),(()=>n.assign(u,i))))),n.if(a._`${u} !== undefined`);for(const e of r)(l.has(e)||"array"===e&&"array"===o.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(u,a._`"" + ${i}`).elseIf(a._`${i} === null`).assign(u,a._`""`);case"number":return void n.elseIf(a._`${s} == "boolean" || ${i} === null
|
|
3
|
-
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(u,a._`+${i}`);case"integer":return void n.elseIf(a._`${s} === "boolean" || ${i} === null
|
|
4
|
-
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,a._`+${i}`);case"boolean":return void n.elseIf(a._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf(a._`${i} === "true" || ${i} === 1`).assign(u,!0);case"null":return n.elseIf(a._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(u,null);case"array":n.elseIf(a._`${s} === "string" || ${s} === "number"
|
|
5
|
-
|| ${s} === "boolean" || ${i} === null`).assign(u,a._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${u} !== undefined`,(()=>{n.assign(i,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,u)}))}(e,t,s):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?a.operators.EQ:a.operators.NEQ;let o;switch(e){case"null":return a._`${t} ${i} null`;case"array":o=a._`Array.isArray(${t})`;break;case"object":o=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return a._`typeof ${t} ${i} ${e}`}return n===u.Correct?o:(0,a.not)(o);function s(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function d(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let i;const o=(0,s.toHash)(e);if(o.array&&o.object){const e=a._`typeof ${t} != "object"`;i=o.null?e:a._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=a.nil;o.number&&delete o.integer;for(const e in o)i=(0,a.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=d;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,s.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,p)}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:a,data:s,opts:u}=e;if(void 0===r)return;const c=n._`${s}${(0,n.getProperty)(t)}`;if(a)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),a=r(7332),s=r(1481),u=r(5782),c=r(8878),l=r(5669),f=r(5247),d=r(6696),p=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,p.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return w(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);w(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function O({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 w(e,t,r,n){const{gen:i,schema:s,data:u,allErrors:c,opts:d,self:h}=e,{RULES:y}=h;function v(p){(0,o.shouldUseGroup)(s,p)&&(p.type?(i.if((0,a.checkDataType)(p.type,u,d.strictNumbers)),S(e,p),1===t.length&&t[0]===p.type&&r&&(i.else(),(0,a.reportTypeError)(e)),i.endIf()):S(e,p),c||i.if(l._`${f.default.errors} === ${n||0}`))}!s.$ref||!d.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(s,y)?(d.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((()=>T(e,"$ref",y.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,s.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&T(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,p.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&&O(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.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 P{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,p.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",x(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,a.checkDataTypes)(e,t,i.opts.strictNumbers,a.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&&O(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.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=p.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.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 T(e,t,r,n){const i=new P(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=P;const j=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!j.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{const a=A.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(i=a[2],"#"===i){if(s>=t)throw new Error(u("property/index",s));return n[t-s]}if(s>t)throw new Error(u("data",s));if(o=r[t-s],!i)return o}let a=o;const s=i.split("/");for(const e of s)e&&(o=l._`${o}${(0,l.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=l._`${a} && ${o}`);return a;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=x},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),a=r(6930);function s(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:a,it:s}=e,c=t.macro.call(s.self,o,a,s),l=u(r,i,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.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:d,$data:p,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const y=!p&&t.compile?t.compile.call(h.self,f,d,h):t.validate,v=u(c,l,y),m=c.let("valid");function b(r=(t.async?n._`await `:n.nil)){const a=h.opts.passContext?i.default.this:i.default.self,s=!("compile"in t&&!p||!1===t.schema);c.assign(m,n._`${r}${(0,o.callValidateCode)(e,v,a,s)}`,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&&s(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&&s(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,a.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 a=i.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${a.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:a,errSchemaPath:s,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===a||void 0===s||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:a,topSchemaRef:u,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:a,dataTypes:s,propertyName:u}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:a,dataPathArr:s,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${a}${(0,i.getErrorPath)(r,o,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,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!==a&&(l(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==u&&(e.propertyName=u)),s&&(e.dataTypes=s)},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),a=r(1578),s=r(2881),u=r(7382),c=r(5669),l=r(6696),f=r(7332),d=r(8936),p=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,a,s,u,c,l,f,d,p,v,m,b,g,_,O,w,S,E,I,P,T;const j=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,x=!0===A||void 0===A?1:A||0,k=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===(a=null!==(o=e.strictSchema)&&void 0!==o?o:j)||void 0===a||a,strictNumbers:null===(u=null!==(s=e.strictNumbers)&&void 0!==s?s:j)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:j)&&void 0!==l?l:"log",strictTuples:null!==(d=null!==(f=e.strictTuples)&&void 0!==f?f:j)&&void 0!==d?d:"log",strictRequired:null!==(v=null!==(p=e.strictRequired)&&void 0!==p?p:j)&&void 0!==v&&v,code:e.code?{...e.code,optimize:x,regExp:k}:{optimize:x,regExp:k},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===(O=e.inlineRefs)||void 0===O||O,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$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===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(T=e.int32range)||void 0===T||T,uriResolver:M}}class O{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 j;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,s.getRules)(),w.call(this,b,e,"NOT SUPPORTED"),w.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=T.call(this),e.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.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=p;"id"===r&&(n={...p},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 a.default))throw t;return s.call(this,t),await u.call(this,t.missingSchema),o.call(this,e)}}function s({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(x.call(this,r,t),!t)return(0,d.eachItem)(r,(e=>k.call(this,e))),this;N.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===n.type.length?e=>k.call(this,e,n):e=>n.type.forEach((t=>k.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:a}=this.opts;if("object"==typeof e)o=e[a];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 s=this._cache.get(e);if(void 0!==s)return s;r=(0,l.normalizeId)(o||r);const c=l.getSchemaRefs.call(this,e,r);return s=new u.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:c}),this._cache.set(s.schema,s),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_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 w(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 P(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 T(){const e={...this.opts};for(const t of v)delete e[t];return e}t.default=O,O.ValidationError=o.default,O.MissingRefError=a.default;const j={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function x(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.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 k(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 a=i?o.post:o.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?M.call(this,a,s,t.before):a.rules.push(s),o.all[e]=s,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 N(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)?a(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:o,data:a,keyword:s,it:u}=e;u.items=!0;const c=r.const("len",n._`${a}.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:s,dataProp:t,dataPropType:i.Type.Num},o),u.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=a,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),a=r(8936),s={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:s,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:d}=l;if(l.props=!0,"all"!==d.removeAdditional&&(0,a.alwaysValidSchema)(l,r))return;const p=(0,n.allSchemaProperties)(s.properties),h=(0,n.allSchemaProperties)(s.patternProperties);function y(e){t.code(i._`delete ${u}[${e}]`)}function v(n){if("all"===d.removeAdditional||d.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,a.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===d.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:a.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",u,(r=>{p.length||h.length?t.if(function(r){let o;if(p.length>8){const e=(0,a.schemaRefOrVal)(l,s.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=p.length?(0,i.or)(...p.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=s},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 a=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(a)}))}};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:a,it:s}=e;let u,c;const{minContains:l,maxContains:f}=o;s.opts.next?(u=void 0===l?1:l,c=f):u=1;const d=t.const("len",n._`${a}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,i.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,i.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(s,r)){let t=n._`${d} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${d} <= ${c}`),void e.pass(t)}s.items=!0;const p=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(p,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(p,!1).break())),1===u?t.assign(p,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(p,!0))))}(r)))))}function y(r,n){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?y(p,(()=>t.if(p,(()=>t.break())))):0===u?(t.let(p,!0),void 0!==c&&t.if(n._`${a}.length > 0`,h)):(t.let(p,!1),h()),e.result(p,(()=>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
|
-
missingProperty: ${i},
|
|
7
|
-
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};const a={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);s(e,t),u(e,r)}};function s(e,t=e.schema){const{gen:r,data:i,it:a}=e;if(0===Object.keys(t).length)return;const s=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,a.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,s)})`),(0,o.reportMissingProp)(e,s),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(s,t[c])||(r.if((0,o.propertyInData)(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=s,t.validateSchemaDeps=u,t.default=a},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 s=a(o,"then"),u=a(o,"else");if(!s&&!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(),s&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else s?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 a(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),a=r(5151),s=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),d=r(8103),p=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[p.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,d.default];return e?t.push(i.default,a.default):t.push(n.default,o.default),t.push(s.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),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function s(e,t,r=e.schema){const{gen:o,parentSchema:a,data:s,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${u}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(a),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._`${s}.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=s,t.default=a},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),a=r(8891),s={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:s}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(s?(0,a.validateAdditionalItems)(e,s):e.ok((0,o.validateArray)(e)))}};t.default=s},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:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&o.discriminator)return;const s=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((r,o)=>{let s;(0,i.alwaysValidSchema)(a,r)?t.var(l,!0):s=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),s&&e.mergeEvaluated(s,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),a=r(8936),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),d=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||d.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const p=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in p)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",s,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=d.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:a.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)p&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=s},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),a=r(4943),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&a.default.code(new n.KeywordCxt(c,a.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 d=t.name("valid");for(const r of f)p(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(d);function p(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=s},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:a}=e;if((0,i.alwaysValidSchema)(a,r))return;const s=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,n.not)(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};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),a=r(8936);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${s(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=s,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:a,errorPath:s},it:u},c,l,f){const d=f?n._`${e}, ${t}, ${i}${a}`:t,p=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,s)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&p.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${d}, ${r.object(...p)}`;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,s=o(r,i);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:n._`${"new RegExp"===o.code?f:(0,a.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(s,!0),u((()=>t.break())),s;function u(a){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},s),t.if((0,n.not)(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const a=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(s,n._`${s} || ${u}`),e.mergeValidEvaluated(a,u)||t.if((0,n.not)(s))})))),e.result(s,(()=>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),a=r(5247),s=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:a,schemaEnv:u,validateName:c,opts:d,self:p}=i,{root:h}=u;if(("#"===r||"#/"===r)&&a===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=s.resolveRef.call(p,h,a,r);if(void 0===y)throw new n.default(i.opts.uriResolver,a,r);return y instanceof s.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===d.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),a=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},a);e.mergeEvaluated(s),e.ok(a)}(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:s,it:c}=e,{allErrors:l,schemaEnv:f,opts:d}=c,p=d.passContext?a.default.this:o.nil;function h(e){const t=o._`${e}.errors`;s.assign(a.default.vErrors,o._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,o._`${a.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(s,n.props,c.props));else{const t=s.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(s,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(s,n.items,c.items));else{const t=s.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(s,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(o._`await ${(0,i.callValidateCode)(e,t,p)}`),y(t),l||s.assign(r,!0)}),(e=>{s.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),l||s.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,p),(()=>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),a=r(8936),s={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:s,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=s.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),p=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 ${p} == "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,a.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 d=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),s(d,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 s(e,t){if(e.const)d(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)d(r,t)}}function d(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._`${p} === ${e}`),t.assign(d,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:p,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:p,tagName:f}))),e.ok(d)}};t.default=s},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),a=r(4480),s=r(2480),u=[n.default,i.default,(0,o.default)(),a.default,s.metadataVocabulary,s.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:a,schemaCode:s,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),a=r.const("fDef",n._`${o}[${s}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(u,n._`${a}.type || "string"`).assign(l,n._`${a}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,a))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${s} && !${l}`,function(){const e=f.$async?n._`(${a}.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=d.formats[a];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${l}"`}d.logger.warn(e())}();if(!0===o)return;const[s,u,p]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(a)}`:void 0,i=r.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);s===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 ${p}(${i})`}return"function"==typeof u?n._`${p}(${i})`:n._`${p}.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),a={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:a,schemaCode:s,schema:u}=e;a||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${s})`):e.fail(n._`${u} !== ${r}`)}};t.default=a},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),a={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:a,schema:s,schemaCode:u,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const l=s.length>=c.opts.loopEnum;let f;const d=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let p;if(l||a)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",u,(e=>t.if(n._`${d()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",u);p=(0,n.or)(...s.map(((t,i)=>function(e,t){const i=s[t];return"object"==typeof i&&null!==i?n._`${d()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(p)}};t.default=a},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),a=r(1216),s=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),d=r(9450),p=[n.default,i.default,o.default,a.default,s.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,d.default];t.default=p},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),a={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:a,it:s}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===s.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${a}`)}};t.default=a},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}},a={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}}`},s={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=s},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,a=o.opts.multipleOfPrecision,s=t.let("res"),u=a?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${i} === 0 || (${s} = ${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:a,it:s}=e,u=s.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${a}, ${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),a={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:a,data:s,$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,d);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,a,(()=>{t.assign(o,(0,n.propertyInData)(t,s,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 d(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,s,r,l.ownProperties),(()=>e.error()))}))}}};t.default=a},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),a=r(4285),s={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:s,code(e){const{gen:t,data:r,$data:s,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!s&&!u)return;const d=t.let("valid"),p=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,a){const s=t.name("item"),u=(0,n.checkDataTypes)(p,s,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(s,i._`${r}[${o}]`),t.if(u,i._`continue`),p.length>1&&t.if(i._`typeof ${s} == "string"`,i._`${s} += "_"`),t.if(i._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,i._`${c}[${s}]`),e.error(),t.assign(d,!1).break()})).code(i._`${c}[${s}] = ${o}`)}))}function y(n,s){const u=(0,o.useFunc)(t,a.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${s} = ${n}; ${s}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(d,!1).break(c)}))))))}e.block$data(d,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(d,!0),t.if(i._`${n} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(d)}};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,a,s,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var d in n(o,a,s,u,c,l,f),o){var p=o[d];if(Array.isArray(p)){if(d in t.arrayKeywords)for(var h=0;h<p.length;h++)r(e,n,i,p[h],a+"/"+d+"/"+h,s,a,d,o,h)}else if(d in t.propsKeywords){if(p&&"object"==typeof p)for(var y in p)r(e,n,i,p[y],a+"/"+d+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),s,a,d,o,y)}else(d in t.keywords||e.allKeys&&!(d in t.skipKeywords))&&r(e,n,i,p,a+"/"+d,s,a,d,o)}i(o,a,s,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}},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 a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,r){s.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 d(e,t,r,n,u,l,p,h){r=r||[],p=p||[];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,_,O=typeof e,w=typeof t,S="undefined"!==O||p&&p.length>0&&p[p.length-1].lhs&&Object.getOwnPropertyDescriptor(p[p.length-1].lhs,l),E="undefined"!==w||p&&p.length>0&&p[p.length-1].rhs&&Object.getOwnPropertyDescriptor(p[p.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new a(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"===O&&null!==e&&null!==t){for(m=p.length-1;m>-1;--m)if(p[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(p.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 s(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new s(y,b,new a(void 0,e[b--])));for(;m>=0;--m)d(e[m],t[m],r,n,y,m,p,h)}else{var I=Object.keys(e),P=Object.keys(t);for(m=0;m<I.length;++m)g=I[m],(_=P.indexOf(g))>=0?(d(e[g],t[g],r,n,y,g,p,h),P[_]=null):d(e[g],void 0,r,n,y,g,p,h);for(m=0;m<P.length;++m)(g=P[m])&&d(void 0,t[g],r,n,y,g,p,h)}p.length=p.length-1}}else e!==t&&("number"===O&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function p(e,t,r,n,i){var o=[];if(d(e,t,o,n,null,null,null,i),r)for(var a=0;a<o.length;++a)r(o[a]);return o}function h(e,t,r,n){var i=p(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,a=n.path?n.path.length-1:0;++o<a;)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(a,n),r(s,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=p(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:p,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,a){return d(e,t,r,n,i,o,a,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&p(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 a=o[i];if(!e(t[a],r[a]))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",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,d=NaN,p=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]",O="[object GeneratorFunction]",w="[object Map]",S="[object Number]",E="[object Object]",I="[object Promise]",P="[object RegExp]",T="[object Set]",j="[object String]",A="[object Symbol]",x="[object WeakMap]",k="[object ArrayBuffer]",M="[object DataView]",N="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",F="[object Int32Array]",$="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",V="[object Uint32Array]",U=/\b__p \+= '';/g,Q=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,Y=RegExp(B.source),K=RegExp(W.source),H=/<%-([\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?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,pe=/^[-+]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,Oe="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Te="\\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",je="["+Oe+"]",Ae="["+Te+"]",xe="["+we+"]",ke="\\d+",Me="["+Se+"]",Ne="["+Ee+"]",De="[^"+Oe+Te+ke+Se+Ee+Ie+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+Oe+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ie+"]",Le="\\u200d",Ve="(?:"+Ne+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Qe="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Be="(?:"+xe+"|"+Re+")?",We="["+Pe+"]?",Ye=We+Be+"(?:"+Le+"(?:"+[Ce,Fe,$e].join("|")+")"+We+Be+")*",Ke="(?:"+[Me,Fe,$e].join("|")+")"+Ye,He="(?:"+[Ce+xe+"?",xe,Fe,$e,je].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(xe,"g"),Ze=RegExp(Re+"(?="+Re+")|"+He+Ye,"g"),Xe=RegExp([qe+"?"+Ne+"+"+Qe+"(?="+[Ae,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[Ae,qe+Ve,"$"].join("|")+")",qe+"?"+Ve+"+"+Qe,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,Ke].join("|"),"g"),et=RegExp("["+Le+Oe+we+Pe+"]"),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[N]=it[D]=it[R]=it[C]=it[F]=it[$]=it[q]=it[L]=it[V]=!0,it[y]=it[v]=it[k]=it[m]=it[M]=it[b]=it[g]=it[_]=it[w]=it[S]=it[E]=it[P]=it[T]=it[j]=it[x]=!1;var ot={};ot[y]=ot[v]=ot[k]=ot[M]=ot[m]=ot[b]=ot[N]=ot[D]=ot[R]=ot[C]=ot[F]=ot[w]=ot[S]=ot[E]=ot[P]=ot[T]=ot[j]=ot[A]=ot[$]=ot[q]=ot[L]=ot[V]=!0,ot[g]=ot[_]=ot[x]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=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")(),dt=t&&!t.nodeType&&t,pt=dt&&e&&!e.nodeType&&e,ht=pt&&pt.exports===dt,yt=ht&&ct.process,vt=function(){try{return pt&&pt.require&&pt.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,Ot=vt&&vt.isSet,wt=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 a=e[i];t(n,a,r(a),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 Pt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Tt(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 jt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function At(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function xt(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 kt(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 Nt(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=Qt("length");function Ft(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function $t(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):$t(e,Vt,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 Vt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Wt(e,t)/r:d}function Qt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Bt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Wt(e,t){for(var r,n=-1,o=e.length;++n<o;){var a=t(e[n]);a!==i&&(r=r===i?a:r+a)}return r}function Yt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Kt(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Ht(e){return function(t){return e(t)}}function Gt(e,t){return kt(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"\\"+at[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 ar(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==s||(e[r]=s,o[i++]=r)}return o}function sr(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 dr=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pr=function e(t){var r,n=(t=null==t?ft:pr.defaults(ft.Object(),t,pr.pick(ft,rt))).Array,ie=t.Date,Oe=t.Error,we=t.Function,Se=t.Math,Ee=t.Object,Ie=t.RegExp,Pe=t.String,Te=t.TypeError,je=n.prototype,Ae=we.prototype,xe=Ee.prototype,ke=t["__core-js_shared__"],Me=Ae.toString,Ne=xe.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=xe.toString,Fe=Me.call(Ee),$e=ft._,qe=Ie("^"+Me.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Ve=t.Symbol,Ue=t.Uint8Array,Qe=Le?Le.allocUnsafe:i,ze=or(Ee.getPrototypeOf,Ee),Be=Ee.create,We=xe.propertyIsEnumerable,Ye=je.splice,Ke=Ve?Ve.isConcatSpreadable:i,He=Ve?Ve.iterator:i,Ze=Ve?Ve.toStringTag:i,et=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,dt=Se.ceil,pt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=je.join,hr=or(Ee.keys,Ee),yr=Se.max,vr=Se.min,mr=ie.now,br=t.parseInt,gr=Se.random,_r=je.reverse,Or=uo(t,"DataView"),wr=uo(t,"Map"),Sr=uo(t,"Promise"),Er=uo(t,"Set"),Ir=uo(t,"WeakMap"),Pr=uo(Ee,"create"),Tr=Ir&&new Ir,jr={},Ar=Fo(Or),xr=Fo(wr),kr=Fo(Sr),Mr=Fo(Er),Nr=Fo(Ir),Dr=Ve?Ve.prototype:i,Rr=Dr?Dr.valueOf:i,Cr=Dr?Dr.toString:i;function Fr(e){if(es(e)&&!Qa(e)&&!(e instanceof Vr)){if(e instanceof Lr)return e;if(Ne.call(e,"__wrapped__"))return $o(e)}return new Lr(e)}var $r=function(){function e(){}return function(t){if(!Xa(t))return{};if(Be)return Be(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 Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,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 Qr(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 Br(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function Wr(e){var t=this.__data__=new Qr(e);this.size=t.size}function Yr(e,t){var r=Qa(e),n=!r&&Ua(e),i=!r&&!n&&Ya(e),o=!r&&!n&&!i&&us(e),a=r||n||i||o,s=a?Yt(e.length,Pe):[],u=s.length;for(var c in e)!t&&!Ne.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||s.push(c);return s}function Kr(e){var t=e.length;return t?e[Bn(0,t-1)]:i}function Hr(e,t){return Mo(Pi(e),on(t,0,e.length))}function Gr(e){return Mo(Pi(e))}function Jr(e,t,r){(r!==i&&!qa(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];Ne.call(e,t)&&qa(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Xr(e,t){for(var r=e.length;r--;)if(qa(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&&Ti(t,xs(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,a=n(o),s=null==e;++r<o;)a[r]=s?i:Is(e,t[r]);return a}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function an(e,t,r,n,o,a){var s,u=1&t,c=2&t,l=4&t;if(r&&(s=o?r(e,n,o,a):r(e)),s!==i)return s;if(!Xa(e))return e;var f=Qa(e);if(f){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Pi(e,s)}else{var d=fo(e),p=d==_||d==O;if(Ya(e))return _i(e,u);if(d==E||d==y||p&&!o){if(s=c||p?{}:ho(e),!u)return c?function(e,t){return Ti(e,lo(e),t)}(e,function(e,t){return e&&Ti(t,ks(t),e)}(s,e)):function(e,t){return Ti(e,co(e),t)}(e,tn(s,e))}else{if(!ot[d])return o?e:{};s=function(e,t,r){var n,i=e.constructor;switch(t){case k:return Oi(e);case m:case b:return new i(+e);case M:return function(e,t){var r=t?Oi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case N:case D:case R:case C:case F:case $:case q:case L:case V:return wi(e,r);case w:return new i;case S:case j:return new i(e);case P:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case A:return n=e,Rr?Ee(Rr.call(n)):{}}}(e,d,u)}}a||(a=new Wr);var h=a.get(e);if(h)return h;a.set(e,s),os(e)?e.forEach((function(n){s.add(an(n,t,r,n,e,a))})):ts(e)&&e.forEach((function(n,i){s.set(i,an(n,t,r,i,e,a))}));var v=f?i:(l?c?to:eo:c?ks:xs)(e);return It(v||e,(function(n,i){v&&(n=e[i=n]),Zr(s,i,an(n,t,r,i,e,a))})),s}function sn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new Te(o);return jo((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=At,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;r&&(t=kt(t,Ht(r))),n?(o=xt,a=!1):t.length>=200&&(o=Jt,a=!1,t=new Br(t));e:for(;++i<s;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,a&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}Fr.templateSettings={escape:H,evaluate:G,interpolate:J,variable:"",imports:{_:Fr}},Fr.prototype=qr.prototype,Fr.prototype.constructor=Fr,Lr.prototype=$r(qr.prototype),Lr.prototype.constructor=Lr,Vr.prototype=$r(qr.prototype),Vr.prototype.constructor=Vr,Ur.prototype.clear=function(){this.__data__=Pr?Pr(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(Pr){var r=t[e];return r===a?i:r}return Ne.call(t,e)?t[e]:i},Ur.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==i:Ne.call(t,e)},Ur.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===i?a:t,this},Qr.prototype.clear=function(){this.__data__=[],this.size=0},Qr.prototype.delete=function(e){var t=this.__data__,r=Xr(t,e);return!(r<0||(r==t.length-1?t.pop():Ye.call(t,r,1),--this.size,0))},Qr.prototype.get=function(e){var t=this.__data__,r=Xr(t,e);return r<0?i:t[r][1]},Qr.prototype.has=function(e){return Xr(this.__data__,e)>-1},Qr.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(wr||Qr),string:new Ur}},zr.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return ao(this,e).get(e)},zr.prototype.has=function(e){return ao(this,e).has(e)},zr.prototype.set=function(e,t){var r=ao(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Br.prototype.add=Br.prototype.push=function(e){return this.__data__.set(e,a),this},Br.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.clear=function(){this.__data__=new Qr,this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Wr.prototype.get=function(e){return this.__data__.get(e)},Wr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Qr){var n=r.__data__;if(!wr||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=xi(bn),fn=xi(gn,!0);function dn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function pn(e,t,r){for(var n=-1,o=e.length;++n<o;){var a=e[n],s=t(a);if(null!=s&&(u===i?s==s&&!ss(s):r(s,u)))var u=s,c=a}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,a=e.length;for(r||(r=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?yn(s,t-1,r,n,i):Mt(i,s):n||(i[i.length]=s)}return i}var vn=ki(),mn=ki(!0);function bn(e,t){return e&&vn(e,t,xs)}function gn(e,t){return e&&mn(e,t,xs)}function _n(e,t){return jt(t,(function(t){return Ga(e[t])}))}function On(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 wn(e,t,r){var n=t(e);return Qa(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=Ne.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&&Ne.call(e,t)}function Pn(e,t){return null!=e&&t in Ee(e)}function Tn(e,t,r){for(var o=r?xt:At,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=kt(d,Ht(t))),l=vr(d.length,l),c[u]=!r&&(t||a>=120&&d.length>=120)?new Br(u&&d):i}d=e[0];var p=-1,h=c[0];e:for(;++p<a&&f.length<l;){var y=d[p],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=s;--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 jn(e,t,r){var n=null==(e=Io(e,t=vi(t,e)))?e:e[Co(Ho(t))];return null==n?i:St(n,e,r)}function An(e){return es(e)&&Sn(e)==y}function xn(e,t,r,n,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,n,o,a){var s=Qa(e),u=Qa(t),c=s?v:fo(e),l=u?v:fo(t),f=(c=c==y?E:c)==E,d=(l=l==y?E:l)==E,p=c==l;if(p&&Ya(e)){if(!Ya(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Wr),s||us(e)?Zi(e,t,r,n,o,a):function(e,t,r,n,i,o,a){switch(r){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return qa(+e,+t);case g:return e.name==t.name&&e.message==t.message;case P:case j:return e==t+"";case w:var s=ir;case T:var u=1&n;if(s||(s=sr),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=Zi(s(e),s(t),n,i,o,a);return a.delete(e),l;case A:if(Rr)return Rr.call(e)==Rr.call(t)}return!1}(e,t,c,r,n,o,a);if(!(1&r)){var h=f&&Ne.call(e,"__wrapped__"),_=d&&Ne.call(t,"__wrapped__");if(h||_){var O=h?e.value():e,I=_?t.value():t;return a||(a=new Wr),o(O,I,r,n,a)}}return!!p&&(a||(a=new Wr),function(e,t,r,n,o,a){var s=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Ne.call(t,f)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var y=s;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=s?n(m,v,f,t,e,a):n(v,m,f,e,t,a);if(!(b===i?v===m||o(v,m,r,n,a):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 a.delete(e),a.delete(t),h}(e,t,r,n,o,a))}(e,t,r,n,xn,o))}function kn(e,t,r,n){var o=r.length,a=o,s=!n;if(null==e)return!a;for(e=Ee(e);o--;){var u=r[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=r[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var d=new Wr;if(n)var p=n(l,f,c,e,t,d);if(!(p===i?xn(f,l,3,n,d):p))return!1}}return!0}function Mn(e){return!(!Xa(e)||(t=e,Re&&Re in t))&&(Ga(e)?qe:ye).test(Fo(e));var t}function Nn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Qa(e)?$n(e[0],e[1]):Fn(e):fu(e)}function Dn(e){if(!Oo(e))return hr(e);var t=[];for(var r in Ee(e))Ne.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=Ba(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Fn(e){var t=so(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(r){return r===e||kn(r,e,t)}}function $n(e,t){return bo(e)&&wo(t)?So(Co(e),t):function(r){var n=Is(r,e);return n===i&&n===t?Ps(r,e):xn(t,n,3)}}function qn(e,t,r,n,o){e!==t&&vn(t,(function(a,s){if(o||(o=new Wr),Xa(a))!function(e,t,r,n,o,a,s){var u=Po(e,r),c=Po(t,r),l=s.get(c);if(l)Jr(e,r,l);else{var f=a?a(u,c,r+"",e,t,s):i,d=f===i;if(d){var p=Qa(c),h=!p&&Ya(c),y=!p&&!h&&us(c);f=c,p||h||y?Qa(u)?f=u:Wa(u)?f=Pi(u):h?(d=!1,f=_i(c,!0)):y?(d=!1,f=wi(c,!0)):f=[]:ns(c)||Ua(c)?(f=u,Ua(u)?f=vs(u):Xa(u)&&!Ga(u)||(f=ho(c))):d=!1}d&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),Jr(e,r,f)}}(e,t,s,r,qn,n,o);else{var u=n?n(Po(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Jr(e,s,u)}}),ks)}function Ln(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Vn(e,t,r){t=t.length?kt(t,(function(e){return Qa(e)?function(t){return On(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=kt(t,Ht(oo()));var i=Cn(e,(function(e,r,i){var o=kt(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,a=i.length,s=r.length;++n<a;){var u=Si(i[n],o[n]);if(u)return n>=s?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 a=t[n],s=On(e,a);r(s,a)&&Gn(o,vi(a,e),s)}return o}function Qn(e,t,r,n){var i=n?Lt:qt,o=-1,a=t.length,s=e;for(e===t&&(t=Pi(t)),r&&(s=kt(e,Ht(r)));++o<a;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(s,l,u,n))>-1;)s!==e&&Ye.call(s,u,1),Ye.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)?Ye.call(e,i,1):ui(e,i)}}return e}function Bn(e,t){return e+pt(gr()*(t-e+1))}function Wn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function Yn(e,t){return Ao(Eo(e,t,ru),e+"")}function Kn(e){return Kr(qs(e))}function Hn(e,t){var r=qs(e);return Mo(r,on(t,0,r.length))}function Gn(e,t,r,n){if(!Xa(e))return e;for(var o=-1,a=(t=vi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Co(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Xa(f)?f:vo(t[o+1])?[]:{})}Zr(u,c,l),u=u[c]}return e}var Jn=Tr?function(e,t){return Tr.set(e,t),e}:ru,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Xs(t),writable:!0})}:ru;function Xn(e){return Mo(qs(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 a=n(o);++i<o;)a[i]=e[i+t];return a}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,a=e[o];null!==a&&!ss(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,u=null===t,c=ss(t),l=t===i;o<a;){var f=pt((o+a)/2),d=r(e[f]),p=d!==i,h=null===d,y=d==d,v=ss(d);if(s)var m=n||y;else m=l?y&&(n||p):u?y&&p&&(n||!h):c?y&&p&&!h&&(n||!v):!h&&!v&&(n?d<=t:d<t);m?o=f+1:a=f}return vr(a,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!qa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function oi(e){return"number"==typeof e?e:ss(e)?d:+e}function ai(e){if("string"==typeof e)return e;if(Qa(e))return kt(e,ai)+"";if(ss(e))return Cr?Cr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function si(e,t,r){var n=-1,i=At,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=xt;else if(o>=200){var c=t?null:Wi(e);if(c)return sr(c);a=!1,i=Jt,u=new Br}else u=t?[]:s;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,a&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,r)||(u!==s&&u.push(f),s.push(l))}return s}function ui(e,t){return null==(e=Io(e,t=vi(t,e)))||delete e[Co(Ho(t))]}function ci(e,t,r,n){return Gn(e,t,r(On(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 Vr&&(r=r.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),r)}function di(e,t,r){var i=e.length;if(i<2)return i?si(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=cn(a[o]||s,e[u],t,r));return si(yn(a,1),t,r)}function pi(e,t,r){for(var n=-1,o=e.length,a=t.length,s={};++n<o;){var u=n<a?t[n]:i;r(s,e[n],u)}return s}function hi(e){return Wa(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function vi(e,t){return Qa(e)?e:bo(e,t)?[e]:Ro(ms(e))}var mi=Yn;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=at||function(e){return ft.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var r=e.length,n=Qe?Qe(r):new e.constructor(r);return e.copy(n),n}function Oi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function wi(e,t){var r=t?Oi(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,a=ss(e),s=t!==i,u=null===t,c=t==t,l=ss(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||n&&s&&c||!r&&c||!o)return 1;if(!n&&!a&&!l&&e<t||l&&r&&o&&!n&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=yr(a-s,0),f=n(c+l),d=!i;++u<c;)f[u]=t[u];for(;++o<s;)(d||o<a)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ii(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,f=yr(a-u,0),d=n(f+l),p=!i;++o<f;)d[o]=e[o];for(var h=o;++c<l;)d[h+c]=t[c];for(;++s<u;)(p||o<a)&&(d[h+r[s]]=e[o++]);return d}function Pi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ti(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var u=t[a],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 ji(e,t){return function(r,n){var i=Qa(r)?Et:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function Ai(e){return Yn((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,s=o>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&mo(r[0],r[1],s)&&(a=o<3?i:a,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,a)}return t}))}function xi(e,t){return function(r,n){if(null==r)return r;if(!Ba(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Ee(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function ki(e){return function(t,r,n){for(var i=-1,o=Ee(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=nr(t=ms(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 Ni(e){return function(t){return Nt(Gs(Us(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=$r(e.prototype),n=e.apply(r,t);return Xa(n)?n:r}}function Ri(e){return function(t,r,n){var o=Ee(t);if(!Ba(t)){var a=oo(r,3);t=xs(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,n);return s>-1?o[a?t[s]:s]:i}}function Ci(e){return Xi((function(t){var r=t.length,n=r,a=Lr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Te(o);if(a&&!u&&"wrapper"==no(s))var u=new Lr([],!0)}for(n=u?n:r;++n<r;){var c=no(s=t[n]),l="wrapper"==c?ro(s):i;u=l&&go(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==s.length&&go(s)?u[c]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Qa(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 Fi(e,t,r,o,a,s,u,l,f,d){var p=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),O=g;O--;)_[O]=arguments[O];if(v)var w=io(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,w);if(o&&(_=Ei(_,o,a,v)),s&&(_=Ii(_,s,u,v)),g-=S,v&&g<d){var E=ar(_,w);return zi(e,t,Fi,c.placeholder,r,_,E,l,f,d-g)}var I=h?r:this,P=y?I[e]:e;return g=_.length,l?_=function(e,t){for(var r=e.length,n=vr(t.length,r),o=Pi(e);n--;){var a=t[n];e[n]=vo(a,r)?o[a]:i}return e}(_,l):m&&g>1&&_.reverse(),p&&f<g&&(_.length=f),this&&this!==ft&&this instanceof c&&(P=b||Di(P)),P.apply(I,_)}}function $i(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=ai(r),n=ai(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Li(e){return Xi((function(t){return t=kt(t,Ht(oo())),Yn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Vi(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?Wn(t,e):t;var n=Wn(t,dt(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=ds(t),r===i?(r=t,t=0):r=ds(r),function(e,t,r,i){for(var o=-1,a=yr(dt((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:ds(o),e)}}function Qi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ys(t),r=ys(r)),e(t,r)}}function zi(e,t,r,n,o,a,s,c,l,f){var d=8&t;t|=d?u:64,4&(t&=~(d?64:u))||(t&=-4);var p=[e,t,o,d?a:i,d?s:i,d?i:a,d?i:s,c,l,f],h=r.apply(i,p);return go(e)&&To(h,p),h.placeholder=n,xo(h,e,t)}function Bi(e){var t=Se[e];return function(e,r){if(e=ys(e),(r=null==r?0:vr(ps(r),292))&&Ct(e)){var n=(ms(e)+"e").split("e");return+((n=(ms(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Wi=Er&&1/sr(new Er([,-0]))[1]==l?function(e){return new Er(e)}:su;function Yi(e){return function(t){var r=fo(t);return r==w?ir(t):r==T?ur(t):function(e,t){return kt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,a,l,f,d,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var y=a?a.length:0;if(y||(t&=-97,a=l=i),d=d===i?d:yr(ps(d),0),p=p===i?p:ps(p),y-=l?l.length:0,64&t){var v=a,m=l;a=l=i}var b=h?i:ro(e),g=[e,t,r,a,l,v,m,f,d,p];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)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?ar(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ii(l,u,t[6]):u,e[6]=l?ar(e[5],s):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],a=g[3],l=g[4],!(p=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 a(){for(var s=arguments.length,u=n(s),c=s,l=io(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:ar(u,l);return(s-=f.length)<r?zi(e,t,Fi,a.placeholder,i,u,f,i,i,r-s):St(this&&this!==ft&&this instanceof a?o:e,this,u)}}(e,t,p):t!=u&&33!=t||l.length?Fi.apply(i,g):function(e,t,r,i){var o=1&t,a=Di(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),d=this&&this!==ft&&this instanceof t?a:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return St(d,o?r:this,f)}}(e,t,r,a);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 xo((b?Jn:To)(_,g),e,t)}function Hi(e,t,r,n){return e===i||qa(e,xe[r])&&!Ne.call(n,r)?t:e}function Gi(e,t,r,n,o,a){return Xa(e)&&Xa(t)&&(a.set(t,e),qn(e,t,i,Gi,a),a.delete(t)),e}function Ji(e){return ns(e)?i:e}function Zi(e,t,r,n,o,a){var s=1&r,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,h=2&r?new Br:i;for(a.set(e,t),a.set(t,e);++d<u;){var y=e[d],v=t[d];if(n)var m=s?n(v,y,d,t,e,a):n(y,v,d,e,t,a);if(m!==i){if(m)continue;p=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,a)))return h.push(t)}))){p=!1;break}}else if(y!==v&&!o(y,v,r,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function Xi(e){return Ao(Eo(e,i,zo),e+"")}function eo(e){return wn(e,xs,co)}function to(e){return wn(e,ks,lo)}var ro=Tr?function(e){return Tr.get(e)}:su;function no(e){for(var t=e.name+"",r=jr[t],n=Ne.call(jr,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(Ne.call(Fr,"placeholder")?Fr:e).placeholder}function oo(){var e=Fr.iteratee||nu;return e=e===nu?Nn:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(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 so(e){for(var t=xs(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,wo(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),jt(yt(e),(function(t){return We.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 a=Co(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Za(i)&&vo(a,i)&&(Qa(e)||Ua(e))}function ho(e){return"function"!=typeof e.constructor||Oo(e)?{}:$r(ze(e))}function yo(e){return Qa(e)||Ua(e)||!!(Ke&&e&&e[Ke])}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(!Xa(r))return!1;var n=typeof t;return!!("number"==n?Ba(r)&&vo(t,r.length):"string"==n&&t in r)&&qa(r[t],e)}function bo(e,t){if(Qa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ss(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function go(e){var t=no(e),r=Fr[t];if("function"!=typeof r||!(t in Vr.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(Or&&fo(new Or(new ArrayBuffer(1)))!=M||wr&&fo(new wr)!=w||Sr&&fo(Sr.resolve())!=I||Er&&fo(new Er)!=T||Ir&&fo(new Ir)!=x)&&(fo=function(e){var t=Sn(e),r=t==E?e.constructor:i,n=r?Fo(r):"";if(n)switch(n){case Ar:return M;case xr:return w;case kr:return I;case Mr:return T;case Nr:return x}return t});var _o=ke?Ga:yu;function Oo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function wo(e){return e==e&&!Xa(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,a=yr(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),St(e,this,u)}}function Io(e,t){return t.length<2?e:On(e,ei(t,0,-1))}function Po(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=ko(Jn),jo=lt||function(e,t){return ft.setTimeout(e,t)},Ao=ko(Zn);function xo(e,t,r){var n=t+"";return Ao(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]&&!At(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),r)))}function ko(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 a=Bn(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var No,Do,Ro=(No=Na((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=No.cache,No);function Co(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function $o(e){if(e instanceof Vr)return e.clone();var t=new Lr(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var qo=Yn((function(e,t){return Wa(e)?cn(e,yn(t,1,Wa,!0)):[]})),Lo=Yn((function(e,t){var r=Ho(t);return Wa(r)&&(r=i),Wa(e)?cn(e,yn(t,1,Wa,!0),oo(r,2)):[]})),Vo=Yn((function(e,t){var r=Ho(t);return Wa(r)&&(r=i),Wa(e)?cn(e,yn(t,1,Wa,!0),i,r):[]}));function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ps(r);return i<0&&(i=yr(n+i,0)),$t(e,oo(t,3),i)}function Qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ps(r),o=r<0?yr(n+o,0):vr(o,n-1)),$t(e,oo(t,3),o,!0)}function zo(e){return null!=e&&e.length?yn(e,1):[]}function Bo(e){return e&&e.length?e[0]:i}var Wo=Yn((function(e){var t=kt(e,hi);return t.length&&t[0]===e[0]?Tn(t):[]})),Yo=Yn((function(e){var t=Ho(e),r=kt(e,hi);return t===Ho(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Tn(r,oo(t,2)):[]})),Ko=Yn((function(e){var t=Ho(e),r=kt(e,hi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Tn(r,i,t):[]}));function Ho(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Go=Yn(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Qn(e,t):e}var Zo=Xi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return zn(e,kt(t,(function(e){return vo(e,r)?+e:e})).sort(Si)),n}));function Xo(e){return null==e?e:_r.call(e)}var ea=Yn((function(e){return si(yn(e,1,Wa,!0))})),ta=Yn((function(e){var t=Ho(e);return Wa(t)&&(t=i),si(yn(e,1,Wa,!0),oo(t,2))})),ra=Yn((function(e){var t=Ho(e);return t="function"==typeof t?t:i,si(yn(e,1,Wa,!0),i,t)}));function na(e){if(!e||!e.length)return[];var t=0;return e=jt(e,(function(e){if(Wa(e))return t=yr(e.length,t),!0})),Yt(t,(function(t){return kt(e,Qt(t))}))}function ia(e,t){if(!e||!e.length)return[];var r=na(e);return null==t?r:kt(r,(function(e){return St(t,i,e)}))}var oa=Yn((function(e,t){return Wa(e)?cn(e,t):[]})),aa=Yn((function(e){return di(jt(e,Wa))})),sa=Yn((function(e){var t=Ho(e);return Wa(t)&&(t=i),di(jt(e,Wa),oo(t,2))})),ua=Yn((function(e){var t=Ho(e);return t="function"==typeof t?t:i,di(jt(e,Wa),i,t)})),ca=Yn(na),la=Yn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ia(e,r)}));function fa(e){var t=Fr(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var pa=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 Vr&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:i}),new Lr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ha=ji((function(e,t,r){Ne.call(e,r)?++e[r]:rn(e,r,1)})),ya=Ri(Uo),va=Ri(Qo);function ma(e,t){return(Qa(e)?It:ln)(e,oo(t,3))}function ba(e,t){return(Qa(e)?Pt:fn)(e,oo(t,3))}var ga=ji((function(e,t,r){Ne.call(e,r)?e[r].push(t):rn(e,r,[t])})),_a=Yn((function(e,t,r){var i=-1,o="function"==typeof t,a=Ba(e)?n(e.length):[];return ln(e,(function(e){a[++i]=o?St(t,e,r):jn(e,t,r)})),a})),Oa=ji((function(e,t,r){rn(e,r,t)}));function wa(e,t){return(Qa(e)?kt:Cn)(e,oo(t,3))}var Sa=ji((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ea=Yn((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]]),Vn(e,yn(t,1),[])})),Ia=ct||function(){return ft.Date.now()};function Pa(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function Ta(e,t){var r;if("function"!=typeof t)throw new Te(o);return e=ps(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var ja=Yn((function(e,t,r){var n=1;if(r.length){var i=ar(r,io(ja));n|=u}return Ki(e,n,t,r,i)})),Aa=Yn((function(e,t,r){var n=3;if(r.length){var i=ar(r,io(Aa));n|=u}return Ki(t,n,e,r,i)}));function xa(e,t,r){var n,a,s,u,c,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function y(t){var r=n,o=a;return n=a=i,f=t,u=e.apply(o,r)}function v(e){var r=e-l;return l===i||r>=t||r<0||p&&e-f>=s}function m(){var e=Ia();if(v(e))return b(e);c=jo(m,function(e){var r=t-(e-l);return p?vr(r,s-(e-f)):r}(e))}function b(e){return c=i,h&&n?y(e):(n=a=i,u)}function g(){var e=Ia(),r=v(e);if(n=arguments,a=this,l=e,r){if(c===i)return function(e){return f=e,c=jo(m,t),d?y(e):u}(l);if(p)return gi(c),c=jo(m,t),y(l)}return c===i&&(c=jo(m,t)),u}return t=ys(t)||0,Xa(r)&&(d=!!r.leading,s=(p="maxWait"in r)?yr(ys(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),g.cancel=function(){c!==i&&gi(c),f=0,n=l=a=c=i},g.flush=function(){return c===i?u:b(Ia())},g}var ka=Yn((function(e,t){return un(e,1,t)})),Ma=Yn((function(e,t,r){return un(e,ys(t)||0,r)}));function Na(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(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 a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Na.Cache||zr),r}function Da(e){if("function"!=typeof e)throw new Te(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)}}Na.Cache=zr;var Ra=mi((function(e,t){var r=(t=1==t.length&&Qa(t[0])?kt(t[0],Ht(oo())):kt(yn(t,1),Ht(oo()))).length;return Yn((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)}))})),Ca=Yn((function(e,t){var r=ar(t,io(Ca));return Ki(e,u,i,t,r)})),Fa=Yn((function(e,t){var r=ar(t,io(Fa));return Ki(e,64,i,t,r)})),$a=Xi((function(e,t){return Ki(e,256,i,i,i,t)}));function qa(e,t){return e===t||e!=e&&t!=t}var La=Qi(En),Va=Qi((function(e,t){return e>=t})),Ua=An(function(){return arguments}())?An:function(e){return es(e)&&Ne.call(e,"callee")&&!We.call(e,"callee")},Qa=n.isArray,za=mt?Ht(mt):function(e){return es(e)&&Sn(e)==k};function Ba(e){return null!=e&&Za(e.length)&&!Ga(e)}function Wa(e){return es(e)&&Ba(e)}var Ya=vt||yu,Ka=bt?Ht(bt):function(e){return es(e)&&Sn(e)==b};function Ha(e){if(!es(e))return!1;var t=Sn(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ga(e){if(!Xa(e))return!1;var t=Sn(e);return t==_||t==O||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ps(e)}function Za(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=gt?Ht(gt):function(e){return es(e)&&fo(e)==w};function rs(e){return"number"==typeof e||es(e)&&Sn(e)==S}function ns(e){if(!es(e)||Sn(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==Fe}var is=_t?Ht(_t):function(e){return es(e)&&Sn(e)==P},os=Ot?Ht(Ot):function(e){return es(e)&&fo(e)==T};function as(e){return"string"==typeof e||!Qa(e)&&es(e)&&Sn(e)==j}function ss(e){return"symbol"==typeof e||es(e)&&Sn(e)==A}var us=wt?Ht(wt):function(e){return es(e)&&Za(e.length)&&!!it[Sn(e)]},cs=Qi(Rn),ls=Qi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ba(e))return as(e)?lr(e):Pi(e);if(He&&e[He])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[He]());var t=fo(e);return(t==w?ir:t==T?sr:qs)(e)}function ds(e){return e?(e=ys(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ps(e){var t=ds(e),r=t%1;return t==t?r?t-r:t:0}function hs(e){return e?on(ps(e),0,p):0}function ys(e){if("number"==typeof e)return e;if(ss(e))return d;if(Xa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):pe.test(e)?d:+e}function vs(e){return Ti(e,ks(e))}function ms(e){return null==e?"":ai(e)}var bs=Ai((function(e,t){if(Oo(t)||Ba(t))Ti(t,xs(t),e);else for(var r in t)Ne.call(t,r)&&Zr(e,r,t[r])})),gs=Ai((function(e,t){Ti(t,ks(t),e)})),_s=Ai((function(e,t,r,n){Ti(t,ks(t),e,n)})),Os=Ai((function(e,t,r,n){Ti(t,xs(t),e,n)})),ws=Xi(nn),Ss=Yn((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 a=t[r],s=ks(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||qa(f,xe[l])&&!Ne.call(e,l))&&(e[l]=a[l])}return e})),Es=Yn((function(e){return e.push(i,Gi),St(Ns,i,e)}));function Is(e,t,r){var n=null==e?i:On(e,t);return n===i?r:n}function Ps(e,t){return null!=e&&po(e,t,Pn)}var Ts=$i((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),Xs(ru)),js=$i((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),oo),As=Yn(jn);function xs(e){return Ba(e)?Yr(e):Dn(e)}function ks(e){return Ba(e)?Yr(e,!0):function(e){if(!Xa(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=Oo(e),r=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&r.push(n);return r}(e)}var Ms=Ai((function(e,t,r){qn(e,t,r)})),Ns=Ai((function(e,t,r,n){qn(e,t,r,n)})),Ds=Xi((function(e,t){var r={};if(null==e)return r;var n=!1;t=kt(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),Ti(e,to(e),r),n&&(r=an(r,7,Ji));for(var i=t.length;i--;)ui(r,t[i]);return r})),Rs=Xi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ps(e,r)}))}(e,t)}));function Cs(e,t){if(null==e)return{};var r=kt(to(e),(function(e){return[e]}));return t=oo(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var Fs=Yi(xs),$s=Yi(ks);function qs(e){return null==e?[]:Gt(e,xs(e))}var Ls=Ni((function(e,t,r){return t=t.toLowerCase(),e+(r?Vs(t):t)}));function Vs(e){return Hs(ms(e).toLowerCase())}function Us(e){return(e=ms(e))&&e.replace(be,er).replace(Je,"")}var Qs=Ni((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),zs=Ni((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Bs=Mi("toLowerCase"),Ws=Ni((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ys=Ni((function(e,t,r){return e+(r?" ":"")+Hs(t)})),Ks=Ni((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Hs=Mi("toUpperCase");function Gs(e,t,r){return e=ms(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 Js=Yn((function(e,t){try{return St(e,i,t)}catch(e){return Ha(e)?e:new Oe(e)}})),Zs=Xi((function(e,t){return It(t,(function(t){t=Co(t),rn(e,t,ja(e[t],e))})),e}));function Xs(e){return function(){return e}}var eu=Ci(),tu=Ci(!0);function ru(e){return e}function nu(e){return Nn("function"==typeof e?e:an(e,1))}var iu=Yn((function(e,t){return function(r){return jn(r,e,t)}})),ou=Yn((function(e,t){return function(r){return jn(e,r,t)}}));function au(e,t,r){var n=xs(t),i=_n(t,n);null!=r||Xa(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=_n(t,xs(t)));var o=!(Xa(r)&&"chain"in r&&!r.chain),a=Ga(e);return It(i,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Pi(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function su(){}var uu=Li(kt),cu=Li(Tt),lu=Li(Rt);function fu(e){return bo(e)?Qt(Co(e)):function(e){return function(t){return On(t,e)}}(e)}var du=Ui(),pu=Ui(!0);function hu(){return[]}function yu(){return!1}var vu,mu=qi((function(e,t){return e+t}),0),bu=Bi("ceil"),gu=qi((function(e,t){return e/t}),1),_u=Bi("floor"),Ou=qi((function(e,t){return e*t}),1),wu=Bi("round"),Su=qi((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Pa,Fr.assign=bs,Fr.assignIn=gs,Fr.assignInWith=_s,Fr.assignWith=Os,Fr.at=ws,Fr.before=Ta,Fr.bind=ja,Fr.bindAll=Zs,Fr.bindKey=Aa,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Qa(e)?e:[e]},Fr.chain=fa,Fr.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(dt(o/t));a<o;)u[s++]=ei(e,a,a+=t);return u},Fr.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},Fr.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(Qa(r)?Pi(r):[r],yn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?kt(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[r(e[0]),e[1]]})):[],Yn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=xs(e);return function(r){return sn(r,e,t)}}(an(e,1))},Fr.constant=Xs,Fr.countBy=ha,Fr.create=function(e,t){var r=$r(e);return null==t?r:tn(r,t)},Fr.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.debounce=xa,Fr.defaults=Ss,Fr.defaultsDeep=Es,Fr.defer=ka,Fr.delay=Ma,Fr.difference=qo,Fr.differenceBy=Lo,Fr.differenceWith=Vo,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:ps(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:ps(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},Fr.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=ps(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ps(n))<0&&(n+=o),n=r>n?0:hs(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Qa(e)?jt:hn)(e,oo(t,3))},Fr.flatMap=function(e,t){return yn(wa(e,t),1)},Fr.flatMapDeep=function(e,t){return yn(wa(e,t),l)},Fr.flatMapDepth=function(e,t,r){return r=r===i?1:ps(r),yn(wa(e,t),r)},Fr.flatten=zo,Fr.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},Fr.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:ps(t)):[]},Fr.flip=function(e){return Ki(e,512)},Fr.flow=eu,Fr.flowRight=tu,Fr.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},Fr.functions=function(e){return null==e?[]:_n(e,xs(e))},Fr.functionsIn=function(e){return null==e?[]:_n(e,ks(e))},Fr.groupBy=ga,Fr.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Fr.intersection=Wo,Fr.intersectionBy=Yo,Fr.intersectionWith=Ko,Fr.invert=Ts,Fr.invertBy=js,Fr.invokeMap=_a,Fr.iteratee=nu,Fr.keyBy=Oa,Fr.keys=xs,Fr.keysIn=ks,Fr.map=wa,Fr.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},Fr.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},Fr.matches=function(e){return Fn(an(e,1))},Fr.matchesProperty=function(e,t){return $n(e,an(t,1))},Fr.memoize=Na,Fr.merge=Ms,Fr.mergeWith=Ns,Fr.method=iu,Fr.methodOf=ou,Fr.mixin=au,Fr.negate=Da,Fr.nthArg=function(e){return e=ps(e),Yn((function(t){return Ln(t,e)}))},Fr.omit=Ds,Fr.omitBy=function(e,t){return Cs(e,Da(oo(t)))},Fr.once=function(e){return Ta(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Qa(t)||(t=null==t?[]:[t]),Qa(r=n?i:r)||(r=null==r?[]:[r]),Vn(e,t,r))},Fr.over=uu,Fr.overArgs=Ra,Fr.overEvery=cu,Fr.overSome=lu,Fr.partial=Ca,Fr.partialRight=Fa,Fr.partition=Sa,Fr.pick=Rs,Fr.pickBy=Cs,Fr.property=fu,Fr.propertyOf=function(e){return function(t){return null==e?i:On(e,t)}},Fr.pull=Go,Fr.pullAll=Jo,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Qn(e,t,oo(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Qn(e,t,i,r):e},Fr.pullAt=Zo,Fr.range=du,Fr.rangeRight=pu,Fr.rearg=$a,Fr.reject=function(e,t){return(Qa(e)?jt:hn)(e,Da(oo(t,3)))},Fr.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 a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return zn(e,i),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Yn(e,t=t===i?t:ps(t))},Fr.reverse=Xo,Fr.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:ps(t),(Qa(e)?Hr:Hn)(e,t)},Fr.set=function(e,t,r){return null==e?e:Gn(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Gn(e,t,r,n)},Fr.shuffle=function(e){return(Qa(e)?Gr:Xn)(e)},Fr.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:ps(t),r=r===i?n:ps(r)),ei(e,t,r)):[]},Fr.sortBy=Ea,Fr.sortedUniq=function(e){return e&&e.length?ii(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?p:r>>>0)?(e=ms(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=ai(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:yr(ps(t),0),Yn((function(r){var n=r[t],i=bi(r,0,t);return n&&Mt(i,n),St(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:ps(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:ps(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Te(o);return Xa(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),xa(e,t,{leading:n,maxWait:t,trailing:i})},Fr.thru=da,Fr.toArray=fs,Fr.toPairs=Fs,Fr.toPairsIn=$s,Fr.toPath=function(e){return Qa(e)?kt(e,Co):ss(e)?[e]:Pi(Ro(ms(e)))},Fr.toPlainObject=vs,Fr.transform=function(e,t,r){var n=Qa(e),i=n||Ya(e)||us(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Xa(e)&&Ga(o)?$r(ze(e)):{}}return(i?It:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Pa(e,1)},Fr.union=ea,Fr.unionBy=ta,Fr.unionWith=ra,Fr.uniq=function(e){return e&&e.length?si(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?si(e,oo(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?si(e,i,t):[]},Fr.unset=function(e,t){return null==e||ui(e,t)},Fr.unzip=na,Fr.unzipWith=ia,Fr.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},Fr.values=qs,Fr.valuesIn=function(e){return null==e?[]:Gt(e,ks(e))},Fr.without=oa,Fr.words=Gs,Fr.wrap=function(e,t){return Ca(yi(t),e)},Fr.xor=aa,Fr.xorBy=sa,Fr.xorWith=ua,Fr.zip=ca,Fr.zipObject=function(e,t){return pi(e||[],t||[],Zr)},Fr.zipObjectDeep=function(e,t){return pi(e||[],t||[],Gn)},Fr.zipWith=la,Fr.entries=Fs,Fr.entriesIn=$s,Fr.extend=gs,Fr.extendWith=_s,au(Fr,Fr),Fr.add=mu,Fr.attempt=Js,Fr.camelCase=Ls,Fr.capitalize=Vs,Fr.ceil=bu,Fr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ys(r))==r?r:0),t!==i&&(t=(t=ys(t))==t?t:0),on(ys(e),t,r)},Fr.clone=function(e){return an(e,4)},Fr.cloneDeep=function(e){return an(e,5)},Fr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:i)},Fr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:i)},Fr.conformsTo=function(e,t){return null==t||sn(e,t,xs(t))},Fr.deburr=Us,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=gu,Fr.endsWith=function(e,t,r){e=ms(e),t=ai(t);var n=e.length,o=r=r===i?n:on(ps(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Fr.eq=qa,Fr.escape=function(e){return(e=ms(e))&&K.test(e)?e.replace(W,tr):e},Fr.escapeRegExp=function(e){return(e=ms(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Qa(e)?Tt:dn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},Fr.find=ya,Fr.findIndex=Uo,Fr.findKey=function(e,t){return Ft(e,oo(t,3),bn)},Fr.findLast=va,Fr.findLastIndex=Qo,Fr.findLastKey=function(e,t){return Ft(e,oo(t,3),gn)},Fr.floor=_u,Fr.forEach=ma,Fr.forEachRight=ba,Fr.forIn=function(e,t){return null==e?e:vn(e,oo(t,3),ks)},Fr.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),ks)},Fr.forOwn=function(e,t){return e&&bn(e,oo(t,3))},Fr.forOwnRight=function(e,t){return e&&gn(e,oo(t,3))},Fr.get=Is,Fr.gt=La,Fr.gte=Va,Fr.has=function(e,t){return null!=e&&po(e,t,In)},Fr.hasIn=Ps,Fr.head=Bo,Fr.identity=ru,Fr.includes=function(e,t,r,n){e=Ba(e)?e:qs(e),r=r&&!n?ps(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),as(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ps(r);return i<0&&(i=yr(n+i,0)),qt(e,t,i)},Fr.inRange=function(e,t,r){return t=ds(t),r===i?(r=t,t=0):r=ds(r),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(e=ys(e),t,r)},Fr.invoke=As,Fr.isArguments=Ua,Fr.isArray=Qa,Fr.isArrayBuffer=za,Fr.isArrayLike=Ba,Fr.isArrayLikeObject=Wa,Fr.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sn(e)==m},Fr.isBuffer=Ya,Fr.isDate=Ka,Fr.isElement=function(e){return es(e)&&1===e.nodeType&&!ns(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Ba(e)&&(Qa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||us(e)||Ua(e)))return!e.length;var t=fo(e);if(t==w||t==T)return!e.size;if(Oo(e))return!Dn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return xn(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?xn(e,t,i,r):!!n},Fr.isError=Ha,Fr.isFinite=function(e){return"number"==typeof e&&Ct(e)},Fr.isFunction=Ga,Fr.isInteger=Ja,Fr.isLength=Za,Fr.isMap=ts,Fr.isMatch=function(e,t){return e===t||kn(e,t,so(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,kn(e,t,so(t),r)},Fr.isNaN=function(e){return rs(e)&&e!=+e},Fr.isNative=function(e){if(_o(e))throw new Oe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=rs,Fr.isObject=Xa,Fr.isObjectLike=es,Fr.isPlainObject=ns,Fr.isRegExp=is,Fr.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=f},Fr.isSet=os,Fr.isString=as,Fr.isSymbol=ss,Fr.isTypedArray=us,Fr.isUndefined=function(e){return e===i},Fr.isWeakMap=function(e){return es(e)&&fo(e)==x},Fr.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sn(e)},Fr.join=function(e,t){return null==e?"":zt.call(e,t)},Fr.kebabCase=Qs,Fr.last=Ho,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ps(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):$t(e,Vt,o,!0)},Fr.lowerCase=zs,Fr.lowerFirst=Bs,Fr.lt=cs,Fr.lte=ls,Fr.max=function(e){return e&&e.length?pn(e,ru,En):i},Fr.maxBy=function(e,t){return e&&e.length?pn(e,oo(t,2),En):i},Fr.mean=function(e){return Ut(e,ru)},Fr.meanBy=function(e,t){return Ut(e,oo(t,2))},Fr.min=function(e){return e&&e.length?pn(e,ru,Rn):i},Fr.minBy=function(e,t){return e&&e.length?pn(e,oo(t,2),Rn):i},Fr.stubArray=hu,Fr.stubFalse=yu,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Ou,Fr.nth=function(e,t){return e&&e.length?Ln(e,ps(t)):i},Fr.noConflict=function(){return ft._===this&&(ft._=$e),this},Fr.noop=su,Fr.now=Ia,Fr.pad=function(e,t,r){e=ms(e);var n=(t=ps(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Vi(pt(i),r)+e+Vi(dt(i),r)},Fr.padEnd=function(e,t,r){e=ms(e);var n=(t=ps(t))?cr(e):0;return t&&n<t?e+Vi(t-n,r):e},Fr.padStart=function(e,t,r){e=ms(e);var n=(t=ps(t))?cr(e):0;return t&&n<t?Vi(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ms(e).replace(ne,""),t||0)},Fr.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=ds(e),t===i?(t=e,e=0):t=ds(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+st("1e-"+((o+"").length-1))),t)}return Bn(e,t)},Fr.reduce=function(e,t,r){var n=Qa(e)?Nt:Bt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},Fr.reduceRight=function(e,t,r){var n=Qa(e)?Dt:Bt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},Fr.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:ps(t),Wn(ms(e),t)},Fr.replace=function(){var e=arguments,t=ms(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var a=null==e?i:e[Co(t[n])];a===i&&(n=o,a=r),e=Ga(a)?a.call(e):a}return e},Fr.round=wu,Fr.runInContext=e,Fr.sample=function(e){return(Qa(e)?Kr:Kn)(e)},Fr.size=function(e){if(null==e)return 0;if(Ba(e))return as(e)?cr(e):e.length;var t=fo(e);return t==w||t==T?e.size:Dn(e).length},Fr.snakeCase=Ws,Fr.some=function(e,t,r){var n=Qa(e)?Rt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},Fr.sortedIndex=function(e,t){return ri(e,t)},Fr.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&qa(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return ri(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(qa(e[r],t))return r}return-1},Fr.startCase=Ys,Fr.startsWith=function(e,t,r){return e=ms(e),r=null==r?0:on(ps(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},Fr.subtract=Su,Fr.sum=function(e){return e&&e.length?Wt(e,ru):0},Fr.sumBy=function(e,t){return e&&e.length?Wt(e,oo(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&mo(e,t,r)&&(t=i),e=ms(e),t=_s({},t,n,Hi);var o,a,s=_s({},t.imports,n.imports,Hi),u=xs(s),c=Gt(s,u),l=0,f=t.interpolate||ge,d="__p += '",p=Ie((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(p,(function(t,r,n,i,s,u){return n||(n=i),d+=e.slice(l,u).replace(_e,rr),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var y=Ne.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new Oe("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(U,""):d).replace(Q,"$1").replace(z,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Js((function(){return we(u,h+"return "+d).apply(i,c)}));if(v.source=d,Ha(v))throw v;return v},Fr.times=function(e,t){if((e=ps(e))<1||e>f)return[];var r=p,n=vr(e,p);t=oo(t),e-=p;for(var i=Yt(n,t);++r<e;)t(r);return i},Fr.toFinite=ds,Fr.toInteger=ps,Fr.toLength=hs,Fr.toLower=function(e){return ms(e).toLowerCase()},Fr.toNumber=ys,Fr.toSafeInteger=function(e){return e?on(ps(e),-9007199254740991,f):0===e?e:0},Fr.toString=ms,Fr.toUpper=function(e){return ms(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=ms(e))&&(r||t===i))return Kt(e);if(!e||!(t=ai(t)))return e;var n=lr(e),o=lr(t);return bi(n,Zt(n,o),Xt(n,o)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=ms(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=ai(t)))return e;var n=lr(e);return bi(n,0,Xt(n,lr(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=ms(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=lr(e);return bi(n,Zt(n,lr(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(Xa(t)){var o="separator"in t?t.separator:o;r="length"in t?ps(t.length):r,n="omission"in t?ai(t.omission):n}var a=(e=ms(e)).length;if(nr(e)){var s=lr(e);a=s.length}if(r>=a)return e;var u=r-cr(n);if(u<1)return n;var c=s?bi(s,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(s&&(u+=c.length-u),is(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,ms(de.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?u:d)}}else if(e.indexOf(ai(o),u)!=u){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+n},Fr.unescape=function(e){return(e=ms(e))&&Y.test(e)?e.replace(B,dr):e},Fr.uniqueId=function(e){var t=++De;return ms(e)+t},Fr.upperCase=Ks,Fr.upperFirst=Hs,Fr.each=ma,Fr.eachRight=ba,Fr.first=Bo,au(Fr,(vu={},bn(Fr,(function(e,t){Ne.call(Fr.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),Fr.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),It(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===i?1:yr(ps(r),0);var n=this.__filtered__&&!t?new Vr(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,p),type:e+(n.__dir__<0?"Right":"")}),n},Vr.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;Vr.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":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ru)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Yn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return jn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Da(oo(e)))},Vr.prototype.slice=function(e,t){e=ps(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ps(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(p)},bn(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Fr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);o&&(Fr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,u=t instanceof Vr,c=s[0],l=u||Qa(t),f=function(e){var t=o.apply(Fr,Mt([e],s));return n&&d?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,y=u&&!p;if(!a&&l){t=y?t:new Vr(this);var v=e.apply(t,s);return v.__actions__.push({func:da,args:[f],thisArg:i}),new Lr(v,d)}return h&&y?e.apply(this,s):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=je[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Qa(i)?i:[],e)}return this[r]((function(r){return t.apply(Qa(r)?r:[],e)}))}})),bn(Vr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Ne.call(jr,n)||(jr[n]=[]),jr[n].push({name:t,func:r})}})),jr[Fi(i,2).name]=[{name:"wrapper",func:i}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Qa(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],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vr(t,e+a);break;case"takeRight":e=yr(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,l=this.__iteratees__,f=l.length,d=0,p=vr(u,this.__takeCount__);if(!r||!n&&i==u&&p==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&d<p;){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[d++]=v}return h},Fr.prototype.at=pa,Fr.prototype.chain=function(){return fa(this)},Fr.prototype.commit=function(){return new Lr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof qr;){var n=$o(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:da,args:[Xo],thisArg:i}),new Lr(t,this.__chain__)}return this.thru(Xo)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,He&&(Fr.prototype[He]=function(){return this}),Fr}();ft._=pr,(n=function(){return pr}.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 a=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return a.ConnectableObservable}});var s=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return s.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 d=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var p=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return p.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return p.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 O=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return O.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return O.NotificationKind}});var w=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return w.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 P=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return P.lastValueFrom}});var T=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return T.firstValueFrom}});var j=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return j.ArgumentOutOfRangeError}});var A=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return A.EmptyError}});var x=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return x.NotFoundError}});var k=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return k.ObjectUnsubscribedError}});var M=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return M.SequenceError}});var N=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return N.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 F=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return F.combineLatest}});var $=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return $.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 V=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return V.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var Q=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return Q.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var B=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return B.fromEventPattern}});var W=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return W.generate}});var Y=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return Y.iif}});var K=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return K.interval}});var H=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return H.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 ae=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ae.zip}});var se=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return se.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 de=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return de.auditTime}});var pe=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return pe.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 Oe=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return Oe.combineLatestWith}});var we=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return we.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 Pe=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Pe.connect}});var Te=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Te.count}});var je=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return je.debounce}});var Ae=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Ae.debounceTime}});var xe=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return xe.defaultIfEmpty}});var ke=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return ke.delay}});var Me=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Me.delayWhen}});var Ne=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ne.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 Fe=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Fe.elementAt}});var $e=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return $e.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 Ve=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Ve.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Qe=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Qe.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Be=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Be.finalize}});var We=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return We.find}});var Ye=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return Ye.findIndex}});var Ke=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Ke.first}});var He=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return He.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 at=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return at.mergeMapTo}});var st=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return st.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 dt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var pt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.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 Ot=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return Ot.repeatWhen}});var wt=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return wt.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 Pt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Pt.sampleTime}});var Tt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Tt.scan}});var jt=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return jt.sequenceEqual}});var At=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return At.share}});var xt=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return xt.shareReplay}});var kt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return kt.single}});var Mt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Mt.skip}});var Nt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Nt.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 Ft=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ft.subscribeOn}});var $t=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return $t.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 Vt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Vt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Qt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Qt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Bt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Bt.takeWhile}});var Wt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Wt.tap}});var Yt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Yt.throttle}});var Kt=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Ht=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Ht.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 ar=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ar.withLatestFrom}});var sr=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return sr.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,a=t.isStopped,s=t._isComplete;r?e.error(o):(a||s)&&(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),a=r(859),s=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,a=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(a):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return s.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,s="N"===t?o.of(r):"E"===t?a.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},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,a=o.kind,s=o.value,u=o.error;if("string"!=typeof a)throw new TypeError('Invalid notification, missing "kind"');"N"===a?null===(r=t.next)||void 0===r||r.call(t,s):"E"===a?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),a=r(5966),s=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,a=this,s=(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=a,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?a._subscribe(s):a._trySubscribe(s))})),s},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 a.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:s.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),a=r(1713),s=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=a.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,a=r._timestampProvider,s=r._windowTime;n||(i.push(t),!o&&i.push(a.now()+s)),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 a=r.now(),s=0,u=1;u<n.length&&n[u]<=a;u+=2)s=u;s&&n.splice(0,s+1)}},t}(o.Subject);t.ReplaySubject=s},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 a=r(5271),s=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 d(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),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){r={error:e}}finally{try{a&&!a.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?s.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new s.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 a.Observable;return e.source=this,e},t.create=function(e,t){return new d(e,t)},t}(a.Observable);t.Subject=f;var d=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:s.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=d},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),a=r(7215),s=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),d=r(4770),p=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,a.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}(a.Subscription);t.Subscriber=p;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,a,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&&s.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,a),error:t.error&&y(t.error,a),complete:t.complete&&y(t.complete,a)}):i=t,u.destination=new v(i),u}return i(t,e),t}(p);function b(e){s.config.useDeprecatedSynchronousErrorHandling?d.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=s.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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 a=r(4432),s=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 d=n(f),p=d.next();!p.done;p=d.next())p.value.remove(this)}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(a.isFunction(h))try{h()}catch(e){c=e instanceof s.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 s.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 s.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){a.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&&a.isFunction(e.remove)&&a.isFunction(e.add)&&a.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,a){var s=new i.SafeSubscriber({next:function(e){o(e),s.unsubscribe()},error:a,complete:function(){r?o(t.defaultValue):a(new n.EmptyError)}});e.subscribe(s)}))}},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 a,s=!1;e.subscribe({next:function(e){a=e,s=!0},error:o,complete:function(){s?i(a):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),a=r(7215),s=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 a.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=a.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return s.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(5271),s=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,d){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,d).apply(this,n).pipe(u.mapOneOrManyArgs(f))};d=f}return d?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(s.subscribeOn(d),c.observeOn(d))}:function(){for(var e=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=new l.AsyncSubject,c=!0;return new a.Observable((function(a){var s=u.subscribe(a);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 s}))}}},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),a=r(9144),s=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function d(e,t,r){return void 0===r&&(r=a.identity),function(n){p(t,(function(){for(var i=e.length,a=new Array(i),s=i,u=i,c=function(i){p(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){a[i]=e,f||(f=!0,u--),u||n.next(r(a.slice()))}),(function(){--s||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function p(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),p=f.args,h=f.keys;if(0===p.length)return o.from([],r);var y=new n.Observable(d(p,r,h?function(e){return c.createObject(h,e)}:a.identity));return l?y.pipe(s.mapOneOrManyArgs(l)):y},t.combineLatestInit=d},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),a={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=a);var r=null,n=t.connector,s=t.resetOnDisconnect,u=void 0===s||s,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 a(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),a=0,s=function(){t.closed||(a=o.animationFrameProvider.requestAnimationFrame((function(i){a=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),s()})))};return s(),function(){a&&o.animationFrameProvider.cancelAnimationFrame(a)}}))}t.animationFrames=function(e){return e?a(e):s};var s=a()},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),a=r(2619),s=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=a.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,d=l.keys,p=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,a=function(t){var a=!1;o.innerFrom(f[t]).subscribe(s.createOperatorSubscriber(e,(function(e){a||(a=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&a||(i||e.next(d?c.createObject(d,r):r),e.complete())})))},u=0;u<t;u++)a(u);else e.complete()}));return r?p.pipe(u.mapOneOrManyArgs(r)):p}},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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),a=r(9010),s=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],d=["on","off"];function p(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(p(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?d.map(p(t,r)):[],2),m=v[0],b=v[1];if(!m&&s.isArrayLike(t))return a.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,a){return a?e(t,r).pipe(o.mapOneOrManyArgs(a)):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,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}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,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),a=r(5401),s=r(8840);t.generate=function(e,t,r,u,c){var l,f,d,p;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=p,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,d(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(p=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,d=void 0===f?i.identity:f,c=l.scheduler):(p=e,!u||o.isScheduler(u)?(d=i.identity,c=u):d=u),a.defer(c?function(){return s.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 a(e){try{u(n.next(e))}catch(e){o(e)}}function s(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(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}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,s])}}},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 a?a(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)}))}}},a=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 s=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),d=r(4883),p=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 O(e){return new c.Observable((function(t){var r,n;try{for(var i=a(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),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 w(e){return new c.Observable((function(t){(function(e,t){var r,a,s,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((a=i.sent()).done)return[3,4];if(n=a.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(),s={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),a&&!a.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(s)throw s.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 w(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(s.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return w(e);if(p.isIterable(e))return O(e);if(h.isReadableStreamLike(e))return S(e)}throw d.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=O,t.fromAsyncIterable=w,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),a=r(2619),s=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e),u=a.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(s.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),a=r(5079);function s(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(a.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(s(e))},t.raceInit=s},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),a=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var s=-1;return null!=t&&(o.isScheduler(t)?r=t:s=t),new n.Observable((function(t){var n=a.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=s?this.schedule(void 0,s):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(),a=t(n);return(a?i.innerFrom(a):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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(9451),s=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=s.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 s=function(s){a.innerFrom(f[s]).subscribe(c.createOperatorSubscriber(e,(function(a){if(t[s].push(a),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[s]=!0,!t[s].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)s(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 a(e,t,r,n,i)};var a=function(e){function t(t,r,n,i,o,a){var s=e.call(this,t)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}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=a},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,a=null,s=null,u=!1,c=function(){if(null==s||s.unsubscribe(),s=null,n){n=!1;var e=a;a=null,r.next(e)}u&&r.complete()},l=function(){s=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,a=t,s||i.innerFrom(e(t)).subscribe(s=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!s||s.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),a=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var s=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,d=null;u++%t==0&&s.push([]);try{for(var p=n(s),h=p.next();!h.done;h=p.next())(m=h.value).push(r),e<=m.length&&(d=null!=d?d:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=p.return)&&c.call(p)}finally{if(o)throw o.error}}if(d)try{for(var y=n(d),v=y.next();!v.done;v=y.next()){var m=v.value;a.arrRemove(s,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(s),o=r.next();!o.done;o=r.next()){var a=o.value;i.next(a)}}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(){s=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),a=r(5079),s=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var p=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(),s.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,p,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,p,f,h,!0):u=!0,f();var d=a.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var a=n(i),s=a.next();!s.done;s=a.next()){var u=s.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==d||d.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(d)}))}},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),a=r(9451),s=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];a.innerFrom(e).subscribe(s.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(a.innerFrom(t(e)).subscribe(s.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(s.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),a=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,s=null,u=function(){null==s||s.unsubscribe();var t=n;n=[],t&&r.next(t),a.innerFrom(e()).subscribe(s=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=s=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 a,s=null,u=!1;s=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){a=n.innerFrom(t(i,e(t)(r))),s?(s.unsubscribe(),s=null,a.subscribe(o)):u=!0}))),u&&(s.unsubscribe(),s=null,a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(4024),s=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)):a.operate((function(e,r){o.combineLatestInit(i([e],n(s.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(4554),s=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e);return o.operate((function(t,o){a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(2160),s={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=s);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(a.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),a=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,s=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=s;s=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,s=t,u=o.createOperatorSubscriber(r,c,i.noop),a.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){s=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,a=null,s=null,u=function(){if(i){i.unsubscribe(),i=null;var e=a;a=null,n.next(e)}};function c(){var r=s+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){a=r,s=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){a=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),a=r(4791),s=r(9010);t.delayWhen=function e(t,r){return r?function(a){return n.concat(r.pipe(i.take(1),o.ignoreElements()),a.pipe(e(t)))}:s.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),a.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 a=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;a.has(r)||(a.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return a.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 a(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:a,i.operate((function(r,n){var i,a=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!a&&e(i,o)||(a=!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),a=r(1714),s=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})),s.take(1),r?a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=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,a.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),a=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,s=!1;e.subscribe(a.createOperatorSubscriber(r,(function(e){o||(o=a.createOperatorSubscriber(r,void 0,(function(){o=null,s&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){s=!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 a=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var s=a++;e.call(t,i,s,r)&&(o.next(n?s: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),a=r(1714),s=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?a.defaultIfEmpty(t):s.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),a=r(4024),s=r(5079);t.groupBy=function(e,t,r,u){return a.operate((function(a,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,d=function(e){f.forEach(e),e(c)},p=function(e){return d((function(t){return t.error(e)}))},h=0,y=!1,v=new s.OperatorSubscriber(c,(function(t){try{var a=e(t),d=f.get(a);if(!d){f.set(a,d=u?u():new o.Subject);var m=(g=a,_=d,(O=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,O);if(c.next(m),r){var b=s.createOperatorSubscriber(d,(function(){d.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(a)}));v.add(i.innerFrom(r(m)).subscribe(b))}}d.next(l?l(t):t)}catch(e){p(e)}var g,_,O}),(function(){return d((function(e){return e.complete()}))}),p,(function(){return f.clear()}),(function(){return y=!0,0===h}));a.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),a=r(9010),s=r(2378);t.joinAllInternals=function(e,t){return o.pipe(s.toArray(),a.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),a=r(8062),s=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?s.defaultIfEmpty(t):a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(4475),s=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=a.argsOrArgArray(e),o.operate((function(t,o){s.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,a,s,u,c,l){var f=[],d=0,p=0,h=!1,y=function(){!h||f.length||d||t.complete()},v=function(e){return d<a?m(e):f.push(e)},m=function(e){u&&t.next(e),d++;var l=!1;n.innerFrom(r(e,p++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==s||s(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{d--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&d<a;)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),a=r(7163),s=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),s.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 a.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 a=t;return i.mergeInternals(n,o,(function(t,r){return e(a,t,r)}),r,(function(e){a=e}),!1,void 0,(function(){return a=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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(9451),s=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=s.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),s=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=a.innerFrom(o.shift())}catch(e){return void s()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(s)}else t.complete()};s()}))}},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,a){r&&!o.isFunction(r)&&(a=r);var s=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,a),s)(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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(4024),s=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?a.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):s.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),a=r(9451),s=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?s.timer(r):a.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,a,s=!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()&&(a||(a=new n.Subject,e(a).subscribe(o.createOperatorSubscriber(r,(function(){i?f():s=!0}),(function(){u=!0,l()})))),a).next()}))),s&&(i.unsubscribe(),i=null,s=!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),a=r(5710),s=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 d="number"==typeof c?a.timer(c):s.innerFrom(c(e,n)),p=i.createOperatorSubscriber(t,(function(){p.unsubscribe(),f()}),(function(){t.complete()}));d.subscribe(p)}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,a,s=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){a||(a=new n.Subject,e(a).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():s=!0})))),a&&a.next(t)}))),s&&(i.unsubscribe(),i=null,s=!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,a=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,a=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=a;a=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(a,s){var u=r,c=t,l=0;a.subscribe(n.createOperatorSubscriber(s,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&s.next(c)}),o&&function(){u&&s.next(c),s.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},a={buffer:[],complete:!1},s=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?s(!1):e.buffer.push(n):!t(n,i.shift())&&s(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&s(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,a)),e.subscribe(u(a,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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(9520),s=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 a=new s.SafeSubscriber({next:function(){a.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(a)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new a.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,d=e.resetOnRefCountZero,p=void 0===d||d;return function(e){var t,n,a,l=0,d=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=a=void 0,d=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||d||y();var b=a=null!=a?a:r();u.add((function(){0!=--l||h||d||(n=c(m,p))})),b.subscribe(u),!t&&l>0&&(t=new s.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){d=!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,a,s,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,a=e.windowTime,t=void 0===a?1/0:a,c=void 0!==(s=e.refCount)&&s,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),a=r(4024),s=r(5079);t.single=function(e){return a.operate((function(t,r){var a,u=!1,c=!1,l=0;t.subscribe(s.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,a=n)}),(function(){u?(r.next(a),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 a=o%e,s=n[a];n[a]=t,r.next(s)}}))),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),a=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,s=i.createOperatorSubscriber(r,(function(){null==s||s.unsubscribe(),n=!0}),a.noop);o.innerFrom(e).subscribe(s),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 a=null,s=0,u=!1,c=function(){return u&&!a&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==a||a.unsubscribe();var u=0,l=s++;n.innerFrom(e(r,l)).subscribe(a=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){a=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),a=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(a.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),a=o.next();!a.done;a=o.next()){var s=a.value;r.next(s)}}catch(t){e={error:t}}finally{try{a&&!a.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),a=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),a.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),a=r(9144);t.tap=function(e,t,r){var s=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return s?i.operate((function(e,t){var r;null===(r=s.subscribe)||void 0===r||r.call(s);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=s.next)||void 0===r||r.call(s,e),t.next(e)}),(function(){var e;n=!1,null===(e=s.complete)||void 0===e||e.call(s),t.complete()}),(function(e){var r;n=!1,null===(r=s.error)||void 0===r||r.call(s,e),t.error(e)}),(function(){var e,t;n&&(null===(e=s.unsubscribe)||void 0===e||e.call(s)),null===(t=s.finalize)||void 0===t||t.call(s)})))})):a.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 a=r.leading,s=r.trailing,u=!1,c=null,l=null,f=!1,d=function(){null==l||l.unsubscribe(),l=null,s&&(y(),f&&n.complete())},p=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,d,p))},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)&&(a?y():h(e))}),(function(){f=!0,(!(s&&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 a=o.timer(e,t);return i.throttle((function(){return a}),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 a(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=a),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 a(t,o))})))}))};var a=function(e,t){this.value=e,this.interval=t};t.TimeInterval=a},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),a=r(9451),s=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=s.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,s=r.first,f=r.each,d=r.with,p=void 0===d?l:d,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==s&&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(),a.innerFrom(p({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!=s?"number"==typeof s?s:+s-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 a,s,u;if(r=null!=r?r:n.async,i.isValidDate(e)?a=e:"number"==typeof e&&(s=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==a&&null==s)throw new TypeError("No timeout provided.");return o.timeout({first:a,each:s,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),a=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var s=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()}),s)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),a.noop,s)),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),a=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 s=[new i.Subject],u=0;o.next(s[0].asObservable()),t.subscribe(a.createOperatorSubscriber(o,(function(t){var a,c;try{for(var l=n(s),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){a={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}var d=u-e+1;if(d>=0&&d%r==0&&s.shift().complete(),++u%r==0){var p=new i.Subject;s.push(p),o.next(p.asObservable())}}),(function(){for(;s.length>0;)s.shift().complete();o.complete()}),(function(e){for(;s.length>0;)s.shift().error(e);o.error(e)}),(function(){s=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),a=r(4024),s=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var p=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 a.operate((function(t,r){var i=[],a=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),a&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var a=new n.Subject,s={window:a,subs:t,seen:0};i.push(s),r.next(a.asObservable()),l.executeSchedule(t,p,(function(){return c(s)}),e)}};null!==h&&h>=0?l.executeSchedule(r,p,f,h,!0):a=!0,f();var d=function(e){return i.slice().forEach(e)},v=function(e){d((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(s.createOperatorSubscriber(r,(function(e){d((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),a=r(4024),s=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return a.operate((function(r,a){var f=[],d=function(e){for(;0<f.length;)f.shift().error(e);a.error(e)};s.innerFrom(e).subscribe(u.createOperatorSubscriber(a,(function(e){var r=new i.Subject;f.push(r);var n,p=new o.Subscription;try{n=s.innerFrom(t(e))}catch(e){return void d(e)}a.next(r.asObservable()),p.add(n.subscribe(u.createOperatorSubscriber(a,(function(){l.arrRemove(f,r),r.complete(),p.unsubscribe()}),c.noop,d)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(a,(function(e){var t,r,i=f.slice();try{for(var o=n(i),a=o.next();!a.done;a=o.next())a.value.next(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();a.complete()}),d,(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),a=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,s,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==s||s.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=a.innerFrom(e())}catch(e){return void u(e)}t.subscribe(s=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==s||s.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(5079),s=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),d=e.map((function(){return!1})),p=!1,h=function(t){s.innerFrom(e[t]).subscribe(a.createOperatorSubscriber(o,(function(e){f[t]=e,p||d[t]||(d[t]=!0,(p=d.every(u.identity))&&(d=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(a.createOperatorSubscriber(o,(function(e){if(p){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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return a.executeSchedule(r,t,(function(){n=e[i.iterator](),a.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),a=r(8840),s=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),d=r(7707),p=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(d.isAsyncIterable(e))return s.scheduleAsyncIterable(e,t);if(f.isIterable(e))return a.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw p.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),a=r(6741),s=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=a.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&&(a.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=s},3224: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),a=r(6703),s=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=a.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&&(a.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=s},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),a=r(9678),s=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),a.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&&a.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,s.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),a=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=a},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),a=r(7215),s=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=s;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 a.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(3224);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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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 a=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(a)}))},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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=o.Immediate.setImmediate,s=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)||a).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||s)(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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=t.intervalProvider.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=t.timeoutProvider.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,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((s=t)&&"object"==typeof s&&n(s)===i){var a=o(t);return{args:a.map((function(e){return t[e]})),keys:a}}}var s;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,a=r.error;if(i=null,o)throw a}}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,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}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,s])}}},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||[]),a=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.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(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var a=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 a.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),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},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),a=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return a(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 a=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return a.bufferCount}});var s=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return s.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 d=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var p=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return p.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 O=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return O.count}});var w=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return w.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 P=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return P.delayWhen}});var T=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return T.dematerialize}});var j=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return j.distinct}});var A=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return A.distinctUntilChanged}});var x=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return x.distinctUntilKeyChanged}});var k=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return k.elementAt}});var M=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return M.endWith}});var N=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return N.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 F=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return F.expand}});var $=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return $.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 V=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return V.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var Q=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Q.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var B=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return B.isEmpty}});var W=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return W.last}});var Y=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Y.map}});var K=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return K.mapTo}});var H=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return H.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 ae=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ae.observeOn}});var se=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return se.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 de=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return de.publishBehavior}});var pe=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return pe.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 Oe=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Oe.retryWhen}});var we=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return we.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 Pe=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Pe.sequenceEqual}});var Te=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Te.share}});var je=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return je.shareReplay}});var Ae=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Ae.single}});var xe=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return xe.skip}});var ke=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return ke.skipLast}});var Me=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Me.skipUntil}});var Ne=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ne.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 Fe=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Fe.switchMap}});var $e=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return $e.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 Ve=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ve.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Qe=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qe.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Be=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Be.throttle}});var We=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return We.throttleTime}});var Ye=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Ye.throwIfEmpty}});var Ke=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Ke.timeInterval}});var He=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return He.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 at=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return at.zipAll}});var st=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return st.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"},clientRequestId:{type:"string"},prompt:{type:"string"}},required:["profileId","integrationId","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}}},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},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",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},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:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{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}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cognito},configuration:{type:"object",required:["region","userPoolId","appClientId"],properties:{region:{type:"string"},userPoolId:{type:"string"},appClientId:{type:"string"}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.okta},configuration:{type:"object",required:["domain","clientId"],properties:{domain:{type:"string"},clientId:{type:"string"}}}}}]},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:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{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:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:l}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:s}},{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"},7545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{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.convertToRunSecrets=t.transformResponse=t.transformParams=t.ExecuteFunctionSecureAnnotations=void 0;const n=r(9380),i=r(2943),o=r(7627),a=r(326),s=r(2251),u=r(5250),c=r(2574),l=r(1391),f=r(7850);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 s.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 a.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},t.convertToRunSecrets=function(e){const t={backendApiKey:(0,f.truthy)(e.apiKeys[l.BACKEND_API_KEY].value,"Cannot find backend API key"),custom:{}};for(const[r,n]of Object.entries(e.custom))t.custom[r]=n.value;return t}},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,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.omitSquidDevId=t.verifyWithSquidDevId=t.validateEnvironment=t.appIdWithEnvironmentIdAndDevId=t.appIdWithEnvironmentId=t.parseAppId=t.allEnvironmentIds=void 0;const n=r(7850);function i(e){const[t,r,i,o]=e.split(/[_-]/);return(0,n.assertTruthy)(!o,"Invalid appId: "+e),{appId:t,environmentId:null!=r?r:"prod",squidDeveloperId:i}}function o(e,t){return`${i(e).appId}${t&&"prod"!==t?`-${t}`:""}`}t.allEnvironmentIds=["prod","dev"],t.parseAppId=i,t.appIdWithEnvironmentId=o,t.appIdWithEnvironmentIdAndDevId=function(e,t,r){return`${o(e,t)}${r?`-${r}`:""}`},t.validateEnvironment=function(e){const t=i(e);return(0,n.assertTruthy)("prod"!==t.environmentId||!t.squidDeveloperId,"Cannot use developer ID in production"),t},t.verifyWithSquidDevId=function(e){const t=i(e);(0,n.assertTruthy)(t.squidDeveloperId,"Must provide squid developer ID")},t.omitSquidDevId=function(e){const t=i(e);return o(t.appId,t.environmentId)}},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 a(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=a,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)||[],s=["__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=a(u.rhs+"");s.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(s.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:[]}}},6127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkAllHeartbeatProviders=void 0;const n=r(2937);t.checkAllHeartbeatProviders=async function(e){await Promise.all(Object.entries(e).map((async([e,t])=>{try{return await(0,n.firstValueFrom)((0,n.from)(t.checkHeartbeat()).pipe((0,n.timeout)(5e3),(0,n.map)((()=>!0))))}catch(t){throw console.log(`Error in heartbeat provider: ${e}`,t),t}})))}},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(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(1834),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),n.__exportStar(r(6127),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 a(e){return t.DatabaseIntegrationTypes.includes(e)}function s(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.cognito="cognito",e.okta="okta",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,i.cognito,i.okta],t.isDataIntegrationType=a,t.isDataIntegration=function(e){return a(e.type)},t.isAuthIntegrationType=s,t.isAuthIntegration=function(e){return s(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}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}affectsPath(e){const t=this.before?n.get(this.before,e):void 0,r=this.after?n.get(this.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:["integrationId","mutations"],properties:{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),a=r(1834);function s(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=s((0,a.getInPath)(r.properties,e),n);void 0===t?(0,a.deleteInPath)(r.properties,e):(0,a.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=s((0,a.getInPath)(r,e),t);void 0===n?(0,a.deleteInPath)(r,e):(0,a.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"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{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.QueryRegisterRequestSchema=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:["clientRequestId","query","subscribe"],properties:{clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientRequestId"],properties:{clientRequestId:{type:"string",nullable:!1}}},t.QueryRegisterRequestSchema={type:"object",required:["clientRequestId","query","parentClientRequestId"],properties:{clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,parentClientRequestId:{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(1834),o=r(4684);class a{}function s(e,t){var r;const a=[...e.unconditional||[]],s=new Set,c=new Map;for(const[a,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(a);for(const[a,f]of Object.entries(l)){const l=[],d=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,p=(0,o.encodeValueForMapping)(d);switch(a){case"==":l.push(...f[p]||[]);break;case"!=":{(f[p]||[]).forEach((e=>s.add(e)));const e=Object.entries(f).filter((([e])=>e!==p));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)(d)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),d,a))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+a)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())s.has(t)||r>=e.queriesMetadata[t].condCount&&a.push(t);return a}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=a,t.SimpleQueryMappingManager=class extends a{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?s(i,t):[]}},t.findQueriesForDocumentSync=s,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(9312).__importStar(r(8784)),i=r(8784),o=r(791),a={"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,i.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))}documentMatchesQuery(e){for(const t of this.parsedConditions){const r=t.fieldName,i=t.operator,a=n.get(e,r);if("in"===i){if(t.value.includes(a))continue;return!1}if("not in"!==i){if(!(0,o.compareOperator)(t.value,a,i))return!1}else if(t.value.includes(a))return!1}return!0}evaluateSubset(e,t){const{operator:r,value:n}=e,{operator:i,value:o}=this.parseConditions([t])[0],s=a[`${r}:${i}`];return!!s&&s(n,o)}evaluateIncludes(e,t){const{operator:r,value:n}=e,{operator:o,value:a}=this.parseConditions([t])[0],s=Array.isArray(n)?n.sort():n,u=Array.isArray(a)?a.sort():a;return o===r&&(0,i.isEqual)(u,s)}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=t.BaseQueryBuilderInterface=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);class a{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){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r){return this.where(e,r?"not like_cs":"not like",t)}}t.BaseQueryBuilderInterface=a,t.SimpleQueryBuilder=class extends a{constructor(e,t){super(),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}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"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},"us-east-1.aws-dev":{id:"us-east-1",name:"US East (N. Virginia - Dev)"},local:{id:"local",name:"Local"}},t.getSquidSupportedCloudMap=function(){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[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){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)),a=n.__importDefault(r(2091)),s=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 d(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=p(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=d(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function p(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.",s.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.`,s.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",s.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=d((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`,s.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,s.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,s.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,s.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,a.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=p},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}),t.APP_API_KEY=t.BACKEND_API_KEY=void 0,t.BACKEND_API_KEY="_BACKEND_API_KEY",t.APP_API_KEY="APP_API_KEY"},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 a=Math.trunc((n+o)/2);return 0===r(t,e[a])?a:r(t,e[a])>0?i(e,t,r,a+1,o):i(e,t,r,n,a-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 a(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 s(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 a(e,t),e}t.assertTruthy=a,t.assertNotNullish=s,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){a(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return s(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}},1834:(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,a=e;for(;a&&n.length;){const e=(0,i.truthy)(n.shift());if(!(a instanceof Object&&e in a))return;o=a[e],a=o}return o},t.setInPath=function(e,t,r,a="."){var s;const u=t.split(a);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(s=n.clone(c[e]))&&void 0!==s?s:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var a;const s=t.split(r);let u=e;for(;s.length;){const e=(0,i.truthy)(s.shift());if(s.length){const t=o(u[e])&&null!==(a=n.clone(u[e]))&&void 0!==a?a:{};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(9312).__importStar(r(8784));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){if(void 0===e)return null;const t=n.cloneDeepWith(e,(e=>n.isDate(e)?{$date:e.toISOString()}:void 0));return JSON.stringify(t)}function a(e){const t=JSON.parse(e);return n.cloneDeepWith(t,(e=>n.isObject(e)&&n.has(e,"$date")&&1===Object.keys(e).length?new Date(e.$date):void 0))}function s(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(o(e))}function u(e){return a(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=a,t.encodeValueForMapping=s,t.decodeValueForMapping=u,t.recodeValue=function(e){return u(s(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 a(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 s(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))a(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){a(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"),a(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),s(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=s,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){this.rpcManager=e,this.socketManager=t,this.integrationId=r,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 a(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 a={profileId:e,prompt:t,integrationId:this.integrationId,clientRequestId:r};return this.rpcManager.post("ai/assistant/chat",a).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 a{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 s(this.client,this.integrationId,this.profileId,e)}instruction(e){return new u(this.client,this.integrationId,this.profileId,e)}insert(e){const{modelName:t}=e,r={type:"insert",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:!1},integrationId:this.integrationId};return this.client.mutate(r)}update(e){const{modelName:t}=e,r={type:"update",resource:"profile",profileId:this.profileId,payload:{modelName:t,strictContext:!1},integrationId:this.integrationId};return this.client.mutate(r)}delete(){const e={type:"delete",resource:"profile",profileId:this.profileId,integrationId:this.integrationId,payload:{}};return this.client.mutate(e)}}class s{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){this.rpcManager=e,this.socketManager=t,this.assistantsMap=new Map}getAssistant(e){let t=this.assistantsMap.get(e);return t||(t=new n.AiAssistantClient(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),a=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,a.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,r){const i=(0,n.generateId)(),s=new o.Subject;this.ongoingApiExecutions[i]=s;const u={integrationId:e,endpointId:t,request:r,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),s.error(n),s.complete()})),(0,o.race)(s.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)()),this.clientIdService.observeClientTooOld().pipe((0,a.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.observeIsDestructing()))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.observeIsDestructing()))}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)(),a=new i.Subject;this.ongoingFunctionExecutions[r]=a;const s={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientRequestId:r};return this.rpcManager.post("backend-function/execute",s).catch((t=>{console.error("Got error while executing function",e,t),a.error(t),a.complete()})),(0,i.race)(a.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.clientIdSubject=new n.BehaviorSubject((0,i.generateId)()),this.destructManager.onDestruct((()=>{this.clientTooOldSubject.complete(),this.clientIdSubject.complete()}))}observeClientId(){return this.clientIdSubject}observeClientTooOld(){return this.clientTooOldSubject.pipe((0,n.filter)((e=>e)),(0,n.map)((e=>{})))}notifyClientTooOld(){this.clientTooOldSubject.next(!0),this.clientIdSubject.next((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.clientIdSubject.value}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")}}},136:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionDetails=void 0,t.ConnectionDetails=class{constructor(e,t){this.clientIdService=e,this.socketManager=t,this.isConnected=!1,this.socketManager.observeConnectionReady().subscribe((e=>{this.isConnected=e}))}get connected(){return this.isConnected}get clientId(){return this.clientIdService.getClientId()}observeConnected(){return this.socketManager.observeConnectionReady()}}},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),a=r(9978),s="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,a,s,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=a,this.destructManager=s,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(s)?this.lockManager.lockSync(s):await this.lockManager.lock(s),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(s)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i);this.knownDirtyDocs.add(o),t||(await this.lockManager.lock(s),this.lockManager.release(s)),this.knownDirtyDocs.delete(o);const a=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(a&&!a.sentToServer)a.mutation=(0,n.reduceMutations)([a.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(s);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(s)}}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,a.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,a.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.setGotInitialResult(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).setForceFetchFromServer().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),i=r(9978);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}observeIsDestructing(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean),(0,i.map)((()=>{})))}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.observeIsDestructing())))return Promise.reject("CLIENT_NOT_CONNECTED");const r=(0,n.generateId)(),s={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(s);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 a(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 a{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=a},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)),a=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,a.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:a}=t,s=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,s,u);return a<0?c:r.slice(0,a)}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
|
-
${e.query}
|
|
10
|
-
`,variables:e.variables})).data}async mutate(e){return(await this.client.mutate({mutation:i.gql`
|
|
11
|
-
${e.query}
|
|
12
|
-
`})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r){this.rpcManager=e,this.lockManager=t,this.querySubscriptionManager=r}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t){this.rpcManager=e,this.socketManager=t,this.ongoingNamedQueryExecutions={},t.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),a=new i.Subject;this.ongoingNamedQueryExecutions[o]=a;const s={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientRequestId:o};return this.rpcManager.post("named-query/execute",s).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),a.error(r),a.complete()})),a.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),a=r(2937),s=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u extends i.BaseQueryBuilderInterface{constructor(e,t,r,n,o,a,s){super(),this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=a,this.queryBuilderFactory=s,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,a.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e,!1).pipe((0,s.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,a=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=a?this.documentReferenceFactory.create(a,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),a=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{a.where(e,"==",t)})),a}get(e,t){return new a(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class a extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o,this.forceFetchFromServer=!1}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}setForceFetchFromServer(){return this.forceFetchFromServer=!0,this}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e,this.forceFetchFromServer).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,a=o.data;if(t.has(a))delete e[r],t.delete(a);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new s(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=a;class s{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=s},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),a=r(2937),s=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientIdService=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new a.BehaviorSubject(!0),this.onOrphanDocuments=new a.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new a.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.clientIdService.observeClientReadyToBeRegenerated().subscribe((()=>{this.refreshOngoingQueries()})),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e),"UNKNOWN_QUERY").query}setGotInitialResult(e){const t=(0,i.truthy)(this.ongoingQueries.get(e));t.gotInitialResponse?this.removeClientRequestIdMapping(e):t.gotInitialResponse=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&(r.dataSubject.error(t),r.done=!0)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotInitialResponse||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let a=!1;for(const t of e.supportedQueries)a=a||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let s=e;for(;!s.allObservables;)s=(0,i.truthy)(null==s?void 0:s.supportingOngoingQuery);a&&t.add(s),e.dataSubject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}findValidParentQuery(e){if(e.forceFetchFromServer)return;const t=new i.QueryContext(e.query);for(const r of this.ongoingQueries.values())if(e!==r&&r.activated&&!r.isInFlight&&!r.isEmptyForJoin&&!r.done&&r.subscribe&&t.isSubsetOfQuery(r.query))return r}processQuery(e,t,r,n,i,u){return(0,a.defer)((()=>{const c=this.createOngoingQueryGraph(e,t,r,n,i,!0);u&&(c.forceFetchFromServer=!0),this.sendQueryToServerOrUseParentQuery(c),c.allObservables=new a.ReplaySubject(1);const l=c.allObservables.pipe((0,a.switchMap)((e=>(0,a.combineLatest)(e).pipe((0,s.map)((e=>this.joinResults(e,n,c)))))),(0,s.filter)((()=>this.allOngoingQueriesGotInitialResult(c))),(0,a.startWith)(void 0),(0,a.pairwise)(),(0,s.filter)((([e,t])=>!o.isEqual(e,t))),(0,s.map)((([e,t])=>t)),i?(0,a.tap)():(0,a.take)(1),(0,a.finalize)((()=>{var e;c.dataSubject.complete(),c.done=!0,this.completeAllSupportedQueries(c).then(),null===(e=c.allObservables)||void 0===e||e.complete()}))),f=this.collectAllObservables(c);return c.allObservables.next(f),l})).pipe((0,a.share)())}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestIdMapping(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r)}async waitForAllQueriesToFinish(){return(0,a.firstValueFrom)(this.inflightQueriesCount.pipe((0,s.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientIdService.getClientId(),t);e.dataSubject.pipe((0,a.finalize)((async()=>{if(e.unsubscribeBlockerCount.value>0&&await(0,a.firstValueFrom)((0,a.race)(this.destructManager.observeIsDestructing(),e.unsubscribeBlockerCount.pipe((0,s.filter)((e=>0===e))))),this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestIdMapping(t),this.ongoingQueries.delete(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,s,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:s,alias:t,query:e,subscribe:o,dataSubject:new a.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotInitialResponse:!1,isEmptyForJoin:!1,unsubscribeBlockerCount:new a.BehaviorSubject(0),queryRegistered:new a.BehaviorSubject(!1),done:!1,isInFlight:!1,forceFetchFromServer:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const a=i.leftAlias;if(a!==t&&e!==t)continue;const s=a===t?e:a;if(a===t){const e=this.createOngoingQueryGraph(r[s],s,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[s],s,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.dataSubject.pipe((0,s.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),a=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;a.has(r)||(a.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const a=Object.keys(e[0]),s=n[t];if(!s||!a.includes(s.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[s.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[s.leftAlias])||void 0===o?void 0:o[s.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),s=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(s);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotInitialResponse:!1,dataSubject:new a.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServerOrUseParentQuery(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(s.conditions.push(...r),this.sendQueryToServerOrUseParentQuery(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotInitialResult(e){return!!e.isEmptyForJoin||!!e.gotInitialResponse&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotInitialResult(e))))}async completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),await(0,a.firstValueFrom)(e.unsubscribeBlockerCount.pipe((0,s.filter)((e=>0===e)))),e.dataSubject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.dataSubject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServerOrUseParentQuery(e){if(this.destructManager.isDestructing)return;const t=e.query,r=e.clientRequestId,n=(0,i.getQuerySubscriptionId)(this.clientIdService.getClientId(),r);this.queryMappingManager.addQuery(c,t,n).then(),this.ongoingQueries.set(r,e);const o=this.findValidParentQuery(e);o?this.useParentOngoingQuery(e,o).then():this.sendQueryToServer(e)}async useParentOngoingQuery(e,t){const r={clientRequestId:e.clientRequestId,query:e.query,parentClientRequestId:t.clientRequestId},n=new i.QueryContext(e.query);t.unsubscribeBlockerCount.next(t.unsubscribeBlockerCount.value+1);try{await(0,a.firstValueFrom)(t.queryRegistered.pipe((0,s.filter)(Boolean)))}catch(t){return e.dataSubject.error(t),e.queryRegistered.error(t),void(e.done=!0)}if(this.destructManager.isDestructing)return;if(e.done)return;this.rpcManager.post("query/register",r).catch((r=>{console.error("Query error",e.query,t.query,r),e.dataSubject.error(r),e.done=!0})).finally((()=>{t.unsubscribeBlockerCount.next(t.unsubscribeBlockerCount.value-1),e.isInFlight=!1}));const o=(0,a.race)(e.queryRegistered.pipe((0,s.filter)(Boolean),(0,a.delay)(2e3),(0,a.take)(1)),this.destructManager.observeIsDestructing().pipe((0,a.take)(1)));t.dataSubject.pipe((0,a.takeWhile)((()=>!e.done)),(0,a.takeUntil)(o),(0,a.tap)((()=>{e.gotInitialResponse||this.setGotInitialResult(e.clientRequestId)})),(0,s.map)((e=>e.filter((e=>n.documentMatchesQuery(e)))))).subscribe({next:t=>{for(const r of t)this.setClientRequestIdsForLocalDoc((0,i.getSquidDocId)(r.__docId__,e.query.collectionName,e.query.integrationId),r);this.notifyAllSubscriptions([e.clientRequestId])},error:t=>e.dataSubject.error(t)})}sendQueryToServer(e){const t={query:e.query,clientRequestId:e.clientRequestId,subscribe:e.subscribe};this.safeToSendQueriesToServer.pipe((0,s.filter)(Boolean),(0,a.take)(1)).subscribe((()=>{e.done||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),e.isInFlight=!0,this.rpcManager.post("query/query",t).catch((t=>{e.dataSubject.error(t),e.done=!0,e.queryRegistered.error("query failed")})).then((()=>{e.queryRegistered.next(!0)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1),e.isInFlight=!1})))}))}refreshOngoingQueries(){for(const e of this.ongoingQueries.values())this.sendQueryToServerOrUseParentQuery(e)}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const a=this.getConditionStatePath(t,o),s=[...this.stateService.getStateInPath(a)||[]];if((0,i.insertSorted)(s,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(a,s)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}removeLocalDevAppData(e){return Promise.resolve(void 0)}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),a=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o,s){this.rpcEndpoint=e,this.socketManager=t,this.destructManager=r,this.headers=n,this.authManager=o,this.clientIdService=s,this.staticHeaders={},this.onGoingRpcCounter=new a.BehaviorSubject(0),(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);const u=this.authManager.getApiKey();u&&this.setStaticHeader("Authorization",`ApiKey ${u}`),this.clientIdService.observeClientId().subscribe((e=>{e?this.setStaticHeader("x-squid-clientId",e):this.deleteStaticHeader("x-squid-clientId")})),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authManager.observeAuthIdToken().subscribe((e=>{if(e.token){let t=`Bearer ${e.token}`;e.integrationId&&(t+=`; IntegrationId ${e.integrationId}`),this.setStaticHeader("Authorization",t)}else this.deleteStaticHeader("Authorization")})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,a.firstValueFrom)(this.onGoingRpcCounter.pipe((0,a.filter)((e=>0===e))))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){this.onGoingRpcCounter.next(this.onGoingRpcCounter.value+1);try{await(0,a.firstValueFrom)((0,a.race)(this.socketManager.observeConnectionReady().pipe((0,a.filter)(Boolean)),this.destructManager.observeIsDestructing())),await this.authManager.waitForReadyState();let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders));const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let u,c;try{u=await n.text();try{c=JSON.parse(u)}catch(e){}}catch(e){u="Cannot read body"}if(!n.ok)throw new s(n.status,n.statusText,n.headers,n.url,null==c?void 0:c.message);return c||u}finally{this.onGoingRpcCounter.next(this.onGoingRpcCounter.value-1)}}};class s extends Error{constructor(e,t,r,n,i){super(i||`RPC error ${e} ${t} calling ${n}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n}}t.RpcError=s},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),a=r(266);t.SocketManager=class{constructor(e,t,r=a.NOOP_FN,n,o={},s){this.clientIdService=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.authManager=s,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.clientTooOldThreshold=3e5,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o)),this.connectionReady.pipe((0,i.skip)(1),(0,i.filter)((e=>!e)),(0,i.switchMap)((()=>(0,i.race)((0,i.timer)(this.clientTooOldThreshold),this.connectionReady.pipe((0,i.filter)(Boolean)),this.destructManager.observeIsDestructing())))).subscribe((()=>{this.connectionReady.value||this.destructManager.isDestructing||(this.clientIdService.notifyClientTooOld(),this.connect(Object.assign({},o)))})),this.connectionReady.pipe((0,i.filter)(Boolean)).subscribe((()=>{this.clientIdService.isClientTooOld()&&this.clientIdService.notifyClientReadyToBeRegenerated()}))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){this.authManager.waitForReadyState().then((()=>{(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{const t=this.authManager.getAuthToken();(0,n.truthy)(this.socket).emit("message",Object.assign(Object.assign({},e),{authToken:t}))}))}))}connect(e){const t={clientId:this.clientIdService.getClientId()};this.socket=(0,o.io)(this.socketIoEndpoint,{query:t,reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),a=r(5969),s=r(4268),u=r(9526),c=r(8862),l=r(7378),f=r(1600),d=r(4967),p=r(7787),h=r(4605),y=n.__importDefault(r(2256)),v=r(2417),m=r(5182),b=r(5621),g=r(7718),_=r(9194),O=r(9732),w=r(6891),S=r(4661),E=r(602),I=r(3474),P=r(136);class T{constructor(e){this.destructManager=new p.DestructManager,this.setAuthIdToken=(e,t)=>{this.authManager.setAuthIdToken(e,t)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.ai=()=>(this.validateNotDestructed(),{assistant:e=>this.aiClientFactory.getAssistant(e)}),this.acquireLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructing)return this.destructManager.destruct().finally((()=>{const e=Object.entries(T.squidInstancesMap).find((([,e])=>e===this));e&&delete T.squidInstancesMap[e[0]]}))},this.connectionDetails=()=>(this.validateNotDestructed(),this._connectionDetails),this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t="prod"!==e.environmentId&&e.squidDeveloperId,r=(0,i.appIdWithEnvironmentIdAndDevId)(e.appId,e.environmentId,t?e.squidDeveloperId:void 0),n=(0,i.getApplicationUrl)(e.region,r),j=(0,i.getApplicationHttpHeaders)(e.region,r);this.clientIdService=new l.ClientIdService(this.destructManager),this.authManager=new u.AuthManager(this.destructManager,e.apiKey),this.socketManager=new I.SocketManager(this.clientIdService,n,e.messageNotificationWrapper,this.destructManager,j,this.authManager),this.rpcManager=new E.RpcManager(n,this.socketManager,this.destructManager,j,this.authManager,this.clientIdService),this.documentStore=new m.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new h.DistributedLockManager(this.socketManager,this.destructManager),this.documentIdentityService=new y.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new v.DocumentReferenceFactory,this.querySubscriptionManager=new S.QuerySubscriptionManager(this.rpcManager,this.clientIdService,this.documentStore,this.destructManager,this.documentIdentityService);const A=new g.MutationSender(this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new w.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new O.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new f.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new d.DataManager(this.documentStore,A,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new c.BackendFunctionManager(this.clientIdService,this.rpcManager,this.socketManager),this.namedQueryManager=new _.NamedQueryManager(this.rpcManager,this.socketManager),this.apiManager=new s.ApiManager(this.clientIdService,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new b.GraphQLClientFactory(this.rpcManager),this.aiClientFactory=new a.AiClientFactory(this.rpcManager,this.socketManager),this._connectionDetails=new P.ConnectionDetails(this.clientIdService,this.socketManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=T.squidInstancesMap[t];return r||(r=new T(e),T.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(T.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructing,"The client was already destructed.")}}t.Squid=T,T.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return a(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return s(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function a(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const s=a(o,n);return s===o?e:u(e,r,s)}function s(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],a=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,s(f,l,a,n)):s(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),a=r(1496),s=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new s.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:a.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new s.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,a.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:a.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:a.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,s.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>I,__asyncGenerator:()=>E,__asyncValues:()=>P,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>k,__classPrivateFieldIn:()=>N,__classPrivateFieldSet:()=>M,__createBinding:()=>v,__decorate:()=>s,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>x,__importStar:()=>A,__makeTemplateObject:()=>T,__metadata:()=>p,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>a,__runInitializers:()=>l,__setFunctionName:()=>d,__spread:()=>_,__spreadArray:()=>w,__spreadArrays:()=>O,__values:()=>b});var 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 i(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)}var o=function(){return o=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},o.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var v=(0,r[p])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=a(v.get))&&(f.get=s),(s=a(v.set))&&(f.set=s),(s=a(v.init))&&i.push(s)}else(s=a(v))&&("field"===u?i.push(s):f[c]=s)}l&&Object.defineProperty(l,n.name,f),d=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(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(a,s)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(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.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function O(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function w(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),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)}))}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return j(t,e),t}function x(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",s),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),d=r(r(a+"|"+t(l,s,"[\\:]"))+"*"),p=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(p+"\\."+p+"\\."+p+"\\."+p),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),O=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),w=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),I=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),P=r([m,b,g,_,O,w,S,E,I].join("|")),T=r(r(l+"|"+a)+"+"),j=(r(P+"\\%25"+T),r(P+r("\\%25|\\%(?!"+o+"{2})")+T)),A=r("[vV]"+o+"+\\."+t(l,s,"[\\:]")+"+"),x=r("\\["+r(j+"|"+P+"|"+A)+"\\]"),k=r(r(a+"|"+t(l,s))+"*"),M=r(x+"|"+h+"(?!"+k+")|"+k),N=r(i+"*"),D=r(r(d+"@")+"?"+M+r("\\:"+N)+"?"),R=r(a+"|"+t(l,s,"[\\:\\@]")),C=r(R+"*"),F=r(R+"+"),$=r(r(a+"|"+t(l,s,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r(F+q)+"?"),V=r($+q),U=r(F+q),Q="(?!"+R+")",z=(r(q+"|"+L+"|"+V+"|"+U+"|"+Q),r(r(R+"|"+t("[\\/\\?]",c))+"*")),B=r(r(R+"|[\\/\\?]")+"*"),W=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+Q),Y=r(f+"\\:"+W+r("\\?"+z)+"?"+r("\\#"+B)+"?"),K=r(r("\\/\\/"+D+q)+"|"+L+"|"+V+"|"+Q),H=r(K+r("\\?"+z)+"?"+r("\\#"+B)+"?");return r(Y+"|"+H),r(f+"\\:"+W+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+d+")@")+"?("+M+")"+r("\\:("+N+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+Q+")"),r("\\?("+z+")"),r("\\#("+B+")"),r(r("\\/\\/("+r("("+d+")@")+"?("+M+")"+r("\\:("+N+")")+"?)")+"?("+q+"|"+L+"|"+V+"|"+Q+")"),r("\\?("+z+")"),r("\\#("+B+")"),r(r("\\/\\/("+r("("+d+")@")+"?("+M+")"+r("\\:("+N+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+Q+")"),r("\\?("+z+")"),r("\\#("+B+")"),r("("+d+")@"),r("\\:("+N+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+P+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+T+")")+"?\\]?$")}}var a=o(!1),s=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(p,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},O=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},w=function(e){var t,r=[],n=e.length,i=0,o=128,a=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=s>0?s+1:0;f<n;){for(var d=i,p=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/p))&&m("overflow"),i+=v*p;var b=h<=a?1:h>=a+26?26:h-a;if(v<b)break;var g=l-b;p>y(c/g)&&m("overflow"),p*=g}var _=r.length+1;a=O(i-d,_,0==d),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,a=!0,s=!1,u=void 0;try{for(var f,d=e[Symbol.iterator]();!(a=(f=d.next()).done);a=!0){var p=f.value;p<128&&t.push(v(p))}}catch(e){s=!0,u=e}finally{try{!a&&d.return&&d.return()}finally{if(s)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var w=c,S=!0,E=!1,I=void 0;try{for(var P,T=e[Symbol.iterator]();!(S=(P=T.next()).done);S=!0){var j=P.value;j>=n&&j<w&&(w=j)}}catch(e){E=!0,I=e}finally{try{!S&&T.return&&T.return()}finally{if(E)throw I}}var A=b+1;w-n>y((c-i)/A)&&m("overflow"),i+=(w-n)*A,n=w;var x=!0,k=!1,M=void 0;try{for(var N,D=e[Symbol.iterator]();!(x=(N=D.next()).done);x=!0){var R=N.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,F=l;;F+=l){var $=F<=o?1:F>=o+26?26:F-o;if(C<$)break;var q=C-$,L=l-$;t.push(v(_($+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=O(i,A,b==h),i=0,++b}}}catch(e){k=!0,M=e}finally{try{!x&&D.return&&D.return()}finally{if(k)throw M}}++i,++n}return t.join("")},E={version:"2.1.0",ucs2:{decode:g,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(e))}},decode:w,encode:S,toASCII:function(e){return b(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return b(e,(function(e){return f.test(e)?w(e.slice(4).toLowerCase()):e}))}},I={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function T(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function j(e,t){function r(e){var r=T(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,i)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function x(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(A).join("."):e}function k(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(A):[],d=c.split(":").map(A),p=t.IPV4ADDRESS.test(d[d.length-1]),h=p?7:8,y=d.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||d[y+m]||"";p&&(v[h-1]=x(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),O=v.slice(b.index+b.length);g=_.join(":")+"::"+O.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,N=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?s:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){N?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=k(x(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=I[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)j(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E.toASCII(r.host.replace(n.PCT_ENCODED,T).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}j(r,a)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}var R=/^\.\.?\//,C=/^\/\.(\/|$)/,F=/^\/\.\.(\/|$)/,$=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var t=[];e.length;)if(e.match(R))e=e.replace(R,"");else if(e.match(C))e=e.replace(C,"/");else if(e.match(F))e=e.replace(F,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match($);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?s:a,n=[],i=I[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?E.toUnicode(e.host):E.toASCII(e.host.replace(r.PCT_ENCODED,T).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}j(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=function(e,t){var r=!1!==t.iri?s:a,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(k(x(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=q(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=D(L(e,r),r),t=D(L(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=q(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=q(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=q(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=q(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function U(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:a.PCT_ENCODED,T)}var Q={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},z={scheme:"https",domainHost:Q.domainHost,parse:Q.parse,serialize:Q.serialize};function B(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var W={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=B(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(B(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},Y={scheme:"wss",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize},K={},H="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",G="[0-9A-Fa-f]",J=r(r("%[EFef]"+G+"%"+G+G+"%"+G+G)+"|"+r("%[89A-Fa-f]"+G+"%"+G+G)+"|"+r("%"+G+G)),Z=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(H,"g"),ee=new RegExp(J,"g"),te=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Z),"g"),re=new RegExp(t("[^]",H,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=re;function ie(e){var t=T(e);return t.match(X)?t:e}var oe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),s=0,u=a.length;s<u;++s){var c=a[s].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,d=l.length;f<d;++f)n.push(l[f]);break;case"subject":r.subject=U(c[1],t);break;case"body":r.body=U(c[1],t);break;default:i=!0,o[U(c[0],t)]=U(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var p=0,h=n.length;p<h;++p){var y=n[p].split("@");if(y[0]=U(y[0]),t.unicodeSupport)y[1]=U(y[1],t).toLowerCase();else try{y[1]=E.toASCII(U(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var a=0,s=o.length;a<s;++a){var u=String(o[a]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(ee,ie).replace(ee,i).replace(te,P),f=u.slice(c+1);try{f=t.iri?E.toUnicode(f):E.toASCII(U(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[a]=l+"@"+f}n.path=o.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var p=[];for(var h in d)d[h]!==K[h]&&p.push(h.replace(ee,ie).replace(ee,i).replace(re,P)+"="+d[h].replace(ee,ie).replace(ee,i).replace(ne,P));return p.length&&(n.query=p.join("&")),n}},ae=/^([^\:]+)\:(.*)/,se={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ae),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],s=i+":"+(t.nid||o),u=I[s];n.nid=o,n.nss=a,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=I[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(n||t.nid)+":"+s,a}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ue)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};I[Q.scheme]=Q,I[z.scheme]=z,I[W.scheme]=W,I[Y.scheme]=Y,I[oe.scheme]=oe,I[se.scheme]=se,I[ce.scheme]=ce,e.SCHEMES=I,e.pctEncChar=P,e.pctDecChars=T,e.parse=D,e.removeDotSegments=q,e.serialize=L,e.resolveComponents=V,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return L(V(D(e,n),D(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=L(D(e,t),t):"object"===n(e)&&(e=D(L(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=L(D(e,r),r):"object"===n(e)&&(e=L(e,r)),"string"==typeof t?t=L(D(t,r),r):"object"===n(t)&&(t=L(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:a.ESCAPE,P)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>xn,ApolloClient:()=>An,ApolloError:()=>br,ApolloLink:()=>_e,Cache:()=>Tn,HttpLink:()=>wt,InMemoryCache:()=>Ai,MissingFieldError:()=>kn,NetworkStatus:()=>mr,Observable:()=>Y,ObservableQuery:()=>Pr,checkFetcher:()=>Ge,concat:()=>Ni,createHttpLink:()=>Ot,createSignalIfSupported:()=>mt,defaultDataIdFromObject:()=>Rn,defaultPrinter:()=>ht,disableExperimentalFragmentVariables:()=>Po,disableFragmentWarnings:()=>Eo,empty:()=>xi,enableExperimentalFragmentVariables:()=>Io,execute:()=>Oe,fallbackHttpConfig:()=>pt,from:()=>ki,fromError:()=>gt,fromPromise:()=>Ri,gql:()=>wo,isApolloError:()=>vr,isReference:()=>X,makeReference:()=>Z,makeVar:()=>mn,mergeOptions:()=>Pn,parseAndCheckHttpResponse:()=>He,resetCaches:()=>So,rewriteURIForGET:()=>bt,selectHttpOptionsAndBody:()=>yt,selectHttpOptionsAndBodyInternal:()=>vt,selectURI:()=>Fe,serializeFetchParameter:()=>Ce,setLogVerbosity:()=>d,split:()=>Mi,throwServerError:()=>ze,toPromise:()=>Di});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,a(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new s(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l)return(console[e]||console.log).apply(console,arguments)}}function d(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function p(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=p((function(){return globalThis}))||p((function(){return window}))||p((function(){return self}))||p((function(){return global}))||p((function(){return p.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==p((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function O(e,t){if(!Boolean(e))throw new Error(t)}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);const w=10,S=2;function E(e){return I(e,[])}function I(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:I(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>S)return"[Array]";const r=Math.min(w,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(I(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>S)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+I(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}class P{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||O(!1,`Body must be a string. Received: ${E(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||O(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||O(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var x=function(){return"function"==typeof Symbol},k=function(e){return x()&&Boolean(Symbol[e])},M=function(e){return k(e)?Symbol[e]:"@@"+e};x()&&!k("observable")&&(Symbol.observable=Symbol("observable"));var N=M("iterator"),D=M("observable"),R=M("species");function C(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function F(e){var t=e.constructor;return void 0!==t&&null===(t=t[R])&&(t=void 0),void 0!==t?t:Y}function $(e){return e instanceof Y}function q(e){q.log?q.log(e):setTimeout((function(){throw e}))}function L(e){Promise.resolve().then((function(){try{e()}catch(e){q(e)}}))}function V(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=C(t,"unsubscribe");r&&r.call(t)}}catch(e){q(e)}}function U(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function Q(e,t,r){e._state="running";var n=e._observer;try{var i=C(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(U(e),!i)throw r;i.call(n,r);break;case"complete":U(e),i&&i.call(n)}}catch(e){q(e)}"closed"===e._state?V(e):"running"===e._state&&(e._state="ready")}function z(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void L((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(Q(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void Q(e,t,r);e._queue.push({type:t,value:r})}}var B=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new W(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(U(this),V(this))},A(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),W=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){z(this._subscription,"next",e)},t.error=function(e){z(this._subscription,"error",e)},t.complete=function(){z(this._subscription,"complete")},A(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Y=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new B(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(F(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(F(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=F(this),n=arguments.length>1,i=!1,o=arguments[1];return new r((function(r){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=F(this);return new i((function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=F(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[D]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=C(t,D);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return $(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(k("iterator")&&(n=C(t,N)))return new r((function(e){L((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){L((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)((function(e){L((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},A(e,null,[{key:R,get:function(){return this}}]),e}();function K(e){return null!==e&&"object"==typeof e}function H(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new s("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new s(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function G(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function J(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function Z(e){return{__ref:String(e)}}function X(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function ee(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return ee(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return ee(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new s('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new s(55);e[t.value]=null}}x()&&Object.defineProperty(Y,Symbol("extensions"),{value:{symbol:D,hostReportError:q},configurable:!0});var te=["connection","include","skip","client","rest","export"],re=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(ne(i),")")}return r.connection.key}var o=e;if(t){var a=ne(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach((function(e){-1===te.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(ne(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=ne;return ne=e,t}}),ne=function(e){return JSON.stringify(e,ie)};function ie(e,t){return K(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function oe(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return ee(r,n,i,t)})),r}return null}function ae(e){return e.alias?e.alias.value:e.name.value}function se(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(ue(o)){if("__typename"===o.name.value)return e[ae(o)]}else{var a=se(e,J(o,r).selectionSet,r);if("string"==typeof a)return a}}}function ue(e){return"Field"===e.kind}function ce(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new s('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new s(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function le(e){return ce(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function fe(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function de(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function pe(e){var t=le(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function he(e){var t;ce(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new s("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new s(54)}function ye(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&ee(t,e.variable.name,e.defaultValue)})),t}function ve(e,t){return t?t(e):Y.of()}function me(e){return"function"==typeof e?new _e(e):e}function be(e){return e.request.length<=1}var ge=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),_e=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Y.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(me).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=me(r),o=me(n||new e(ve));return be(i)&&be(o)?new e((function(e){return t(e)?i.request(e)||Y.of():o.request(e)||Y.of()})):new e((function(e,r){return t(e)?i.request(e,r)||Y.of():o.request(e,r)||Y.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?fe(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new s("illegal argument: ".concat(i)):new s(27)}return e}(t))))||Y.of()},e.concat=function(t,r){var n=me(t);if(be(n))return __DEV__&&u.warn(new ge("You are calling concat on a terminating link, which will have no effect",n)),n;var i=me(r);return be(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||Y.of()}))||Y.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||Y.of()}))||Y.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(ve)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new s("request is not implemented"):new s(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),Oe=_e.execute;class we{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Se{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Ee={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ie=new Set(Object.keys(Ee));function Pe(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Ie.has(t)}var Te,je,Ae;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Te||(Te={})),(Ae=je||(je={})).NAME="Name",Ae.DOCUMENT="Document",Ae.OPERATION_DEFINITION="OperationDefinition",Ae.VARIABLE_DEFINITION="VariableDefinition",Ae.SELECTION_SET="SelectionSet",Ae.FIELD="Field",Ae.ARGUMENT="Argument",Ae.FRAGMENT_SPREAD="FragmentSpread",Ae.INLINE_FRAGMENT="InlineFragment",Ae.FRAGMENT_DEFINITION="FragmentDefinition",Ae.VARIABLE="Variable",Ae.INT="IntValue",Ae.FLOAT="FloatValue",Ae.STRING="StringValue",Ae.BOOLEAN="BooleanValue",Ae.NULL="NullValue",Ae.ENUM="EnumValue",Ae.LIST="ListValue",Ae.OBJECT="ObjectValue",Ae.OBJECT_FIELD="ObjectField",Ae.DIRECTIVE="Directive",Ae.NAMED_TYPE="NamedType",Ae.LIST_TYPE="ListType",Ae.NON_NULL_TYPE="NonNullType",Ae.SCHEMA_DEFINITION="SchemaDefinition",Ae.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Ae.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Ae.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Ae.FIELD_DEFINITION="FieldDefinition",Ae.INPUT_VALUE_DEFINITION="InputValueDefinition",Ae.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Ae.UNION_TYPE_DEFINITION="UnionTypeDefinition",Ae.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Ae.ENUM_VALUE_DEFINITION="EnumValueDefinition",Ae.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Ae.DIRECTIVE_DEFINITION="DirectiveDefinition",Ae.SCHEMA_EXTENSION="SchemaExtension",Ae.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Ae.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Ae.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Ae.UNION_TYPE_EXTENSION="UnionTypeExtension",Ae.ENUM_TYPE_EXTENSION="EnumTypeExtension",Ae.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const xe=Object.freeze({});function ke(e,t,r=Ee){const n=new Map;for(const e of Object.values(je))n.set(e,Me(t,e));let i,o,a,s=Array.isArray(e),u=[e],c=-1,l=[],f=e;const d=[],p=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===p.length?void 0:d[d.length-1],f=a,a=p.pop(),m)if(s){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(a){if(o=s?c:u[c],f=a[o],null==f)continue;d.push(o)}let b;if(!Array.isArray(f)){var h,y;Pe(f)||O(!1,`Invalid AST Node: ${E(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,a,d,p),b===xe)break;if(!1===b){if(!e){d.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Pe(b)){d.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?d.pop():(i={inArray:s,index:c,keys:u,edits:l,prev:i},s=Array.isArray(f),u=s?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],a&&p.push(a),a=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Me(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ne(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function De(e,t,r){var n=new Set(e),i=n.size;return ke(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return xe}}),r?!n.size:n.size<i}function Re(e){return e&&De(["client","export"],e,!0)}var Ce=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new s("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new s(24);throw n.parseError=e,n}return r},Fe=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},$e="function"==typeof WeakMap&&"ReactNative"!==p((function(){return navigator.product})),qe="function"==typeof WeakSet,Le="function"==typeof Symbol&&"function"==typeof Symbol.for,Ve=Le&&Symbol.asyncIterator;function Ue(e){var t={next:function(){return e.read()}};return Ve&&(t[Symbol.asyncIterator]=function(){return this}),t}function Qe(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,Ve&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Ue(o.getReader());if(function(e){return!!e.stream}(o))return Ue(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},Ve&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function a(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",a),e.on("error",s),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return Ve&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}p((function(){return window.document.createElement})),p((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var ze=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Be=Object.prototype.hasOwnProperty;function We(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function Ye(e,t){e.status>=300&&ze(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function Ke(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function He(e){return function(t){return t.text().then((function(e){return Ye(t,e)})).then((function(r){return t.status>=300&&ze(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Be.call(r,"data")||Be.call(r,"errors")||ze(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var Ge=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new s("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new s(23)};function Je(e){return 9===e||32===e}function Ze(e){return e>=48&&e<=57}function Xe(e){return e>=97&&e<=122||e>=65&&e<=90}function et(e){return Xe(e)||95===e}function tt(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const a=e[t],s=rt(a);s!==a.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&s<r&&(r=s))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function rt(e){let t=0;for(;t<e.length&&Je(e.charCodeAt(t));)++t;return t}const nt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function it(e){return ot[e.charCodeAt(0)]}const ot=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function at(e){return ke(e,st)}const st={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ut(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=lt("(",ut(e.variableDefinitions,", "),")"),r=ut([e.operation,ut([e.name,t]),ut(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+lt(" = ",r)+lt(" ",ut(n," "))},SelectionSet:{leave:({selections:e})=>ct(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=lt("",e,": ")+t;let a=o+lt("(",ut(r,", "),")");return a.length>80&&(a=o+lt("(\n",ft(ut(r,"\n")),"\n)")),ut([a,ut(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+lt(" ",ut(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>ut(["...",lt("on ",e),ut(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${lt("(",ut(r,", "),")")} on ${t} ${lt("",ut(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Je(e.charCodeAt(0)))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,u=e.endsWith("\\"),c=s||u,l=!i||e.length>70||c||o||a;let f="";const d=i&&Je(e.charCodeAt(0));return(l&&!d||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(nt,it)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ut(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ut(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+lt("(",ut(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>lt("",e,"\n")+ut(["schema",ut(t," "),ct(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>lt("",e,"\n")+ut(["scalar",t,ut(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>lt("",e,"\n")+ut(["type",t,lt("implements ",ut(r," & ")),ut(n," "),ct(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>lt("",e,"\n")+t+(dt(r)?lt("(\n",ft(ut(r,"\n")),"\n)"):lt("(",ut(r,", "),")"))+": "+n+lt(" ",ut(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>lt("",e,"\n")+ut([t+": "+r,lt("= ",n),ut(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>lt("",e,"\n")+ut(["interface",t,lt("implements ",ut(r," & ")),ut(n," "),ct(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>lt("",e,"\n")+ut(["union",t,ut(r," "),lt("= ",ut(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>lt("",e,"\n")+ut(["enum",t,ut(r," "),ct(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>lt("",e,"\n")+ut([t,ut(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>lt("",e,"\n")+ut(["input",t,ut(r," "),ct(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>lt("",e,"\n")+"directive @"+t+(dt(r)?lt("(\n",ft(ut(r,"\n")),"\n)"):lt("(",ut(r,", "),")"))+(n?" repeatable":"")+" on "+ut(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ut(["extend schema",ut(e," "),ct(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ut(["extend scalar",e,ut(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ut(["extend type",e,lt("implements ",ut(t," & ")),ut(r," "),ct(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ut(["extend interface",e,lt("implements ",ut(t," & ")),ut(r," "),ct(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>ut(["extend union",e,ut(t," "),lt("= ",ut(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>ut(["extend enum",e,ut(t," "),ct(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>ut(["extend input",e,ut(t," "),ct(r)]," ")}};function ut(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function ct(e){return lt("{\n",ft(ut(e,"\n")),"\n}")}function lt(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ft(e){return lt(" ",e.replace(/\n/g,"\n "))}function dt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var pt={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},ht=function(e,t){return t(e)};function yt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),vt.apply(void 0,(0,n.__spreadArray)([e,ht],r,!1))}function vt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},a={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),a=(0,n.__assign)((0,n.__assign)({},a),e.http)})),o.headers&&(o.headers=function(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}(o.headers,a.preserveHeaderCase));var s=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:s,variables:c};return a.includeExtensions&&(f.extensions=u),a.includeQuery&&(f.query=t(l,at)),{options:o,body:f}}var mt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function bt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=Ce(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=Ce(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+r.join("&")+a}}function gt(e){return new Y((function(t){t.error(e)}))}var _t=p((function(){return fetch})),Ot=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,a=void 0===o?ht:o,s=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,d=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&Ge(i||_t);var h={http:{includeExtensions:s,preserveHeaderCase:u},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new _e((function(e){var t=Fe(e,r),o=e.getContext(),s={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,d=u.version;l&&(s["apollographql-client-name"]=l),d&&(s["apollographql-client-version"]=d)}var y,v=(0,n.__assign)((0,n.__assign)({},s),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=vt(e,a,pt,h,m),g=b.options,_=b.body;if(_.variables&&!f){var O=new Set(Object.keys(_.variables));ke(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&O.delete(e.name.value)}}),O.size&&(_.variables=(0,n.__assign)({},_.variables),O.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var w=mt(),S=w.controller,E=w.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),De(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var I=bt(t,_),P=I.newURI,T=I.parseError;if(T)return gt(T);t=P}else try{g.body=Ce(_,"Payload")}catch(T){return gt(T)}return new Y((function(r){return(i||p((function(){return fetch}))||_t)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var a,s,u,c,l,f,d,p,h,y,v,m,b,g,_,O,w,S,E,I;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");a=new TextDecoder("utf-8"),s=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==s?void 0:s.includes(u))?null==s?void 0:s.substring((null==s?void 0:s.indexOf(u))+9).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",d=Qe(e),p=!0,n.label=1;case 1:return p?[4,d.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:a.decode(y),p=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,I=[f.slice(0,b),f.slice(b+l.length)],f=I[1],(g=I[0]).trim()){if(_=g.indexOf("\r\n\r\n"),O=We(g.slice(0,_)),(w=O["content-type"])&&-1===w.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=Ye(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){Ke(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){He(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return Ke(e,r)}))}(t,e,r)})).catch((function(e){return Ke(e,r)})),function(){y&&y.abort()}}))}))},wt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,Ot(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(_e),St=Object.prototype,Et=St.toString,It=St.hasOwnProperty,Pt=Function.prototype.toString,Tt=new Map;function jt(e,t){try{return At(e,t)}finally{Tt.clear()}}function At(e,t){if(e===t)return!0;var r,n,i,o=Et.call(e);if(o!==Et.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Nt(e,t))return!0;var a=xt(e),s=xt(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!It.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!At(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(Nt(e,t))return!0;for(var f=e.entries(),d="[object Map]"===o;;){var p=f.next();if(p.done)break;var h=p.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(d&&!At(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Pt.call(e);return b===Pt.call(t)&&(n=Mt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function xt(e){return Object.keys(e).filter(kt,e)}function kt(e){return void 0!==this[e]}var Mt="{ [native code] }";function Nt(e,t){var r=Tt.get(e);if(r){if(r.has(t))return!0}else Tt.set(e,r=new Set);return r.add(t),!1}var Dt=Array.isArray;function Rt(e){return Array.isArray(e)&&e.length>0}var Ct=Object.prototype.hasOwnProperty;function Ft(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $t(e)}function $t(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Lt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var qt=function(e,t,r){return this.merge(e[r],t[r])},Lt=function(){function e(e){void 0===e&&(e=qt),this.reconciler=e,this.isObject=K,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return K(t)&&K(e)?(Object.keys(t).forEach((function(o){if(Ct.call(e,o)){var a=e[o];if(t[o]!==a){var s=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));s!==a&&((e=r.shallowCopyForMerge(e))[o]=s)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return K(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Vt(e){return"incremental"in e}function Ut(e,t){var r=e,n=new Lt;return Vt(t)&&Rt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}r=n.merge(r,t)})),r}var Qt,zt,Bt=function(){return Object.create(null)},Wt=Array.prototype,Yt=Wt.forEach,Kt=Wt.slice,Ht=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Bt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Yt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Kt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Gt=function(){function e(){this.known=new(qe?WeakSet:Set),this.pool=new Ht($e),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return K(e)&&this.known.has(e)},e.prototype.pass=function(e){if(K(e)){var t=function(e){return K(e)?Dt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(K(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(s=this.pool.lookupArray(n)).array||(this.known.add(s.array=n),__DEV__&&Object.freeze(n)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Jt=Object.assign((function(e){if(K(e)){void 0===Qt&&Zt();var t=Qt.admit(e),r=zt.get(t);return void 0===r&&zt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Zt});function Zt(){Qt=new Gt,zt=new($e?WeakMap:Map)}function Xt(e,t,r){return new Y((function(n){var i=n.next,o=n.error,a=n.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--s,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,s||a&&a.call(n)}},d=e.subscribe(f);return function(){return d.unsubscribe()}}))}function er(e){return Rt(tr(e))}function tr(e){var t=Rt(e.errors)?e.errors.slice(0):[];return Vt(e)&&Rt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var rr={kind:je.FIELD,name:{kind:je.NAME,value:"__typename"}};function nr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===je.FRAGMENT_SPREAD&&nr(t[e.name.value],t)}))}function ir(e){return nr(le(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),G(de(e)))?null:e}function or(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function ar(e,t){for(var r=or(""),i=or(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Dt(n)){if(n.kind===je.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===je.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},a=0,s=t.definitions.length-1;s>=0;--s)t.definitions[s].kind===je.OPERATION_DEFINITION&&++a;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},d=new Map,p=!1,h={enter:function(e){if(f(e.directives))return p=!0,null}},y=ke(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var a=o(i);a&&a.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return p=!0,null;var a=o(i);a&&a.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){d.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===d.get(JSON.stringify(n))?e:a>0&&e.selectionSet.selections.every((function(e){return e.kind===je.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,p=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return p=!0,null}}});if(!p)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===je.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==je.FRAGMENT_DEFINITION||0!==a||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return ir(ke(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var sr=Object.assign((function(e){return ke(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==je.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return ue(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(ue(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[rr],!1)})}}}}})}),{added:function(e){return e===rr}}),ur={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function cr(e){return"query"===he(e).operation?e:ke(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var lr=new Map;function fr(e){var t=lr.get(e)||1;return lr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function dr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function pr(e){function t(t){Object.defineProperty(e,t,{value:Y})}return Le&&Symbol.species&&t(Symbol.species),t("@@species"),e}function hr(e){return e&&"function"==typeof e.then}var yr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),dr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),dr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?hr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),dr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new Y(t)]),hr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(Y);function vr(e){return e.hasOwnProperty("graphQLErrors")}pr(yr);var mr,br=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.clientErrors,s=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(Rt((n=l).graphQLErrors)||Rt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function gr(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(mr||(mr={}));var _r=Object.prototype.toString;function Or(e){return wr(e)}function wr(e,t){switch(_r.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=wr(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=wr(e[r],t)})),n;default:return e}}function Sr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Er=Object.assign,Ir=Object.hasOwnProperty,Pr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,a=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=jr)}catch(e){}var r=!a.observers.size;a.observers.add(e);var n=a.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&a.reobserve().catch((function(){})),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}}))||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=r,a.isTornDown=!1;var s=r.defaultOptions.watchQuery,u=(void 0===s?{}:s).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,d=o.initialFetchPolicy,p=void 0===d?"standby"===f?c:f:d;a.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:p,fetchPolicy:f}),a.queryId=i.queryId||r.generateQueryId();var h=le(a.query);return a.queryName=h&&h.name&&h.name.value,a}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||mr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:gr(r),networkStatus:r}),o=this.options.fetchPolicy,a=void 0===o?"cache-first":o;if("network-only"===a||"no-cache"===a||"standby"===a||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var s=this.queryInfo.getDiff();(s.complete||this.options.returnPartialData)&&(i.data=s.result),jt(i.data,{})&&(i.data=void 0),s.complete?(delete i.partial,!s.complete||i.networkStatus!==mr.loading||"cache-first"!==a&&"cache-only"!==a||(i.networkStatus=mr.ready,i.loading=!1)):i.partial=!0,!__DEV__||s.complete||this.options.partialRefetch||i.loading||i.data||i.error||Ar(s.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!jt(this.last.result,e)||t&&!jt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||jt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Ir.call(e,"variables")){var o=pe(this.query),a=o.variableDefinitions;a&&a.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!jt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,mr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,a=o.networkStatus;o.networkStatus=mr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var s=new Set;return this.queryManager.fetchQuery(i,r,mr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===mr.fetchMore&&(o.networkStatus=a),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){s.add(e.query)}}),n})).finally((function(){s.has(t.query)||Tr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return jt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},mr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(gr(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},mr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:Or(e),variables:t}),Rt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===mr.refetch||t===mr.fetchMore||t===mr.poll,o=this.options.variables,a=this.options.fetchPolicy,s=Sr(this.options,e||{}),u=i?s:Er(this.options,s);i||(this.updatePolling(),e&&e.variables&&!jt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===a&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=mr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),dr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:mr.error,loading:!1});this.updateLastResult(r,t),dr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Y);function Tr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function jr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function Ar(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function xr(e){return e.kind===je.FIELD||e.kind===je.FRAGMENT_SPREAD||e.kind===je.INLINE_FRAGMENT}pr(Pr);var kr=null,Mr={},Nr=1;function Dr(e){try{return e()}catch(e){}}var Rr="@wry/context:Slot",Cr=Dr((function(){return globalThis}))||Dr((function(){return r.g}))||Object.create(null),Fr=Cr[Rr]||Array[Rr]||function(e){try{Object.defineProperty(Cr,Rr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",Nr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=kr;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Mr)break;return e!==kr&&(kr.slots[this.id]=t),!0}return kr&&(kr.slots[this.id]=Mr),!1},e.prototype.getValue=function(){if(this.hasValue())return kr.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=kr;kr={parent:a,slots:o};try{return t.apply(n,r)}finally{kr=a}},e.bind=function(e){var t=kr;return function(){var r=kr;try{return kr=t,e.apply(this,arguments)}finally{kr=r}}},e.noContext=function(e,t,r){if(!kr)return e.apply(r,t);var n=kr;try{return kr=null,e.apply(r,t)}finally{kr=n}},e}());function $r(){}Fr.bind,Fr.noContext;var qr,Lr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=$r),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Vr=new Fr,Ur=Object.prototype.hasOwnProperty,Qr=void 0===(qr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:qr;function zr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Br=[],Wr=100;function Yr(e,t){if(!e)throw new Error(t||"assertion failure")}function Kr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Hr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Zr(this))return Gr(this),this.value[0]},e.prototype.recompute=function(e){return Yr(!this.recomputing,"already recomputing"),Gr(this),Zr(this)?function(e,t){return an(e),Vr.withValue(e,Jr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{zr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Zr(e)||en(e)}(e),Kr(e.value)}(this,e):Kr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Xr(this),zr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),an(this),tn(this,(function(t,r){t.setDirty(),sn(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Br.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Qr(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),Br.push(this.deps),this.deps=null)},e.count=0,e}();function Gr(e){var t=Vr.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Zr(e)?rn(t,e):nn(t,e),t}function Jr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Zr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Xr(e){tn(e,rn)}function en(e){tn(e,nn)}function tn(e,t){var r=e.parents.size;if(r)for(var n=Qr(e.parents),i=0;i<r;++i)t(n[i],e)}function rn(e,t){Yr(e.childValues.has(t)),Yr(Zr(t));var r=!Zr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Br.pop()||new Set;e.dirtyChildren.add(t),r&&Xr(e)}function nn(e,t){Yr(e.childValues.has(t)),Yr(!Zr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),on(e,t),Zr(e)||en(e)}function on(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(Br.length<Wr&&Br.push(r),e.dirtyChildren=null))}function an(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){sn(e,r)})),e.forgetDeps(),Yr(null===e.dirtyChildren)}function sn(e,t){t.parents.delete(e),e.childValues.delete(t),on(e,t)}var un={setDirty:!0,dispose:!0,forget:!0};function cn(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Vr.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(zr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Ur.call(un,r)?r:"setDirty";Qr(n).forEach((function(e){return e[i]()})),t.delete(e),zr(n)}},n}function ln(){var e=new Ht("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}ln();var fn=new Set;function dn(e,t){void 0===t&&(t=Object.create(null));var r=new Lr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||ln(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=r.get(o);a||(r.set(o,a=new Hr(e)),a.subscribe=t.subscribe,a.forget=function(){return r.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return r.set(o,a),fn.add(r),Vr.hasValue()||(fn.forEach((function(e){return e.clean()})),fn.clear()),s};function a(e){var t=r.get(e);t&&t.setDirty()}function s(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var pn=new Fr,hn=new WeakMap;function yn(e){var t=hn.get(e);return t||hn.set(e,t={vars:new Set,dep:cn()}),t}function vn(e){yn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function mn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){yn(e).dep.dirty(n),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)}));var a=Array.from(r);r.clear(),a.forEach((function(t){return t(e)}))}}else{var s=pn.getValue();s&&(i(s),yn(s).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),yn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}var bn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Ft(t.resolvers,e)})):this.resolvers=Ft(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,s).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return De(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return ce(e),ar([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return ke(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return xe}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:cr(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,a){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var s,u,c,l,f,d,p,h,y,v;return(0,n.__generator)(this,(function(m){return s=he(e),u=de(e),c=G(u),l=this.collectSelectionsToResolve(s,c),f=s.operation,d=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(p=this).cache,y=p.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:d,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,a,s,c,l,f=this;return(0,n.__generator)(this,(function(d){return o=i.fragmentMap,a=i.context,s=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&Ne(e,s)?ue(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[ae(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,a))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return $t(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,a,s,u,c,l,f,d,p,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,a=e.name.value,s=ae(e),u=a!==s,c=r[s]||r[a],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(d=this.resolvers&&this.resolvers[f])&&(p=d[u?a:s])&&(l=Promise.resolve(pn.withValue(this.cache,p,[r,oe(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var a=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||a,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||a,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),ke(i,{Directive:function(e,t,n,i,a){"client"===e.name.value&&a.forEach((function(e){r(e)&&xr(e)&&o.add(e)}))},FragmentSpread:function(n,i,a,s,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&xr(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),gn=new($e?WeakMap:Map);function _n(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return gn.set(e,(gn.get(e)+1)%1e15),r.apply(this,arguments)})}function On(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var wn=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;gn.has(r)||(gn.set(r,0),_n(r,"evict"),_n(r,"modify"),_n(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||mr.loading;return this.variables&&this.networkStatus!==mr.loading&&!jt(this.variables,e.variables)&&(t=mr.setVariables),jt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){On(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&jt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||jt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():Tr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;On(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(gr(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&jt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===gn.get(this.cache)&&jt(t,r.variables)&&jt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new Lt,a=Rt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Rt(e.incremental)){var s=Ut(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=a,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(Sn(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:gn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var a=i.getDiffOptions(r.variables),s=o.diff(a);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=mr.ready},e.prototype.markError=function(e){return this.networkStatus=mr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Sn(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!er(e);return!n&&r&&e.data&&(n=!0),n}var En=Object.prototype.hasOwnProperty,In=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,a=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,d=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new($e?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new bn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!d,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new s("QueryManager stopped while query was in flight"):new s(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,a=e.optimisticResponse,s=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,d=void 0!==f&&f,p=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:s,update:p,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Xt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:a}),o,!1),(function(t){if(er(t)&&"none"===b)throw new br({graphQLErrors:tr(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&er(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:p,updateQueries:s,awaitRefetchQueries:d,refetchQueries:l,removeOptimistic:a?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),a&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof br?t:new br({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&Sn(i,e.errorPolicy)){if(Vt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Vt(i)&&Rt(i.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;s.result&&(u=Ut(s.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var a=e.observableQuery,s=a&&a.queryName;if(s&&En.call(c,s)){var u=c[s],l=r.queries.get(n),f=l.document,d=l.variables,p=t.diff({query:f,variables:d,returnPartialData:!0,optimistic:!1}),h=p.result;if(p.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&fe(f)||void 0,queryVariables:d});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:d})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach((function(e){return t.write(e)}));var s,u=e.update,c=!(Vt(s=i)||function(e){return"hasNext"in e&&"data"in e}(s))||Vt(i)&&!i.hasNext;if(u){if(!a){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}a||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=ar([ur],ce(r)),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:Re(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:ye(le(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,s)};u(e),u(r),u(o),u(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new wn(this),r=new Pr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new s("Store reset while query was in flight (not completed in link chain)"):new s(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=mr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):K(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):K(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void r.set(n,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&i.has(s)||a&&i.has(a))&&(r.set(n,o),s&&i.set(s,!0),a&&i.set(a,!0))}})),o.size&&o.forEach((function(e){var i=fr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),a=new Pr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(a.queryId===i),o.setObservableQuery(a),r.set(i,a)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,s,e).map((function(o){if("no-cache"!==n&&(Sn(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),er(o))throw new br({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,s).then(u);return new Y((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,a,s=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:fe(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var d=c.get(u)||new Map;c.set(u,d);var p=Jt(r);if(!(a=d.get(p))){var h=new yr([Oe(l,f)]);d.set(p,a=h),h.beforeNext((function(){d.delete(p)&&d.size<1&&c.delete(u)}))}}else a=new yr([Oe(l,f)])}else a=new yr([Y.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(a=Xt(a,(function(e){return s.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),a},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Xt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var a=tr(o),s=a.length>0;if(n>=e.lastRequestId){if(s&&"none"===r.errorPolicy)throw e.markError(new br({graphQLErrors:a}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:mr.ready};return s&&"ignore"!==r.errorPolicy&&(u.errors=a,u.networkStatus=mr.error),u}),(function(t){var r=vr(t)?t:new br({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=mr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?s&&s.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?s&&s.errorPolicy||"none":l,d=t.returnPartialData,p=void 0!==d&&d,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:p,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(a,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&a.observableQuery&&a.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return O.cancel(e)}))}));var O=new yr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return O.promise.then(_,_),O},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?fr("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof wn&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}n=u(i,a,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,a=t.variables,s=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,d=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:this.transform(o).document,variables:a,networkStatus:r});var h=function(){return e.getDiff(a)},y=function(t,r){void 0===r&&(r=e.networkStatus||mr.loading);var s=t.result;!__DEV__||l||jt(s,{})||Ar(t.missing);var u=function(e){return Y.of((0,n.__assign)({data:e,loading:gr(r),networkStatus:r},t.complete?null:{partial:!0}))};return s&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:s},context:f,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===mr.refetch&&Array.isArray(t.missing)?u(void 0):u(s)},v="no-cache"===s?0:r===mr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:a,context:f,fetchPolicy:s,errorPolicy:c})},b=d&&"number"==typeof p&&p!==r&&gr(r);switch(s){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new wn(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Pn(e,t){return Sr(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var Tn,jn=!1,An=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,c=void 0!==a&&a,l=e.ssrForceFetchDelay,f=void 0===l?0:l,d=e.connectToDevTools,p=void 0===d?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:d,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,O=e.fragmentMatcher,w=e.name,S=e.version,E=e.link;if(E||(E=r?new wt({uri:r,credentials:n,headers:i}):_e.empty()),!o)throw __DEV__?new s("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new s(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),p&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!jn&&p&&__DEV__&&(jn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var I=window.navigator,P=I&&I.userAgent,T=void 0;"string"==typeof P&&(P.indexOf("Chrome/")>-1?T="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":P.indexOf("Firefox/")>-1&&(T="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),T&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+T)}this.version="3.7.9",this.localState=new bn({cache:o,client:this,resolvers:g,fragmentMatcher:O}),this.queryManager=new In({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:w,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:p?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Pn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Pn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Pn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Oe(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();Tn||(Tn={});var xn=function(){function e(){this.getFragmentDoc=dn(H)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,a=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),kn=function(e){function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((a={})[s.path[u]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,n.__extends)(t,e),t}(Error);function Mn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){K(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){K(e[t])&&r.add(e[t])}))}))),e;var t,r}var Nn=Object.prototype.hasOwnProperty;function Dn(e){return null==e}function Rn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Dn(n)?Dn(i)?void 0:{_id:i}:{id:n}),Dn(n)&&!Dn(i)&&(n=i),!Dn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Cn={dataIdFromObject:Rn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Fn(e){var t=e.canonizeResults;return void 0===t?Cn.canonizeResults:t}var $n=/^[_a-z][_0-9a-z]*/i;function qn(e){var t=e.match($n);return t?t[0]:e}function Ln(e,t,r){return!!K(t)&&(Dt(t)?t.every((function(t){return Ln(e,t,r)})):e.selections.every((function(e){if(ue(e)&&Ne(e,r)){var n=ae(e);return Nn.call(t,n)&&(!e.selectionSet||Ln(e.selectionSet,t[n],r))}return!0})))}function Vn(e){return K(e)&&!X(e)&&!Dt(e)}function Un(e,t){var r=G(de(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Qn=Object.create(null),zn=function(){return Qn},Bn=Object.create(null),Wn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Mn(X(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return X(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Z(e);if(X(e))return e;var n=r.policies.identify(e)[0];if(n){var i=Z(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),Nn.call(this.data,e)){var r=this.data[e];if(r&&Nn.call(r,t))return r[t]}return"__typename"===t&&Nn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Gn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Nn.call(this.data,e)?this.data[e]:this instanceof Gn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;X(e)&&(e=e.__ref),X(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var a=new Lt(Zn).merge(i,o);if(this.data[r]=a,a!==i&&(delete this.refs[r],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=qn(e);t===e||n.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||n instanceof Gn||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),a=!1,s=!0,u={DELETE:Qn,INVALIDATE:Bn,isReference:X,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||Z(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=qn(c),f=i[c];if(void 0!==f){var d="function"==typeof t?t:t[c]||t[l];if(d){var p=d===zn?Qn:d(Mn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));p===Bn?r.group.dirty(e,c):(p===Qn&&(p=void 0),p!==f&&(o[c]=p,a=!0,f=p))}void 0!==f&&(s=!1)}})),a)return this.merge(e,o),s&&(this instanceof Gn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,a?((n={})[a]=zn,n):zn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(Nn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Gn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){Nn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&Nn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Gn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){Nn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Gn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!Nn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){X(e)&&(t[e.__ref]=!0),K(e)&&Object.keys(e).forEach((function(t){var r=e[t];K(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Yn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?cn():null,this.keyMaker=new Ht($e)},e.prototype.depend=function(e,t){if(this.d){this.d(Kn(e,t));var r=qn(t);r!==t&&this.d(Kn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Kn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Kn(e,t){return t+"#"+e}function Hn(e,t){Xn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,a=e.call(this,r,new Yn(i))||this;return a.stump=new Jn(a),a.storageTrie=new Ht($e),o&&a.replace(o),a}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Wn||(Wn={}));var Gn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){jt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return Nn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Wn),Jn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Yn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Gn);function Zn(e,t,r){var n=e[r],i=t[r];return jt(n,i)?n:i}function Xn(e){return!!(e instanceof Wn&&e.group.caching)}function ei(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ti=function(){function e(e){var t=this;this.knownResults=new($e?WeakMap:Map),this.config=Sr(e,{addTypename:!1!==e.addTypename,canonizeResults:Fn(e)}),this.canon=e.canon||new Gt,this.executeSelectionSet=dn((function(e){var r,i=e.context.canonizeResults,o=ei(e);o[3]=!i;var a=(r=t.executeSelectionSet).peek.apply(r,o);return a?i?(0,n.__assign)((0,n.__assign)({},a),{result:t.canon.admit(a.result)}):a:(Hn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:ei,makeCacheKey:function(e,t,r,n){if(Xn(r.store))return r.store.makeCacheKey(e,X(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=dn((function(e){return Hn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Xn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Gt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,a=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;a=(0,n.__assign)((0,n.__assign)({},ye(pe(r))),a);var d,p=Z(o),h=this.executeSelectionSet({selectionSet:he(r).selectionSet,objectOrReference:p,enclosingRef:p,context:(0,n.__assign)({store:t,query:r,policies:f,variables:a,varString:Jt(a),canonizeResults:l},Un(r,this.config.fragments))});if(h.missing&&(d=[new kn(ri(h.missing),h.missing,r,a)],!u))throw d[0];return{result:h.result,complete:!d,missing:d}},e.prototype.isFresh=function(e,t,r,n){if(Xn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(X(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var a,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],d=new Lt;function p(e,t){var r;return e.missing&&(a=d.merge(a,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(Ne(e,u))if(ue(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=ae(e);void 0===v?sr.added(e)||(a=d.merge(a,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(X(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Dt(v)?v=p(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=p(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:X(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=J(e,o.lookupFragment);if(!b&&e.kind===je.FRAGMENT_SPREAD)throw __DEV__?new s("No fragment named ".concat(e.name.value)):new s(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:$t(f),missing:a},v=o.canonizeResults?this.canon.admit(y):Mn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new Lt;function c(e,r){var n;return e.missing&&(t=s.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:Dt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:X(e)?e:o,context:a}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){K(r)&&(__DEV__?u(!X(r),"Missing selection set for object of type ".concat(function(e,t){return X(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!X(r),6),Object.values(r).forEach(n.add,n))}))}}(a.store,n,e),e)})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ri(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ni=Object.create(null);function ii(e){var t=JSON.stringify(e);return ni[t]||(ni[t]=Object.create(null))}function oi(e){var t=ii(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=si(e,(function(e){var i=li(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&Nn.call(t,e[0])&&(i=li(t,e,ci)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function ai(e){var t=ii(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,a=si(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return li(t,e)}else{var a=r.slice(1);if(i&&Nn.call(i,a)){var s=e.slice(0);return s[0]=a,li(i,s)}}else if(n&&Rt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&oe(c,i);return l&&li(l,e.slice(1))}})),s=JSON.stringify(a);return(t||"{}"!==s)&&(o+=":"+s),o})}function si(e,t){var r=new Lt;return ui(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var a=n.length-1;a>=0;--a)(i={})[n[a]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function ui(e){var t=ii(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Dt(t)?(ui(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Dt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ci(e,t){return e[t]}function li(e,t,r){return r=r||ci,fi(t.reduce((function e(t,n){return Dt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function fi(e){return K(e)?Dt(e)?e.map(fi):si(Object.keys(e).sort(),(function(t){return li(e,t)})):e}function di(e){return void 0!==e.args?e.args:e.field?oe(e.field,e.variables):null}re.setStringify(Jt);var pi=function(){},hi=function(e,t){return t.fieldName},yi=function(e,t,r){return(0,r.mergeObjects)(e,t)},vi=function(e,t){return t},mi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Rn},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,s=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:s,readField:t&&t.readField||function(){var e=gi(arguments,s);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Dt(f)){a=f;break}l=oi(f)}return a=a?String(a):void 0,u.keyObject?[a,u.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,a=i.mutationType,s=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),Nn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?yi:!1===t?vi:e.merge}a(n,t.merge),n.keyFn=!1===i?pi:Dt(i)?oi(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===s?hi:Dt(s)?ai(s):"function"==typeof s?s:n.keyFn,"function"==typeof u&&(n.read=u),a(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||hi)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match($n);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Nn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,a=(0,n.__rest)(i,["fields"]);Object.assign(r,a),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,d=0;d<s.length;++d){var p=s[d];if(p.has(o))return a.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;p.forEach(c),l&&d===s.length-1&&Ln(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var a={typename:r,fieldName:n,field:e.field||null,variables:e.variables},s=di(e);o;){var u=o(s,a);if(!Dt(u)){t=u||n;break}o=ai(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return ee(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return ee(n,r,i,t)}))),re(e.name.value,n,r)}(e.field,e.variables):re(n,di(e))),!1===t?n:n===qn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=qn(i),a=t.store.getFieldValue(r,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=bi(this,r,e,t,t.store.getStorage(X(r)?r.__ref:r,i));return pn.withValue(this.cache,u,[a,c])}return a}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,a=r.typename,s=r.merge;return s===yi?_i(n.store)(e,t):s===vi?t:(n.overwrite&&(e=void 0),s(e,t,bi(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function bi(e,t,r,n,i){var o=e.getStoreFieldName(r),a=qn(o),s=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:di(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:X,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(gi(arguments,t,s),n)},mergeObjects:_i(n.store)}}function gi(e,t,r){var i,o,a,s=e[0],c=e[1],l=e.length;return"string"==typeof s?i={fieldName:s,from:l>1?c:t}:(i=(0,n.__assign)({},s),Nn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),a=fr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?a:t})).split(JSON.stringify(a)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function _i(e){return function(t,r){if(Dt(t)||Dt(r))throw __DEV__?new s("Cannot automatically merge arrays"):new s(4);if(K(t)&&K(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(X(t)&&Vn(r))return e.merge(t.__ref,r),t;if(Vn(t)&&X(r))return e.merge(t,r.__ref),r;if(Vn(t)&&Vn(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function Oi(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var wi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,a=t.dataId,c=t.variables,l=t.overwrite,f=le(i),d=new Lt;c=(0,n.__assign)((0,n.__assign)({},ye(f)),c);var p=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return d.merge(e,t)},variables:c,varString:Jt(c)},Un(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:p});if(!X(h))throw __DEV__?new s("Could not identify object ".concat(JSON.stringify(o))):new s(7);return p.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=Z(n);if(o&&o.map.size){var c=r.applyMerges(o,s,i,p);if(X(c))return;i=c}if(__DEV__&&!p.overwrite){var l=Object.create(null);a.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[qn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!X(o)&&!jt(o,a)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(a,e)}))){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=qn(r),l="".concat(s,".").concat(c);if(!ji.has(l)){ji.add(l);var f=[];Dt(o)||Dt(a)||[o,a].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(s,i,e,p.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,a=e.context,s=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||se(i,o,a.fragmentMap)||r&&a.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var d=function(){var e=gi(arguments,l,a.variables);if(X(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),a);if(void 0!==r)return r}}return c.readField(e,a)},p=new Set;this.flattenFields(o,i,a,f).forEach((function(e,r){var n,o=ae(r),a=i[o];if(p.add(r),void 0!==a){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Ei(s,h),v=t.processFieldValue(a,r,r.selectionSet?Oi(e,!1,!1):e,y),m=void 0;r.selectionSet&&(X(v)||Vn(v))&&(m=d("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:Ti(s,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||sr.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(ae(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:d}),y=h[0],v=h[1];r=r||y,v&&(l=a.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=Z(r),b=a.written[r]||(a.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,a))return m;var g=a.incomingById.get(r);return g?(g.storeObject=a.merge(g.storeObject,l),g.mergeTree=Ii(g.mergeTree,s),p.forEach((function(e){return g.fieldNodeSet.add(e)}))):a.incomingById.set(r,{storeObject:l,mergeTree:Pi(s)?void 0:s,fieldNodeSet:p}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Dt(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,r,Ei(n,o));return Ti(n,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?Or(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=se(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,a=new Ht(!1);return function e(u,c){var l=a.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(a){if(Ne(a,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Rt(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=oe(e,r.variables);n&&!1===n.if||(l=!0)}})),ue(a)){var f=i.get(a);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(a,Oi(r,u,l))}else{var d=J(a,r.lookupFragment);if(!d&&a.kind===je.FRAGMENT_SPREAD)throw __DEV__?new s("No fragment named ".concat(a.name.value)):new s(8);d&&o.fragmentMatches(d,n,t,r.variables)&&e(d.selectionSet,Oi(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var a,s=this;if(e.map.size&&!X(r)){var c,l=Dt(r)||!X(t)&&!Vn(t)?void 0:t,f=r;l&&!o&&(o=[X(l)?l.__ref:l]);var d=function(e,t){return Dt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=d(l,t),n=d(f,t);if(void 0!==n){o&&o.push(t);var a=s.applyMerges(e,r,n,i,o);a!==n&&(c=c||new Map).set(t,a),o&&u(o.pop()===t)}})),c&&(r=Dt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(a=i.store).getStorage.apply(a,o)):r},e}(),Si=[];function Ei(e,t){var r=e.map;return r.has(t)||r.set(t,Si.pop()||{map:new Map}),r.get(t)}function Ii(e,t){if(e===t||!t||Pi(t))return e;if(!e||Pi(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var a=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ii(e,t.map.get(r))),a.delete(r)})),a.forEach((function(r){o.map.set(r,Ii(t.map.get(r),e.map.get(r)))}))}return o}function Pi(e){return!e||!(e.info||e.map.size)}function Ti(e,t){var r=e.map,n=r.get(t);n&&Pi(n)&&(Si.push(n),r.delete(t))}var ji=new Set,Ai=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=mn,r.txCount=0,r.config=function(e){return Sr(Cn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new mi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Wn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new wi(this,this.storeReader=new ti({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Fn(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=dn((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Xn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Jt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof kn)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(Nn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||yn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&vn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Jt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(X(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(Nn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Jt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),vn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,a=void 0===o||o,s=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,a=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=a}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,c):!1===a?c(this.data):c(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=sr(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&jt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(xn),xi=_e.empty,ki=_e.from,Mi=_e.split,Ni=_e.concat;function Di(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Ri(e){return new Y((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ci(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const Fi=/\r\n|[\n\r]/g;function $i(e,t){let r=0,n=1;for(const i of e.body.matchAll(Fi)){if("number"==typeof i.index||Ci(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function qi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?r:0,u=t.column+s,c=`${e.name}:${a}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+Li([[`${a} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+Li([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function Li(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Vi extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:a,positions:s,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Ui(Array.isArray(o)?o:o?[o]:void 0);const f=Ui(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=a?a:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=s?s:null==f?void 0:f.map((e=>e.start)),this.locations=s&&a?s.map((e=>$i(a,e))):null==f?void 0:f.map((e=>$i(e.source,e.start)));const d="object"==typeof(p=null==c?void 0:c.extensions)&&null!==p?null==c?void 0:c.extensions:void 0;var p;this.extensions=null!==(i=null!=l?l:d)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Vi):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+qi((t=r.loc).source,$i(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+qi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Ui(e){return void 0===e||0===e.length?void 0:e}function Qi(e,t,r){return new Vi(`Syntax Error: ${r}`,{source:e,positions:[t]})}var zi,Bi,Wi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(zi||(zi={})),(Wi=Bi||(Bi={})).SOF="<SOF>",Wi.EOF="<EOF>",Wi.BANG="!",Wi.DOLLAR="$",Wi.AMP="&",Wi.PAREN_L="(",Wi.PAREN_R=")",Wi.SPREAD="...",Wi.COLON=":",Wi.EQUALS="=",Wi.AT="@",Wi.BRACKET_L="[",Wi.BRACKET_R="]",Wi.BRACE_L="{",Wi.PIPE="|",Wi.BRACE_R="}",Wi.NAME="Name",Wi.INT="Int",Wi.FLOAT="Float",Wi.STRING="String",Wi.BLOCK_STRING="BlockString",Wi.COMMENT="Comment";class Yi{constructor(e){const t=new Se(Bi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Bi.EOF)do{if(e.next)e=e.next;else{const t=eo(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Bi.COMMENT);return e}}function Ki(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Hi(e,t){return Gi(e.charCodeAt(t))&&Ji(e.charCodeAt(t+1))}function Gi(e){return e>=55296&&e<=56319}function Ji(e){return e>=56320&&e<=57343}function Zi(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return Bi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Xi(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new Se(t,r,n,o,a,i)}function eo(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return to(e,i);case 33:return Xi(e,Bi.BANG,i,i+1);case 36:return Xi(e,Bi.DOLLAR,i,i+1);case 38:return Xi(e,Bi.AMP,i,i+1);case 40:return Xi(e,Bi.PAREN_L,i,i+1);case 41:return Xi(e,Bi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Xi(e,Bi.SPREAD,i,i+3);break;case 58:return Xi(e,Bi.COLON,i,i+1);case 61:return Xi(e,Bi.EQUALS,i,i+1);case 64:return Xi(e,Bi.AT,i,i+1);case 91:return Xi(e,Bi.BRACKET_L,i,i+1);case 93:return Xi(e,Bi.BRACKET_R,i,i+1);case 123:return Xi(e,Bi.BRACE_L,i,i+1);case 124:return Xi(e,Bi.PIPE,i,i+1);case 125:return Xi(e,Bi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?lo(e,i):io(e,i)}if(Ze(t)||45===t)return ro(e,i,t);if(et(t))return fo(e,i);throw Qi(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Ki(t)||Hi(r,i)?`Unexpected character: ${Zi(e,i)}.`:`Invalid character: ${Zi(e,i)}.`)}return Xi(e,Bi.EOF,n,n)}function to(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Ki(e))++i;else{if(!Hi(r,i))break;i+=2}}return Xi(e,Bi.COMMENT,t,i,r.slice(t+1,i))}function ro(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ze(o))throw Qi(e.source,i,`Invalid number, unexpected digit after 0: ${Zi(e,i)}.`)}else i=no(e,i,o),o=n.charCodeAt(i);if(46===o&&(a=!0,o=n.charCodeAt(++i),i=no(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=no(e,i,o),o=n.charCodeAt(i)),46===o||et(o))throw Qi(e.source,i,`Invalid number, expected digit but got: ${Zi(e,i)}.`);return Xi(e,a?Bi.FLOAT:Bi.INT,t,i,n.slice(t,i))}function no(e,t,r){if(!Ze(r))throw Qi(e.source,t,`Invalid number, expected digit but got: ${Zi(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ze(n.charCodeAt(i));)++i;return i}function io(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return a+=r.slice(o,i),Xi(e,Bi.STRING,t,i+1,a);if(92!==n){if(10===n||13===n)break;if(Ki(n))++i;else{if(!Hi(r,i))throw Qi(e.source,i,`Invalid character within String: ${Zi(e,i)}.`);i+=2}}else{a+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?oo(e,i):ao(e,i):co(e,i);a+=t.value,i+=t.size,o=i}}throw Qi(e.source,i,"Unterminated string.")}function oo(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Ki(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|uo(e),n<0)break}throw Qi(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function ao(e,t){const r=e.source.body,n=so(r,t+2);if(Ki(n))return{value:String.fromCodePoint(n),size:6};if(Gi(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=so(r,t+8);if(Ji(e))return{value:String.fromCodePoint(n,e),size:12}}throw Qi(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function so(e,t){return uo(e.charCodeAt(t))<<12|uo(e.charCodeAt(t+1))<<8|uo(e.charCodeAt(t+2))<<4|uo(e.charCodeAt(t+3))}function uo(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function co(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Qi(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function lo(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){s+=r.slice(a,o),u.push(s);const n=Xi(e,Bi.BLOCK_STRING,t,o+3,tt(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Ki(n))++o;else{if(!Hi(r,o))throw Qi(e.source,o,`Invalid character within String: ${Zi(e,o)}.`);o+=2}else s+=r.slice(a,o),u.push(s),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,s="",a=o,i=o;else s+=r.slice(a,o),a=o+1,o+=4}throw Qi(e.source,o,"Unterminated string.")}function fo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Xe(o=r.charCodeAt(i))||Ze(o)||95===o);)++i;var o;return Xi(e,Bi.NAME,t,i,r.slice(t,i))}class po{constructor(e,t={}){const r=function(e){return e instanceof P}(e)?e:new P(e);this._lexer=new Yi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(Bi.NAME);return this.node(e,{kind:je.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:je.DOCUMENT,definitions:this.many(Bi.SOF,this.parseDefinition,Bi.EOF)})}parseDefinition(){if(this.peek(Bi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Bi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Qi(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Bi.BRACE_L))return this.node(e,{kind:je.OPERATION_DEFINITION,operation:Te.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(Bi.NAME)&&(r=this.parseName()),this.node(e,{kind:je.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Bi.NAME);switch(e.value){case"query":return Te.QUERY;case"mutation":return Te.MUTATION;case"subscription":return Te.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Bi.PAREN_L,this.parseVariableDefinition,Bi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:je.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Bi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Bi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Bi.DOLLAR),this.node(e,{kind:je.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:je.SELECTION_SET,selections:this.many(Bi.BRACE_L,this.parseSelection,Bi.BRACE_R)})}parseSelection(){return this.peek(Bi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(Bi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:je.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Bi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Bi.PAREN_L,t,Bi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(Bi.COLON),this.node(t,{kind:je.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Bi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Bi.NAME)?this.node(e,{kind:je.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:je.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Bi.BRACKET_L:return this.parseList(e);case Bi.BRACE_L:return this.parseObject(e);case Bi.INT:return this.advanceLexer(),this.node(t,{kind:je.INT,value:t.value});case Bi.FLOAT:return this.advanceLexer(),this.node(t,{kind:je.FLOAT,value:t.value});case Bi.STRING:case Bi.BLOCK_STRING:return this.parseStringLiteral();case Bi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:je.BOOLEAN,value:!0});case"false":return this.node(t,{kind:je.BOOLEAN,value:!1});case"null":return this.node(t,{kind:je.NULL});default:return this.node(t,{kind:je.ENUM,value:t.value})}case Bi.DOLLAR:if(e){if(this.expectToken(Bi.DOLLAR),this._lexer.token.kind===Bi.NAME){const e=this._lexer.token.value;throw Qi(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:je.STRING,value:e.value,block:e.kind===Bi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:je.LIST,values:this.any(Bi.BRACKET_L,(()=>this.parseValueLiteral(e)),Bi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:je.OBJECT,fields:this.any(Bi.BRACE_L,(()=>this.parseObjectField(e)),Bi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(Bi.COLON),this.node(t,{kind:je.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Bi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Bi.AT),this.node(t,{kind:je.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Bi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(Bi.BRACKET_R),t=this.node(e,{kind:je.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(Bi.BANG)?this.node(e,{kind:je.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:je.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Bi.STRING)||this.peek(Bi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(Bi.BRACE_L,this.parseOperationTypeDefinition,Bi.BRACE_R);return this.node(e,{kind:je.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Bi.COLON);const r=this.parseNamedType();return this.node(e,{kind:je.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:je.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Bi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Bi.BRACE_L,this.parseFieldDefinition,Bi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Bi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:je.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(Bi.PAREN_L,this.parseInputValueDef,Bi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Bi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(Bi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:je.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:je.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Bi.EQUALS)?this.delimitedMany(Bi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:je.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Bi.BRACE_L,this.parseEnumValueDefinition,Bi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:je.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Qi(this._lexer.source,this._lexer.token.start,`${ho(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Bi.BRACE_L,this.parseInputValueDef,Bi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Bi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(Bi.BRACE_L,this.parseOperationTypeDefinition,Bi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Bi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:je.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Bi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(zi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new we(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Qi(this._lexer.source,t.start,`Expected ${yo(e)}, found ${ho(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Bi.NAME||t.value!==e)throw Qi(this._lexer.source,t.start,`Expected "${e}", found ${ho(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Bi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Qi(this._lexer.source,t.start,`Unexpected ${ho(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==Bi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Qi(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ho(e){const t=e.value;return yo(e.kind)+(null!=t?` "${t}"`:"")}function yo(e){return function(e){return e===Bi.BANG||e===Bi.DOLLAR||e===Bi.AMP||e===Bi.PAREN_L||e===Bi.PAREN_R||e===Bi.SPREAD||e===Bi.COLON||e===Bi.EQUALS||e===Bi.AT||e===Bi.BRACKET_L||e===Bi.BRACKET_R||e===Bi.BRACE_L||e===Bi.PIPE||e===Bi.BRACE_R}(e)?`"${e}"`:e}var vo=new Map,mo=new Map,bo=!0,go=!1;function _o(e){return e.replace(/[\s,]+/g," ").trim()}function Oo(e){var t,r,i,o=_o(e);if(!vo.has(o)){var a=function(e,t){return new po(e,t).parseDocument()}(e,{experimentalFragmentVariables:go,allowLegacyFragmentVariables:go});if(!a||"Document"!==a.kind)throw new Error("Not a valid GraphQL document.");vo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=a,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=_o((a=e.loc).source.body.substring(a.start,a.end)),o=mo.get(t);o&&!o.has(n)?bo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||mo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var a})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return vo.get(o)}function wo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),Oo(n)}function So(){vo.clear(),mo.clear()}function Eo(){bo=!1}function Io(){go=!0}function Po(){go=!1}var To,jo=wo,Ao=So,xo=Eo,ko=Io,Mo=Po;(To=wo||(wo={})).gql=jo,To.resetCaches=Ao,To.disableFragmentWarnings=xo,To.enableExperimentalFragmentVariables=ko,To.disableExperimentalFragmentVariables=Mo,wo.default=wo,d(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var a=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return a.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return a.QueryBuilder}});var s=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return s.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|