@finsemble/finsemble-core 8.2.0-beta.1 → 8.2.0
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/cli-api.js +16 -0
- package/dist/cli/cli-api/tools.cjs +119 -66
- package/dist/cli/cli-api/tools.cjs.map +1 -1
- package/dist/cli/cli-api/tools.d.cts +7 -6
- package/dist/cli/cli-api/tools.d.cts.map +1 -1
- package/dist/cli/cli.cjs +3 -3
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/cli/tsconfig.cli.tsbuildinfo +1 -1
- package/dist/platform/configs/core/config.json +2 -2
- package/dist/platform/services/Interop/InteropServiceUI.js +1 -1
- package/dist/platform/services/config/configService.js +1 -1
- package/dist/platform/services/config/configService.js.map +1 -1
- package/dist/platform/services/router/routerService.js +1 -1
- package/dist/platform/services/window/windowService.js +1 -1
- package/package.json +3 -3
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
|| ${a} === "boolean" || ${i} === null`).assign(c,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(i,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):h(e)}))}return u};const l=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=c.Correct){const i=n===c.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===c.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function f(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,d(e,t,r,n));return i}t.checkDataType=d,t.checkDataTypes=f;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,p)}t.reportTypeError=h},90313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(93487),i=r(76776);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const u=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${u}`);let l=n._`${u} === undefined`;"empty"===c.useDefaults&&(l=n._`${l} || ${u} === null || ${u} === ""`),o.if(l,n._`${u} = ${(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)))}},74815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(55667),i=r(50453),o=r(58876),s=r(50453),a=r(90313),c=r(95005),u=r(13099),l=r(93487),d=r(22141),f=r(32531),p=r(76776),h=r(4181);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,l._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${g(r,i)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,l._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,l._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,l._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,l._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,l._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,l._`""`),e.var(d.default.parentData,l._`undefined`),e.var(d.default.parentDataProperty,l._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,l._`{}`)}))}(e,i),e.code(o)})):e.func(t,l._`${d.default.data}, ${function(e){return l._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?l._`, ${d.default.dynamicAnchors}={}`:l.nil}}={}`}(i)}`,n.$async,(()=>e.code(g(r,i)).code(o)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function y({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 v(e){return"boolean"!=typeof e.schema}function b(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 w(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);_(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function S({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(l._`${d.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._`${d.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function _(e,t,r,n){const{gen:i,schema:a,data:c,allErrors:u,opts:f,self:h}=e,{RULES:m}=h;function g(p){(0,o.shouldUseGroup)(a,p)&&(p.type?(i.if((0,s.checkDataType)(p.type,c,f.strictNumbers)),C(e,p),1===t.length&&t[0]===p.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):C(e,p),u||i.if(l._`${d.default.errors} === ${n||0}`))}!a.$ref||!f.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(a,m)?(f.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)||$(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>E(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&$(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}))&&$(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):i.block((()=>T(e,"$ref",m.all.$ref.definition)))}function C(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&T(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function $(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&S(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(d.default.vErrors,null),n.let(d.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),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(l._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(l._`new ${i}(${d.default.vErrors})`))):(t.assign(l._`${n}.errors`,d.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._`${d.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class P{constructor(e,t,r){if((0,c.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",k(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.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",d.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),y(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&S(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.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",d.default.errors);w(e,o),n.var(t,l._`${o} === ${d.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,c.funcKeywordCode)(i,r):"macro"in r?(0,c.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(i,r)}t.KeywordCxt=P;const R=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return d.default.rootData;if("/"===e[0]){if(!R.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=d.default.rootData}else{const s=O.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=l._`${o}${(0,l.getProperty)((0,p.unescapeJsonPointer)(e))}`,s=l._`${s} && ${o}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=k},95005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(93487),i=r(22141),o=r(10412),s=r(4181);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,u=t.macro.call(a.self,o,s,a),l=c(r,i,u);!1!==a.opts.validateSchema&&a.self.validateSchema(u,!0);const d=r.name("valid");e.subschema({schema:u,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:u,keyword:l,schema:d,parentSchema:f,$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 m=!p&&t.compile?t.compile.call(h.self,d,f,h):t.validate,g=c(u,l,m),y=u.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!p||!1===t.schema);u.assign(y,n._`${r}${(0,o.callValidateCode)(e,g,s,a)}`,t.modifying)}function b(e){var r;u.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const r=t.async?function(){const e=u.let("ruleErrs",null);return u.try((()=>v(n._`await `)),(t=>u.assign(y,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>u.assign(e,n._`${t}.errors`)),(()=>u.throw(t))))),e}():function(){const e=n._`${g}.errors`;return u.assign(e,null),v(n.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},13099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(93487),i=r(76776);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;l(u.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(l(s instanceof n.Name?s:u.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},27159:(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(74815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(93487);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(67426),s=r(6646),a=r(13141),c=r(25173),u=r(93487),l=r(32531),d=r(50453),f=r(76776),p=r(64775),h=r(43589),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={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."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,i,o,s,a,c,u,l,d,f,p,g,y,v,b,w,S,_,C,E,$,P,T;const R=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,k=!0===O||void 0===O?1:O||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,A=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:R)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:R)||void 0===c||c,strictTypes:null!==(l=null!==(u=e.strictTypes)&&void 0!==u?u:R)&&void 0!==l?l:"log",strictTuples:null!==(f=null!==(d=e.strictTuples)&&void 0!==d?d:R)&&void 0!==f?f:"log",strictRequired:null!==(g=null!==(p=e.strictRequired)&&void 0!==p?p:R)&&void 0!==g&&g,code:e.code?{...e.code,optimize:k,regExp:I}:{optimize:k,regExp:I},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(S=e.inlineRefs)||void 0===S||S,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(C=e.addUsedSchema)||void 0===C||C,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===($=e.validateFormats)||void 0===$||$,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(T=e.int32range)||void 0===T||T,uriResolver:A}}class S{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return R;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,v,e,"NOT SUPPORTED"),_.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=T.call(this),e.formats&&$.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 s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await u.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(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=C.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.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=C.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(k.call(this,r,t),!t)return(0,f.eachItem)(r,(e=>I.call(this,e))),this;x.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.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]=j(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(o||r);const u=l.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:u}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.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{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(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 C(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 $(){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 g)delete e[t];return e}t.default=S,S.ValidationError=o.default,S.MissingRefError=s.default;const R={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function k(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!O.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 I(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?A.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function A(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 x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=j(t)),e.validateSchema=this.compile(t,!0))}const N={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function j(e){return{anyOf:[e,N]}}},43510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64063);n.code='require("ajv/dist/runtime/equal").default',t.default=n},74499:(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'},43589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(60540);n.code='require("ajv/dist/runtime/uri").default',t.default=n},67426:(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},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(93487),i=r(76776),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:c}=e;c.items=!0;const u=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${u} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(c,o)){const o=r.var("valid",n._`${u} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),c.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},69351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o=r(22141),s=r(76776),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:u,it:l}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:d,opts:f}=l;if(l.props=!0,"all"!==f.removeAdditional&&(0,s.alwaysValidSchema)(l,r))return;const p=(0,n.allSchemaProperties)(a.properties),h=(0,n.allSchemaProperties)(a.patternProperties);function m(e){t.code(i._`delete ${c}[${e}]`)}function g(n){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)m(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===f.removeAdditional?(y(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),m(n)}))):(y(n,r),d||t.if((0,i.not)(r),(()=>t.break())))}}}function y(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",c,(r=>{p.length||h.length?t.if(function(r){let o;if(p.length>8){const e=(0,s.schemaRefOrVal)(l,a.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),(()=>g(r))):g(r)})),e.ok(i._`${u} === ${o.default.errors}`)}};t.default=a},71125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},50019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(10412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},79864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let c,u;const{minContains:l,maxContains:d}=o;a.opts.next?(c=void 0===l?1:l,u=d):c=1;const f=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${f} >= ${c}`;return void 0!==u&&(t=n._`${t} && ${f} <= ${u}`),void e.pass(t)}a.items=!0;const p=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===u?t.if(n._`${e} >= ${c}`,(()=>t.assign(p,!0).break())):(t.if(n._`${e} > ${u}`,(()=>t.assign(p,!1).break())),1===c?t.assign(p,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(p,!0))))}(r)))))}function m(r,n){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===u&&1===c?m(p,(()=>t.if(p,(()=>t.break())))):0===c?(t.let(p,!0),void 0!==u&&t.if(n._`${s}.length > 0`,h)):(t.let(p,!1),h()),e.result(p,(()=>e.reset()))}};t.default=o},67772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(93487),i=r(76776),o=r(10412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
|
|
6
6
|
missingProperty: ${i},
|
|
7
7
|
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const u=t[c];if(0===u.length)continue;const l=(0,o.propertyInData)(r,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of u)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,u,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const u in t)(0,i.alwaysValidSchema)(a,t[u])||(r.if((0,o.propertyInData)(r,n,u,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},89434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),c=s(o,"else");if(!a&&!c)return;const u=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,d("then",r),d("else",r))}else a?t.if(l,d("then")):t.if((0,n.not)(l),d("else"));function d(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(u,l),e.mergeValidEvaluated(o,u),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(u,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4783),i=r(72924),o=r(64665),s=r(1119),a=r(79864),c=r(67772),u=r(33708),l=r(69351),d=r(76239),f=r(12296),p=r(15697),h=r(50019),m=r(14200),g=r(71125),y=r(89434),v=r(66552);t.default=function(e=!1){const t=[p.default,h.default,m.default,g.default,y.default,v.default,u.default,l.default,c.default,d.default,f.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},64665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(93487),i=r(76776),o=r(10412),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:c,it:u}=e;!function(e){const{opts:n,errSchemaPath:o}=u,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(u,e,n.strictTuples)}}(s),u.opts.unevaluated&&r.length&&!0!==u.items&&(u.items=i.mergeEvaluated.items(o,r.length,u.items));const l=o.name("valid"),d=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(u,t)||(o.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(10412),s=r(4783),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},15697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),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},14200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,c=t.let("valid",!1),u=t.let("passing",null),l=t.name("_valid");e.setParams({passing:u}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${c}`).assign(c,!1).assign(u,n._`[${u}, ${o}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(u,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},12296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o=r(76776),s=r(76776),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:u}=e,{opts:l}=u,d=(0,n.allSchemaProperties)(r),f=d.filter((e=>(0,o.alwaysValidSchema)(u,r[e])));if(0===d.length||f.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;const p=l.strictSchema&&!l.allowMatchingProperties&&c.properties,h=t.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,s.evaluatedPropsToName)(t,u.props));const{props:m}=u;function g(e){for(const t in p)new RegExp(e).test(t)&&(0,o.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=f.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${o}]`,!0):n||u.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of d)p&&g(e),u.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=a},72924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64665),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},76239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(74815),i=r(10412),o=r(76776),s=r(69351),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:u}=e;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(u,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)u.definedProperties.add(e);u.opts.unevaluated&&l.length&&!0!==u.props&&(u.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),u.props));const d=l.filter((e=>!(0,o.alwaysValidSchema)(u,r[e])));if(0===d.length)return;const f=t.name("valid");for(const r of d)p(r)?h(r):(t.if((0,i.propertyInData)(t,c,r,u.opts.ownProperties)),h(r),u.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function p(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=a},33708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},66552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),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},10412:(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(93487),i=r(76776),o=r(22141),s=r(76776);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function u(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(c(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(u(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)(u(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=u,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},u,l,d){const f=d?n._`${e}, ${t}, ${i}${s}`:t,p=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&p.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${f}, ${r.object(...p)}`;return l!==n.nil?n._`${u}.call(${l}, ${h})`:n._`${u}(${h})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?d:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},78386:(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},95684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78386),i=r(28280),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},28280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(6646),i=r(10412),o=r(93487),s=r(22141),a=r(25173),c=r(76776),u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:c,validateName:u,opts:f,self:p}=i,{root:h}=c;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(c===h)return d(e,u,c,c.$async);const r=t.scopeValue("root",{ref:h});return d(e,o._`${r}.validate`,h,h.$async)}();const m=a.resolveRef.call(p,h,s,r);if(void 0===m)throw new n.default(i.opts.uriResolver,s,r);return m instanceof a.SchemaEnv?function(t){const r=l(e,t);d(e,r,t,t.$async)}(m):function(n){const i=t.scopeValue("schema",!0===f.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(m)}};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 d(e,t,r,n){const{gen:a,it:u}=e,{allErrors:l,schemaEnv:d,opts:f}=u,p=f.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(n&&!n.dynamicProps)void 0!==n.props&&(u.props=c.mergeEvaluated.props(a,n.props,u.props));else{const t=a.var("props",o._`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(a,t,u.props,o.Name)}if(!0!==u.items)if(n&&!n.dynamicItems)void 0!==n.items&&(u.items=c.mergeEvaluated.items(a,n.items,u.items));else{const t=a.var("items",o._`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(a,t,u.items,o.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,p)}`),m(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${u.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,p),(()=>m(t)),(()=>h(t)))}t.getValidate=l,t.callRef=d,t.default=u},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(89306),o=r(25173),s=r(76776),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:u}=e,{oneOf:l}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=a.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),p=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);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(c);let n=!0;for(let t=0;t<l.length;t++){let c=l[t];(null==c?void 0:c.$ref)&&!(0,s.schemaHasRulesButRef)(c,u.self.RULES)&&(c=o.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,null==c?void 0:c.$ref),c instanceof o.SchemaEnv&&(c=c.schema));const f=null===(e=null==c?void 0:c.properties)||void 0===e?void 0:e[d];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${d}"`);n=n&&(r||i(c)),a(f,t)}if(!n)throw new Error(`discriminator: "${d}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(d)}function a(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${d}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${d}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${p} === ${e}`),t.assign(f,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:p,tagName:d}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:p,tagName:d}))),e.ok(f)}};t.default=a},89306:(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"},93924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95684),i=r(62649),o=r(8200),s=r(39502),a=r(66167),c=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},89651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:c}=e,{opts:u,errSchemaPath:l,schemaEnv:d,self:f}=c;u.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:f.formats,code:u.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),c=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===u.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=d.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=f.formats[s];if(!o)return void function(){if(!1!==u.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}f.logger.warn(e())}();if(!0===o)return;const[a,c,p]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):u.code.formats?n._`${u.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${p}(${i})`}return"function"==typeof c?n._`${p}(${i})`:n._`${p}.test(${i})`}())}())}};t.default=i},39502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(89651).default];t.default=n},66167:(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"]},64693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(43510),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},30966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(43510),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:c,it:u}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=u.opts.loopEnum;let d;const f=()=>null!=d?d:d=(0,i.useFunc)(t,o.default);let p;if(l||s)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",c,(e=>t.if(n._`${f()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);p=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${f()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(p)}};t.default=s},62649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83983),i=r(90430),o=r(93229),s=r(74336),a=r(90498),c=r(33301),u=r(31687),l=r(82958),d=r(64693),f=r(30966),p=[n.default,i.default,o.default,s.default,a.default,c.default,u.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];t.default=p},31687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),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},93229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(74499),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,u=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${u} ${c} ${s}`)}};t.default=s},83983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},90498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),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},90430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${c}))`)}};t.default=i},74336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",u=r?i._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${u}.test(${t})`)}};t.default=o},33301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o=r(76776),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:u}=e,{opts:l}=u;if(!c&&0===r.length)return;const d=r.length>=l.loopRequired;if(u.allErrors?function(){if(d||c)e.block$data(i.nil,f);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(u,t,u.opts.strictRequired)}}function f(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},82958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(50453),i=r(93487),o=r(76776),s=r(43510),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{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}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:u,schemaCode:l,it:d}=e;if(!a&&!c)return;const f=t.let("valid"),p=u.items?(0,n.getSchemaTypes)(u.items):[];function h(o,s){const a=t.name("item"),c=(0,n.checkDataTypes)(p,a,d.opts.strictNumbers,n.DataType.Wrong),u=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(c,i._`continue`),p.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${u}[${a}] == "number"`,(()=>{t.assign(s,i._`${u}[${a}]`),e.error(),t.assign(f,!1).break()})).code(i._`${u}[${a}] = ${o}`)}))}function m(n,a){const c=(0,o.useFunc)(t,s.default),u=t.name("outer");t.label(u).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(f,!1).break(u)}))))))}e.block$data(f,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(f,!0),t.if(i._`${n} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?h:m)(n,o)))}),i._`${l} === false`),e.ok(f)}};t.default=a},9996:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,r,c){(c=c||{}).arrayMerge=c.arrayMerge||i,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var u=Array.isArray(r);return u===Array.isArray(e)?u?c.arrayMerge(e,r,c):function(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&r.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a}(o,r)(e[o],t[o],r):i[o]=n(t[o],r))})),i}(e,r,c):n(r,c)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return a(e,r,t)}),{})};var c=a;e.exports=c},17187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=h(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},64063:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},49461:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,c,u,l,d){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var f in n(o,s,a,c,u,l,d),o){var p=o[f];if(Array.isArray(p)){if(f in t.arrayKeywords)for(var h=0;h<p.length;h++)r(e,n,i,p[h],s+"/"+f+"/"+h,a,s,f,o,h)}else if(f in t.propsKeywords){if(p&&"object"==typeof p)for(var m in p)r(e,n,i,p[m],s+"/"+f+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,f,o,m)}else(f in t.keywords||e.allKeys&&!(f in t.skipKeywords))&&r(e,n,i,p,s+"/"+f,a,s,f,o)}i(o,s,a,c,u,l,d)}}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}},18552:(e,t,r)=>{var n=r(10852)(r(55639),"DataView");e.exports=n},1989:(e,t,r)=>{var n=r(51789),i=r(80401),o=r(57667),s=r(21327),a=r(81866);function c(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])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},38407:(e,t,r)=>{var n=r(27040),i=r(14125),o=r(82117),s=r(67518),a=r(54705);function c(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])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},57071:(e,t,r)=>{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),i=r(11285),o=r(96e3),s=r(49916),a=r(95265);function c(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])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},53818:(e,t,r)=>{var n=r(10852)(r(55639),"Promise");e.exports=n},58525:(e,t,r)=>{var n=r(10852)(r(55639),"Set");e.exports=n},88668:(e,t,r)=>{var n=r(83369),i=r(90619),o=r(72385);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},46384:(e,t,r)=>{var n=r(38407),i=r(37465),o=r(63779),s=r(67599),a=r(44758),c=r(34309);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=c,e.exports=u},62705:(e,t,r)=>{var n=r(55639).Symbol;e.exports=n},11149:(e,t,r)=>{var n=r(55639).Uint8Array;e.exports=n},70577:(e,t,r)=>{var n=r(10852)(r(55639),"WeakMap");e.exports=n},96874:e=>{e.exports=function(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)}},77412:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},34963:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},14636:(e,t,r)=>{var n=r(22545),i=r(35694),o=r(1469),s=r(44144),a=r(65776),c=r(36719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),l=!r&&i(e),d=!r&&!l&&s(e),f=!r&&!l&&!d&&c(e),p=r||l||d||f,h=p?n(e.length,String):[],m=h.length;for(var g in e)!t&&!u.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||h.push(g);return h}},29932:e=>{e.exports=function(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}},62488:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},82908:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},34865:(e,t,r)=>{var n=r(89465),i=r(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},18470:(e,t,r)=>{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},44037:(e,t,r)=>{var n=r(98363),i=r(3674);e.exports=function(e,t){return e&&n(t,i(t),e)}},63886:(e,t,r)=>{var n=r(98363),i=r(81704);e.exports=function(e,t){return e&&n(t,i(t),e)}},89465:(e,t,r)=>{var n=r(38777);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},85990:(e,t,r)=>{var n=r(46384),i=r(77412),o=r(34865),s=r(44037),a=r(63886),c=r(64626),u=r(278),l=r(18805),d=r(1911),f=r(58234),p=r(46904),h=r(64160),m=r(43824),g=r(29148),y=r(38517),v=r(1469),b=r(44144),w=r(56688),S=r(13218),_=r(72928),C=r(3674),E=r(81704),$="[object Arguments]",P="[object Function]",T="[object Object]",R={};R[$]=R["[object Array]"]=R["[object ArrayBuffer]"]=R["[object DataView]"]=R["[object Boolean]"]=R["[object Date]"]=R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Map]"]=R["[object Number]"]=R[T]=R["[object RegExp]"]=R["[object Set]"]=R["[object String]"]=R["[object Symbol]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R["[object Error]"]=R[P]=R["[object WeakMap]"]=!1,e.exports=function e(t,r,O,k,I,A){var x,N=1&r,j=2&r,L=4&r;if(O&&(x=I?O(t,k,I,A):O(t)),void 0!==x)return x;if(!S(t))return t;var D=v(t);if(D){if(x=m(t),!N)return u(t,x)}else{var F=h(t),M=F==P||"[object GeneratorFunction]"==F;if(b(t))return c(t,N);if(F==T||F==$||M&&!I){if(x=j||M?{}:y(t),!N)return j?d(t,a(x,t)):l(t,s(x,t))}else{if(!R[F])return I?t:{};x=g(t,F,N)}}A||(A=new n);var W=A.get(t);if(W)return W;A.set(t,x),_(t)?t.forEach((function(n){x.add(e(n,r,O,n,t,A))})):w(t)&&t.forEach((function(n,i){x.set(i,e(n,r,O,i,t,A))}));var V=D?void 0:(L?j?p:f:j?E:C)(t);return i(V||t,(function(n,i){V&&(n=t[i=n]),o(x,i,e(n,r,O,i,t,A))})),x}},3118:(e,t,r)=>{var n=r(13218),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},21078:(e,t,r)=>{var n=r(62488),i=r(37285);e.exports=function e(t,r,o,s,a){var c=-1,u=t.length;for(o||(o=i),a||(a=[]);++c<u;){var l=t[c];r>0&&o(l)?r>1?e(l,r-1,o,s,a):n(a,l):s||(a[a.length]=l)}return a}},97786:(e,t,r)=>{var n=r(71811),i=r(40327);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},68866:(e,t,r)=>{var n=r(62488),i=r(1469);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},44239:(e,t,r)=>{var n=r(62705),i=r(89607),o=r(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},90939:(e,t,r)=>{var n=r(2492),i=r(37005);e.exports=function e(t,r,o,s,a){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,o,s,e,a))}},2492:(e,t,r)=>{var n=r(46384),i=r(67114),o=r(18351),s=r(16096),a=r(64160),c=r(1469),u=r(44144),l=r(36719),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,y){var v=c(e),b=c(t),w=v?f:a(e),S=b?f:a(t),_=(w=w==d?p:w)==p,C=(S=S==d?p:S)==p,E=w==S;if(E&&u(e)){if(!u(t))return!1;v=!0,_=!1}if(E&&!_)return y||(y=new n),v||l(e)?i(e,t,r,m,g,y):o(e,t,w,r,m,g,y);if(!(1&r)){var $=_&&h.call(e,"__wrapped__"),P=C&&h.call(t,"__wrapped__");if($||P){var T=$?e.value():e,R=P?t.value():t;return y||(y=new n),g(T,R,r,m,y)}}return!!E&&(y||(y=new n),s(e,t,r,m,g,y))}},25588:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},28458:(e,t,r)=>{var n=r(23560),i=r(15346),o=r(13218),s=r(80346),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:a).test(s(e))}},29221:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},38749:(e,t,r)=>{var n=r(44239),i=r(41780),o=r(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[n(e)]}},280:(e,t,r)=>{var n=r(25726),i=r(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},10313:(e,t,r)=>{var n=r(13218),i=r(25726),o=r(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},25970:(e,t,r)=>{var n=r(63012),i=r(79095);e.exports=function(e,t){return n(e,t,(function(t,r){return i(e,r)}))}},63012:(e,t,r)=>{var n=r(97786),i=r(10611),o=r(71811);e.exports=function(e,t,r){for(var s=-1,a=t.length,c={};++s<a;){var u=t[s],l=n(e,u);r(l,u)&&i(c,o(u,e),l)}return c}},10611:(e,t,r)=>{var n=r(34865),i=r(71811),o=r(65776),s=r(13218),a=r(40327);e.exports=function(e,t,r,c){if(!s(e))return e;for(var u=-1,l=(t=i(t,e)).length,d=l-1,f=e;null!=f&&++u<l;){var p=a(t[u]),h=r;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(u!=d){var m=f[p];void 0===(h=c?c(m,p,f):void 0)&&(h=s(m)?m:o(t[u+1])?[]:{})}n(f,p,h),f=f[p]}return e}},56560:(e,t,r)=>{var n=r(75703),i=r(38777),o=r(6557),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},80531:(e,t,r)=>{var n=r(62705),i=r(29932),o=r(1469),s=r(33448),a=n?n.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},27561:(e,t,r)=>{var n=r(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},74757:e=>{e.exports=function(e,t){return e.has(t)}},71811:(e,t,r)=>{var n=r(1469),i=r(15403),o=r(55514),s=r(79833);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(s(e))}},74318:(e,t,r)=>{var n=r(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},64626:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}},57157:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},93147:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},40419:(e,t,r)=>{var n=r(62705),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},77133:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},98363:(e,t,r)=>{var n=r(34865),i=r(89465);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,c=t.length;++a<c;){var u=t[a],l=o?o(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),s?i(r,u,l):n(r,u,l)}return r}},18805:(e,t,r)=>{var n=r(98363),i=r(99551);e.exports=function(e,t){return n(e,i(e),t)}},1911:(e,t,r)=>{var n=r(98363),i=r(51442);e.exports=function(e,t){return n(e,i(e),t)}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},38777:(e,t,r)=>{var n=r(10852),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},67114:(e,t,r)=>{var n=r(88668),i=r(82908),o=r(74757);e.exports=function(e,t,r,s,a,c){var u=1&r,l=e.length,d=t.length;if(l!=d&&!(u&&d>l))return!1;var f=c.get(e),p=c.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,g=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++h<l;){var y=e[h],v=t[h];if(s)var b=u?s(v,y,h,t,e,c):s(y,v,h,e,t,c);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!i(t,(function(e,t){if(!o(g,t)&&(y===e||a(y,e,r,s,c)))return g.push(t)}))){m=!1;break}}else if(y!==v&&!a(y,v,r,s,c)){m=!1;break}}return c.delete(e),c.delete(t),m}},18351:(e,t,r)=>{var n=r(62705),i=r(11149),o=r(77813),s=r(67114),a=r(68776),c=r(21814),u=n?n.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&n;if(p||(p=c),e.size!=t.size&&!h)return!1;var m=f.get(e);if(m)return m==t;n|=2,f.set(e,t);var g=s(p(e),p(t),n,u,d,f);return f.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},16096:(e,t,r)=>{var n=r(58234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var c=1&r,u=n(e),l=u.length;if(l!=n(t).length&&!c)return!1;for(var d=l;d--;){var f=u[d];if(!(c?f in t:i.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=c;++d<l;){var y=e[f=u[d]],v=t[f];if(o)var b=c?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(void 0===b?y===v||s(y,v,r,o,a):b)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var w=e.constructor,S=t.constructor;w==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}},99021:(e,t,r)=>{var n=r(85564),i=r(45357),o=r(30061);e.exports=function(e){return o(i(e,void 0,n),e+"")}},31957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},58234:(e,t,r)=>{var n=r(68866),i=r(99551),o=r(3674);e.exports=function(e){return n(e,o,i)}},46904:(e,t,r)=>{var n=r(68866),i=r(51442),o=r(81704);e.exports=function(e){return n(e,o,i)}},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),i=r(47801);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},85924:(e,t,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);e.exports=n},89607:(e,t,r)=>{var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},99551:(e,t,r)=>{var n=r(34963),i=r(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},51442:(e,t,r)=>{var n=r(62488),i=r(85924),o=r(99551),s=r(70479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s;e.exports=a},64160:(e,t,r)=>{var n=r(18552),i=r(57071),o=r(53818),s=r(58525),a=r(70577),c=r(44239),u=r(80346),l="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",m=u(n),g=u(i),y=u(o),v=u(s),b=u(a),w=c;(n&&w(new n(new ArrayBuffer(1)))!=h||i&&w(new i)!=l||o&&w(o.resolve())!=d||s&&w(new s)!=f||a&&w(new a)!=p)&&(w=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case m:return h;case g:return l;case y:return d;case v:return f;case b:return p}return t}),e.exports=w},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,r)=>{var n=r(71811),i=r(35694),o=r(1469),s=r(65776),a=r(41780),c=r(40327);e.exports=function(e,t,r){for(var u=-1,l=(t=n(t,e)).length,d=!1;++u<l;){var f=c(t[u]);if(!(d=null!=e&&r(e,f)))break;e=e[f]}return d||++u!=l?d:!!(l=null==e?0:e.length)&&a(l)&&s(f,l)&&(o(e)||i(e))}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},43824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},29148:(e,t,r)=>{var n=r(74318),i=r(57157),o=r(93147),s=r(40419),a=r(77133);e.exports=function(e,t,r){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},38517:(e,t,r)=>{var n=r(3118),i=r(85924),o=r(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},37285:(e,t,r)=>{var n=r(62705),i=r(35694),o=r(1469),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},15403:(e,t,r)=>{var n=r(1469),i=r(33448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,i=r(14429),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),i=r(38407),o=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},24523:(e,t,r)=>{var n=r(88306);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},86916:(e,t,r)=>{var n=r(5569)(Object.keys,Object);e.exports=n},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},31167:(e,t,r)=>{e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},45357:(e,t,r)=>{var n=r(96874),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),c=Array(a);++s<a;)c[s]=o[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=o[s];return u[t]=r(c),n(e,this,u)}}},55639:(e,t,r)=>{var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},30061:(e,t,r)=>{var n=r(56560),i=r(21275)(n);e.exports=i},21275:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},37465:(e,t,r)=>{var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,r)=>{var n=r(38407),i=r(57071),o=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},55514:(e,t,r)=>{var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=s},40327:(e,t,r)=>{var n=r(33448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},67990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},50361:(e,t,r)=>{var n=r(85990);e.exports=function(e){return n(e,5)}},75703:e=>{e.exports=function(e){return function(){return e}}},23279:(e,t,r)=>{var n=r(13218),i=r(7771),o=r(14841),s=Math.max,a=Math.min;e.exports=function(e,t,r){var c,u,l,d,f,p,h=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=c,n=u;return c=u=void 0,h=t,d=e.apply(n,r)}function b(e){return h=e,f=setTimeout(S,t),m?v(e):d}function w(e){var r=e-p;return void 0===p||r>=t||r<0||g&&e-h>=l}function S(){var e=i();if(w(e))return _(e);f=setTimeout(S,function(e){var r=t-(e-p);return g?a(r,l-(e-h)):r}(e))}function _(e){return f=void 0,y&&c?v(e):(c=u=void 0,d)}function C(){var e=i(),r=w(e);if(c=arguments,u=this,p=e,r){if(void 0===f)return b(p);if(g)return clearTimeout(f),f=setTimeout(S,t),v(p)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,n(r)&&(m=!!r.leading,l=(g="maxWait"in r)?s(o(r.maxWait)||0,t):l,y="trailing"in r?!!r.trailing:y),C.cancel=function(){void 0!==f&&clearTimeout(f),h=0,c=p=u=f=void 0},C.flush=function(){return void 0===f?d:_(i())},C}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},85564:(e,t,r)=>{var n=r(21078);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},27361:(e,t,r)=>{var n=r(97786);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},79095:(e,t,r)=>{var n=r(13),i=r(222);e.exports=function(e,t){return null!=e&&i(e,t,n)}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,r)=>{var n=r(9454),i=r(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,r)=>{var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44144:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=r(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;e.exports=c},18446:(e,t,r)=>{var n=r(90939);e.exports=function(e,t){return n(e,t)}},28368:(e,t,r)=>{var n=r(90939);e.exports=function(e,t,r){var i=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===i?n(e,t,void 0,r):!!i}},23560:(e,t,r)=>{var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56688:(e,t,r)=>{var n=r(25588),i=r(7518),o=r(31167),s=o&&o.isMap,a=s?i(s):n;e.exports=a},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},72928:(e,t,r)=>{var n=r(29221),i=r(7518),o=r(31167),s=o&&o.isSet,a=s?i(s):n;e.exports=a},33448:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},36719:(e,t,r)=>{var n=r(38749),i=r(7518),o=r(31167),s=o&&o.isTypedArray,a=s?i(s):n;e.exports=a},3674:(e,t,r)=>{var n=r(14636),i=r(280),o=r(98612);e.exports=function(e){return o(e)?n(e):i(e)}},81704:(e,t,r)=>{var n=r(14636),i=r(10313),o=r(98612);e.exports=function(e){return o(e)?n(e,!0):i(e)}},96486:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,l=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",S="[object GeneratorFunction]",_="[object Map]",C="[object Number]",E="[object Object]",$="[object Promise]",P="[object RegExp]",T="[object Set]",R="[object String]",O="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",A="[object DataView]",x="[object Float32Array]",N="[object Float64Array]",j="[object Int8Array]",L="[object Int16Array]",D="[object Int32Array]",F="[object Uint8Array]",M="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",U=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,G=RegExp(B.source),K=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\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",$e="["+Ee+"]",Pe="["+Se+"]",Te="\\d+",Re="["+_e+"]",Oe="[^\\ud800-\\udfff"+Ee+Te+"\\u2700-\\u27bf"+_e+Ce+"]",ke="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Ce+"]",je="(?:"+Re+"|"+Oe+")",Le="(?:"+Ne+"|"+Oe+")",De="(?:['’](?:d|ll|m|re|s|t|ve))?",Fe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me="(?:"+Pe+"|"+ke+")?",We="[\\ufe0e\\ufe0f]?",Ve=We+Me+"(?:\\u200d(?:"+[Ie,Ae,xe].join("|")+")"+We+Me+")*",Ue="(?:"+["[\\u2700-\\u27bf]",Ae,xe].join("|")+")"+Ve,ze="(?:"+[Ie+Pe+"?",Pe,Ae,xe,"[\\ud800-\\udfff]"].join("|")+")",qe=RegExp("['’]","g"),Be=RegExp(Pe,"g"),He=RegExp(ke+"(?="+ke+")|"+ze+Ve,"g"),Ge=RegExp([Ne+"?"+Re+"+"+De+"(?="+[$e,Ne,"$"].join("|")+")",Le+"+"+Fe+"(?="+[$e,Ne+je,"$"].join("|")+")",Ne+"?"+je+"+"+De,Ne+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ue].join("|"),"g"),Ke=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["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"],Je=-1,Ze={};Ze[x]=Ze[N]=Ze[j]=Ze[L]=Ze[D]=Ze[F]=Ze[M]=Ze[W]=Ze[V]=!0,Ze[m]=Ze[g]=Ze[I]=Ze[y]=Ze[A]=Ze[v]=Ze[b]=Ze[w]=Ze[_]=Ze[C]=Ze[E]=Ze[P]=Ze[T]=Ze[R]=Ze[k]=!1;var Xe={};Xe[m]=Xe[g]=Xe[I]=Xe[A]=Xe[y]=Xe[v]=Xe[x]=Xe[N]=Xe[j]=Xe[L]=Xe[D]=Xe[_]=Xe[C]=Xe[E]=Xe[P]=Xe[T]=Xe[R]=Xe[O]=Xe[F]=Xe[M]=Xe[W]=Xe[V]=!0,Xe[b]=Xe[w]=Xe[k]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=nt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ct=at&&at.exports===st,ut=ct&&nt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),dt=lt&<.isArrayBuffer,ft=lt&<.isDate,pt=lt&<.isMap,ht=lt&<.isRegExp,mt=lt&<.isSet,gt=lt&<.isTypedArray;function yt(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 vt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function bt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function wt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function St(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 _t(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&xt(e,t,0)>-1}function Et(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 $t(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 Pt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Tt(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 Rt(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 Ot(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 kt=Dt("length");function It(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function At(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 xt(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):At(e,jt,r)}function Nt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function jt(e){return e!=e}function Lt(e,t){var r=null==e?0:e.length;return r?Wt(e,t)/r:f}function Dt(e){return function(t){return null==t?i:t[e]}}function Ft(e){return function(t){return null==e?i:e[t]}}function Mt(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 s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Vt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ut(e){return e?e.slice(0,sr(e)+1).replace(ne,""):e}function zt(e){return function(t){return e(t)}}function qt(e,t){return $t(t,(function(t){return e[t]}))}function Bt(e,t){return e.has(t)}function Ht(e,t){for(var r=-1,n=e.length;++r<n&&xt(t,e[r],0)>-1;);return r}function Gt(e,t){for(var r=e.length;r--&&xt(t,e[r],0)>-1;);return r}function Kt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Qt=Ft({À:"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"}),Yt=Ft({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Zt(e){return Ke.test(e)}function Xt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function nr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function ir(e){return Zt(e)?function(e){for(var t=He.lastIndex=0;He.test(e);)++t;return t}(e):kt(e)}function or(e){return Zt(e)?function(e){return e.match(He)||[]}(e):function(e){return e.split("")}(e)}function sr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var ar=Ft({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cr=function e(t){var r,n=(t=null==t?ot:cr.defaults(ot.Object(),t,cr.pick(ot,Ye))).Array,ie=t.Date,Se=t.Error,_e=t.Function,Ce=t.Math,Ee=t.Object,$e=t.RegExp,Pe=t.String,Te=t.TypeError,Re=n.prototype,Oe=_e.prototype,ke=Ee.prototype,Ie=t["__core-js_shared__"],Ae=Oe.toString,xe=ke.hasOwnProperty,Ne=0,je=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Le=ke.toString,De=Ae.call(Ee),Fe=ot._,Me=$e("^"+Ae.call(xe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=ct?t.Buffer:i,Ve=t.Symbol,Ue=t.Uint8Array,ze=We?We.allocUnsafe:i,He=er(Ee.getPrototypeOf,Ee),Ke=Ee.create,et=ke.propertyIsEnumerable,nt=Re.splice,it=Ve?Ve.isConcatSpreadable:i,st=Ve?Ve.iterator:i,at=Ve?Ve.toStringTag:i,ut=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,kt=ie&&ie.now!==ot.Date.now&&ie.now,Ft=t.setTimeout!==ot.setTimeout&&t.setTimeout,ur=Ce.ceil,lr=Ce.floor,dr=Ee.getOwnPropertySymbols,fr=We?We.isBuffer:i,pr=t.isFinite,hr=Re.join,mr=er(Ee.keys,Ee),gr=Ce.max,yr=Ce.min,vr=ie.now,br=t.parseInt,wr=Ce.random,Sr=Re.reverse,_r=uo(t,"DataView"),Cr=uo(t,"Map"),Er=uo(t,"Promise"),$r=uo(t,"Set"),Pr=uo(t,"WeakMap"),Tr=uo(Ee,"create"),Rr=Pr&&new Pr,Or={},kr=Mo(_r),Ir=Mo(Cr),Ar=Mo(Er),xr=Mo($r),Nr=Mo(Pr),jr=Ve?Ve.prototype:i,Lr=jr?jr.valueOf:i,Dr=jr?jr.toString:i;function Fr(e){if(ra(e)&&!Bs(e)&&!(e instanceof Ur)){if(e instanceof Vr)return e;if(xe.call(e,"__wrapped__"))return Wo(e)}return new Vr(e)}var Mr=function(){function e(){}return function(t){if(!ta(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Wr(){}function Vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.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.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Br;++t<r;)this.add(e[t])}function Gr(e){var t=this.__data__=new qr(e);this.size=t.size}function Kr(e,t){var r=Bs(e),n=!r&&qs(e),i=!r&&!n&&Qs(e),o=!r&&!n&&!i&&la(e),s=r||n||i||o,a=s?Vt(e.length,Pe):[],c=a.length;for(var u in e)!t&&!xe.call(e,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||yo(u,c))||a.push(u);return a}function Qr(e){var t=e.length;return t?e[Hn(0,t-1)]:i}function Yr(e,t){return No(Ti(e),sn(t,0,e.length))}function Jr(e){return No(Ti(e))}function Zr(e,t,r){(r!==i&&!Vs(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];xe.call(e,t)&&Vs(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(Vs(e[r][0],t))return r;return-1}function tn(e,t,r,n){return dn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ri(t,Aa(t),e)}function nn(e,t,r){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ta(e,t[r]);return s}function sn(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,s){var a,c=1&t,u=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var d=Bs(e);if(d){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&xe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Ti(e,a)}else{var f=po(e),p=f==w||f==S;if(Qs(e))return Si(e,c);if(f==E||f==m||p&&!o){if(a=u||p?{}:mo(e),!c)return u?function(e,t){return Ri(e,fo(e),t)}(e,function(e,t){return e&&Ri(t,xa(t),e)}(a,e)):function(e,t){return Ri(e,lo(e),t)}(e,rn(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case I:return _i(e);case y:case v:return new i(+e);case A:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case x:case N:case j:case L:case D:case F:case M:case W:case V:return Ci(e,r);case _:return new i;case C:case R:return new i(e);case P:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return n=e,Lr?Ee(Lr.call(n)):{}}}(e,f,c)}}s||(s=new Gr);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var g=d?i:(l?u?ro:to:u?xa:Aa)(e);return bt(g||e,(function(n,i){g&&(n=e[i=n]),Xr(a,i,an(n,t,r,i,e,s))})),a}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new Te(o);return ko((function(){e.apply(i,r)}),t)}function ln(e,t,r,n){var i=-1,o=Ct,s=!0,a=e.length,c=[],u=t.length;if(!a)return c;r&&(t=$t(t,zt(r))),n?(o=Et,s=!1):t.length>=200&&(o=Bt,s=!1,t=new Hr(t));e:for(;++i<a;){var l=e[i],d=null==r?l:r(l);if(l=n||0!==l?l:0,s&&d==d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else o(t,d,n)||c.push(l)}return c}Fr.templateSettings={escape:Q,evaluate:Y,interpolate:J,variable:"",imports:{_:Fr}},Fr.prototype=Wr.prototype,Fr.prototype.constructor=Fr,Vr.prototype=Mr(Wr.prototype),Vr.prototype.constructor=Vr,Ur.prototype=Mr(Wr.prototype),Ur.prototype.constructor=Ur,zr.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},zr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zr.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===s?i:r}return xe.call(t,e)?t[e]:i},zr.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==i:xe.call(t,e)},zr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===i?s:t,this},qr.prototype.clear=function(){this.__data__=[],this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():nt.call(t,r,1),--this.size,0))},qr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},qr.prototype.has=function(e){return en(this.__data__,e)>-1},qr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Br.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(Cr||qr),string:new zr}},Br.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Br.prototype.get=function(e){return ao(this,e).get(e)},Br.prototype.has=function(e){return ao(this,e).has(e)},Br.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},Hr.prototype.add=Hr.prototype.push=function(e){return this.__data__.set(e,s),this},Hr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new qr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof qr){var n=r.__data__;if(!Cr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Br(n)}return r.set(e,t),this.size=r.size,this};var dn=Ii(bn),fn=Ii(wn,!0);function pn(e,t){var r=!0;return dn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(c===i?a==a&&!ua(a):r(a,c)))var c=a,u=s}return u}function mn(e,t){var r=[];return dn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function gn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=go),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?gn(a,t-1,r,n,i):Pt(i,a):n||(i[i.length]=a)}return i}var yn=Ai(),vn=Ai(!0);function bn(e,t){return e&&yn(e,t,Aa)}function wn(e,t){return e&&vn(e,t,Aa)}function Sn(e,t){return _t(t,(function(t){return Zs(e[t])}))}function _n(e,t){for(var r=0,n=(t=yi(t,e)).length;null!=e&&r<n;)e=e[Fo(t[r++])];return r&&r==n?e:i}function Cn(e,t,r){var n=t(e);return Bs(e)?n:Pt(n,r(e))}function En(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ee(e)?function(e){var t=xe.call(e,at),r=e[at];try{e[at]=i;var n=!0}catch(e){}var o=Le.call(e);return n&&(t?e[at]=r:delete e[at]),o}(e):function(e){return Le.call(e)}(e)}function $n(e,t){return e>t}function Pn(e,t){return null!=e&&xe.call(e,t)}function Tn(e,t){return null!=e&&t in Ee(e)}function Rn(e,t,r){for(var o=r?Et:Ct,s=e[0].length,a=e.length,c=a,u=n(a),l=1/0,d=[];c--;){var f=e[c];c&&t&&(f=$t(f,zt(t))),l=yr(f.length,l),u[c]=!r&&(t||s>=120&&f.length>=120)?new Hr(c&&f):i}f=e[0];var p=-1,h=u[0];e:for(;++p<s&&d.length<l;){var m=f[p],g=t?t(m):m;if(m=r||0!==m?m:0,!(h?Bt(h,g):o(d,g,r))){for(c=a;--c;){var y=u[c];if(!(y?Bt(y,g):o(e[c],g,r)))continue e}h&&h.push(g),d.push(m)}}return d}function On(e,t,r){var n=null==(e=Po(e,t=yi(t,e)))?e:e[Fo(Jo(t))];return null==n?i:yt(n,e,r)}function kn(e){return ra(e)&&En(e)==m}function In(e,t,r,n,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Bs(e),c=Bs(t),u=a?g:po(e),l=c?g:po(t),d=(u=u==m?E:u)==E,f=(l=l==m?E:l)==E,p=u==l;if(p&&Qs(e)){if(!Qs(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Gr),a||la(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case y:case v:case C:return Vs(+e,+t);case b:return e.name==t.name&&e.message==t.message;case P:case R:return e==t+"";case _:var a=Xt;case T:var c=1&n;if(a||(a=rr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=Xi(a(e),a(t),n,i,o,s);return s.delete(e),l;case O:if(Lr)return Lr.call(e)==Lr.call(t)}return!1}(e,t,u,r,n,o,s);if(!(1&r)){var h=d&&xe.call(e,"__wrapped__"),w=f&&xe.call(t,"__wrapped__");if(h||w){var S=h?e.value():e,$=w?t.value():t;return s||(s=new Gr),o(S,$,r,n,s)}}return!!p&&(s||(s=new Gr),function(e,t,r,n,o,s){var a=1&r,c=to(e),u=c.length;if(u!=to(t).length&&!a)return!1;for(var l=u;l--;){var d=c[l];if(!(a?d in t:xe.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var m=a;++l<u;){var g=e[d=c[l]],y=t[d];if(n)var v=a?n(y,g,d,t,e,s):n(g,y,d,e,t,s);if(!(v===i?g===y||o(g,y,r,n,s):v)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,In,o))}function An(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var c=r[o];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<s;){var u=(c=r[o])[0],l=e[u],d=c[1];if(a&&c[2]){if(l===i&&!(u in e))return!1}else{var f=new Gr;if(n)var p=n(l,d,u,e,t,f);if(!(p===i?In(d,l,3,n,f):p))return!1}}return!0}function xn(e){return!(!ta(e)||(t=e,je&&je in t))&&(Zs(e)?Me:me).test(Mo(e));var t}function Nn(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?Bs(e)?Mn(e[0],e[1]):Fn(e):pc(e)}function jn(e){if(!_o(e))return mr(e);var t=[];for(var r in Ee(e))xe.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Ln(e,t){return e<t}function Dn(e,t){var r=-1,i=Gs(e)?n(e.length):[];return dn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Fn(e){var t=co(e);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===e||An(r,e,t)}}function Mn(e,t){return bo(e)&&Co(t)?Eo(Fo(e),t):function(r){var n=Ta(r,e);return n===i&&n===t?Ra(r,e):In(t,n,3)}}function Wn(e,t,r,n,o){e!==t&&yn(t,(function(s,a){if(o||(o=new Gr),ta(s))!function(e,t,r,n,o,s,a){var c=Ro(e,r),u=Ro(t,r),l=a.get(u);if(l)Zr(e,r,l);else{var d=s?s(c,u,r+"",e,t,a):i,f=d===i;if(f){var p=Bs(u),h=!p&&Qs(u),m=!p&&!h&&la(u);d=u,p||h||m?Bs(c)?d=c:Ks(c)?d=Ti(c):h?(f=!1,d=Si(u,!0)):m?(f=!1,d=Ci(u,!0)):d=[]:oa(u)||qs(u)?(d=c,qs(c)?d=va(c):ta(c)&&!Zs(c)||(d=mo(u))):f=!1}f&&(a.set(u,d),o(d,u,n,s,a),a.delete(u)),Zr(e,r,d)}}(e,t,a,r,Wn,n,o);else{var c=n?n(Ro(e,a),s,a+"",e,t,o):i;c===i&&(c=s),Zr(e,a,c)}}),xa)}function Vn(e,t){var r=e.length;if(r)return yo(t+=t<0?r:0,r)?e[t]:i}function Un(e,t,r){t=t.length?$t(t,(function(e){return Bs(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e})):[ic];var n=-1;t=$t(t,zt(so()));var i=Dn(e,(function(e,r,i){var o=$t(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var c=Ei(i[n],o[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function zn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=_n(e,s);r(a,s)&&Jn(o,yi(s,e),a)}return o}function qn(e,t,r,n){var i=n?Nt:xt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),r&&(a=$t(e,zt(r)));++o<s;)for(var c=0,u=t[o],l=r?r(u):u;(c=i(a,l,c,n))>-1;)a!==e&&nt.call(a,c,1),nt.call(e,c,1);return e}function Bn(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;yo(i)?nt.call(e,i,1):ui(e,i)}}return e}function Hn(e,t){return e+lr(wr()*(t-e+1))}function Gn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=lr(t/2))&&(e+=e)}while(t);return r}function Kn(e,t){return Io($o(e,t,ic),e+"")}function Qn(e){return Qr(Va(e))}function Yn(e,t){var r=Va(e);return No(r,sn(t,0,r.length))}function Jn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=yi(t,e)).length,a=s-1,c=e;null!=c&&++o<s;){var u=Fo(t[o]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var d=c[u];(l=n?n(d,u,c):i)===i&&(l=ta(d)?d:yo(t[o+1])?[]:{})}Xr(c,u,l),c=c[u]}return e}var Zn=Rr?function(e,t){return Rr.set(e,t),e}:ic,Xn=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:ic;function ei(e){return No(Va(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ri(e,t){var r;return dn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!ua(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ii(e,t,ic,r)}function ii(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,c=null===t,u=ua(t),l=t===i;o<s;){var d=lr((o+s)/2),f=r(e[d]),p=f!==i,h=null===f,m=f==f,g=ua(f);if(a)var y=n||m;else y=l?m&&(n||p):c?m&&p&&(n||!h):u?m&&p&&!h&&(n||!g):!h&&!g&&(n?f<=t:f<t);y?o=d+1:s=d}return yr(s,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Vs(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:ua(e)?f:+e}function ai(e){if("string"==typeof e)return e;if(Bs(e))return $t(e,ai)+"";if(ua(e))return Dr?Dr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,r){var n=-1,i=Ct,o=e.length,s=!0,a=[],c=a;if(r)s=!1,i=Et;else if(o>=200){var u=t?null:Gi(e);if(u)return rr(u);s=!1,i=Bt,c=new Hr}else c=t?[]:a;e:for(;++n<o;){var l=e[n],d=t?t(l):l;if(l=r||0!==l?l:0,s&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),a.push(l)}else i(c,d,r)||(c!==a&&c.push(d),a.push(l))}return a}function ui(e,t){return null==(e=Po(e,t=yi(t,e)))||delete e[Fo(Jo(t))]}function li(e,t,r,n){return Jn(e,t,r(_n(e,t)),n)}function di(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Ur&&(r=r.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))}),r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ci(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],c=-1;++c<i;)c!=o&&(s[o]=ln(s[o]||a,e[c],t,r));return ci(gn(s,1),t,r)}function hi(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var c=n<s?t[n]:i;r(a,e[n],c)}return a}function mi(e){return Ks(e)?e:[]}function gi(e){return"function"==typeof e?e:ic}function yi(e,t){return Bs(e)?e:bo(e,t)?[e]:Do(ba(e))}var vi=Kn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var wi=lt||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=ze?ze(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ci(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=ua(e),a=t!==i,c=null===t,u=t==t,l=ua(t);if(!c&&!l&&!s&&e>t||s&&a&&u&&!c&&!l||n&&a&&u||!r&&u||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function $i(e,t,r,i){for(var o=-1,s=e.length,a=r.length,c=-1,u=t.length,l=gr(s-a,0),d=n(u+l),f=!i;++c<u;)d[c]=t[c];for(;++o<a;)(f||o<s)&&(d[r[o]]=e[o]);for(;l--;)d[c++]=e[o++];return d}function Pi(e,t,r,i){for(var o=-1,s=e.length,a=-1,c=r.length,u=-1,l=t.length,d=gr(s-c,0),f=n(d+l),p=!i;++o<d;)f[o]=e[o];for(var h=o;++u<l;)f[h+u]=t[u];for(;++a<c;)(p||o<s)&&(f[h+r[a]]=e[o++]);return f}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ri(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var c=t[s],u=n?n(r[c],e[c],c,r,e):i;u===i&&(u=e[c]),o?nn(r,c,u):Xr(r,c,u)}return r}function Oi(e,t){return function(r,n){var i=Bs(r)?vt:tn,o=t?t():{};return i(r,e,so(n,2),o)}}function ki(e){return Kn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var c=r[n];c&&e(t,c,n,s)}return t}))}function Ii(e,t){return function(r,n){if(null==r)return r;if(!Gs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ai(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===r(o[c],c,o))break}return t}}function xi(e){return function(t){var r=Zt(t=ba(t))?or(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 Tt(Za(qa(t).replace(qe,"")),e,"")}}function ji(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=Mr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Li(e){return function(t,r,n){var o=Ee(t);if(!Gs(t)){var s=so(r,3);t=Aa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Di(e){return eo((function(t){var r=t.length,n=r,s=Vr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Te(o);if(s&&!c&&"wrapper"==io(a))var c=new Vr([],!0)}for(n=c?n:r;++n<r;){var u=io(a=t[n]),l="wrapper"==u?no(a):i;c=l&&wo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[io(l[0])].apply(c,l[3]):1==a.length&&wo(a)?c[u]():c.thru(a)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Bs(n))return c.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,s,a,c,l,d,f){var p=t&u,h=1&t,m=2&t,g=24&t,y=512&t,v=m?i:ji(e);return function i(){for(var u=arguments.length,b=n(u),w=u;w--;)b[w]=arguments[w];if(g)var S=oo(i),_=Kt(b,S);if(o&&(b=$i(b,o,s,g)),a&&(b=Pi(b,a,c,g)),u-=_,g&&u<f){var C=tr(b,S);return Bi(e,t,Fi,i.placeholder,r,b,C,l,d,f-u)}var E=h?r:this,$=m?E[e]:e;return u=b.length,l?b=To(b,l):y&&u>1&&b.reverse(),p&&d<u&&(b.length=d),this&&this!==ot&&this instanceof i&&($=v||ji($)),$.apply(E,b)}}function Mi(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 Wi(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=si(r),n=si(n)),o=e(r,n)}return o}}function Vi(e){return eo((function(t){return t=$t(t,zt(so())),Kn((function(r){var n=this;return e(t,(function(e){return yt(e,n,r)}))}))}))}function Ui(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?Gn(t,e):t;var n=Gn(t,ur(e/ir(t)));return Zt(t)?bi(or(n),0,e).join(""):n.slice(0,e)}function zi(e){return function(t,r,o){return o&&"number"!=typeof o&&vo(t,r,o)&&(r=o=i),t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r,i){for(var o=-1,s=gr(ur((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:ha(o),e)}}function qi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Bi(e,t,r,n,o,s,a,u,l,d){var f=8&t;t|=f?c:64,4&(t&=~(f?64:c))||(t&=-4);var p=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,u,l,d],h=r.apply(i,p);return wo(e)&&Oo(h,p),h.placeholder=n,Ao(h,e,t)}function Hi(e){var t=Ce[e];return function(e,r){if(e=ya(e),(r=null==r?0:yr(ma(r),292))&&pr(e)){var n=(ba(e)+"e").split("e");return+((n=(ba(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Gi=$r&&1/rr(new $r([,-0]))[1]==l?function(e){return new $r(e)}:uc;function Ki(e){return function(t){var r=po(t);return r==_?Xt(t):r==T?nr(t):function(e,t){return $t(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,r,s,l,d,f,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var m=s?s.length:0;if(m||(t&=-97,s=l=i),f=f===i?f:gr(ma(f),0),p=p===i?p:ma(p),m-=l?l.length:0,64&t){var g=s,y=l;s=l=i}var v=h?i:no(e),b=[e,t,r,s,l,g,y,d,f,p];if(v&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==u&&8==r||n==u&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?$i(l,c,t[4]):c,e[4]=l?tr(e[3],a):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Pi(l,c,t[6]):c,e[6]=l?tr(e[5],a):t[6]),(c=t[7])&&(e[7]=c),n&u&&(e[8]=null==e[8]?t[8]:yr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,v),e=b[0],t=b[1],r=b[2],s=b[3],l=b[4],!(p=b[9]=b[9]===i?h?0:e.length:gr(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var o=ji(e);return function s(){for(var a=arguments.length,c=n(a),u=a,l=oo(s);u--;)c[u]=arguments[u];var d=a<3&&c[0]!==l&&c[a-1]!==l?[]:tr(c,l);return(a-=d.length)<r?Bi(e,t,Fi,s.placeholder,i,c,d,i,i,r-a):yt(this&&this!==ot&&this instanceof s?o:e,this,c)}}(e,t,p):t!=c&&33!=t||l.length?Fi.apply(i,b):function(e,t,r,i){var o=1&t,s=ji(e);return function t(){for(var a=-1,c=arguments.length,u=-1,l=i.length,d=n(l+c),f=this&&this!==ot&&this instanceof t?s:e;++u<l;)d[u]=i[u];for(;c--;)d[u++]=arguments[++a];return yt(f,o?r:this,d)}}(e,t,r,s);else var w=function(e,t,r){var n=1&t,i=ji(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Ao((v?Zn:Oo)(w,b),e,t)}function Yi(e,t,r,n){return e===i||Vs(e,ke[r])&&!xe.call(n,r)?t:e}function Ji(e,t,r,n,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Wn(e,t,i,Ji,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var l=s.get(e),d=s.get(t);if(l&&d)return l==t&&d==e;var f=-1,p=!0,h=2&r?new Hr:i;for(s.set(e,t),s.set(t,e);++f<c;){var m=e[f],g=t[f];if(n)var y=a?n(g,m,f,t,e,s):n(m,g,f,e,t,s);if(y!==i){if(y)continue;p=!1;break}if(h){if(!Ot(t,(function(e,t){if(!Bt(h,t)&&(m===e||o(m,e,r,n,s)))return h.push(t)}))){p=!1;break}}else if(m!==g&&!o(m,g,r,n,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return Io($o(e,i,Ho),e+"")}function to(e){return Cn(e,Aa,lo)}function ro(e){return Cn(e,xa,fo)}var no=Rr?function(e){return Rr.get(e)}:uc;function io(e){for(var t=e.name+"",r=Or[t],n=xe.call(Or,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(xe.call(Fr,"placeholder")?Fr:e).placeholder}function so(){var e=Fr.iteratee||oc;return e=e===oc?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 co(e){for(var t=Aa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Co(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return xn(r)?r:i}var lo=dr?function(e){return null==e?[]:(e=Ee(e),_t(dr(e),(function(t){return et.call(e,t)})))}:gc,fo=dr?function(e){for(var t=[];e;)Pt(t,lo(e)),e=He(e);return t}:gc,po=En;function ho(e,t,r){for(var n=-1,i=(t=yi(t,e)).length,o=!1;++n<i;){var s=Fo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&yo(s,i)&&(Bs(e)||qs(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Mr(He(e))}function go(e){return Bs(e)||qs(e)||!!(it&&e&&e[it])}function yo(e,t){var r=typeof e;return!!(t=null==t?d:t)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?Gs(r)&&yo(t,r.length):"string"==n&&t in r)&&Vs(r[t],e)}function bo(e,t){if(Bs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ua(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function wo(e){var t=io(e),r=Fr[t];if("function"!=typeof r||!(t in Ur.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(_r&&po(new _r(new ArrayBuffer(1)))!=A||Cr&&po(new Cr)!=_||Er&&po(Er.resolve())!=$||$r&&po(new $r)!=T||Pr&&po(new Pr)!=k)&&(po=function(e){var t=En(e),r=t==E?e.constructor:i,n=r?Mo(r):"";if(n)switch(n){case kr:return A;case Ir:return _;case Ar:return $;case xr:return T;case Nr:return k}return t});var So=Ie?Zs:yc;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function Co(e){return e==e&&!ta(e)}function Eo(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function $o(e,t,r){return t=gr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=gr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var c=n(t+1);++o<t;)c[o]=i[o];return c[t]=r(a),yt(e,this,c)}}function Po(e,t){return t.length<2?e:_n(e,ti(t,0,-1))}function To(e,t){for(var r=e.length,n=yr(t.length,r),o=Ti(e);n--;){var s=t[n];e[n]=yo(s,r)?o[s]:i}return e}function Ro(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=xo(Zn),ko=Ft||function(e,t){return ot.setTimeout(e,t)},Io=xo(Xn);function Ao(e,t,r){var n=t+"";return Io(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 bt(h,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function xo(e){var t=0,r=0;return function(){var n=vr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function No(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Hn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var jo,Lo,Do=(jo=js((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===Lo.size&&Lo.clear(),e})),Lo=jo.cache,jo);function Fo(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wo(e){if(e instanceof Ur)return e.clone();var t=new Vr(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Kn((function(e,t){return Ks(e)?ln(e,gn(t,1,Ks,!0)):[]})),Uo=Kn((function(e,t){var r=Jo(t);return Ks(r)&&(r=i),Ks(e)?ln(e,gn(t,1,Ks,!0),so(r,2)):[]})),zo=Kn((function(e,t){var r=Jo(t);return Ks(r)&&(r=i),Ks(e)?ln(e,gn(t,1,Ks,!0),i,r):[]}));function qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ma(r);return i<0&&(i=gr(n+i,0)),At(e,so(t,3),i)}function Bo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ma(r),o=r<0?gr(n+o,0):yr(o,n-1)),At(e,so(t,3),o,!0)}function Ho(e){return null!=e&&e.length?gn(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Ko=Kn((function(e){var t=$t(e,mi);return t.length&&t[0]===e[0]?Rn(t):[]})),Qo=Kn((function(e){var t=Jo(e),r=$t(e,mi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Rn(r,so(t,2)):[]})),Yo=Kn((function(e){var t=Jo(e),r=$t(e,mi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Rn(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Kn(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?qn(e,t):e}var es=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return Bn(e,$t(t,(function(e){return yo(e,r)?+e:e})).sort(Ei)),n}));function ts(e){return null==e?e:Sr.call(e)}var rs=Kn((function(e){return ci(gn(e,1,Ks,!0))})),ns=Kn((function(e){var t=Jo(e);return Ks(t)&&(t=i),ci(gn(e,1,Ks,!0),so(t,2))})),is=Kn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ci(gn(e,1,Ks,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(Ks(e))return t=gr(e.length,t),!0})),Vt(t,(function(t){return $t(e,Dt(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:$t(r,(function(e){return yt(t,i,e)}))}var as=Kn((function(e,t){return Ks(e)?ln(e,t):[]})),cs=Kn((function(e){return pi(_t(e,Ks))})),us=Kn((function(e){var t=Jo(e);return Ks(t)&&(t=i),pi(_t(e,Ks),so(t,2))})),ls=Kn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,pi(_t(e,Ks),i,t)})),ds=Kn(os),fs=Kn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function ps(e){var t=Fr(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ms=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&yo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Vr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),gs=Oi((function(e,t,r){xe.call(e,r)?++e[r]:nn(e,r,1)})),ys=Li(qo),vs=Li(Bo);function bs(e,t){return(Bs(e)?bt:dn)(e,so(t,3))}function ws(e,t){return(Bs(e)?wt:fn)(e,so(t,3))}var Ss=Oi((function(e,t,r){xe.call(e,r)?e[r].push(t):nn(e,r,[t])})),_s=Kn((function(e,t,r){var i=-1,o="function"==typeof t,s=Gs(e)?n(e.length):[];return dn(e,(function(e){s[++i]=o?yt(t,e,r):On(e,t,r)})),s})),Cs=Oi((function(e,t,r){nn(e,r,t)}));function Es(e,t){return(Bs(e)?$t:Dn)(e,so(t,3))}var $s=Oi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ps=Kn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&vo(e,t[0],t[1])?t=[]:r>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,gn(t,1),[])})),Ts=kt||function(){return ot.Date.now()};function Rs(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Qi(e,u,i,i,i,i,t)}function Os(e,t){var r;if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var ks=Kn((function(e,t,r){var n=1;if(r.length){var i=tr(r,oo(ks));n|=c}return Qi(e,n,t,r,i)})),Is=Kn((function(e,t,r){var n=3;if(r.length){var i=tr(r,oo(Is));n|=c}return Qi(t,n,e,r,i)}));function As(e,t,r){var n,s,a,c,u,l,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function m(t){var r=n,o=s;return n=s=i,d=t,c=e.apply(o,r)}function g(e){return d=e,u=ko(v,t),f?m(e):c}function y(e){var r=e-l;return l===i||r>=t||r<0||p&&e-d>=a}function v(){var e=Ts();if(y(e))return b(e);u=ko(v,function(e){var r=t-(e-l);return p?yr(r,a-(e-d)):r}(e))}function b(e){return u=i,h&&n?m(e):(n=s=i,c)}function w(){var e=Ts(),r=y(e);if(n=arguments,s=this,l=e,r){if(u===i)return g(l);if(p)return wi(u),u=ko(v,t),m(l)}return u===i&&(u=ko(v,t)),c}return t=ya(t)||0,ta(r)&&(f=!!r.leading,a=(p="maxWait"in r)?gr(ya(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),w.cancel=function(){u!==i&&wi(u),d=0,n=l=s=u=i},w.flush=function(){return u===i?c:b(Ts())},w}var xs=Kn((function(e,t){return un(e,1,t)})),Ns=Kn((function(e,t,r){return un(e,ya(t)||0,r)}));function js(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 s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(js.Cache||Br),r}function Ls(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)}}js.Cache=Br;var Ds=vi((function(e,t){var r=(t=1==t.length&&Bs(t[0])?$t(t[0],zt(so())):$t(gn(t,1),zt(so()))).length;return Kn((function(n){for(var i=-1,o=yr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return yt(e,this,n)}))})),Fs=Kn((function(e,t){var r=tr(t,oo(Fs));return Qi(e,c,i,t,r)})),Ms=Kn((function(e,t){var r=tr(t,oo(Ms));return Qi(e,64,i,t,r)})),Ws=eo((function(e,t){return Qi(e,256,i,i,i,t)}));function Vs(e,t){return e===t||e!=e&&t!=t}var Us=qi($n),zs=qi((function(e,t){return e>=t})),qs=kn(function(){return arguments}())?kn:function(e){return ra(e)&&xe.call(e,"callee")&&!et.call(e,"callee")},Bs=n.isArray,Hs=dt?zt(dt):function(e){return ra(e)&&En(e)==I};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ks(e){return ra(e)&&Gs(e)}var Qs=fr||yc,Ys=ft?zt(ft):function(e){return ra(e)&&En(e)==v};function Js(e){if(!ra(e))return!1;var t=En(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=En(e);return t==w||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=pt?zt(pt):function(e){return ra(e)&&po(e)==_};function ia(e){return"number"==typeof e||ra(e)&&En(e)==C}function oa(e){if(!ra(e)||En(e)!=E)return!1;var t=He(e);if(null===t)return!0;var r=xe.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ae.call(r)==De}var sa=ht?zt(ht):function(e){return ra(e)&&En(e)==P},aa=mt?zt(mt):function(e){return ra(e)&&po(e)==T};function ca(e){return"string"==typeof e||!Bs(e)&&ra(e)&&En(e)==R}function ua(e){return"symbol"==typeof e||ra(e)&&En(e)==O}var la=gt?zt(gt):function(e){return ra(e)&&ea(e.length)&&!!Ze[En(e)]},da=qi(Ln),fa=qi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Gs(e))return ca(e)?or(e):Ti(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=po(e);return(t==_?Xt:t==T?rr:Va)(e)}function ha(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function ga(e){return e?sn(ma(e),0,p):0}function ya(e){if("number"==typeof e)return e;if(ua(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var r=he.test(e);return r||ge.test(e)?rt(e.slice(2),r?2:8):pe.test(e)?f:+e}function va(e){return Ri(e,xa(e))}function ba(e){return null==e?"":ai(e)}var wa=ki((function(e,t){if(_o(t)||Gs(t))Ri(t,Aa(t),e);else for(var r in t)xe.call(t,r)&&Xr(e,r,t[r])})),Sa=ki((function(e,t){Ri(t,xa(t),e)})),_a=ki((function(e,t,r,n){Ri(t,xa(t),e,n)})),Ca=ki((function(e,t,r,n){Ri(t,Aa(t),e,n)})),Ea=eo(on),$a=Kn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=xa(s),c=-1,u=a.length;++c<u;){var l=a[c],d=e[l];(d===i||Vs(d,ke[l])&&!xe.call(e,l))&&(e[l]=s[l])}return e})),Pa=Kn((function(e){return e.push(i,Ji),yt(ja,i,e)}));function Ta(e,t,r){var n=null==e?i:_n(e,t);return n===i?r:n}function Ra(e,t){return null!=e&&ho(e,t,Tn)}var Oa=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=r}),tc(ic)),ka=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),xe.call(e,t)?e[t].push(r):e[t]=[r]}),so),Ia=Kn(On);function Aa(e){return Gs(e)?Kr(e):jn(e)}function xa(e){return Gs(e)?Kr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=_o(e),r=[];for(var n in e)("constructor"!=n||!t&&xe.call(e,n))&&r.push(n);return r}(e)}var Na=ki((function(e,t,r){Wn(e,t,r)})),ja=ki((function(e,t,r,n){Wn(e,t,r,n)})),La=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=$t(t,(function(t){return t=yi(t,e),n||(n=t.length>1),t})),Ri(e,ro(e),r),n&&(r=an(r,7,Zi));for(var i=t.length;i--;)ui(r,t[i]);return r})),Da=eo((function(e,t){return null==e?{}:function(e,t){return zn(e,t,(function(t,r){return Ra(e,r)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var r=$t(ro(e),(function(e){return[e]}));return t=so(t),zn(e,r,(function(e,r){return t(e,r[0])}))}var Ma=Ki(Aa),Wa=Ki(xa);function Va(e){return null==e?[]:qt(e,Aa(e))}var Ua=Ni((function(e,t,r){return t=t.toLowerCase(),e+(r?za(t):t)}));function za(e){return Ja(ba(e).toLowerCase())}function qa(e){return(e=ba(e))&&e.replace(ve,Qt).replace(Be,"")}var Ba=Ni((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ha=Ni((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ga=xi("toLowerCase"),Ka=Ni((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Qa=Ni((function(e,t,r){return e+(r?" ":"")+Ja(t)})),Ya=Ni((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=xi("toUpperCase");function Za(e,t,r){return e=ba(e),(t=r?i:t)===i?function(e){return Qe.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xa=Kn((function(e,t){try{return yt(e,i,t)}catch(e){return Js(e)?e:new Se(e)}})),ec=eo((function(e,t){return bt(t,(function(t){t=Fo(t),nn(e,t,ks(e[t],e))})),e}));function tc(e){return function(){return e}}var rc=Di(),nc=Di(!0);function ic(e){return e}function oc(e){return Nn("function"==typeof e?e:an(e,1))}var sc=Kn((function(e,t){return function(r){return On(r,e,t)}})),ac=Kn((function(e,t){return function(r){return On(e,r,t)}}));function cc(e,t,r){var n=Aa(t),i=Sn(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Sn(t,Aa(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return bt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Ti(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Pt([this.value()],arguments))})})),e}function uc(){}var lc=Vi($t),dc=Vi(St),fc=Vi(Ot);function pc(e){return bo(e)?Dt(Fo(e)):function(e){return function(t){return _n(t,e)}}(e)}var hc=zi(),mc=zi(!0);function gc(){return[]}function yc(){return!1}var vc,bc=Wi((function(e,t){return e+t}),0),wc=Hi("ceil"),Sc=Wi((function(e,t){return e/t}),1),_c=Hi("floor"),Cc=Wi((function(e,t){return e*t}),1),Ec=Hi("round"),$c=Wi((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Rs,Fr.assign=wa,Fr.assignIn=Sa,Fr.assignInWith=_a,Fr.assignWith=Ca,Fr.at=Ea,Fr.before=Os,Fr.bind=ks,Fr.bindAll=ec,Fr.bindKey=Is,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Bs(e)?e:[e]},Fr.chain=ps,Fr.chunk=function(e,t,r){t=(r?vo(e,t,r):t===i)?1:gr(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,c=n(ur(o/t));s<o;)c[a++]=ti(e,s,s+=t);return c},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 Pt(Bs(r)?Ti(r):[r],gn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?$t(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[r(e[0]),e[1]]})):[],Kn((function(r){for(var n=-1;++n<t;){var i=e[n];if(yt(i[0],this,r))return yt(i[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=Aa(e);return function(r){return cn(r,e,t)}}(an(e,1))},Fr.constant=tc,Fr.countBy=gs,Fr.create=function(e,t){var r=Mr(e);return null==t?r:rn(r,t)},Fr.curry=function e(t,r,n){var o=Qi(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=Qi(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.debounce=As,Fr.defaults=$a,Fr.defaultsDeep=Pa,Fr.defer=xs,Fr.delay=Ns,Fr.difference=Vo,Fr.differenceBy=Uo,Fr.differenceWith=zo,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ma(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ma(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},Fr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&vo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ma(n))<0&&(n+=o),n=r>n?0:ga(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Bs(e)?_t:mn)(e,so(t,3))},Fr.flatMap=function(e,t){return gn(Es(e,t),1)},Fr.flatMapDeep=function(e,t){return gn(Es(e,t),l)},Fr.flatMapDepth=function(e,t,r){return r=r===i?1:ma(r),gn(Es(e,t),r)},Fr.flatten=Ho,Fr.flattenDeep=function(e){return null!=e&&e.length?gn(e,l):[]},Fr.flattenDepth=function(e,t){return null!=e&&e.length?gn(e,t=t===i?1:ma(t)):[]},Fr.flip=function(e){return Qi(e,512)},Fr.flow=rc,Fr.flowRight=nc,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?[]:Sn(e,Aa(e))},Fr.functionsIn=function(e){return null==e?[]:Sn(e,xa(e))},Fr.groupBy=Ss,Fr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Fr.intersection=Ko,Fr.intersectionBy=Qo,Fr.intersectionWith=Yo,Fr.invert=Oa,Fr.invertBy=ka,Fr.invokeMap=_s,Fr.iteratee=oc,Fr.keyBy=Cs,Fr.keys=Aa,Fr.keysIn=xa,Fr.map=Es,Fr.mapKeys=function(e,t){var r={};return t=so(t,3),bn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=so(t,3),bn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},Fr.matches=function(e){return Fn(an(e,1))},Fr.matchesProperty=function(e,t){return Mn(e,an(t,1))},Fr.memoize=js,Fr.merge=Na,Fr.mergeWith=ja,Fr.method=sc,Fr.methodOf=ac,Fr.mixin=cc,Fr.negate=Ls,Fr.nthArg=function(e){return e=ma(e),Kn((function(t){return Vn(t,e)}))},Fr.omit=La,Fr.omitBy=function(e,t){return Fa(e,Ls(so(t)))},Fr.once=function(e){return Os(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Bs(t)||(t=null==t?[]:[t]),Bs(r=n?i:r)||(r=null==r?[]:[r]),Un(e,t,r))},Fr.over=lc,Fr.overArgs=Ds,Fr.overEvery=dc,Fr.overSome=fc,Fr.partial=Fs,Fr.partialRight=Ms,Fr.partition=$s,Fr.pick=Da,Fr.pickBy=Fa,Fr.property=pc,Fr.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},Fr.pull=Zo,Fr.pullAll=Xo,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?qn(e,t,so(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?qn(e,t,i,r):e},Fr.pullAt=es,Fr.range=hc,Fr.rangeRight=mc,Fr.rearg=Ws,Fr.reject=function(e,t){return(Bs(e)?_t:mn)(e,Ls(so(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Bn(e,i),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Kn(e,t=t===i?t:ma(t))},Fr.reverse=ts,Fr.sampleSize=function(e,t,r){return t=(r?vo(e,t,r):t===i)?1:ma(t),(Bs(e)?Yr:Yn)(e,t)},Fr.set=function(e,t,r){return null==e?e:Jn(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Jn(e,t,r,n)},Fr.shuffle=function(e){return(Bs(e)?Jr:ei)(e)},Fr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&vo(e,t,r)?(t=0,r=n):(t=null==t?0:ma(t),r=r===i?n:ma(r)),ti(e,t,r)):[]},Fr.sortBy=Ps,Fr.sortedUniq=function(e){return e&&e.length?oi(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&vo(e,t,r)&&(t=r=i),(r=r===i?p:r>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?bi(or(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:gr(ma(t),0),Kn((function(r){var n=r[t],i=bi(r,0,t);return n&&Pt(i,n),yt(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ma(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ma(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?di(e,so(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 ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),As(e,t,{leading:n,maxWait:t,trailing:i})},Fr.thru=hs,Fr.toArray=pa,Fr.toPairs=Ma,Fr.toPairsIn=Wa,Fr.toPath=function(e){return Bs(e)?$t(e,Fo):ua(e)?[e]:Ti(Do(ba(e)))},Fr.toPlainObject=va,Fr.transform=function(e,t,r){var n=Bs(e),i=n||Qs(e)||la(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Zs(o)?Mr(He(e)):{}}return(i?bt:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Rs(e,1)},Fr.union=rs,Fr.unionBy=ns,Fr.unionWith=is,Fr.uniq=function(e){return e&&e.length?ci(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ci(e,i,t):[]},Fr.unset=function(e,t){return null==e||ui(e,t)},Fr.unzip=os,Fr.unzipWith=ss,Fr.update=function(e,t,r){return null==e?e:li(e,t,gi(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:li(e,t,gi(r),n)},Fr.values=Va,Fr.valuesIn=function(e){return null==e?[]:qt(e,xa(e))},Fr.without=as,Fr.words=Za,Fr.wrap=function(e,t){return Fs(gi(t),e)},Fr.xor=cs,Fr.xorBy=us,Fr.xorWith=ls,Fr.zip=ds,Fr.zipObject=function(e,t){return hi(e||[],t||[],Xr)},Fr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jn)},Fr.zipWith=fs,Fr.entries=Ma,Fr.entriesIn=Wa,Fr.extend=Sa,Fr.extendWith=_a,cc(Fr,Fr),Fr.add=bc,Fr.attempt=Xa,Fr.camelCase=Ua,Fr.capitalize=za,Fr.ceil=wc,Fr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),sn(ya(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||cn(e,t,Aa(t))},Fr.deburr=qa,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=Sc,Fr.endsWith=function(e,t,r){e=ba(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ma(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Fr.eq=Vs,Fr.escape=function(e){return(e=ba(e))&&K.test(e)?e.replace(H,Yt):e},Fr.escapeRegExp=function(e){return(e=ba(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Bs(e)?St:pn;return r&&vo(e,t,r)&&(t=i),n(e,so(t,3))},Fr.find=ys,Fr.findIndex=qo,Fr.findKey=function(e,t){return It(e,so(t,3),bn)},Fr.findLast=vs,Fr.findLastIndex=Bo,Fr.findLastKey=function(e,t){return It(e,so(t,3),wn)},Fr.floor=_c,Fr.forEach=bs,Fr.forEachRight=ws,Fr.forIn=function(e,t){return null==e?e:yn(e,so(t,3),xa)},Fr.forInRight=function(e,t){return null==e?e:vn(e,so(t,3),xa)},Fr.forOwn=function(e,t){return e&&bn(e,so(t,3))},Fr.forOwnRight=function(e,t){return e&&wn(e,so(t,3))},Fr.get=Ta,Fr.gt=Us,Fr.gte=zs,Fr.has=function(e,t){return null!=e&&ho(e,t,Pn)},Fr.hasIn=Ra,Fr.head=Go,Fr.identity=ic,Fr.includes=function(e,t,r,n){e=Gs(e)?e:Va(e),r=r&&!n?ma(r):0;var i=e.length;return r<0&&(r=gr(i+r,0)),ca(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&xt(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:ma(r);return i<0&&(i=gr(n+i,0)),xt(e,t,i)},Fr.inRange=function(e,t,r){return t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r){return e>=yr(t,r)&&e<gr(t,r)}(e=ya(e),t,r)},Fr.invoke=Ia,Fr.isArguments=qs,Fr.isArray=Bs,Fr.isArrayBuffer=Hs,Fr.isArrayLike=Gs,Fr.isArrayLikeObject=Ks,Fr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&En(e)==y},Fr.isBuffer=Qs,Fr.isDate=Ys,Fr.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Bs(e)||"string"==typeof e||"function"==typeof e.splice||Qs(e)||la(e)||qs(e)))return!e.length;var t=po(e);if(t==_||t==T)return!e.size;if(_o(e))return!jn(e).length;for(var r in e)if(xe.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return In(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?In(e,t,i,r):!!n},Fr.isError=Js,Fr.isFinite=function(e){return"number"==typeof e&&pr(e)},Fr.isFunction=Zs,Fr.isInteger=Xs,Fr.isLength=ea,Fr.isMap=na,Fr.isMatch=function(e,t){return e===t||An(e,t,co(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,An(e,t,co(t),r)},Fr.isNaN=function(e){return ia(e)&&e!=+e},Fr.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=ia,Fr.isObject=ta,Fr.isObjectLike=ra,Fr.isPlainObject=oa,Fr.isRegExp=sa,Fr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=d},Fr.isSet=aa,Fr.isString=ca,Fr.isSymbol=ua,Fr.isTypedArray=la,Fr.isUndefined=function(e){return e===i},Fr.isWeakMap=function(e){return ra(e)&&po(e)==k},Fr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==En(e)},Fr.join=function(e,t){return null==e?"":hr.call(e,t)},Fr.kebabCase=Ba,Fr.last=Jo,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=ma(r))<0?gr(n+o,0):yr(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):At(e,jt,o,!0)},Fr.lowerCase=Ha,Fr.lowerFirst=Ga,Fr.lt=da,Fr.lte=fa,Fr.max=function(e){return e&&e.length?hn(e,ic,$n):i},Fr.maxBy=function(e,t){return e&&e.length?hn(e,so(t,2),$n):i},Fr.mean=function(e){return Lt(e,ic)},Fr.meanBy=function(e,t){return Lt(e,so(t,2))},Fr.min=function(e){return e&&e.length?hn(e,ic,Ln):i},Fr.minBy=function(e,t){return e&&e.length?hn(e,so(t,2),Ln):i},Fr.stubArray=gc,Fr.stubFalse=yc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Cc,Fr.nth=function(e,t){return e&&e.length?Vn(e,ma(t)):i},Fr.noConflict=function(){return ot._===this&&(ot._=Fe),this},Fr.noop=uc,Fr.now=Ts,Fr.pad=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(lr(i),r)+e+Ui(ur(i),r)},Fr.padEnd=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;return t&&n<t?e+Ui(t-n,r):e},Fr.padStart=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;return t&&n<t?Ui(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ba(e).replace(ne,""),t||0)},Fr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&vo(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=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=wr();return yr(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Hn(e,t)},Fr.reduce=function(e,t,r){var n=Bs(e)?Tt:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,dn)},Fr.reduceRight=function(e,t,r){var n=Bs(e)?Rt:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},Fr.repeat=function(e,t,r){return t=(r?vo(e,t,r):t===i)?1:ma(t),Gn(ba(e),t)},Fr.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Fo(t[n])];s===i&&(n=o,s=r),e=Zs(s)?s.call(e):s}return e},Fr.round=Ec,Fr.runInContext=e,Fr.sample=function(e){return(Bs(e)?Qr:Qn)(e)},Fr.size=function(e){if(null==e)return 0;if(Gs(e))return ca(e)?ir(e):e.length;var t=po(e);return t==_||t==T?e.size:jn(e).length},Fr.snakeCase=Ka,Fr.some=function(e,t,r){var n=Bs(e)?Ot:ri;return r&&vo(e,t,r)&&(t=i),n(e,so(t,3))},Fr.sortedIndex=function(e,t){return ni(e,t)},Fr.sortedIndexBy=function(e,t,r){return ii(e,t,so(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&Vs(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ii(e,t,so(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(Vs(e[r],t))return r}return-1},Fr.startCase=Qa,Fr.startsWith=function(e,t,r){return e=ba(e),r=null==r?0:sn(ma(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},Fr.subtract=$c,Fr.sum=function(e){return e&&e.length?Wt(e,ic):0},Fr.sumBy=function(e,t){return e&&e.length?Wt(e,so(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&vo(e,t,r)&&(t=i),e=ba(e),t=_a({},t,n,Yi);var o,s,a=_a({},t.imports,n.imports,Yi),c=Aa(a),u=qt(a,c),l=0,d=t.interpolate||be,f="__p += '",p=$e((t.escape||be).source+"|"+d.source+"|"+(d===J?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(xe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(p,(function(t,r,n,i,a,c){return n||(n=i),f+=e.slice(l,c).replace(we,Jt),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),f+="';\n";var m=xe.call(t,"variable")&&t.variable;if(m){if(ue.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(z,"$1").replace(q,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Xa((function(){return _e(c,h+"return "+f).apply(i,u)}));if(g.source=f,Js(g))throw g;return g},Fr.times=function(e,t){if((e=ma(e))<1||e>d)return[];var r=p,n=yr(e,p);t=so(t),e-=p;for(var i=Vt(n,t);++r<e;)t(r);return i},Fr.toFinite=ha,Fr.toInteger=ma,Fr.toLength=ga,Fr.toLower=function(e){return ba(e).toLowerCase()},Fr.toNumber=ya,Fr.toSafeInteger=function(e){return e?sn(ma(e),-9007199254740991,d):0===e?e:0},Fr.toString=ba,Fr.toUpper=function(e){return ba(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=ba(e))&&(r||t===i))return Ut(e);if(!e||!(t=ai(t)))return e;var n=or(e),o=or(t);return bi(n,Ht(n,o),Gt(n,o)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=ba(e))&&(r||t===i))return e.slice(0,sr(e)+1);if(!e||!(t=ai(t)))return e;var n=or(e);return bi(n,0,Gt(n,or(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=ba(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=or(e);return bi(n,Ht(n,or(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ma(t.length):r,n="omission"in t?ai(t.omission):n}var s=(e=ba(e)).length;if(Zt(e)){var a=or(e);s=a.length}if(r>=s)return e;var c=r-ir(n);if(c<1)return n;var u=a?bi(a,0,c).join(""):e.slice(0,c);if(o===i)return u+n;if(a&&(c+=u.length-c),sa(o)){if(e.slice(c).search(o)){var l,d=u;for(o.global||(o=$e(o.source,ba(fe.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;u=u.slice(0,f===i?c:f)}}else if(e.indexOf(ai(o),c)!=c){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+n},Fr.unescape=function(e){return(e=ba(e))&&G.test(e)?e.replace(B,ar):e},Fr.uniqueId=function(e){var t=++Ne;return ba(e)+t},Fr.upperCase=Ya,Fr.upperFirst=Ja,Fr.each=bs,Fr.eachRight=ws,Fr.first=Go,cc(Fr,(vc={},bn(Fr,(function(e,t){xe.call(Fr.prototype,t)||(vc[t]=e)})),vc),{chain:!1}),Fr.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),bt(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:gr(ma(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=yr(r,n.__takeCount__):n.__views__.push({size:yr(r,p),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),bt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(ic)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Kn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return On(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ls(so(e)))},Ur.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(p)},bn(Ur.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],s=n||/^find/.test(t);o&&(Fr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof Ur,u=a[0],l=c||Bs(t),d=function(e){var t=o.apply(Fr,Pt([e],a));return n&&f?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,p=!!this.__actions__.length,h=s&&!f,m=c&&!p;if(!s&&l){t=m?t:new Ur(this);var g=e.apply(t,a);return g.__actions__.push({func:hs,args:[d],thisArg:i}),new Vr(g,f)}return h&&m?e.apply(this,a):(g=this.thru(d),h?n?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[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(Bs(i)?i:[],e)}return this[r]((function(r){return t.apply(Bs(r)?r:[],e)}))}})),bn(Ur.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";xe.call(Or,n)||(Or[n]=[]),Or[n].push({name:t,func:r})}})),Or[Fi(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Bs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yr(t,e+s);break;case"takeRight":e=gr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=n?a:s-1,l=this.__iteratees__,d=l.length,f=0,p=yr(c,this.__takeCount__);if(!r||!n&&i==c&&p==c)return fi(e,this.__actions__);var h=[];e:for(;c--&&f<p;){for(var m=-1,g=e[u+=t];++m<d;){var y=l[m],v=y.iteratee,b=y.type,w=v(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[f++]=g}return h},Fr.prototype.at=ms,Fr.prototype.chain=function(){return ps(this)},Fr.prototype.commit=function(){return new Vr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=pa(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 Wr;){var n=Wo(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 Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Vr(t,this.__chain__)}return this.thru(ts)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,st&&(Fr.prototype[st]=function(){return this}),Fr}();ot._=cr,(n=function(){return cr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},88306:(e,t,r)=>{var n=r(83369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},7771:(e,t,r)=>{var n=r(55639);e.exports=function(){return n.Date.now()}},78718:(e,t,r)=>{var n=r(25970),i=r(99021)((function(e,t){return null==e?{}:n(e,t)}));e.exports=i},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},23493:(e,t,r)=>{var n=r(23279),i=r(13218);e.exports=function(e,t,r){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,s="trailing"in r?!!r.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}},14841:(e,t,r)=>{var n=r(27561),i=r(13218),o=r(33448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):s.test(e)?NaN:+e}},79833:(e,t,r)=>{var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},80406:(e,t,r)=>{"use strict";const n=r(99778);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new n;let r=0;const i=async(e,n,...i)=>{r++;const o=(async()=>e(...i))();n(o);try{await o}catch{}r--,t.size>0&&t.dequeue()()},o=(n,...o)=>new Promise((s=>{((n,o,...s)=>{t.enqueue(i.bind(null,n,o,...s)),(async()=>{await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()})()})(n,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},60540: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]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",a),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),d=r(n+t(n,i,"[\\+\\-\\.]")+"*"),f=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),p=(r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("[1-9][0-9]")+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("0?[1-9][0-9]")+"|0?0?"+i)),h=r(p+"\\."+p+"\\."+p+"\\."+p),m=r(o+"{1,4}"),g=r(r(m+"\\:"+m)+"|"+h),y=r(r(m+"\\:")+"{6}"+g),v=r("\\:\\:"+r(m+"\\:")+"{5}"+g),b=r(r(m)+"?\\:\\:"+r(m+"\\:")+"{4}"+g),w=r(r(r(m+"\\:")+"{0,1}"+m)+"?\\:\\:"+r(m+"\\:")+"{3}"+g),S=r(r(r(m+"\\:")+"{0,2}"+m)+"?\\:\\:"+r(m+"\\:")+"{2}"+g),_=r(r(r(m+"\\:")+"{0,3}"+m)+"?\\:\\:"+m+"\\:"+g),C=r(r(r(m+"\\:")+"{0,4}"+m)+"?\\:\\:"+g),E=r(r(r(m+"\\:")+"{0,5}"+m)+"?\\:\\:"+m),$=r(r(r(m+"\\:")+"{0,6}"+m)+"?\\:\\:"),P=r([y,v,b,w,S,_,C,E,$].join("|")),T=r(r(l+"|"+s)+"+"),R=(r(P+"\\%25"+T),r(P+r("\\%25|\\%(?!"+o+"{2})")+T)),O=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),k=r("\\["+r(R+"|"+P+"|"+O)+"\\]"),I=r(r(s+"|"+t(l,a))+"*"),A=r(k+"|"+h+"(?!"+I+")|"+I),x=r("[0-9]*"),N=r(r(f+"@")+"?"+A+r("\\:"+x)+"?"),j=r(s+"|"+t(l,a,"[\\:\\@]")),L=r(j+"*"),D=r(j+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),M=r(r("\\/"+L)+"*"),W=r("\\/"+r(D+M)+"?"),V=r(F+M),U=r(D+M),z="(?!"+j+")",q=(r(M+"|"+W+"|"+V+"|"+U+"|"+z),r(r(j+"|"+t("[\\/\\?]",u))+"*")),B=r(r(j+"|[\\/\\?]")+"*"),H=r(r("\\/\\/"+N+M)+"|"+W+"|"+U+"|"+z),G=r(d+"\\:"+H+r("\\?"+q)+"?"+r("\\#"+B)+"?"),K=r(r("\\/\\/"+N+M)+"|"+W+"|"+V+"|"+z),Q=r(K+r("\\?"+q)+"?"+r("\\#"+B)+"?");return r(G+"|"+Q),r(d+"\\:"+H+r("\\?"+q)+"?"),r(r("\\/\\/("+r("("+f+")@")+"?("+A+")"+r("\\:("+x+")")+"?)")+"?("+M+"|"+W+"|"+U+"|"+z+")"),r("\\?("+q+")"),r("\\#("+B+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+A+")"+r("\\:("+x+")")+"?)")+"?("+M+"|"+W+"|"+V+"|"+z+")"),r("\\?("+q+")"),r("\\#("+B+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+A+")"+r("\\:("+x+")")+"?)")+"?("+M+"|"+W+"|"+U+"|"+z+")"),r("\\?("+q+")"),r("\\#("+B+")"),r("("+f+")@"),r("\\:("+x+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+P+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+T+")")+"?\\]?$")}}var s=o(!1),a=o(!0),c=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 s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,l=36,d=/^xn--/,f=/[^\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"},m=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(h[e])}function v(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 b(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 w=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},S=function(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=l)e=m(e/35);return m(n+36*e/(e+38))},_=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var c=0;c<a;++c)e.charCodeAt(c)>=128&&y("not-basic"),r.push(e.charCodeAt(c));for(var d=a>0?a+1:0;d<n;){for(var f=i,p=1,h=l;;h+=l){d>=n&&y("invalid-input");var g=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(g>=l||g>m((u-i)/p))&&y("overflow"),i+=g*p;var v=h<=s?1:h>=s+26?26:h-s;if(g<v)break;var b=l-v;p>m(u/b)&&y("overflow"),p*=b}var w=r.length+1;s=S(i-f,w,0==f),m(i/w)>u-o&&y("overflow"),o+=m(i/w),i%=w,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},C=function(e){var t=[],r=(e=b(e)).length,n=128,i=0,o=72,s=!0,a=!1,c=void 0;try{for(var d,f=e[Symbol.iterator]();!(s=(d=f.next()).done);s=!0){var p=d.value;p<128&&t.push(g(p))}}catch(e){a=!0,c=e}finally{try{!s&&f.return&&f.return()}finally{if(a)throw c}}var h=t.length,v=h;for(h&&t.push("-");v<r;){var _=u,C=!0,E=!1,$=void 0;try{for(var P,T=e[Symbol.iterator]();!(C=(P=T.next()).done);C=!0){var R=P.value;R>=n&&R<_&&(_=R)}}catch(e){E=!0,$=e}finally{try{!C&&T.return&&T.return()}finally{if(E)throw $}}var O=v+1;_-n>m((u-i)/O)&&y("overflow"),i+=(_-n)*O,n=_;var k=!0,I=!1,A=void 0;try{for(var x,N=e[Symbol.iterator]();!(k=(x=N.next()).done);k=!0){var j=x.value;if(j<n&&++i>u&&y("overflow"),j==n){for(var L=i,D=l;;D+=l){var F=D<=o?1:D>=o+26?26:D-o;if(L<F)break;var M=L-F,W=l-F;t.push(g(w(F+M%W,0))),L=m(M/W)}t.push(g(w(L,0))),o=S(i,O,v==h),i=0,++v}}}catch(e){I=!0,A=e}finally{try{!k&&N.return&&N.return()}finally{if(I)throw A}}++i,++n}return t.join("")},E=function(e){return v(e,(function(e){return f.test(e)?"xn--"+C(e):e}))},$=function(e){return v(e,(function(e){return d.test(e)?_(e.slice(4).toLowerCase()):e}))},P={};function T(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 R(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 s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function O(e,t){function r(e){var r=R(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,T).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,T).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,T).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,T).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,T).replace(t.PCT_ENCODED,i)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function I(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(k).join("."):e}function A(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=c(s,2),u=a[0],l=a[1],d=l?l.split(":").map(k):[],f=u.split(":").map(k),p=t.IPV4ADDRESS.test(f[f.length-1]),h=p?7:8,m=f.length-h,g=Array(h),y=0;y<h;++y)g[y]=d[y]||f[m+y]||"";p&&(g[h-1]=I(g[h-1],t));var v=g.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],b=void 0;if(v&&v.length>1){var w=g.slice(0,v.index),S=g.slice(v.index+v.length);b=w.join(":")+"::"+S.join(":")}else b=g.join(":");return o&&(b+="%"+o),b}return e}var x=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,N=void 0==="".match(/(){0}/)[1];function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(x);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=A(I(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=P[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)O(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E(r.host.replace(n.PCT_ENCODED,R).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function L(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(A(I(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}var D=/^\.\.?\//,F=/^\/\.(\/|$)/,M=/^\/\.\.(\/|$)/,W=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var t=[];e.length;)if(e.match(D))e=e.replace(D,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(M))e=e.replace(M,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(W);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 U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=P[(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.host):E(e.host.replace(r.PCT_ENCODED,R).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}O(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=L(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 c=e.path;t.absolutePath||i&&i.absolutePath||(c=V(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),n.push(c)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=j(U(e,r),r),t=j(U(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=V(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=V(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=V(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=V(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 q(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,R)}var B={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}},H={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function G(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var K={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=G(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!==(G(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=c(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}},Q={scheme:"wss",domainHost:K.domainHost,parse:K.parse,serialize:K.serialize},Y={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=r(r("%[EFef][0-9A-Fa-f]%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+Z+Z)+"|"+r("%"+Z+Z)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(X,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=R(e);return t.match(te)?t:e}var ae={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={},s=r.query.split("&"),a=0,c=s.length;a<c;++a){var u=s[a].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),d=0,f=l.length;d<f;++d)n.push(l[d]);break;case"subject":r.subject=q(u[1],t);break;case"body":r.body=q(u[1],t);break;default:i=!0,o[q(u[0],t)]=q(u[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var p=0,h=n.length;p<h;++p){var m=n[p].split("@");if(m[0]=q(m[0]),t.unicodeSupport)m[1]=q(m[1],t).toLowerCase();else try{m[1]=E(q(m[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]=m.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 s=0,a=o.length;s<a;++s){var c=String(o[s]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(re,se).replace(re,i).replace(ne,T),d=c.slice(u+1);try{d=t.iri?$(d):E(q(d,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[s]=l+"@"+d}n.path=o.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var p=[];for(var h in f)f[h]!==Y[h]&&p.push(h.replace(re,se).replace(re,i).replace(ie,T)+"="+f[h].replace(re,se).replace(re,i).replace(oe,T));return p.length&&(n.query=p.join("&")),n}},ce=/^([^\:]+)\:(.*)/,ue={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ce),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),c=P[a];n.nid=o,n.nss=s,n.path=void 0,c&&(n=c.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=P[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,de={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(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};P[B.scheme]=B,P[H.scheme]=H,P[K.scheme]=K,P[Q.scheme]=Q,P[ae.scheme]=ae,P[ue.scheme]=ue,P[de.scheme]=de,e.SCHEMES=P,e.pctEncChar=T,e.pctDecChars=R,e.parse=j,e.removeDotSegments=V,e.serialize=U,e.resolveComponents=z,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 U(z(j(e,n),j(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(j(e,t),t):"object"===n(e)&&(e=j(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(j(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(j(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,T)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0})}(t)},62043:(e,t,r)=>{"use strict";!function(){var t,n,i,o=0,s=[];for(n=0;n<256;n++)s[n]=(n+256).toString(16).substr(1);function a(){var e=(16,(!t||o+16>c.BUFFER_SIZE)&&(o=0,t=c.randomBytes(c.BUFFER_SIZE)),t.slice(o,o+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function c(){var e=a();return s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}c.BUFFER_SIZE=4096,c.bin=a,c.clearBuffer=function(){t=null,o=0},c.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||r(39061),e.exports=c,c.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,r=[];for(t=0;t<e;t++)r.push(Math.floor(256*Math.random()));return r}}()}()},99778:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class r{constructor(){this.clear()}enqueue(e){const r=new t(e);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=r},39061:()=>{},64775: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}')},98: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.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},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";r.d(n,{d:()=>On,Z:()=>kn});var e={};r.r(e),r.d(e,{APPLICATION_STATE_CHANNEL:()=>Je,CLIENT_SERVER_MAPPING:()=>nt,COMPONENT_STATE_STORAGE_TOPIC:()=>ht,DOCKING:()=>ct,EVENT_INTERRUPT_CHANNEL:()=>ut,HEARTBEAT_TIMEOUT_CHANNEL:()=>mt,INTERRUPTIBLE_EVENTS:()=>lt,LAUNCHER_SERVICE:()=>gt,MOVE_REASON:()=>yt,SERVICES_STATE_CHANNEL:()=>it,SERVICE_CLOSED_CHANNEL:()=>tt,SERVICE_CLOSING_CHANNEL:()=>et,SERVICE_INITIALIZING_CHANNEL:()=>Ze,SERVICE_QUERY_READY_CHANNEL:()=>rt,SERVICE_READY_CHANNEL:()=>Xe,SERVICE_START_CHANNEL:()=>st,SERVICE_STOP_CHANNEL:()=>at,WINDOW:()=>dt,WINDOWSTATE:()=>ot,WINDOW_SERVICE_REQUESTS:()=>pt,WORKSPACE:()=>ft,WRAPPERS:()=>Ye});const t=(e,t,r)=>(e[t]||[]).concat([r]),i=(e,t,r)=>(e[t]||[]).filter((e=>e!==r)),o="FSBL.FDC3.Interop.Server",s={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app",appId:"Anonymous appId"}};let a="undefined"==typeof window?r.g:window,c="undefined"==typeof window?r.g:window;"undefined"==typeof window?r.g:window;var u=r(62043),l=r.n(u);const d=(e,t,...n)=>{const i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(r.g).indexOf(i)>-1||(r.g[i]=new t(...n)),r.g[i]},f=`Unknown window-${l()()}`;class p{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:s,windowName:f,webContentsName:f}}static getInstance(){return p.instance?p.instance:p.instance=d("Startup",p)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}setReady(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()}));try{a.dispatchEvent&&a.Event&&a.dispatchEvent(new a.Event("FSBLReady"))}catch(e){console.log(e.toString())}}}p.instance=null;const h={},m={activeTransports:{},liveTransport:null,setTransports(){m.addTransport("SharedWorker",h.SharedWorkerTransport),m.addTransport("IPCBus",h.IPCTransport),m.addTransport("FinsembleTransport",h.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],r=e=>{-1===t.indexOf(e)&&t.push(e)};return j.InterApplicationBus&&r("IPCBus"),r("FinsembleTransport"),SharedWorker&&r("SharedWorker"),r(e.sameDomainTransport),r(e.crossDomainTransport),ae.system.log("getActiveTransports",t),t},getTransport:(e,t,r,n,i)=>new Promise(((o,s)=>{const a=m.activeTransports[t];if(a)m.liveTransport=new a(e,r,n,i,(e=>{o(e)}));else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;ae.warn(e),s(e)}})),close(){m.liveTransport&&(m.liveTransport.close(),m.liveTransport=null)}};h.SharedWorkerTransport=function(e,t,r,n,i){let o;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),ae.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{o.port.postMessage([e,t])}catch(e){ae.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const s=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/routerSharedWorker.js`;ae.console.log(`SharedWorker Transport Initializing for ${r} using ${s}`),o=new SharedWorker(s,{name:"Finsemble",credentials:"include"}),o.port.onmessage=e=>{const r=e.data[0],n=e.data[1],i={transportID:this.identifier(),port:r};ae.system.verbose("SharedWorkerTransport Incoming Transport",i,"Message",n),t(i,n)},o.onerror=e=>{ae.console.error(`SharedWorkerTransport Transport Error ${JSON.stringify(e)}`)},o.port.start(),"RouterService"===r&&o.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>o.port.close(),null==i||i(this)},h.IPCTransport=function(e,t,r,n,i){this.send=function(e,t){let r;1===arguments.length?(r=n,t=arguments[0]):(r=e.name,t=arguments[1]),ae.system.verbose("IPCTransport Outgoing Transport",r,"Message",t),j.InterApplicationBus.publish(r,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",ae.console.log(`IPCBus Transport Initializing for ${r}`);const o=j.InterApplicationBus.subscribe("*",r,(e=>{const r={transportID:this.identifier(),name:e.header.origin};ae.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(e=>ae.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>j.InterApplicationBus.unsubscribe(o),null==i||i(this)},h.FinsembleTransport=function(e,t,r,n,i){var o,s,c,u,l;const d=`${null!==(l=null!==(c=null===(s=null===(o=null==e?void 0:e.transportSettings)||void 0===o?void 0:o.FinsembleTransport)||void 0===s?void 0:s.serverAddress)&&void 0!==c?c:null===(u=null==e?void 0:e.transportSettings)||void 0===u?void 0:u.serverAddress)&&void 0!==l?l:"ws://127.0.0.1:3376"}/router`;let f;const p=e=>{const r={transportID:this.identifier(),client:e.clientMessage.header.origin};ae.system.verbose("FinsembleTransport Incoming Transport",r,"Message",e),t(r,e.clientMessage)},h=()=>{ae.console.error(`FinsembleTransport Connection Timeout for ${r}`),null==i||i(this)};this.send=function(e,t){let r,n;1===arguments.length?(r="ROUTER_SERVICE",n={clientMessage:t=arguments[0]}):(r="ROUTER_CLIENT",t=arguments[1],n={client:e.client,clientMessage:t}),ae.system.verbose("FinsembleTransport Outgoing Transport",r,"NewMessage",n),f.send(JSON.stringify({dest:r,message:n}))},this.identifier=()=>"FinsembleTransport",this.close=()=>{f.close()},(()=>{ae.console.log(`FinsembleTransport Transport Initializing for ${r} using ${d}`),d.startsWith("ws:")||d.startsWith("wss:")||ae.system.error(`Illegal WebSocket address "${d}" (Missing ws:// or wss:// ?)`),f=new a.WebSocket(d);const e=setTimeout(h,3e3);f.addEventListener("open",(()=>{clearTimeout(e),ae.console.log("FinsembleTransport connected to server"),f.send(JSON.stringify({dest:"IAC_SERVER",source:r})),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);p(t.message)})),null==i||i(this)})),f.addEventListener("error",(()=>{console.log(`Error connecting to websocket server ${d}`)}))})()};const g=m,y=["microkernel","kernel","pre-authentication","authentication","system-preuser","preuser","preuser2","preuser3","preuser4","earlyuser","user"];function v(e){return`systemManager.boot.status.${e}`}function b(e,t){return`systemManager.checkpoint.${e}.${t}`}const w=new class{publishBootStatus(e,t,r,n){se.system.debug("publishBootStatus",e,t,r),k.publish(v(e),{name:e,type:t,state:r,error:n})}waitForBootStage(e,t,r=Function.prototype){return new Promise(((n,i)=>{se.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const o=y.indexOf(e);"microkernel"===e&&"stageEntered"===t&&se.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const s=k.subscribe("systemManager.boot.stage",((a,c)=>{if(se.system.debug("SystemManagerClient.waitForBootStage new stage",c.data.stage,s),a)se.system.error("SystemManagerClient.waitForBootStage subscribe error",a),r(a),i(a);else if(-1===o)a="illegal stage argument",se.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),r(a),i(a);else{const i=y.indexOf(c.data.stage);se.system.debug("SystemManagerClient.waitForBootStage new stage",c.data,s),"stageEntered"===t&&i+1>=o?(se.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,s,r.name),r(),n(),k.unsubscribe(s)):"stageCompleted"===t&&i>=o?(se.system.debug("SystemManagerClient.waitForBootStage completed",e,s),r(),n(),k.unsubscribe(s)):se.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${i} stageIndex=${o} `,i,o,e,s)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((r,n)=>{se.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const i=k.subscribe(v(e),((o,s)=>{se.system.debug("SystemManagerClient.waitForStartup subscribe",e,o,s),o?(se.system.error("SystemManagerClient.waitForStartup subscribe error",o),t(o),n()):s.data.name===e&&"completed"===s.data.state&&(se.system.debug("SystemManagerClient.waitForStartup completed",e),t(),r(),k.unsubscribe(i))}))}))}publishCheckpointState(e,t,r){se.system.debug("publishCheckpoint",e,t,r,b(e,t)),k.publish(b(e,t),{windowName:e,checkpointName:t,state:r})}showSystemLog(){se.system.debug("SystemManagerClient.showSystemLog"),k.transmit("systemManager.showSystemlog",!0)}systemLog(e,t){se.system.debug("SystemManagerClient.systemLog",e,t),k.transmit("systemManager.systemlog",{params:e,logMessage:t})}},S=w;class _{constructor(){this.alertOnceSinceStartUp={},this.alertCurrentCount={}}}const C=(e,t,r,n,i)=>{const o=d("Toast",_);let s=!1;const a=`toast.${r}`,c=(i=i||{}).duration||864e5;switch(t){case"ONCE-SINCE-STARTUP":a in o.alertOnceSinceStartUp?s=!1:(s=!0,o.alertOnceSinceStartUp[a]=!0);break;case"MAX-COUNT":{let e=0;const t=i.maxCount||1;a in o.alertCurrentCount&&(e=o.alertCurrentCount[a]),o.alertCurrentCount[a]=++e,e<=t&&(s=!0);break}default:s=!0}if(se.log("toast",e,s,t,r,n,i),s){const t=Object.assign(Object.assign({message:n,timeout:c},i),{devModeOnly:"devModeOnly"===e});S.systemLog({notification:!0},`Notification: ${n}`),j.Notification.send(t)}};var E;const $={navigationStart:Date.now()},P={now:()=>{var e;return a.performance?null===(e=a.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(E=a.performance)||void 0===E?void 0:E.timing)?a.performance.timing:$};function T(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const r in e)t[r]=void 0===t[r]?T(e[r],null):t[r];return t}class R{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.parentReadyCallbackQueue=[],this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(oe.system.info("RouterClient: Queuing message since router initialization not complete",e),this.queue.push(e))}originatedHere(e){return e.header.origin===this.clientName}invokeListeners(e){const{channel:t,origin:r}=e.header,n=this.mapListeners[t]||[];Array.isArray(n)&&0!==n.length?(e.originatedHere=()=>this.originatedHere(e),n.forEach((n=>{oe.channelFilter(t)||oe.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",r,"MESSAGE",e),n(null,e)}))):oe.system.log(`RouterClient: no listener for incoming transmit on channel ${t} from ${r}. Possibly the listener was removed while this message was in transit.`,e)}invokeResponder(e){const{channel:t,origin:r,queryID:n,error:i}=e.header;oe.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",r,"QUERY MESSAGE",e);const o=(e,r)=>{oe.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",r,"QUERY ID",n);let i={header:{origin:this.clientName,queryID:n,type:"queryResponse"},data:r};i.header.error=e?e.toString():null,this.sendToRouterService(i)},s=this.mapQueryResponders[t];void 0===s?e.header.logWhenNoResponder&&oe.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${r}.`,e):i?(oe.system.warn("RouterClient: queryResponder error",e),s(i),delete this.mapQueryResponders[t]):s(null,Object.assign(Object.assign({},e),{originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{o(e,t)}}))}invokeQueryResponse(e){var t;oe.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:r}=e.header,n=this.mapQueryResponseTimeOut[r];delete this.mapQueryResponseTimeOut[r],n&&clearTimeout(n);const i=this.mapQueryResponses[r];i?(delete this.mapQueryResponses[r],i(null!==(t=e.header.error)&&void 0!==t?t:null,e)):oe.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:r}=e.header,n=this.mapSubscribersID[t];n?r?(oe.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(r,e)):(e.originatedHere=()=>this.originatedHere(e),oe.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(null,e)):oe.system.info("RouterClient: no subscription handler defined for incoming notify for subscriberID. Possibly the subscription was removed while this publish was in transit.",t,e)}findResponder(e){const t=this.mapPubSubResponders[e];if(t)return t;for(const t in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[t].test(e))return this.mapPubSubResponders[t]}invokePublishEvent(e){const{topic:t}=e.header;let r=this.findResponder(t);if(r){const n=(e,r,n)=>{var i;r?oe.system.warn("RouterClient: incoming publish rejected by pubsub responder",r,n):(this.mapPubSubResponderState[t]=n,(null!==(i=this.pubsubListOfSubscribers[t])&&void 0!==i?i:[]).forEach((e=>{oe.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",n);const r={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:n};this.sendToRouterService(r)})))};if(oe.system.info("RouterClient: incoming PubSub publish "+(r.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),r.publishCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToAllSubscribers:(t,r)=>{n(e,t,r)}});r.publishCallback(null,t)}else n(e,null,e.data)}else oe.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:r,error:n}=e.header;oe.system.info("RouterClient: PubSub subscribe","TOPIC",r);let i=this.mapPubSubResponders[r];if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(r)){i=this.mapPubSubResponders[e],this.mapPubSubResponderState[r]=null!==(t=this.mapPubSubResponderState[r])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(i)if(n)oe.system.warn(`RouterClient: pubsub error received from router service: ${n}`,e);else if(i.subscribeCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToSubscriber:(t,r)=>{this.sendNotifyToSubscriber(e,t,r)}});e.data=this.mapPubSubResponderState[r],i.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[r]);else oe.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:r}=e.header;let n=this.findResponder(t);if(!n)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){n=this.mapPubSubResponders[e];break}if(n)if(oe.system.info("RouterClient: incoming unsubscribe "+(n.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),n.unsubscribeCallback){const i=Object.assign(Object.assign({},e),{removeSubscriber:()=>{this.removeSubscribers(t,r)}});n.unsubscribeCallback(null,i)}else this.removeSubscribers(t,r);else oe.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,r){const{topic:n,subscribeID:i}=e.header;if(void 0!==r){let e={header:{origin:this.clientName,type:"notify",topic:n,subscribeID:i},data:r};t&&(e.header.error=t),this.sendToRouterService(e)}t?oe.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",n,"MESSAGE",this):(n in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[n].push(i):this.pubsubListOfSubscribers[n]=[i],oe.system.info("RouterClient: incoming subscription added","TOPIC",n,"MESSAGE"))}removeSubscribers(e,t){let r=!1;if(e in this.pubsubListOfSubscribers){const n=this.pubsubListOfSubscribers[e];for(let i=0;i<n.length;i++)if(t===n[i]){n.splice(i,1),0===n.length&&delete this.pubsubListOfSubscribers[e],r=!0,oe.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}r||oe.system.warn(`RouterClient: tried to remove non-existent listener on ${e} from ${t}`)}routeIncomingMessage(e){const t=()=>{this.timeCalibrationHandler?this.timeCalibrationHandler(e):setTimeout((()=>{t()}),10)};switch(oe.system.verbose("Incoming Message Type",e.header.type,e),e.header.type){case"transmit":this.invokeListeners(e);break;case"query":this.invokeResponder(e);break;case"queryResponse":this.invokeQueryResponse(e);break;case"notify":this.invokeNotifyCallback(e);break;case"publish":this.invokePublishEvent(e);break;case"subscribe":this.invokeSubscribeEvent(e);break;case"unsubscribe":this.invokeUnsubscribeEvent(e);break;case"timeCalibration":t();break;case"initialHandshakeResponse":this.handshakeHandler()}}asyncConnectToEventRouter(e,t,r){oe.system.debug(`Name of transport to establish: ${t}`);let n=null,i=0,o=!1,s=0,a=null;const c=()=>{const t=Number.MAX_SAFE_INTEGER;oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",i);const r={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(r),i++>t&&(()=>{if(clearInterval(n),s++,s<=3)oe.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",s,e),null==a||a();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";oe.console.error(t,e),C("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t)}})()},u=()=>{if(!o){oe.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),o=!0,clearInterval(n);for(let e=0;e<this.queue.length;e++){oe.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send(Object.assign(Object.assign({},t),{header:Object.assign(Object.assign({},t.header),{origin:this.clientName})}))}null==r||r()}},l=e=>{i=0,oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=u,c(),n=setInterval(c,500)};a=()=>{oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),g.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService").then(l).catch((e=>{oe.console.error("RouterClient getTransport error",e)}))},a()}addPubSubResponderCallBack(e,t,r,n){const i=e.toString();return!this.mapPubSubResponders[i]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[i]=e,oe.system.info(`RouterClient: PubSub RegEx added for topic ${i}`)),this.mapPubSubResponders[i]={subscribeCallback:t,publishCallback:r,unsubscribeCallback:n},!0)}calibrateTimeWithRouterService(e){let t=0,r=0,n=1/0;const i={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=i=>{if(t++,t>5)(t=>{const{clientBaseTime:i,serviceBaseTime:o}=t;let s=0;for(let e=1;e<5;e++){const t=i[e-1],a=i[e]-t,c=o[e-1]-(t+a/2);a<n&&(n=a,r=c),s+=c,oe.system.debug("calibrationCalculation Intermediate Values","lastRRT",a,"lastOffset",c,"fastestOffset",r,"fastestRRT",n)}s/=4,oe.system.debug("RouterClient calibrationCalculation","Average Offset",s,"Chosen FastestOffset",r,t),e(r)})(i);else{i.clientBaseTime.push(P.timing.navigationStart+P.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:i.clientBaseTime,serviceBaseTime:i.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(i)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return oe.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${l()()}`;const r=`"RouterClient Check: connecting new client for ${this.clientName}`;oe.system.debug(r),console.debug(r),g.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}disconnectFromService(){oe.system.info("RouterClient.disconnectFromService");const e={header:{origin:this.clientName,type:"disconnectFromService"}};this.sendToRouterService(e)}stop(){this.disconnectAll(),g.close(),this.started=!1,this.disconnectFromService()}onReady(e){return new Promise((t=>{const r=()=>{e&&e(),t()};this.isRouterReady?r():this.parentReadyCallbackQueue.push(r)}))}addListener(e,t){oe.system.info("RouterClient.addListener","CHANNEL",e);const r=this.mapListeners[e];if(r&&0!==r.length)r.some((e=>t===e))?oe.debug("RouterClient.addListener() Ignoring duplicate listener with identical callback",e,t):r.push(t);else{this.mapListeners[e]=[t];const r={header:{origin:this.clientName,type:"addListener",channel:e}};this.sendToRouterService(r)}return()=>{this.removeListener(e,t)}}transmit(e,t,r){oe.channelFilter(e)||oe.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t);const n={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:r};this.sendToRouterService(n)}removeListener(e,t){if(oe.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),!this.mapListeners[e])return oe.system.debug("Attempt to remove non existent listener",e,t),void console.log("Attempt to remove non existent listener",e,t);if(this.mapListeners[e]=this.mapListeners[e].flatMap((e=>e===t?[]:[e])),!this.mapListeners[e].length){delete this.mapListeners[e];const t={header:{origin:this.clientName,type:"removeListener",channel:e}};this.sendToRouterService(t)}}addResponder(e,t){if(oe.system.info("RouterClient.addResponder","CHANNEL",e),this.mapQueryResponders[e]){const r=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;oe.system.warn(r),t(r)}else{this.mapQueryResponders[e]=t;const r={header:{origin:this.clientName,type:"addResponder",channel:e}};this.sendToRouterService(r)}}query(e,t,r,n){var i,o;const s=`${this.clientName}.${l()()}.${e}`,c=P.timing.navigationStart+P.now(),u=P.timing.navigationStart,d=P.now();oe.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",r,"QUERY ID",s,{timestamp:c,navstart:u,timenow:d});const f=null!=n?n:"function"==typeof r?r:null,p=null!==(i=null==r?void 0:r.timeout)&&void 0!==i?i:2e4,h=null===(o=null==r?void 0:r.logWhenNoResponder)||void 0===o||o;return new Promise((r=>{this.mapQueryResponses[s]=(e,t)=>{null==f||f(e,t),r({err:e,response:t})},!a.runningInFSBLUnitTest&&p>0&&(this.mapQueryResponseTimeOut[s]=setTimeout((()=>{oe.system.warn(`RouterClient: timeout after ${p} ms waiting on query response on channel ${e} for queryID ${s}`),delete this.mapQueryResponseTimeOut[s]}),p));const n={header:{origin:this.clientName,type:"query",queryID:s,channel:e,logWhenNoResponder:h},data:t};this.sendToRouterService(n)}))}removeResponder(e){if(oe.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,r,n){let i,o;if(oe.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",r),void 0===(r=r||{}).subscribeCallback&&void 0===r.publishCallback&&void 0===r.unsubscribeCallback){t=t||{};const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!0},data:t};this.sendToRouterService(r),o="success"}else if(this.addPubSubResponderCallBack(e,r.subscribeCallback,r.publishCallback,r.unsubscribeCallback)){t=t||{},this.mapPubSubResponderState[e.toString()]=T(t);const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(r),o="success"}else i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,oe.system.error(i);n&&n(i,o)}removePubSubResponder(e){oe.system.info("RouterClient.removePubSubResponder","TOPIC",e);const t=e.toString();if(this.mapPubSubResponders[t]){delete this.mapPubSubResponders[t],delete this.mapPubSubResponderState[t],delete this.mapPubSubResponderRegEx[t];const r={header:{origin:this.clientName,type:"removePubSubResponder",topic:e}};this.sendToRouterService(r)}else oe.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){oe.system.info("RouterClient.subscribe","TOPIC",e);const r=`${this.clientName}.${l()()}`;this.mapSubscribersID[r]=t,this.mapSubscribersTopic[r]=e;const n={header:{origin:this.clientName,type:"subscribe",subscribeID:r,topic:e}};return this.sendToRouterService(n),{subscribeID:r,topic:e}}publish(e,t){oe.system.info("RouterClient.publish","TOPIC",e,"EVENT",t);const r={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(r)}unsubscribe(e){oe.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e);const{subscribeID:t}=e;if(this.mapSubscribersID[t]){delete this.mapSubscribersID[t],delete this.mapSubscribersTopic[t];const r={header:{origin:this.clientName,type:"unsubscribe",subscribeID:e.subscribeID,topic:e.topic}};this.sendToRouterService(r)}else oe.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){var t;return oe.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===(null===(t=e.header.originMetadata)||void 0===t?void 0:t.transportInfo.transportID)}disconnectAll(){oe.system.info("RouterClient.disconnectAll"),Object.keys(this.mapListeners).forEach((e=>{Array.from(new Set(this.mapListeners[e])).forEach((t=>{this.removeListener(e,t)}))})),Object.keys(this.mapQueryResponders).forEach((e=>{this.removeResponder(e)})),Object.keys(this.mapPubSubResponders).forEach((e=>{this.removePubSubResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}const O={start:e=>{const t=d("RouterClient",R);return oe.setRouterClient(t),t.start(e)},stop:()=>{d("RouterClient",R).stop()},calibrateTimeWithRouterService(e){d("RouterClient",R).calibrateTimeWithRouterService(e)}},k={onReady:e=>d("RouterClient",R).onReady(e),addListener:(e,t)=>d("RouterClient",R).addListener(e,t),transmit:(e,t,r)=>{d("RouterClient",R).transmit(e,t,r)},removeListener:(e,t)=>{d("RouterClient",R).removeListener(e,t)},addResponder:(e,t)=>{d("RouterClient",R).addResponder(e,t)},query:(e,t,r,n)=>d("RouterClient",R).query(e,t,r,n),removeResponder:e=>{d("RouterClient",R).removeResponder(e)},addPubSubResponder:(e,t,r,n)=>{d("RouterClient",R).addPubSubResponder(e,t,r,n)},removePubSubResponder:e=>{d("RouterClient",R).removePubSubResponder(e)},subscribe:(e,t)=>d("RouterClient",R).subscribe(e,t),publish:(e,t)=>{d("RouterClient",R).publish(e,t)},unsubscribe:e=>{d("RouterClient",R).unsubscribe(e)},trustedMessage:e=>d("RouterClient",R).trustedMessage(e),disconnectAll:()=>{d("RouterClient",R).disconnectAll()},calibrateTimeWithRouterService:e=>{d("RouterClient",R).calibrateTimeWithRouterService(e)}},I=k;class A{static createNew(e,t){fin.desktop.Window.createNew(e,t)}static getCurrent(){return fin.desktop.Window.getCurrent()}static wrap(e){return fin.desktop.Window.wrap(e)}}class x{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=p.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{null==e||e({})},addEventListener:()=>{},removeEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return this.getCurrent()}}class N{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,r,n){return se.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,r,n)}static writeHTML(e,t,r,n){return se.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,r,n)}static writeRTF(e,t,r,n){return se.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,r,n)}static readText(e,t,r){return se.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,r)}static readHTML(e,t,r){return se.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,r)}static readRTF(e,t,r){return se.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,r)}}class j{static get Application(){return{getCurrent:()=>(se.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{k.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,r,n)=>{fin.desktop.Window.addEventListener(e,t,r,n)},close:(e,t,r)=>{fin.desktop.Window.close(e,t,r)},getChildWindows:(e,t)=>{null==e||e([fin.desktop.Window])},getGroups:(e,t)=>{null==e||e([])},getManifest:(e,t)=>{j.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{j.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,r,n)=>{null==r||r()},removeEventListener:(e,t,r,n)=>{fin.desktop.Window.removeEventListener(e,t,r,n)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,r,n)=>{fin.desktop.Window.setTrayIcon(e,t,r,n)},terminate:(e,t)=>{j.terminate()},wait:(e,t)=>{null==e||e()},window:{name:fin.desktop.Window.name},uuid:"Finsemble"})}}static isFreestanding(){return"undefined"==typeof fin}static get Window(){return j.isFreestanding()?x:A}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return N}static getManifest(e){return new Promise((t=>{fin.desktop.System.getManifest((r=>{null==e||e(r),t(r)}))}))}static async getMousePosition(e){return new Promise(((t,r)=>{fin.desktop.System.getMousePosition((r=>{(r.left||0===r.left)&&(r.x=r.left),(r.top||0===r.top)&&(r.y=r.top),null==e||e(null,r),t(r)}),(t=>{null==e||e(t),r(t)}))}))}static async deleteAssets(e){return await fin.desktop.System.deleteAssets(e)}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((r=>{t(r),e(r)}))}))}static getMonitorInfo(e){return new Promise((t=>{fin.desktop.System.getMonitorInfo((r=>{t(r),e&&e(r)}))}))}static isBrowserView(){return!j.isFreestanding()&&fin.isBrowserView()}static getViewId(){return se.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return se.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),j.isTitlebarWindow()}static isTitlebarWindow(){return!j.isFreestanding()&&fin.isTitlebarWindow()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static setTrayIcon(e,t){fin.desktop.System.setTrayIcon(e,t)}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((r=>{t(r),e(r)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return j.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static getFEAInfo(e){return new Promise((t=>{fin.desktop.System.getFEAInfo((r=>{null==e||e(r),t(r)}))}))}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static notifyLoggerReady(){fin.desktop.System.notifyLoggerReady()}static updateCentralLoggerState(e){fin.desktop.System.updateCentralLoggerState(e)}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}static getEnvironmentVariable(e,t){return new Promise((r=>{fin.desktop.System.getEnvironmentVariable(e,(e=>{null==t||t(e),r(e)}))}))}}class L{constructor(){this.listeners={},this.subs={}}}const D=()=>d("ConfigClient",L),F=(e,t)=>{var r;(null!==(r=D().listeners[e])&&void 0!==r?r:[]).forEach((r=>{ae.system.debug("ConfigClient.triggerListeners",e,t),r(null,{field:e,value:t})}))},M=(e,t)=>{if(e)ae.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:r,value:n}=t.data;F(e||"configService",r||n)}},W=async e=>{const t=D();if(t.subs||(t.subs={}),!t.subs[e]){t.subs[e]=!0,await S.waitForStartup("configService");const{err:r}=await k.query("configService.addListener",e);r&&ae.system.error("Error adding listener to config service",r),await k.subscribe(e,M)}},V=async(e,t)=>{if("string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r,response:n}=await k.query("configService.getValue",{field:e.field});return null==t||t(r,n.data),{err:r,data:n.data}},U=async(e,t,r)=>{var n;const i=D();let o=null;"function"==typeof e&&(t=e,e={field:null}),({field:o}=e);const s="configService"+(o?`.${o}`:"");i.listeners[s]=[t].concat(null!==(n=i.listeners[s])&&void 0!==n?n:[]),W(s),null==r||r()},z=(e,t,r)=>{const n=D();let i=null;"function"==typeof e&&(r=t,t=e,e={field:i}),({field:i}=e);const o="configService"+(i?`.${i}`:"");if(n.listeners[o])for(let e=0;e<n.listeners[o].length;e++)if(n.listeners[o][e]===t)return n.listeners[o].splice(e,1),void(null==r||r(null,!0));null==r||r(null,!1)},q={initialize(){ae.deprecated("There is no need to call ConfigClient.initialize() anymore.")},onReady:e=>{ae.system.deprecated("It is no longer necessary to call ConfigClient.onReady()"),null==e||e()},triggerListeners(e,t){ae.deprecated("Calling ConfigClient.triggerListeners() directly is not legal."),F(e,t)},handleChanges(e,t){ae.deprecated("It is illegal to call ConfigClient.handleChanges() directly."),M(e,t)},async changeSub(e){ae.deprecated("Calling ConfigClient.changeSub() directly is not legal."),W(e)},addListener:U,addListeners:(e,t,r)=>{var n;const i=D();if(!Array.isArray(e))return ae.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),U(e,t,r);const o="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const r=e[t],s="string"==typeof r?r:r.field,a="string"!=typeof r?r.listener:o;if(a){const e="configService"+(s?`.${s}`:"");i.listeners[e]=[a].concat(null!==(n=i.listeners[e])&&void 0!==n?n:[]),W(e)}}null==r||r()},getManifest:async e=>{await S.waitForStartup("configService");const{err:t,response:r}=await k.query("configService.getValues",{fields:null});return null==e||e(t,r.data),{err:t,data:r.data}},getPreferences:async e=>{await S.waitForStartup("preferencesService");const{err:t,response:r}=await k.query("PreferencesService.getPreferences",{});return ae.system.debug("PreferencesService.getPreferences response",r),null==e||e(t,r.data),{err:t,data:r.data}},getValue:V,getValues:async(e,t)=>{if("function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e))return V(e,t);await S.waitForStartup("configService");const{err:r,response:n}=await k.query("configService.getValues",{fields:e});return null==t||t(r,n.data),{err:r,data:n.data}},processAndSet:async(e,t)=>{if(ae.system.debug("ConfigClient.processAndSet",e),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return ae.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{await S.waitForStartup("configService");const{err:r,response:n}=await k.query("configService.processAndSet",e);return null==t||t(r,n),{err:r,data:n.data}}},removeListener:z,removeListeners:(e,t,r)=>{const n=D();if(!Array.isArray(e))return"function"==typeof e?z({},e,r):e.field&&t&&z(e,t,r),null==r?void 0:r(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,r="string"!=typeof e?e.listener:i,o="configService"+(t?`.${t}`:"");n.listeners[o]=n.listeners[o].filter((e=>e!==r))})),null==r||r(null,!0)},removeValue:async(e,t)=>{if("string"==typeof e&&(e={field:e}),!e.field){const e="No field provided";return null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r}=await k.query("configService.removeValue",e);return null==t||t(r),{err:r}},removeValues:async(e,t)=>{if(!e){const e="ConfigClient.removeValues. No params given";return ae.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.removeValues. Params must be an array";return ae.system.error(e),null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r}=await k.query("configService.removeValues",e);return null==t||t(r),{err:r}},setPreference:async(e,t)=>{const{err:r,response:n}=await k.query("PreferencesService.setPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}},setValue:async(e,t)=>{const r={field:e.field,value:e.value};await S.waitForStartup("configService");const{err:n}=await k.query("configService.setValue",r);return null==t||t(n),{err:n}},setValues:async(e,t)=>{if(!e){const e="ConfigClient.SetValues. No params given";return ae.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return ae.system.error(e),null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r}=await k.query("configService.setValues",e);return null==t||t(r),{err:r}},unsetPreference:async(e,t)=>{ae.system.debug("ConfigClient.unsetPreference",e);const{err:r,response:n}=await k.query("PreferencesService.unsetPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}}},B=q;var H=r(23493),G=r.n(H),K=r(96486),Q=r.n(K);const Y={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1};let J=5e4;const Z=`NOTE: LOG ARG STRIPPED since greater than ${J/1e3}KB. Check origin's local Console to see output of the complete object.`,X={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:Y,system:Y,perf:Y},ee=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const r=(n=t,e.split("\n",n).join("\n").length);var n;return`Log Stack: \n${e.substring(r).substr(1)}`},te=e=>{const t=[],r=[e];let n=0,i=0;for(;r.length&&i<1e3;){i++;const e=r.pop();if("boolean"==typeof e)n+=4;else if("string"==typeof e)n+=2*e.length;else if("number"==typeof e)n+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)r.push(e[t])}}return n},re=(e,t,r=0,n=1)=>{const i=t/2,o=i/2,s="*STRIPPED*",a=e=>{let t=te(e);e.length>0&&t>o&&(e[0]=re(e[0],i,r,n+1),e[1]=`*STRIPPED* from size ${e.length}`,e.length=2)};let c=(0,K.cloneDeep)(e);if("object"!=typeof c)c=s,r+=te(c);else if(Array.isArray(c))a(c),r+=te(c);else{let e=Object.getOwnPropertyNames(c);for(let u=0;u<e.length;u++){let l=te(c[e[u]]);r>i&&l>100&&n>=3&&u>=1||r>J&&l>=10?c[e[u]]=s:l>o&&(Array.isArray(c[e[u]])?a(c[e[u]]):c[e[u]]=re(c[e[u]],t/1.2,r,n+1)),r+=te(c[e[u]])}}return c};class ne{constructor(){this.routerClient=null,this.viewId=null,this.isRegistering=!1,this.isRegistered=!1,this.calibratedTimeStampOffset=0,this.newCalibratedTimeStampOffset=0,this.filteredMessagesCounter=0,this.startupTime=0,this.loggerQueue=[],this.loggerClientName=j.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=X,this.skipLargeObjects=!0,this.setRouterClient=e=>{this.routerClient=e},this.system={error:(...e)=>{this.logIt("system","Error",e)},warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={error:(...e)=>{this.logIt("perf","Error",e)},warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console={error:(...e)=>{this.logIt("console","Error",e)},warn:(...e)=>{this.logIt("console","Warn",e)},info:(...e)=>{this.logIt("console","Info",e)},log:(...e)=>{this.logIt("console","Log",e)},debug:(...e)=>{this.logIt("console","Debug",e)},verbose:(...e)=>{this.logIt("console","Verbose",e)},deprecated:(...e)=>{this.logIt("console","Error",e)}};const e="routerService"===this.loggerClientName?100:250;this.transmitAndClearQueue=G()((()=>{var e;this.loggerQueue.length>0&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",this.loggerQueue),this.loggerQueue=[])}),e,{leading:!1})}updateQueueBasedOnState(e){const{loggerQueue:t,currentLogState:r,calibratedTimeStampOffset:n}=this;this.system.debug("Logger updateQueueBasedOnState",e,n,"QUEUE LENGTH",t.length,r),this.loggerQueue=t.flatMap((t=>{if(r[t.category][t.logType]){if(!r[t.category].LocalOnly)return e&&(t.logTimestamp=t.logTimestamp+n),[t];console.log(t.category,t.logType,t.logTimestamp-P.timing.navigationStart,t.logData,"(Previously queued!)")}return[]}))}onStateChanged(e){-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)}setLogState(e,t){e&&e.dev&&(this.currentLogState=e,this.onLogStateChangeCallback.forEach((t=>{t(e)}))),this.updateQueueBasedOnState(t)}addToQueue(e){const{loggerQueue:t}=this;if(t.length<2e4)t.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,r=0;for(;e=t.shift();)console.log("Message "+r++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return ee()}setting(){return this.currentLogState}outputToConsole(e,t){var r;const n={Debug:console.debug,Info:console.info,Warn:console.warn,Error:null!==(r=console.unwrappedError)&&void 0!==r?r:console.error,Log:console.log,Verbose:console.log};try{n[e](...t)}catch(e){n.Error("Error outputting log to console",e,ee())}}formatAndQueueMessage(e,t,r){var n;const i="forceObjectsToLogger"===r[0],o=r.flatMap((e=>{const t=te(e);if(!i&&t>J){if(this.outputToConsole("Warn",[`Message too large to send to the logger. Max message size:${J/1e3}KB`,`Approx message size: ${t/1e3}KB`,...r]),this.skipLargeObjects)return[`Log argument greater than ${J/1e3}KB. Check local Console to see output of the object.`];{let t=re(e,J);return[Z,`OldSize=${te(e)} NewSize=${te(t)}`,t]}}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let s=null;try{s=JSON.stringify(o)}catch(e){s=`*** Logger error can't JSON.stringify: ${ee()}`}("Error"===t||"Warn"===t||"console"===e)&&!a.runningInFSBLUnitTest&&this.outputToConsole(t,r);const c=null!==(n=this.viewId)&&void 0!==n?n:j.isBrowserView()&&j.getWebContentsId(),u={category:"console"===e?"system":e,logType:t,logClientName:c?`${this.loggerClientName}: view-${c}`:this.loggerClientName,logData:s,logTimestamp:P.timing.navigationStart+P.now()+this.calibratedTimeStampOffset};c&&(u.viewId=c),this.addToQueue(u),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,r){if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||r.push(ee()),this.currentLogState[e].LocalOnly){const n=t.toLowerCase();r.unshift(`${e} ${n} (${P.now()}):`),this.outputToConsole(t,r)}else this.formatAndQueueMessage(e,t,r)}error(...e){this.logIt("dev","Error",e)}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}completeRegistration(e){B.getValue({field:"finsemble.servicesConfig.logger"},((e,t)=>{var r,n;e||(this.skipLargeObjects=null!==(r=null==t?void 0:t.skipLargeObjects)&&void 0!==r?r:this.skipLargeObjects,J=null!==(n=null==t?void 0:t.maxLogMessageSize)&&void 0!==n?n:J)})),this.loggerQueue.forEach((e=>{this.viewId&&(e.viewId=this.viewId)})),this.isRegistered=!0,e?"routerService"!==this.loggerClientName?(this.calibratedTimeStampOffset=this.newCalibratedTimeStampOffset,this.setLogState(e,!0)):this.setLogState(e,!1):console.error("Logger.startLogger() Initial state not received from logger service"),this.formatAndQueueMessage("system","Debug",["Logger Registered"]),this.transmitAndClearQueue()}registerWithLoggerService(){var e;const{windowName:t,webContentsName:r}=p.getInstance().getStartupData();this.loggerClientName="undefined"!=typeof window&&window.top!==window?`${t}.Frame`:t;const n=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&j.isBrowserView()&&(this.viewId=j.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),j.Window.getCurrent().getOptions((async e=>{var i,o;const s=null===(o=null===(i=null==e?void 0:e.customData)||void 0===i?void 0:i.component)||void 0===o?void 0:o.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:c}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:n,displayName:null!=r?r:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:s});a?(console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(c.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(n,((e,t)=>{this.system.debug("logger.client.setLogState",t.data),this.setLogState(t.data,!1)}))}unregisterClient(e,t){var r;this.system.debug("logger.service.unregister",this.loggerClientName,e,this.viewId),this.transmitAndClearQueue();const n=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(r=this.routerClient)||void 0===r||r.query("logger.service.unregister",n,t)}waitForServiceAndCalibrate(){var e;const t=null===(e=this.routerClient)||void 0===e?void 0:e.subscribe("Finsemble.Service.State.loggerService",((e,r)=>{var n,i;"ready"===r.data.state&&(this.system.debug("Logger onReady",this.loggerClientName),null===(n=this.routerClient)||void 0===n||n.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())})),t&&(null===(i=this.routerClient)||void 0===i||i.unsubscribe(t)))}))}async start(e){if(this.routerClient=null!=e?e:I,this.startupTime=performance.now(),"routerService"===a.name){const{err:e}=await this.routerClient.query("logger.service.register",{});e?setTimeout((()=>{this.waitForServiceAndCalibrate()}),750):this.waitForServiceAndCalibrate()}else this.waitForServiceAndCalibrate();j.isBrowserView()&&a.addEventListener&&a.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}const ie={error:(...e)=>d("LoggerClient",ne).error(...e),warn:(...e)=>d("LoggerClient",ne).warn(...e),info:(...e)=>d("LoggerClient",ne).info(...e),log:(...e)=>d("LoggerClient",ne).log(...e),debug:(...e)=>d("LoggerClient",ne).debug(...e),verbose:(...e)=>d("LoggerClient",ne).verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).deprecated(...e),start:e=>{d("LoggerClient",ne).start(e)},channelFilter:e=>(e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e)(e),setting:()=>d("LoggerClient",ne).setting(),callStack:()=>d("LoggerClient",ne).callStack(),unregisterClient:(e,t)=>{d("LoggerClient",ne).unregisterClient(e,t)},setRouterClient:e=>{d("LoggerClient",ne).setRouterClient(e)},onStateChanged(e){d("LoggerClient",ne).onStateChanged(e)},system:{error:(...e)=>d("LoggerClient",ne).system.error(...e),warn:(...e)=>d("LoggerClient",ne).system.warn(...e),info:(...e)=>d("LoggerClient",ne).system.info(...e),log:(...e)=>d("LoggerClient",ne).system.log(...e),debug:(...e)=>d("LoggerClient",ne).system.debug(...e),verbose:(...e)=>d("LoggerClient",ne).system.verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).system.deprecated(...e)},perf:{error:(...e)=>d("LoggerClient",ne).perf.error(...e),warn:(...e)=>d("LoggerClient",ne).perf.warn(...e),info:(...e)=>d("LoggerClient",ne).perf.info(...e),log:(...e)=>d("LoggerClient",ne).perf.log(...e),debug:(...e)=>d("LoggerClient",ne).perf.debug(...e),verbose:(...e)=>d("LoggerClient",ne).perf.verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).perf.deprecated(...e)},console:{error:(...e)=>d("LoggerClient",ne).console.error(...e),warn:(...e)=>d("LoggerClient",ne).console.warn(...e),info:(...e)=>d("LoggerClient",ne).console.info(...e),log:(...e)=>d("LoggerClient",ne).console.log(...e),debug:(...e)=>d("LoggerClient",ne).console.debug(...e),verbose:(...e)=>d("LoggerClient",ne).console.verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).console.deprecated(...e)}},oe=(console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,ie),se=oe,ae=oe;var ce="function"==typeof queueMicrotask&&queueMicrotask,ue="function"==typeof setImmediate&&setImmediate,le="object"==typeof process&&"function"==typeof process.nextTick;function de(e){setTimeout(e,0)}function fe(e){return(t,...r)=>e((()=>t(...r)))}var pe=fe(ce?queueMicrotask:ue?setImmediate:le?process.nextTick:de);function he(e){return ye(e)?function(...t){const r=t.pop();return me(e.apply(this,t),r)}:function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return me(n,r);r(null,n)}))}function me(e,t){return e.then((e=>{ge(t,null,e)}),(e=>{ge(t,e&&e.message?e:new Error(e))}))}function ge(e,t,r){try{e(t,r)}catch(e){pe((e=>{throw e}),e)}}function ye(e){return"AsyncFunction"===e[Symbol.toStringTag]}function ve(e){if("function"!=typeof e)throw new Error("expected a function");return ye(e)?he(e):e}function be(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function we(e){return function(t,...r){return be((function(n){var i=this;return e(t,((e,t)=>{ve(e).apply(i,r.concat(t))}),n)}))}}function Se(e,t,r,n){t=t||[];var i=[],o=0,s=ve(r);return e(t,((e,t,r)=>{var n=o++;s(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function _e(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const Ce={};function Ee(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function $e(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function Pe(e,t,r,n){let i=!1,o=!1,s=!1,a=0,c=0;function u(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&n(null));a++,r(e,c,l),c++,u()}})).catch(d))}function l(e,t){if(a-=1,!o)return e?d(e):!1===e?(i=!0,void(o=!0)):t===Ce||i&&a<=0?(i=!0,n(null)):void u()}function d(e){o||(s=!1,i=!0,n(e))}u()}var Te=e=>(t,r,n)=>{if(n=Ee(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return Pe(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return Pe(t[Symbol.asyncIterator](),e,r,n);var i=function(e){if(_e(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}(t),o=!1,s=!1,a=0,c=!1;function u(e,t){if(!s)if(a-=1,e)o=!0,n(e);else if(!1===e)o=!0,s=!0;else{if(t===Ce||o&&a<=0)return o=!0,n(null);c||l()}}function l(){for(c=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&n(null));a+=1,r(t.value,t.key,$e(u))}c=!1}l()},Re=be((function(e,t,r,n){return Te(t)(e,ve(r),n)}),4);function Oe(e,t,r){r=Ee(r);var n=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?r(e):++i!==o&&t!==Ce||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,$e(a))}function ke(e,t,r){return Re(e,1/0,t,r)}var Ie=be((function(e,t,r){return(_e(e)?Oe:ke)(e,ve(t),r)}),3),Ae=be((function(e,t,r){return Se(Ie,e,t,r)}),3);we(Ae);var xe=be((function(e,t,r){return Re(e,1,t,r)}),3);we(be((function(e,t,r){return Se(xe,e,t,r)}),3)),Symbol("promiseCallback"),Symbol.iterator,be((function(e,t,r,n){n=Ee(n);var i=ve(r);return xe(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);var Ne=be((function(e,t,r,n){return Se(Te(t),e,r,n)}),4),je=be((function(e,t,r,n){var i=ve(r);return Ne(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4);function Le(e,t){return(r,n,i,o)=>{var s,a=!1;const c=ve(i);r(n,((r,n,i)=>{c(r,((n,o)=>n||!1===n?i(n):e(o)&&!s?(a=!0,s=t(!0,r),i(null,Ce)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}function De(e){return(t,...r)=>ve(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}function Fe(e){return(t,r,n)=>e(t,n)}be((function(e,t,r){return je(e,1/0,t,r)}),3),be((function(e,t,r){return je(e,1,t,r)}),3),be((function(e,t,r){return Le((e=>e),((e,t)=>t))(Ie,e,t,r)}),3),be((function(e,t,r,n){return Le((e=>e),((e,t)=>t))(Te(t),e,r,n)}),4),be((function(e,t,r){return Le((e=>e),((e,t)=>t))(Te(1),e,t,r)}),3),De("dir"),be((function(e,t,r){r=$e(r);var n,i=ve(e),o=ve(t);function s(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,a))}function a(e,t){return e?r(e):!1!==e?t?void i(s):r(null,...n):void 0}return a(null,!0)}),3);var Me=be((function(e,t,r){return Ie(e,Fe(ve(t)),r)}),3),We=be((function(e,t,r,n){return Te(t)(e,Fe(ve(r)),n)}),4),Ve=be((function(e,t,r){return We(e,1,t,r)}),3);function Ue(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function ze(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function qe(e,t,r,n){return(_e(t)?Ue:ze)(e,t,ve(r),n)}be((function(e,t,r){return Le((e=>!e),(e=>!e))(Ie,e,t,r)}),3),be((function(e,t,r,n){return Le((e=>!e),(e=>!e))(Te(t),e,r,n)}),4),be((function(e,t,r){return Le((e=>!e),(e=>!e))(xe,e,t,r)}),3),be((function(e,t,r){return qe(Ie,e,t,r)}),3),be((function(e,t,r,n){return qe(Te(t),e,r,n)}),4),be((function(e,t,r){return qe(xe,e,t,r)}),3),be((function(e,t){var r=$e(t),n=ve(function(e){return ye(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?pe((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2),be((function(e,t,r,n){var i=ve(r);return Ne(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(e,r)}))}),4),De("log"),be((function(e,t,r,n){n=Ee(n);var i={},o=ve(r);return Te(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4),fe(le?process.nextTick:ue?setImmediate:de);var Be=be(((e,t,r)=>{var n=_e(t)?[]:{};e(t,((e,t,r)=>{ve(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function He(e,t){return Be(Ie,e,t)}function Ge(e,t,r,n){const i=ve(r);return qe(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}function Ke(e,t){return Be(xe,e,t)}Symbol.iterator,be((function(e,t){if(t=Ee(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)ve(e[r])(t)}),2),be((function(e,t,r){return Ge(Ie,e,t,r)}),3),be((function(e,t,r,n){return Ge(Te(t),e,r,n)}),4),be((function(e,t,r){return Ge(xe,e,t,r)}),3),be((function(e,t,r){return Le(Boolean,(e=>e))(Ie,e,t,r)}),3),be((function(e,t,r,n){return Le(Boolean,(e=>e))(Te(t),e,r,n)}),4),be((function(e,t,r){return Le(Boolean,(e=>e))(xe,e,t,r)}),3),be((function(e,t,r){var n=ve(t);return Ae(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3),be((function(e,t){var r,n=null;return Ve(e,((e,t)=>{ve(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))})),be((function(e,t,r){r=$e(r);var n=ve(t),i=ve(e),o=[];function s(e,...t){if(e)return r(e);o=t,!1!==e&&i(a)}function a(e,t){return e?r(e):!1!==e?t?void n(s):r(null,...o):void 0}return i(a)}),3),be((function(e,t){if(t=Ee(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){ve(e[r++])(...t,$e(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])}));var Qe=r(17187);const Ye={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},Je="Finsemble.Application.State",Ze="Finsemble.ServiceManager.serviceInitializing",Xe="Finsemble.ServiceManager.serviceReady",et="Finsemble.ServiceManager.serviceClosing",tt="Finsemble.ServiceManager.serviceClosed",rt=e=>`Finsemble.ServiceManager.queryReady.${e}`,nt=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeyClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),it="Finsemble.State.Services";var ot;!function(e){e[e.NORMAL=0]="NORMAL",e[e.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",e[e.MAXIMIZED=2]="MAXIMIZED",e[e.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",e[e.TRANSITIONING=4]="TRANSITIONING"}(ot||(ot={}));const st="Finsemble.Service.Start",at="Finsemble.Service.Stop",ct={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},ut="Finsemble.Event.Interrupt",lt=["close-requested","closed","close-complete","_container-close-handlers"],dt={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},ft={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData","allowAutoArrange"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},pt={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},ht="finsemble.componentStateStorage",mt="Finsemble.WindowService.HeartbeatTimeout",gt={WINDOW_CLOSED:"LauncherService.WindowClosed"},yt={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"};class vt extends Qe.EventEmitter{constructor(e){var t;super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.whoAmI=null!==(t=e.whoAmI)&&void 0!==t?t:"Source unknown. Look for `waitFor()` and add third parameter",this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),this.startupTimer=null}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout"),this.callback("StartupDependency timeout error")}),1e4)}}function bt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class wt{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,r){const n=bt();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new vt({dependencies:e,callback:t,whoAmI:r});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[n]=i,this.checkDependencies(),i}onDependencyTimeout(e){const t=this.getOfflineClients();let r=`APPLICATION LIFECYCLE:STARTUP:Dependency (${e.whoAmI}) not online after 10 seconds.`;t.length&&(r=`${r} Waiting for these clients: ${t.join(", ")}.`),se.system.warn(r),e.emit("err",r)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:r,callback:n}=t;(!r.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(r.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),n&&n())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:r}=this.dependencies[t];e=e.concat(r.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,r)=>e.indexOf(t)===r))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class St{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){se.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const r=bt();this.dependencies[r]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:r}=this.dependencies[e];(se.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],r&&r())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){se.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class _t extends Qe.EventEmitter{constructor(){super(),this.startup=new wt,this.shutdown=new St,this.RouterClient=k,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),k.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:r}=e[t];"closed"===r&&this.shutdown.setServiceOffline(t)}))}listenForServices(){se.system.debug("DependencyManager:listenForServices before wait"),S.waitForBootStage("kernel","stageEntered",(()=>{se.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(it,((e,t)=>{se.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(tt,((e,t)=>{se.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const r={};r[t.data.name]={state:"closed"},this.onServiceStateChange(r)})),this.RouterClient.subscribe(Je,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":default:break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}const Ct=new _t,Et=async()=>new Promise((e=>{j.getManifest((t=>{e({err:null,data:t})}))})),$t=(e,t)=>{var r,n;return null!==(r=e.finsemble[t])&&void 0!==r?r:null===(n=e.finsemble)||void 0===n?void 0:n.custom[t]},Pt=(e,t)=>{let r=!1;const n=t.split(/[/\\:?=&\s]/);for(let i=0;i<n.length;i++)if("$"===n[i][0]){const o=n[i].substring(1),s=$t(e,o);if(void 0===s)ae.system.warn("ConfigUtil.resolveString",`Missing [${o}] variable from finsemble.custom configuration object`);else{const e=t.replace(n[i],s);ae.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",n[i],o,s,"old value=",t,"value=",e),r=!0,t=e}}return{configString:t,replacedMacro:r}},Tt=(e,t,r)=>{let n=!1;if(r>1e3)return ae.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:n};ae.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",r,"configArray:",t);for(let i=0;i<t.length;i++){const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=Pt(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?Tt(e,o,r+1):"object"==typeof o&&Rt(e,o,r+1)}return{replacedMacro:n}},Rt=(e,t,r)=>{let n=!1;return r>1e3?(ae.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:n}):(t=t||{},ae.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",r,"configObject:",t),Object.keys(t).forEach((i=>{const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=Pt(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?Tt(e,o,r+1):"object"==typeof o&&Rt(e,o,r+1)})),{replacedMacro:n})},Ot=new class{resolveManifestMacros(e,t){let r;for(r=0;r<100;r++){const{replacedMacro:r}=Rt(e,t,1);if(!r)break}r>=100&&ae.system.error("forceObjectsToLogger","resolveManifestMacros exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)}async getExpandedRawManifest(){ae.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await Et();return e||!t?ae.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(ae.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),ae.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async captureAndLogBadFileData(e){let t,r=null;ae.system.debug(`captureAndLogBadFileData for ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}}`:t=await n.text()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}r?ae.system.error("forceObjectsToLogger",`captureAndLogBadFileData failed for ${e}`,r):ae.system.error("forceObjectsToLogger",`captureAndLogBadFileData successful for ${e}`,t)}async fetchConfigFile(e){let t,r=null;ae.system.debug(`fetching import ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}`:t=await n.json()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}return r&&(ae.system.error("forceObjectsToLogger",r),this.captureAndLogBadFileData(e)),{err:r,data:t}}graftImportOnToManifest(e,t){Object.keys(t).forEach((r=>{if("importConfig"===r){e.finsemble.importConfig=e.finsemble.importConfig||[];for(let r=0;r<t.importConfig.length;r++)e.finsemble.importConfig.unshift(t.importConfig[r])}else if("importThirdPartyConfig"===r){e.finsemble.importThirdPartyConfig=e.finsemble.importThirdPartyConfig||[];for(let r=0;r<t.importThirdPartyConfig.length;r++)e.finsemble.importThirdPartyConfig.unshift(t.importThirdPartyConfig[r])}else e.finsemble[r]=t[r]})),this.resolveManifestMacros(e,e.finsemble),ae.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await Et();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||ae.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:r,data:n}=await this.fetchConfigFile(e);!r&&n?this.graftImportOnToManifest(t,n):ae.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${t.finsemble.moduleRoot}; Full Path=${e}`,r)}return{err:e,data:t}}promptAndSaveJSONToLocalFile(e,t){ae.system.debug("saveJSONToLocalFile",e,t);const r=JSON.stringify(t,null,"\t"),n=`data:application/json;charset=utf-8,${encodeURIComponent(r)}`,i=`${e}.json`,o=document.createElement("a");o.setAttribute("href",n),o.setAttribute("download",i),o.click()}configFormatForExport(e,t){ae.system.debug("configFormatForExport starting",e,t);let r=Q().cloneDeep(t);if("raw"===e);else if("all"===e)delete r.importConfig,delete r.comment;else if("application"===e)delete r.importConfig,delete r.comment,delete r.system,delete r.services;else if("workspace"===e)r={workspace:r};else if("workspaceTemplate"===e){const e={};e[r.name]=r,r={workspaceTemplates:e}}else"services"===e?r=r.services:"components"===e&&(r=r.components);return r}getDefault(e,t,r){let n=r;if(e){try{const r=t.split(".");let i=e;for(let e=1;e<r.length;e++)i=i[r[e]];n=i}catch(e){n=r}void 0===n&&(n=r)}return n}},kt={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},It=e=>{if(!e)return se.system.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const r=window.location.hostname===t.hostname,n=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=r&&i&&n;return se.system.debug(`Transport crossDomain=${It} (${r}:${n}:${i})`),!o},At=e=>{const{moduleRoot:t,router:r}=null==e?void 0:e.finsemble,{sameDomainTransport:n="SharedWorker",crossDomainTransport:i="IPCBus"}=null!=r?r:{};return It(t)?i:n};var xt,Nt,jt,Lt,Dt,Ft;!function(e){e.AppNotFound="AppNotFound",e.ErrorOnLaunch="ErrorOnLaunch",e.AppTimeout="AppTimeout",e.ResolverUnavailable="ResolverUnavailable"}(xt||(xt={})),function(e){e.NoAppsFound="NoAppsFound",e.ResolverUnavailable="ResolverUnavailable",e.ResolverTimeout="ResolverTimeout"}(Nt||(Nt={})),function(e){e.NoChannelFound="NoChannelFound",e.AccessDenied="AccessDenied",e.CreationFailed="CreationFailed"}(jt||(jt={})),Lt=function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),s=new R(n||[]);return o._invoke=function(e,t,r){var n=d;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw o;return k()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=$(s,r);if(a){if(a===m)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=l(e,t,r);if("normal"===c.type){if(n=r.done?h:f,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,s),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function g(){}function y(){}function v(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(O([])));S&&S!==r&&n.call(S,o)&&(b=S);var _=v.prototype=g.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,o,s,a){var c=l(e[i],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function $(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,$(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=l(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function O(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}return{next:k}}function k(){return{value:t,done:!0}}return y.prototype=_.constructor=v,v.constructor=y,y.displayName=c(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,a,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},C(E.prototype),E.prototype[s]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new E(u(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},C(_),c(_,a,"Generator"),_[o]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},Lt({exports:{}}),function(e){e.Contact="fdc3.contact",e.ContactList="fdc3.contactList",e.Country="fdc3.country",e.Instrument="fdc3.instrument",e.Organization="fdc3.organization",e.Portfolio="fdc3.portfolio",e.Position="fdc3.position"}(Dt||(Dt={})),function(e){e.StartCall="StartCall",e.StartChat="StartChat",e.ViewChart="ViewChart",e.ViewContact="ViewContact",e.ViewQuote="ViewQuote",e.ViewNews="ViewNews",e.ViewInstrument="ViewInstrument",e.ViewAnalysis="ViewAnalysis"}(Ft||(Ft={}));var Mt,Wt,Vt,Ut,zt,qt,Bt,Ht,Gt,Kt,Qt,Yt,Jt,Zt,Xt,er=function(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)},tr=function(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};class rr{constructor(){Mt.set(this,12e4),Wt.set(this,null),Vt.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(er(this,Wt,"f")),ae.system.debug("FinsembleDesktopAgent: heartbeat received"),tr(this,Wt,setTimeout((()=>{ae.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${er(this,Mt,"f")} milliseconds`),this.notifyDisconnect()}),er(this,Mt,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),er(this,Vt,"f").forEach((e=>{e(`No heartbeat received from interop service within ${er(this,Mt,"f")} milliseconds`)}))}onDisconnect(e){tr(this,Vt,er(this,Vt,"f").concat(e),"f")}stop(){clearTimeout(er(this,Wt,"f"))}}Mt=new WeakMap,Wt=new WeakMap,Vt=new WeakMap;class nr{constructor(e,t,r="app"){Ut.set(this,void 0),tr(this,Ut,e,"f"),this.id=t,this.type=r}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");er(this,Ut,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return er(this,Ut,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return er(this,Ut,"f").channelAddContextListener(this.id,e,t)}}Ut=new WeakMap;class ir{constructor({routerClient:e,startup:t}){if(zt.set(this,!1),qt.set(this,new rr),Bt.set(this,!1),Ht.set(this,""),Gt.set(this,`FSBL.FDC3.Client.${l()()}`),Kt.set(this,{}),Qt.set(this,{}),Yt.set(this,[]),Jt.set(this,void 0),Zt.set(this,void 0),Xt.set(this,""),tr(this,Jt,e,"f"),tr(this,Zt,t,"f"),this.cacheFSBLVersion(),a.Event&&a.dispatchEvent){const e=new a.Event("fdc3Ready");a.dispatchEvent(e)}}async cacheFSBLVersion(){""==er(this,Xt,"f")&&tr(this,Xt,"8.1.0","f");const{err:e,data:t}=await B.getValue({field:"finsemble.system.FSBLVersion"});e||tr(this,Xt,t,"f")}fdc3Error(e){return new Error(e)}meta(){return{uuid:er(this,Ht,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){er(this,qt,"f").registerHeartbeat()}triggerContextListeners(e){var t,r;const{context:n}=e.payload;let i;if(e.meta.targetSubscriberId){let t;Object.values(er(this,Qt,"f")).every((r=>(t=r.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),i=t?[t]:[]}else i=(null!==(t=er(this,Qt,"f")[null==n?void 0:n.type])&&void 0!==t?t:[]).concat(null!==(r=er(this,Qt,"f")["*"])&&void 0!==r?r:[]);i.forEach((({handler:t,channel:r})=>{e.meta.channel===r||!e.meta.channel&&!r?(ae.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=r?r:"default"} channel`,e.type,e),t(n)):ae.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=r?r:"default"} channel`,e.type,e)}))}triggerIntentListeners(e){const{intent:t,context:r}=e.payload,n=er(this,Kt,"f")[t];r&&(n||[]).forEach((e=>e(r)))}handleIncoming(e){switch(ae.system.debug("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e);break;case"heartbeat":this.handleHeartbeat()}}releaseQueue(){const e=e=>{var t;return void 0!==(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.uuid)&&(e.meta.uuid=er(this,Ht,"f")),e};er(this,Yt,"f").forEach((async t=>{const{message:r,handler:n,resolve:i}=t,{err:o,receiveMessage:s}=await this.exchange(e(r),n);i({err:o,receiveMessage:s})})),tr(this,Yt,[],"f")}exchange(e,t=(()=>{})){return new Promise((async r=>{if(er(this,zt,"f")){const{err:n,response:i}=await er(this,Jt,"f").query(o,e,t);r({err:n,receiveMessage:null==i?void 0:i.data})}else er(this,Yt,"f").push({message:e,handler:t,resolve:r}),this.start()}))}async connect(){var e;const t=er(this,Zt,"f").getStartupData(),{windowName:r="Unknown window",authenticationToken:n}=t;ae.system.log(`fdc3.connect StartupData for ${r}`,t),tr(this,Ht,`fdc3-${null===(e=null==n?void 0:n.meta)||void 0===e?void 0:e.name}-${l()()}`,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:er(this,Gt,"f"),windowName:r,authenticationToken:n}};S.waitForBootStage("kernel","stageCompleted",(e=>{e?ae.system.error("connect error waitingForBootStage",e):er(this,Jt,"f").query(o,i,(e=>{e?ae.system.error("connect error",e):(er(this,Jt,"f").addResponder(er(this,Gt,"f"),((e,t)=>{if(e||!t){const t=(e=>{var t,r;return null!==(r=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e)&&void 0!==r?r:null})(null!=e?e:"No request received on responder");ae.system.error(`FinsembleDesktopAgent can't listen on channel ${er(this,Gt,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),tr(this,zt,!0,"f"),ae.system.log(`FDC3 client connected for window ${r}`),this.releaseQueue(),er(this,qt,"f").start())}))}))}async start(){er(this,Bt,"f")||(tr(this,Bt,!0,"f"),await er(this,Zt,"f").onReady(),this.connect())}async stop(){er(this,qt,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),tr(this,Bt,!1,"f"),er(this,Jt,"f").removeResponder(er(this,Gt,"f")),tr(this,zt,!1,"f")}onDisconnect(e){er(this,qt,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const r={type:"currentContextRequest",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{contextType:t}},{err:n,receiveMessage:i}=await this.exchange(r);return n?null:"currentContext"===(null==i?void 0:i.type)?i.payload.context:null}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const r={type:"broadcast",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{context:t}};this.exchange(r)}async getSystemChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:r,receiveMessage:n}=await this.exchange(t);return r?[]:("systemChannels"===(null==n?void 0:n.type)?null===(e=null==n?void 0:n.payload)||void 0===e?void 0:e.channels:[]).map((e=>new nr(this,e,"system")))}async open(e,t){if(!e)throw new Error("Invalid arguments. The required target parameter is missing.");const r={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(xt.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error)}async findIntent(e,t){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");const r={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(Nt.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.appIntent)throw this.fdc3Error("Invalid response returned from InteropService for findIntent. No appIntent and no error.");return o.payload.appIntent}async findIntentsByContext(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:r}=await this.exchange(t),n=r;if(n.payload.error)throw this.fdc3Error(n.payload.error);return n.payload.intents||[]}async raiseIntent(e,t,r){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required context parameter is missing.");const n={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:r}},{err:i,receiveMessage:o}=await this.exchange(n),s=o;if(i)throw this.fdc3Error(Nt.ResolverUnavailable);if(s.payload.error)throw this.fdc3Error(s.payload.error);if(!s.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntent. No data.");return s.payload.data}async raiseIntentForContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const r={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(Nt.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntentForContext. No data.");return o.payload.data}addIntentListener(e,r){if(!r)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!r)throw new Error("Invalid arguments. The required handler parameter is missing.");er(this,Kt,"f")[e]=t(er(this,Kt,"f"),e,r);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const t={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(t),er(this,Kt,"f")[e]=i(er(this,Kt,"f"),e,r)}}}channelAddContextListener(e,r,n){const o=n&&r||"*";n||(n=r);const s=`subscriberId.${Date.now()}_${Math.random()}`,a={handler:n,channel:e,targetSubscriberId:s};er(this,Qt,"f")[o]=t(er(this,Qt,"f"),o,a);let c={type:"subscribeContext",meta:Object.assign(Object.assign({},this.meta()),{targetSubscriberId:s}),payload:{contextType:o}};return e&&(c.meta.channel=e),this.exchange(c),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:o}};e&&(t.meta.channel=e),er(this,Qt,"f")[o]=i(er(this,Qt,"f"),o,a),this.exchange(t)}}}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return this.channelAddContextListener(null,e,t)}async joinChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");return new nr(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:r}=await this.exchange(e),n=r;if(t)throw this.fdc3Error(t);if(n.payload.error)throw this.fdc3Error(n.payload.error);if(!n.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for getCurrentChannels. No data.");return n.payload.data.map((e=>new nr(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:er(this,Xt,"f")}}}zt=new WeakMap,qt=new WeakMap,Bt=new WeakMap,Ht=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,Qt=new WeakMap,Yt=new WeakMap,Jt=new WeakMap,Zt=new WeakMap,Xt=new WeakMap;class or{async startApp(){var e,t,r,n,i,o,s,c;const u=await(async()=>new Promise((e=>{j.Window.getCurrent().getOptions((t=>{e(t)}))})))(),d=j.Window.getCurrent(),f=null!==(r=null!==(e=d.name)&&void 0!==e?e:null===(t=null===document||void 0===document?void 0:document.location)||void 0===t?void 0:t.href)&&void 0!==r?r:"Unknown App",h=null!==(o=null!==(n=d.name)&&void 0!==n?n:null===(i=null===document||void 0===document?void 0:document.location)||void 0===i?void 0:i.href)&&void 0!==o?o:`Unknown window-${l()()}`,m=null!==(s=d.webContentsName)&&void 0!==s?s:h,g=null!==(c=(e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&Ot.resolveManifestMacros(t,t.finsemble),t})(u))&&void 0!==c?c:{},y=(({windowName:e,systemManifest:t,transportSettings:r})=>t?((e,t)=>{var r,n,i;if(se.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const o=e.finsemble,s=null!==(i=null!==(n=null===(r=null==o?void 0:o.router)||void 0===r?void 0:r.transportSettings)&&void 0!==n?n:null==o?void 0:o.IAC)&&void 0!==i?i:{};return{windowName:t,routerDomainRoot:o.moduleRoot,transportName:At(e),transportSettings:s}}return se.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),Object.assign(Object.assign({},kt),{windowName:t})})(t,e):Object.assign(Object.assign({},kt),{windowName:e,transportSettings:null!=r?r:{}}))({windowName:h,systemManifest:g});await O.start(y);const v=p.getInstance();v.setStartupData({windowName:h,webContentsName:m,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:f}}}),a.fdc3=new ir({routerClient:k,startup:v}),v.setReady()}async stopApp(){O.stop()}}a.addEventListener&&a.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?se.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(se.console.warn(`Logger client caught what is likely a DOM error event where type=${null==e?void 0:e.type} and target=${null==e?void 0:e.target}. Probably due to <img> or <script> failing to load. See component's browserView window for more details.`),console.warn("Event Details (for above message)",e))}),!0),a.addEventListener&&a.addEventListener("unhandledrejection",(e=>{se.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),(()=>{if(j.isBrowserView())return void se.console.log("Logger client console.error is not wrapped to capture logs.");se.console.log("Logger client console.error is wrapped to capture logs.");const e=console.error.bind(a.console);console.unwrappedError=console.error,console.error=function(...t){let r;t.push("(console error)");try{r=JSON.parse(JSON.stringify(t))}catch(n){r="console.error: arguments could not be serialized for logging",t.push("arguments could not be serialized to send to Central Logger"),e(...t)}se.console.error(...r)}})();const{SERVICE_INITIALIZING_CHANNEL:sr,SERVICE_READY_CHANNEL:ar,SERVICE_QUERY_READY_CHANNEL:cr,SERVICE_CLOSING_CHANNEL:ur,SERVICE_CLOSED_CHANNEL:lr,SERVICE_STOP_CHANNEL:dr}=e,fr={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};class pr{constructor(e=fr){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=fr.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=fr.startupDependencies.clients)):e.startupDependencies=fr.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=fr.shutdownDependencies.services):e.shutdownDependencies=fr.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=se,this.RouterClient=k,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),a.finsembleServices?a.finsembleServices.push(this):a.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function r(e){se.system.debug("BaseService.start.setParentUUID"),j.Window.getCurrent().getOptions((r=>{t.customData=r.customData,e()}))}async function n(){await(new or).startApp(),k.addResponder(cr(e.name),((t,r)=>{(e.status="ready")?null==r||r.sendQueryResponse(null):null==r||r.sendQueryResponse("service not ready")})),"routerService"!==t.name&&k.transmit(sr,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),se.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const r=t.customData.debugServiceDelay||0;if(se.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(r))r>0&&se.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${r} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${r}") for ${t.name}. Value must be an integer.`;se.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),S.systemLog({error:!0},e)}setTimeout(e,r)}function o(e){se.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),se.console.log("Startup Dependencies for",t.name,t.startupDependencies),se.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),Ct.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),se.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),k.transmit(`${j.Window.getCurrent().name}.onSpawned`,{name:j.Window.getCurrent().name},{suppressWarnings:!0}),Ct.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{se.system.error(e)}))}function s(e){const r=j.Window.getCurrent();r.isShowing((n=>{n&&!1!==t.customData.showDevConsoleOnVisible?j.showDeveloperTools(r.name,null,e):(se.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return se.system.debug(`${this.name} starting`),new Promise((e=>{Ke([n,r,s,i,o],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${dr}.${this.name}`,(()=>{Ct.shutdown.checkDependencies()})),this.status="ready",k.transmit(ar,{serviceName:this.name},{suppressWarnings:!0}),se.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),S.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){se.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),se.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){se.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(k.transmit(ur,{waitForMe:!0,name:this.name}),Me(this.listeners.onShutdown,(function(e,t){he(e)(null,t)}),(function(t){t&&se.system.error(t),e.shutdownComplete()}))):(k.transmit(ur,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){se.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),k.transmit(lr,{name:this.name})}}const hr=(e,t)=>{const r=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<r.length;++t){const n=r[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(n in e))return null;e=e[n]}return e};function mr(e,t,r){let n;if(t||(t=null),"object"!=typeof e)return n=t?`${t}.${e}`:e,void(r[n]=t);for(const i in e)"object"==typeof e[i]&&"undefined"!==e[i]?(n=t?`${t}.${i}`:i,r[n]=t,mr(e[i],n,r)):(n=t?`${t}.${i}`:i,r[n]=t)}const gr=(e,t,r)=>{if(r[t])return;const n=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),i=t;if(!r.hasOwnProperty(i)){let e=null;n.length>1&&(n.pop(),e=n.join(".")),r[i]=e}const o=hr(e,i);if("undefined"!==o&&"object"==typeof o)for(const t in o)gr(e,`${i}.${t}`,r)},yr=(e,t,r)=>null!==hr(e,t)&&((e,t)=>{const r=[];for(const n in e){const i=`${t}.`;n.includes(i)&&(r.push(n),delete e[n])}return r})(r,t),vr=class{constructor(e,t,r){var n,i;this.isGlobal=!1,this.values={},this.listeners={},this.registeredDispatchListeners=[],this.mapping={},this.subs={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e)ae.system.error("DistributedStoreClient",e);else{const{store:e,field:r,storeData:n,value:i}=t.data;if(e){const e=r?`.${r}`:"",t=`${this.name}${e}`,o=n||i;this.triggerListeners(t,o)}}},this.routerClient=t,this.removeStoreCallback=r,this.isGlobal=!!e.global,this.name=null!==(i=null!==(n=e.name)&&void 0!==n?n:e.store)&&void 0!==i?i:"StoreModel() invariant. store.name not provided.",e.values&&(this.values=e.values),mr(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,((e,t)=>{this.handleDispatchedMessages(e,t)}))}handleDispatchedMessages(e,t){(null==t?void 0:t.data)&&this.registeredDispatchListeners.forEach((e=>{e(t.data)}))}setValue(e,t){if(e.field||ae.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||ae.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const r={store:this.name,field:e.field,value:e.value};this.routerClient.query("storeService.setValue",r,(e=>{t&&t(e)}))}else{const r=yr(this.values,e.field,this.mapping);Q().set(this.values,e.field,e.value),gr(this.values,e.field,this.mapping),r&&this.sendRemovals(r),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t&&t(null)}}publishObjectUpdates(e,t){const r=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,hr(this.values,e)),e=r[e]}sendRemovals(e){for(let t of e)this.triggerListeners(`${this.name}.${t}`,hr(this.values,t))}setValues(e,t){return e?Array.isArray(e)?void Me(e,((e,t)=>{this.setValue(e,((e,r)=>{t("string"==typeof e?new Error(e):e)}))}),(e=>t?t(e):null)):ae.system.error("DistributedStore.setValues:params must be an array"):ae.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return null==t||t("no field provided"),"no field provided";if(!this.isGlobal){const r=hr(this.values,e.field);return null==t||t(null,r),r}return this.getGlobalValue(e.field,t),null}getAll(e){if(!this.isGlobal)return e&&e(null,this.values),this.values;this.getGlobalValues(null,e)}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return{[e]:this.getValue(e,t)};if(this.isGlobal)return this.getGlobalValues(e,t);const r={};for(let t=0;t<e.length;t++){const n=e[t],i="string"==typeof n?n:n.field,o=hr(this.values,i);r[i]=o}return t?t(null,r):r}async getGlobalValue(e,t){const{err:r,response:n}=await this.routerClient.query("storeService.getValue",{store:this.name,field:e});return null==t||t(r,n.data),{err:r,data:n.data}}getGlobalValues(e,t){this.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,r)=>{t&&t(e,r.data)}))}removeValue(e,t){if("string"==typeof e&&(e={field:e}),e.field||ae.system.error("DistributedStore.removeValue:no field provided",e),this.isGlobal){const r={store:this.name,field:e.field};this.routerClient.query("storeService.removeValue",r,(e=>{t&&t(e)}))}else{const r=yr(this.values,e.field,this.mapping);Q().unset(this.values,e.field),r&&this.sendRemovals(r),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),delete this.mapping[e.field],t&&t(null)}}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");const r=e.map((e=>"string"==typeof e?e:e.field));Ae(r,this.removeValue,((e,r)=>t(e,r)))}destroy(e){const t={store:this.name,global:this.isGlobal};this.removeStoreCallback(t,(t=>{t?e&&e(t):e&&e(null,!0)}))}changeSub(e){this.subs[e]||(this.isGlobal&&this.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,r){var n;"function"==typeof e&&(t=e,e={});const{field:i}=e,o=i?`.${i}`:"",s=`${this.name}${o}`;this.listeners[s]=[t].concat(null!==(n=this.listeners[s])&&void 0!==n?n:[]),this.changeSub(s),null==r||r()}addListeners(e,t,r){var n;if(!Array.isArray(e))return ae.deprecated("distributedStoreClient StoreModel - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),void this.addListener(e,t,r);const i="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const r=e[t];let o="string"==typeof r?r:r.field;const s="string"!=typeof r?r.listener:i;if(s){const e=o?`.${o}`:"",t=`${this.name}${e}`;this.listeners[t]=[s].concat(null!==(n=this.listeners[t])&&void 0!==n?n:[]),this.changeSub(t)}}null==r||r()}removeListener(e,t,r){const{field:n}=e,i=n?`.${n}`:"",o=`${this.name}${i}`;if(this.listeners[o])for(let e=0;e<this.listeners[o].length;e++)if(this.listeners[o][e]===t)return this.listeners[o].splice(e,1),void(null==r||r(null,!0));null==r||r(null,!1)}removeListeners(e,t,r){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,r):e.field&&t&&this.removeListener(e,t,r),null==r?void 0:r(null,!0);const n="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,r="string"!=typeof e?e.listener:n,i=t?`.${t}`:"",o=`${this.name}${i}`;this.listeners[o]=this.listeners[o].filter((e=>e!==r))})),null==r||r(null,!0)}triggerListeners(e,t){var r;(null!==(r=this.listeners[e])&&void 0!==r?r:[]).forEach((r=>{ae.system.debug("DistributedStore.triggerListeners",e,t),r(null,{field:e,value:t})}))}},br=()=>new Promise((e=>{k.subscribe("distributedStoresLoading",((t,r)=>{if(t||!r.data){const r=`Error waiting for persistent stores ${t}`;se.system.error(r),e(r)}"done"===r.data.State&&e(null)}))}));let wr={};const Sr=async(e,t)=>e.global?(async(e,t)=>{const{err:r}=await k.query("storeService.removeStore",e);return t&&t(r,!!r),{err:r,data:!!r}})(e,t):wr[e.store]?(delete wr[e.store],t&&t(null,!0),{data:!0}):{err:`Local store named ${e.store} not found`},_r=async(e,t)=>{if(e.persist){const e=await br();if(e)return null==t||t(e),{err:e}}else await S.waitForStartup("dataStoreService");const{err:r,response:n}=await k.query("storeService.createStore",e);if(r)return se.system.error("DistributedStoreClient:createStore() Failed to create a global store",e.store,r),null==t||t(r),{err:r};const i=new vr(n.data,k,Sr);return null==t||t(r,i),{err:r,data:i}},Cr=async(e,t)=>(se.system.info("DistributedStoreClient:createStore()",e),e.global?_r(e,t):(async(e,t)=>{const r=wr[e.store];if(r)return t&&t(null,r),{data:r};const n=new vr(Object.assign(Object.assign({},e),{name:e.store}),k,Sr);return wr[n.name]=n,t&&t(null,n),{data:n}})(e,t)),Er=class{constructor(t,r){var n;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=t.event,this.source=t.source,this.sourceType=t.sourceType,this.listenerGuid=t.listenerGuid,e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=t.handler,this.queryMessage=r,this.guid=null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.guid,this.internalHandler()}async internalHandler(){var e,t;this.data=null===(t=null===(e=this.queryMessage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){var e;this.allowDelay?(this.delayed=!0,null===(e=this.queryMessage)||void 0===e||e.sendQueryResponse(null,{wait:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?k.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):null===(t=this.queryMessage)||void 0===t||t.sendQueryResponse(null,{canceled:this.canceled,data:e})}};var $r=r(50361),Pr=r.n($r);class Tr{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}class Rr extends class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.closedHandlersExecuted=0,this.handlers=[],this.closeFinalHandler=null,this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}closeFinal(e){this.closeFinalHandler=e;const t=`${this.name}_public_${Date.now()}_${Math.random()}`;k.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:"closed",listenerGuid:t,windowName:this.thisWindowName});const r=(...e)=>{this.howManyClosedHandlers()||(this.closeFinalHandler&&this.closeFinalHandler(...e),this.closeFinalHandler=null)},n=`Finsemble.Interrupt.${t}`;k.addResponder(n,((e,n)=>{new Er({source:this.name,sourceType:this.sourceType,listenerGuid:t,handler:r,event:"closed"},n)})),this.openResponders.push(n)}howManyClosedHandlers(){return this.handlers.filter((e=>"closed"===e.event)).length}addEventListener(e,t){se.system.debug("PublicEventManager.addEventListener:",e);const r=`${this.name}_public_${Date.now()}_${Math.random()}`,n="closed"!==e?t:(...e)=>{t(...e),this.closedHandlersExecuted++,this.closedHandlersExecuted===this.howManyClosedHandlers()&&this.closeFinalHandler&&(this.closeFinalHandler(),this.closeFinalHandler=null)};this.handlers.push({event:e,handler:n,listenerGuid:r}),k.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:r,windowName:this.thisWindowName});const i=`Finsemble.Interrupt.${r}`;return k.addResponder(i,((t,i)=>{new Er({source:this.name,sourceType:this.sourceType,listenerGuid:r,handler:n,event:e},i)})),this.openResponders.push(i),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,r=!0){if(se.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const n=this.handlers.findIndex((r=>r.event===e&&r.handler===t));if(-1===n)return void(r&&se.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:i}=this.handlers[n];k.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:i,windowName:this.thisWindowName}),k.removeResponder(`Finsemble.Interrupt.${i}`),this.handlers.splice(n,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{k.removeResponder(e)}))}}{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=ot.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=ot,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=kr("activeWorkspace",this.name,this.name),this.windowKey=kr("activeWorkspace",this.name),Rr.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,r=!1){if("closed"!==e||!c.finsembleWindow||this.name!==c.finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t,r)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new Rr(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const r=Rr;r.types||(r.types={}),r.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var r;const{uuid:n,windowType:i}=t;if(!1!==t.waitForReady)try{await Rr._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}se.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const o=Rr.cache[e];return o?(se.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:o}):{data:(await Rr._createWrap(Object.assign(Object.assign({},t),{windowIdentifier:null!==(r=t.windowIdentifier)&&void 0!==r?r:{uuid:n,name:e,windowName:e,windowType:i}}))).wrap}}static getInstance(e,t){var r;const n=j.Window.getCurrent().name,i=null!==(r=null==(e=Pr()(e))?void 0:e.windowName)&&void 0!==r?r:null==e?void 0:e.name;return new Promise((async(r,o)=>{if(!i){const e='"name" is a required param';return null==t||t(e),void o(e)}e.windowName=i;let s=Rr.cache[i];if(s)return se.system.debug("WRAP LIFECYCLE:",i,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,s),void r({wrap:s});if(e.name){const{err:n,data:s}=await Rr.createWrapFromUUIDAndName(i,e);return n||!s?(null==t||t(n),void o(n)):(null==t||t(null,s),void r({wrap:s}))}if(!1!==e.waitForReady)try{await Rr._windowReady(i),e.wrapState="ready"}catch(a){return null==t||t(a,null),void o(a)}const{err:a,response:c}=await k.query("WindowService-Request-getWindowIdentifier",{windowName:i,requester:n});if(a)return se.system.error(a),null==t||t(a,null),void o(a);if(s=Rr.cache[i],s)return se.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,s),void r({wrap:s});se.system.debug("WRAP LIFECYCLE:",i,"Information received from launcher. Creating wrap.");const{identifier:u}=c.data;u.windowName&&(u.name=u.windowName),e.retrievedIdentifier=u,({wrap:s}=await Rr._createWrap(e)),c.data.descriptor&&(s.descriptor=c.data.descriptor),null==t||t(null,s),r({wrap:s})}))}static _createWrap(e){return new Promise((async t=>{const r=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||r.windowType)&&"WebApplication"!==r.windowType||(r.windowType="WebWindow");let n=Object.assign({},r);n=Object.assign(n,e),n.setWindowType=n.windowType,delete n.windowType,se.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",r.windowName);let i=new Rr(n);Rr.cache[r.windowName]=i,i.windowType=r.windowType,i.identifier=r,i.closeFinal(i.handleWrapRemoveRequest),i.addEventListener("maximized",(()=>{i.windowState=ot.MAXIMIZED,i.windowOptions.windowState=ot.MAXIMIZED})),i.addEventListener("minimized",(()=>{i.windowState===ot.MAXIMIZED?(i.windowState=ot.MINIMIZED_WAS_MAXIMIZED,i.windowOptions.windowState=ot.MINIMIZED_WAS_MAXIMIZED):i.windowState===ot.NORMAL?(i.windowState=ot.MINIMIZED_WAS_NORMAL,i.windowOptions.windowState=ot.MINIMIZED_WAS_NORMAL):se.system.warn("Invalid window state received listening to window minimize",i.windowState)})),i.addEventListener("restored",(()=>{i.windowState=ot.NORMAL,i.windowOptions.windowState=ot.NORMAL}));const o=k.subscribe(`Finsemble.Component.State.${r.windowName}`,((e,t)=>{if(e)se.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,k.unsubscribe(o)}}));await(async(e,t)=>new Promise((r=>{e.parentSubscribeID=k.subscribe(`Finsemble.parentChange.${t.windowName}`,(async(t,n)=>{if(t)se.system.error("FinsembleWindow parent change notification error",t);else{const t=n.data||{};"Added"===t.type?(se.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",t),await e.setParent(t.stackedWindowIdentifier)):"Exists"===t.type?(se.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",t),await e.setParentOnWrap(t.stackedWindowIdentifier)):"Removed"===t.type?(se.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",t),e.clearParent()):t.type&&se.system.error("FinsembleWindow Parent Notification: unknown type",t)}r()}))})))(i,r),t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${j.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),se.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==c.name&&this.name&&delete Rr.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(Rr.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=Rr._getRemoveWrapChannel(this.name);k.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&k.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),k.unsubscribe(this.parentSubscribeID)}onReady(e){return new Promise((t=>{if("ready"===this.wrapState)return null==e||e(),void t();this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,r=Function.prototype){return"function"==typeof t&&(r=t,t={}),t=Object.assign(Object.assign({},t),{windowIdentifier:this.identifier}),se.setting().system.Debug&&(t.callstack=se.callStack()),new Promise((async(n,i)=>{var o;if("close"!==e&&"setParent"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void n(await this.queryWindowService(e,t));se.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:s,response:a}=await k.query(this.windowServiceChannelName(e),t);let c=null!==(o=a.data)&&void 0!==o?o:null;if(s){if(se.system.debug(`WindowService.${e}: failed`,s),console.debug(`WindowService.${e}: failed`,s),"getComponentState"!==e&&"Not found"!==s)return void i(s)}else se.system.debug(`${this.windowServiceChannelName(e)} successful`,c),console.debug(`${this.windowServiceChannelName(e)} successful`,c);n(c),r(s,c)}))}minimize(e=null,t){return new Promise((r=>{this.queryWindowService("minimize",e,(e=>{null==t||t(e),r({err:e})}))}))}maximize(e=null,t){return new Promise((r=>{this.getBounds(((n,i)=>{n||!i?se.system.warn(`Error getting bounds, cached bounds will not be set: ${n}`):this.updateOptions({options:{defaultLeft:i.left,defaultTop:i.top,defaultWidth:i.width,defaultHeight:i.height}}),this.queryWindowService("maximize",e,(e=>{null==t||t(e),r({err:e})}))}))}))}restore(e=null,t){return new Promise((r=>{this.queryWindowService("restore",e,(e=>{null==t||t(e),r({err:e})}))}))}blur(e=null,t){return new Promise((r=>{this.queryWindowService("blur",e,(e=>{null==t||t(e),r({err:e})}))}))}focus(e=null,t){return new Promise((r=>{this.queryWindowService("focus",e,(e=>{null==t||t(e),r({err:e})}))}))}bringToFront(e=null,t){return new Promise((r=>{this.queryWindowService("bringToFront",e,(e=>{null==t||t(e),r({err:e})}))}))}setAlwaysOnTop(e={alwaysOnTop:!0},t){return new Promise((r=>{this.queryWindowService("setAlwaysOnTop",e,(e=>{null==t||t(e),r({err:e})}))}))}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",e,t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,r=Function.prototype){const n={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",n,r)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const r=await this.queryWindowService("addBrowserView",e,t);return new Tr({id:r,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){return new Promise((r=>{"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,(e=>{null==t||t(e),r({err:e})}))}))}getBounds(e,t){return new Promise((r=>{const n="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==n||n(e,t),r({err:e,data:t})}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t){return new Promise((r=>{this.queryWindowService("hide",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t){return new Promise((r=>{this.queryWindowService("show",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((r=>{se.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{se.system.debug("WRAP CLOSE. Public close initiated for",this.name),null==t||t(e),r({err:e})}))}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{k.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){k.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},r=Function.prototype){const n=()=>{k.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),r()};e?this.registerWithDocking(t,n):n()}wrapReady(){k.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){se.system.debug("FinsembleWindow.startTabTileMonitoring",e),k.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){se.system.debug("FinsembleWindow.stopTabTileMonitoring",e),k.query("TabTile.stopTabTile",{params:e},(function(e,r){e?se.system.warn("TabTile.stopTabTile: query failed",e):se.system.debug("TabTile.stopTabTile results",r.data);const n=r.data;t?t(e,n,this.defaultStopTrackingAction):this.defaultTabTileAction(n)}))}defaultTabTileAction(e){const t=this;switch(se.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(r){t.Group.addWindow(this.identifier,r,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:se.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},r={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,r),this.windowOptions.bounds=t}startMove(e={}){se.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,k.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){se.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,k.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){k.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,r)=>r?e(r.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){se.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),k.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?Rr.getInstance(this.settingParent,((t,r)=>{e(null,r)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}async setParent(e,t){return new Promise((r=>{this.settingParent?this.getParent(((e,n)=>{null==t||t(e,n),r({err:e,data:n})})):(this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(se.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,null==t||t(null,this.parentWindow),r({data:this.parentWindow})):this.queryWindowService("setParent",e,(()=>{se.system.debug("FinsembleWindow.setParent",e),Rr.getInstance(e,((n,i)=>{n?se.system.error("FinsembleWindow.setParent error",n):(se.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=i,this.parentWindow.windowType.includes("StackedWindow")||this.parentWindow.windowName.includes("StackedWindow")||se.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),k.transmit(ct.REQUEST_PUBLISH,null),this.settingParent=!1;const o=()=>{this.removeEventListener("parent-set",o),null==t||t(n,i),r({err:n,data:i})};this.addEventListener("parent-set",o)}))})))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(se.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{se.system.debug("FinsembleWindow.setParentOnWrap",e),Rr.getInstance(e,((r,n)=>{r?se.system.error("FinsembleWindow.setParentOnWrap error",r):(se.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=n,!1===this.parentWindow.windowType.includes("StackedWindow")&&!1===this.parentWindow.windowName.includes("StackedWindow")&&se.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(r,n)}))}))}clearParent(){se.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){se.system.debug("Title change",e),k.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((r,n)=>{null==e||e(r,n),t({err:r,data:n})}))}))}_privateManagementPreface(e,t){var r,n;return"function"==typeof t&&se.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:null===(r=this.identifier)||void 0===r?void 0:r.windowName,windowType:null===(n=this.identifier)||void 0===n?void 0:n.windowType},se.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((r=>{k.query("StackedWindow.addWindow",e,((e,n)=>{se.system.debug("StackedWindow.addWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((r=>{k.query("StackedWindow.removeWindow",e,((e,n)=>{se.system.debug("StackedWindow.removeWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((r=>{k.query("StackedWindow.deleteWindow",e,((e,n)=>{se.system.debug("StackedWindow.deleteWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((r=>{k.query("StackedWindow.setVisibleWindow",e,((e,n)=>{se.system.debug("StackedWindow.setVisibleWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((r=>{k.query("StackedWindow.reorder",e,((e,n)=>{se.system.debug("StackedWindow.reorder callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;k.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;k.query("DockingService.leaveGroup",{name:e},(()=>{}))}}function Or(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const r in e)t[r]=void 0===t[r]?Or(e[r],null):t[r];return t}function kr(...e){let t="";for(let r=0;r<e.length;r++)t=`${t} ${e[r]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))}Rr.WINDOWSTATE=ot,Rr.wrap=Rr.getInstance,Rr.cache={},Rr._windowReady=function(e){let t;return se.system.debug(`windowServiceReady: ${e} starting`),new Promise((async(r,n)=>{se.system.debug(`windowServiceReady: ${e} waiting`),t=k.subscribe(`Finsemble.Component.State.${e}`,((n,i)=>{const{state:o}=i.data;switch(se.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":se.system.debug(`windowServiceReady: ${e} ${o}`),k.unsubscribe(t),r()}}))}))},r(27361),r(78718),r(18446),r(28368);const Ir=["setValue","removeProperty","logMessage"],Ar=new class{getChildPropertyValue(e,t,r){let n;if(t.includes("[")){let i=(t=t.replace("]","[")).split("[");if(3!==i.length)throw new Error(`"illegal array syntax ${t} within ${r} so skipping`);{let t=i[0],o=i[1];if(n=e[t][o],void 0===n)throw new Error(`"undefined array element ${t}[${o}] within ${r} so skipping`)}}else n=e[t];return n}setChildPropertyValue(e,t,r,n,i){let o;if(o="object"==typeof r&&n?Or(r):r,t.includes("[")){let r=(t=t.replace("]","[")).split("[");if(3!==r.length)throw new Error(`"illegal array syntax ${t} within ${i} so skipping`);{let t=r[0],n=r[1];if(void 0===e[t][n])throw new Error(`"undefined array element ${t}[${n}] within ${i} so skipping`);e[t][n]=o}}else e[t]=o}findConfigPropertyValue(e,t){let r,n,i;if(t)for(r=e,i=t.split("."),n=0;n<i.length&&(r=this.getChildPropertyValue(r,i[n],t),"object"==typeof r);n++);return n<i.length-1&&(r=void 0),ae.system.debug("DeprecatedConfigUtil.findConfigParent",t,r),r}findConfigParent(e,t){let r=t.split("."),n=e;for(let e=0;e<r.length-1;e++)r[e].includes("[")||n[r[e]]||(n[r[e]]={}),n=this.getChildPropertyValue(n,r[e],t);return ae.system.debug("DeprecatedConfigUtil.findConfigParent",t,n),n}getLastPathProperty(e){let t=e.split(".").pop();return ae.system.debug("DeprecatedConfigUtil.getLastPathProperty",e,t),t}copyObjectProperties(e,t,r){let n;n="object"==typeof t&&r?Or(t):t,Object.assign(e,n)}systemLog(e){let t=ae.system.warn;return"error"===e&&(t=ae.system.error),t}moveConfigProperty(e,t){let r=this.findConfigPropertyValue(e,t.oldProperty);if(void 0!==r){let n=this.findConfigParent(e,t.newProperty),i=this.getLastPathProperty(t.newProperty);t.addToExistingObject&&"object"==typeof n[i]&&!Array.isArray(n[i])?this.copyObjectProperties(n[i],r,t.clone):this.setChildPropertyValue(n,i,r,t.clone,t.newProperty),this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config ${t.oldProperty} was found and updated to ${t.newProperty}`),t.removeOld&&(delete this.findConfigParent(e,t.oldProperty)[this.getLastPathProperty(t.oldProperty)],ae.system.log(`"DeprecatedConfig: ${t.oldProperty} removed`))}else ae.system.warn(`"DeprecatedConfig: ${t.oldProperty} not found so skipped`,t)}setPropertyValue(e,t){let r=this.findConfigPropertyValue(e,t.property);t.ifOldValue&&t.ifOldValue!==r||(this.findConfigParent(e,t.property)[this.getLastPathProperty(t.property)]=t.newValue,this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config value for ${t.property} set to ${t.newValue}`))}removeProperty(e,t){let r=this.findConfigParent(e,t.property),n=this.getLastPathProperty(t.property);void 0!==r[n]&&(delete r[n],this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config property ${t.property} removed`))}getWildCardListItems(e,t){let r=[],n=e;if(t.includes("*")){let e=t.split(".");for(let t=0;t<e.length;t++){if("*"===e[t]){"object"==typeof n&&(r=Object.keys(n));break}if(n=n[e[t]],"object"!=typeof n)break}}return r}wildCardMismatch(e,t){let r,n=e.indexOf("*"),i=e.indexOf("*");return r=-1!==n&&e.substring(0,n)!==t.substring(0,i),r}displayDeprecationMessage(e,t){null!=this.findConfigPropertyValue(e,t.property)&&this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config found for ${t.property}. ${t.userMessage}`)}deprecatedRequest(e,t){if(Array.isArray(e.set)){let r=e.set;delete e.set;for(let n=0;n<r.length;n++){let i=Object.keys(r[n]);for(let t=0;t<i.length;t++)e[i[t]]=r[n][i[t]];this.processDeprecatedProperty(context,t,e)}}else ae.system.log("DeprecatedConfigUtil.processDeprecatedProperty skipping illegal set operation",e)}singlePathOperation(e,t){const r=this.getWildCardListItems(t,e.property);if(0===r.length)switch(e.operation){case"setValue":ae.system.debug(`DeprecatedConfigUtil.setValue for property ${e.property}`,e),this.setPropertyValue(t,e);break;case"removeProperty":ae.system.debug(`DeprecatedConfigUtil.removeProperty for ${e.property}`,e),this.removeProperty(t,e);break;case"logMessage":ae.system.debug(`DeprecatedConfigUtil.logMessageOnly for ${e.property}`,e),this.displayDeprecationMessage(t,e)}else{let n,i=e.property.slice();for(;n=r.pop();)e.property=i.replace(".*.",`.${n}.`),this.processDeprecatedProperty(context,t,e)}}moveProperty(e,t){if(this.wildCardMismatch(e.oldProperty,e.newProperty))ae.system.warn(`DeprecatedConfig: wildCards are mismatched for ${e.oldProperty} and ${e.newProperty} so ignoring`,e);else{const r=this.getWildCardListItems(t,e.newProperty);if(0===r.length)ae.system.debug(`DeprecatedConfigUtil.moveProperty from ${e.oldProperty} to ${e.newProperty}`,e),this.moveConfigProperty(t,e);else{let n,i=e.oldProperty.slice(),o=e.newProperty.slice();for(;n=r.pop();)e.oldProperty=i.replace(".*.",`.${n}.`),e.newProperty=o.replace(".*.",`.${n}.`),this.processDeprecatedProperty(context,t,e)}}}processDeprecatedProperty(e,t,r){try{void 0===r.when||r.when[e]?r.set?this.deprecatedRequest(r,t):Ir.includes(r.operation)?this.singlePathOperation(r,t):"moveProperty"===r.operation?this.moveProperty(r,t):ae.system.warn("DeprecatedConfigUtil.processDeprecatedProperty skipping unknown operation",r):ae.system.log("DeprecatedConfigUtil.processDeprecatedProperty skipping item because wrong context",r)}catch(e){ae.system.error(`DeprecatedConfig: error caught: ${e}`,r)}}modifyConfigBasedOnDeprecatedDefinitions(e,t){if(Array.isArray(t.finsemble.deprecatedConfig)){let r=t.finsemble.deprecatedConfig;for(let n=0;n<r.length;n++)ae.system.debug("DeprecatedConfigUtil.modifyConfigBasedOnDeprecatedDefinitions processing",e,r[n]),this.processDeprecatedProperty(e,t,r[n])}return!0}};var xr=r(1581),Nr=r.n(xr),jr=r(5477),Lr=r.n(jr);const Dr="%&%",Fr="%%",Mr=new class{constructor(){this.generatedDocLines=[],this.knownPropertiesMap={},this.previousLevel=0}formatValidationErrors(e){return e.map((e=>`In '${e.instancePath}', error: '${e.message}', with params '${JSON.stringify(e.params)}'`))}schemaValidate(e,t,r,n){let i=!1;try{var o=e.getSchema(`Finsemble${r}`);o(n)?(console.log("JSON Schema Validation: No Errors"),ae.system.log("JSON Schema Validation: Done With No Errors"),i=!0):ae.system.error("forceObjectsToLogger","JSON Schema Validation Errors",this.formatValidationErrors(o.errors),"Details",o.errors,"manifest",n,"schema",t)}catch(e){console.log("schemaValidate catch: ",e,t,n),ae.system.error("forceObjectsToLogger","schemaValidate catch",e,t,n)}return i}async validateConfig(e,t){console.log("JSON Schema Validation: validateConfig",t,e),ae.system.debug("forceObjectsToLogger","JSON Schema Validation: validateConfig",t,e);let r=!1,n={strict:"log",allErrors:!0,verbose:!0,useDefaults:!1};if(this.finsembleSchema&&this.ajv)r=!0;else try{const{err:t,data:i}=await Ot.fetchConfigFile(e.finsemble.configSchemaURL);this.finsembleSchema=i,t&&ae.system.error(`getFile error: ${t}`),this.ajv=new(Nr())(n),Lr()(this.ajv),this.ajv.addSchema(this.finsembleSchema,"Finsemble"),r=!0}catch(e){ae.system.error(`validateConfig: Error thrown reading or adding schema: ${e}`)}let i=!1;return r?(ae.system.debug("ConfigService: schema read",this.finsembleSchema),this.schemaValidate(this.ajv,this.finsembleSchema,t,e)||(i=!0)):(ae.system.error("Failure reading config schema. Confirm the schema URL configured in finsemble.configSchemaURL is correct and the file contains a valid JSON schema."),i=!0),i}setDefaultForForOneProperty(e,t,r){ae.system.debug(`setDefaultForForOneProperty: ${t}=${r}`);let n=null,i=e,o=t.split(Fr);for(let e=1;e<o.length-1;e++){let t=o[e];if(t.includes(Dr)){let e=t.split(Dr),r=e[0],n=e[1];i=i[r][n]}else i[t]||(i[t]={}),i=i[t]}let s=o[o.length-1];n=i[s],"object"==typeof i&&void 0===n&&(i[s]=r,ae.system.debug(`config-default-set property: path=${t}, originalPropertyValue=${n} defaultValue=${r},`))}getAdditionalProperties(e,t){let r=e,n=t.split(Fr);for(let e=1;e<n.length;e++){let t=n[e];r[t]||(r[t]={}),r=r[t]}let i=Object.keys(r),o=[];for(let e of i){let r=`${t}%%${e}`;this.knownPropertiesMap[r]||o.push(e)}return o}getLengthOfArrayInConfig(e,t){let r=0,n=e,i=t.split(Fr);for(let e=1;e<i.length;e++){let t=i[e];if(t.includes(Dr)){let e=t.split(Dr),r=e[0],i=e[1];n=n[r][i]}else n=n[t];if(!n)break}return n&&Array.isArray(n)&&(r=n.length),r}processSchemaItems({schemaObject:e,manifest:t,path:r,currentForceDefaults:n,previousPathProperty:i,level:o}){"array"===e.type||Array.isArray(e.type)||ae.system.error(`recursiveWalkerForDefaults expected items of type array for ${r}`,e);let s=this.getLengthOfArrayInConfig(t,r);for(let a=0;a<s;a++){let s=`${r}%&%${a}`;ae.system.debug(`processing items for ${s}`,e.items),this.recursiveWalkerForDefaults(t,n,e.items,i,`${s}`,o)}}processSchemaProperties({schemaObject:e,manifest:t,path:r,currentForceDefaults:n,previousPathProperty:i,level:o}){let s=Object.keys(e.properties);for(let a of s){let s=`${r}%%${a}`;a!=i&&"object"==typeof e.properties[a]&&(this.knownPropertiesMap[s]=!0,this.recursiveWalkerForDefaults(t,n,e.properties[a],a,`${s}`,o))}}processSchemaAdditionalProperties({schemaObject:e,manifest:t,path:r,currentForceDefaults:n,previousPathProperty:i,level:o}){let s=this.getAdditionalProperties(t,r);for(let a=0;a<s.length;a++){let c=`${r}%%${s[a]}`;this.recursiveWalkerForDefaults(t,n,e.additionalProperties,i,`${c}`,o)}}recursiveWalkerForDefaults(e,t,r,n,i,o){if(r instanceof Object&&"forceDefaults"in r&&(t=r.forceDefaults),r.default&&t&&this.setDefaultForForOneProperty(e,i,r.default),++o>=50)ae.system.warn(`recursiveWalkerForDefaults stopped due to excessive schema depth although could be a valid circular dependency: level ${o} path=${i} default=${r}`);else{if(r.$ref){let s=r.$ref.replace("#/definitions/","");this.recursiveWalkerForDefaults(e,t,this.finsembleSchema.definitions[s],n,`${i}`,--o)}r.items&&this.processSchemaItems({schemaObject:r,manifest:e,path:i,currentForceDefaults:t,previousPathProperty:n,level:o}),r.properties&&this.processSchemaProperties({schemaObject:r,manifest:e,path:i,currentForceDefaults:t,previousPathProperty:n,level:o}),r.additionalProperties&&this.processSchemaAdditionalProperties({schemaObject:r,manifest:e,path:i,currentForceDefaults:t,previousPathProperty:n,level:o})}--o}async initializeSchema(e){let t=!0;if(!this.finsembleSchema){const{data:t}=await Ot.fetchConfigFile(e);this.finsembleSchema=t}return this.finsembleSchema||(ae.system.error("Failure reading config schema. Confirm the schema URL configured in finsemble.configSchemaURL is correct and the file contains a valid JSON schema."),t=!1),t}async walkSchemaAndSetConfigDefaults(e){ae.system.debug("walkSchemaAndSetConfigDefaults Starting"),console.log("walkSchemaAndSetConfigDefaults",e),await this.initializeSchema(e.finsemble.configSchemaURL)?this.recursiveWalkerForDefaults(e,!0,this.finsembleSchema.definitions.ManifestSubschema,"ManifestSubschema","",0):ae.system.error("Failure to initialize schema so config defaults not initialized."),ae.system.debug("walkSchemaAndSetConfigDefaults Done")}},Wr=200;async function Vr(e){let t=null,r=null;try{const n=await fetch(e);n.status!=Wr?t=`HTTP get error for ${e}: ${n.status} ${n.statusText}`:r=await n.json()}catch(e){t=e}return{err:t,getData:r}}async function Ur(e,t){let r=null;try{const n=await fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});n.status!=Wr&&(r=`HTTP post error for ${e}: ${n.status} ${n.statusText}`)}catch(e){r=e}return{err:r}}async function zr(e,t){let r=null;try{const n=await fetch(e,{method:"PUT",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});n.status!=Wr&&(r=`HTTP put error for ${e}: ${n.status} ${n.statusText}`)}catch(e){r=e}return{err:r}}async function qr(e){let t=null;try{const r=await fetch(e,{method:"DELETE"});r.status!=Wr&&(t=`HTTP delete error for ${e}: ${r.status} ${r.statusText}`)}catch(e){t=e}return{err:t}}var Br,Hr=function(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)};Br=new WeakMap;const Gr=class{constructor(){Br.set(this,window.name)}async addAppDefinitions(e){const t={type:"addAppDefinitions",meta:{uuid:Hr(this,Br,"f")},payload:{apps:e}};await I.query(o,t)}async removeAppDefinitions(e){const t={type:"removeAppDefinitions",meta:{uuid:Hr(this,Br,"f")},payload:{apps:e}};await I.query(o,t)}async setInteropRegistrationData(e){const t={type:"setInteropRegistrationData",meta:{uuid:Hr(this,Br,"f")},payload:{windowDescriptor:e}};await I.query(o,t)}async registerUIResolverListener(e){I.addResponder("FSBL.FDC3.intent.resolver",(async(t,r)=>{let n,i;if(t)Promise.reject(`registerUIResolverListener failed. It can only be invoked once, system wide (router error: ${t})`);else{const t=null==r?void 0:r.data;try{n=await e(t)}catch(e){ae.log(`registerUIResolverListener IntentResolution rejected ${e}`),i={error:Nt.ResolverUnavailable}}null==r||r.sendQueryResponse(null,i||n)}}));const t={type:"registerUIResolver",meta:{uuid:Hr(this,Br,"f")}};await I.query(o,t)}},Kr=new Gr;let Qr=null;async function Yr(e,t=!1){se.system.log("SmartDesktopClientHandler.updateAppInConfigServiceAndPublish",e);const r=Or(e),n={appd:{[r.appId]:r},components:{[r.appId]:On(r)}},i={manifest:kn.manifest,allowOverwrites:t,finsembleConfigObject:n,replaceApps:!t,replaceComponents:!t,replaceServices:!1,updateStore:!0};await kn.processFinsembleConfig(i,(()=>{})),await Kr.addAppDefinitions(kn.manifest.finsemble.appd);const{err:o}=await k.query("launcher.loadComponents",kn.manifest.finsemble.components);o&&se.system.error("smartDesktopClientHandler - launcher.updateComponents",o),k.publish("Config.changeNotification",{componentConfig:kn.manifest.finsemble.components[r.appId],finsemble:kn.manifest.finsemble})}async function Jr(e){let{err:t,getData:r}=await Vr(`${Qr}/toolbar/menus`);e.sendQueryResponse(t,r)}async function Zr(e){let{err:t}=await Ur(`${Qr}/toolbar/menus/add/`,e.data.menuConfig);e.sendQueryResponse(t)}async function Xr(e){let{err:t}=await zr(`${Qr}/toolbar/menus/${e.data.menuId}`,e.data.menuConfig);e.sendQueryResponse(t)}async function en(e){let{err:t}=await qr(`${Qr}/toolbar/menus/${e.data.menuId}`);e.sendQueryResponse(t)}async function tn(e){let{err:t,getData:r}=await Vr(`${Qr}/project/preloads`);e.sendQueryResponse(t,r)}async function rn(e){let{err:t}=await zr(`${Qr}/project/preloads`,{oldAlias:e.data.oldAlias,newAlias:e.data.newAlias,detail:e.data.detail});e.sendQueryResponse(t)}async function nn(e){let{err:t}=await qr(`${Qr}/project/preloads/${e.data.alias}`);e.sendQueryResponse(t)}async function on(e){let{err:t,getData:r}=await Vr(`${Qr}/appd/v1/apps`);e.sendQueryResponse(t,r)}async function sn(e){var t;let r,n;se.system.log("SmartDesktopClientHandler getAppConfigHandler",e);const i=null===(t=e.data)||void 0===t?void 0:t.appId;if(i){let{err:e,getData:t}=await Vr(`${Qr}/appd/v1/apps/${i}`);r=e,n=t}else r="smartDesktopClientHandler:getAppConfigHandler() no appId provided";e.sendQueryResponse(r,n),r&&se.error(r,e.data)}async function an(e){var t;let r;se.system.log("SmartDesktopClientHandler addAppHandler",e);const n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.appConfig;if(null==n?void 0:n.appId){await Yr(n);let{err:e}=await Ur(`${Qr}/appd/v1/apps`,n);r=e}else r="smartDesktopClientHandler:addAppHandler() received app definition with no appId";e.sendQueryResponse(r),r&&se.error(r,e.data)}async function cn(e){var t;let r;se.system.log("SmartDesktopClientHandler updateAppHandler",e);const n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.appConfig;if(null==n?void 0:n.appId){let{err:e}=await zr(`${Qr}/appd/v1/apps/${n.appId}`,n);await Yr(n,!0),r=e}else r="smartDesktopClientHandler:updateHandler() received app definition with no appId";e.sendQueryResponse(r),r&&se.error(r,e.data)}async function un(e){var t;let r;se.system.log("SmartDesktopClientHandler deleteAppHandler",e);const n=null===(t=e.data)||void 0===t?void 0:t.appId;if(n){let{err:e}=await qr(`${Qr}/appd/v1/apps/${n}`);e||await async function(e){se.system.log("SmartDesktopClientHandler.removeAppInConfigServiceAndPublish",e),delete kn.manifest.finsemble.components[e],delete kn.manifest.finsemble.appd[e];const t={appd:kn.manifest.finsemble.appd,components:kn.manifest.finsemble.components},r={manifest:kn.manifest,allowOverwrites:!0,finsembleConfigObject:t,replaceApps:!1,replaceComponents:!1,replaceServices:!1,updateStore:!0};await kn.processFinsembleConfig(r,(()=>{})),await Kr.addAppDefinitions(kn.manifest.finsemble.appd);const{err:n}=await k.query("launcher.loadComponents",kn.manifest.finsemble.components);n&&se.system.error("smartDesktopClientHandler - launcher.updateComponents",n),k.publish("Config.changeNotification",{removedApp:e,finsemble:kn.manifest.finsemble})}(n),r=e}else r="smartDesktopClientHandler:deleteAppHandler() no appId provided";e.sendQueryResponse(r),r&&se.error(r,e.data)}async function ln(e){se.system.log("SmartDesktopClientHandler updateThemeHandler",e);let{err:t}=await zr("/project/assets/theme",e.data.theme);k.transmit("Finsemble-ui-change.themeUpdate",e.data.theme),e.sendQueryResponse(t)}async function dn(e){se.system.log("SmartDesktopClientHandler getThemeHandler",e);let{err:t,getData:r}=await Vr("/project/assets/theme");e.sendQueryResponse(t,r)}async function fn(e){var t;se.system.log("SmartDesktopClientHandler updateSystemTrayIconHandler",e),null===(t=kn.configStore)||void 0===t||t.setValue({field:"finsemble.systemTrayIcon",value:kn.manifest.finsemble.systemTrayIcon}),e.sendQueryResponse(null)}function pn(e,t){k.addResponder(e,((e,r)=>{e?se.system.error(`"SmartDesktopClientHandler responder error for ${t.name}: ${e}`):t(r)}))}const hn={fdc3Resolver:"FDC3Resolver",linkerWindow:"LinkerWindow","Docking Move Mask":"DockingGroupMask",yesNo:"YesNoDialog",singleInput:"SingleInputDialog",dialogModal:"DialogModal","Process Monitor":"ProcessMonitor","Advanced App Catalog":"AppCatalog"};var mn=r(80406);r.n(mn)()(1);const gn=(e,...t)=>{(e?se.system.error:se.system.info)(...t,e)},yn=async(e,t)=>{if("string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");await S.waitForStartup("storageService");const{err:r,response:n}=await k.query("Storage.save",e);if(gn(r,"Storage.save",n.data),null==t||t(r,n.data),r)throw r;return{err:r,data:n.data}},vn=async(e,t)=>{if("string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");await S.waitForStartup("storageService");const{err:r,response:n}=await k.query("Storage.get",e);return gn(r,"Storage.get",n.data),null==t||t(r,n.data),{err:r,data:n.data}},bn=async(e,t)=>{const{err:r,data:n}=await vn(e);if(null==t||t(r,n),r)throw r;return n},wn=bn,Sn=yn,_n="finsemble",Cn="userPreferences";new class extends pr{constructor(){super({name:"preferencesService",startupDependencies:{},shutdownDependencies:{services:["windowService"]}}),this.userPreferences={},this.serviceReady=!1,this.onBaseServiceReady((e=>{this.doInit(e)})),this.start()}createRouterEndpoints(){k.addResponder("PreferencesService.getPreferences",((e,t)=>{if(this.serviceReady||se.system.error("preferencesService invoked before ready",t),e||!t)return se.system.error(e);t.sendQueryResponse(e,this.userPreferences)})),k.addResponder("PreferencesService.setPreference",((e,t)=>{if(this.serviceReady||se.system.error("preferencesService invoked before ready",t),e||!t)return se.system.error(e);const r=t.data;this.setPreference(r,(e=>{t.sendQueryResponse(e,e?null:"success")}))})),k.addResponder("PreferencesService.unsetPreference",((e,t)=>{if(this.serviceReady||se.system.error("preferencesService invoked before ready",t),e||!t)return se.system.error(e);const r=t.data;this.unsetPreference(r,(e=>{t.sendQueryResponse(e,e?null:"success")}))}))}doInit(e){const t=e=>{this.createRouterEndpoints(),e()},r=e=>{this.initiateRetrievingPreferences(e)},n=e=>{this.updateDefaultPreferences(e)},i=e=>{this.setPreferencesOnConfigStore(e)};S.waitForBootStage("authentication","stageCompleted",(()=>{Ke([t,r,n,i],(()=>{this.serviceReady=!0,e()}))}))}getPreferences(e){e(null,this.userPreferences)}async initiateRetrievingPreferences(e){se.system.debug("initiateRetrievingPreferences"),S.waitForStartup("storageService",(()=>{wn({topic:_n,key:Cn},((t,r)=>{if(se.system.debug("initiateRetrievingPreferences",r),t&&se.system.error(t),r){try{delete r["finsemble.components.Toolbar.window.dockable"],delete r["finsemble.components.Toolbar.window.options.resizable"],delete r["finsemble.components.Toolbar.window.monitor"]}catch(e){}this.userPreferences=r,se.system.log("APPLICATION LIFECYCLE:User Preferences Retrieved",r)}else se.system.log("APPLICATION LIFECYCLE:No user preferences found");e()}))}))}setPreference(e,t){He([t=>{q.setValue(e,t)},t=>{this.userPreferences[e.field]=e.value,Sn({topic:_n,key:Cn,value:this.userPreferences},(e=>{e&&se.system.error(e),t()}))}],(()=>{t(null)}))}unsetPreference(e,t){He([t=>{q.removeValue(e.field,t)},t=>{delete this.userPreferences[e.field],Sn({topic:_n,key:Cn,value:this.userPreferences},(e=>{e&&se.system.error(e),t()}))}],(()=>{t(null)}))}async updateDefaultPreferences(e){const t="finsemble.scheduledRestart",r="finsemble.scheduledShutdown",n="finsemble.scheduledCloseDiscardUnsavedChanges",{data:i}=await q.getValues([t,r,n]);i&&(void 0===this.userPreferences[t]&&i[t]&&(this.userPreferences[t]=i[t]),void 0===this.userPreferences[r]&&i[r]&&(this.userPreferences[r]=i[r]),void 0===this.userPreferences[n]&&i[n]&&(this.userPreferences[n]=i[n])),e()}setPreferencesOnConfigStore(e){se.system.debug("PreferenceService: setPreferencesOnConfigStore");const t=Object.keys(this.userPreferences);t.length?Me(t,((e,t)=>{const r={field:e,value:this.userPreferences[e]};q.setValue(r,(()=>{t()}))}),e):e()}};var En=r(9996),$n=r.n(En);const Pn=/^finsemble\.appd(?:\.|\["?)?(.*?)(?:"?\])?$/s,Tn="#/definitions/ManifestSubschema";se.start(),se.system.log("Starting Config Service");const Rn={window:{addToWorkspace:!1,affinity:"systemComponents",options:{autoShow:!1,resizable:!1,showTaskbarIcon:!1,alwaysOnTop:!0}},component:{category:"system"},foreign:{services:{windowService:{shouldRegister:!1}},components:{"App Launcher":{launchableByUser:!1},"Window Manager":{FSBLHeader:!1,persistWindowState:!1}}}},On=e=>{var t,r;return Object.assign(Object.assign({},null!==(t=null==e?void 0:e.manifest)&&void 0!==t?t:{}),{isAnApp:!0,appDConfig:e,component:Object.assign({},null===(r=null==e?void 0:e.manifest)||void 0===r?void 0:r.component)})},kn=new class extends pr{constructor(e){super(e),this.serviceReady=!1,this.configStore=null,this.manifest={},this.interopAdmin=new Gr,this.listeners={},this.onBaseServiceReady((e=>{this.doInit(e)})),this.start()}createRouterEndpoints(){const e=e=>e?se.system.error(e):se.system.error("Invalid query received");k.addResponder("configService.processAndSet",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):this.processAndSet(r)))),k.addPubSubResponder("Config.changeNotification",{newConfig:null,finsemble:this.manifest.finsemble}),k.addPubSubResponder(/configService*/,{}),k.addResponder("configService.getValue",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):this.getValue(r.data,((e,t)=>{r.sendQueryResponse(e,t)}))))),k.addResponder("configService.getValues",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):this.getValues(r.data.fields,((e,t)=>{r.sendQueryResponse(e,t)}))))),k.addResponder("configService.setValue",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.setValue(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("setValue failed. Only trusted (root domain) sources can set config.")))),k.addResponder("configService.setValues",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.setValues(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("setValue failed. Only trusted (root domain) sources can set config.")))),k.addResponder("configService.removeValue",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.removeValue(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("removeValue failed. Only trusted (root domain) sources can update config.")))),k.addResponder("configService.removeValues",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.removeValues(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("removeValues failed. Only trusted (root domain) sources can update config.")))),k.addResponder("configService.addListener",((t,r)=>{if(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r)return e(t);this.addListener(r.data),r.sendQueryResponse(t,r.data)}))}async recheckForSchemaErrors(){se.system.log("ConfigService - recheckForSchemaErrors"),Ar.modifyConfigBasedOnDeprecatedDefinitions("dynamicConfig",this.manifest),await Mr.walkSchemaAndSetConfigDefaults(this.manifest),se.system.debug("ConfigService - JSON Schema: re-validate config"),await Mr.validateConfig(this.manifest,Tn)}updateAppDDefinition(e){var t,r,n,i,o,s,a,c,u,l,d,f,p,h,m,g,y;return(null===(t=null==e?void 0:e.manifest)||void 0===t?void 0:t.appService)&&(e.manifest.bootParams=null!==(r=e.manifest.bootParams)&&void 0!==r?r:{},e.manifest.bootParams.autoStart=null===(n=e.manifest.bootParams.autoStart)||void 0===n||n,e.manifest.bootParams.stage=null!==(i=e.manifest.bootParams.stage)&&void 0!==i?i:"preuser",e.manifest.window=null!==(o=e.manifest.window)&&void 0!==o?o:{},e.manifest.window.options=null!==(s=e.manifest.window.options)&&void 0!==s?s:{},e.manifest.window.options.autoShow=null!==(a=e.manifest.window.options.autoShow)&&void 0!==a&&a,e.manifest.window.frame=null===(c=e.manifest.window.frame)||void 0===c||c,e.manifest.foreign=null!==(u=e.manifest.foreign)&&void 0!==u?u:{},e.manifest.foreign.components=null!==(l=e.manifest.foreign.components)&&void 0!==l?l:{},e.manifest.foreign.components["Window Manager"]=null!==(d=e.manifest.foreign.components["Window Manager"])&&void 0!==d?d:{},e.manifest.foreign.components["Window Manager"].FSBLHeader=!1,e.manifest.foreign.components.windowService=null!==(f=e.manifest.foreign.components.windowService)&&void 0!==f?f:{},e.manifest.foreign.components.windowService.manageWindowMovement=!1,e.manifest.foreign=null!==(p=e.manifest.foreign)&&void 0!==p?p:{},e.manifest.foreign.components=null!==(h=e.manifest.foreign.components)&&void 0!==h?h:{},e.manifest.foreign.components["App Launcher"]=null!==(m=e.manifest.foreign.components["App Launcher"])&&void 0!==m?m:{},e.manifest.foreign.components["App Launcher"].launchableByUser=!1,e.manifest.component=null!==(g=e.manifest.component)&&void 0!==g?g:{},e.manifest.component.singleton=null===(y=e.manifest.component.singleton)||void 0===y||y,e.manifest.component.spawnOnStartup=e.manifest.bootParams.autoStart,se.system.debug("updateAppDDefinition appService",e)),e}processAppDAndComponentConfig(e){var t,r,n;if(e.finsemble.components=null!==(t=e.finsemble.components)&&void 0!==t?t:{},"object"==typeof e.finsemble.appd){const{appd:t}=e.finsemble;for(const r of Object.entries(t)){let[t,n]=r;se.system.log(`Application "${n.appId}" added or updated in components`,t,n),n=this.updateAppDDefinition(n),e.finsemble.components[n.appId]&&se.system.warn(`processAppDConfig: addD config is overwriting a preexisting component with the same name as the app - ${n.appId}`),e.finsemble.components[n.appId]=On(n)}}else se.system.error("Expected manifest.finsemble.appd to be an object, but continuing without app config.");if("object"==typeof e.finsemble.components){const t=(r=e.finsemble.components,n=(e,t)=>t.uiComponent?[[e,$n()(Rn,t)]]:[[e,t]],Object.fromEntries(Object.entries(r).flatMap((([e,t])=>n(e,t)))));e.finsemble.components=(e=>{return t=hn,r=e,Object.keys(r).reduce(((e,n)=>Object.assign(Object.assign({},e),{[t[n]||n]:r[n]})),{});var t,r})(t),console.log(e.finsemble.components)}else se.system.error("Expected manifest.finsemble.components to be an object, but continuing without processing components config.")}doInit(e){Ke([async()=>{await(async()=>new Promise((async e=>{se.system.log("SmartDesktopClientHandler.initialize"),j.getSDServerInfo((t=>{Qr=t.applicationRoot,pn("SmartDesktopClient.getApps",on),pn("SmartDesktopClient.getMenus",Jr),pn("SmartDesktopClient.getAppConfig",sn),pn("SmartDesktopClient.getPreloads",tn),pn("SmartDesktopClient.addApp",an),pn("SmartDesktopClient.addMenu",Zr),pn("SmartDesktopClient.updateApp",cn),pn("SmartDesktopClient.updateMenu",Xr),pn("SmartDesktopClient.savePreload",rn),pn("SmartDesktopClient.deleteApp",un),pn("SmartDesktopClient.deleteMenu",en),pn("SmartDesktopClient.deletePreload",nn),pn("SmartDesktopClient.updateTheme",ln),pn("SmartDesktopClient.getTheme",dn),pn("SmartDesktopClient.refreshSystemTrayIconConfig",fn),e()}))})))()},async()=>new Promise((async e=>{const{err:t,data:r}=await Ot.getInitialManifest();if(se.system.log("forceObjectsToLogger","getManifest: ConfigUtil.getInitialManifest",t,r),!t&&r){const{err:t,data:n}=await this.processManifest(r);n&&(this.manifest=n),t&&se.system.error(`configService:getManifest() Error getting initial manifest ${t}`),se.system.log("forceObjectsToLogger","getManifest: processManifest",t,n),e()}else se.system.error(`configService:getManifest() Error getting initial manifest ${t}`),e()})),e=>{this.processAppDAndComponentConfig(this.manifest),e()},async()=>{try{await Ar.modifyConfigBasedOnDeprecatedDefinitions("mainConfig",this.manifest),se.system.log("modifyConfigBasedOnDeprecatedDefinitions done")}catch(e){se.system.error("modifyConfigBasedOnDeprecatedDefinitions failed. Error caught",e)}},async()=>{try{await Mr.walkSchemaAndSetConfigDefaults(this.manifest)}catch(e){se.system.error("walkSchemaForDefaults failed. Error caught",e)}},async()=>{se.system.debug("ConfigService - JSON Schema: initial validation");const e=await Mr.validateConfig(this.manifest,Tn);e&&se.system.error(`Manifest Error: ${e}`),se.system.log("forceObjectsToLogger","APPLICATION LIFECYCLE:STARTUP: ************* FULL PROCESSED MANIFEST *************",this.manifest),console.log("APPLICATION LIFECYCLE:STARTUP: ************* FULL PROCESSED MANIFEST *************",this.manifest)},e=>{this.initializeDataStore(this.manifest,(()=>{se.system.log("initializeDataStore complete"),this.createRouterEndpoints(),e()}))}],(()=>{this.serviceReady=!0,e()}))}async fetchConfigImports(e){se.system.debug("forceObjectsToLogger","importURLs",e);const t=e.map((e=>Ot.fetchConfigFile(e)));return(await Promise.all(t)).flatMap((e=>(null==e?void 0:e.data)?[e.data]:[]))}processImportedConfig(e){const{manifest:t,allowOverwrites:r,recursionLevel:n,finsembleConfigObject:i,replaceApps:o=!1,replaceComponents:s=!1,replaceServices:a=!1,updateStore:c}=e,u=/comment.*/,l=(e,t,r)=>{var n;e&&(null===(n=this.configStore)||void 0===n||n.setValue({field:t,value:r}))},d=()=>{var e;r&&o?(t.finsemble.appd={},c&&(null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble.appd",value:t.finsemble.appd}))):t.finsemble.appd=t.finsemble.appd||{};for(const e in i.appd)se.system.debug("adding appd app",e),!r&&t.finsemble.appd.hasOwnProperty(e)?console.warn("finsemble appd app config",e,"cannot be overwritten by third-party config",i.appd[e]):n>0&&t.finsemble.appd.hasOwnProperty(e)?(se.system.info("finsemble appd app config",e,"is being overwritten by appd app config",i.appd[e]),t.finsemble.appd[e]=i.appd[e],l(c,`finsemble.appd.${e}`,i.appd[e])):(t.finsemble.appd[e]=i.appd[e],l(c,`finsemble.appd.${e}`,i.appd[e]))},f=()=>{var e;r&&s?(e=>{let t=!1;for(const r in e)e[r].component&&e[r].component.category&&"system"===e[r].component.category||(se.system.debug("filterNonSystemComponents deleting",r),delete e[r],t=!0);return se.system.debug("filterNonSystemComponents after",e,t),t})(t.finsemble.components)&&c&&(null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble.components",value:t.finsemble.components})):t.finsemble.components=t.finsemble.components||{};for(const e in i.components)se.system.debug("adding component",e),!r&&t.finsemble.components.hasOwnProperty(e)?console.warn("finsemble component config",e,"cannot be overwritten by third-party component config",i.components[e]):n>0&&t.finsemble.components.hasOwnProperty(e)?(se.system.info("finsemble component config",e,"is being overwritten by component config",i.components[e]),t.finsemble.components[e]=i.components[e],l(c,`finsemble.components.${e}`,i.components[e])):(t.finsemble.components[e]=i.components[e],l(c,`finsemble.components.${e}`,i.components[e]))},p=()=>{var e;r&&a?(e=>{let t=!1;for(const r in e)e[r].category&&"system"===e[r].category||(se.system.debug("filterNonSystemServices deleting",r),delete e[r],t=!0);return se.system.debug("filterNonSystemServices after",e,t),t})(t.finsemble.services)&&c&&(null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble.services",value:t.finsemble.services})):t.finsemble.services=t.finsemble.services||{};for(const e in i.services)se.system.debug("adding service",e),!r&&t.finsemble.services.hasOwnProperty(e)?console.warn("finsemble service config",e,"cannot be overwritten by third-party service config",i.services[e]):n>0&&t.finsemble.services.hasOwnProperty(e)?(se.system.info("finsemble service config",e,"is being overwritten by service config",i.services[e]),t.finsemble.services[e]=i.services[e],l(c,`finsemble.services.${e}`,i.services[e])):(t.finsemble.services[e]=i.services[e],l(c,`finsemble.services.${e}`,i.services[e]))};Object.keys(i).forEach((e=>{u.test(e)?(se.system.debug("ignoring comment",e),delete i[e]):"appd"===e?d():"components"===e?f():"services"===e?p():"workspaceTemplates"===e?(()=>{t.finsemble.workspaceTemplates=t.finsemble.workspaceTemplates||{};for(const e in i.workspaceTemplates)se.system.debug("adding template",e),!r&&t.finsemble.workspaceTemplates.hasOwnProperty(e)?console.warn("finsemble template config",e,"cannot be overwritten by third-party template config",i.workspaceTemplates[e]):n>0&&t.finsemble.workspaceTemplates.hasOwnProperty(e)?(se.system.info("finsemble template config",e,"is being overwritten by template config",i.workspaceTemplates[e]),t.finsemble.workspaceTemplates[e]=i.workspaceTemplates[e],l(c,`finsemble.workspaceTemplates.${e}`,i.workspaceTemplates[e])):(t.finsemble.workspaceTemplates[e]=i.workspaceTemplates[e],l(c,`finsemble.workspaceTemplates.${e}`,i.workspaceTemplates[e]))})():"importConfig"===e||"importThirdPartyConfig"===e||(se.system.debug("adding key",e),!r&&t.finsemble.hasOwnProperty(e)?console.warn("finsemble config property",e,"cannot be overwritten by third-party config"):n>0&&t.finsemble.hasOwnProperty(e)?(se.system.info("finsemble config property",e,"is being overwritten"),t.finsemble[e]=i[e],l(c,`finsemble.${e}`,i[e])):(t.finsemble[e]=i[e],l(c,`finsemble.${e}`,i[e])))}))}async processFinsembleConfig(e,t){let r=await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:0}));return r=await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:0})),null==t||t(r),r}async processFinsembleConfigRecursive(e){const{manifest:t,recursionLevel:r,finsembleConfigObject:n}=e;if(r>50){const e="Configuration Error: importConfig may have a loop (recursion depth exceeded).";return S.systemLog({error:!0},e),se.system.error(e),C("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Config-Error",e),t}return se.system.debug("forceObjectsToLogger","*** entering processFinsembleConfig ***",n),Ot.resolveManifestMacros(t,n),await(async()=>{var t,i;const o=await this.fetchConfigImports(null!==(t=n.importConfig)&&void 0!==t?t:[]),s=await this.fetchConfigImports(null!==(i=n.importThirdPartyConfig)&&void 0!==i?i:[]);for(const t in o)await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:r+1,finsembleConfigObject:o[t],allowOverwrites:!0}));for(const t in s)await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:r+1,finsembleConfigObject:s[t],allowOverwrites:!1}))})(),Ot.resolveManifestMacros(t,n),this.processImportedConfig(e),t}async processManifest(e){if(void 0!==e.finsemble){const t={manifest:e,allowOverwrites:!0,finsembleConfigObject:e.finsemble,replaceApps:!1,replaceComponents:!1,replaceServices:!1,updateStore:!1};return{data:await this.processFinsembleConfig(t)}}{const t="'finsemble' property not found in manifest";return S.systemLog({error:!0},t),se.system.error(t),{err:t,data:e}}}initializeDataStore(e,t){se.system.debug("initializeDataStore"),Cr({store:"Finsemble-Configuration-Store",global:!1,values:e},((e,r)=>{e||!r?se.system.error("CreateStore Error",e):(this.configStore=r,se.console.log("initializeDataStore complete"),t())}))}processAndSet(e){const t=k.trustedMessage(e);let{newConfig:r}=e.data;const n=!!e.data.overwrite,i=!!e.data.replace;if(se.system.debug("forceObjectsToLogger","Config.processAndSet",t,r),n&&!t)e.sendQueryResponse("Config.processAndSet Rejected: only same domain components using default SharedWorker transport can overwrite config",null),se.error(`processAndSet request blocked from an untrusted app "${e.header.origin}". Only apps on the SharedWorker transport can call processAndSet()`);else{const t=(null==r?void 0:r.appd)||(null==r?void 0:r.components);t&&this.processAppDAndComponentConfig({finsemble:r});const o={manifest:this.manifest,finsembleConfigObject:r,allowOverwrites:n,replaceApps:i,replaceComponents:i,replaceServices:i,updateStore:!0};this.processFinsembleConfig(o,(async n=>{var i;se.system.log("forceObjectsToLogger","Config.processAndSet revised manifest",n),null===(i=this.configStore)||void 0===i||i.setValue({field:"finsemble.configSetDone",value:!0},(async()=>{if(await this.recheckForSchemaErrors(),t){const{err:e}=await k.query("launcher.loadComponents",n.finsemble.components);e&&se.system.error("ConfigService - launcher.updateComponents",e)}(null==r?void 0:r.appd)&&await this.interopAdmin.addAppDefinitions(this.manifest.finsemble.appd),k.publish("Config.changeNotification",{newConfig:r,finsemble:n.finsemble}),e.sendQueryResponse(null,n.finsemble)}))}))}}getValue(e,t){const r="string"==typeof e?e:e.field,n=Q().get(this.manifest,r,null);return null==t||t(null,n),n}getValues(e,t){var r,n;if(!e)return null===(r=this.configStore)||void 0===r?void 0:r.getAll(t);null===(n=this.configStore)||void 0===n||n.getValues(e,t)}_getAppdEntryName(e){const t=e.match(Pn);return t?t[1]:null}maybeGetAppDEntryKeyToRemove(e){if(e.startsWith("finsemble.appd")){const t=this._getAppdEntryName(e);if(t&&Object.keys(this.manifest.finsemble.appd).includes(t))return t}return null}async _removeAppdEntry(e,t){var r,n;Q().unset(this.manifest,`finsemble.appd.${e}`),null===(r=this.configStore)||void 0===r||r.removeValue({field:`finsemble.appd.${e}`},t),Q().unset(this.manifest,`finsemble.components.${e}`),null===(n=this.configStore)||void 0===n||n.removeValue({field:`finsemble.components.${e}`},t);const{err:i}=await k.query("launcher.loadComponents",this.manifest.finsemble.components);i&&se.system.error("ConfigService - _removeAppdEntry",i),await this.interopAdmin.removeAppDefinitions([e])}setValue(e,t){var r;Q().set(this.manifest,e.field,e.value),null===(r=this.configStore)||void 0===r||r.setValue(e,t)}setValues(e,t){Me(e,((e,t)=>{this.setValue(e,(e=>{t("string"==typeof e?new Error(e):e)}))}),(e=>{t(e)}))}removeValue(e,t){var r;const n=this.maybeGetAppDEntryKeyToRemove(e.field);n?this._removeAppdEntry(n,t):(Q().unset(this.manifest,e.field),null===(r=this.configStore)||void 0===r||r.removeValue(e,t))}removeValues(e,t){Me(e,((e,t)=>{"string"==typeof e&&(e={field:e}),this.removeValue(e,(e=>{t("string"==typeof e?new Error(e):e)}))}),(e=>{t(e)}))}addListener(e){var t;const r=(e,t)=>{t?(t.field=t.field.replace("Finsemble-Configuration-Store","configService"),k.publish(t.field,t)):se.system.warn("configService didn't receive a valid change from DistributedStoreClient",e)};if(!this.listeners[e]){this.listeners[e]=!0;const n="configService"===e?{}:{field:e.replace("configService.","")};null===(t=this.configStore)||void 0===t||t.addListener(n,r)}}}({name:"configService"})})()})();
|
|
8
|
+
deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const u=t[c];if(0===u.length)continue;const l=(0,o.propertyInData)(r,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of u)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,u,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const u in t)(0,i.alwaysValidSchema)(a,t[u])||(r.if((0,o.propertyInData)(r,n,u,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},89434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),c=s(o,"else");if(!a&&!c)return;const u=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,d("then",r),d("else",r))}else a?t.if(l,d("then")):t.if((0,n.not)(l),d("else"));function d(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(u,l),e.mergeValidEvaluated(o,u),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(u,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4783),i=r(72924),o=r(64665),s=r(1119),a=r(79864),c=r(67772),u=r(33708),l=r(69351),d=r(76239),f=r(12296),p=r(15697),h=r(50019),m=r(14200),g=r(71125),y=r(89434),v=r(66552);t.default=function(e=!1){const t=[p.default,h.default,m.default,g.default,y.default,v.default,u.default,l.default,c.default,d.default,f.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},64665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(93487),i=r(76776),o=r(10412),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:c,it:u}=e;!function(e){const{opts:n,errSchemaPath:o}=u,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(u,e,n.strictTuples)}}(s),u.opts.unevaluated&&r.length&&!0!==u.items&&(u.items=i.mergeEvaluated.items(o,r.length,u.items));const l=o.name("valid"),d=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(u,t)||(o.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(10412),s=r(4783),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},15697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),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},14200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,c=t.let("valid",!1),u=t.let("passing",null),l=t.name("_valid");e.setParams({passing:u}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${c}`).assign(c,!1).assign(u,n._`[${u}, ${o}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(u,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},12296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o=r(76776),s=r(76776),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:u}=e,{opts:l}=u,d=(0,n.allSchemaProperties)(r),f=d.filter((e=>(0,o.alwaysValidSchema)(u,r[e])));if(0===d.length||f.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;const p=l.strictSchema&&!l.allowMatchingProperties&&c.properties,h=t.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,s.evaluatedPropsToName)(t,u.props));const{props:m}=u;function g(e){for(const t in p)new RegExp(e).test(t)&&(0,o.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=f.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${o}]`,!0):n||u.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of d)p&&g(e),u.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=a},72924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64665),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},76239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(74815),i=r(10412),o=r(76776),s=r(69351),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:u}=e;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(u,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)u.definedProperties.add(e);u.opts.unevaluated&&l.length&&!0!==u.props&&(u.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),u.props));const d=l.filter((e=>!(0,o.alwaysValidSchema)(u,r[e])));if(0===d.length)return;const f=t.name("valid");for(const r of d)p(r)?h(r):(t.if((0,i.propertyInData)(t,c,r,u.opts.ownProperties)),h(r),u.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function p(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=a},33708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},66552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),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},10412:(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(93487),i=r(76776),o=r(22141),s=r(76776);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function u(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(c(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(u(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)(u(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=u,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},u,l,d){const f=d?n._`${e}, ${t}, ${i}${s}`:t,p=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&p.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${f}, ${r.object(...p)}`;return l!==n.nil?n._`${u}.call(${l}, ${h})`:n._`${u}(${h})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?d:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},78386:(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},95684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78386),i=r(28280),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},28280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(6646),i=r(10412),o=r(93487),s=r(22141),a=r(25173),c=r(76776),u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:c,validateName:u,opts:f,self:p}=i,{root:h}=c;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(c===h)return d(e,u,c,c.$async);const r=t.scopeValue("root",{ref:h});return d(e,o._`${r}.validate`,h,h.$async)}();const m=a.resolveRef.call(p,h,s,r);if(void 0===m)throw new n.default(i.opts.uriResolver,s,r);return m instanceof a.SchemaEnv?function(t){const r=l(e,t);d(e,r,t,t.$async)}(m):function(n){const i=t.scopeValue("schema",!0===f.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(m)}};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 d(e,t,r,n){const{gen:a,it:u}=e,{allErrors:l,schemaEnv:d,opts:f}=u,p=f.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(n&&!n.dynamicProps)void 0!==n.props&&(u.props=c.mergeEvaluated.props(a,n.props,u.props));else{const t=a.var("props",o._`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(a,t,u.props,o.Name)}if(!0!==u.items)if(n&&!n.dynamicItems)void 0!==n.items&&(u.items=c.mergeEvaluated.items(a,n.items,u.items));else{const t=a.var("items",o._`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(a,t,u.items,o.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,p)}`),m(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${u.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,p),(()=>m(t)),(()=>h(t)))}t.getValidate=l,t.callRef=d,t.default=u},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(89306),o=r(25173),s=r(76776),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:u}=e,{oneOf:l}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=a.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),p=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);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(c);let n=!0;for(let t=0;t<l.length;t++){let c=l[t];(null==c?void 0:c.$ref)&&!(0,s.schemaHasRulesButRef)(c,u.self.RULES)&&(c=o.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,null==c?void 0:c.$ref),c instanceof o.SchemaEnv&&(c=c.schema));const f=null===(e=null==c?void 0:c.properties)||void 0===e?void 0:e[d];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${d}"`);n=n&&(r||i(c)),a(f,t)}if(!n)throw new Error(`discriminator: "${d}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(d)}function a(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${d}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${d}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${p} === ${e}`),t.assign(f,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:p,tagName:d}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:p,tagName:d}))),e.ok(f)}};t.default=a},89306:(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"},93924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95684),i=r(62649),o=r(8200),s=r(39502),a=r(66167),c=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},89651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:c}=e,{opts:u,errSchemaPath:l,schemaEnv:d,self:f}=c;u.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:f.formats,code:u.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),c=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===u.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=d.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=f.formats[s];if(!o)return void function(){if(!1!==u.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}f.logger.warn(e())}();if(!0===o)return;const[a,c,p]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):u.code.formats?n._`${u.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${p}(${i})`}return"function"==typeof c?n._`${p}(${i})`:n._`${p}.test(${i})`}())}())}};t.default=i},39502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(89651).default];t.default=n},66167:(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"]},64693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(43510),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},30966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(43510),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:c,it:u}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=u.opts.loopEnum;let d;const f=()=>null!=d?d:d=(0,i.useFunc)(t,o.default);let p;if(l||s)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",c,(e=>t.if(n._`${f()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);p=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${f()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(p)}};t.default=s},62649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83983),i=r(90430),o=r(93229),s=r(74336),a=r(90498),c=r(33301),u=r(31687),l=r(82958),d=r(64693),f=r(30966),p=[n.default,i.default,o.default,s.default,a.default,c.default,u.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];t.default=p},31687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),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},93229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),o=r(74499),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,u=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${u} ${c} ${s}`)}};t.default=s},83983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},90498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),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},90430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${c}))`)}};t.default=i},74336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",u=r?i._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${u}.test(${t})`)}};t.default=o},33301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),o=r(76776),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:u}=e,{opts:l}=u;if(!c&&0===r.length)return;const d=r.length>=l.loopRequired;if(u.allErrors?function(){if(d||c)e.block$data(i.nil,f);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(u,t,u.opts.strictRequired)}}function f(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},82958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(50453),i=r(93487),o=r(76776),s=r(43510),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{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}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:u,schemaCode:l,it:d}=e;if(!a&&!c)return;const f=t.let("valid"),p=u.items?(0,n.getSchemaTypes)(u.items):[];function h(o,s){const a=t.name("item"),c=(0,n.checkDataTypes)(p,a,d.opts.strictNumbers,n.DataType.Wrong),u=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(c,i._`continue`),p.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${u}[${a}] == "number"`,(()=>{t.assign(s,i._`${u}[${a}]`),e.error(),t.assign(f,!1).break()})).code(i._`${u}[${a}] = ${o}`)}))}function m(n,a){const c=(0,o.useFunc)(t,s.default),u=t.name("outer");t.label(u).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(f,!1).break(u)}))))))}e.block$data(f,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(f,!0),t.if(i._`${n} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?h:m)(n,o)))}),i._`${l} === false`),e.ok(f)}};t.default=a},9996:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,r,c){(c=c||{}).arrayMerge=c.arrayMerge||i,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var u=Array.isArray(r);return u===Array.isArray(e)?u?c.arrayMerge(e,r,c):function(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&r.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a}(o,r)(e[o],t[o],r):i[o]=n(t[o],r))})),i}(e,r,c):n(r,c)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return a(e,r,t)}),{})};var c=a;e.exports=c},17187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=h(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},64063:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},49461:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,c,u,l,d){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var f in n(o,s,a,c,u,l,d),o){var p=o[f];if(Array.isArray(p)){if(f in t.arrayKeywords)for(var h=0;h<p.length;h++)r(e,n,i,p[h],s+"/"+f+"/"+h,a,s,f,o,h)}else if(f in t.propsKeywords){if(p&&"object"==typeof p)for(var m in p)r(e,n,i,p[m],s+"/"+f+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,f,o,m)}else(f in t.keywords||e.allKeys&&!(f in t.skipKeywords))&&r(e,n,i,p,s+"/"+f,a,s,f,o)}i(o,s,a,c,u,l,d)}}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}},18552:(e,t,r)=>{var n=r(10852)(r(55639),"DataView");e.exports=n},1989:(e,t,r)=>{var n=r(51789),i=r(80401),o=r(57667),s=r(21327),a=r(81866);function c(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])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},38407:(e,t,r)=>{var n=r(27040),i=r(14125),o=r(82117),s=r(67518),a=r(54705);function c(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])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},57071:(e,t,r)=>{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),i=r(11285),o=r(96e3),s=r(49916),a=r(95265);function c(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])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},53818:(e,t,r)=>{var n=r(10852)(r(55639),"Promise");e.exports=n},58525:(e,t,r)=>{var n=r(10852)(r(55639),"Set");e.exports=n},88668:(e,t,r)=>{var n=r(83369),i=r(90619),o=r(72385);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},46384:(e,t,r)=>{var n=r(38407),i=r(37465),o=r(63779),s=r(67599),a=r(44758),c=r(34309);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=c,e.exports=u},62705:(e,t,r)=>{var n=r(55639).Symbol;e.exports=n},11149:(e,t,r)=>{var n=r(55639).Uint8Array;e.exports=n},70577:(e,t,r)=>{var n=r(10852)(r(55639),"WeakMap");e.exports=n},96874:e=>{e.exports=function(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)}},77412:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},34963:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},14636:(e,t,r)=>{var n=r(22545),i=r(35694),o=r(1469),s=r(44144),a=r(65776),c=r(36719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),l=!r&&i(e),d=!r&&!l&&s(e),f=!r&&!l&&!d&&c(e),p=r||l||d||f,h=p?n(e.length,String):[],m=h.length;for(var g in e)!t&&!u.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||h.push(g);return h}},29932:e=>{e.exports=function(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}},62488:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},82908:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},34865:(e,t,r)=>{var n=r(89465),i=r(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},18470:(e,t,r)=>{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},44037:(e,t,r)=>{var n=r(98363),i=r(3674);e.exports=function(e,t){return e&&n(t,i(t),e)}},63886:(e,t,r)=>{var n=r(98363),i=r(81704);e.exports=function(e,t){return e&&n(t,i(t),e)}},89465:(e,t,r)=>{var n=r(38777);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},85990:(e,t,r)=>{var n=r(46384),i=r(77412),o=r(34865),s=r(44037),a=r(63886),c=r(64626),u=r(278),l=r(18805),d=r(1911),f=r(58234),p=r(46904),h=r(64160),m=r(43824),g=r(29148),y=r(38517),v=r(1469),b=r(44144),w=r(56688),S=r(13218),_=r(72928),C=r(3674),E=r(81704),$="[object Arguments]",P="[object Function]",T="[object Object]",R={};R[$]=R["[object Array]"]=R["[object ArrayBuffer]"]=R["[object DataView]"]=R["[object Boolean]"]=R["[object Date]"]=R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Map]"]=R["[object Number]"]=R[T]=R["[object RegExp]"]=R["[object Set]"]=R["[object String]"]=R["[object Symbol]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R["[object Error]"]=R[P]=R["[object WeakMap]"]=!1,e.exports=function e(t,r,O,k,I,A){var x,N=1&r,j=2&r,L=4&r;if(O&&(x=I?O(t,k,I,A):O(t)),void 0!==x)return x;if(!S(t))return t;var D=v(t);if(D){if(x=m(t),!N)return u(t,x)}else{var F=h(t),M=F==P||"[object GeneratorFunction]"==F;if(b(t))return c(t,N);if(F==T||F==$||M&&!I){if(x=j||M?{}:y(t),!N)return j?d(t,a(x,t)):l(t,s(x,t))}else{if(!R[F])return I?t:{};x=g(t,F,N)}}A||(A=new n);var W=A.get(t);if(W)return W;A.set(t,x),_(t)?t.forEach((function(n){x.add(e(n,r,O,n,t,A))})):w(t)&&t.forEach((function(n,i){x.set(i,e(n,r,O,i,t,A))}));var V=D?void 0:(L?j?p:f:j?E:C)(t);return i(V||t,(function(n,i){V&&(n=t[i=n]),o(x,i,e(n,r,O,i,t,A))})),x}},3118:(e,t,r)=>{var n=r(13218),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},21078:(e,t,r)=>{var n=r(62488),i=r(37285);e.exports=function e(t,r,o,s,a){var c=-1,u=t.length;for(o||(o=i),a||(a=[]);++c<u;){var l=t[c];r>0&&o(l)?r>1?e(l,r-1,o,s,a):n(a,l):s||(a[a.length]=l)}return a}},97786:(e,t,r)=>{var n=r(71811),i=r(40327);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},68866:(e,t,r)=>{var n=r(62488),i=r(1469);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},44239:(e,t,r)=>{var n=r(62705),i=r(89607),o=r(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},90939:(e,t,r)=>{var n=r(2492),i=r(37005);e.exports=function e(t,r,o,s,a){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,o,s,e,a))}},2492:(e,t,r)=>{var n=r(46384),i=r(67114),o=r(18351),s=r(16096),a=r(64160),c=r(1469),u=r(44144),l=r(36719),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,y){var v=c(e),b=c(t),w=v?f:a(e),S=b?f:a(t),_=(w=w==d?p:w)==p,C=(S=S==d?p:S)==p,E=w==S;if(E&&u(e)){if(!u(t))return!1;v=!0,_=!1}if(E&&!_)return y||(y=new n),v||l(e)?i(e,t,r,m,g,y):o(e,t,w,r,m,g,y);if(!(1&r)){var $=_&&h.call(e,"__wrapped__"),P=C&&h.call(t,"__wrapped__");if($||P){var T=$?e.value():e,R=P?t.value():t;return y||(y=new n),g(T,R,r,m,y)}}return!!E&&(y||(y=new n),s(e,t,r,m,g,y))}},25588:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},28458:(e,t,r)=>{var n=r(23560),i=r(15346),o=r(13218),s=r(80346),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:a).test(s(e))}},29221:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},38749:(e,t,r)=>{var n=r(44239),i=r(41780),o=r(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[n(e)]}},280:(e,t,r)=>{var n=r(25726),i=r(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},10313:(e,t,r)=>{var n=r(13218),i=r(25726),o=r(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},25970:(e,t,r)=>{var n=r(63012),i=r(79095);e.exports=function(e,t){return n(e,t,(function(t,r){return i(e,r)}))}},63012:(e,t,r)=>{var n=r(97786),i=r(10611),o=r(71811);e.exports=function(e,t,r){for(var s=-1,a=t.length,c={};++s<a;){var u=t[s],l=n(e,u);r(l,u)&&i(c,o(u,e),l)}return c}},10611:(e,t,r)=>{var n=r(34865),i=r(71811),o=r(65776),s=r(13218),a=r(40327);e.exports=function(e,t,r,c){if(!s(e))return e;for(var u=-1,l=(t=i(t,e)).length,d=l-1,f=e;null!=f&&++u<l;){var p=a(t[u]),h=r;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(u!=d){var m=f[p];void 0===(h=c?c(m,p,f):void 0)&&(h=s(m)?m:o(t[u+1])?[]:{})}n(f,p,h),f=f[p]}return e}},56560:(e,t,r)=>{var n=r(75703),i=r(38777),o=r(6557),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},80531:(e,t,r)=>{var n=r(62705),i=r(29932),o=r(1469),s=r(33448),a=n?n.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},27561:(e,t,r)=>{var n=r(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},74757:e=>{e.exports=function(e,t){return e.has(t)}},71811:(e,t,r)=>{var n=r(1469),i=r(15403),o=r(55514),s=r(79833);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(s(e))}},74318:(e,t,r)=>{var n=r(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},64626:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}},57157:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},93147:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},40419:(e,t,r)=>{var n=r(62705),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},77133:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},98363:(e,t,r)=>{var n=r(34865),i=r(89465);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,c=t.length;++a<c;){var u=t[a],l=o?o(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),s?i(r,u,l):n(r,u,l)}return r}},18805:(e,t,r)=>{var n=r(98363),i=r(99551);e.exports=function(e,t){return n(e,i(e),t)}},1911:(e,t,r)=>{var n=r(98363),i=r(51442);e.exports=function(e,t){return n(e,i(e),t)}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},38777:(e,t,r)=>{var n=r(10852),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},67114:(e,t,r)=>{var n=r(88668),i=r(82908),o=r(74757);e.exports=function(e,t,r,s,a,c){var u=1&r,l=e.length,d=t.length;if(l!=d&&!(u&&d>l))return!1;var f=c.get(e),p=c.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,g=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++h<l;){var y=e[h],v=t[h];if(s)var b=u?s(v,y,h,t,e,c):s(y,v,h,e,t,c);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!i(t,(function(e,t){if(!o(g,t)&&(y===e||a(y,e,r,s,c)))return g.push(t)}))){m=!1;break}}else if(y!==v&&!a(y,v,r,s,c)){m=!1;break}}return c.delete(e),c.delete(t),m}},18351:(e,t,r)=>{var n=r(62705),i=r(11149),o=r(77813),s=r(67114),a=r(68776),c=r(21814),u=n?n.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&n;if(p||(p=c),e.size!=t.size&&!h)return!1;var m=f.get(e);if(m)return m==t;n|=2,f.set(e,t);var g=s(p(e),p(t),n,u,d,f);return f.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},16096:(e,t,r)=>{var n=r(58234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var c=1&r,u=n(e),l=u.length;if(l!=n(t).length&&!c)return!1;for(var d=l;d--;){var f=u[d];if(!(c?f in t:i.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=c;++d<l;){var y=e[f=u[d]],v=t[f];if(o)var b=c?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(void 0===b?y===v||s(y,v,r,o,a):b)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var w=e.constructor,S=t.constructor;w==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}},99021:(e,t,r)=>{var n=r(85564),i=r(45357),o=r(30061);e.exports=function(e){return o(i(e,void 0,n),e+"")}},31957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},58234:(e,t,r)=>{var n=r(68866),i=r(99551),o=r(3674);e.exports=function(e){return n(e,o,i)}},46904:(e,t,r)=>{var n=r(68866),i=r(51442),o=r(81704);e.exports=function(e){return n(e,o,i)}},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),i=r(47801);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},85924:(e,t,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);e.exports=n},89607:(e,t,r)=>{var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},99551:(e,t,r)=>{var n=r(34963),i=r(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},51442:(e,t,r)=>{var n=r(62488),i=r(85924),o=r(99551),s=r(70479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s;e.exports=a},64160:(e,t,r)=>{var n=r(18552),i=r(57071),o=r(53818),s=r(58525),a=r(70577),c=r(44239),u=r(80346),l="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",m=u(n),g=u(i),y=u(o),v=u(s),b=u(a),w=c;(n&&w(new n(new ArrayBuffer(1)))!=h||i&&w(new i)!=l||o&&w(o.resolve())!=d||s&&w(new s)!=f||a&&w(new a)!=p)&&(w=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case m:return h;case g:return l;case y:return d;case v:return f;case b:return p}return t}),e.exports=w},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,r)=>{var n=r(71811),i=r(35694),o=r(1469),s=r(65776),a=r(41780),c=r(40327);e.exports=function(e,t,r){for(var u=-1,l=(t=n(t,e)).length,d=!1;++u<l;){var f=c(t[u]);if(!(d=null!=e&&r(e,f)))break;e=e[f]}return d||++u!=l?d:!!(l=null==e?0:e.length)&&a(l)&&s(f,l)&&(o(e)||i(e))}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},43824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},29148:(e,t,r)=>{var n=r(74318),i=r(57157),o=r(93147),s=r(40419),a=r(77133);e.exports=function(e,t,r){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},38517:(e,t,r)=>{var n=r(3118),i=r(85924),o=r(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},37285:(e,t,r)=>{var n=r(62705),i=r(35694),o=r(1469),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},15403:(e,t,r)=>{var n=r(1469),i=r(33448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,i=r(14429),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),i=r(38407),o=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},24523:(e,t,r)=>{var n=r(88306);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},86916:(e,t,r)=>{var n=r(5569)(Object.keys,Object);e.exports=n},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},31167:(e,t,r)=>{e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},45357:(e,t,r)=>{var n=r(96874),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),c=Array(a);++s<a;)c[s]=o[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=o[s];return u[t]=r(c),n(e,this,u)}}},55639:(e,t,r)=>{var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},30061:(e,t,r)=>{var n=r(56560),i=r(21275)(n);e.exports=i},21275:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},37465:(e,t,r)=>{var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,r)=>{var n=r(38407),i=r(57071),o=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},55514:(e,t,r)=>{var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=s},40327:(e,t,r)=>{var n=r(33448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},67990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},50361:(e,t,r)=>{var n=r(85990);e.exports=function(e){return n(e,5)}},75703:e=>{e.exports=function(e){return function(){return e}}},23279:(e,t,r)=>{var n=r(13218),i=r(7771),o=r(14841),s=Math.max,a=Math.min;e.exports=function(e,t,r){var c,u,l,d,f,p,h=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=c,n=u;return c=u=void 0,h=t,d=e.apply(n,r)}function b(e){return h=e,f=setTimeout(S,t),m?v(e):d}function w(e){var r=e-p;return void 0===p||r>=t||r<0||g&&e-h>=l}function S(){var e=i();if(w(e))return _(e);f=setTimeout(S,function(e){var r=t-(e-p);return g?a(r,l-(e-h)):r}(e))}function _(e){return f=void 0,y&&c?v(e):(c=u=void 0,d)}function C(){var e=i(),r=w(e);if(c=arguments,u=this,p=e,r){if(void 0===f)return b(p);if(g)return clearTimeout(f),f=setTimeout(S,t),v(p)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,n(r)&&(m=!!r.leading,l=(g="maxWait"in r)?s(o(r.maxWait)||0,t):l,y="trailing"in r?!!r.trailing:y),C.cancel=function(){void 0!==f&&clearTimeout(f),h=0,c=p=u=f=void 0},C.flush=function(){return void 0===f?d:_(i())},C}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},85564:(e,t,r)=>{var n=r(21078);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},27361:(e,t,r)=>{var n=r(97786);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},79095:(e,t,r)=>{var n=r(13),i=r(222);e.exports=function(e,t){return null!=e&&i(e,t,n)}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,r)=>{var n=r(9454),i=r(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,r)=>{var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44144:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=r(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;e.exports=c},18446:(e,t,r)=>{var n=r(90939);e.exports=function(e,t){return n(e,t)}},28368:(e,t,r)=>{var n=r(90939);e.exports=function(e,t,r){var i=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===i?n(e,t,void 0,r):!!i}},23560:(e,t,r)=>{var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56688:(e,t,r)=>{var n=r(25588),i=r(7518),o=r(31167),s=o&&o.isMap,a=s?i(s):n;e.exports=a},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},72928:(e,t,r)=>{var n=r(29221),i=r(7518),o=r(31167),s=o&&o.isSet,a=s?i(s):n;e.exports=a},33448:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},36719:(e,t,r)=>{var n=r(38749),i=r(7518),o=r(31167),s=o&&o.isTypedArray,a=s?i(s):n;e.exports=a},3674:(e,t,r)=>{var n=r(14636),i=r(280),o=r(98612);e.exports=function(e){return o(e)?n(e):i(e)}},81704:(e,t,r)=>{var n=r(14636),i=r(10313),o=r(98612);e.exports=function(e){return o(e)?n(e,!0):i(e)}},96486:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,l=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",S="[object GeneratorFunction]",_="[object Map]",C="[object Number]",E="[object Object]",$="[object Promise]",P="[object RegExp]",T="[object Set]",R="[object String]",O="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",A="[object DataView]",x="[object Float32Array]",N="[object Float64Array]",j="[object Int8Array]",L="[object Int16Array]",D="[object Int32Array]",F="[object Uint8Array]",M="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",U=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,G=RegExp(B.source),K=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\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",$e="["+Ee+"]",Pe="["+Se+"]",Te="\\d+",Re="["+_e+"]",Oe="[^\\ud800-\\udfff"+Ee+Te+"\\u2700-\\u27bf"+_e+Ce+"]",ke="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Ce+"]",je="(?:"+Re+"|"+Oe+")",Le="(?:"+Ne+"|"+Oe+")",De="(?:['’](?:d|ll|m|re|s|t|ve))?",Fe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me="(?:"+Pe+"|"+ke+")?",We="[\\ufe0e\\ufe0f]?",Ve=We+Me+"(?:\\u200d(?:"+[Ie,Ae,xe].join("|")+")"+We+Me+")*",Ue="(?:"+["[\\u2700-\\u27bf]",Ae,xe].join("|")+")"+Ve,ze="(?:"+[Ie+Pe+"?",Pe,Ae,xe,"[\\ud800-\\udfff]"].join("|")+")",qe=RegExp("['’]","g"),Be=RegExp(Pe,"g"),He=RegExp(ke+"(?="+ke+")|"+ze+Ve,"g"),Ge=RegExp([Ne+"?"+Re+"+"+De+"(?="+[$e,Ne,"$"].join("|")+")",Le+"+"+Fe+"(?="+[$e,Ne+je,"$"].join("|")+")",Ne+"?"+je+"+"+De,Ne+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ue].join("|"),"g"),Ke=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["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"],Je=-1,Ze={};Ze[x]=Ze[N]=Ze[j]=Ze[L]=Ze[D]=Ze[F]=Ze[M]=Ze[W]=Ze[V]=!0,Ze[m]=Ze[g]=Ze[I]=Ze[y]=Ze[A]=Ze[v]=Ze[b]=Ze[w]=Ze[_]=Ze[C]=Ze[E]=Ze[P]=Ze[T]=Ze[R]=Ze[k]=!1;var Xe={};Xe[m]=Xe[g]=Xe[I]=Xe[A]=Xe[y]=Xe[v]=Xe[x]=Xe[N]=Xe[j]=Xe[L]=Xe[D]=Xe[_]=Xe[C]=Xe[E]=Xe[P]=Xe[T]=Xe[R]=Xe[O]=Xe[F]=Xe[M]=Xe[W]=Xe[V]=!0,Xe[b]=Xe[w]=Xe[k]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=nt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ct=at&&at.exports===st,ut=ct&&nt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),dt=lt&<.isArrayBuffer,ft=lt&<.isDate,pt=lt&<.isMap,ht=lt&<.isRegExp,mt=lt&<.isSet,gt=lt&<.isTypedArray;function yt(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 vt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function bt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function wt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function St(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 _t(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&xt(e,t,0)>-1}function Et(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 $t(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 Pt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Tt(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 Rt(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 Ot(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 kt=Dt("length");function It(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function At(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 xt(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):At(e,jt,r)}function Nt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function jt(e){return e!=e}function Lt(e,t){var r=null==e?0:e.length;return r?Wt(e,t)/r:f}function Dt(e){return function(t){return null==t?i:t[e]}}function Ft(e){return function(t){return null==e?i:e[t]}}function Mt(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 s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Vt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ut(e){return e?e.slice(0,sr(e)+1).replace(ne,""):e}function zt(e){return function(t){return e(t)}}function qt(e,t){return $t(t,(function(t){return e[t]}))}function Bt(e,t){return e.has(t)}function Ht(e,t){for(var r=-1,n=e.length;++r<n&&xt(t,e[r],0)>-1;);return r}function Gt(e,t){for(var r=e.length;r--&&xt(t,e[r],0)>-1;);return r}function Kt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Qt=Ft({À:"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"}),Yt=Ft({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Zt(e){return Ke.test(e)}function Xt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function nr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function ir(e){return Zt(e)?function(e){for(var t=He.lastIndex=0;He.test(e);)++t;return t}(e):kt(e)}function or(e){return Zt(e)?function(e){return e.match(He)||[]}(e):function(e){return e.split("")}(e)}function sr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var ar=Ft({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cr=function e(t){var r,n=(t=null==t?ot:cr.defaults(ot.Object(),t,cr.pick(ot,Ye))).Array,ie=t.Date,Se=t.Error,_e=t.Function,Ce=t.Math,Ee=t.Object,$e=t.RegExp,Pe=t.String,Te=t.TypeError,Re=n.prototype,Oe=_e.prototype,ke=Ee.prototype,Ie=t["__core-js_shared__"],Ae=Oe.toString,xe=ke.hasOwnProperty,Ne=0,je=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Le=ke.toString,De=Ae.call(Ee),Fe=ot._,Me=$e("^"+Ae.call(xe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=ct?t.Buffer:i,Ve=t.Symbol,Ue=t.Uint8Array,ze=We?We.allocUnsafe:i,He=er(Ee.getPrototypeOf,Ee),Ke=Ee.create,et=ke.propertyIsEnumerable,nt=Re.splice,it=Ve?Ve.isConcatSpreadable:i,st=Ve?Ve.iterator:i,at=Ve?Ve.toStringTag:i,ut=function(){try{var e=uo(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,kt=ie&&ie.now!==ot.Date.now&&ie.now,Ft=t.setTimeout!==ot.setTimeout&&t.setTimeout,ur=Ce.ceil,lr=Ce.floor,dr=Ee.getOwnPropertySymbols,fr=We?We.isBuffer:i,pr=t.isFinite,hr=Re.join,mr=er(Ee.keys,Ee),gr=Ce.max,yr=Ce.min,vr=ie.now,br=t.parseInt,wr=Ce.random,Sr=Re.reverse,_r=uo(t,"DataView"),Cr=uo(t,"Map"),Er=uo(t,"Promise"),$r=uo(t,"Set"),Pr=uo(t,"WeakMap"),Tr=uo(Ee,"create"),Rr=Pr&&new Pr,Or={},kr=Mo(_r),Ir=Mo(Cr),Ar=Mo(Er),xr=Mo($r),Nr=Mo(Pr),jr=Ve?Ve.prototype:i,Lr=jr?jr.valueOf:i,Dr=jr?jr.toString:i;function Fr(e){if(ra(e)&&!Bs(e)&&!(e instanceof Ur)){if(e instanceof Vr)return e;if(xe.call(e,"__wrapped__"))return Wo(e)}return new Vr(e)}var Mr=function(){function e(){}return function(t){if(!ta(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Wr(){}function Vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.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.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Br;++t<r;)this.add(e[t])}function Gr(e){var t=this.__data__=new qr(e);this.size=t.size}function Kr(e,t){var r=Bs(e),n=!r&&qs(e),i=!r&&!n&&Qs(e),o=!r&&!n&&!i&&la(e),s=r||n||i||o,a=s?Vt(e.length,Pe):[],c=a.length;for(var u in e)!t&&!xe.call(e,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||yo(u,c))||a.push(u);return a}function Qr(e){var t=e.length;return t?e[Hn(0,t-1)]:i}function Yr(e,t){return No(Ti(e),sn(t,0,e.length))}function Jr(e){return No(Ti(e))}function Zr(e,t,r){(r!==i&&!Vs(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];xe.call(e,t)&&Vs(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(Vs(e[r][0],t))return r;return-1}function tn(e,t,r,n){return dn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ri(t,Aa(t),e)}function nn(e,t,r){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ta(e,t[r]);return s}function sn(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,s){var a,c=1&t,u=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var d=Bs(e);if(d){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&xe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Ti(e,a)}else{var f=po(e),p=f==w||f==S;if(Qs(e))return Si(e,c);if(f==E||f==m||p&&!o){if(a=u||p?{}:mo(e),!c)return u?function(e,t){return Ri(e,fo(e),t)}(e,function(e,t){return e&&Ri(t,xa(t),e)}(a,e)):function(e,t){return Ri(e,lo(e),t)}(e,rn(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case I:return _i(e);case y:case v:return new i(+e);case A:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case x:case N:case j:case L:case D:case F:case M:case W:case V:return Ci(e,r);case _:return new i;case C:case R:return new i(e);case P:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return n=e,Lr?Ee(Lr.call(n)):{}}}(e,f,c)}}s||(s=new Gr);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var g=d?i:(l?u?ro:to:u?xa:Aa)(e);return bt(g||e,(function(n,i){g&&(n=e[i=n]),Xr(a,i,an(n,t,r,i,e,s))})),a}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new Te(o);return ko((function(){e.apply(i,r)}),t)}function ln(e,t,r,n){var i=-1,o=Ct,s=!0,a=e.length,c=[],u=t.length;if(!a)return c;r&&(t=$t(t,zt(r))),n?(o=Et,s=!1):t.length>=200&&(o=Bt,s=!1,t=new Hr(t));e:for(;++i<a;){var l=e[i],d=null==r?l:r(l);if(l=n||0!==l?l:0,s&&d==d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else o(t,d,n)||c.push(l)}return c}Fr.templateSettings={escape:Q,evaluate:Y,interpolate:J,variable:"",imports:{_:Fr}},Fr.prototype=Wr.prototype,Fr.prototype.constructor=Fr,Vr.prototype=Mr(Wr.prototype),Vr.prototype.constructor=Vr,Ur.prototype=Mr(Wr.prototype),Ur.prototype.constructor=Ur,zr.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},zr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zr.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===s?i:r}return xe.call(t,e)?t[e]:i},zr.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==i:xe.call(t,e)},zr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===i?s:t,this},qr.prototype.clear=function(){this.__data__=[],this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():nt.call(t,r,1),--this.size,0))},qr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},qr.prototype.has=function(e){return en(this.__data__,e)>-1},qr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Br.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(Cr||qr),string:new zr}},Br.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Br.prototype.get=function(e){return ao(this,e).get(e)},Br.prototype.has=function(e){return ao(this,e).has(e)},Br.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},Hr.prototype.add=Hr.prototype.push=function(e){return this.__data__.set(e,s),this},Hr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new qr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof qr){var n=r.__data__;if(!Cr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Br(n)}return r.set(e,t),this.size=r.size,this};var dn=Ii(bn),fn=Ii(wn,!0);function pn(e,t){var r=!0;return dn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(c===i?a==a&&!ua(a):r(a,c)))var c=a,u=s}return u}function mn(e,t){var r=[];return dn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function gn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=go),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?gn(a,t-1,r,n,i):Pt(i,a):n||(i[i.length]=a)}return i}var yn=Ai(),vn=Ai(!0);function bn(e,t){return e&&yn(e,t,Aa)}function wn(e,t){return e&&vn(e,t,Aa)}function Sn(e,t){return _t(t,(function(t){return Zs(e[t])}))}function _n(e,t){for(var r=0,n=(t=yi(t,e)).length;null!=e&&r<n;)e=e[Fo(t[r++])];return r&&r==n?e:i}function Cn(e,t,r){var n=t(e);return Bs(e)?n:Pt(n,r(e))}function En(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ee(e)?function(e){var t=xe.call(e,at),r=e[at];try{e[at]=i;var n=!0}catch(e){}var o=Le.call(e);return n&&(t?e[at]=r:delete e[at]),o}(e):function(e){return Le.call(e)}(e)}function $n(e,t){return e>t}function Pn(e,t){return null!=e&&xe.call(e,t)}function Tn(e,t){return null!=e&&t in Ee(e)}function Rn(e,t,r){for(var o=r?Et:Ct,s=e[0].length,a=e.length,c=a,u=n(a),l=1/0,d=[];c--;){var f=e[c];c&&t&&(f=$t(f,zt(t))),l=yr(f.length,l),u[c]=!r&&(t||s>=120&&f.length>=120)?new Hr(c&&f):i}f=e[0];var p=-1,h=u[0];e:for(;++p<s&&d.length<l;){var m=f[p],g=t?t(m):m;if(m=r||0!==m?m:0,!(h?Bt(h,g):o(d,g,r))){for(c=a;--c;){var y=u[c];if(!(y?Bt(y,g):o(e[c],g,r)))continue e}h&&h.push(g),d.push(m)}}return d}function On(e,t,r){var n=null==(e=Po(e,t=yi(t,e)))?e:e[Fo(Jo(t))];return null==n?i:yt(n,e,r)}function kn(e){return ra(e)&&En(e)==m}function In(e,t,r,n,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Bs(e),c=Bs(t),u=a?g:po(e),l=c?g:po(t),d=(u=u==m?E:u)==E,f=(l=l==m?E:l)==E,p=u==l;if(p&&Qs(e)){if(!Qs(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Gr),a||la(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case y:case v:case C:return Vs(+e,+t);case b:return e.name==t.name&&e.message==t.message;case P:case R:return e==t+"";case _:var a=Xt;case T:var c=1&n;if(a||(a=rr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=Xi(a(e),a(t),n,i,o,s);return s.delete(e),l;case O:if(Lr)return Lr.call(e)==Lr.call(t)}return!1}(e,t,u,r,n,o,s);if(!(1&r)){var h=d&&xe.call(e,"__wrapped__"),w=f&&xe.call(t,"__wrapped__");if(h||w){var S=h?e.value():e,$=w?t.value():t;return s||(s=new Gr),o(S,$,r,n,s)}}return!!p&&(s||(s=new Gr),function(e,t,r,n,o,s){var a=1&r,c=to(e),u=c.length;if(u!=to(t).length&&!a)return!1;for(var l=u;l--;){var d=c[l];if(!(a?d in t:xe.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var m=a;++l<u;){var g=e[d=c[l]],y=t[d];if(n)var v=a?n(y,g,d,t,e,s):n(g,y,d,e,t,s);if(!(v===i?g===y||o(g,y,r,n,s):v)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,In,o))}function An(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var c=r[o];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<s;){var u=(c=r[o])[0],l=e[u],d=c[1];if(a&&c[2]){if(l===i&&!(u in e))return!1}else{var f=new Gr;if(n)var p=n(l,d,u,e,t,f);if(!(p===i?In(d,l,3,n,f):p))return!1}}return!0}function xn(e){return!(!ta(e)||(t=e,je&&je in t))&&(Zs(e)?Me:me).test(Mo(e));var t}function Nn(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?Bs(e)?Mn(e[0],e[1]):Fn(e):pc(e)}function jn(e){if(!_o(e))return mr(e);var t=[];for(var r in Ee(e))xe.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Ln(e,t){return e<t}function Dn(e,t){var r=-1,i=Gs(e)?n(e.length):[];return dn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Fn(e){var t=co(e);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===e||An(r,e,t)}}function Mn(e,t){return bo(e)&&Co(t)?Eo(Fo(e),t):function(r){var n=Ta(r,e);return n===i&&n===t?Ra(r,e):In(t,n,3)}}function Wn(e,t,r,n,o){e!==t&&yn(t,(function(s,a){if(o||(o=new Gr),ta(s))!function(e,t,r,n,o,s,a){var c=Ro(e,r),u=Ro(t,r),l=a.get(u);if(l)Zr(e,r,l);else{var d=s?s(c,u,r+"",e,t,a):i,f=d===i;if(f){var p=Bs(u),h=!p&&Qs(u),m=!p&&!h&&la(u);d=u,p||h||m?Bs(c)?d=c:Ks(c)?d=Ti(c):h?(f=!1,d=Si(u,!0)):m?(f=!1,d=Ci(u,!0)):d=[]:oa(u)||qs(u)?(d=c,qs(c)?d=va(c):ta(c)&&!Zs(c)||(d=mo(u))):f=!1}f&&(a.set(u,d),o(d,u,n,s,a),a.delete(u)),Zr(e,r,d)}}(e,t,a,r,Wn,n,o);else{var c=n?n(Ro(e,a),s,a+"",e,t,o):i;c===i&&(c=s),Zr(e,a,c)}}),xa)}function Vn(e,t){var r=e.length;if(r)return yo(t+=t<0?r:0,r)?e[t]:i}function Un(e,t,r){t=t.length?$t(t,(function(e){return Bs(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e})):[ic];var n=-1;t=$t(t,zt(so()));var i=Dn(e,(function(e,r,i){var o=$t(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var c=Ei(i[n],o[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function zn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=_n(e,s);r(a,s)&&Jn(o,yi(s,e),a)}return o}function qn(e,t,r,n){var i=n?Nt:xt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),r&&(a=$t(e,zt(r)));++o<s;)for(var c=0,u=t[o],l=r?r(u):u;(c=i(a,l,c,n))>-1;)a!==e&&nt.call(a,c,1),nt.call(e,c,1);return e}function Bn(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;yo(i)?nt.call(e,i,1):ui(e,i)}}return e}function Hn(e,t){return e+lr(wr()*(t-e+1))}function Gn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=lr(t/2))&&(e+=e)}while(t);return r}function Kn(e,t){return Io($o(e,t,ic),e+"")}function Qn(e){return Qr(Va(e))}function Yn(e,t){var r=Va(e);return No(r,sn(t,0,r.length))}function Jn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=yi(t,e)).length,a=s-1,c=e;null!=c&&++o<s;){var u=Fo(t[o]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var d=c[u];(l=n?n(d,u,c):i)===i&&(l=ta(d)?d:yo(t[o+1])?[]:{})}Xr(c,u,l),c=c[u]}return e}var Zn=Rr?function(e,t){return Rr.set(e,t),e}:ic,Xn=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:ic;function ei(e){return No(Va(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ri(e,t){var r;return dn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!ua(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ii(e,t,ic,r)}function ii(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,c=null===t,u=ua(t),l=t===i;o<s;){var d=lr((o+s)/2),f=r(e[d]),p=f!==i,h=null===f,m=f==f,g=ua(f);if(a)var y=n||m;else y=l?m&&(n||p):c?m&&p&&(n||!h):u?m&&p&&!h&&(n||!g):!h&&!g&&(n?f<=t:f<t);y?o=d+1:s=d}return yr(s,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Vs(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:ua(e)?f:+e}function ai(e){if("string"==typeof e)return e;if(Bs(e))return $t(e,ai)+"";if(ua(e))return Dr?Dr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,r){var n=-1,i=Ct,o=e.length,s=!0,a=[],c=a;if(r)s=!1,i=Et;else if(o>=200){var u=t?null:Gi(e);if(u)return rr(u);s=!1,i=Bt,c=new Hr}else c=t?[]:a;e:for(;++n<o;){var l=e[n],d=t?t(l):l;if(l=r||0!==l?l:0,s&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),a.push(l)}else i(c,d,r)||(c!==a&&c.push(d),a.push(l))}return a}function ui(e,t){return null==(e=Po(e,t=yi(t,e)))||delete e[Fo(Jo(t))]}function li(e,t,r,n){return Jn(e,t,r(_n(e,t)),n)}function di(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Ur&&(r=r.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))}),r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ci(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],c=-1;++c<i;)c!=o&&(s[o]=ln(s[o]||a,e[c],t,r));return ci(gn(s,1),t,r)}function hi(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var c=n<s?t[n]:i;r(a,e[n],c)}return a}function mi(e){return Ks(e)?e:[]}function gi(e){return"function"==typeof e?e:ic}function yi(e,t){return Bs(e)?e:bo(e,t)?[e]:Do(ba(e))}var vi=Kn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var wi=lt||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=ze?ze(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ci(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=ua(e),a=t!==i,c=null===t,u=t==t,l=ua(t);if(!c&&!l&&!s&&e>t||s&&a&&u&&!c&&!l||n&&a&&u||!r&&u||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function $i(e,t,r,i){for(var o=-1,s=e.length,a=r.length,c=-1,u=t.length,l=gr(s-a,0),d=n(u+l),f=!i;++c<u;)d[c]=t[c];for(;++o<a;)(f||o<s)&&(d[r[o]]=e[o]);for(;l--;)d[c++]=e[o++];return d}function Pi(e,t,r,i){for(var o=-1,s=e.length,a=-1,c=r.length,u=-1,l=t.length,d=gr(s-c,0),f=n(d+l),p=!i;++o<d;)f[o]=e[o];for(var h=o;++u<l;)f[h+u]=t[u];for(;++a<c;)(p||o<s)&&(f[h+r[a]]=e[o++]);return f}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ri(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var c=t[s],u=n?n(r[c],e[c],c,r,e):i;u===i&&(u=e[c]),o?nn(r,c,u):Xr(r,c,u)}return r}function Oi(e,t){return function(r,n){var i=Bs(r)?vt:tn,o=t?t():{};return i(r,e,so(n,2),o)}}function ki(e){return Kn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var c=r[n];c&&e(t,c,n,s)}return t}))}function Ii(e,t){return function(r,n){if(null==r)return r;if(!Gs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ai(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===r(o[c],c,o))break}return t}}function xi(e){return function(t){var r=Zt(t=ba(t))?or(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 Tt(Za(qa(t).replace(qe,"")),e,"")}}function ji(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=Mr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Li(e){return function(t,r,n){var o=Ee(t);if(!Gs(t)){var s=so(r,3);t=Aa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Di(e){return eo((function(t){var r=t.length,n=r,s=Vr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Te(o);if(s&&!c&&"wrapper"==io(a))var c=new Vr([],!0)}for(n=c?n:r;++n<r;){var u=io(a=t[n]),l="wrapper"==u?no(a):i;c=l&&wo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[io(l[0])].apply(c,l[3]):1==a.length&&wo(a)?c[u]():c.thru(a)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Bs(n))return c.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,s,a,c,l,d,f){var p=t&u,h=1&t,m=2&t,g=24&t,y=512&t,v=m?i:ji(e);return function i(){for(var u=arguments.length,b=n(u),w=u;w--;)b[w]=arguments[w];if(g)var S=oo(i),_=Kt(b,S);if(o&&(b=$i(b,o,s,g)),a&&(b=Pi(b,a,c,g)),u-=_,g&&u<f){var C=tr(b,S);return Bi(e,t,Fi,i.placeholder,r,b,C,l,d,f-u)}var E=h?r:this,$=m?E[e]:e;return u=b.length,l?b=To(b,l):y&&u>1&&b.reverse(),p&&d<u&&(b.length=d),this&&this!==ot&&this instanceof i&&($=v||ji($)),$.apply(E,b)}}function Mi(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 Wi(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=si(r),n=si(n)),o=e(r,n)}return o}}function Vi(e){return eo((function(t){return t=$t(t,zt(so())),Kn((function(r){var n=this;return e(t,(function(e){return yt(e,n,r)}))}))}))}function Ui(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?Gn(t,e):t;var n=Gn(t,ur(e/ir(t)));return Zt(t)?bi(or(n),0,e).join(""):n.slice(0,e)}function zi(e){return function(t,r,o){return o&&"number"!=typeof o&&vo(t,r,o)&&(r=o=i),t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r,i){for(var o=-1,s=gr(ur((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:ha(o),e)}}function qi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Bi(e,t,r,n,o,s,a,u,l,d){var f=8&t;t|=f?c:64,4&(t&=~(f?64:c))||(t&=-4);var p=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,u,l,d],h=r.apply(i,p);return wo(e)&&Oo(h,p),h.placeholder=n,Ao(h,e,t)}function Hi(e){var t=Ce[e];return function(e,r){if(e=ya(e),(r=null==r?0:yr(ma(r),292))&&pr(e)){var n=(ba(e)+"e").split("e");return+((n=(ba(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Gi=$r&&1/rr(new $r([,-0]))[1]==l?function(e){return new $r(e)}:uc;function Ki(e){return function(t){var r=po(t);return r==_?Xt(t):r==T?nr(t):function(e,t){return $t(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,r,s,l,d,f,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var m=s?s.length:0;if(m||(t&=-97,s=l=i),f=f===i?f:gr(ma(f),0),p=p===i?p:ma(p),m-=l?l.length:0,64&t){var g=s,y=l;s=l=i}var v=h?i:no(e),b=[e,t,r,s,l,g,y,d,f,p];if(v&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==u&&8==r||n==u&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?$i(l,c,t[4]):c,e[4]=l?tr(e[3],a):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Pi(l,c,t[6]):c,e[6]=l?tr(e[5],a):t[6]),(c=t[7])&&(e[7]=c),n&u&&(e[8]=null==e[8]?t[8]:yr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,v),e=b[0],t=b[1],r=b[2],s=b[3],l=b[4],!(p=b[9]=b[9]===i?h?0:e.length:gr(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var o=ji(e);return function s(){for(var a=arguments.length,c=n(a),u=a,l=oo(s);u--;)c[u]=arguments[u];var d=a<3&&c[0]!==l&&c[a-1]!==l?[]:tr(c,l);return(a-=d.length)<r?Bi(e,t,Fi,s.placeholder,i,c,d,i,i,r-a):yt(this&&this!==ot&&this instanceof s?o:e,this,c)}}(e,t,p):t!=c&&33!=t||l.length?Fi.apply(i,b):function(e,t,r,i){var o=1&t,s=ji(e);return function t(){for(var a=-1,c=arguments.length,u=-1,l=i.length,d=n(l+c),f=this&&this!==ot&&this instanceof t?s:e;++u<l;)d[u]=i[u];for(;c--;)d[u++]=arguments[++a];return yt(f,o?r:this,d)}}(e,t,r,s);else var w=function(e,t,r){var n=1&t,i=ji(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Ao((v?Zn:Oo)(w,b),e,t)}function Yi(e,t,r,n){return e===i||Vs(e,ke[r])&&!xe.call(n,r)?t:e}function Ji(e,t,r,n,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Wn(e,t,i,Ji,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var l=s.get(e),d=s.get(t);if(l&&d)return l==t&&d==e;var f=-1,p=!0,h=2&r?new Hr:i;for(s.set(e,t),s.set(t,e);++f<c;){var m=e[f],g=t[f];if(n)var y=a?n(g,m,f,t,e,s):n(m,g,f,e,t,s);if(y!==i){if(y)continue;p=!1;break}if(h){if(!Ot(t,(function(e,t){if(!Bt(h,t)&&(m===e||o(m,e,r,n,s)))return h.push(t)}))){p=!1;break}}else if(m!==g&&!o(m,g,r,n,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return Io($o(e,i,Ho),e+"")}function to(e){return Cn(e,Aa,lo)}function ro(e){return Cn(e,xa,fo)}var no=Rr?function(e){return Rr.get(e)}:uc;function io(e){for(var t=e.name+"",r=Or[t],n=xe.call(Or,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(xe.call(Fr,"placeholder")?Fr:e).placeholder}function so(){var e=Fr.iteratee||oc;return e=e===oc?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 co(e){for(var t=Aa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Co(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return xn(r)?r:i}var lo=dr?function(e){return null==e?[]:(e=Ee(e),_t(dr(e),(function(t){return et.call(e,t)})))}:gc,fo=dr?function(e){for(var t=[];e;)Pt(t,lo(e)),e=He(e);return t}:gc,po=En;function ho(e,t,r){for(var n=-1,i=(t=yi(t,e)).length,o=!1;++n<i;){var s=Fo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&yo(s,i)&&(Bs(e)||qs(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Mr(He(e))}function go(e){return Bs(e)||qs(e)||!!(it&&e&&e[it])}function yo(e,t){var r=typeof e;return!!(t=null==t?d:t)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?Gs(r)&&yo(t,r.length):"string"==n&&t in r)&&Vs(r[t],e)}function bo(e,t){if(Bs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ua(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function wo(e){var t=io(e),r=Fr[t];if("function"!=typeof r||!(t in Ur.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(_r&&po(new _r(new ArrayBuffer(1)))!=A||Cr&&po(new Cr)!=_||Er&&po(Er.resolve())!=$||$r&&po(new $r)!=T||Pr&&po(new Pr)!=k)&&(po=function(e){var t=En(e),r=t==E?e.constructor:i,n=r?Mo(r):"";if(n)switch(n){case kr:return A;case Ir:return _;case Ar:return $;case xr:return T;case Nr:return k}return t});var So=Ie?Zs:yc;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function Co(e){return e==e&&!ta(e)}function Eo(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function $o(e,t,r){return t=gr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=gr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var c=n(t+1);++o<t;)c[o]=i[o];return c[t]=r(a),yt(e,this,c)}}function Po(e,t){return t.length<2?e:_n(e,ti(t,0,-1))}function To(e,t){for(var r=e.length,n=yr(t.length,r),o=Ti(e);n--;){var s=t[n];e[n]=yo(s,r)?o[s]:i}return e}function Ro(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=xo(Zn),ko=Ft||function(e,t){return ot.setTimeout(e,t)},Io=xo(Xn);function Ao(e,t,r){var n=t+"";return Io(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 bt(h,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function xo(e){var t=0,r=0;return function(){var n=vr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function No(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Hn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var jo,Lo,Do=(jo=js((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===Lo.size&&Lo.clear(),e})),Lo=jo.cache,jo);function Fo(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wo(e){if(e instanceof Ur)return e.clone();var t=new Vr(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Kn((function(e,t){return Ks(e)?ln(e,gn(t,1,Ks,!0)):[]})),Uo=Kn((function(e,t){var r=Jo(t);return Ks(r)&&(r=i),Ks(e)?ln(e,gn(t,1,Ks,!0),so(r,2)):[]})),zo=Kn((function(e,t){var r=Jo(t);return Ks(r)&&(r=i),Ks(e)?ln(e,gn(t,1,Ks,!0),i,r):[]}));function qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ma(r);return i<0&&(i=gr(n+i,0)),At(e,so(t,3),i)}function Bo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ma(r),o=r<0?gr(n+o,0):yr(o,n-1)),At(e,so(t,3),o,!0)}function Ho(e){return null!=e&&e.length?gn(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Ko=Kn((function(e){var t=$t(e,mi);return t.length&&t[0]===e[0]?Rn(t):[]})),Qo=Kn((function(e){var t=Jo(e),r=$t(e,mi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Rn(r,so(t,2)):[]})),Yo=Kn((function(e){var t=Jo(e),r=$t(e,mi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Rn(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Kn(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?qn(e,t):e}var es=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return Bn(e,$t(t,(function(e){return yo(e,r)?+e:e})).sort(Ei)),n}));function ts(e){return null==e?e:Sr.call(e)}var rs=Kn((function(e){return ci(gn(e,1,Ks,!0))})),ns=Kn((function(e){var t=Jo(e);return Ks(t)&&(t=i),ci(gn(e,1,Ks,!0),so(t,2))})),is=Kn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ci(gn(e,1,Ks,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(Ks(e))return t=gr(e.length,t),!0})),Vt(t,(function(t){return $t(e,Dt(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:$t(r,(function(e){return yt(t,i,e)}))}var as=Kn((function(e,t){return Ks(e)?ln(e,t):[]})),cs=Kn((function(e){return pi(_t(e,Ks))})),us=Kn((function(e){var t=Jo(e);return Ks(t)&&(t=i),pi(_t(e,Ks),so(t,2))})),ls=Kn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,pi(_t(e,Ks),i,t)})),ds=Kn(os),fs=Kn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function ps(e){var t=Fr(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ms=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&yo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Vr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),gs=Oi((function(e,t,r){xe.call(e,r)?++e[r]:nn(e,r,1)})),ys=Li(qo),vs=Li(Bo);function bs(e,t){return(Bs(e)?bt:dn)(e,so(t,3))}function ws(e,t){return(Bs(e)?wt:fn)(e,so(t,3))}var Ss=Oi((function(e,t,r){xe.call(e,r)?e[r].push(t):nn(e,r,[t])})),_s=Kn((function(e,t,r){var i=-1,o="function"==typeof t,s=Gs(e)?n(e.length):[];return dn(e,(function(e){s[++i]=o?yt(t,e,r):On(e,t,r)})),s})),Cs=Oi((function(e,t,r){nn(e,r,t)}));function Es(e,t){return(Bs(e)?$t:Dn)(e,so(t,3))}var $s=Oi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ps=Kn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&vo(e,t[0],t[1])?t=[]:r>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,gn(t,1),[])})),Ts=kt||function(){return ot.Date.now()};function Rs(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Qi(e,u,i,i,i,i,t)}function Os(e,t){var r;if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var ks=Kn((function(e,t,r){var n=1;if(r.length){var i=tr(r,oo(ks));n|=c}return Qi(e,n,t,r,i)})),Is=Kn((function(e,t,r){var n=3;if(r.length){var i=tr(r,oo(Is));n|=c}return Qi(t,n,e,r,i)}));function As(e,t,r){var n,s,a,c,u,l,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function m(t){var r=n,o=s;return n=s=i,d=t,c=e.apply(o,r)}function g(e){return d=e,u=ko(v,t),f?m(e):c}function y(e){var r=e-l;return l===i||r>=t||r<0||p&&e-d>=a}function v(){var e=Ts();if(y(e))return b(e);u=ko(v,function(e){var r=t-(e-l);return p?yr(r,a-(e-d)):r}(e))}function b(e){return u=i,h&&n?m(e):(n=s=i,c)}function w(){var e=Ts(),r=y(e);if(n=arguments,s=this,l=e,r){if(u===i)return g(l);if(p)return wi(u),u=ko(v,t),m(l)}return u===i&&(u=ko(v,t)),c}return t=ya(t)||0,ta(r)&&(f=!!r.leading,a=(p="maxWait"in r)?gr(ya(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),w.cancel=function(){u!==i&&wi(u),d=0,n=l=s=u=i},w.flush=function(){return u===i?c:b(Ts())},w}var xs=Kn((function(e,t){return un(e,1,t)})),Ns=Kn((function(e,t,r){return un(e,ya(t)||0,r)}));function js(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 s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(js.Cache||Br),r}function Ls(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)}}js.Cache=Br;var Ds=vi((function(e,t){var r=(t=1==t.length&&Bs(t[0])?$t(t[0],zt(so())):$t(gn(t,1),zt(so()))).length;return Kn((function(n){for(var i=-1,o=yr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return yt(e,this,n)}))})),Fs=Kn((function(e,t){var r=tr(t,oo(Fs));return Qi(e,c,i,t,r)})),Ms=Kn((function(e,t){var r=tr(t,oo(Ms));return Qi(e,64,i,t,r)})),Ws=eo((function(e,t){return Qi(e,256,i,i,i,t)}));function Vs(e,t){return e===t||e!=e&&t!=t}var Us=qi($n),zs=qi((function(e,t){return e>=t})),qs=kn(function(){return arguments}())?kn:function(e){return ra(e)&&xe.call(e,"callee")&&!et.call(e,"callee")},Bs=n.isArray,Hs=dt?zt(dt):function(e){return ra(e)&&En(e)==I};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ks(e){return ra(e)&&Gs(e)}var Qs=fr||yc,Ys=ft?zt(ft):function(e){return ra(e)&&En(e)==v};function Js(e){if(!ra(e))return!1;var t=En(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=En(e);return t==w||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=pt?zt(pt):function(e){return ra(e)&&po(e)==_};function ia(e){return"number"==typeof e||ra(e)&&En(e)==C}function oa(e){if(!ra(e)||En(e)!=E)return!1;var t=He(e);if(null===t)return!0;var r=xe.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ae.call(r)==De}var sa=ht?zt(ht):function(e){return ra(e)&&En(e)==P},aa=mt?zt(mt):function(e){return ra(e)&&po(e)==T};function ca(e){return"string"==typeof e||!Bs(e)&&ra(e)&&En(e)==R}function ua(e){return"symbol"==typeof e||ra(e)&&En(e)==O}var la=gt?zt(gt):function(e){return ra(e)&&ea(e.length)&&!!Ze[En(e)]},da=qi(Ln),fa=qi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Gs(e))return ca(e)?or(e):Ti(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=po(e);return(t==_?Xt:t==T?rr:Va)(e)}function ha(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function ga(e){return e?sn(ma(e),0,p):0}function ya(e){if("number"==typeof e)return e;if(ua(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var r=he.test(e);return r||ge.test(e)?rt(e.slice(2),r?2:8):pe.test(e)?f:+e}function va(e){return Ri(e,xa(e))}function ba(e){return null==e?"":ai(e)}var wa=ki((function(e,t){if(_o(t)||Gs(t))Ri(t,Aa(t),e);else for(var r in t)xe.call(t,r)&&Xr(e,r,t[r])})),Sa=ki((function(e,t){Ri(t,xa(t),e)})),_a=ki((function(e,t,r,n){Ri(t,xa(t),e,n)})),Ca=ki((function(e,t,r,n){Ri(t,Aa(t),e,n)})),Ea=eo(on),$a=Kn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=xa(s),c=-1,u=a.length;++c<u;){var l=a[c],d=e[l];(d===i||Vs(d,ke[l])&&!xe.call(e,l))&&(e[l]=s[l])}return e})),Pa=Kn((function(e){return e.push(i,Ji),yt(ja,i,e)}));function Ta(e,t,r){var n=null==e?i:_n(e,t);return n===i?r:n}function Ra(e,t){return null!=e&&ho(e,t,Tn)}var Oa=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=r}),tc(ic)),ka=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),xe.call(e,t)?e[t].push(r):e[t]=[r]}),so),Ia=Kn(On);function Aa(e){return Gs(e)?Kr(e):jn(e)}function xa(e){return Gs(e)?Kr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=_o(e),r=[];for(var n in e)("constructor"!=n||!t&&xe.call(e,n))&&r.push(n);return r}(e)}var Na=ki((function(e,t,r){Wn(e,t,r)})),ja=ki((function(e,t,r,n){Wn(e,t,r,n)})),La=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=$t(t,(function(t){return t=yi(t,e),n||(n=t.length>1),t})),Ri(e,ro(e),r),n&&(r=an(r,7,Zi));for(var i=t.length;i--;)ui(r,t[i]);return r})),Da=eo((function(e,t){return null==e?{}:function(e,t){return zn(e,t,(function(t,r){return Ra(e,r)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var r=$t(ro(e),(function(e){return[e]}));return t=so(t),zn(e,r,(function(e,r){return t(e,r[0])}))}var Ma=Ki(Aa),Wa=Ki(xa);function Va(e){return null==e?[]:qt(e,Aa(e))}var Ua=Ni((function(e,t,r){return t=t.toLowerCase(),e+(r?za(t):t)}));function za(e){return Ja(ba(e).toLowerCase())}function qa(e){return(e=ba(e))&&e.replace(ve,Qt).replace(Be,"")}var Ba=Ni((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ha=Ni((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ga=xi("toLowerCase"),Ka=Ni((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Qa=Ni((function(e,t,r){return e+(r?" ":"")+Ja(t)})),Ya=Ni((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=xi("toUpperCase");function Za(e,t,r){return e=ba(e),(t=r?i:t)===i?function(e){return Qe.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xa=Kn((function(e,t){try{return yt(e,i,t)}catch(e){return Js(e)?e:new Se(e)}})),ec=eo((function(e,t){return bt(t,(function(t){t=Fo(t),nn(e,t,ks(e[t],e))})),e}));function tc(e){return function(){return e}}var rc=Di(),nc=Di(!0);function ic(e){return e}function oc(e){return Nn("function"==typeof e?e:an(e,1))}var sc=Kn((function(e,t){return function(r){return On(r,e,t)}})),ac=Kn((function(e,t){return function(r){return On(e,r,t)}}));function cc(e,t,r){var n=Aa(t),i=Sn(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Sn(t,Aa(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return bt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Ti(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Pt([this.value()],arguments))})})),e}function uc(){}var lc=Vi($t),dc=Vi(St),fc=Vi(Ot);function pc(e){return bo(e)?Dt(Fo(e)):function(e){return function(t){return _n(t,e)}}(e)}var hc=zi(),mc=zi(!0);function gc(){return[]}function yc(){return!1}var vc,bc=Wi((function(e,t){return e+t}),0),wc=Hi("ceil"),Sc=Wi((function(e,t){return e/t}),1),_c=Hi("floor"),Cc=Wi((function(e,t){return e*t}),1),Ec=Hi("round"),$c=Wi((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Rs,Fr.assign=wa,Fr.assignIn=Sa,Fr.assignInWith=_a,Fr.assignWith=Ca,Fr.at=Ea,Fr.before=Os,Fr.bind=ks,Fr.bindAll=ec,Fr.bindKey=Is,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Bs(e)?e:[e]},Fr.chain=ps,Fr.chunk=function(e,t,r){t=(r?vo(e,t,r):t===i)?1:gr(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,c=n(ur(o/t));s<o;)c[a++]=ti(e,s,s+=t);return c},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 Pt(Bs(r)?Ti(r):[r],gn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?$t(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[r(e[0]),e[1]]})):[],Kn((function(r){for(var n=-1;++n<t;){var i=e[n];if(yt(i[0],this,r))return yt(i[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=Aa(e);return function(r){return cn(r,e,t)}}(an(e,1))},Fr.constant=tc,Fr.countBy=gs,Fr.create=function(e,t){var r=Mr(e);return null==t?r:rn(r,t)},Fr.curry=function e(t,r,n){var o=Qi(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=Qi(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.debounce=As,Fr.defaults=$a,Fr.defaultsDeep=Pa,Fr.defer=xs,Fr.delay=Ns,Fr.difference=Vo,Fr.differenceBy=Uo,Fr.differenceWith=zo,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ma(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ma(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},Fr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&vo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ma(n))<0&&(n+=o),n=r>n?0:ga(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Bs(e)?_t:mn)(e,so(t,3))},Fr.flatMap=function(e,t){return gn(Es(e,t),1)},Fr.flatMapDeep=function(e,t){return gn(Es(e,t),l)},Fr.flatMapDepth=function(e,t,r){return r=r===i?1:ma(r),gn(Es(e,t),r)},Fr.flatten=Ho,Fr.flattenDeep=function(e){return null!=e&&e.length?gn(e,l):[]},Fr.flattenDepth=function(e,t){return null!=e&&e.length?gn(e,t=t===i?1:ma(t)):[]},Fr.flip=function(e){return Qi(e,512)},Fr.flow=rc,Fr.flowRight=nc,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?[]:Sn(e,Aa(e))},Fr.functionsIn=function(e){return null==e?[]:Sn(e,xa(e))},Fr.groupBy=Ss,Fr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Fr.intersection=Ko,Fr.intersectionBy=Qo,Fr.intersectionWith=Yo,Fr.invert=Oa,Fr.invertBy=ka,Fr.invokeMap=_s,Fr.iteratee=oc,Fr.keyBy=Cs,Fr.keys=Aa,Fr.keysIn=xa,Fr.map=Es,Fr.mapKeys=function(e,t){var r={};return t=so(t,3),bn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=so(t,3),bn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},Fr.matches=function(e){return Fn(an(e,1))},Fr.matchesProperty=function(e,t){return Mn(e,an(t,1))},Fr.memoize=js,Fr.merge=Na,Fr.mergeWith=ja,Fr.method=sc,Fr.methodOf=ac,Fr.mixin=cc,Fr.negate=Ls,Fr.nthArg=function(e){return e=ma(e),Kn((function(t){return Vn(t,e)}))},Fr.omit=La,Fr.omitBy=function(e,t){return Fa(e,Ls(so(t)))},Fr.once=function(e){return Os(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Bs(t)||(t=null==t?[]:[t]),Bs(r=n?i:r)||(r=null==r?[]:[r]),Un(e,t,r))},Fr.over=lc,Fr.overArgs=Ds,Fr.overEvery=dc,Fr.overSome=fc,Fr.partial=Fs,Fr.partialRight=Ms,Fr.partition=$s,Fr.pick=Da,Fr.pickBy=Fa,Fr.property=pc,Fr.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},Fr.pull=Zo,Fr.pullAll=Xo,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?qn(e,t,so(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?qn(e,t,i,r):e},Fr.pullAt=es,Fr.range=hc,Fr.rangeRight=mc,Fr.rearg=Ws,Fr.reject=function(e,t){return(Bs(e)?_t:mn)(e,Ls(so(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Bn(e,i),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Kn(e,t=t===i?t:ma(t))},Fr.reverse=ts,Fr.sampleSize=function(e,t,r){return t=(r?vo(e,t,r):t===i)?1:ma(t),(Bs(e)?Yr:Yn)(e,t)},Fr.set=function(e,t,r){return null==e?e:Jn(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Jn(e,t,r,n)},Fr.shuffle=function(e){return(Bs(e)?Jr:ei)(e)},Fr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&vo(e,t,r)?(t=0,r=n):(t=null==t?0:ma(t),r=r===i?n:ma(r)),ti(e,t,r)):[]},Fr.sortBy=Ps,Fr.sortedUniq=function(e){return e&&e.length?oi(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&vo(e,t,r)&&(t=r=i),(r=r===i?p:r>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?bi(or(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:gr(ma(t),0),Kn((function(r){var n=r[t],i=bi(r,0,t);return n&&Pt(i,n),yt(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ma(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ma(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?di(e,so(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 ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),As(e,t,{leading:n,maxWait:t,trailing:i})},Fr.thru=hs,Fr.toArray=pa,Fr.toPairs=Ma,Fr.toPairsIn=Wa,Fr.toPath=function(e){return Bs(e)?$t(e,Fo):ua(e)?[e]:Ti(Do(ba(e)))},Fr.toPlainObject=va,Fr.transform=function(e,t,r){var n=Bs(e),i=n||Qs(e)||la(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Zs(o)?Mr(He(e)):{}}return(i?bt:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Rs(e,1)},Fr.union=rs,Fr.unionBy=ns,Fr.unionWith=is,Fr.uniq=function(e){return e&&e.length?ci(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ci(e,i,t):[]},Fr.unset=function(e,t){return null==e||ui(e,t)},Fr.unzip=os,Fr.unzipWith=ss,Fr.update=function(e,t,r){return null==e?e:li(e,t,gi(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:li(e,t,gi(r),n)},Fr.values=Va,Fr.valuesIn=function(e){return null==e?[]:qt(e,xa(e))},Fr.without=as,Fr.words=Za,Fr.wrap=function(e,t){return Fs(gi(t),e)},Fr.xor=cs,Fr.xorBy=us,Fr.xorWith=ls,Fr.zip=ds,Fr.zipObject=function(e,t){return hi(e||[],t||[],Xr)},Fr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jn)},Fr.zipWith=fs,Fr.entries=Ma,Fr.entriesIn=Wa,Fr.extend=Sa,Fr.extendWith=_a,cc(Fr,Fr),Fr.add=bc,Fr.attempt=Xa,Fr.camelCase=Ua,Fr.capitalize=za,Fr.ceil=wc,Fr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),sn(ya(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||cn(e,t,Aa(t))},Fr.deburr=qa,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=Sc,Fr.endsWith=function(e,t,r){e=ba(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ma(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Fr.eq=Vs,Fr.escape=function(e){return(e=ba(e))&&K.test(e)?e.replace(H,Yt):e},Fr.escapeRegExp=function(e){return(e=ba(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Bs(e)?St:pn;return r&&vo(e,t,r)&&(t=i),n(e,so(t,3))},Fr.find=ys,Fr.findIndex=qo,Fr.findKey=function(e,t){return It(e,so(t,3),bn)},Fr.findLast=vs,Fr.findLastIndex=Bo,Fr.findLastKey=function(e,t){return It(e,so(t,3),wn)},Fr.floor=_c,Fr.forEach=bs,Fr.forEachRight=ws,Fr.forIn=function(e,t){return null==e?e:yn(e,so(t,3),xa)},Fr.forInRight=function(e,t){return null==e?e:vn(e,so(t,3),xa)},Fr.forOwn=function(e,t){return e&&bn(e,so(t,3))},Fr.forOwnRight=function(e,t){return e&&wn(e,so(t,3))},Fr.get=Ta,Fr.gt=Us,Fr.gte=zs,Fr.has=function(e,t){return null!=e&&ho(e,t,Pn)},Fr.hasIn=Ra,Fr.head=Go,Fr.identity=ic,Fr.includes=function(e,t,r,n){e=Gs(e)?e:Va(e),r=r&&!n?ma(r):0;var i=e.length;return r<0&&(r=gr(i+r,0)),ca(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&xt(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:ma(r);return i<0&&(i=gr(n+i,0)),xt(e,t,i)},Fr.inRange=function(e,t,r){return t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r){return e>=yr(t,r)&&e<gr(t,r)}(e=ya(e),t,r)},Fr.invoke=Ia,Fr.isArguments=qs,Fr.isArray=Bs,Fr.isArrayBuffer=Hs,Fr.isArrayLike=Gs,Fr.isArrayLikeObject=Ks,Fr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&En(e)==y},Fr.isBuffer=Qs,Fr.isDate=Ys,Fr.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Bs(e)||"string"==typeof e||"function"==typeof e.splice||Qs(e)||la(e)||qs(e)))return!e.length;var t=po(e);if(t==_||t==T)return!e.size;if(_o(e))return!jn(e).length;for(var r in e)if(xe.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return In(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?In(e,t,i,r):!!n},Fr.isError=Js,Fr.isFinite=function(e){return"number"==typeof e&&pr(e)},Fr.isFunction=Zs,Fr.isInteger=Xs,Fr.isLength=ea,Fr.isMap=na,Fr.isMatch=function(e,t){return e===t||An(e,t,co(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,An(e,t,co(t),r)},Fr.isNaN=function(e){return ia(e)&&e!=+e},Fr.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=ia,Fr.isObject=ta,Fr.isObjectLike=ra,Fr.isPlainObject=oa,Fr.isRegExp=sa,Fr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=d},Fr.isSet=aa,Fr.isString=ca,Fr.isSymbol=ua,Fr.isTypedArray=la,Fr.isUndefined=function(e){return e===i},Fr.isWeakMap=function(e){return ra(e)&&po(e)==k},Fr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==En(e)},Fr.join=function(e,t){return null==e?"":hr.call(e,t)},Fr.kebabCase=Ba,Fr.last=Jo,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=ma(r))<0?gr(n+o,0):yr(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):At(e,jt,o,!0)},Fr.lowerCase=Ha,Fr.lowerFirst=Ga,Fr.lt=da,Fr.lte=fa,Fr.max=function(e){return e&&e.length?hn(e,ic,$n):i},Fr.maxBy=function(e,t){return e&&e.length?hn(e,so(t,2),$n):i},Fr.mean=function(e){return Lt(e,ic)},Fr.meanBy=function(e,t){return Lt(e,so(t,2))},Fr.min=function(e){return e&&e.length?hn(e,ic,Ln):i},Fr.minBy=function(e,t){return e&&e.length?hn(e,so(t,2),Ln):i},Fr.stubArray=gc,Fr.stubFalse=yc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Cc,Fr.nth=function(e,t){return e&&e.length?Vn(e,ma(t)):i},Fr.noConflict=function(){return ot._===this&&(ot._=Fe),this},Fr.noop=uc,Fr.now=Ts,Fr.pad=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(lr(i),r)+e+Ui(ur(i),r)},Fr.padEnd=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;return t&&n<t?e+Ui(t-n,r):e},Fr.padStart=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;return t&&n<t?Ui(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ba(e).replace(ne,""),t||0)},Fr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&vo(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=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=wr();return yr(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Hn(e,t)},Fr.reduce=function(e,t,r){var n=Bs(e)?Tt:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,dn)},Fr.reduceRight=function(e,t,r){var n=Bs(e)?Rt:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},Fr.repeat=function(e,t,r){return t=(r?vo(e,t,r):t===i)?1:ma(t),Gn(ba(e),t)},Fr.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Fo(t[n])];s===i&&(n=o,s=r),e=Zs(s)?s.call(e):s}return e},Fr.round=Ec,Fr.runInContext=e,Fr.sample=function(e){return(Bs(e)?Qr:Qn)(e)},Fr.size=function(e){if(null==e)return 0;if(Gs(e))return ca(e)?ir(e):e.length;var t=po(e);return t==_||t==T?e.size:jn(e).length},Fr.snakeCase=Ka,Fr.some=function(e,t,r){var n=Bs(e)?Ot:ri;return r&&vo(e,t,r)&&(t=i),n(e,so(t,3))},Fr.sortedIndex=function(e,t){return ni(e,t)},Fr.sortedIndexBy=function(e,t,r){return ii(e,t,so(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&Vs(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ii(e,t,so(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(Vs(e[r],t))return r}return-1},Fr.startCase=Qa,Fr.startsWith=function(e,t,r){return e=ba(e),r=null==r?0:sn(ma(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},Fr.subtract=$c,Fr.sum=function(e){return e&&e.length?Wt(e,ic):0},Fr.sumBy=function(e,t){return e&&e.length?Wt(e,so(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&vo(e,t,r)&&(t=i),e=ba(e),t=_a({},t,n,Yi);var o,s,a=_a({},t.imports,n.imports,Yi),c=Aa(a),u=qt(a,c),l=0,d=t.interpolate||be,f="__p += '",p=$e((t.escape||be).source+"|"+d.source+"|"+(d===J?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(xe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(p,(function(t,r,n,i,a,c){return n||(n=i),f+=e.slice(l,c).replace(we,Jt),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),f+="';\n";var m=xe.call(t,"variable")&&t.variable;if(m){if(ue.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(z,"$1").replace(q,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Xa((function(){return _e(c,h+"return "+f).apply(i,u)}));if(g.source=f,Js(g))throw g;return g},Fr.times=function(e,t){if((e=ma(e))<1||e>d)return[];var r=p,n=yr(e,p);t=so(t),e-=p;for(var i=Vt(n,t);++r<e;)t(r);return i},Fr.toFinite=ha,Fr.toInteger=ma,Fr.toLength=ga,Fr.toLower=function(e){return ba(e).toLowerCase()},Fr.toNumber=ya,Fr.toSafeInteger=function(e){return e?sn(ma(e),-9007199254740991,d):0===e?e:0},Fr.toString=ba,Fr.toUpper=function(e){return ba(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=ba(e))&&(r||t===i))return Ut(e);if(!e||!(t=ai(t)))return e;var n=or(e),o=or(t);return bi(n,Ht(n,o),Gt(n,o)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=ba(e))&&(r||t===i))return e.slice(0,sr(e)+1);if(!e||!(t=ai(t)))return e;var n=or(e);return bi(n,0,Gt(n,or(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=ba(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=or(e);return bi(n,Ht(n,or(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ma(t.length):r,n="omission"in t?ai(t.omission):n}var s=(e=ba(e)).length;if(Zt(e)){var a=or(e);s=a.length}if(r>=s)return e;var c=r-ir(n);if(c<1)return n;var u=a?bi(a,0,c).join(""):e.slice(0,c);if(o===i)return u+n;if(a&&(c+=u.length-c),sa(o)){if(e.slice(c).search(o)){var l,d=u;for(o.global||(o=$e(o.source,ba(fe.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;u=u.slice(0,f===i?c:f)}}else if(e.indexOf(ai(o),c)!=c){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+n},Fr.unescape=function(e){return(e=ba(e))&&G.test(e)?e.replace(B,ar):e},Fr.uniqueId=function(e){var t=++Ne;return ba(e)+t},Fr.upperCase=Ya,Fr.upperFirst=Ja,Fr.each=bs,Fr.eachRight=ws,Fr.first=Go,cc(Fr,(vc={},bn(Fr,(function(e,t){xe.call(Fr.prototype,t)||(vc[t]=e)})),vc),{chain:!1}),Fr.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),bt(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:gr(ma(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=yr(r,n.__takeCount__):n.__views__.push({size:yr(r,p),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),bt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(ic)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Kn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return On(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ls(so(e)))},Ur.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(p)},bn(Ur.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],s=n||/^find/.test(t);o&&(Fr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof Ur,u=a[0],l=c||Bs(t),d=function(e){var t=o.apply(Fr,Pt([e],a));return n&&f?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,p=!!this.__actions__.length,h=s&&!f,m=c&&!p;if(!s&&l){t=m?t:new Ur(this);var g=e.apply(t,a);return g.__actions__.push({func:hs,args:[d],thisArg:i}),new Vr(g,f)}return h&&m?e.apply(this,a):(g=this.thru(d),h?n?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[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(Bs(i)?i:[],e)}return this[r]((function(r){return t.apply(Bs(r)?r:[],e)}))}})),bn(Ur.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";xe.call(Or,n)||(Or[n]=[]),Or[n].push({name:t,func:r})}})),Or[Fi(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Bs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yr(t,e+s);break;case"takeRight":e=gr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=n?a:s-1,l=this.__iteratees__,d=l.length,f=0,p=yr(c,this.__takeCount__);if(!r||!n&&i==c&&p==c)return fi(e,this.__actions__);var h=[];e:for(;c--&&f<p;){for(var m=-1,g=e[u+=t];++m<d;){var y=l[m],v=y.iteratee,b=y.type,w=v(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[f++]=g}return h},Fr.prototype.at=ms,Fr.prototype.chain=function(){return ps(this)},Fr.prototype.commit=function(){return new Vr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=pa(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 Wr;){var n=Wo(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 Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Vr(t,this.__chain__)}return this.thru(ts)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,st&&(Fr.prototype[st]=function(){return this}),Fr}();ot._=cr,(n=function(){return cr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},88306:(e,t,r)=>{var n=r(83369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},7771:(e,t,r)=>{var n=r(55639);e.exports=function(){return n.Date.now()}},78718:(e,t,r)=>{var n=r(25970),i=r(99021)((function(e,t){return null==e?{}:n(e,t)}));e.exports=i},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},23493:(e,t,r)=>{var n=r(23279),i=r(13218);e.exports=function(e,t,r){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,s="trailing"in r?!!r.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}},14841:(e,t,r)=>{var n=r(27561),i=r(13218),o=r(33448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):s.test(e)?NaN:+e}},79833:(e,t,r)=>{var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},80406:(e,t,r)=>{"use strict";const n=r(99778);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new n;let r=0;const i=async(e,n,...i)=>{r++;const o=(async()=>e(...i))();n(o);try{await o}catch{}r--,t.size>0&&t.dequeue()()},o=(n,...o)=>new Promise((s=>{((n,o,...s)=>{t.enqueue(i.bind(null,n,o,...s)),(async()=>{await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()})()})(n,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},60540: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]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",a),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),d=r(n+t(n,i,"[\\+\\-\\.]")+"*"),f=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),p=(r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("[1-9][0-9]")+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("0?[1-9][0-9]")+"|0?0?"+i)),h=r(p+"\\."+p+"\\."+p+"\\."+p),m=r(o+"{1,4}"),g=r(r(m+"\\:"+m)+"|"+h),y=r(r(m+"\\:")+"{6}"+g),v=r("\\:\\:"+r(m+"\\:")+"{5}"+g),b=r(r(m)+"?\\:\\:"+r(m+"\\:")+"{4}"+g),w=r(r(r(m+"\\:")+"{0,1}"+m)+"?\\:\\:"+r(m+"\\:")+"{3}"+g),S=r(r(r(m+"\\:")+"{0,2}"+m)+"?\\:\\:"+r(m+"\\:")+"{2}"+g),_=r(r(r(m+"\\:")+"{0,3}"+m)+"?\\:\\:"+m+"\\:"+g),C=r(r(r(m+"\\:")+"{0,4}"+m)+"?\\:\\:"+g),E=r(r(r(m+"\\:")+"{0,5}"+m)+"?\\:\\:"+m),$=r(r(r(m+"\\:")+"{0,6}"+m)+"?\\:\\:"),P=r([y,v,b,w,S,_,C,E,$].join("|")),T=r(r(l+"|"+s)+"+"),R=(r(P+"\\%25"+T),r(P+r("\\%25|\\%(?!"+o+"{2})")+T)),O=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),k=r("\\["+r(R+"|"+P+"|"+O)+"\\]"),I=r(r(s+"|"+t(l,a))+"*"),A=r(k+"|"+h+"(?!"+I+")|"+I),x=r("[0-9]*"),N=r(r(f+"@")+"?"+A+r("\\:"+x)+"?"),j=r(s+"|"+t(l,a,"[\\:\\@]")),L=r(j+"*"),D=r(j+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),M=r(r("\\/"+L)+"*"),W=r("\\/"+r(D+M)+"?"),V=r(F+M),U=r(D+M),z="(?!"+j+")",q=(r(M+"|"+W+"|"+V+"|"+U+"|"+z),r(r(j+"|"+t("[\\/\\?]",u))+"*")),B=r(r(j+"|[\\/\\?]")+"*"),H=r(r("\\/\\/"+N+M)+"|"+W+"|"+U+"|"+z),G=r(d+"\\:"+H+r("\\?"+q)+"?"+r("\\#"+B)+"?"),K=r(r("\\/\\/"+N+M)+"|"+W+"|"+V+"|"+z),Q=r(K+r("\\?"+q)+"?"+r("\\#"+B)+"?");return r(G+"|"+Q),r(d+"\\:"+H+r("\\?"+q)+"?"),r(r("\\/\\/("+r("("+f+")@")+"?("+A+")"+r("\\:("+x+")")+"?)")+"?("+M+"|"+W+"|"+U+"|"+z+")"),r("\\?("+q+")"),r("\\#("+B+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+A+")"+r("\\:("+x+")")+"?)")+"?("+M+"|"+W+"|"+V+"|"+z+")"),r("\\?("+q+")"),r("\\#("+B+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+A+")"+r("\\:("+x+")")+"?)")+"?("+M+"|"+W+"|"+U+"|"+z+")"),r("\\?("+q+")"),r("\\#("+B+")"),r("("+f+")@"),r("\\:("+x+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+P+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+T+")")+"?\\]?$")}}var s=o(!1),a=o(!0),c=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 s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,l=36,d=/^xn--/,f=/[^\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"},m=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(h[e])}function v(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 b(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 w=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},S=function(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=l)e=m(e/35);return m(n+36*e/(e+38))},_=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var c=0;c<a;++c)e.charCodeAt(c)>=128&&y("not-basic"),r.push(e.charCodeAt(c));for(var d=a>0?a+1:0;d<n;){for(var f=i,p=1,h=l;;h+=l){d>=n&&y("invalid-input");var g=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(g>=l||g>m((u-i)/p))&&y("overflow"),i+=g*p;var v=h<=s?1:h>=s+26?26:h-s;if(g<v)break;var b=l-v;p>m(u/b)&&y("overflow"),p*=b}var w=r.length+1;s=S(i-f,w,0==f),m(i/w)>u-o&&y("overflow"),o+=m(i/w),i%=w,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},C=function(e){var t=[],r=(e=b(e)).length,n=128,i=0,o=72,s=!0,a=!1,c=void 0;try{for(var d,f=e[Symbol.iterator]();!(s=(d=f.next()).done);s=!0){var p=d.value;p<128&&t.push(g(p))}}catch(e){a=!0,c=e}finally{try{!s&&f.return&&f.return()}finally{if(a)throw c}}var h=t.length,v=h;for(h&&t.push("-");v<r;){var _=u,C=!0,E=!1,$=void 0;try{for(var P,T=e[Symbol.iterator]();!(C=(P=T.next()).done);C=!0){var R=P.value;R>=n&&R<_&&(_=R)}}catch(e){E=!0,$=e}finally{try{!C&&T.return&&T.return()}finally{if(E)throw $}}var O=v+1;_-n>m((u-i)/O)&&y("overflow"),i+=(_-n)*O,n=_;var k=!0,I=!1,A=void 0;try{for(var x,N=e[Symbol.iterator]();!(k=(x=N.next()).done);k=!0){var j=x.value;if(j<n&&++i>u&&y("overflow"),j==n){for(var L=i,D=l;;D+=l){var F=D<=o?1:D>=o+26?26:D-o;if(L<F)break;var M=L-F,W=l-F;t.push(g(w(F+M%W,0))),L=m(M/W)}t.push(g(w(L,0))),o=S(i,O,v==h),i=0,++v}}}catch(e){I=!0,A=e}finally{try{!k&&N.return&&N.return()}finally{if(I)throw A}}++i,++n}return t.join("")},E=function(e){return v(e,(function(e){return f.test(e)?"xn--"+C(e):e}))},$=function(e){return v(e,(function(e){return d.test(e)?_(e.slice(4).toLowerCase()):e}))},P={};function T(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 R(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 s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function O(e,t){function r(e){var r=R(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,T).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,T).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,T).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,T).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,T).replace(t.PCT_ENCODED,i)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function I(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(k).join("."):e}function A(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=c(s,2),u=a[0],l=a[1],d=l?l.split(":").map(k):[],f=u.split(":").map(k),p=t.IPV4ADDRESS.test(f[f.length-1]),h=p?7:8,m=f.length-h,g=Array(h),y=0;y<h;++y)g[y]=d[y]||f[m+y]||"";p&&(g[h-1]=I(g[h-1],t));var v=g.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],b=void 0;if(v&&v.length>1){var w=g.slice(0,v.index),S=g.slice(v.index+v.length);b=w.join(":")+"::"+S.join(":")}else b=g.join(":");return o&&(b+="%"+o),b}return e}var x=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,N=void 0==="".match(/(){0}/)[1];function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(x);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=A(I(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=P[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)O(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E(r.host.replace(n.PCT_ENCODED,R).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function L(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(A(I(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}var D=/^\.\.?\//,F=/^\/\.(\/|$)/,M=/^\/\.\.(\/|$)/,W=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var t=[];e.length;)if(e.match(D))e=e.replace(D,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(M))e=e.replace(M,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(W);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 U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=P[(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.host):E(e.host.replace(r.PCT_ENCODED,R).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}O(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=L(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 c=e.path;t.absolutePath||i&&i.absolutePath||(c=V(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),n.push(c)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=j(U(e,r),r),t=j(U(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=V(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=V(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=V(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=V(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 q(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,R)}var B={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}},H={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function G(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var K={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=G(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!==(G(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=c(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}},Q={scheme:"wss",domainHost:K.domainHost,parse:K.parse,serialize:K.serialize},Y={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=r(r("%[EFef][0-9A-Fa-f]%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+Z+Z)+"|"+r("%"+Z+Z)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(X,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=R(e);return t.match(te)?t:e}var ae={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={},s=r.query.split("&"),a=0,c=s.length;a<c;++a){var u=s[a].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),d=0,f=l.length;d<f;++d)n.push(l[d]);break;case"subject":r.subject=q(u[1],t);break;case"body":r.body=q(u[1],t);break;default:i=!0,o[q(u[0],t)]=q(u[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var p=0,h=n.length;p<h;++p){var m=n[p].split("@");if(m[0]=q(m[0]),t.unicodeSupport)m[1]=q(m[1],t).toLowerCase();else try{m[1]=E(q(m[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]=m.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 s=0,a=o.length;s<a;++s){var c=String(o[s]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(re,se).replace(re,i).replace(ne,T),d=c.slice(u+1);try{d=t.iri?$(d):E(q(d,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[s]=l+"@"+d}n.path=o.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var p=[];for(var h in f)f[h]!==Y[h]&&p.push(h.replace(re,se).replace(re,i).replace(ie,T)+"="+f[h].replace(re,se).replace(re,i).replace(oe,T));return p.length&&(n.query=p.join("&")),n}},ce=/^([^\:]+)\:(.*)/,ue={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ce),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),c=P[a];n.nid=o,n.nss=s,n.path=void 0,c&&(n=c.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=P[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,de={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(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};P[B.scheme]=B,P[H.scheme]=H,P[K.scheme]=K,P[Q.scheme]=Q,P[ae.scheme]=ae,P[ue.scheme]=ue,P[de.scheme]=de,e.SCHEMES=P,e.pctEncChar=T,e.pctDecChars=R,e.parse=j,e.removeDotSegments=V,e.serialize=U,e.resolveComponents=z,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 U(z(j(e,n),j(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(j(e,t),t):"object"===n(e)&&(e=j(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(j(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(j(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,T)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0})}(t)},62043:(e,t,r)=>{"use strict";!function(){var t,n,i,o=0,s=[];for(n=0;n<256;n++)s[n]=(n+256).toString(16).substr(1);function a(){var e=(16,(!t||o+16>c.BUFFER_SIZE)&&(o=0,t=c.randomBytes(c.BUFFER_SIZE)),t.slice(o,o+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function c(){var e=a();return s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}c.BUFFER_SIZE=4096,c.bin=a,c.clearBuffer=function(){t=null,o=0},c.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||r(39061),e.exports=c,c.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,r=[];for(t=0;t<e;t++)r.push(Math.floor(256*Math.random()));return r}}()}()},99778:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class r{constructor(){this.clear()}enqueue(e){const r=new t(e);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=r},39061:()=>{},64775: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}')},98: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.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},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";r.d(n,{d:()=>On,Z:()=>kn});var e={};r.r(e),r.d(e,{APPLICATION_STATE_CHANNEL:()=>Je,CLIENT_SERVER_MAPPING:()=>nt,COMPONENT_STATE_STORAGE_TOPIC:()=>ht,DOCKING:()=>ct,EVENT_INTERRUPT_CHANNEL:()=>ut,HEARTBEAT_TIMEOUT_CHANNEL:()=>mt,INTERRUPTIBLE_EVENTS:()=>lt,LAUNCHER_SERVICE:()=>gt,MOVE_REASON:()=>yt,SERVICES_STATE_CHANNEL:()=>it,SERVICE_CLOSED_CHANNEL:()=>tt,SERVICE_CLOSING_CHANNEL:()=>et,SERVICE_INITIALIZING_CHANNEL:()=>Ze,SERVICE_QUERY_READY_CHANNEL:()=>rt,SERVICE_READY_CHANNEL:()=>Xe,SERVICE_START_CHANNEL:()=>st,SERVICE_STOP_CHANNEL:()=>at,WINDOW:()=>dt,WINDOWSTATE:()=>ot,WINDOW_SERVICE_REQUESTS:()=>pt,WORKSPACE:()=>ft,WRAPPERS:()=>Ye});const t=(e,t,r)=>(e[t]||[]).concat([r]),i=(e,t,r)=>(e[t]||[]).filter((e=>e!==r)),o="FSBL.FDC3.Interop.Server",s={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app",appId:"Anonymous appId"}};let a="undefined"==typeof window?r.g:window,c="undefined"==typeof window?r.g:window;"undefined"==typeof window?r.g:window;var u=r(62043),l=r.n(u);const d=(e,t,...n)=>{const i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(r.g).indexOf(i)>-1||(r.g[i]=new t(...n)),r.g[i]},f=`Unknown window-${l()()}`;class p{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:s,windowName:f,webContentsName:f}}static getInstance(){return p.instance?p.instance:p.instance=d("Startup",p)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}setReady(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()}));try{a.dispatchEvent&&a.Event&&a.dispatchEvent(new a.Event("FSBLReady"))}catch(e){console.log(e.toString())}}}p.instance=null;const h={},m={activeTransports:{},liveTransport:null,setTransports(){m.addTransport("SharedWorker",h.SharedWorkerTransport),m.addTransport("IPCBus",h.IPCTransport),m.addTransport("FinsembleTransport",h.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],r=e=>{-1===t.indexOf(e)&&t.push(e)};return j.InterApplicationBus&&r("IPCBus"),r("FinsembleTransport"),SharedWorker&&r("SharedWorker"),r(e.sameDomainTransport),r(e.crossDomainTransport),ae.system.log("getActiveTransports",t),t},getTransport:(e,t,r,n,i)=>new Promise(((o,s)=>{const a=m.activeTransports[t];if(a)m.liveTransport=new a(e,r,n,i,(e=>{o(e)}));else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;ae.warn(e),s(e)}})),close(){m.liveTransport&&(m.liveTransport.close(),m.liveTransport=null)}};h.SharedWorkerTransport=function(e,t,r,n,i){let o;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),ae.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{o.port.postMessage([e,t])}catch(e){ae.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const s=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/routerSharedWorker.js`;ae.console.log(`SharedWorker Transport Initializing for ${r} using ${s}`),o=new SharedWorker(s,{name:"Finsemble",credentials:"include"}),o.port.onmessage=e=>{const r=e.data[0],n=e.data[1],i={transportID:this.identifier(),port:r};ae.system.verbose("SharedWorkerTransport Incoming Transport",i,"Message",n),t(i,n)},o.onerror=e=>{ae.console.error(`SharedWorkerTransport Transport Error ${JSON.stringify(e)}`)},o.port.start(),"RouterService"===r&&o.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>o.port.close(),null==i||i(this)},h.IPCTransport=function(e,t,r,n,i){this.send=function(e,t){let r;1===arguments.length?(r=n,t=arguments[0]):(r=e.name,t=arguments[1]),ae.system.verbose("IPCTransport Outgoing Transport",r,"Message",t),j.InterApplicationBus.publish(r,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",ae.console.log(`IPCBus Transport Initializing for ${r}`);const o=j.InterApplicationBus.subscribe("*",r,(e=>{const r={transportID:this.identifier(),name:e.header.origin};ae.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(e=>ae.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>j.InterApplicationBus.unsubscribe(o),null==i||i(this)},h.FinsembleTransport=function(e,t,r,n,i){var o,s,c,u,l;const d=`${null!==(l=null!==(c=null===(s=null===(o=null==e?void 0:e.transportSettings)||void 0===o?void 0:o.FinsembleTransport)||void 0===s?void 0:s.serverAddress)&&void 0!==c?c:null===(u=null==e?void 0:e.transportSettings)||void 0===u?void 0:u.serverAddress)&&void 0!==l?l:"ws://127.0.0.1:3376"}/router`;let f;const p=e=>{const r={transportID:this.identifier(),client:e.clientMessage.header.origin};ae.system.verbose("FinsembleTransport Incoming Transport",r,"Message",e),t(r,e.clientMessage)},h=()=>{ae.console.error(`FinsembleTransport Connection Timeout for ${r}`),null==i||i(this)};this.send=function(e,t){let r,n;1===arguments.length?(r="ROUTER_SERVICE",n={clientMessage:t=arguments[0]}):(r="ROUTER_CLIENT",t=arguments[1],n={client:e.client,clientMessage:t}),ae.system.verbose("FinsembleTransport Outgoing Transport",r,"NewMessage",n),f.send(JSON.stringify({dest:r,message:n}))},this.identifier=()=>"FinsembleTransport",this.close=()=>{f.close()},(()=>{ae.console.log(`FinsembleTransport Transport Initializing for ${r} using ${d}`),d.startsWith("ws:")||d.startsWith("wss:")||ae.system.error(`Illegal WebSocket address "${d}" (Missing ws:// or wss:// ?)`),f=new a.WebSocket(d);const e=setTimeout(h,3e3);f.addEventListener("open",(()=>{clearTimeout(e),ae.console.log("FinsembleTransport connected to server"),f.send(JSON.stringify({dest:"IAC_SERVER",source:r})),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);p(t.message)})),null==i||i(this)})),f.addEventListener("error",(()=>{console.log(`Error connecting to websocket server ${d}`)}))})()};const g=m,y=["microkernel","kernel","pre-authentication","authentication","system-preuser","preuser","preuser2","preuser3","preuser4","earlyuser","user"];function v(e){return`systemManager.boot.status.${e}`}function b(e,t){return`systemManager.checkpoint.${e}.${t}`}const w=new class{publishBootStatus(e,t,r,n){se.system.debug("publishBootStatus",e,t,r),k.publish(v(e),{name:e,type:t,state:r,error:n})}waitForBootStage(e,t,r=Function.prototype){return new Promise(((n,i)=>{se.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const o=y.indexOf(e);"microkernel"===e&&"stageEntered"===t&&se.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const s=k.subscribe("systemManager.boot.stage",((a,c)=>{if(se.system.debug("SystemManagerClient.waitForBootStage new stage",c.data.stage,s),a)se.system.error("SystemManagerClient.waitForBootStage subscribe error",a),r(a),i(a);else if(-1===o)a="illegal stage argument",se.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),r(a),i(a);else{const i=y.indexOf(c.data.stage);se.system.debug("SystemManagerClient.waitForBootStage new stage",c.data,s),"stageEntered"===t&&i+1>=o?(se.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,s,r.name),r(),n(),k.unsubscribe(s)):"stageCompleted"===t&&i>=o?(se.system.debug("SystemManagerClient.waitForBootStage completed",e,s),r(),n(),k.unsubscribe(s)):se.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${i} stageIndex=${o} `,i,o,e,s)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((r,n)=>{se.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const i=k.subscribe(v(e),((o,s)=>{se.system.debug("SystemManagerClient.waitForStartup subscribe",e,o,s),o?(se.system.error("SystemManagerClient.waitForStartup subscribe error",o),t(o),n()):s.data.name===e&&"completed"===s.data.state&&(se.system.debug("SystemManagerClient.waitForStartup completed",e),t(),r(),k.unsubscribe(i))}))}))}publishCheckpointState(e,t,r){se.system.debug("publishCheckpoint",e,t,r,b(e,t)),k.publish(b(e,t),{windowName:e,checkpointName:t,state:r})}showSystemLog(){se.system.debug("SystemManagerClient.showSystemLog"),k.transmit("systemManager.showSystemlog",!0)}systemLog(e,t){se.system.debug("SystemManagerClient.systemLog",e,t),k.transmit("systemManager.systemlog",{params:e,logMessage:t})}},S=w;class _{constructor(){this.alertOnceSinceStartUp={},this.alertCurrentCount={}}}const C=(e,t,r,n,i)=>{const o=d("Toast",_);let s=!1;const a=`toast.${r}`,c=(i=i||{}).duration||864e5;switch(t){case"ONCE-SINCE-STARTUP":a in o.alertOnceSinceStartUp?s=!1:(s=!0,o.alertOnceSinceStartUp[a]=!0);break;case"MAX-COUNT":{let e=0;const t=i.maxCount||1;a in o.alertCurrentCount&&(e=o.alertCurrentCount[a]),o.alertCurrentCount[a]=++e,e<=t&&(s=!0);break}default:s=!0}if(se.log("toast",e,s,t,r,n,i),s){const t=Object.assign(Object.assign({message:n,timeout:c},i),{devModeOnly:"devModeOnly"===e});S.systemLog({notification:!0},`Notification: ${n}`),j.Notification.send(t)}};var E;const $={navigationStart:Date.now()},P={now:()=>{var e;return a.performance?null===(e=a.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(E=a.performance)||void 0===E?void 0:E.timing)?a.performance.timing:$};function T(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const r in e)t[r]=void 0===t[r]?T(e[r],null):t[r];return t}class R{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.parentReadyCallbackQueue=[],this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(oe.system.info("RouterClient: Queuing message since router initialization not complete",e),this.queue.push(e))}originatedHere(e){return e.header.origin===this.clientName}invokeListeners(e){const{channel:t,origin:r}=e.header,n=this.mapListeners[t]||[];Array.isArray(n)&&0!==n.length?(e.originatedHere=()=>this.originatedHere(e),n.forEach((n=>{oe.channelFilter(t)||oe.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",r,"MESSAGE",e),n(null,e)}))):oe.system.log(`RouterClient: no listener for incoming transmit on channel ${t} from ${r}. Possibly the listener was removed while this message was in transit.`,e)}invokeResponder(e){const{channel:t,origin:r,queryID:n,error:i}=e.header;oe.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",r,"QUERY MESSAGE",e);const o=(e,r)=>{oe.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",r,"QUERY ID",n);let i={header:{origin:this.clientName,queryID:n,type:"queryResponse"},data:r};i.header.error=e?e.toString():null,this.sendToRouterService(i)},s=this.mapQueryResponders[t];void 0===s?e.header.logWhenNoResponder&&oe.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${r}.`,e):i?(oe.system.warn("RouterClient: queryResponder error",e),s(i),delete this.mapQueryResponders[t]):s(null,Object.assign(Object.assign({},e),{originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{o(e,t)}}))}invokeQueryResponse(e){var t;oe.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:r}=e.header,n=this.mapQueryResponseTimeOut[r];delete this.mapQueryResponseTimeOut[r],n&&clearTimeout(n);const i=this.mapQueryResponses[r];i?(delete this.mapQueryResponses[r],i(null!==(t=e.header.error)&&void 0!==t?t:null,e)):oe.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:r}=e.header,n=this.mapSubscribersID[t];n?r?(oe.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(r,e)):(e.originatedHere=()=>this.originatedHere(e),oe.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(null,e)):oe.system.info("RouterClient: no subscription handler defined for incoming notify for subscriberID. Possibly the subscription was removed while this publish was in transit.",t,e)}findResponder(e){const t=this.mapPubSubResponders[e];if(t)return t;for(const t in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[t].test(e))return this.mapPubSubResponders[t]}invokePublishEvent(e){const{topic:t}=e.header;let r=this.findResponder(t);if(r){const n=(e,r,n)=>{var i;r?oe.system.warn("RouterClient: incoming publish rejected by pubsub responder",r,n):(this.mapPubSubResponderState[t]=n,(null!==(i=this.pubsubListOfSubscribers[t])&&void 0!==i?i:[]).forEach((e=>{oe.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",n);const r={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:n};this.sendToRouterService(r)})))};if(oe.system.info("RouterClient: incoming PubSub publish "+(r.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),r.publishCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToAllSubscribers:(t,r)=>{n(e,t,r)}});r.publishCallback(null,t)}else n(e,null,e.data)}else oe.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:r,error:n}=e.header;oe.system.info("RouterClient: PubSub subscribe","TOPIC",r);let i=this.mapPubSubResponders[r];if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(r)){i=this.mapPubSubResponders[e],this.mapPubSubResponderState[r]=null!==(t=this.mapPubSubResponderState[r])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(i)if(n)oe.system.warn(`RouterClient: pubsub error received from router service: ${n}`,e);else if(i.subscribeCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToSubscriber:(t,r)=>{this.sendNotifyToSubscriber(e,t,r)}});e.data=this.mapPubSubResponderState[r],i.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[r]);else oe.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:r}=e.header;let n=this.findResponder(t);if(!n)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){n=this.mapPubSubResponders[e];break}if(n)if(oe.system.info("RouterClient: incoming unsubscribe "+(n.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),n.unsubscribeCallback){const i=Object.assign(Object.assign({},e),{removeSubscriber:()=>{this.removeSubscribers(t,r)}});n.unsubscribeCallback(null,i)}else this.removeSubscribers(t,r);else oe.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,r){const{topic:n,subscribeID:i}=e.header;if(void 0!==r){let e={header:{origin:this.clientName,type:"notify",topic:n,subscribeID:i},data:r};t&&(e.header.error=t),this.sendToRouterService(e)}t?oe.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",n,"MESSAGE",this):(n in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[n].push(i):this.pubsubListOfSubscribers[n]=[i],oe.system.info("RouterClient: incoming subscription added","TOPIC",n,"MESSAGE"))}removeSubscribers(e,t){let r=!1;if(e in this.pubsubListOfSubscribers){const n=this.pubsubListOfSubscribers[e];for(let i=0;i<n.length;i++)if(t===n[i]){n.splice(i,1),0===n.length&&delete this.pubsubListOfSubscribers[e],r=!0,oe.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}r||oe.system.warn(`RouterClient: tried to remove non-existent listener on ${e} from ${t}`)}routeIncomingMessage(e){const t=()=>{this.timeCalibrationHandler?this.timeCalibrationHandler(e):setTimeout((()=>{t()}),10)};switch(oe.system.verbose("Incoming Message Type",e.header.type,e),e.header.type){case"transmit":this.invokeListeners(e);break;case"query":this.invokeResponder(e);break;case"queryResponse":this.invokeQueryResponse(e);break;case"notify":this.invokeNotifyCallback(e);break;case"publish":this.invokePublishEvent(e);break;case"subscribe":this.invokeSubscribeEvent(e);break;case"unsubscribe":this.invokeUnsubscribeEvent(e);break;case"timeCalibration":t();break;case"initialHandshakeResponse":this.handshakeHandler()}}asyncConnectToEventRouter(e,t,r){oe.system.debug(`Name of transport to establish: ${t}`);let n=null,i=0,o=!1,s=0,a=null;const c=()=>{const t=Number.MAX_SAFE_INTEGER;oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",i);const r={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(r),i++>t&&(()=>{if(clearInterval(n),s++,s<=3)oe.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",s,e),null==a||a();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";oe.console.error(t,e),C("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t)}})()},u=()=>{if(!o){oe.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),o=!0,clearInterval(n);for(let e=0;e<this.queue.length;e++){oe.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send(Object.assign(Object.assign({},t),{header:Object.assign(Object.assign({},t.header),{origin:this.clientName})}))}null==r||r()}},l=e=>{i=0,oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=u,c(),n=setInterval(c,500)};a=()=>{oe.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),g.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService").then(l).catch((e=>{oe.console.error("RouterClient getTransport error",e)}))},a()}addPubSubResponderCallBack(e,t,r,n){const i=e.toString();return!this.mapPubSubResponders[i]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[i]=e,oe.system.info(`RouterClient: PubSub RegEx added for topic ${i}`)),this.mapPubSubResponders[i]={subscribeCallback:t,publishCallback:r,unsubscribeCallback:n},!0)}calibrateTimeWithRouterService(e){let t=0,r=0,n=1/0;const i={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=i=>{if(t++,t>5)(t=>{const{clientBaseTime:i,serviceBaseTime:o}=t;let s=0;for(let e=1;e<5;e++){const t=i[e-1],a=i[e]-t,c=o[e-1]-(t+a/2);a<n&&(n=a,r=c),s+=c,oe.system.debug("calibrationCalculation Intermediate Values","lastRRT",a,"lastOffset",c,"fastestOffset",r,"fastestRRT",n)}s/=4,oe.system.debug("RouterClient calibrationCalculation","Average Offset",s,"Chosen FastestOffset",r,t),e(r)})(i);else{i.clientBaseTime.push(P.timing.navigationStart+P.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:i.clientBaseTime,serviceBaseTime:i.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(i)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return oe.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${l()()}`;const r=`"RouterClient Check: connecting new client for ${this.clientName}`;oe.system.debug(r),console.debug(r),g.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}disconnectFromService(){oe.system.info("RouterClient.disconnectFromService");const e={header:{origin:this.clientName,type:"disconnectFromService"}};this.sendToRouterService(e)}stop(){this.disconnectAll(),g.close(),this.started=!1,this.disconnectFromService()}onReady(e){return new Promise((t=>{const r=()=>{e&&e(),t()};this.isRouterReady?r():this.parentReadyCallbackQueue.push(r)}))}addListener(e,t){oe.system.info("RouterClient.addListener","CHANNEL",e);const r=this.mapListeners[e];if(r&&0!==r.length)r.some((e=>t===e))?oe.debug("RouterClient.addListener() Ignoring duplicate listener with identical callback",e,t):r.push(t);else{this.mapListeners[e]=[t];const r={header:{origin:this.clientName,type:"addListener",channel:e}};this.sendToRouterService(r)}return()=>{this.removeListener(e,t)}}transmit(e,t,r){oe.channelFilter(e)||oe.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t);const n={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:r};this.sendToRouterService(n)}removeListener(e,t){if(oe.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),!this.mapListeners[e])return oe.system.debug("Attempt to remove non existent listener",e,t),void console.log("Attempt to remove non existent listener",e,t);if(this.mapListeners[e]=this.mapListeners[e].flatMap((e=>e===t?[]:[e])),!this.mapListeners[e].length){delete this.mapListeners[e];const t={header:{origin:this.clientName,type:"removeListener",channel:e}};this.sendToRouterService(t)}}addResponder(e,t){if(oe.system.info("RouterClient.addResponder","CHANNEL",e),this.mapQueryResponders[e]){const r=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;oe.system.warn(r),t(r)}else{this.mapQueryResponders[e]=t;const r={header:{origin:this.clientName,type:"addResponder",channel:e}};this.sendToRouterService(r)}}query(e,t,r,n){var i,o;const s=`${this.clientName}.${l()()}.${e}`,c=P.timing.navigationStart+P.now(),u=P.timing.navigationStart,d=P.now();oe.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",r,"QUERY ID",s,{timestamp:c,navstart:u,timenow:d});const f=null!=n?n:"function"==typeof r?r:null,p=null!==(i=null==r?void 0:r.timeout)&&void 0!==i?i:2e4,h=null===(o=null==r?void 0:r.logWhenNoResponder)||void 0===o||o;return new Promise((r=>{this.mapQueryResponses[s]=(e,t)=>{null==f||f(e,t),r({err:e,response:t})},!a.runningInFSBLUnitTest&&p>0&&(this.mapQueryResponseTimeOut[s]=setTimeout((()=>{oe.system.warn(`RouterClient: timeout after ${p} ms waiting on query response on channel ${e} for queryID ${s}`),delete this.mapQueryResponseTimeOut[s]}),p));const n={header:{origin:this.clientName,type:"query",queryID:s,channel:e,logWhenNoResponder:h},data:t};this.sendToRouterService(n)}))}removeResponder(e){if(oe.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,r,n){let i,o;if(oe.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",r),void 0===(r=r||{}).subscribeCallback&&void 0===r.publishCallback&&void 0===r.unsubscribeCallback){t=t||{};const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!0},data:t};this.sendToRouterService(r),o="success"}else if(this.addPubSubResponderCallBack(e,r.subscribeCallback,r.publishCallback,r.unsubscribeCallback)){t=t||{},this.mapPubSubResponderState[e.toString()]=T(t);const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(r),o="success"}else i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,oe.system.error(i);n&&n(i,o)}removePubSubResponder(e){oe.system.info("RouterClient.removePubSubResponder","TOPIC",e);const t=e.toString();if(this.mapPubSubResponders[t]){delete this.mapPubSubResponders[t],delete this.mapPubSubResponderState[t],delete this.mapPubSubResponderRegEx[t];const r={header:{origin:this.clientName,type:"removePubSubResponder",topic:e}};this.sendToRouterService(r)}else oe.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){oe.system.info("RouterClient.subscribe","TOPIC",e);const r=`${this.clientName}.${l()()}`;this.mapSubscribersID[r]=t,this.mapSubscribersTopic[r]=e;const n={header:{origin:this.clientName,type:"subscribe",subscribeID:r,topic:e}};return this.sendToRouterService(n),{subscribeID:r,topic:e}}publish(e,t){oe.system.info("RouterClient.publish","TOPIC",e,"EVENT",t);const r={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(r)}unsubscribe(e){oe.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e);const{subscribeID:t}=e;if(this.mapSubscribersID[t]){delete this.mapSubscribersID[t],delete this.mapSubscribersTopic[t];const r={header:{origin:this.clientName,type:"unsubscribe",subscribeID:e.subscribeID,topic:e.topic}};this.sendToRouterService(r)}else oe.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){var t;return oe.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===(null===(t=e.header.originMetadata)||void 0===t?void 0:t.transportInfo.transportID)}disconnectAll(){oe.system.info("RouterClient.disconnectAll"),Object.keys(this.mapListeners).forEach((e=>{Array.from(new Set(this.mapListeners[e])).forEach((t=>{this.removeListener(e,t)}))})),Object.keys(this.mapQueryResponders).forEach((e=>{this.removeResponder(e)})),Object.keys(this.mapPubSubResponders).forEach((e=>{this.removePubSubResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}const O={start:e=>{const t=d("RouterClient",R);return oe.setRouterClient(t),t.start(e)},stop:()=>{d("RouterClient",R).stop()},calibrateTimeWithRouterService(e){d("RouterClient",R).calibrateTimeWithRouterService(e)}},k={onReady:e=>d("RouterClient",R).onReady(e),addListener:(e,t)=>d("RouterClient",R).addListener(e,t),transmit:(e,t,r)=>{d("RouterClient",R).transmit(e,t,r)},removeListener:(e,t)=>{d("RouterClient",R).removeListener(e,t)},addResponder:(e,t)=>{d("RouterClient",R).addResponder(e,t)},query:(e,t,r,n)=>d("RouterClient",R).query(e,t,r,n),removeResponder:e=>{d("RouterClient",R).removeResponder(e)},addPubSubResponder:(e,t,r,n)=>{d("RouterClient",R).addPubSubResponder(e,t,r,n)},removePubSubResponder:e=>{d("RouterClient",R).removePubSubResponder(e)},subscribe:(e,t)=>d("RouterClient",R).subscribe(e,t),publish:(e,t)=>{d("RouterClient",R).publish(e,t)},unsubscribe:e=>{d("RouterClient",R).unsubscribe(e)},trustedMessage:e=>d("RouterClient",R).trustedMessage(e),disconnectAll:()=>{d("RouterClient",R).disconnectAll()},calibrateTimeWithRouterService:e=>{d("RouterClient",R).calibrateTimeWithRouterService(e)}},I=k;class A{static createNew(e,t){fin.desktop.Window.createNew(e,t)}static getCurrent(){return fin.desktop.Window.getCurrent()}static wrap(e){return fin.desktop.Window.wrap(e)}}class x{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=p.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{null==e||e({})},addEventListener:()=>{},removeEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return this.getCurrent()}}class N{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,r,n){return se.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,r,n)}static writeHTML(e,t,r,n){return se.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,r,n)}static writeRTF(e,t,r,n){return se.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,r,n)}static readText(e,t,r){return se.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,r)}static readHTML(e,t,r){return se.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,r)}static readRTF(e,t,r){return se.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,r)}}class j{static get Application(){return{getCurrent:()=>(se.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{k.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,r,n)=>{fin.desktop.Window.addEventListener(e,t,r,n)},close:(e,t,r)=>{fin.desktop.Window.close(e,t,r)},getChildWindows:(e,t)=>{null==e||e([fin.desktop.Window])},getGroups:(e,t)=>{null==e||e([])},getManifest:(e,t)=>{j.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{j.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,r,n)=>{null==r||r()},removeEventListener:(e,t,r,n)=>{fin.desktop.Window.removeEventListener(e,t,r,n)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,r,n)=>{fin.desktop.Window.setTrayIcon(e,t,r,n)},terminate:(e,t)=>{j.terminate()},wait:(e,t)=>{null==e||e()},window:{name:fin.desktop.Window.name},uuid:"Finsemble"})}}static isFreestanding(){return"undefined"==typeof fin}static get Window(){return j.isFreestanding()?x:A}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return N}static getManifest(e){return new Promise((t=>{fin.desktop.System.getManifest((r=>{null==e||e(r),t(r)}))}))}static async getMousePosition(e){return new Promise(((t,r)=>{fin.desktop.System.getMousePosition((r=>{(r.left||0===r.left)&&(r.x=r.left),(r.top||0===r.top)&&(r.y=r.top),null==e||e(null,r),t(r)}),(t=>{null==e||e(t),r(t)}))}))}static async deleteAssets(e){return await fin.desktop.System.deleteAssets(e)}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((r=>{t(r),e(r)}))}))}static getMonitorInfo(e){return new Promise((t=>{fin.desktop.System.getMonitorInfo((r=>{t(r),e&&e(r)}))}))}static isBrowserView(){return!j.isFreestanding()&&fin.isBrowserView()}static getViewId(){return se.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return se.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),j.isTitlebarWindow()}static isTitlebarWindow(){return!j.isFreestanding()&&fin.isTitlebarWindow()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static setTrayIcon(e,t){fin.desktop.System.setTrayIcon(e,t)}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((r=>{t(r),e(r)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return j.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static getFEAInfo(e){return new Promise((t=>{fin.desktop.System.getFEAInfo((r=>{null==e||e(r),t(r)}))}))}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static notifyLoggerReady(){fin.desktop.System.notifyLoggerReady()}static updateCentralLoggerState(e){fin.desktop.System.updateCentralLoggerState(e)}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}static getEnvironmentVariable(e,t){return new Promise((r=>{fin.desktop.System.getEnvironmentVariable(e,(e=>{null==t||t(e),r(e)}))}))}}class L{constructor(){this.listeners={},this.subs={}}}const D=()=>d("ConfigClient",L),F=(e,t)=>{var r;(null!==(r=D().listeners[e])&&void 0!==r?r:[]).forEach((r=>{ae.system.debug("ConfigClient.triggerListeners",e,t),r(null,{field:e,value:t})}))},M=(e,t)=>{if(e)ae.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:r,value:n}=t.data;F(e||"configService",r||n)}},W=async e=>{const t=D();if(t.subs||(t.subs={}),!t.subs[e]){t.subs[e]=!0,await S.waitForStartup("configService");const{err:r}=await k.query("configService.addListener",e);r&&ae.system.error("Error adding listener to config service",r),await k.subscribe(e,M)}},V=async(e,t)=>{if("string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r,response:n}=await k.query("configService.getValue",{field:e.field});return null==t||t(r,n.data),{err:r,data:n.data}},U=async(e,t,r)=>{var n;const i=D();let o=null;"function"==typeof e&&(t=e,e={field:null}),({field:o}=e);const s="configService"+(o?`.${o}`:"");i.listeners[s]=[t].concat(null!==(n=i.listeners[s])&&void 0!==n?n:[]),W(s),null==r||r()},z=(e,t,r)=>{const n=D();let i=null;"function"==typeof e&&(r=t,t=e,e={field:i}),({field:i}=e);const o="configService"+(i?`.${i}`:"");if(n.listeners[o])for(let e=0;e<n.listeners[o].length;e++)if(n.listeners[o][e]===t)return n.listeners[o].splice(e,1),void(null==r||r(null,!0));null==r||r(null,!1)},q={initialize(){ae.deprecated("There is no need to call ConfigClient.initialize() anymore.")},onReady:e=>{ae.system.deprecated("It is no longer necessary to call ConfigClient.onReady()"),null==e||e()},triggerListeners(e,t){ae.deprecated("Calling ConfigClient.triggerListeners() directly is not legal."),F(e,t)},handleChanges(e,t){ae.deprecated("It is illegal to call ConfigClient.handleChanges() directly."),M(e,t)},async changeSub(e){ae.deprecated("Calling ConfigClient.changeSub() directly is not legal."),W(e)},addListener:U,addListeners:(e,t,r)=>{var n;const i=D();if(!Array.isArray(e))return ae.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),U(e,t,r);const o="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const r=e[t],s="string"==typeof r?r:r.field,a="string"!=typeof r?r.listener:o;if(a){const e="configService"+(s?`.${s}`:"");i.listeners[e]=[a].concat(null!==(n=i.listeners[e])&&void 0!==n?n:[]),W(e)}}null==r||r()},getManifest:async e=>{await S.waitForStartup("configService");const{err:t,response:r}=await k.query("configService.getValues",{fields:null});return null==e||e(t,r.data),{err:t,data:r.data}},getPreferences:async e=>{await S.waitForStartup("preferencesService");const{err:t,response:r}=await k.query("PreferencesService.getPreferences",{});return ae.system.debug("PreferencesService.getPreferences response",r),null==e||e(t,r.data),{err:t,data:r.data}},getValue:V,getValues:async(e,t)=>{if("function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e))return V(e,t);await S.waitForStartup("configService");const{err:r,response:n}=await k.query("configService.getValues",{fields:e});return null==t||t(r,n.data),{err:r,data:n.data}},processAndSet:async(e,t)=>{if(ae.system.debug("ConfigClient.processAndSet",e),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return ae.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{await S.waitForStartup("configService");const{err:r,response:n}=await k.query("configService.processAndSet",e);return null==t||t(r,n),{err:r,data:n.data}}},removeListener:z,removeListeners:(e,t,r)=>{const n=D();if(!Array.isArray(e))return"function"==typeof e?z({},e,r):e.field&&t&&z(e,t,r),null==r?void 0:r(null,!0);const i="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,r="string"!=typeof e?e.listener:i,o="configService"+(t?`.${t}`:"");n.listeners[o]=n.listeners[o].filter((e=>e!==r))})),null==r||r(null,!0)},removeValue:async(e,t)=>{if("string"==typeof e&&(e={field:e}),!e.field){const e="No field provided";return null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r}=await k.query("configService.removeValue",e);return null==t||t(r),{err:r}},removeValues:async(e,t)=>{if(!e){const e="ConfigClient.removeValues. No params given";return ae.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.removeValues. Params must be an array";return ae.system.error(e),null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r}=await k.query("configService.removeValues",e);return null==t||t(r),{err:r}},setPreference:async(e,t)=>{const{err:r,response:n}=await k.query("PreferencesService.setPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}},setValue:async(e,t)=>{const r={field:e.field,value:e.value};await S.waitForStartup("configService");const{err:n}=await k.query("configService.setValue",r);return null==t||t(n),{err:n}},setValues:async(e,t)=>{if(!e){const e="ConfigClient.SetValues. No params given";return ae.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return ae.system.error(e),null==t||t(e),{err:e}}await S.waitForStartup("configService");const{err:r}=await k.query("configService.setValues",e);return null==t||t(r),{err:r}},unsetPreference:async(e,t)=>{ae.system.debug("ConfigClient.unsetPreference",e);const{err:r,response:n}=await k.query("PreferencesService.unsetPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}}},B=q;var H=r(23493),G=r.n(H),K=r(96486),Q=r.n(K);const Y={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1};let J=5e4;const Z=`NOTE: LOG ARG STRIPPED since greater than ${J/1e3}KB. Check origin's local Console to see output of the complete object.`,X={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:Y,system:Y,perf:Y},ee=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const r=(n=t,e.split("\n",n).join("\n").length);var n;return`Log Stack: \n${e.substring(r).substr(1)}`},te=e=>{const t=[],r=[e];let n=0,i=0;for(;r.length&&i<1e3;){i++;const e=r.pop();if("boolean"==typeof e)n+=4;else if("string"==typeof e)n+=2*e.length;else if("number"==typeof e)n+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)r.push(e[t])}}return n},re=(e,t,r=0,n=1)=>{const i=t/2,o=i/2,s="*STRIPPED*",a=e=>{let t=te(e);e.length>0&&t>o&&(e[0]=re(e[0],i,r,n+1),e[1]=`*STRIPPED* from size ${e.length}`,e.length=2)};let c=(0,K.cloneDeep)(e);if("object"!=typeof c)c=s,r+=te(c);else if(Array.isArray(c))a(c),r+=te(c);else{let e=Object.getOwnPropertyNames(c);for(let u=0;u<e.length;u++){let l=te(c[e[u]]);r>i&&l>100&&n>=3&&u>=1||r>J&&l>=10?c[e[u]]=s:l>o&&(Array.isArray(c[e[u]])?a(c[e[u]]):c[e[u]]=re(c[e[u]],t/1.2,r,n+1)),r+=te(c[e[u]])}}return c};class ne{constructor(){this.routerClient=null,this.viewId=null,this.isRegistering=!1,this.isRegistered=!1,this.calibratedTimeStampOffset=0,this.newCalibratedTimeStampOffset=0,this.filteredMessagesCounter=0,this.startupTime=0,this.loggerQueue=[],this.loggerClientName=j.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=X,this.skipLargeObjects=!0,this.setRouterClient=e=>{this.routerClient=e},this.system={error:(...e)=>{this.logIt("system","Error",e)},warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={error:(...e)=>{this.logIt("perf","Error",e)},warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console={error:(...e)=>{this.logIt("console","Error",e)},warn:(...e)=>{this.logIt("console","Warn",e)},info:(...e)=>{this.logIt("console","Info",e)},log:(...e)=>{this.logIt("console","Log",e)},debug:(...e)=>{this.logIt("console","Debug",e)},verbose:(...e)=>{this.logIt("console","Verbose",e)},deprecated:(...e)=>{this.logIt("console","Error",e)}};const e="routerService"===this.loggerClientName?100:250;this.transmitAndClearQueue=G()((()=>{var e;this.loggerQueue.length>0&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",this.loggerQueue),this.loggerQueue=[])}),e,{leading:!1})}updateQueueBasedOnState(e){const{loggerQueue:t,currentLogState:r,calibratedTimeStampOffset:n}=this;this.system.debug("Logger updateQueueBasedOnState",e,n,"QUEUE LENGTH",t.length,r),this.loggerQueue=t.flatMap((t=>{if(r[t.category][t.logType]){if(!r[t.category].LocalOnly)return e&&(t.logTimestamp=t.logTimestamp+n),[t];console.log(t.category,t.logType,t.logTimestamp-P.timing.navigationStart,t.logData,"(Previously queued!)")}return[]}))}onStateChanged(e){-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)}setLogState(e,t){e&&e.dev&&(this.currentLogState=e,this.onLogStateChangeCallback.forEach((t=>{t(e)}))),this.updateQueueBasedOnState(t)}addToQueue(e){const{loggerQueue:t}=this;if(t.length<2e4)t.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,r=0;for(;e=t.shift();)console.log("Message "+r++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return ee()}setting(){return this.currentLogState}outputToConsole(e,t){var r;const n={Debug:console.debug,Info:console.info,Warn:console.warn,Error:null!==(r=console.unwrappedError)&&void 0!==r?r:console.error,Log:console.log,Verbose:console.log};try{n[e](...t)}catch(e){n.Error("Error outputting log to console",e,ee())}}formatAndQueueMessage(e,t,r){var n;const i="forceObjectsToLogger"===r[0],o=r.flatMap((e=>{const t=te(e);if(!i&&t>J){if(this.outputToConsole("Warn",[`Message too large to send to the logger. Max message size:${J/1e3}KB`,`Approx message size: ${t/1e3}KB`,...r]),this.skipLargeObjects)return[`Log argument greater than ${J/1e3}KB. Check local Console to see output of the object.`];{let t=re(e,J);return[Z,`OldSize=${te(e)} NewSize=${te(t)}`,t]}}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let s=null;try{s=JSON.stringify(o)}catch(e){s=`*** Logger error can't JSON.stringify: ${ee()}`}("Error"===t||"Warn"===t||"console"===e)&&!a.runningInFSBLUnitTest&&this.outputToConsole(t,r);const c=null!==(n=this.viewId)&&void 0!==n?n:j.isBrowserView()&&j.getWebContentsId(),u={category:"console"===e?"system":e,logType:t,logClientName:c?`${this.loggerClientName}: view-${c}`:this.loggerClientName,logData:s,logTimestamp:P.timing.navigationStart+P.now()+this.calibratedTimeStampOffset};c&&(u.viewId=c),this.addToQueue(u),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,r){if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||r.push(ee()),this.currentLogState[e].LocalOnly){const n=t.toLowerCase();r.unshift(`${e} ${n} (${P.now()}):`),this.outputToConsole(t,r)}else this.formatAndQueueMessage(e,t,r)}error(...e){this.logIt("dev","Error",e)}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}completeRegistration(e){B.getValue({field:"finsemble.servicesConfig.logger"},((e,t)=>{var r,n;e||(this.skipLargeObjects=null!==(r=null==t?void 0:t.skipLargeObjects)&&void 0!==r?r:this.skipLargeObjects,J=null!==(n=null==t?void 0:t.maxLogMessageSize)&&void 0!==n?n:J)})),this.loggerQueue.forEach((e=>{this.viewId&&(e.viewId=this.viewId)})),this.isRegistered=!0,e?"routerService"!==this.loggerClientName?(this.calibratedTimeStampOffset=this.newCalibratedTimeStampOffset,this.setLogState(e,!0)):this.setLogState(e,!1):console.error("Logger.startLogger() Initial state not received from logger service"),this.formatAndQueueMessage("system","Debug",["Logger Registered"]),this.transmitAndClearQueue()}registerWithLoggerService(){var e;const{windowName:t,webContentsName:r}=p.getInstance().getStartupData();this.loggerClientName="undefined"!=typeof window&&window.top!==window?`${t}.Frame`:t;const n=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&j.isBrowserView()&&(this.viewId=j.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),j.Window.getCurrent().getOptions((async e=>{var i,o;const s=null===(o=null===(i=null==e?void 0:e.customData)||void 0===i?void 0:i.component)||void 0===o?void 0:o.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:c}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:n,displayName:null!=r?r:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:s});a?(console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(c.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(n,((e,t)=>{this.system.debug("logger.client.setLogState",t.data),this.setLogState(t.data,!1)}))}unregisterClient(e,t){var r;this.system.debug("logger.service.unregister",this.loggerClientName,e,this.viewId),this.transmitAndClearQueue();const n=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(r=this.routerClient)||void 0===r||r.query("logger.service.unregister",n,t)}waitForServiceAndCalibrate(){var e;const t=null===(e=this.routerClient)||void 0===e?void 0:e.subscribe("Finsemble.Service.State.loggerService",((e,r)=>{var n,i;"ready"===r.data.state&&(this.system.debug("Logger onReady",this.loggerClientName),null===(n=this.routerClient)||void 0===n||n.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())})),t&&(null===(i=this.routerClient)||void 0===i||i.unsubscribe(t)))}))}async start(e){if(this.routerClient=null!=e?e:I,this.startupTime=performance.now(),"routerService"===a.name){const{err:e}=await this.routerClient.query("logger.service.register",{});e?setTimeout((()=>{this.waitForServiceAndCalibrate()}),750):this.waitForServiceAndCalibrate()}else this.waitForServiceAndCalibrate();j.isBrowserView()&&a.addEventListener&&a.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}const ie={error:(...e)=>d("LoggerClient",ne).error(...e),warn:(...e)=>d("LoggerClient",ne).warn(...e),info:(...e)=>d("LoggerClient",ne).info(...e),log:(...e)=>d("LoggerClient",ne).log(...e),debug:(...e)=>d("LoggerClient",ne).debug(...e),verbose:(...e)=>d("LoggerClient",ne).verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).deprecated(...e),start:e=>{d("LoggerClient",ne).start(e)},channelFilter:e=>(e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e)(e),setting:()=>d("LoggerClient",ne).setting(),callStack:()=>d("LoggerClient",ne).callStack(),unregisterClient:(e,t)=>{d("LoggerClient",ne).unregisterClient(e,t)},setRouterClient:e=>{d("LoggerClient",ne).setRouterClient(e)},onStateChanged(e){d("LoggerClient",ne).onStateChanged(e)},system:{error:(...e)=>d("LoggerClient",ne).system.error(...e),warn:(...e)=>d("LoggerClient",ne).system.warn(...e),info:(...e)=>d("LoggerClient",ne).system.info(...e),log:(...e)=>d("LoggerClient",ne).system.log(...e),debug:(...e)=>d("LoggerClient",ne).system.debug(...e),verbose:(...e)=>d("LoggerClient",ne).system.verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).system.deprecated(...e)},perf:{error:(...e)=>d("LoggerClient",ne).perf.error(...e),warn:(...e)=>d("LoggerClient",ne).perf.warn(...e),info:(...e)=>d("LoggerClient",ne).perf.info(...e),log:(...e)=>d("LoggerClient",ne).perf.log(...e),debug:(...e)=>d("LoggerClient",ne).perf.debug(...e),verbose:(...e)=>d("LoggerClient",ne).perf.verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).perf.deprecated(...e)},console:{error:(...e)=>d("LoggerClient",ne).console.error(...e),warn:(...e)=>d("LoggerClient",ne).console.warn(...e),info:(...e)=>d("LoggerClient",ne).console.info(...e),log:(...e)=>d("LoggerClient",ne).console.log(...e),debug:(...e)=>d("LoggerClient",ne).console.debug(...e),verbose:(...e)=>d("LoggerClient",ne).console.verbose(...e),deprecated:(...e)=>d("LoggerClient",ne).console.deprecated(...e)}},oe=(console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,console.warn,console.info,console.log,console.debug,console.error,console.debug,console.error,ie),se=oe,ae=oe;var ce="function"==typeof queueMicrotask&&queueMicrotask,ue="function"==typeof setImmediate&&setImmediate,le="object"==typeof process&&"function"==typeof process.nextTick;function de(e){setTimeout(e,0)}function fe(e){return(t,...r)=>e((()=>t(...r)))}var pe=fe(ce?queueMicrotask:ue?setImmediate:le?process.nextTick:de);function he(e){return ye(e)?function(...t){const r=t.pop();return me(e.apply(this,t),r)}:function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return me(n,r);r(null,n)}))}function me(e,t){return e.then((e=>{ge(t,null,e)}),(e=>{ge(t,e&&e.message?e:new Error(e))}))}function ge(e,t,r){try{e(t,r)}catch(e){pe((e=>{throw e}),e)}}function ye(e){return"AsyncFunction"===e[Symbol.toStringTag]}function ve(e){if("function"!=typeof e)throw new Error("expected a function");return ye(e)?he(e):e}function be(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function we(e){return function(t,...r){return be((function(n){var i=this;return e(t,((e,t)=>{ve(e).apply(i,r.concat(t))}),n)}))}}function Se(e,t,r,n){t=t||[];var i=[],o=0,s=ve(r);return e(t,((e,t,r)=>{var n=o++;s(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function _e(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const Ce={};function Ee(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function $e(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function Pe(e,t,r,n){let i=!1,o=!1,s=!1,a=0,c=0;function u(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&n(null));a++,r(e,c,l),c++,u()}})).catch(d))}function l(e,t){if(a-=1,!o)return e?d(e):!1===e?(i=!0,void(o=!0)):t===Ce||i&&a<=0?(i=!0,n(null)):void u()}function d(e){o||(s=!1,i=!0,n(e))}u()}var Te=e=>(t,r,n)=>{if(n=Ee(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return Pe(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return Pe(t[Symbol.asyncIterator](),e,r,n);var i=function(e){if(_e(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}(t),o=!1,s=!1,a=0,c=!1;function u(e,t){if(!s)if(a-=1,e)o=!0,n(e);else if(!1===e)o=!0,s=!0;else{if(t===Ce||o&&a<=0)return o=!0,n(null);c||l()}}function l(){for(c=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&n(null));a+=1,r(t.value,t.key,$e(u))}c=!1}l()},Re=be((function(e,t,r,n){return Te(t)(e,ve(r),n)}),4);function Oe(e,t,r){r=Ee(r);var n=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?r(e):++i!==o&&t!==Ce||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,$e(a))}function ke(e,t,r){return Re(e,1/0,t,r)}var Ie=be((function(e,t,r){return(_e(e)?Oe:ke)(e,ve(t),r)}),3),Ae=be((function(e,t,r){return Se(Ie,e,t,r)}),3);we(Ae);var xe=be((function(e,t,r){return Re(e,1,t,r)}),3);we(be((function(e,t,r){return Se(xe,e,t,r)}),3)),Symbol("promiseCallback"),Symbol.iterator,be((function(e,t,r,n){n=Ee(n);var i=ve(r);return xe(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);var Ne=be((function(e,t,r,n){return Se(Te(t),e,r,n)}),4),je=be((function(e,t,r,n){var i=ve(r);return Ne(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4);function Le(e,t){return(r,n,i,o)=>{var s,a=!1;const c=ve(i);r(n,((r,n,i)=>{c(r,((n,o)=>n||!1===n?i(n):e(o)&&!s?(a=!0,s=t(!0,r),i(null,Ce)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}function De(e){return(t,...r)=>ve(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}function Fe(e){return(t,r,n)=>e(t,n)}be((function(e,t,r){return je(e,1/0,t,r)}),3),be((function(e,t,r){return je(e,1,t,r)}),3),be((function(e,t,r){return Le((e=>e),((e,t)=>t))(Ie,e,t,r)}),3),be((function(e,t,r,n){return Le((e=>e),((e,t)=>t))(Te(t),e,r,n)}),4),be((function(e,t,r){return Le((e=>e),((e,t)=>t))(Te(1),e,t,r)}),3),De("dir"),be((function(e,t,r){r=$e(r);var n,i=ve(e),o=ve(t);function s(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,a))}function a(e,t){return e?r(e):!1!==e?t?void i(s):r(null,...n):void 0}return a(null,!0)}),3);var Me=be((function(e,t,r){return Ie(e,Fe(ve(t)),r)}),3),We=be((function(e,t,r,n){return Te(t)(e,Fe(ve(r)),n)}),4),Ve=be((function(e,t,r){return We(e,1,t,r)}),3);function Ue(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function ze(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function qe(e,t,r,n){return(_e(t)?Ue:ze)(e,t,ve(r),n)}be((function(e,t,r){return Le((e=>!e),(e=>!e))(Ie,e,t,r)}),3),be((function(e,t,r,n){return Le((e=>!e),(e=>!e))(Te(t),e,r,n)}),4),be((function(e,t,r){return Le((e=>!e),(e=>!e))(xe,e,t,r)}),3),be((function(e,t,r){return qe(Ie,e,t,r)}),3),be((function(e,t,r,n){return qe(Te(t),e,r,n)}),4),be((function(e,t,r){return qe(xe,e,t,r)}),3),be((function(e,t){var r=$e(t),n=ve(function(e){return ye(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?pe((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2),be((function(e,t,r,n){var i=ve(r);return Ne(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(e,r)}))}),4),De("log"),be((function(e,t,r,n){n=Ee(n);var i={},o=ve(r);return Te(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4),fe(le?process.nextTick:ue?setImmediate:de);var Be=be(((e,t,r)=>{var n=_e(t)?[]:{};e(t,((e,t,r)=>{ve(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function He(e,t){return Be(Ie,e,t)}function Ge(e,t,r,n){const i=ve(r);return qe(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}function Ke(e,t){return Be(xe,e,t)}Symbol.iterator,be((function(e,t){if(t=Ee(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)ve(e[r])(t)}),2),be((function(e,t,r){return Ge(Ie,e,t,r)}),3),be((function(e,t,r,n){return Ge(Te(t),e,r,n)}),4),be((function(e,t,r){return Ge(xe,e,t,r)}),3),be((function(e,t,r){return Le(Boolean,(e=>e))(Ie,e,t,r)}),3),be((function(e,t,r,n){return Le(Boolean,(e=>e))(Te(t),e,r,n)}),4),be((function(e,t,r){return Le(Boolean,(e=>e))(xe,e,t,r)}),3),be((function(e,t,r){var n=ve(t);return Ae(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3),be((function(e,t){var r,n=null;return Ve(e,((e,t)=>{ve(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))})),be((function(e,t,r){r=$e(r);var n=ve(t),i=ve(e),o=[];function s(e,...t){if(e)return r(e);o=t,!1!==e&&i(a)}function a(e,t){return e?r(e):!1!==e?t?void n(s):r(null,...o):void 0}return i(a)}),3),be((function(e,t){if(t=Ee(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){ve(e[r++])(...t,$e(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])}));var Qe=r(17187);const Ye={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},Je="Finsemble.Application.State",Ze="Finsemble.ServiceManager.serviceInitializing",Xe="Finsemble.ServiceManager.serviceReady",et="Finsemble.ServiceManager.serviceClosing",tt="Finsemble.ServiceManager.serviceClosed",rt=e=>`Finsemble.ServiceManager.queryReady.${e}`,nt=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeyClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),it="Finsemble.State.Services";var ot;!function(e){e[e.NORMAL=0]="NORMAL",e[e.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",e[e.MAXIMIZED=2]="MAXIMIZED",e[e.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",e[e.TRANSITIONING=4]="TRANSITIONING"}(ot||(ot={}));const st="Finsemble.Service.Start",at="Finsemble.Service.Stop",ct={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},ut="Finsemble.Event.Interrupt",lt=["close-requested","closed","close-complete","_container-close-handlers"],dt={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},ft={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData","allowAutoArrange"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},pt={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},ht="finsemble.componentStateStorage",mt="Finsemble.WindowService.HeartbeatTimeout",gt={WINDOW_CLOSED:"LauncherService.WindowClosed"},yt={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"};class vt extends Qe.EventEmitter{constructor(e){var t;super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.whoAmI=null!==(t=e.whoAmI)&&void 0!==t?t:"Source unknown. Look for `waitFor()` and add third parameter",this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),this.startupTimer=null}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout"),this.callback("StartupDependency timeout error")}),1e4)}}function bt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class wt{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,r){const n=bt();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new vt({dependencies:e,callback:t,whoAmI:r});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[n]=i,this.checkDependencies(),i}onDependencyTimeout(e){const t=this.getOfflineClients();let r=`APPLICATION LIFECYCLE:STARTUP:Dependency (${e.whoAmI}) not online after 10 seconds.`;t.length&&(r=`${r} Waiting for these clients: ${t.join(", ")}.`),se.system.warn(r),e.emit("err",r)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:r,callback:n}=t;(!r.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(r.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),n&&n())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:r}=this.dependencies[t];e=e.concat(r.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,r)=>e.indexOf(t)===r))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class St{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){se.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const r=bt();this.dependencies[r]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:r}=this.dependencies[e];(se.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],r&&r())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){se.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class _t extends Qe.EventEmitter{constructor(){super(),this.startup=new wt,this.shutdown=new St,this.RouterClient=k,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),k.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:r}=e[t];"closed"===r&&this.shutdown.setServiceOffline(t)}))}listenForServices(){se.system.debug("DependencyManager:listenForServices before wait"),S.waitForBootStage("kernel","stageEntered",(()=>{se.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(it,((e,t)=>{se.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(tt,((e,t)=>{se.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const r={};r[t.data.name]={state:"closed"},this.onServiceStateChange(r)})),this.RouterClient.subscribe(Je,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":default:break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}const Ct=new _t,Et=async()=>new Promise((e=>{j.getManifest((t=>{e({err:null,data:t})}))})),$t=(e,t)=>{var r,n;return null!==(r=e.finsemble[t])&&void 0!==r?r:null===(n=e.finsemble)||void 0===n?void 0:n.custom[t]},Pt=(e,t)=>{let r=!1;const n=t.split(/[/\\:?=&\s]/);for(let i=0;i<n.length;i++)if("$"===n[i][0]){const o=n[i].substring(1),s=$t(e,o);if(void 0===s)ae.system.warn("ConfigUtil.resolveString",`Missing [${o}] variable from finsemble.custom configuration object`);else{const e=t.replace(n[i],s);ae.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",n[i],o,s,"old value=",t,"value=",e),r=!0,t=e}}return{configString:t,replacedMacro:r}},Tt=(e,t,r)=>{let n=!1;if(r>1e3)return ae.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:n};ae.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",r,"configArray:",t);for(let i=0;i<t.length;i++){const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=Pt(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?Tt(e,o,r+1):"object"==typeof o&&Rt(e,o,r+1)}return{replacedMacro:n}},Rt=(e,t,r)=>{let n=!1;return r>1e3?(ae.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:n}):(t=t||{},ae.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",r,"configObject:",t),Object.keys(t).forEach((i=>{const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=Pt(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?Tt(e,o,r+1):"object"==typeof o&&Rt(e,o,r+1)})),{replacedMacro:n})},Ot=new class{resolveManifestMacros(e,t){let r;for(r=0;r<100;r++){const{replacedMacro:r}=Rt(e,t,1);if(!r)break}r>=100&&ae.system.error("forceObjectsToLogger","resolveManifestMacros exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)}async getExpandedRawManifest(){ae.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await Et();return e||!t?ae.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(ae.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),ae.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async captureAndLogBadFileData(e){let t,r=null;ae.system.debug(`captureAndLogBadFileData for ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}}`:t=await n.text()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}r?ae.system.error("forceObjectsToLogger",`captureAndLogBadFileData failed for ${e}`,r):ae.system.error("forceObjectsToLogger",`captureAndLogBadFileData successful for ${e}`,t)}async fetchConfigFile(e){let t,r=null;ae.system.debug(`fetching import ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}`:t=await n.json()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}return r&&(ae.system.error("forceObjectsToLogger",r),this.captureAndLogBadFileData(e)),{err:r,data:t}}graftImportOnToManifest(e,t){Object.keys(t).forEach((r=>{if("importConfig"===r){e.finsemble.importConfig=e.finsemble.importConfig||[];for(let r=0;r<t.importConfig.length;r++)e.finsemble.importConfig.unshift(t.importConfig[r])}else if("importThirdPartyConfig"===r){e.finsemble.importThirdPartyConfig=e.finsemble.importThirdPartyConfig||[];for(let r=0;r<t.importThirdPartyConfig.length;r++)e.finsemble.importThirdPartyConfig.unshift(t.importThirdPartyConfig[r])}else e.finsemble[r]=t[r]})),this.resolveManifestMacros(e,e.finsemble),ae.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await Et();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||ae.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:r,data:n}=await this.fetchConfigFile(e);!r&&n?this.graftImportOnToManifest(t,n):ae.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${t.finsemble.moduleRoot}; Full Path=${e}`,r)}return{err:e,data:t}}promptAndSaveJSONToLocalFile(e,t){ae.system.debug("saveJSONToLocalFile",e,t);const r=JSON.stringify(t,null,"\t"),n=`data:application/json;charset=utf-8,${encodeURIComponent(r)}`,i=`${e}.json`,o=document.createElement("a");o.setAttribute("href",n),o.setAttribute("download",i),o.click()}configFormatForExport(e,t){ae.system.debug("configFormatForExport starting",e,t);let r=Q().cloneDeep(t);if("raw"===e);else if("all"===e)delete r.importConfig,delete r.comment;else if("application"===e)delete r.importConfig,delete r.comment,delete r.system,delete r.services;else if("workspace"===e)r={workspace:r};else if("workspaceTemplate"===e){const e={};e[r.name]=r,r={workspaceTemplates:e}}else"services"===e?r=r.services:"components"===e&&(r=r.components);return r}getDefault(e,t,r){let n=r;if(e){try{const r=t.split(".");let i=e;for(let e=1;e<r.length;e++)i=i[r[e]];n=i}catch(e){n=r}void 0===n&&(n=r)}return n}},kt={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},It=e=>{if(!e)return se.system.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const r=window.location.hostname===t.hostname,n=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=r&&i&&n;return se.system.debug(`Transport crossDomain=${It} (${r}:${n}:${i})`),!o},At=e=>{const{moduleRoot:t,router:r}=null==e?void 0:e.finsemble,{sameDomainTransport:n="SharedWorker",crossDomainTransport:i="IPCBus"}=null!=r?r:{};return It(t)?i:n};var xt,Nt,jt,Lt,Dt,Ft;!function(e){e.AppNotFound="AppNotFound",e.ErrorOnLaunch="ErrorOnLaunch",e.AppTimeout="AppTimeout",e.ResolverUnavailable="ResolverUnavailable"}(xt||(xt={})),function(e){e.NoAppsFound="NoAppsFound",e.ResolverUnavailable="ResolverUnavailable",e.ResolverTimeout="ResolverTimeout"}(Nt||(Nt={})),function(e){e.NoChannelFound="NoChannelFound",e.AccessDenied="AccessDenied",e.CreationFailed="CreationFailed"}(jt||(jt={})),Lt=function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),s=new R(n||[]);return o._invoke=function(e,t,r){var n=d;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw o;return k()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=$(s,r);if(a){if(a===m)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=l(e,t,r);if("normal"===c.type){if(n=r.done?h:f,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,s),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function g(){}function y(){}function v(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(O([])));S&&S!==r&&n.call(S,o)&&(b=S);var _=v.prototype=g.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,o,s,a){var c=l(e[i],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function $(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,$(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=l(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function O(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}return{next:k}}function k(){return{value:t,done:!0}}return y.prototype=_.constructor=v,v.constructor=y,y.displayName=c(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,a,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},C(E.prototype),E.prototype[s]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new E(u(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},C(_),c(_,a,"Generator"),_[o]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},Lt({exports:{}}),function(e){e.Contact="fdc3.contact",e.ContactList="fdc3.contactList",e.Country="fdc3.country",e.Instrument="fdc3.instrument",e.Organization="fdc3.organization",e.Portfolio="fdc3.portfolio",e.Position="fdc3.position"}(Dt||(Dt={})),function(e){e.StartCall="StartCall",e.StartChat="StartChat",e.ViewChart="ViewChart",e.ViewContact="ViewContact",e.ViewQuote="ViewQuote",e.ViewNews="ViewNews",e.ViewInstrument="ViewInstrument",e.ViewAnalysis="ViewAnalysis"}(Ft||(Ft={}));var Mt,Wt,Vt,Ut,zt,qt,Bt,Ht,Gt,Kt,Qt,Yt,Jt,Zt,Xt,er=function(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)},tr=function(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};class rr{constructor(){Mt.set(this,12e4),Wt.set(this,null),Vt.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(er(this,Wt,"f")),ae.system.debug("FinsembleDesktopAgent: heartbeat received"),tr(this,Wt,setTimeout((()=>{ae.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${er(this,Mt,"f")} milliseconds`),this.notifyDisconnect()}),er(this,Mt,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),er(this,Vt,"f").forEach((e=>{e(`No heartbeat received from interop service within ${er(this,Mt,"f")} milliseconds`)}))}onDisconnect(e){tr(this,Vt,er(this,Vt,"f").concat(e),"f")}stop(){clearTimeout(er(this,Wt,"f"))}}Mt=new WeakMap,Wt=new WeakMap,Vt=new WeakMap;class nr{constructor(e,t,r="app"){Ut.set(this,void 0),tr(this,Ut,e,"f"),this.id=t,this.type=r}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");er(this,Ut,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return er(this,Ut,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return er(this,Ut,"f").channelAddContextListener(this.id,e,t)}}Ut=new WeakMap;class ir{constructor({routerClient:e,startup:t}){if(zt.set(this,!1),qt.set(this,new rr),Bt.set(this,!1),Ht.set(this,""),Gt.set(this,`FSBL.FDC3.Client.${l()()}`),Kt.set(this,{}),Qt.set(this,{}),Yt.set(this,[]),Jt.set(this,void 0),Zt.set(this,void 0),Xt.set(this,""),tr(this,Jt,e,"f"),tr(this,Zt,t,"f"),this.cacheFSBLVersion(),a.Event&&a.dispatchEvent){const e=new a.Event("fdc3Ready");a.dispatchEvent(e)}}async cacheFSBLVersion(){""==er(this,Xt,"f")&&tr(this,Xt,"8.1.0","f");const{err:e,data:t}=await B.getValue({field:"finsemble.system.FSBLVersion"});e||tr(this,Xt,t,"f")}fdc3Error(e){return new Error(e)}meta(){return{uuid:er(this,Ht,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){er(this,qt,"f").registerHeartbeat()}triggerContextListeners(e){var t,r;const{context:n}=e.payload;let i;if(e.meta.targetSubscriberId){let t;Object.values(er(this,Qt,"f")).every((r=>(t=r.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),i=t?[t]:[]}else i=(null!==(t=er(this,Qt,"f")[null==n?void 0:n.type])&&void 0!==t?t:[]).concat(null!==(r=er(this,Qt,"f")["*"])&&void 0!==r?r:[]);i.forEach((({handler:t,channel:r})=>{e.meta.channel===r||!e.meta.channel&&!r?(ae.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=r?r:"default"} channel`,e.type,e),t(n)):ae.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=r?r:"default"} channel`,e.type,e)}))}triggerIntentListeners(e){const{intent:t,context:r}=e.payload,n=er(this,Kt,"f")[t];r&&(n||[]).forEach((e=>e(r)))}handleIncoming(e){switch(ae.system.debug("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e);break;case"heartbeat":this.handleHeartbeat()}}releaseQueue(){const e=e=>{var t;return void 0!==(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.uuid)&&(e.meta.uuid=er(this,Ht,"f")),e};er(this,Yt,"f").forEach((async t=>{const{message:r,handler:n,resolve:i}=t,{err:o,receiveMessage:s}=await this.exchange(e(r),n);i({err:o,receiveMessage:s})})),tr(this,Yt,[],"f")}exchange(e,t=(()=>{})){return new Promise((async r=>{if(er(this,zt,"f")){const{err:n,response:i}=await er(this,Jt,"f").query(o,e,t);r({err:n,receiveMessage:null==i?void 0:i.data})}else er(this,Yt,"f").push({message:e,handler:t,resolve:r}),this.start()}))}async connect(){var e;const t=er(this,Zt,"f").getStartupData(),{windowName:r="Unknown window",authenticationToken:n}=t;ae.system.log(`fdc3.connect StartupData for ${r}`,t),tr(this,Ht,`fdc3-${null===(e=null==n?void 0:n.meta)||void 0===e?void 0:e.name}-${l()()}`,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:er(this,Gt,"f"),windowName:r,authenticationToken:n}};S.waitForBootStage("kernel","stageCompleted",(e=>{e?ae.system.error("connect error waitingForBootStage",e):er(this,Jt,"f").query(o,i,(e=>{e?ae.system.error("connect error",e):(er(this,Jt,"f").addResponder(er(this,Gt,"f"),((e,t)=>{if(e||!t){const t=(e=>{var t,r;return null!==(r=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e)&&void 0!==r?r:null})(null!=e?e:"No request received on responder");ae.system.error(`FinsembleDesktopAgent can't listen on channel ${er(this,Gt,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),tr(this,zt,!0,"f"),ae.system.log(`FDC3 client connected for window ${r}`),this.releaseQueue(),er(this,qt,"f").start())}))}))}async start(){er(this,Bt,"f")||(tr(this,Bt,!0,"f"),await er(this,Zt,"f").onReady(),this.connect())}async stop(){er(this,qt,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),tr(this,Bt,!1,"f"),er(this,Jt,"f").removeResponder(er(this,Gt,"f")),tr(this,zt,!1,"f")}onDisconnect(e){er(this,qt,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const r={type:"currentContextRequest",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{contextType:t}},{err:n,receiveMessage:i}=await this.exchange(r);return n?null:"currentContext"===(null==i?void 0:i.type)?i.payload.context:null}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const r={type:"broadcast",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{context:t}};this.exchange(r)}async getSystemChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:r,receiveMessage:n}=await this.exchange(t);return r?[]:("systemChannels"===(null==n?void 0:n.type)?null===(e=null==n?void 0:n.payload)||void 0===e?void 0:e.channels:[]).map((e=>new nr(this,e,"system")))}async open(e,t){if(!e)throw new Error("Invalid arguments. The required target parameter is missing.");const r={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(xt.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error)}async findIntent(e,t){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");const r={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(Nt.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.appIntent)throw this.fdc3Error("Invalid response returned from InteropService for findIntent. No appIntent and no error.");return o.payload.appIntent}async findIntentsByContext(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:r}=await this.exchange(t),n=r;if(n.payload.error)throw this.fdc3Error(n.payload.error);return n.payload.intents||[]}async raiseIntent(e,t,r){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required context parameter is missing.");const n={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:r}},{err:i,receiveMessage:o}=await this.exchange(n),s=o;if(i)throw this.fdc3Error(Nt.ResolverUnavailable);if(s.payload.error)throw this.fdc3Error(s.payload.error);if(!s.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntent. No data.");return s.payload.data}async raiseIntentForContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const r={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(Nt.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntentForContext. No data.");return o.payload.data}addIntentListener(e,r){if(!r)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!r)throw new Error("Invalid arguments. The required handler parameter is missing.");er(this,Kt,"f")[e]=t(er(this,Kt,"f"),e,r);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const t={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(t),er(this,Kt,"f")[e]=i(er(this,Kt,"f"),e,r)}}}channelAddContextListener(e,r,n){const o=n&&r||"*";n||(n=r);const s=`subscriberId.${Date.now()}_${Math.random()}`,a={handler:n,channel:e,targetSubscriberId:s};er(this,Qt,"f")[o]=t(er(this,Qt,"f"),o,a);let c={type:"subscribeContext",meta:Object.assign(Object.assign({},this.meta()),{targetSubscriberId:s}),payload:{contextType:o}};return e&&(c.meta.channel=e),this.exchange(c),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:o}};e&&(t.meta.channel=e),er(this,Qt,"f")[o]=i(er(this,Qt,"f"),o,a),this.exchange(t)}}}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return this.channelAddContextListener(null,e,t)}async joinChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");return new nr(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:r}=await this.exchange(e),n=r;if(t)throw this.fdc3Error(t);if(n.payload.error)throw this.fdc3Error(n.payload.error);if(!n.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for getCurrentChannels. No data.");return n.payload.data.map((e=>new nr(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:er(this,Xt,"f")}}}zt=new WeakMap,qt=new WeakMap,Bt=new WeakMap,Ht=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,Qt=new WeakMap,Yt=new WeakMap,Jt=new WeakMap,Zt=new WeakMap,Xt=new WeakMap;class or{async startApp(){var e,t,r,n,i,o,s,c;const u=await(async()=>new Promise((e=>{j.Window.getCurrent().getOptions((t=>{e(t)}))})))(),d=j.Window.getCurrent(),f=null!==(r=null!==(e=d.name)&&void 0!==e?e:null===(t=null===document||void 0===document?void 0:document.location)||void 0===t?void 0:t.href)&&void 0!==r?r:"Unknown App",h=null!==(o=null!==(n=d.name)&&void 0!==n?n:null===(i=null===document||void 0===document?void 0:document.location)||void 0===i?void 0:i.href)&&void 0!==o?o:`Unknown window-${l()()}`,m=null!==(s=d.webContentsName)&&void 0!==s?s:h,g=null!==(c=(e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&Ot.resolveManifestMacros(t,t.finsemble),t})(u))&&void 0!==c?c:{},y=(({windowName:e,systemManifest:t,transportSettings:r})=>t?((e,t)=>{var r,n,i;if(se.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const o=e.finsemble,s=null!==(i=null!==(n=null===(r=null==o?void 0:o.router)||void 0===r?void 0:r.transportSettings)&&void 0!==n?n:null==o?void 0:o.IAC)&&void 0!==i?i:{};return{windowName:t,routerDomainRoot:o.moduleRoot,transportName:At(e),transportSettings:s}}return se.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),Object.assign(Object.assign({},kt),{windowName:t})})(t,e):Object.assign(Object.assign({},kt),{windowName:e,transportSettings:null!=r?r:{}}))({windowName:h,systemManifest:g});await O.start(y);const v=p.getInstance();v.setStartupData({windowName:h,webContentsName:m,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:f}}}),a.fdc3=new ir({routerClient:k,startup:v}),v.setReady()}async stopApp(){O.stop()}}a.addEventListener&&a.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?se.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(se.console.warn(`Logger client caught what is likely a DOM error event where type=${null==e?void 0:e.type} and target=${null==e?void 0:e.target}. Probably due to <img> or <script> failing to load. See component's browserView window for more details.`),console.warn("Event Details (for above message)",e))}),!0),a.addEventListener&&a.addEventListener("unhandledrejection",(e=>{se.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),(()=>{if(j.isBrowserView())return void se.console.log("Logger client console.error is not wrapped to capture logs.");se.console.log("Logger client console.error is wrapped to capture logs.");const e=console.error.bind(a.console);console.unwrappedError=console.error,console.error=function(...t){let r;t.push("(console error)");try{r=JSON.parse(JSON.stringify(t))}catch(n){r="console.error: arguments could not be serialized for logging",t.push("arguments could not be serialized to send to Central Logger"),e(...t)}se.console.error(...r)}})();const{SERVICE_INITIALIZING_CHANNEL:sr,SERVICE_READY_CHANNEL:ar,SERVICE_QUERY_READY_CHANNEL:cr,SERVICE_CLOSING_CHANNEL:ur,SERVICE_CLOSED_CHANNEL:lr,SERVICE_STOP_CHANNEL:dr}=e,fr={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};class pr{constructor(e=fr){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=fr.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=fr.startupDependencies.clients)):e.startupDependencies=fr.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=fr.shutdownDependencies.services):e.shutdownDependencies=fr.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=se,this.RouterClient=k,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),a.finsembleServices?a.finsembleServices.push(this):a.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function r(e){se.system.debug("BaseService.start.setParentUUID"),j.Window.getCurrent().getOptions((r=>{t.customData=r.customData,e()}))}async function n(){await(new or).startApp(),k.addResponder(cr(e.name),((t,r)=>{(e.status="ready")?null==r||r.sendQueryResponse(null):null==r||r.sendQueryResponse("service not ready")})),"routerService"!==t.name&&k.transmit(sr,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),se.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const r=t.customData.debugServiceDelay||0;if(se.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(r))r>0&&se.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${r} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${r}") for ${t.name}. Value must be an integer.`;se.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),S.systemLog({error:!0},e)}setTimeout(e,r)}function o(e){se.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),se.console.log("Startup Dependencies for",t.name,t.startupDependencies),se.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),Ct.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),se.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),k.transmit(`${j.Window.getCurrent().name}.onSpawned`,{name:j.Window.getCurrent().name},{suppressWarnings:!0}),Ct.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{se.system.error(e)}))}function s(e){const r=j.Window.getCurrent();r.isShowing((n=>{n&&!1!==t.customData.showDevConsoleOnVisible?j.showDeveloperTools(r.name,null,e):(se.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return se.system.debug(`${this.name} starting`),new Promise((e=>{Ke([n,r,s,i,o],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${dr}.${this.name}`,(()=>{Ct.shutdown.checkDependencies()})),this.status="ready",k.transmit(ar,{serviceName:this.name},{suppressWarnings:!0}),se.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),S.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){se.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),se.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){se.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(k.transmit(ur,{waitForMe:!0,name:this.name}),Me(this.listeners.onShutdown,(function(e,t){he(e)(null,t)}),(function(t){t&&se.system.error(t),e.shutdownComplete()}))):(k.transmit(ur,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){se.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),k.transmit(lr,{name:this.name})}}const hr=(e,t)=>{const r=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<r.length;++t){const n=r[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(n in e))return null;e=e[n]}return e};function mr(e,t,r){let n;if(t||(t=null),"object"!=typeof e)return n=t?`${t}.${e}`:e,void(r[n]=t);for(const i in e)"object"==typeof e[i]&&"undefined"!==e[i]?(n=t?`${t}.${i}`:i,r[n]=t,mr(e[i],n,r)):(n=t?`${t}.${i}`:i,r[n]=t)}const gr=(e,t,r)=>{if(r[t])return;const n=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),i=t;if(!r.hasOwnProperty(i)){let e=null;n.length>1&&(n.pop(),e=n.join(".")),r[i]=e}const o=hr(e,i);if("undefined"!==o&&"object"==typeof o)for(const t in o)gr(e,`${i}.${t}`,r)},yr=(e,t,r)=>null!==hr(e,t)&&((e,t)=>{const r=[];for(const n in e){const i=`${t}.`;n.includes(i)&&(r.push(n),delete e[n])}return r})(r,t),vr=class{constructor(e,t,r){var n,i;this.isGlobal=!1,this.values={},this.listeners={},this.registeredDispatchListeners=[],this.mapping={},this.subs={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e)ae.system.error("DistributedStoreClient",e);else{const{store:e,field:r,storeData:n,value:i}=t.data;if(e){const e=r?`.${r}`:"",t=`${this.name}${e}`,o=n||i;this.triggerListeners(t,o)}}},this.routerClient=t,this.removeStoreCallback=r,this.isGlobal=!!e.global,this.name=null!==(i=null!==(n=e.name)&&void 0!==n?n:e.store)&&void 0!==i?i:"StoreModel() invariant. store.name not provided.",e.values&&(this.values=e.values),mr(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,((e,t)=>{this.handleDispatchedMessages(e,t)}))}handleDispatchedMessages(e,t){(null==t?void 0:t.data)&&this.registeredDispatchListeners.forEach((e=>{e(t.data)}))}setValue(e,t){if(e.field||ae.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||ae.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const r={store:this.name,field:e.field,value:e.value};this.routerClient.query("storeService.setValue",r,(e=>{t&&t(e)}))}else{const r=yr(this.values,e.field,this.mapping);Q().set(this.values,e.field,e.value),gr(this.values,e.field,this.mapping),r&&this.sendRemovals(r),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t&&t(null)}}publishObjectUpdates(e,t){const r=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,hr(this.values,e)),e=r[e]}sendRemovals(e){for(let t of e)this.triggerListeners(`${this.name}.${t}`,hr(this.values,t))}setValues(e,t){return e?Array.isArray(e)?void Me(e,((e,t)=>{this.setValue(e,((e,r)=>{t("string"==typeof e?new Error(e):e)}))}),(e=>t?t(e):null)):ae.system.error("DistributedStore.setValues:params must be an array"):ae.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return null==t||t("no field provided"),"no field provided";if(!this.isGlobal){const r=hr(this.values,e.field);return null==t||t(null,r),r}return this.getGlobalValue(e.field,t),null}getAll(e){if(!this.isGlobal)return e&&e(null,this.values),this.values;this.getGlobalValues(null,e)}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return{[e]:this.getValue(e,t)};if(this.isGlobal)return this.getGlobalValues(e,t);const r={};for(let t=0;t<e.length;t++){const n=e[t],i="string"==typeof n?n:n.field,o=hr(this.values,i);r[i]=o}return t?t(null,r):r}async getGlobalValue(e,t){const{err:r,response:n}=await this.routerClient.query("storeService.getValue",{store:this.name,field:e});return null==t||t(r,n.data),{err:r,data:n.data}}getGlobalValues(e,t){this.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,r)=>{t&&t(e,r.data)}))}removeValue(e,t){if("string"==typeof e&&(e={field:e}),e.field||ae.system.error("DistributedStore.removeValue:no field provided",e),this.isGlobal){const r={store:this.name,field:e.field};this.routerClient.query("storeService.removeValue",r,(e=>{t&&t(e)}))}else{const r=yr(this.values,e.field,this.mapping);Q().unset(this.values,e.field),r&&this.sendRemovals(r),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),delete this.mapping[e.field],t&&t(null)}}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");const r=e.map((e=>"string"==typeof e?e:e.field));Ae(r,this.removeValue,((e,r)=>t(e,r)))}destroy(e){const t={store:this.name,global:this.isGlobal};this.removeStoreCallback(t,(t=>{t?e&&e(t):e&&e(null,!0)}))}changeSub(e){this.subs[e]||(this.isGlobal&&this.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,r){var n;"function"==typeof e&&(t=e,e={});const{field:i}=e,o=i?`.${i}`:"",s=`${this.name}${o}`;this.listeners[s]=[t].concat(null!==(n=this.listeners[s])&&void 0!==n?n:[]),this.changeSub(s),null==r||r()}addListeners(e,t,r){var n;if(!Array.isArray(e))return ae.deprecated("distributedStoreClient StoreModel - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),void this.addListener(e,t,r);const i="function"==typeof t?t:null;for(let t=0;t<e.length;t++){const r=e[t];let o="string"==typeof r?r:r.field;const s="string"!=typeof r?r.listener:i;if(s){const e=o?`.${o}`:"",t=`${this.name}${e}`;this.listeners[t]=[s].concat(null!==(n=this.listeners[t])&&void 0!==n?n:[]),this.changeSub(t)}}null==r||r()}removeListener(e,t,r){const{field:n}=e,i=n?`.${n}`:"",o=`${this.name}${i}`;if(this.listeners[o])for(let e=0;e<this.listeners[o].length;e++)if(this.listeners[o][e]===t)return this.listeners[o].splice(e,1),void(null==r||r(null,!0));null==r||r(null,!1)}removeListeners(e,t,r){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,r):e.field&&t&&this.removeListener(e,t,r),null==r?void 0:r(null,!0);const n="function"==typeof t?t:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,r="string"!=typeof e?e.listener:n,i=t?`.${t}`:"",o=`${this.name}${i}`;this.listeners[o]=this.listeners[o].filter((e=>e!==r))})),null==r||r(null,!0)}triggerListeners(e,t){var r;(null!==(r=this.listeners[e])&&void 0!==r?r:[]).forEach((r=>{ae.system.debug("DistributedStore.triggerListeners",e,t),r(null,{field:e,value:t})}))}},br=()=>new Promise((e=>{k.subscribe("distributedStoresLoading",((t,r)=>{if(t||!r.data){const r=`Error waiting for persistent stores ${t}`;se.system.error(r),e(r)}"done"===r.data.State&&e(null)}))}));let wr={};const Sr=async(e,t)=>e.global?(async(e,t)=>{const{err:r}=await k.query("storeService.removeStore",e);return t&&t(r,!!r),{err:r,data:!!r}})(e,t):wr[e.store]?(delete wr[e.store],t&&t(null,!0),{data:!0}):{err:`Local store named ${e.store} not found`},_r=async(e,t)=>{if(e.persist){const e=await br();if(e)return null==t||t(e),{err:e}}else await S.waitForStartup("dataStoreService");const{err:r,response:n}=await k.query("storeService.createStore",e);if(r)return se.system.error("DistributedStoreClient:createStore() Failed to create a global store",e.store,r),null==t||t(r),{err:r};const i=new vr(n.data,k,Sr);return null==t||t(r,i),{err:r,data:i}},Cr=async(e,t)=>(se.system.info("DistributedStoreClient:createStore()",e),e.global?_r(e,t):(async(e,t)=>{const r=wr[e.store];if(r)return t&&t(null,r),{data:r};const n=new vr(Object.assign(Object.assign({},e),{name:e.store}),k,Sr);return wr[n.name]=n,t&&t(null,n),{data:n}})(e,t)),Er=class{constructor(t,r){var n;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=t.event,this.source=t.source,this.sourceType=t.sourceType,this.listenerGuid=t.listenerGuid,e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),e[this.sourceType.toUpperCase()]&&e[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=t.handler,this.queryMessage=r,this.guid=null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.guid,this.internalHandler()}async internalHandler(){var e,t;this.data=null===(t=null===(e=this.queryMessage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){var e;this.allowDelay?(this.delayed=!0,null===(e=this.queryMessage)||void 0===e||e.sendQueryResponse(null,{wait:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?k.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):null===(t=this.queryMessage)||void 0===t||t.sendQueryResponse(null,{canceled:this.canceled,data:e})}};var $r=r(50361),Pr=r.n($r);class Tr{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}class Rr extends class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.closedHandlersExecuted=0,this.handlers=[],this.closeFinalHandler=null,this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}closeFinal(e){this.closeFinalHandler=e;const t=`${this.name}_public_${Date.now()}_${Math.random()}`;k.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:"closed",listenerGuid:t,windowName:this.thisWindowName});const r=(...e)=>{this.howManyClosedHandlers()||(this.closeFinalHandler&&this.closeFinalHandler(...e),this.closeFinalHandler=null)},n=`Finsemble.Interrupt.${t}`;k.addResponder(n,((e,n)=>{new Er({source:this.name,sourceType:this.sourceType,listenerGuid:t,handler:r,event:"closed"},n)})),this.openResponders.push(n)}howManyClosedHandlers(){return this.handlers.filter((e=>"closed"===e.event)).length}addEventListener(e,t){se.system.debug("PublicEventManager.addEventListener:",e);const r=`${this.name}_public_${Date.now()}_${Math.random()}`,n="closed"!==e?t:(...e)=>{t(...e),this.closedHandlersExecuted++,this.closedHandlersExecuted===this.howManyClosedHandlers()&&this.closeFinalHandler&&(this.closeFinalHandler(),this.closeFinalHandler=null)};this.handlers.push({event:e,handler:n,listenerGuid:r}),k.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:r,windowName:this.thisWindowName});const i=`Finsemble.Interrupt.${r}`;return k.addResponder(i,((t,i)=>{new Er({source:this.name,sourceType:this.sourceType,listenerGuid:r,handler:n,event:e},i)})),this.openResponders.push(i),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,r=!0){if(se.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const n=this.handlers.findIndex((r=>r.event===e&&r.handler===t));if(-1===n)return void(r&&se.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:i}=this.handlers[n];k.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:i,windowName:this.thisWindowName}),k.removeResponder(`Finsemble.Interrupt.${i}`),this.handlers.splice(n,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{k.removeResponder(e)}))}}{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=ot.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=ot,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=kr("activeWorkspace",this.name,this.name),this.windowKey=kr("activeWorkspace",this.name),Rr.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,r=!1){if("closed"!==e||!c.finsembleWindow||this.name!==c.finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t,r)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new Rr(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const r=Rr;r.types||(r.types={}),r.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var r;const{uuid:n,windowType:i}=t;if(!1!==t.waitForReady)try{await Rr._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}se.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const o=Rr.cache[e];return o?(se.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:o}):{data:(await Rr._createWrap(Object.assign(Object.assign({},t),{windowIdentifier:null!==(r=t.windowIdentifier)&&void 0!==r?r:{uuid:n,name:e,windowName:e,windowType:i}}))).wrap}}static getInstance(e,t){var r;const n=j.Window.getCurrent().name,i=null!==(r=null==(e=Pr()(e))?void 0:e.windowName)&&void 0!==r?r:null==e?void 0:e.name;return new Promise((async(r,o)=>{if(!i){const e='"name" is a required param';return null==t||t(e),void o(e)}e.windowName=i;let s=Rr.cache[i];if(s)return se.system.debug("WRAP LIFECYCLE:",i,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,s),void r({wrap:s});if(e.name){const{err:n,data:s}=await Rr.createWrapFromUUIDAndName(i,e);return n||!s?(null==t||t(n),void o(n)):(null==t||t(null,s),void r({wrap:s}))}if(!1!==e.waitForReady)try{await Rr._windowReady(i),e.wrapState="ready"}catch(a){return null==t||t(a,null),void o(a)}const{err:a,response:c}=await k.query("WindowService-Request-getWindowIdentifier",{windowName:i,requester:n});if(a)return se.system.error(a),null==t||t(a,null),void o(a);if(s=Rr.cache[i],s)return se.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,s),void r({wrap:s});se.system.debug("WRAP LIFECYCLE:",i,"Information received from launcher. Creating wrap.");const{identifier:u}=c.data;u.windowName&&(u.name=u.windowName),e.retrievedIdentifier=u,({wrap:s}=await Rr._createWrap(e)),c.data.descriptor&&(s.descriptor=c.data.descriptor),null==t||t(null,s),r({wrap:s})}))}static _createWrap(e){return new Promise((async t=>{const r=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||r.windowType)&&"WebApplication"!==r.windowType||(r.windowType="WebWindow");let n=Object.assign({},r);n=Object.assign(n,e),n.setWindowType=n.windowType,delete n.windowType,se.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",r.windowName);let i=new Rr(n);Rr.cache[r.windowName]=i,i.windowType=r.windowType,i.identifier=r,i.closeFinal(i.handleWrapRemoveRequest),i.addEventListener("maximized",(()=>{i.windowState=ot.MAXIMIZED,i.windowOptions.windowState=ot.MAXIMIZED})),i.addEventListener("minimized",(()=>{i.windowState===ot.MAXIMIZED?(i.windowState=ot.MINIMIZED_WAS_MAXIMIZED,i.windowOptions.windowState=ot.MINIMIZED_WAS_MAXIMIZED):i.windowState===ot.NORMAL?(i.windowState=ot.MINIMIZED_WAS_NORMAL,i.windowOptions.windowState=ot.MINIMIZED_WAS_NORMAL):se.system.warn("Invalid window state received listening to window minimize",i.windowState)})),i.addEventListener("restored",(()=>{i.windowState=ot.NORMAL,i.windowOptions.windowState=ot.NORMAL}));const o=k.subscribe(`Finsemble.Component.State.${r.windowName}`,((e,t)=>{if(e)se.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,k.unsubscribe(o)}}));await(async(e,t)=>new Promise((r=>{e.parentSubscribeID=k.subscribe(`Finsemble.parentChange.${t.windowName}`,(async(t,n)=>{if(t)se.system.error("FinsembleWindow parent change notification error",t);else{const t=n.data||{};"Added"===t.type?(se.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",t),await e.setParent(t.stackedWindowIdentifier)):"Exists"===t.type?(se.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",t),await e.setParentOnWrap(t.stackedWindowIdentifier)):"Removed"===t.type?(se.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",t),e.clearParent()):t.type&&se.system.error("FinsembleWindow Parent Notification: unknown type",t)}r()}))})))(i,r),t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${j.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),se.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==c.name&&this.name&&delete Rr.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(Rr.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=Rr._getRemoveWrapChannel(this.name);k.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&k.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),k.unsubscribe(this.parentSubscribeID)}onReady(e){return new Promise((t=>{if("ready"===this.wrapState)return null==e||e(),void t();this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,r=Function.prototype){return"function"==typeof t&&(r=t,t={}),t=Object.assign(Object.assign({},t),{windowIdentifier:this.identifier}),se.setting().system.Debug&&(t.callstack=se.callStack()),new Promise((async(n,i)=>{var o;if("close"!==e&&"setParent"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void n(await this.queryWindowService(e,t));se.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:s,response:a}=await k.query(this.windowServiceChannelName(e),t);let c=null!==(o=a.data)&&void 0!==o?o:null;if(s){if(se.system.debug(`WindowService.${e}: failed`,s),console.debug(`WindowService.${e}: failed`,s),"getComponentState"!==e&&"Not found"!==s)return void i(s)}else se.system.debug(`${this.windowServiceChannelName(e)} successful`,c),console.debug(`${this.windowServiceChannelName(e)} successful`,c);n(c),r(s,c)}))}minimize(e=null,t){return new Promise((r=>{this.queryWindowService("minimize",e,(e=>{null==t||t(e),r({err:e})}))}))}maximize(e=null,t){return new Promise((r=>{this.getBounds(((n,i)=>{n||!i?se.system.warn(`Error getting bounds, cached bounds will not be set: ${n}`):this.updateOptions({options:{defaultLeft:i.left,defaultTop:i.top,defaultWidth:i.width,defaultHeight:i.height}}),this.queryWindowService("maximize",e,(e=>{null==t||t(e),r({err:e})}))}))}))}restore(e=null,t){return new Promise((r=>{this.queryWindowService("restore",e,(e=>{null==t||t(e),r({err:e})}))}))}blur(e=null,t){return new Promise((r=>{this.queryWindowService("blur",e,(e=>{null==t||t(e),r({err:e})}))}))}focus(e=null,t){return new Promise((r=>{this.queryWindowService("focus",e,(e=>{null==t||t(e),r({err:e})}))}))}bringToFront(e=null,t){return new Promise((r=>{this.queryWindowService("bringToFront",e,(e=>{null==t||t(e),r({err:e})}))}))}setAlwaysOnTop(e={alwaysOnTop:!0},t){return new Promise((r=>{this.queryWindowService("setAlwaysOnTop",e,(e=>{null==t||t(e),r({err:e})}))}))}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",e,t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,r=Function.prototype){const n={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",n,r)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const r=await this.queryWindowService("addBrowserView",e,t);return new Tr({id:r,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){return new Promise((r=>{"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,(e=>{null==t||t(e),r({err:e})}))}))}getBounds(e,t){return new Promise((r=>{const n="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==n||n(e,t),r({err:e,data:t})}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t){return new Promise((r=>{this.queryWindowService("hide",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t){return new Promise((r=>{this.queryWindowService("show",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((r=>{se.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{se.system.debug("WRAP CLOSE. Public close initiated for",this.name),null==t||t(e),r({err:e})}))}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{k.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){k.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},r=Function.prototype){const n=()=>{k.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),r()};e?this.registerWithDocking(t,n):n()}wrapReady(){k.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){se.system.debug("FinsembleWindow.startTabTileMonitoring",e),k.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){se.system.debug("FinsembleWindow.stopTabTileMonitoring",e),k.query("TabTile.stopTabTile",{params:e},(function(e,r){e?se.system.warn("TabTile.stopTabTile: query failed",e):se.system.debug("TabTile.stopTabTile results",r.data);const n=r.data;t?t(e,n,this.defaultStopTrackingAction):this.defaultTabTileAction(n)}))}defaultTabTileAction(e){const t=this;switch(se.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(r){t.Group.addWindow(this.identifier,r,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:se.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},r={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,r),this.windowOptions.bounds=t}startMove(e={}){se.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,k.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){se.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,k.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){k.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,r)=>r?e(r.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){se.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),k.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?Rr.getInstance(this.settingParent,((t,r)=>{e(null,r)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}async setParent(e,t){return new Promise((r=>{this.settingParent?this.getParent(((e,n)=>{null==t||t(e,n),r({err:e,data:n})})):(this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(se.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,null==t||t(null,this.parentWindow),r({data:this.parentWindow})):this.queryWindowService("setParent",e,(()=>{se.system.debug("FinsembleWindow.setParent",e),Rr.getInstance(e,((n,i)=>{n?se.system.error("FinsembleWindow.setParent error",n):(se.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=i,this.parentWindow.windowType.includes("StackedWindow")||this.parentWindow.windowName.includes("StackedWindow")||se.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),k.transmit(ct.REQUEST_PUBLISH,null),this.settingParent=!1;const o=()=>{this.removeEventListener("parent-set",o),null==t||t(n,i),r({err:n,data:i})};this.addEventListener("parent-set",o)}))})))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(se.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{se.system.debug("FinsembleWindow.setParentOnWrap",e),Rr.getInstance(e,((r,n)=>{r?se.system.error("FinsembleWindow.setParentOnWrap error",r):(se.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=n,!1===this.parentWindow.windowType.includes("StackedWindow")&&!1===this.parentWindow.windowName.includes("StackedWindow")&&se.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(r,n)}))}))}clearParent(){se.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){se.system.debug("Title change",e),k.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((r,n)=>{null==e||e(r,n),t({err:r,data:n})}))}))}_privateManagementPreface(e,t){var r,n;return"function"==typeof t&&se.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:null===(r=this.identifier)||void 0===r?void 0:r.windowName,windowType:null===(n=this.identifier)||void 0===n?void 0:n.windowType},se.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((r=>{k.query("StackedWindow.addWindow",e,((e,n)=>{se.system.debug("StackedWindow.addWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((r=>{k.query("StackedWindow.removeWindow",e,((e,n)=>{se.system.debug("StackedWindow.removeWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((r=>{k.query("StackedWindow.deleteWindow",e,((e,n)=>{se.system.debug("StackedWindow.deleteWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((r=>{k.query("StackedWindow.setVisibleWindow",e,((e,n)=>{se.system.debug("StackedWindow.setVisibleWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((r=>{k.query("StackedWindow.reorder",e,((e,n)=>{se.system.debug("StackedWindow.reorder callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;k.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;k.query("DockingService.leaveGroup",{name:e},(()=>{}))}}function Or(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const r in e)t[r]=void 0===t[r]?Or(e[r],null):t[r];return t}function kr(...e){let t="";for(let r=0;r<e.length;r++)t=`${t} ${e[r]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))}Rr.WINDOWSTATE=ot,Rr.wrap=Rr.getInstance,Rr.cache={},Rr._windowReady=function(e){let t;return se.system.debug(`windowServiceReady: ${e} starting`),new Promise((async(r,n)=>{se.system.debug(`windowServiceReady: ${e} waiting`),t=k.subscribe(`Finsemble.Component.State.${e}`,((n,i)=>{const{state:o}=i.data;switch(se.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":se.system.debug(`windowServiceReady: ${e} ${o}`),k.unsubscribe(t),r()}}))}))},r(27361),r(78718),r(18446),r(28368);const Ir=["setValue","removeProperty","logMessage"],Ar=new class{getChildPropertyValue(e,t,r){let n;if(t.includes("[")){let i=(t=t.replace("]","[")).split("[");if(3!==i.length)throw new Error(`"illegal array syntax ${t} within ${r} so skipping`);{let t=i[0],o=i[1];if(n=e[t][o],void 0===n)throw new Error(`"undefined array element ${t}[${o}] within ${r} so skipping`)}}else n=e[t];return n}setChildPropertyValue(e,t,r,n,i){let o;if(o="object"==typeof r&&n?Or(r):r,t.includes("[")){let r=(t=t.replace("]","[")).split("[");if(3!==r.length)throw new Error(`"illegal array syntax ${t} within ${i} so skipping`);{let t=r[0],n=r[1];if(void 0===e[t][n])throw new Error(`"undefined array element ${t}[${n}] within ${i} so skipping`);e[t][n]=o}}else e[t]=o}findConfigPropertyValue(e,t){let r,n,i;if(t)for(r=e,i=t.split("."),n=0;n<i.length&&(r=this.getChildPropertyValue(r,i[n],t),"object"==typeof r);n++);return n<i.length-1&&(r=void 0),ae.system.debug("DeprecatedConfigUtil.findConfigParent",t,r),r}findConfigParent(e,t){let r=t.split("."),n=e;for(let e=0;e<r.length-1;e++)r[e].includes("[")||n[r[e]]||(n[r[e]]={}),n=this.getChildPropertyValue(n,r[e],t);return ae.system.debug("DeprecatedConfigUtil.findConfigParent",t,n),n}getLastPathProperty(e){let t=e.split(".").pop();return ae.system.debug("DeprecatedConfigUtil.getLastPathProperty",e,t),t}copyObjectProperties(e,t,r){let n;n="object"==typeof t&&r?Or(t):t,Object.assign(e,n)}systemLog(e){let t=ae.system.warn;return"error"===e&&(t=ae.system.error),t}moveConfigProperty(e,t){let r=this.findConfigPropertyValue(e,t.oldProperty);if(void 0!==r){let n=this.findConfigParent(e,t.newProperty),i=this.getLastPathProperty(t.newProperty);t.addToExistingObject&&"object"==typeof n[i]&&!Array.isArray(n[i])?this.copyObjectProperties(n[i],r,t.clone):this.setChildPropertyValue(n,i,r,t.clone,t.newProperty),this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config ${t.oldProperty} was found and updated to ${t.newProperty}`),t.removeOld&&(delete this.findConfigParent(e,t.oldProperty)[this.getLastPathProperty(t.oldProperty)],ae.system.log(`"DeprecatedConfig: ${t.oldProperty} removed`))}else ae.system.warn(`"DeprecatedConfig: ${t.oldProperty} not found so skipped`,t)}setPropertyValue(e,t){let r=this.findConfigPropertyValue(e,t.property);t.ifOldValue&&t.ifOldValue!==r||(this.findConfigParent(e,t.property)[this.getLastPathProperty(t.property)]=t.newValue,this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config value for ${t.property} set to ${t.newValue}`))}removeProperty(e,t){let r=this.findConfigParent(e,t.property),n=this.getLastPathProperty(t.property);void 0!==r[n]&&(delete r[n],this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config property ${t.property} removed`))}getWildCardListItems(e,t){let r=[],n=e;if(t.includes("*")){let e=t.split(".");for(let t=0;t<e.length;t++){if("*"===e[t]){"object"==typeof n&&(r=Object.keys(n));break}if(n=n[e[t]],"object"!=typeof n)break}}return r}wildCardMismatch(e,t){let r,n=e.indexOf("*"),i=e.indexOf("*");return r=-1!==n&&e.substring(0,n)!==t.substring(0,i),r}displayDeprecationMessage(e,t){null!=this.findConfigPropertyValue(e,t.property)&&this.systemLog(t.userMessageType)(`${t.versionDeprecated} deprecated config found for ${t.property}. ${t.userMessage}`)}deprecatedRequest(e,t){if(Array.isArray(e.set)){let r=e.set;delete e.set;for(let n=0;n<r.length;n++){let i=Object.keys(r[n]);for(let t=0;t<i.length;t++)e[i[t]]=r[n][i[t]];this.processDeprecatedProperty(context,t,e)}}else ae.system.log("DeprecatedConfigUtil.processDeprecatedProperty skipping illegal set operation",e)}singlePathOperation(e,t){const r=this.getWildCardListItems(t,e.property);if(0===r.length)switch(e.operation){case"setValue":ae.system.debug(`DeprecatedConfigUtil.setValue for property ${e.property}`,e),this.setPropertyValue(t,e);break;case"removeProperty":ae.system.debug(`DeprecatedConfigUtil.removeProperty for ${e.property}`,e),this.removeProperty(t,e);break;case"logMessage":ae.system.debug(`DeprecatedConfigUtil.logMessageOnly for ${e.property}`,e),this.displayDeprecationMessage(t,e)}else{let n,i=e.property.slice();for(;n=r.pop();)e.property=i.replace(".*.",`.${n}.`),this.processDeprecatedProperty(context,t,e)}}moveProperty(e,t){if(this.wildCardMismatch(e.oldProperty,e.newProperty))ae.system.warn(`DeprecatedConfig: wildCards are mismatched for ${e.oldProperty} and ${e.newProperty} so ignoring`,e);else{const r=this.getWildCardListItems(t,e.newProperty);if(0===r.length)ae.system.debug(`DeprecatedConfigUtil.moveProperty from ${e.oldProperty} to ${e.newProperty}`,e),this.moveConfigProperty(t,e);else{let n,i=e.oldProperty.slice(),o=e.newProperty.slice();for(;n=r.pop();)e.oldProperty=i.replace(".*.",`.${n}.`),e.newProperty=o.replace(".*.",`.${n}.`),this.processDeprecatedProperty(context,t,e)}}}processDeprecatedProperty(e,t,r){try{void 0===r.when||r.when[e]?r.set?this.deprecatedRequest(r,t):Ir.includes(r.operation)?this.singlePathOperation(r,t):"moveProperty"===r.operation?this.moveProperty(r,t):ae.system.warn("DeprecatedConfigUtil.processDeprecatedProperty skipping unknown operation",r):ae.system.log("DeprecatedConfigUtil.processDeprecatedProperty skipping item because wrong context",r)}catch(e){ae.system.error(`DeprecatedConfig: error caught: ${e}`,r)}}modifyConfigBasedOnDeprecatedDefinitions(e,t){if(Array.isArray(t.finsemble.deprecatedConfig)){let r=t.finsemble.deprecatedConfig;for(let n=0;n<r.length;n++)ae.system.debug("DeprecatedConfigUtil.modifyConfigBasedOnDeprecatedDefinitions processing",e,r[n]),this.processDeprecatedProperty(e,t,r[n])}return!0}};var xr=r(1581),Nr=r.n(xr),jr=r(5477),Lr=r.n(jr);const Dr="%&%",Fr="%%",Mr=new class{constructor(){this.generatedDocLines=[],this.knownPropertiesMap={},this.previousLevel=0}formatValidationErrors(e){return e.map((e=>`In '${e.instancePath}', error: '${e.message}', with params '${JSON.stringify(e.params)}'`))}schemaValidate(e,t,r,n){let i=!1;try{var o=e.getSchema(`Finsemble${r}`);o(n)?(console.log("JSON Schema Validation: No Errors"),ae.system.log("JSON Schema Validation: Done With No Errors"),i=!0):ae.system.error("forceObjectsToLogger","JSON Schema Validation Errors",this.formatValidationErrors(o.errors),"Details",o.errors,"manifest",n,"schema",t)}catch(e){console.log("schemaValidate catch: ",e,t,n),ae.system.error("forceObjectsToLogger","schemaValidate catch",e,t,n)}return i}async validateConfig(e,t){console.log("JSON Schema Validation: validateConfig",t,e),ae.system.debug("forceObjectsToLogger","JSON Schema Validation: validateConfig",t,e);let r=!1,n={strict:"log",allErrors:!0,verbose:!0,useDefaults:!1};if(this.finsembleSchema&&this.ajv)r=!0;else try{const{err:t,data:i}=await Ot.fetchConfigFile(e.finsemble.configSchemaURL);this.finsembleSchema=i,t&&ae.system.error(`getFile error: ${t}`),this.ajv=new(Nr())(n),Lr()(this.ajv),this.ajv.addSchema(this.finsembleSchema,"Finsemble"),r=!0}catch(e){ae.system.error(`validateConfig: Error thrown reading or adding schema: ${e}`)}let i=!1;return r?(ae.system.debug("ConfigService: schema read",this.finsembleSchema),this.schemaValidate(this.ajv,this.finsembleSchema,t,e)||(i=!0)):(ae.system.error("Failure reading config schema. Confirm the schema URL configured in finsemble.configSchemaURL is correct and the file contains a valid JSON schema."),i=!0),i}setDefaultForForOneProperty(e,t,r){ae.system.debug(`setDefaultForForOneProperty: ${t}=${r}`);let n=null,i=e,o=t.split(Fr);for(let e=1;e<o.length-1;e++){let t=o[e];if(t.includes(Dr)){let e=t.split(Dr),r=e[0],n=e[1];i=i[r][n]}else i[t]||(i[t]={}),i=i[t]}let s=o[o.length-1];n=i[s],"object"==typeof i&&void 0===n&&(i[s]=r,ae.system.debug(`config-default-set property: path=${t}, originalPropertyValue=${n} defaultValue=${r},`))}getAdditionalProperties(e,t){let r=e,n=t.split(Fr);for(let e=1;e<n.length;e++){let t=n[e];r[t]||(r[t]={}),r=r[t]}let i=Object.keys(r),o=[];for(let e of i){let r=`${t}%%${e}`;this.knownPropertiesMap[r]||o.push(e)}return o}getLengthOfArrayInConfig(e,t){let r=0,n=e,i=t.split(Fr);for(let e=1;e<i.length;e++){let t=i[e];if(t.includes(Dr)){let e=t.split(Dr),r=e[0],i=e[1];n=n[r][i]}else n=n[t];if(!n)break}return n&&Array.isArray(n)&&(r=n.length),r}processSchemaItems({schemaObject:e,manifest:t,path:r,currentForceDefaults:n,previousPathProperty:i,level:o}){"array"===e.type||Array.isArray(e.type)||ae.system.error(`recursiveWalkerForDefaults expected items of type array for ${r}`,e);let s=this.getLengthOfArrayInConfig(t,r);for(let a=0;a<s;a++){let s=`${r}%&%${a}`;ae.system.debug(`processing items for ${s}`,e.items),this.recursiveWalkerForDefaults(t,n,e.items,i,`${s}`,o)}}processSchemaProperties({schemaObject:e,manifest:t,path:r,currentForceDefaults:n,previousPathProperty:i,level:o}){let s=Object.keys(e.properties);for(let a of s){let s=`${r}%%${a}`;a!=i&&"object"==typeof e.properties[a]&&(this.knownPropertiesMap[s]=!0,this.recursiveWalkerForDefaults(t,n,e.properties[a],a,`${s}`,o))}}processSchemaAdditionalProperties({schemaObject:e,manifest:t,path:r,currentForceDefaults:n,previousPathProperty:i,level:o}){let s=this.getAdditionalProperties(t,r);for(let a=0;a<s.length;a++){let c=`${r}%%${s[a]}`;this.recursiveWalkerForDefaults(t,n,e.additionalProperties,i,`${c}`,o)}}recursiveWalkerForDefaults(e,t,r,n,i,o){if(r instanceof Object&&"forceDefaults"in r&&(t=r.forceDefaults),r.default&&t&&this.setDefaultForForOneProperty(e,i,r.default),++o>=50)ae.system.warn(`recursiveWalkerForDefaults stopped due to excessive schema depth although could be a valid circular dependency: level ${o} path=${i} default=${r}`);else{if(r.$ref){let s=r.$ref.replace("#/definitions/","");this.recursiveWalkerForDefaults(e,t,this.finsembleSchema.definitions[s],n,`${i}`,--o)}r.items&&this.processSchemaItems({schemaObject:r,manifest:e,path:i,currentForceDefaults:t,previousPathProperty:n,level:o}),r.properties&&this.processSchemaProperties({schemaObject:r,manifest:e,path:i,currentForceDefaults:t,previousPathProperty:n,level:o}),r.additionalProperties&&this.processSchemaAdditionalProperties({schemaObject:r,manifest:e,path:i,currentForceDefaults:t,previousPathProperty:n,level:o})}--o}async initializeSchema(e){let t=!0;if(!this.finsembleSchema){const{data:t}=await Ot.fetchConfigFile(e);this.finsembleSchema=t}return this.finsembleSchema||(ae.system.error("Failure reading config schema. Confirm the schema URL configured in finsemble.configSchemaURL is correct and the file contains a valid JSON schema."),t=!1),t}async walkSchemaAndSetConfigDefaults(e){ae.system.debug("walkSchemaAndSetConfigDefaults Starting"),console.log("walkSchemaAndSetConfigDefaults",e),await this.initializeSchema(e.finsemble.configSchemaURL)?this.recursiveWalkerForDefaults(e,!0,this.finsembleSchema.definitions.ManifestSubschema,"ManifestSubschema","",0):ae.system.error("Failure to initialize schema so config defaults not initialized."),ae.system.debug("walkSchemaAndSetConfigDefaults Done")}},Wr=200;async function Vr(e){let t=null,r=null;try{const n=await fetch(e);n.status!=Wr?t=`HTTP get error for ${e}: ${n.status} ${n.statusText}`:r=await n.json()}catch(e){t=e}return{err:t,getData:r}}async function Ur(e,t){let r=null;try{const n=await fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});n.status!=Wr&&(r=`HTTP post error for ${e}: ${n.status} ${n.statusText}`)}catch(e){r=e}return{err:r}}async function zr(e,t){let r=null;try{const n=await fetch(e,{method:"PUT",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});n.status!=Wr&&(r=`HTTP put error for ${e}: ${n.status} ${n.statusText}`)}catch(e){r=e}return{err:r}}async function qr(e){let t=null;try{const r=await fetch(e,{method:"DELETE"});r.status!=Wr&&(t=`HTTP delete error for ${e}: ${r.status} ${r.statusText}`)}catch(e){t=e}return{err:t}}var Br,Hr=function(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)};Br=new WeakMap;const Gr=class{constructor(){Br.set(this,window.name)}async addAppDefinitions(e){const t={type:"addAppDefinitions",meta:{uuid:Hr(this,Br,"f")},payload:{apps:e}};await I.query(o,t)}async removeAppDefinitions(e){const t={type:"removeAppDefinitions",meta:{uuid:Hr(this,Br,"f")},payload:{apps:e}};await I.query(o,t)}async setInteropRegistrationData(e){const t={type:"setInteropRegistrationData",meta:{uuid:Hr(this,Br,"f")},payload:{windowDescriptor:e}};await I.query(o,t)}async registerUIResolverListener(e){I.addResponder("FSBL.FDC3.intent.resolver",(async(t,r)=>{let n,i;if(t)Promise.reject(`registerUIResolverListener failed. It can only be invoked once, system wide (router error: ${t})`);else{const t=null==r?void 0:r.data;try{n=await e(t)}catch(e){ae.log(`registerUIResolverListener IntentResolution rejected ${e}`),i={error:Nt.ResolverUnavailable}}null==r||r.sendQueryResponse(null,i||n)}}));const t={type:"registerUIResolver",meta:{uuid:Hr(this,Br,"f")}};await I.query(o,t)}},Kr=new Gr;let Qr=null;async function Yr(e,t=!1){se.system.log("SmartDesktopClientHandler.updateAppInConfigServiceAndPublish",e);const r=Or(e),n={appd:{[r.appId]:r},components:{[r.appId]:On(r)}},i={manifest:kn.manifest,allowOverwrites:t,finsembleConfigObject:n,replaceApps:!t,replaceComponents:!t,replaceServices:!1,updateStore:!0};await kn.processFinsembleConfig(i,(()=>{})),await Kr.addAppDefinitions(kn.manifest.finsemble.appd);const{err:o}=await k.query("launcher.loadComponents",kn.manifest.finsemble.components);o&&se.system.error("smartDesktopClientHandler - launcher.updateComponents",o),k.publish("Config.changeNotification",{componentConfig:kn.manifest.finsemble.components[r.appId],finsemble:kn.manifest.finsemble})}async function Jr(e){let{err:t,getData:r}=await Vr(`${Qr}/toolbar/menus`);e.sendQueryResponse(t,r)}async function Zr(e){let{err:t}=await Ur(`${Qr}/toolbar/menus/add/`,e.data.menuConfig);e.sendQueryResponse(t)}async function Xr(e){let{err:t}=await zr(`${Qr}/toolbar/menus/${e.data.menuId}`,e.data.menuConfig);e.sendQueryResponse(t)}async function en(e){let{err:t}=await qr(`${Qr}/toolbar/menus/${e.data.menuId}`);e.sendQueryResponse(t)}async function tn(e){let{err:t,getData:r}=await Vr(`${Qr}/project/preloads`);e.sendQueryResponse(t,r)}async function rn(e){let{err:t}=await zr(`${Qr}/project/preloads`,{oldAlias:e.data.oldAlias,newAlias:e.data.newAlias,detail:e.data.detail});e.sendQueryResponse(t)}async function nn(e){let{err:t}=await qr(`${Qr}/project/preloads/${e.data.alias}`);e.sendQueryResponse(t)}async function on(e){let{err:t,getData:r}=await Vr(`${Qr}/appd/v1/apps`);e.sendQueryResponse(t,r)}async function sn(e){var t;let r,n;se.system.log("SmartDesktopClientHandler getAppConfigHandler",e);const i=null===(t=e.data)||void 0===t?void 0:t.appId;if(i){let{err:e,getData:t}=await Vr(`${Qr}/appd/v1/apps/${i}`);r=e,n=t}else r="smartDesktopClientHandler:getAppConfigHandler() no appId provided";e.sendQueryResponse(r,n),r&&se.error(r,e.data)}async function an(e){var t;let r;se.system.log("SmartDesktopClientHandler addAppHandler",e);const n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.appConfig;if(null==n?void 0:n.appId){await Yr(n);let{err:e}=await Ur(`${Qr}/appd/v1/apps`,n);r=e}else r="smartDesktopClientHandler:addAppHandler() received app definition with no appId";e.sendQueryResponse(r),r&&se.error(r,e.data)}async function cn(e){var t;let r;se.system.log("SmartDesktopClientHandler updateAppHandler",e);const n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.appConfig;if(null==n?void 0:n.appId){let{err:e}=await zr(`${Qr}/appd/v1/apps/${n.appId}`,n);await Yr(n,!0),r=e}else r="smartDesktopClientHandler:updateHandler() received app definition with no appId";e.sendQueryResponse(r),r&&se.error(r,e.data)}async function un(e){var t;let r;se.system.log("SmartDesktopClientHandler deleteAppHandler",e);const n=null===(t=e.data)||void 0===t?void 0:t.appId;if(n){let{err:e}=await qr(`${Qr}/appd/v1/apps/${n}`);e||await async function(e){se.system.log("SmartDesktopClientHandler.removeAppInConfigServiceAndPublish",e),delete kn.manifest.finsemble.components[e],delete kn.manifest.finsemble.appd[e];const t={appd:kn.manifest.finsemble.appd,components:kn.manifest.finsemble.components},r={manifest:kn.manifest,allowOverwrites:!0,finsembleConfigObject:t,replaceApps:!1,replaceComponents:!1,replaceServices:!1,updateStore:!0};await kn.processFinsembleConfig(r,(()=>{})),await Kr.addAppDefinitions(kn.manifest.finsemble.appd);const{err:n}=await k.query("launcher.loadComponents",kn.manifest.finsemble.components);n&&se.system.error("smartDesktopClientHandler - launcher.updateComponents",n),k.publish("Config.changeNotification",{removedApp:e,finsemble:kn.manifest.finsemble})}(n),r=e}else r="smartDesktopClientHandler:deleteAppHandler() no appId provided";e.sendQueryResponse(r),r&&se.error(r,e.data)}async function ln(e){se.system.log("SmartDesktopClientHandler updateThemeHandler",e);let{err:t}=await zr("/project/assets/theme",e.data.theme);k.transmit("Finsemble-ui-change.themeUpdate",e.data.theme),e.sendQueryResponse(t)}async function dn(e){se.system.log("SmartDesktopClientHandler getThemeHandler",e);let{err:t,getData:r}=await Vr("/project/assets/theme");e.sendQueryResponse(t,r)}async function fn(e){var t;se.system.log("SmartDesktopClientHandler updateSystemTrayIconHandler",e),null===(t=kn.configStore)||void 0===t||t.setValue({field:"finsemble.systemTrayIcon",value:kn.manifest.finsemble.systemTrayIcon}),e.sendQueryResponse(null)}function pn(e,t){k.addResponder(e,((e,r)=>{e?se.system.error(`"SmartDesktopClientHandler responder error for ${t.name}: ${e}`):t(r)}))}const hn={fdc3Resolver:"FDC3Resolver",linkerWindow:"LinkerWindow","Docking Move Mask":"DockingGroupMask",yesNo:"YesNoDialog",singleInput:"SingleInputDialog",dialogModal:"DialogModal","Process Monitor":"ProcessMonitor","Advanced App Catalog":"AppCatalog"};var mn=r(80406);r.n(mn)()(1);const gn=(e,...t)=>{(e?se.system.error:se.system.info)(...t,e)},yn=async(e,t)=>{if("string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");await S.waitForStartup("storageService");const{err:r,response:n}=await k.query("Storage.save",e);if(gn(r,"Storage.save",n.data),null==t||t(r,n.data),r)throw r;return{err:r,data:n.data}},vn=async(e,t)=>{if("string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");await S.waitForStartup("storageService");const{err:r,response:n}=await k.query("Storage.get",e);return gn(r,"Storage.get",n.data),null==t||t(r,n.data),{err:r,data:n.data}},bn=async(e,t)=>{const{err:r,data:n}=await vn(e);if(null==t||t(r,n),r)throw r;return n},wn=bn,Sn=yn,_n="finsemble",Cn="userPreferences";new class extends pr{constructor(){super({name:"preferencesService",startupDependencies:{},shutdownDependencies:{services:["windowService"]}}),this.userPreferences={},this.serviceReady=!1,this.onBaseServiceReady((e=>{this.doInit(e)})),this.start()}createRouterEndpoints(){k.addResponder("PreferencesService.getPreferences",((e,t)=>{if(this.serviceReady||se.system.error("preferencesService invoked before ready",t),e||!t)return se.system.error(e);t.sendQueryResponse(e,this.userPreferences)})),k.addResponder("PreferencesService.setPreference",((e,t)=>{if(this.serviceReady||se.system.error("preferencesService invoked before ready",t),e||!t)return se.system.error(e);const r=t.data;this.setPreference(r,(e=>{t.sendQueryResponse(e,e?null:"success")}))})),k.addResponder("PreferencesService.unsetPreference",((e,t)=>{if(this.serviceReady||se.system.error("preferencesService invoked before ready",t),e||!t)return se.system.error(e);const r=t.data;this.unsetPreference(r,(e=>{t.sendQueryResponse(e,e?null:"success")}))}))}doInit(e){const t=e=>{this.createRouterEndpoints(),e()},r=e=>{this.initiateRetrievingPreferences(e)},n=e=>{this.updateDefaultPreferences(e)},i=e=>{this.setPreferencesOnConfigStore(e)};S.waitForBootStage("authentication","stageCompleted",(()=>{Ke([t,r,n,i],(()=>{this.serviceReady=!0,e()}))}))}getPreferences(e){e(null,this.userPreferences)}async initiateRetrievingPreferences(e){se.system.debug("initiateRetrievingPreferences"),S.waitForStartup("storageService",(()=>{wn({topic:_n,key:Cn},((t,r)=>{if(se.system.debug("initiateRetrievingPreferences",r),t&&se.system.error(t),r){try{delete r["finsemble.components.Toolbar.window.dockable"],delete r["finsemble.components.Toolbar.window.options.resizable"],delete r["finsemble.components.Toolbar.window.monitor"]}catch(e){}this.userPreferences=r,se.system.log("APPLICATION LIFECYCLE:User Preferences Retrieved",r)}else se.system.log("APPLICATION LIFECYCLE:No user preferences found");e()}))}))}setPreference(e,t){He([t=>{q.setValue(e,t)},t=>{this.userPreferences[e.field]=e.value,Sn({topic:_n,key:Cn,value:this.userPreferences},(e=>{e&&se.system.error(e),t()}))}],(()=>{t(null)}))}unsetPreference(e,t){He([t=>{q.removeValue(e.field,t)},t=>{delete this.userPreferences[e.field],Sn({topic:_n,key:Cn,value:this.userPreferences},(e=>{e&&se.system.error(e),t()}))}],(()=>{t(null)}))}async updateDefaultPreferences(e){const t="finsemble.scheduledRestart",r="finsemble.scheduledShutdown",n="finsemble.scheduledCloseDiscardUnsavedChanges",{data:i}=await q.getValues([t,r,n]);i&&(void 0===this.userPreferences[t]&&i[t]&&(this.userPreferences[t]=i[t]),void 0===this.userPreferences[r]&&i[r]&&(this.userPreferences[r]=i[r]),void 0===this.userPreferences[n]&&i[n]&&(this.userPreferences[n]=i[n])),e()}setPreferencesOnConfigStore(e){se.system.debug("PreferenceService: setPreferencesOnConfigStore");const t=Object.keys(this.userPreferences);t.length?Me(t,((e,t)=>{const r={field:e,value:this.userPreferences[e]};q.setValue(r,(()=>{t()}))}),e):e()}};var En=r(9996),$n=r.n(En);const Pn=/^finsemble\.appd(?:\.|\["?)?(.*?)(?:"?\])?$/s,Tn="#/definitions/ManifestSubschema";se.start(),se.system.log("Starting Config Service");const Rn={window:{addToWorkspace:!1,affinity:"systemComponents",options:{autoShow:!1,resizable:!1,showTaskbarIcon:!1,alwaysOnTop:!0}},component:{category:"system"},foreign:{services:{windowService:{shouldRegister:!1}},components:{"App Launcher":{launchableByUser:!1},"Window Manager":{FSBLHeader:!1,persistWindowState:!1}}}},On=e=>{var t,r;return Object.assign(Object.assign({},null!==(t=null==e?void 0:e.manifest)&&void 0!==t?t:{}),{isAnApp:!0,appDConfig:e,component:Object.assign({},null===(r=null==e?void 0:e.manifest)||void 0===r?void 0:r.component)})},kn=new class extends pr{constructor(e){super(e),this.serviceReady=!1,this.configStore=null,this.manifest={},this.interopAdmin=new Gr,this.listeners={},this.onBaseServiceReady((e=>{this.doInit(e)})),this.start()}createRouterEndpoints(){const e=e=>e?se.system.error(e):se.system.error("Invalid query received");k.addResponder("configService.processAndSet",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):this.processAndSet(r)))),k.addPubSubResponder("Config.changeNotification",{newConfig:null,finsemble:this.manifest.finsemble}),k.addPubSubResponder(/configService*/,{}),k.addResponder("configService.getValue",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):this.getValue(r.data,((e,t)=>{r.sendQueryResponse(e,t)}))))),k.addResponder("configService.getValues",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):this.getValues(r.data.fields,((e,t)=>{r.sendQueryResponse(e,t)}))))),k.addResponder("configService.setValue",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.setValue(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("setValue failed. Only trusted (root domain) sources can set config.")))),k.addResponder("configService.setValues",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.setValues(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("setValue failed. Only trusted (root domain) sources can set config.")))),k.addResponder("configService.removeValue",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.removeValue(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("removeValue failed. Only trusted (root domain) sources can update config.")))),k.addResponder("configService.removeValues",((t,r)=>(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r?e(t):k.trustedMessage(r)?void this.removeValues(r.data,(async e=>{await this.recheckForSchemaErrors(),r.sendQueryResponse(e,r.data)})):r.sendQueryResponse("removeValues failed. Only trusted (root domain) sources can update config.")))),k.addResponder("configService.addListener",((t,r)=>{if(this.serviceReady||se.system.error("configService invoked before ready",r),t||!r)return e(t);this.addListener(r.data),r.sendQueryResponse(t,r.data)}))}async recheckForSchemaErrors(){var e;se.system.log("ConfigService - recheckForSchemaErrors"),Ar.modifyConfigBasedOnDeprecatedDefinitions("dynamicConfig",this.manifest),await Mr.walkSchemaAndSetConfigDefaults(this.manifest),se.system.debug("ConfigService - JSON Schema: re-validate config"),await Mr.validateConfig(this.manifest,Tn),null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble",value:this.manifest.finsemble})}updateAppDDefinition(e){var t,r,n,i,o,s,a,c,u,l,d,f,p,h,m,g,y;return(null===(t=null==e?void 0:e.manifest)||void 0===t?void 0:t.appService)&&(e.manifest.bootParams=null!==(r=e.manifest.bootParams)&&void 0!==r?r:{},e.manifest.bootParams.autoStart=null===(n=e.manifest.bootParams.autoStart)||void 0===n||n,e.manifest.bootParams.stage=null!==(i=e.manifest.bootParams.stage)&&void 0!==i?i:"preuser",e.manifest.window=null!==(o=e.manifest.window)&&void 0!==o?o:{},e.manifest.window.options=null!==(s=e.manifest.window.options)&&void 0!==s?s:{},e.manifest.window.options.autoShow=null!==(a=e.manifest.window.options.autoShow)&&void 0!==a&&a,e.manifest.window.frame=null===(c=e.manifest.window.frame)||void 0===c||c,e.manifest.foreign=null!==(u=e.manifest.foreign)&&void 0!==u?u:{},e.manifest.foreign.components=null!==(l=e.manifest.foreign.components)&&void 0!==l?l:{},e.manifest.foreign.components["Window Manager"]=null!==(d=e.manifest.foreign.components["Window Manager"])&&void 0!==d?d:{},e.manifest.foreign.components["Window Manager"].FSBLHeader=!1,e.manifest.foreign.components.windowService=null!==(f=e.manifest.foreign.components.windowService)&&void 0!==f?f:{},e.manifest.foreign.components.windowService.manageWindowMovement=!1,e.manifest.foreign=null!==(p=e.manifest.foreign)&&void 0!==p?p:{},e.manifest.foreign.components=null!==(h=e.manifest.foreign.components)&&void 0!==h?h:{},e.manifest.foreign.components["App Launcher"]=null!==(m=e.manifest.foreign.components["App Launcher"])&&void 0!==m?m:{},e.manifest.foreign.components["App Launcher"].launchableByUser=!1,e.manifest.component=null!==(g=e.manifest.component)&&void 0!==g?g:{},e.manifest.component.singleton=null===(y=e.manifest.component.singleton)||void 0===y||y,e.manifest.component.spawnOnStartup=e.manifest.bootParams.autoStart,se.system.debug("updateAppDDefinition appService",e)),e}processAppDAndComponentConfig(e){var t,r,n;if(e.finsemble.components=null!==(t=e.finsemble.components)&&void 0!==t?t:{},"object"==typeof e.finsemble.appd){const{appd:t}=e.finsemble;for(const r of Object.entries(t)){let[t,n]=r;se.system.log(`Application "${n.appId}" added or updated in components`,t,n),n=this.updateAppDDefinition(n),e.finsemble.components[n.appId]&&se.system.warn(`processAppDConfig: addD config is overwriting a preexisting component with the same name as the app - ${n.appId}`),e.finsemble.components[n.appId]=On(n)}}else se.system.error("Expected manifest.finsemble.appd to be an object, but continuing without app config.");if("object"==typeof e.finsemble.components){const t=(r=e.finsemble.components,n=(e,t)=>t.uiComponent?[[e,$n()(Rn,t)]]:[[e,t]],Object.fromEntries(Object.entries(r).flatMap((([e,t])=>n(e,t)))));e.finsemble.components=(e=>{return t=hn,r=e,Object.keys(r).reduce(((e,n)=>Object.assign(Object.assign({},e),{[t[n]||n]:r[n]})),{});var t,r})(t),console.log(e.finsemble.components)}else se.system.error("Expected manifest.finsemble.components to be an object, but continuing without processing components config.")}doInit(e){Ke([async()=>{await(async()=>new Promise((async e=>{se.system.log("SmartDesktopClientHandler.initialize"),j.getSDServerInfo((t=>{Qr=t.applicationRoot,pn("SmartDesktopClient.getApps",on),pn("SmartDesktopClient.getMenus",Jr),pn("SmartDesktopClient.getAppConfig",sn),pn("SmartDesktopClient.getPreloads",tn),pn("SmartDesktopClient.addApp",an),pn("SmartDesktopClient.addMenu",Zr),pn("SmartDesktopClient.updateApp",cn),pn("SmartDesktopClient.updateMenu",Xr),pn("SmartDesktopClient.savePreload",rn),pn("SmartDesktopClient.deleteApp",un),pn("SmartDesktopClient.deleteMenu",en),pn("SmartDesktopClient.deletePreload",nn),pn("SmartDesktopClient.updateTheme",ln),pn("SmartDesktopClient.getTheme",dn),pn("SmartDesktopClient.refreshSystemTrayIconConfig",fn),e()}))})))()},async()=>new Promise((async e=>{const{err:t,data:r}=await Ot.getInitialManifest();if(se.system.log("forceObjectsToLogger","getManifest: ConfigUtil.getInitialManifest",t,r),!t&&r){const{err:t,data:n}=await this.processManifest(r);n&&(this.manifest=n),t&&se.system.error(`configService:getManifest() Error getting initial manifest ${t}`),se.system.log("forceObjectsToLogger","getManifest: processManifest",t,n),e()}else se.system.error(`configService:getManifest() Error getting initial manifest ${t}`),e()})),e=>{this.processAppDAndComponentConfig(this.manifest),e()},async()=>{try{await Ar.modifyConfigBasedOnDeprecatedDefinitions("mainConfig",this.manifest),se.system.log("modifyConfigBasedOnDeprecatedDefinitions done")}catch(e){se.system.error("modifyConfigBasedOnDeprecatedDefinitions failed. Error caught",e)}},async()=>{try{await Mr.walkSchemaAndSetConfigDefaults(this.manifest)}catch(e){se.system.error("walkSchemaForDefaults failed. Error caught",e)}},async()=>{se.system.debug("ConfigService - JSON Schema: initial validation");const e=await Mr.validateConfig(this.manifest,Tn);e&&se.system.error(`Manifest Error: ${e}`),se.system.log("forceObjectsToLogger","APPLICATION LIFECYCLE:STARTUP: ************* FULL PROCESSED MANIFEST *************",this.manifest),console.log("APPLICATION LIFECYCLE:STARTUP: ************* FULL PROCESSED MANIFEST *************",this.manifest)},e=>{this.initializeDataStore(this.manifest,(()=>{se.system.log("initializeDataStore complete"),this.createRouterEndpoints(),e()}))}],(()=>{this.serviceReady=!0,e()}))}async fetchConfigImports(e){se.system.debug("forceObjectsToLogger","importURLs",e);const t=e.map((e=>Ot.fetchConfigFile(e)));return(await Promise.all(t)).flatMap((e=>(null==e?void 0:e.data)?[e.data]:[]))}processImportedConfig(e){const{manifest:t,allowOverwrites:r,recursionLevel:n,finsembleConfigObject:i,replaceApps:o=!1,replaceComponents:s=!1,replaceServices:a=!1,updateStore:c}=e,u=/comment.*/,l=(e,t,r)=>{var n;e&&(null===(n=this.configStore)||void 0===n||n.setValue({field:t,value:r}))},d=()=>{var e;r&&o?(t.finsemble.appd={},c&&(null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble.appd",value:t.finsemble.appd}))):t.finsemble.appd=t.finsemble.appd||{};for(const e in i.appd)se.system.debug("adding appd app",e),!r&&t.finsemble.appd.hasOwnProperty(e)?console.warn("finsemble appd app config",e,"cannot be overwritten by third-party config",i.appd[e]):n>0&&t.finsemble.appd.hasOwnProperty(e)?(se.system.info("finsemble appd app config",e,"is being overwritten by appd app config",i.appd[e]),t.finsemble.appd[e]=i.appd[e],l(c,`finsemble.appd.${e}`,i.appd[e])):(t.finsemble.appd[e]=i.appd[e],l(c,`finsemble.appd.${e}`,i.appd[e]))},f=()=>{var e;r&&s?(e=>{let t=!1;for(const r in e)e[r].component&&e[r].component.category&&"system"===e[r].component.category||(se.system.debug("filterNonSystemComponents deleting",r),delete e[r],t=!0);return se.system.debug("filterNonSystemComponents after",e,t),t})(t.finsemble.components)&&c&&(null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble.components",value:t.finsemble.components})):t.finsemble.components=t.finsemble.components||{};for(const e in i.components)se.system.debug("adding component",e),!r&&t.finsemble.components.hasOwnProperty(e)?console.warn("finsemble component config",e,"cannot be overwritten by third-party component config",i.components[e]):n>0&&t.finsemble.components.hasOwnProperty(e)?(se.system.info("finsemble component config",e,"is being overwritten by component config",i.components[e]),t.finsemble.components[e]=i.components[e],l(c,`finsemble.components.${e}`,i.components[e])):(t.finsemble.components[e]=i.components[e],l(c,`finsemble.components.${e}`,i.components[e]))},p=()=>{var e;r&&a?(e=>{let t=!1;for(const r in e)e[r].category&&"system"===e[r].category||(se.system.debug("filterNonSystemServices deleting",r),delete e[r],t=!0);return se.system.debug("filterNonSystemServices after",e,t),t})(t.finsemble.services)&&c&&(null===(e=this.configStore)||void 0===e||e.setValue({field:"finsemble.services",value:t.finsemble.services})):t.finsemble.services=t.finsemble.services||{};for(const e in i.services)se.system.debug("adding service",e),!r&&t.finsemble.services.hasOwnProperty(e)?console.warn("finsemble service config",e,"cannot be overwritten by third-party service config",i.services[e]):n>0&&t.finsemble.services.hasOwnProperty(e)?(se.system.info("finsemble service config",e,"is being overwritten by service config",i.services[e]),t.finsemble.services[e]=i.services[e],l(c,`finsemble.services.${e}`,i.services[e])):(t.finsemble.services[e]=i.services[e],l(c,`finsemble.services.${e}`,i.services[e]))};Object.keys(i).forEach((e=>{u.test(e)?(se.system.debug("ignoring comment",e),delete i[e]):"appd"===e?d():"components"===e?f():"services"===e?p():"workspaceTemplates"===e?(()=>{t.finsemble.workspaceTemplates=t.finsemble.workspaceTemplates||{};for(const e in i.workspaceTemplates)se.system.debug("adding template",e),!r&&t.finsemble.workspaceTemplates.hasOwnProperty(e)?console.warn("finsemble template config",e,"cannot be overwritten by third-party template config",i.workspaceTemplates[e]):n>0&&t.finsemble.workspaceTemplates.hasOwnProperty(e)?(se.system.info("finsemble template config",e,"is being overwritten by template config",i.workspaceTemplates[e]),t.finsemble.workspaceTemplates[e]=i.workspaceTemplates[e],l(c,`finsemble.workspaceTemplates.${e}`,i.workspaceTemplates[e])):(t.finsemble.workspaceTemplates[e]=i.workspaceTemplates[e],l(c,`finsemble.workspaceTemplates.${e}`,i.workspaceTemplates[e]))})():"importConfig"===e||"importThirdPartyConfig"===e||(se.system.debug("adding key",e),!r&&t.finsemble.hasOwnProperty(e)?console.warn("finsemble config property",e,"cannot be overwritten by third-party config"):n>0&&t.finsemble.hasOwnProperty(e)?(se.system.info("finsemble config property",e,"is being overwritten"),t.finsemble[e]=i[e],l(c,`finsemble.${e}`,i[e])):(t.finsemble[e]=i[e],l(c,`finsemble.${e}`,i[e])))}))}async processFinsembleConfig(e,t){let r=await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:0}));return r=await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:0})),null==t||t(r),r}async processFinsembleConfigRecursive(e){const{manifest:t,recursionLevel:r,finsembleConfigObject:n}=e;if(r>50){const e="Configuration Error: importConfig may have a loop (recursion depth exceeded).";return S.systemLog({error:!0},e),se.system.error(e),C("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Config-Error",e),t}return se.system.debug("forceObjectsToLogger","*** entering processFinsembleConfig ***",n),Ot.resolveManifestMacros(t,n),await(async()=>{var t,i;const o=await this.fetchConfigImports(null!==(t=n.importConfig)&&void 0!==t?t:[]),s=await this.fetchConfigImports(null!==(i=n.importThirdPartyConfig)&&void 0!==i?i:[]);for(const t in o)await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:r+1,finsembleConfigObject:o[t],allowOverwrites:!0}));for(const t in s)await this.processFinsembleConfigRecursive(Object.assign(Object.assign({},e),{recursionLevel:r+1,finsembleConfigObject:s[t],allowOverwrites:!1}))})(),Ot.resolveManifestMacros(t,n),this.processImportedConfig(e),t}async processManifest(e){if(void 0!==e.finsemble){const t={manifest:e,allowOverwrites:!0,finsembleConfigObject:e.finsemble,replaceApps:!1,replaceComponents:!1,replaceServices:!1,updateStore:!1};return{data:await this.processFinsembleConfig(t)}}{const t="'finsemble' property not found in manifest";return S.systemLog({error:!0},t),se.system.error(t),{err:t,data:e}}}initializeDataStore(e,t){se.system.debug("initializeDataStore"),Cr({store:"Finsemble-Configuration-Store",global:!1,values:e},((e,r)=>{e||!r?se.system.error("CreateStore Error",e):(this.configStore=r,se.console.log("initializeDataStore complete"),t())}))}processAndSet(e){const t=k.trustedMessage(e);let{newConfig:r}=e.data;const n=!!e.data.overwrite,i=!!e.data.replace;if(se.system.debug("forceObjectsToLogger","Config.processAndSet",t,r),n&&!t)e.sendQueryResponse("Config.processAndSet Rejected: only same domain components using default SharedWorker transport can overwrite config",null),se.error(`processAndSet request blocked from an untrusted app "${e.header.origin}". Only apps on the SharedWorker transport can call processAndSet()`);else{const t=(null==r?void 0:r.appd)||(null==r?void 0:r.components);t&&this.processAppDAndComponentConfig({finsemble:r});const o={manifest:this.manifest,finsembleConfigObject:r,allowOverwrites:n,replaceApps:i,replaceComponents:i,replaceServices:i,updateStore:!0};this.processFinsembleConfig(o,(async n=>{var i;se.system.log("forceObjectsToLogger","Config.processAndSet revised manifest",n),null===(i=this.configStore)||void 0===i||i.setValue({field:"finsemble.configSetDone",value:!0},(async()=>{if(await this.recheckForSchemaErrors(),t){const{err:e}=await k.query("launcher.loadComponents",n.finsemble.components);e&&se.system.error("ConfigService - launcher.updateComponents",e)}(null==r?void 0:r.appd)&&await this.interopAdmin.addAppDefinitions(this.manifest.finsemble.appd),k.publish("Config.changeNotification",{newConfig:r,finsemble:n.finsemble}),e.sendQueryResponse(null,n.finsemble)}))}))}}getValue(e,t){const r="string"==typeof e?e:e.field,n=Q().get(this.manifest,r,null);return null==t||t(null,n),n}getValues(e,t){var r,n;if(!e)return null===(r=this.configStore)||void 0===r?void 0:r.getAll(t);null===(n=this.configStore)||void 0===n||n.getValues(e,t)}_getAppdEntryName(e){const t=e.match(Pn);return t?t[1]:null}maybeGetAppDEntryKeyToRemove(e){if(e.startsWith("finsemble.appd")){const t=this._getAppdEntryName(e);if(t&&Object.keys(this.manifest.finsemble.appd).includes(t))return t}return null}async _removeAppdEntry(e,t){var r,n;Q().unset(this.manifest,`finsemble.appd.${e}`),null===(r=this.configStore)||void 0===r||r.removeValue({field:`finsemble.appd.${e}`},t),Q().unset(this.manifest,`finsemble.components.${e}`),null===(n=this.configStore)||void 0===n||n.removeValue({field:`finsemble.components.${e}`},t);const{err:i}=await k.query("launcher.loadComponents",this.manifest.finsemble.components);i&&se.system.error("ConfigService - _removeAppdEntry",i),await this.interopAdmin.removeAppDefinitions([e])}setValue(e,t){var r;Q().set(this.manifest,e.field,e.value),null===(r=this.configStore)||void 0===r||r.setValue(e,t)}setValues(e,t){Me(e,((e,t)=>{this.setValue(e,(e=>{t("string"==typeof e?new Error(e):e)}))}),(e=>{t(e)}))}removeValue(e,t){var r;const n=this.maybeGetAppDEntryKeyToRemove(e.field);n?this._removeAppdEntry(n,t):(Q().unset(this.manifest,e.field),null===(r=this.configStore)||void 0===r||r.removeValue(e,t))}removeValues(e,t){Me(e,((e,t)=>{"string"==typeof e&&(e={field:e}),this.removeValue(e,(e=>{t("string"==typeof e?new Error(e):e)}))}),(e=>{t(e)}))}addListener(e){var t;const r=(e,t)=>{t?(t.field=t.field.replace("Finsemble-Configuration-Store","configService"),k.publish(t.field,t)):se.system.warn("configService didn't receive a valid change from DistributedStoreClient",e)};if(!this.listeners[e]){this.listeners[e]=!0;const n="configService"===e?{}:{field:e.replace("configService.","")};null===(t=this.configStore)||void 0===t||t.addListener(n,r)}}}({name:"configService"})})()})();
|
|
9
9
|
//# sourceMappingURL=configService.js.map
|