@accordproject/concerto-core 3.25.5 → 3.25.6

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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see concerto-core.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["concerto-core"]=t():e["concerto-core"]=t()}(self,(()=>(()=>{var e={3348:(e,t,r)=>{"use strict";const n=r(3954),{DcsCto:o,DcsNamespace:s}=r(5497);e.exports={MetaModelUtil:n,MetaModelNamespace:"concerto.metamodel@1.0.0",DcsCto:o,DcsNamespace:s}},5497:e=>{"use strict";e.exports={DcsCto:'/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nnamespace org.accordproject.decoratorcommands@0.4.0\n\nimport concerto.metamodel@1.0.0.Decorator\n\n/**\n * A reference to an existing named & versioned DecoratorCommandSet\n */\nconcept DecoratorCommandSetReference {\n o String name\n o String version\n}\n\n/**\n * Whether to upsert or append the decorator\n */\nenum CommandType {\n o UPSERT\n o APPEND\n}\n\n/**\n * Which models elements to add the decorator to. Any null\n * elements are \'wildcards\'.\n */\nconcept CommandTarget {\n o String namespace optional\n o String declaration optional\n o String property optional\n o String[] properties optional // property and properties are mutually exclusive\n o String type optional\n o MapElement mapElement optional\n}\n\n/**\n * Map Declaration elements which might be used as a target\n */\nenum MapElement {\n o KEY\n o VALUE\n o KEY_VALUE\n}\n\n/**\n * Applies a decorator to a given target\n */\nconcept Command {\n o CommandTarget target\n o Decorator decorator\n o CommandType type\n o String decoratorNamespace optional\n}\n\n/**\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\n */\nconcept DecoratorCommandSet {\n o String name\n o String version\n o DecoratorCommandSetReference[] includes optional // not yet supported\n o Command[] commands\n}',DcsNamespace:"org.accordproject.decoratorcommands@0.4.0"}},4702:e=>{"use strict";e.exports='/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace("AccordProject.Concerto.Metamodel")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n o String resolvedName optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapKeyType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapValueType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o MapValueType value\n}\n\nconcept StringMapKeyType extends MapKeyType {}\nconcept DateTimeMapKeyType extends MapKeyType {}\n\nconcept ObjectMapKeyType extends MapKeyType {\n o TypeIdentifier type\n}\n\nconcept BooleanMapValueType extends MapValueType {}\nconcept DateTimeMapValueType extends MapValueType {}\nconcept StringMapValueType extends MapValueType {}\nconcept IntegerMapValueType extends MapValueType {}\nconcept LongMapValueType extends MapValueType {}\nconcept DoubleMapValueType extends MapValueType {}\n\nconcept ObjectMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept RelationshipMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept StringLengthValidator {\n o Integer minLength optional\n o Integer maxLength optional\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nconcept AliasedType{\n o String name\n o String aliasedName\n}\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n o AliasedType[] aliasedTypes optional\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n o String namespace optional\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue optional\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n'},3954:(e,t,r)=>{"use strict";const n=r(4865),o="concerto.metamodel@1.0.0",s=r(4702);function a(e,t){return e.declarations.find((e=>e.name===t))}function i(e,t){if(!t[e])throw new Error(`Name ${e} not found`);return t[e].namespace}function c(e,t){switch((e.decorators||[]).forEach((e=>{c(e,t)})),e.$class){case`${o}.Model`:(e.declarations||[]).forEach((e=>{c(e,t)}));break;case`${o}.EnumDeclaration`:case`${o}.AssetDeclaration`:case`${o}.ConceptDeclaration`:case`${o}.EventDeclaration`:case`${o}.TransactionDeclaration`:case`${o}.ParticipantDeclaration`:if(e.superType){const r=e.superType.name;e.superType.namespace=i(r,t),e.superType.name=t[r].name,t[r]?.resolvedName&&(e.superType.resolvedName=t[r].resolvedName)}(e.properties||[]).forEach((e=>{c(e,t)}));break;case`${o}.MapDeclaration`:c(e.key,t),c(e.value,t);break;case`${o}.Decorator`:(e.arguments||[]).forEach((e=>{c(e,t)}));break;case`${o}.ObjectProperty`:case`${o}.RelationshipProperty`:case`${o}.DecoratorTypeReference`:case`${o}.ObjectMapKeyType`:case`${o}.ObjectMapValueType`:case`${o}.RelationshipMapValueType`:e.type.namespace=i(e.type.name,t),e.type.name=t[e.type.name].name,t[e.type.name]?.resolvedName&&(e.type.resolvedName=t[e.type.name].resolvedName);break;case`${o}.StringScalar`:case`${o}.BooleanScalar`:case`${o}.DateTimeScalar`:case`${o}.DoubleScalar`:case`${o}.LongScalar`:case`${o}.IntegerScalar`:e.namespace=i(e.name,t),e.name=t[e.name].name}return e}function l(e,t){const r=JSON.parse(JSON.stringify(t)),n=function(e,t){const r="concerto@1.0.0",n={Concept:{namespace:r,name:"Concept"},Asset:{namespace:r,name:"Asset"},Participant:{namespace:r,name:"Participant"},Transaction:{namespace:r,name:"Transaction"},Event:{namespace:r,name:"Event"}};return(t.imports||[]).forEach((t=>{const r=t.namespace,s=function(e,t){return e.models.find((e=>e.namespace===t))}(e,r);if(t.$class===`${o}.ImportType`){if(!a(s,t.name))throw new Error(`Declaration ${t.name} in namespace ${r} not found`);n[t.name]={namespace:r,name:t.name}}else if(t.$class===`${o}.ImportTypes`){const e=t.aliasedTypes?new Map(t.aliasedTypes.map((({name:e,aliasedName:t})=>[e,t]))):new Map;t.types.forEach((t=>{const o=e.get(t)||t;if(!a(s,t))throw new Error(`Declaration ${t} in namespace ${r} not found`);n[o]=o!==t?{namespace:r,name:o,resolvedName:t}:{namespace:r,name:t}}))}else(s.declarations||[]).forEach((e=>{n[e.name]={namespace:r,name:e.name}}))})),(t.declarations||[]).forEach((e=>{n[e.name]={namespace:t.namespace,name:e.name}})),n}(e,t);return c(r,n),r}function u(e){const t=[];switch(e.$class){case`${o}.ImportAll`:t.push(`${e.namespace}.*`);break;case`${o}.ImportType`:t.push(`${e.namespace}.${e.name}`);break;case`${o}.ImportTypes`:e.types.forEach((r=>{t.push(`${e.namespace}.${r}`)}));break;default:throw new Error(`Unrecognized imports ${e.$class}`)}return t}e.exports={metaModelAst:n,metaModelCto:s,resolveLocalNames:l,resolveLocalNamesForAll:function(e){const t={$class:`${o}.Models`,models:[]};return e.models.forEach((r=>{const n=l(e,r);t.models.push(n)})),t},importFullyQualifiedNames:u,getExternalImports:function(e){const t={};return e.imports&&e.imports.forEach((e=>{const r=u(e);e.uri&&(t[r[0]]=e.uri)})),t}}},3832:(e,t,r)=>{"use strict";const n=r(5558),{DefaultFileLoader:o,FileDownloader:s,ModelWriter:a}=r(8487),{MetaModelUtil:i,MetaModelNamespace:c}=r(3348),l=r(1595),u=r(2438),p=r(1861),d=r(6226),f=r(1768),h=r(3673),m=r(5477),{getRootModel:g}=r(6128),{getDecoratorModel:y}=r(1051),v=r(5430);void 0===r.g&&(r(5437),r(953),r(9869),r(3135),r(6341),r(8088),r(2302),r(7337),r(3218),r(745));const b=r(7833)("concerto:BaseModelManager"),w=(e,t)=>({ast:t,definitions:null,fileName:e}),A={missingDecorator:void 0,invalidDecorator:void 0},$=["concerto@1.0.0","concerto","concerto.decorator@1.0.0"];class E{constructor(e,t){this.processFile=t||w,this.modelFiles={},this.factory=new l(this),this.serializer=new h(this.factory,this,e),this.decoratorFactories=[],this.strict=!!e?.strict,this.options=e,this.addDecoratorModel(),this.addRootModel(),this.decoratorValidation=e?.decoratorValidation?e?.decoratorValidation:A,this.enableMapType=!!e?.enableMapType,this.importAliasing="true"==={NODE_ENV:"production"}?.IMPORT_ALIASING||!!e?.importAliasing,this.metamodelModelFile=new d(this,i.metaModelAst,void 0,c),e?.addMetamodel&&this.addModelFile(this.metamodelModelFile)}isModelManager(){return!0}isStrict(){return this.strict}isAliasedTypeEnabled(){return this.importAliasing}addRootModel(){const{rootModelAst:e,rootModelCto:t,rootModelFile:r}=g(!0),n=new d(this,e,t,r);if(this.strict)this.addModelFile(n,t,r,!0);else{this.addModelFile(n,t,r,!0);const e=g(!1),o=new d(this,e.rootModelAst,e.rootModelCto,e.rootModelFile);this.addModelFile(o,e.rootModelCto,e.rootModelFile,!0)}}addDecoratorModel(){const{decoratorModelAst:e,decoratorModelCto:t,decoratorModelFile:r}=y(),n=new d(this,e,t,r);this.addModelFile(n,t,r,!0)}accept(e,t){return e.visit(this,t)}validateModelFile(e,t){if("string"==typeof e){const{ast:r}=this.processFile(t,e);new d(this,r,e,t).validate()}else e.validate()}_throwAlreadyExists(e){const t=this.modelFiles[e.getNamespace()].getName(),r=t?` in file ${t}`:"",n=e.getName()?` specified in file ${e.getName()}`:"";let o=`Namespace ${e.getNamespace()}${n} is already declared${r}`;throw new Error(o)}addModelFile(e,t,r,n){if(b("addModelFile","addModelFile",e,r),this.isStrict()&&!e.getVersion())throw new Error("Cannot add an unversioned namespace when 'strict' is true");return this.modelFiles[e.getNamespace()]?this._throwAlreadyExists(e):(n||(this.options?.metamodelValidation&&this.validateAst(e),e.validate()),this.modelFiles[e.getNamespace()]=e),e}validateAst(e){const{version:t}=f.parseNamespace(f.getNamespace(e.getAst().$class)),{version:r}=f.parseNamespace(c);if(t!==r)throw new v(`Model file version ${t} does not match metamodel version ${r}`);const n=!!this.getModelFile(c);n||this.addModelFile(this.metamodelModelFile,void 0,c,!0);try{this.getSerializer().fromJSON(e.getAst())}catch(e){if(this.isStrict())throw new v(e.message);console.warn("Invalid metamodel found. This will throw an exception in a future release. ",e.message)}n||this.deleteModelFile(c)}addModel(e,t,r,n){b("addModel","addModel",e,r);const{ast:o,definitions:s}=this.processFile(r,e),a=t||s,i=new d(this,o,a,r);return this.addModelFile(i,a,r,n),i}updateModelFile(e,t,r){if(b("updateModelFile","updateModelFile",e,t),"string"==typeof e){const{ast:n}=this.processFile(t,e);let o=new d(this,n,e,t);return this.updateModelFile(o,t,r)}if(!this.modelFiles[e.getNamespace()])throw new Error(`Model file for namespace ${e.getNamespace()} not found`);return r||e.validate(),this.modelFiles[e.getNamespace()]=e,e}deleteModelFile(e){if(!this.modelFiles[e])throw new Error("Model file does not exist");delete this.modelFiles[e]}addModelFiles(e,t,r){const n="addModelFiles";b(n,"addModelFiles",e,t);const o={};Object.assign(o,this.modelFiles);let s=[];try{for(let r=0;r<e.length;r++){const n=e[r];let o,a=null;if(t&&(a=t[r]),"string"==typeof n){const{ast:e}=this.processFile(a,n);o=new d(this,e,n,a)}else o=n;this.modelFiles[o.getNamespace()]?this._throwAlreadyExists(o):(this.modelFiles[o.getNamespace()]=o,s.push(o))}return r||this.validateModelFiles(),s}catch(e){throw this.modelFiles={},Object.assign(this.modelFiles,o),e}finally{b(n,s)}}validateModelFiles(){for(let e in this.modelFiles)this.modelFiles[e].validate()}async updateExternalModels(e,t){b("updateExternalModels","updateExternalModels",e),t||(t=new s(new o(this.processFile),(e=>i.getExternalImports(e.ast))));const r={};Object.assign(r,this.modelFiles);try{const r=await t.downloadExternalDependencies(this.getModelFiles(),e),n=[];return r.forEach((e=>{const t=new d(this,e.ast,e.definitions,e.fileName);this.modelFiles[t.getNamespace()]?n.push(this.updateModelFile(t,t.getName(),!0)):n.push(this.addModelFile(t,null,t.getName(),!0))})),this.validateModelFiles(),n}catch(e){throw this.modelFiles={},Object.assign(this.modelFiles,r),e}}writeModelsToFileSystem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a.writeModelsToFileSystem(this.getModelFiles(),e,t)}getDecoratorValidation(){return this.decoratorValidation}getModelFiles(e){let t=Object.keys(this.modelFiles),r=[];for(let n=0;n<t.length;n++){const o=t[n];!e&&$.includes(o)||r.push(this.modelFiles[o])}return r}getModels(e){const t=this.getModelFiles();let r=[];const o=Object.assign({includeExternalModels:!0},e);return t.forEach((function(e){if(e.isExternal()&&!o.includeExternalModels)return;let t;if("UNKNOWN"!==e.fileName&&null!==e.fileName&&e.fileName){let r=e.fileName;t=n.basename(r)}else t=e.namespace+".cto";r.push({name:t,content:e.definitions})})),r}resolveType(e,t){if(f.isPrimitiveType(t))return t;let r=f.getNamespace(t),n=this.getModelFile(r);if(!n){let r=u.messageFormatter("modelmanager-resolvetype-nonsfortype");throw new p(r({type:t,context:e}))}if(n.isLocalType(t))return t;let o=u.messageFormatter("modelmanager-resolvetype-notypeinnsforcontext");throw new p(o({context:e,type:t,namespace:n.getNamespace()}))}clearModelFiles(){this.modelFiles={},this.addDecoratorModel(),this.addRootModel()}getModelFile(e){return this.modelFiles[e]}getModelFileByFileName(e){return this.getModelFiles().filter((t=>t.getName()===e))[0]}getNamespaces(){return Object.keys(this.modelFiles)}getType(e){const t=f.getNamespace(e),r=this.getModelFile(t);if(!r){const t=u.messageFormatter("modelmanager-gettype-noregisteredns");throw new m(e,t({type:e}))}const n=r.getType(e);if(!n){const r=u.messageFormatter("modelmanager-gettype-notypeinns");throw new m(e,r({type:f.getShortName(e),namespace:t}))}return n}getAssetDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getAssetDeclarations())),[])}getTransactionDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getTransactionDeclarations())),[])}getEventDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getEventDeclarations())),[])}getParticipantDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getParticipantDeclarations())),[])}getMapDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getMapDeclarations())),[])}getEnumDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getEnumDeclarations())),[])}getConceptDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getConceptDeclarations())),[])}getFactory(){return this.factory}getSerializer(){return this.serializer}getDecoratorFactories(){return this.decoratorFactories}addDecoratorFactory(e){this.decoratorFactories.push(e)}derivesFrom(e,t){let r=this.getType(e);for(;r;){if(r.getFullyQualifiedName()===t)return!0;r=r.getSuperTypeDeclaration()}return!1}resolveMetaModel(e){const t=this.getAst(!1,!0);return i.resolveLocalNames(t,e)}fromAst(e,t){this.clearModelFiles(),e.models.forEach((e=>{if(!$.includes(e.namespace)){const t=new d(this,e);this.addModelFile(t,null,null,!0)}})),t?.disableValidation||this.validateModelFiles()}getAst(e,t){const r={$class:`${c}.Models`,models:[]};return this.getModelFiles(t).forEach((t=>{let n=t.getAst();e&&(n=this.resolveMetaModel(n)),r.models.push(n)})),r}filter(e){const t=new E({...this.options},this.processFile),r=[];let n=Object.values(this.modelFiles).map((n=>n.filter(e,t,r))).filter(Boolean);n=n.filter((e=>!e.isSystemModelFile()));const o=n.map((e=>{const t=e.getAst();let n=!1;return r.forEach((r=>{const o=f.getNamespace(r);if(!o.startsWith("concerto@")&&"concerto"!==o&&e.getImports().includes(r)){const e=f.getShortName(r),o=f.getNamespace(r);t.imports=t.imports.filter((t=>{const r="ImportType"===f.getShortName(t.$class)&&t.name===e&&t.namespace===o;return r&&(n=!0),!r})),t.imports.forEach((t=>{t.namespace===o&&"ImportTypes"===f.getShortName(t.$class)&&(t.types=t.types.filter((t=>{const r=t===e;return r&&(n=!0),!r})))}))}})),n?new d(this,t,void 0,e.fileName):e}));return t.addModelFiles(o),t}}e.exports=E},7662:(e,t,r)=>{"use strict";const n=r(9472),o="resource",{TypedStack:s}=r(8487),a=r(3561);void 0===r.g&&r(9481),e.exports=class{constructor(e){this.modelManager=e}validate(e,t){const r=this.getTypeDeclaration(e),n={};n.stack=new s(e);const o=new a(this,t);r.accept(o,n)}getModelManager(){return this.modelManager}isObject(e){return"object"==typeof e&&e.$class}getTypeDeclaration(e){if(!e.$class)throw new Error("Input object does not have a $class attribute.");return this.modelManager.getType(e.$class)}getIdentifier(e){const t=this.getTypeDeclaration(e).getIdentifierFieldName();if(!t)throw new Error(`Object does not have an identifier: ${JSON.stringify(e)}`);return e[t]}isIdentifiable(e){const t=this.getTypeDeclaration(e);return!t.isSystemIdentified()&&null!==t.getIdentifierFieldName()}isRelationship(e){return"string"==typeof e&&e.startsWith(`${o}:`)}setIdentifier(e,t){const r=this.getTypeDeclaration(e).getIdentifierFieldName(),n=JSON.parse(JSON.stringify(e));return n[r]=t,n}getFullyQualifiedIdentifier(e){return this.getTypeDeclaration(e),`${e.$class}#${this.getIdentifier(e)}`}toURI(e){return this.getTypeDeclaration(e),`${o}:${e.$class}#${encodeURI(this.getIdentifier(e))}`}fromURI(e){let t;try{t=n.parse(e)}catch(t){throw new Error("Invalid URI: "+e)}const r=t.protocol;if(r&&r!==o)throw new Error("Invalid URI scheme: "+e);if(t.username||t.password||t.port||t.query)throw new Error("Invalid resource URI format: "+e);return{typeDeclaration:this.getTypeDeclaration({$class:t.path}),id:decodeURIComponent(t.fragment)}}getType(e){return this.getTypeDeclaration(e).getName()}getNamespace(e){return this.getTypeDeclaration(e).getNamespace()}}},7624:(e,t,r)=>{"use strict";const n=r(3464),o=r(7657);n.extend(o);const s=r(4491);n.extend(s);const a=r(3221);n.extend(a);const i=r(279);n.extend(i),e.exports={setCurrentTime:function(e,t){const r="number"==typeof t?t:n().utcOffset(),o=e?n.utc(e):n().utc();if(!o.isValid())throw new Error(`Current time '${e}' is not in standard UTC format`);const s=o.utcOffset(r);if(!s.isValid())throw new Error(`Cannot set current time to '${e}' with UTC offset '${t}'`);return{currentTime:s,utcOffset:r}}}},2307:(e,t,r)=>{"use strict";const n=r(3198),o=r(1768),{MetaModelNamespace:s}=r(3348);function a(e){const t=Object.keys(e),r={};return t.forEach((t=>{"$class"!==t&&(r[t]=e[t])})),r}function i(e){const t={[`${s}.DecoratorString`]:"String",[`${s}.DecoratorNumber`]:"Number",[`${s}.DecoratorBoolean`]:"Boolean"};return e.$class.endsWith("TypeReference")?{typeReference:{name:e.type.name,namespace:e.type.namespace,resolvedName:e.type.resolvedName,isArray:String(e.isArray)}}:{type:t[e.$class],value:String(e.value)}}function c(e){return{action:e.type,target:a(e.target),decorator:(t=e.decorator,{name:t.name,arguments:0===t.arguments?.length?void 0:t.arguments?.map(i)})};var t}e.exports={jsonToYaml:function(e){const t=o.getNamespace(e.$class),r={decoratorCommandsVersion:o.parseNamespace(t).version,name:e.name,version:e.version,commands:e.commands.map(c)};return n.stringify(r,{schema:"failsafe"})},yamlToJson:function(e){const t=n.parse(e,{schema:"failsafe"}),r="org.accordproject.decoratorcommands@"+t.decoratorCommandsVersion;return{$class:o.getFullyQualifiedName(r,"DecoratorCommandSet"),name:t.name,version:t.version,commands:t.commands.map((e=>function(e,t){return{$class:o.getFullyQualifiedName(e,"Command"),type:t.action,target:{$class:o.getFullyQualifiedName(e,"CommandTarget"),...t.target},decorator:(r=t.decorator,{$class:o.getFullyQualifiedName(s,"Decorator"),name:r.name,arguments:r.arguments?r.arguments.map((e=>function(e,t){const r={String:`${e}.DecoratorString`,Number:`${e}.DecoratorNumber`,Boolean:`${e}.DecoratorBoolean`};if("typeReference"===Object.keys(t)[0])return{$class:o.getFullyQualifiedName(e,"DecoratorTypeReference"),type:{$class:o.getFullyQualifiedName(e,"TypeIdentifier"),name:t.typeReference.name,...void 0!==t.typeReference.namespace?{namespace:t.typeReference.namespace}:{},...void 0!==t.typeReference.resolvedName?{resolvedName:t.typeReference.resolvedName}:{}},isArray:"true"===t.typeReference.isArray||!0===t.typeReference.isArray};const n=t.type;let s=t.value;return"Number"===n?s=Number(s):"Boolean"===n&&(s="true"===s),{$class:r[n],value:s}}(s,e))):[]})};var r}(r,e)))}}}},8298:(e,t,r)=>{"use strict";const n=r(9481),o=r(1768),{MetaModelNamespace:s}=r(3348);class a{static Action={EXTRACT_ALL:0,EXTRACT_VOCAB:1,EXTRACT_NON_VOCAB:2};constructor(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.Action.EXTRACT_ALL,s=arguments.length>5?arguments[5]:void 0;this.extractionDictionary={},this.removeDecoratorsFromModel=e,this.locale=t,this.enableDcsNamespaceTarget=!!s?.enableDcsNamespaceTarget,this.dcs_version=r,this.sourceModelAst=n,this.updatedModelAst=n,this.action=Object.values(a.Action).includes(o)?o:a.Action.EXTRACT_ALL}isVocabDecorator(e){return"Term"===e||e.startsWith("Term_")}constructDCSDictionary(e,t,r){const n={declaration:r?.declaration||"",property:r?.property||"",mapElement:r?.mapElement||"",dcs:JSON.stringify(t)};this.extractionDictionary[e]&&Array.isArray(this.extractionDictionary[e])?this.extractionDictionary[e].push(n):this.extractionDictionary[e]=[n]}transformNonVocabularyDecorators(e,t,r){const{name:n,version:s}=o.parseNamespace(t),a=n,i=s;if(e?.length>0){const t={$class:`org.accordproject.decoratorcommands@${this.dcs_version}.DecoratorCommandSet`,name:a,version:i,commands:e};r.push(t)}return r}transformVocabularyDecorators(e,t,r){if(Object.keys(e).length>0){let n="";n+=`locale: ${this.locale}\n`,n+=`namespace: ${t}\n`,n+="declarations:\n",Object.keys(e).forEach((t=>{e[t].term&&(n+=` - ${t}: ${e[t].term}\n`);const r=Object.keys(e[t]).filter((e=>"term"!==e&&"propertyVocabs"!==e));r.length>0&&(e[t].term||(n+=` - ${t}: ${t}\n`),r.forEach((r=>{n+=` ${r}: ${e[t][r]}\n`}))),e[t].propertyVocabs&&Object.keys(e[t].propertyVocabs).length>0&&(e[t].term||0!==r.length||(n+=` - ${t}: ${t}\n`),n+=" properties:\n",Object.keys(e[t].propertyVocabs).forEach((r=>{n+=` - ${r}: ${e[t].propertyVocabs[r].term||""}\n`,Object.keys(e[t].propertyVocabs[r]).filter((e=>"term"!==e)).forEach((o=>{n+=` ${o}: ${e[t].propertyVocabs[r][o]}\n`}))})))})),r.push(n)}return r}transformVocabularyDecoratorsV2(e,t,r){if(Object.keys(e).length>0){let n="";n+=`locale: ${this.locale}\n`,n+=`namespace: ${t}\n`,e.namespace&&Object.keys(e.namespace).length>0&&(e.namespace.term&&(n+=`term: ${e.namespace.term}\n`),Object.keys(e.namespace).filter((e=>"term"!==e)).forEach((t=>{n+=`${t}: ${e.namespace[t]}\n`}))),e.declarations&&Object.keys(e.declarations).length>0?(n+="declarations:\n",Object.keys(e.declarations).forEach((t=>{e.declarations[t].term&&(n+=` - ${t}: ${e.declarations[t].term}\n`);const r=Object.keys(e.declarations[t]).filter((e=>"term"!==e&&"propertyVocabs"!==e));r.length>0&&(e.declarations[t].term||(n+=` - ${t}: ${t}\n`),r.forEach((r=>{n+=` ${r}: ${e.declarations[t][r]}\n`}))),e.declarations[t].propertyVocabs&&Object.keys(e.declarations[t].propertyVocabs).length>0&&(e.declarations[t].term||0!==r.length||(n+=` - ${t}: ${t}\n`),n+=" properties:\n",Object.keys(e.declarations[t].propertyVocabs).forEach((r=>{n+=` - ${r}: ${e.declarations[t].propertyVocabs[r].term||""}\n`,Object.keys(e.declarations[t].propertyVocabs[r]).filter((e=>"term"!==e)).forEach((o=>{n+=` ${o}: ${e.declarations[t].propertyVocabs[r][o]}\n`}))})))}))):n+="declarations: []\n",r.push(n)}return r}constructTarget(e,t){const r={$class:`org.accordproject.decoratorcommands@${this.dcs_version}.CommandTarget`,namespace:e};return t.declaration&&""!==t.declaration&&(r.declaration=t.declaration),t.property&&""!==t.property&&(r.property=t.property),t.mapElement&&""!==t.mapElement&&(r.mapElement=t.mapElement),r}parseNonVocabularyDecorators(e,t,r,n){const o={$class:"concerto.metamodel@1.0.0.Decorator",name:t.name};if(t.arguments){const e=t.arguments.map((e=>({$class:e.$class,value:e.value})));o.arguments=e}let s={$class:`org.accordproject.decoratorcommands@${r}.Command`,type:"UPSERT",target:n,decorator:o};return e.push(s),e}parseVocabularies(e,t,r){if(e[t.declaration]=e[t.declaration]||{propertyVocabs:{}},""!==t.property)if(e[t.declaration].propertyVocabs[t.property]||(e[t.declaration].propertyVocabs[t.property]={}),"Term"===r.name)e[t.declaration].propertyVocabs[t.property].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];e[t.declaration].propertyVocabs[t.property][n]=r.arguments[0].value}else if(""!==t.mapElement)if(e[t.declaration].propertyVocabs[t.mapElement]||(e[t.declaration].propertyVocabs[t.mapElement]={}),"Term"===r.name)e[t.declaration].propertyVocabs[t.mapElement].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];e[t.declaration].propertyVocabs[t.mapElement][n]=r.arguments[0].value}else if("Term"===r.name)e[t.declaration].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];e[t.declaration][n]=r.arguments[0].value}return e}parseVocabulariesV2(e,t,r){if(""===t.declaration){if(e.namespace=e.namespace||{},"Term"===r.name)e.namespace.term=r.arguments[0].value;else{const t=r.name.split("Term_")[1];if("namespace"===t||"locale"===t||"declarations"===t)throw new Error(`Invalid vocabulary key: ${t}. The key should not be one of the reserved keys: namespace, locale, declarations`);e.namespace[t]=r.arguments[0].value}return e}if(e.declarations=e.declarations||{},e.declarations[t.declaration]=e.declarations[t.declaration]||{propertyVocabs:{}},""!==t.property)if(e.declarations[t.declaration].propertyVocabs[t.property]||(e.declarations[t.declaration].propertyVocabs[t.property]={}),"Term"===r.name)e.declarations[t.declaration].propertyVocabs[t.property].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];if(n===t.property)throw new Error(`Invalid vocabulary key: "${n}". The key should not be the name of the current property.`);e.declarations[t.declaration].propertyVocabs[t.property][n]=r.arguments[0].value}else if(""!==t.mapElement)if(e.declarations[t.declaration].propertyVocabs[t.mapElement]||(e.declarations[t.declaration].propertyVocabs[t.mapElement]={}),"Term"===r.name)e.declarations[t.declaration].propertyVocabs[t.mapElement].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];if(n===t.mapElement)throw new Error(`Invalid vocabulary key: "${n}". The key should not be the name of the current property.`);e.declarations[t.declaration].propertyVocabs[t.mapElement][n]=r.arguments[0].value}else if("Term"===r.name)e.declarations[t.declaration].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];if("properties"===n||n===t.declaration)throw new Error(`Invalid vocabulary key: "${n}". The key cannot be a reserved word such as "properties" or the name of the current declaration.`);e.declarations[t.declaration][n]=r.arguments[0].value}return e}transformDecoratorsAndVocabularies(){let e=[],t=[];return Object.keys(this.extractionDictionary).forEach((r=>{const n=this.extractionDictionary[r];let o=[],s={};n.forEach((e=>{const t=JSON.parse(e.dcs),n=this.constructTarget(r,e);t.forEach((t=>{const r=this.isVocabDecorator(t.name);r||this.action===a.Action.EXTRACT_VOCAB||(o=this.parseNonVocabularyDecorators(o,t,this.dcs_version,n)),r&&this.action!==a.Action.EXTRACT_NON_VOCAB&&(s=this.enableDcsNamespaceTarget?this.parseVocabulariesV2(s,e,t):this.parseVocabularies(s,e,t))}))})),this.action!==a.Action.EXTRACT_VOCAB&&(e=this.transformNonVocabularyDecorators(o,r,e)),this.action!==a.Action.EXTRACT_NON_VOCAB&&(t=this.enableDcsNamespaceTarget?this.transformVocabularyDecoratorsV2(s,r,t):this.transformVocabularyDecorators(s,r,t))})),{decoratorCommandSet:e,vocabularies:t}}filterOutDecorators(e){return this.removeDecoratorsFromModel?this.action===a.Action.EXTRACT_ALL?void 0:this.action===a.Action.EXTRACT_VOCAB?e.filter((e=>!this.isVocabDecorator(e.name))):e.filter((e=>this.isVocabDecorator(e.name))):e}processMapDeclaration(e,t){if(e.key&&e.key.decorators){const r={declaration:e.name,mapElement:"KEY"};this.constructDCSDictionary(t,e.key.decorators,r),e.key.decorators=this.filterOutDecorators(e.key.decorators)}if(e.value&&e.value.decorators){const r={declaration:e.name,mapElement:"VALUE"};this.constructDCSDictionary(t,e.value.decorators,r),e.value.decorators=this.filterOutDecorators(e.value.decorators)}return e}processProperties(e,t,r){return e.map((e=>{if(e.decorators){const n={declaration:t,property:e.name};this.constructDCSDictionary(r,e.decorators,n),e.decorators=this.filterOutDecorators(e.decorators)}return e}))}processDeclarations(e,t){return e.map((e=>{if(e.decorators){const r={declaration:e.name};this.constructDCSDictionary(t,e.decorators,r),e.decorators=this.filterOutDecorators(e.decorators)}if(e.$class===`${s}.MapDeclaration`&&(e=this.processMapDeclaration(e,t)),e.properties){const r=this.processProperties(e.properties,e.name,t);e.properties=r}return e}))}processModels(){const e=this.sourceModelAst.models.map((e=>{e?.decorators?.length>0&&(this.constructDCSDictionary(e.namespace,e.decorators,{}),e.decorators=this.filterOutDecorators(e.decorators));const t=this.processDeclarations(e.declarations,e.namespace);return e.declarations=t,e}));this.updatedModelAst={...this.updatedModelAst,models:e}}extract(){this.processModels();const e=new n;e.fromAst(this.updatedModelAst);const t=this.transformDecoratorsAndVocabularies();return{updatedModelManager:e,decoratorCommandSet:t.decoratorCommandSet,vocabularies:t.vocabularies}}}e.exports=a},6033:(e,t,r)=>{"use strict";const n=r(9481),o=r(3673),s=r(1595),a=r(1768),{MetaModelNamespace:i}=r(3348),c=r(2722),l=r(8298),{Warning:u,ErrorCodes:p}=r(8487),d=r(1861),f=r(4971)({circles:!0,proto:!1}),{jsonToYaml:h,yamlToJson:m}=r(2307);void 0===r.g&&r(6226);const g="0.4.0",y="concerto version \"^3.0.0\"\nnamespace org.accordproject.decoratorcommands@0.4.0\n\nimport concerto.metamodel@1.0.0.Decorator\n\n/**\n * A reference to an existing named & versioned DecoratorCommandSet\n */\nconcept DecoratorCommandSetReference {\n o String name\n o String version\n}\n\n/**\n * Whether to upsert or append the decorator\n */\nenum CommandType {\n o UPSERT\n o APPEND\n}\n\n/**\n * Which models elements to add the decorator to. Any null\n * elements are 'wildcards'.\n */\nconcept CommandTarget {\n o String namespace optional\n o String declaration optional\n o String property optional\n o String[] properties optional // property and properties are mutually exclusive\n o String type optional\n o MapElement mapElement optional\n}\n\n/**\n * Map Declaration elements which might be used as a target\n */\nenum MapElement {\n o KEY\n o VALUE\n o KEY_VALUE\n}\n\n/**\n * Applies a decorator to a given target\n */\nconcept Command {\n o CommandTarget target\n o Decorator decorator\n o CommandType type\n o String decoratorNamespace optional\n}\n\n/**\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\n */\nconcept DecoratorCommandSet {\n o String name\n o String version\n o DecoratorCommandSetReference[] includes optional // not yet supported\n o Command[] commands\n}\n";class v{constructor(e,t){this.command=e,this.index=t}getCommand(){return this.command}getIndex(){return this.index}}class b{static validate(e,t){const r=new n({strict:!0,metamodelValidation:!0,addMetamodel:!0});t&&r.addModelFiles(t),r.addCTOModel(y,"decoratorcommands@0.3.0.cto");const a=new s(r);return new o(a,r).fromJSON(e),r}static migrateTo(e,t){if(e instanceof Object)for(let r in e){if("$class"===r&&e[r].includes("org.accordproject.decoratorcommands")){const t=a.getNamespace(e.$class);e[r]=e[r].replace(a.parseNamespace(t).version,g)}(e[r]instanceof Object||e[r]instanceof Array)&&this.migrateTo(e[r],t)}return e}static canMigrate(e,t){const r=a.parseNamespace(a.getNamespace(e.$class)).version;return c.major(r)===c.major(t)&&c.minor(r)<c.minor(t)}static addDcsWithIndexToMap(e,t,r){const n=e.get(t);n?n.push(r):e.set(t,[r])}static getDecoratorMaps(e){const t=new Map,r=new Map,n=new Map,o=new Map,s=new Map;return e.commands.map(((e,a)=>{const i=new v(e,a);switch(!0){case!!e?.target?.type:this.addDcsWithIndexToMap(s,e.target.type,i);break;case!!e?.target?.property:this.addDcsWithIndexToMap(n,e.target.property,i);break;case!!e?.target?.properties:e.target.properties.forEach((e=>{this.addDcsWithIndexToMap(n,e,i)}));break;case!!e?.target?.mapElement:this.addDcsWithIndexToMap(o,e.target.mapElement,i);break;case!!e?.target?.declaration:this.addDcsWithIndexToMap(r,e.target.declaration,i);break;case!!e?.target?.namespace:this.addDcsWithIndexToMap(t,e.target.namespace,i)}})),{namespaceCommandsMap:t,declarationCommandsMap:r,propertyCommandsMap:n,mapElementCommandsMap:o,typeCommandsMap:s}}static migrateAndValidate(e,t,r,a,i){if(r&&this.canMigrate(t,g)&&(t=this.migrateTo(t,g)),a){const r=new n({strict:!0,metamodelValidation:!0,addMetamodel:!0,enableMapType:!!e?.enableMapType,importAliasing:e.isAliasedTypeEnabled()});r.addModelFiles(e.getModelFiles()),r.addCTOModel(y,"decoratorcommands@0.4.0.cto");const a=new s(r);new o(a,r).fromJSON(t),i&&t.commands.forEach((e=>{b.validateCommand(r,e)}))}}static pushMapValues(e,t,r){for(const n of t.get(r)||[])e.push(n)}static decorateModels(e,t,r){if(r?.skipValidationAndResolution){if(!1===r?.disableMetamodelResolution||0==!r?.disableMetamodelValidation)throw new Error("skipValidationAndResolution cannot be used with disableMetamodelResolution or disableMetamodelValidation options as false");r.disableMetamodelResolution=!0,r.disableMetamodelValidation=!0}this.migrateAndValidate(e,t,r?.migrate,r?.validate,r?.validateCommands);const o=t.commands.flatMap((e=>[{$class:`${i}.ImportType`,name:e.decorator.name,namespace:e.decorator.namespace?e.decorator.namespace:r?.defaultNamespace}].concat(e.decorator.arguments?e.decorator.arguments?.filter((e=>e.type)).map((e=>({$class:`${i}.ImportType`,name:e.type.name,namespace:e.type.namespace?e.type.namespace:r?.defaultNamespace}))):[]))).filter((e=>e.namespace)),{namespaceCommandsMap:s,declarationCommandsMap:c,propertyCommandsMap:l,mapElementCommandsMap:u,typeCommandsMap:p}=this.getDecoratorMaps(t),d=r?.disableMetamodelResolution?e.getAst(!1,!0):e.getAst(!0,!0),h=f(d);h.models.forEach((e=>{const t=o.filter((t=>t.namespace!==e.namespace));e.imports=e.imports?e.imports.concat(t):t;const n=a.parseNamespace(e.namespace).name;e.declarations.forEach((t=>{const o=[],{name:a,$class:d}=t;if(this.pushMapValues(o,c,a),this.pushMapValues(o,s,e.namespace),this.pushMapValues(o,s,n),this.pushMapValues(o,p,d),o.sort(((e,t)=>e.getIndex()-t.getIndex())).forEach((n=>{this.executeCommand(e.namespace,t,n.getCommand(),null,r),this.isNamespaceTargetEnabled(r?.enableDcsNamespaceTarget)&&this.executeNamespaceCommand(e,n.getCommand())})),d===`${i}.MapDeclaration`){const r=[];this.pushMapValues(r,p,t.key.$class),this.pushMapValues(r,p,t.value.$class),this.pushMapValues(r,u,"KEY"),this.pushMapValues(r,u,"VALUE"),this.pushMapValues(r,u,"KEY_VALUE"),r.sort(((e,t)=>e.getIndex()-t.getIndex())).forEach((r=>{this.executeCommand(e.namespace,t,r.getCommand())}))}t.properties&&t.properties.forEach((r=>{const n=[],{name:o,$class:s}=r;this.pushMapValues(n,l,o),this.pushMapValues(n,p,s),n.sort(((e,t)=>e.getIndex()-t.getIndex())).forEach((n=>{this.executeCommand(e.namespace,t,n.getCommand(),r)}))}))}))}));const m=!!e?.enableMapType,g=new n({strict:e.isStrict(),enableMapType:m,importAliasing:e.isAliasedTypeEnabled(),decoratorValidation:e.getDecoratorValidation()});return g.fromAst(h,{disableValidation:r?.disableMetamodelValidation}),g}static extractDecorators(e,t){t={removeDecoratorsFromModel:!1,locale:"en",enableDcsNamespaceTarget:!1,...t};const r=e.getAst(!0,!0),n=new l(t.removeDecoratorsFromModel,t.locale,g,r,l.Action.EXTRACT_ALL,{enableDcsNamespaceTarget:this.isNamespaceTargetEnabled(t.enableDcsNamespaceTarget)}).extract();return{modelManager:n.updatedModelManager,decoratorCommandSet:n.decoratorCommandSet,vocabularies:n.vocabularies}}static extractVocabularies(e,t){t={removeDecoratorsFromModel:!1,locale:"en",enableDcsNamespaceTarget:!1,...t};const r=e.getAst(!0,!0),n=new l(t.removeDecoratorsFromModel,t.locale,g,r,l.Action.EXTRACT_VOCAB,{enableDcsNamespaceTarget:this.isNamespaceTargetEnabled(t.enableDcsNamespaceTarget)}).extract();return{modelManager:n.updatedModelManager,vocabularies:n.vocabularies}}static extractNonVocabDecorators(e,t){t={removeDecoratorsFromModel:!1,locale:"en",enableDcsNamespaceTarget:!1,...t};const r=e.getAst(!0),n=new l(t.removeDecoratorsFromModel,t.locale,g,r,l.Action.EXTRACT_NON_VOCAB,{enableDcsNamespaceTarget:this.isNamespaceTargetEnabled(t.enableDcsNamespaceTarget)}).extract();return{modelManager:n.updatedModelManager,decoratorCommandSet:n.decoratorCommandSet}}static validateCommand(e,t){t.target.type&&e.resolveType("DecoratorCommand.type",t.target.type);let r=null;if(t.target.namespace&&(r=e.getModelFile(t.target.namespace),!r)){const{name:n,version:o}=a.parseNamespace(t.target.namespace);o||(r=e.getModelFiles().find((e=>function(e,t){const{name:r}=a.parseNamespace(e.getNamespace());return r===t}(e,n))))}if(t.target.namespace&&!r)throw new Error(`Decorator Command references namespace "${t.target.namespace}" which does not exist: ${JSON.stringify(t,null,2)}`);if(t.target.namespace&&t.target.declaration&&e.resolveType("DecoratorCommand.target.declaration",`${r.getNamespace()}.${t.target.declaration}`),t.target.properties&&t.target.property)throw new Error("Decorator Command references both property and properties. You must either reference a single property or a list of properites.");if(t.target.namespace&&t.target.declaration&&t.target.property&&!e.getType(`${r.getNamespace()}.${t.target.declaration}`).getProperty(t.target.property))throw new Error(`Decorator Command references property "${t.target.namespace}.${t.target.declaration}.${t.target.property}" which does not exist.`);if(t.target.namespace&&t.target.declaration&&t.target.properties){const n=e.getType(`${r.getNamespace()}.${t.target.declaration}`);t.target.properties.forEach((e=>{if(!n.getProperty(e))throw new Error(`Decorator Command references property "${t.target.namespace}.${t.target.declaration}.${e}" which does not exist.`)}))}}static applyDecoratorForMapElement(e,t,r,n,o){const s="KEY"===e?r.key:r.value;t.type?this.falsyOrEqual(t.type,s.$class)&&this.applyDecorator(s,n,o):this.applyDecorator(s,n,o)}static falsyOrEqual(e,t){return Array.isArray(e)?function(e,t){const r=new Set(e),n=new Set(t),o=new Set([...r].filter((e=>n.has(e))));return Array.from(o)}(e,t).length>0:!e||t.includes(e)}static applyDecorator(e,t,r){if("UPSERT"===t){let t=!1;if(e.decorators)for(let n=0;n<e.decorators.length;n++)e.decorators[n].name===r.name&&(e.decorators[n]=r,t=!0);t||(e.decorators?e.decorators.push(r):e.decorators=[r])}else{if("APPEND"!==t)throw new Error(`Unknown command type ${t}`);e.decorators?e.decorators.push(r):e.decorators=[r],this.checkForDuplicateDecorators(e)}}static checkForDuplicateDecorators(e){const t=new Set;e.decorators.forEach((r=>{const n=r.name;if(t.has(n))throw new d(`Duplicate decorator ${n}`,e.location);t.add(n)}))}static executeNamespaceCommand(e,t){const{target:r,decorator:n,type:o}=t;if(2===Object.keys(r).length&&r.namespace){const{name:t}=a.parseNamespace(e.namespace);this.falsyOrEqual(r.namespace,[e.namespace,t])&&this.applyDecorator(e,o,n)}}static executeCommand(e,t,r,n,o){const{target:s,decorator:c,type:l}=r,{name:u}=a.parseNamespace(e,{disableVersionParsing:!0});if(this.falsyOrEqual(s.namespace,[e,u])&&this.falsyOrEqual(s.declaration,[t.name]))if(t.$class===`${i}.MapDeclaration`)if(s.mapElement)switch(s.mapElement){case"KEY":case"VALUE":this.applyDecoratorForMapElement(s.mapElement,s,t,l,c);break;case"KEY_VALUE":this.applyDecoratorForMapElement("KEY",s,t,l,c),this.applyDecoratorForMapElement("VALUE",s,t,l,c)}else s.type?(this.falsyOrEqual(s.type,t.key.$class)&&this.applyDecorator(t.key,l,c),this.falsyOrEqual(s.type,t.value.$class)&&this.applyDecorator(t.value,l,c)):this.checkForNamespaceTargetAndApplyDecorator(t,l,c,s,o?.enableDcsNamespaceTarget);else s.property||s.properties||s.type?n&&this.executePropertyCommand(n,r):this.checkForNamespaceTargetAndApplyDecorator(t,l,c,s,o?.enableDcsNamespaceTarget)}static executePropertyCommand(e,t){const{target:r,decorator:n,type:o}=t;(r.properties||r.property||r.type)&&this.falsyOrEqual(r.property?r.property:r.properties,[e.name])&&this.falsyOrEqual(r.type,[e.$class])&&this.applyDecorator(e,o,n)}static checkForNamespaceTargetAndApplyDecorator(e,t,r,n,o){this.isNamespaceTargetEnabled(o)?n.declaration&&this.applyDecorator(e,t,r):this.applyDecorator(e,t,r)}static isNamespaceTargetEnabled(e){return!(!e&&"true"!=={NODE_ENV:"production"}.ENABLE_DCS_NAMESPACE_TARGET&&(u.printDeprecationWarning("Functionality for namespace targeted Decorator Command Sets has changed. Using namespace targets to apply decorators on all declarations in a namespace will be deprecated soon.",p.DEPRECATION_WARNING,p.CONCERTO_DEPRECATION_001,"Please refer to https://concerto.accordproject.org/deprecation/001"),1))}static jsonToYaml(e){return this.validate(e),h(e)}static yamlToJson(e){const t=m(e);return this.validate(t),t}}e.exports=b},1051:(e,t,r)=>{"use strict";const n=r(480);e.exports={getDecoratorModel:function(){return{decoratorModelFile:"concerto_decorator_1.0.0.cto",decoratorModelCto:"namespace concerto.decorator@1.0.0\n abstract concept Decorator {}\n concept DotNetNamespace extends Decorator {\n o String namespace\n }",decoratorModelAst:JSON.parse(JSON.stringify(n))}}}},1595:(e,t,r)=>{"use strict";const{TypedStack:n}=r(8487),o=r(7833)("concerto:Factory"),s=r(2438),a=r(1768),i=r(6422),c=r(7854),l=r(2552),u=r(6113),p=r(7755),d=r(289),f=r(182),h=r(3464),m=r(7657);h.extend(m),void 0===r.g&&r(9481);class g{static newId(){return f.v4()}constructor(e){this.modelManager=e}newResource(e,t,r,n){n=n||{};const i=a.getFullyQualifiedName(e,t),c=this.modelManager.getType(i);if(c.isAbstract()){let r=s.messageFormatter("factory-newinstance-abstracttype");throw new Error(r({namespace:e,type:t}))}let u=c.getIdentifierFieldName();if(c.isSystemIdentified()&&(r=null==r?g.newId():r),u){if("string"!=typeof r){let r=s.messageFormatter("factory-newinstance-invalididentifier");throw new Error(r({namespace:e,type:t}))}if(0===r.trim().length){let r=s.messageFormatter("factory-newinstance-missingidentifier");throw new Error(r({namespace:e,type:t}))}if(r){let e=c.getProperty(u);if(e?.isTypeScalar?.()&&(e=e.getScalarField()),e?.validator?.regex&&!1===e.validator?.regex.test(r))throw new Error("Provided id does not match regex: "+e?.validator?.regex)}}else if(r)throw new Error("Type is not identifiable "+c.getFullyQualifiedName());let f=null,m=null;return(c.isTransaction()||c.isEvent())&&(m=h.utc()),f=n.disableValidation?new p(this.modelManager,c,e,t,r,m):new d(this.modelManager,c,e,t,r,m,new l),f.assignFieldDefaults(),this.initializeNewObject(f,c,n),u&&(f[u]=r),o("newResource","Factory.newResource created ",r||"valid"),f}newConcept(e,t,r,n){return this.newResource(e,t,r,n)}newRelationship(e,t,r){const n=a.getFullyQualifiedName(e,t),o=this.modelManager.getType(n);if(!o.isIdentified())throw new Error(`Cannot create a relationship to ${n}, it is not identifiable.`);return new u(this.modelManager,o,e,t,r)}newTransaction(e,t,r,n){if(!e)throw new Error("ns not specified");if(!t)throw new Error("type not specified");let o=this.newResource(e,t,r,n);if(!o.getClassDeclaration().isTransaction())throw new Error(o.getClassDeclaration().getFullyQualifiedName()+" is not a transaction");return o}newEvent(e,t,r,n){if(!e)throw new Error("ns not specified");if(!t)throw new Error("type not specified");let o=this.newResource(e,t,r,n);if(!o.getClassDeclaration().isEvent())throw new Error(o.getClassDeclaration().getFullyQualifiedName()+" is not an event");return o}initializeNewObject(e,t,r){const o=this.parseGenerateOptions(r);if(o){o.stack=new n(e),o.seen=[e.getFullyQualifiedType()];const r=new i;t.accept(r,o)}}parseGenerateOptions(e){if(!e.generate)return null;const t={};return t.modelManager=this.modelManager,t.factory=this,/^empty$/i.test(e.generate)?t.valueGenerator=c.empty():t.valueGenerator=c.sample(),t.includeOptionalFields=!!e.includeOptionalFields,t}}e.exports=g},2438:(e,t,r)=>{"use strict";const n=r(8168);function o(e){return function(t){let r=n.en[e];for(let e in t)r=r.replace(new RegExp(`\\{${e}\\}`,"g"),t[e]);return r}}function s(e){return n.en[e]}function a(e){return{messageFormatter:o,formatMessage:s}}a.messageFormatter=o,a.formatMessage=s,e.exports=a},953:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"AssetDeclaration"}}},9869:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(5437),s=r(8171),a=r(1529),i=r(2438),c=r(1861),l=r(4471),u=r(6099),p=r(1768);void 0===r.g&&r(9852),e.exports=class extends o{process(){if(super.process(),this.properties=[],this.superType=null,this.superTypeDeclaration=null,this.idField=null,this.timestamped=!1,this.abstract=!1,this.type=this.ast.$class,this.ast.isAbstract&&(this.abstract=!0),this.ast.superType?this.superType=this.ast.superType.name:this.modelFile.isSystemModelFile()&&"Concept"===this.name||(this.superType="Concept"),this.ast.identified&&(this.ast.identified.$class===`${n}.IdentifiedBy`?this.idField=this.ast.identified.name:(this.idField="$identifier",this.addIdentifierField())),!Array.isArray(this.ast.properties)){let e=i.messageFormatter("classdeclaration-validate-undefined-properties");throw new c(e({class:this.name}),this.modelFile,this.ast.location)}for(let e=0;e<this.ast.properties.length;e++){let t=this.ast.properties[e];if(p.isSystemProperty(t.name))throw new c(`Invalid field name '${t.name}'`,this.modelFile,this.ast.location);if(t.$class===`${n}.RelationshipProperty`)this.properties.push(new u(this,t));else if(t.$class===`${n}.EnumProperty`)this.properties.push(new s(this,t));else{if(t.$class!==`${n}.BooleanProperty`&&t.$class!==`${n}.StringProperty`&&t.$class!==`${n}.IntegerProperty`&&t.$class!==`${n}.LongProperty`&&t.$class!==`${n}.DoubleProperty`&&t.$class!==`${n}.DateTimeProperty`&&t.$class!==`${n}.ObjectProperty`){let e=i.messageFormatter("classdeclaration-process-unrecmodelelem");throw new c(e({type:t.$class}),this.modelFile,this.ast.location)}this.properties.push(new a(this,t))}}"concerto@1.0.0.Transaction"!==this.fqn&&"concerto@1.0.0.Event"!==this.fqn||this.addTimestampField()}addTimestampField(){const e={};e.$class=`${n}.DateTimeProperty`,e.name="$timestamp",this.properties.push(new a(this,e))}addIdentifierField(){const e={};e.$class=`${n}.StringProperty`,e.name="$identifier",this.properties.push(new a(this,e))}_resolveSuperType(){if(!this.superType)return null;this.superTypeDeclaration=null;let e=null;if(this.getModelFile().isImportedType(this.superType)){let t=this.getModelFile().resolveImport(this.superType);e=this.modelFile.getModelManager().getType(t)}else e=this.getModelFile().getType(this.superType);if(!e)throw new c("Could not find super type "+this.superType,this.modelFile,this.ast.location);if("ConceptDeclaration"!==e.declarationKind()&&this.declarationKind()!==e.declarationKind())throw new c(`${this.declarationKind()} (${this.getName()}) cannot extend ${e.declarationKind()} (${e.getName()})`,this.modelFile,this.ast.location);return this.superTypeDeclaration=e,e}validate(){if(super.validate(),null!==this.superType){if(this.superType===this.name&&!["Asset","Concept","Event","Participant","Transaction"].includes(this.superType)){let e=i("en").messageFormatter("classdeclaration-validate-selfextending");throw new c(e({class:this.name}),this.modelFile,this.ast.location)}this._resolveSuperType()}if(this.idField){const e=this.getProperty(this.idField);if(!e){let e=i("en").messageFormatter("classdeclaration-validate-identifiernotproperty");throw new c(e({class:this.name,idField:this.idField}),this.modelFile,this.ast.location)}{const t="String"===e.getType(),r=e.getParent().getModelFile().getType(e.getType()),n=null!==r&&r.isScalarDeclaration?.()&&"String"===r.getType?.();if(!t&&!n){let e=i("en").messageFormatter("classdeclaration-validate-identifiernotstring");throw new c(e({class:this.name,idField:this.idField}),this.modelFile,this.ast.location)}if(e.isOptional())throw new c("Identifying fields cannot be optional.",this.modelFile,this.ast.location);if(this.superType){const e=this.getModelFile().getType(this.superType);if(e&&e.isIdentified())if(this.isSystemIdentified()){if(!e.isSystemIdentified())throw new c(`Super class ${e.getFullyQualifiedName()} has an explicit identifier ${e.getIdentifierFieldName()} that cannot be redeclared.`,this.modelFile,this.ast.location)}else if(e.isExplicitlyIdentified())throw new c(`Super class ${e.getFullyQualifiedName()} has an explicit identifier ${e.getIdentifierFieldName()} that cannot be redeclared.`,this.modelFile,this.ast.location)}}}const e=this.getProperties(),t=new Set;e.forEach((e=>{const r=e.getName();if(t.has(r)){const e=i("en").messageFormatter("classdeclaration-validate-duplicatefieldname");throw new c(e({class:this.name,fieldName:r}),this.modelFile,this.ast.location)}t.add(r)}));for(let t=0;t<e.length;t++){let r=e[t];if(r.isPrimitive()||this.isEnum()||r.getNamespace()===this.getNamespace())r.validate(this);else{const e=r.getFullyQualifiedTypeName(),t=this.modelFile.getModelManager().getType(e);r.validate(t)}}}isAbstract(){return this.abstract}isIdentified(){return!!this.getIdentifierFieldName()}isSystemIdentified(){return"$identifier"===this.getIdentifierFieldName()}isExplicitlyIdentified(){return!!this.idField&&"$identifier"!==this.idField}getIdentifierFieldName(){if(this.idField)return this.idField;if(this.getSuperType()){let e=this.getModelFile().getLocalType(this.getSuperType());return e||(e=this.modelFile.getModelManager().getType(this.getSuperType())),e.getIdentifierFieldName()}return null}getOwnProperty(e){for(let t=0;t<this.properties.length;t++){const r=this.properties[t];if(r.getName()===e)return r}return null}getOwnProperties(){return this.properties}getSuperType(){const e=this.getSuperTypeDeclaration();return e?e.getFullyQualifiedName():null}getSuperTypeDeclaration(){return this.superType?this.superTypeDeclaration?this.superTypeDeclaration:this._resolveSuperType():null}getAssignableClassDeclarations(){const e=new Set,t=this.getModelFile().getModelManager(),r=new l(t).getClassDeclarations(),n=new Map;r.forEach((e=>{const t=e.getSuperType();if(t){const r=n.get(t)||new Set;r.add(e),n.set(t,r)}}));const o=t=>{t.forEach((t=>{e.add(t);const r=t.getFullyQualifiedName(),s=n.get(r);s&&o(s)}))};return o([this]),Array.from(e)}getDirectSubclasses(){const e=this.getModelFile().getModelManager(),t=new l(e).getClassDeclarations(),r=new Map;t.forEach((e=>{const t=e.getSuperType();if(t){const n=r.get(t)||new Set;n.add(e),r.set(t,n)}}));const n=this.getFullyQualifiedName(),o=r.get(n);return o?Array.from(o):[]}getAllSuperTypeDeclarations(){const e=[];for(let t=this;t=t.getSuperTypeDeclaration();)e.push(t);return e}getProperty(e){let t=this.getOwnProperty(e),r=null;if(null===t&&null!==this.superType){if(this.getModelFile().isImportedType(this.superType)){let e=this.getModelFile().resolveImport(this.superType);r=this.modelFile.getModelManager().getType(e)}else r=this.getModelFile().getType(this.superType);t=r.getProperty(e)}return t}getProperties(){let e=this.getOwnProperties(),t=null;if(null!==this.superType){if(this.getModelFile().isImportedType(this.superType)){let e=this.getModelFile().resolveImport(this.superType);t=this.modelFile.getModelManager().getType(e)}else t=this.getModelFile().getType(this.superType);if(!t)throw new c("Could not find super type "+this.superType,this.modelFile,this.ast.location);e=e.concat(t.getProperties())}return e}getNestedProperty(e){const t=e.split(".");let r=this,n=null;for(let o=0;o<t.length;o++){if(n=r.getProperty(t[o]),null===n)throw new c("Property "+t[o]+" does not exist on "+r.getFullyQualifiedName(),this.modelFile,this.ast.location);if(o<t.length-1){if(n.isPrimitive()||n.isTypeEnum())throw new Error("Property "+t[o]+" is a primitive or enum. Invalid property path: "+e);r=r.getModelFile().getModelManager().getType(n.getFullyQualifiedTypeName())}}return n}toString(){let e="";return this.superType&&(e=" super="+this.superType),"ClassDeclaration {id="+this.getFullyQualifiedName()+e+" enum="+this.isEnum()+" abstract="+this.isAbstract()+"}"}isAsset(){return this.type===`${n}.AssetDeclaration`}isParticipant(){return this.type===`${n}.ParticipantDeclaration`}isTransaction(){return this.type===`${n}.TransactionDeclaration`}isEvent(){return this.type===`${n}.EventDeclaration`}isConcept(){return this.type===`${n}.ConceptDeclaration`}isEnum(){return this.type===`${n}.EnumDeclaration`}isMapDeclaration(){return this.type===`${n}.MapDeclaration`}isClassDeclaration(){return!0}}},6341:(e,t,r)=>{"use strict";const n=r(9869);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"ConceptDeclaration"}}},5437:(e,t,r)=>{"use strict";const n=r(7688),o=r(1768),s=r(1861);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(t),this.modelFile=e,this.process()}process(){if(super.process(),!o.isValidIdentifier(this.ast.name))throw new s(`Invalid class name '${this.ast.name}'`,this.modelFile,this.ast.location);this.name=this.ast.name,this.fqn=o.getFullyQualifiedName(this.modelFile.getNamespace(),this.name)}getModelFile(){return this.modelFile}getName(){return this.name}getNamespace(){return this.modelFile.getNamespace()}getFullyQualifiedName(){return this.fqn}isIdentified(){return!1}isSystemIdentified(){return!1}getIdentifierFieldName(){return null}getType(){return null}toString(){return null}isEnum(){return!1}isClassDeclaration(){return!1}isScalarDeclaration(){return!1}isMapDeclaration(){return!1}}},7688:(e,t,r)=>{"use strict";const n=r(4404),o=r(1861);void 0===r.g&&r(6226),e.exports=class{constructor(e){if(!e)throw new Error("ast not specified");this.ast=e}getModelFile(){throw new Error("not implemented")}accept(e,t){return e.visit(this,t)}process(){if(this.decorators=[],this.ast.decorators)for(let e=0;e<this.ast.decorators.length;e++){let t,r=this.ast.decorators[e],o=this.getModelFile().getModelManager().getDecoratorFactories();for(let e of o)if(t=e.newDecorator(this,r),t)break;t||(t=new n(this,r)),this.decorators.push(t)}}validate(){if(this.decorators&&this.decorators.length>0){for(let e=0;e<this.decorators.length;e++)this.decorators[e].validate();const e=new Set;this.decorators.forEach((t=>{const r=t.getName();if(e.has(r)){const e=this.getModelFile();throw new o(`Duplicate decorator ${r}`,e,this.ast.location)}e.add(r)}))}}getDecorators(){return this.decorators}getDecorator(e){for(let t=0;t<this.decorators.length;t++){let r=this.decorators[t];if(r.getName()===e)return r}return null}}},4404:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),{Logger:o}=r(8487),s=r(1768),a=r(1861);void 0===r.g&&(r(9869),r(9852)),e.exports=class{constructor(e,t){this.ast=t,this.parent=e,this.arguments=null,this.process()}handleError(e,t){if(o.dispatch(e,t),"error"===e)throw new a(t,this.getParent().getModelFile(),this.ast.location)}accept(e,t){return e.visit(this,t)}getParent(){return this.parent}process(){if(this.name=this.ast.name,this.arguments=[],this.ast.arguments)for(let e=0;e<this.ast.arguments.length;e++){let t=this.ast.arguments[e];t&&(t.$class===`${n}.DecoratorTypeReference`?this.arguments.push({type:"Identifier",name:t.type.name,array:t.isArray}):this.arguments.push(t.value))}}validate(){const e=this.getParent().getModelFile(),t=this.getParent().getFullyQualifiedName?.(),r=e.getModelManager().getDecoratorValidation();if(r.missingDecorator||r.invalidDecorator)try{e.resolveType(t,this.getName(),this.ast.location);const n=e.getType(this.getName()),o=n.getProperties().filter((e=>!e.isOptional())),a=n.getProperties().filter((e=>e.isOptional())),i=[...o,...a];if(this.getArguments().length<o.length){const e=`Decorator ${this.getName()} has too few arguments. Required properties are: [${o.map((e=>e.getName())).join()}]`;this.handleError(r.invalidDecorator,e)}const c=this.getArguments();for(let t=0;t<c.length;t++){const n=c[t];if(t>i.length-1){const e=`Decorator ${this.getName()} has too many arguments. Properties are: [${i.map((e=>e.getName())).join()}]`;this.handleError(r.invalidDecorator,e)}else{const o=i[t],a=typeof n;switch(o.getType()){case"Integer":case"Double":case"Long":if("number"!==a){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected number. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}break;case"String":if("string"!==a){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected string. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}break;case"Boolean":if("boolean"!==a){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected boolean. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}break;default:{if("object"!==a||"Identifier"!==n?.type){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected object. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}const t=e.getType(n.name);if(t){if(!s.isAssignableTo(t.getModelFile(),t.getFullyQualifiedName(),o)){const e=`Decorator ${this.getName()} references a type ${n.name} which cannot be assigned to the declared type ${o.getFullyQualifiedTypeName()}`;this.handleError(r.invalidDecorator,e)}}else{const e=`Decorator ${this.getName()} references a type ${n.name} which has not been defined/imported.`;this.handleError(r.invalidDecorator,e)}break}}}}}catch(e){this.handleError(r.missingDecorator,e)}}getName(){return this.name}getArguments(){return this.arguments}isDecorator(){return!0}}},8088:(e,t,r)=>{"use strict";void 0===r.g&&(r(9869),r(4404),r(9852)),e.exports=class{newDecorator(e,t){throw new Error("abstract function called")}}},2302:(e,t,r)=>{"use strict";const n=r(9869);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}toString(){return"EnumDeclaration {id="+this.getFullyQualifiedName()+"}"}declarationKind(){return"EnumDeclaration"}}},8171:(e,t,r)=>{"use strict";const n=r(9852);void 0===r.g&&r(9869),e.exports=class extends n{constructor(e,t){super(e,t)}validate(e){super.validate(e)}isEnumValue(){return!0}}},7337:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}process(){super.process()}declarationKind(){return"EventDeclaration"}}},1529:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(9852),s=r(1976),a=r(516),i=r(8487).NullUtil;void 0===r.g&&(r(9869),r(6375));class c extends o{constructor(e,t){super(e,t),this.scalarField=null}process(){switch(super.process(),this.validator=null,this.getType()){case"Integer":case"Double":case"Long":this.ast.validator&&(this.validator=new s(this,this.ast.validator));break;case"String":(this.ast.validator||this.ast.lengthValidator)&&(this.validator=new a(this,this.ast.validator,this.ast.lengthValidator))}i.isNull(this.ast.defaultValue)?this.defaultValue=null:this.defaultValue=this.ast.defaultValue}getValidator(){return this.validator}getDefaultValue(){return this.defaultValue}toString(){return"Field {name="+this.name+", type="+this.getFullyQualifiedTypeName()+", array="+this.array+", optional="+this.optional+"}"}isField(){return!0}isTypeScalar(){if(this.isPrimitive())return!1;{this.getParent().getModelFile().resolveType("property "+this.getFullyQualifiedName(),this.getType());const e=this.getParent().getModelFile().getType(this.getType());return e.isScalarDeclaration?.()}}getScalarField(){if(this.scalarField)return this.scalarField;if(!this.isTypeScalar())throw new Error(`Field ${this.name} is not a scalar property.`);const e=this.getParent().getModelFile().getType(this.getType()),t=JSON.parse(JSON.stringify(e.ast));switch(e.ast.$class){case`${n}.StringScalar`:t.$class=`${n}.StringProperty`;break;case`${n}.BooleanScalar`:t.$class=`${n}.BooleanProperty`;break;case`${n}.DateTimeScalar`:t.$class=`${n}.DateTimeProperty`;break;case`${n}.DoubleScalar`:t.$class=`${n}.DoubleProperty`;break;case`${n}.IntegerScalar`:t.$class=`${n}.IntegerProperty`;break;case`${n}.LongScalar`:t.$class=`${n}.LongProperty`;break;default:throw new Error(`Unrecognized scalar type ${e.ast.$class}`)}return t.name=this.ast.name,this.scalarField=new c(this.getParent(),t),this.scalarField.array=this.isArray(),this.scalarField}}e.exports=c},8058:(e,t,r)=>{"use strict";const n=r(9869);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t),this.process()}}},1861:(e,t,r)=>{"use strict";const{BaseFileException:n}=r(8487);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t,r,n){let o="",s=null;t&&t.getName()&&(s=t.getName(),o="File '"+s+"': "),r&&(o=o+"line "+r.start.line+" column "+r.start.column+", to line "+r.end.line+" column "+r.end.column+". "),o=o.charAt(0).toUpperCase()+o.slice(1),super(e,r,e+" "+o,s,n)}}},4471:(e,t,r)=>{"use strict";void 0===r.g&&(r(9869),r(9481)),e.exports=class{constructor(e){this.modelManager=e}accept(e,t){return e.visit(this,t)}getClassDeclarations(){let e=[];const t=this.modelManager.getModelFiles();for(let r=0;r<t.length;r++){const n=t[r].getAllDeclarations().filter((e=>!e.isMapDeclaration?.()&&!e.isScalarDeclaration?.()));e=e.concat(n)}return e}getClassDeclaration(e){return this.modelManager.getType(e)}getModelManager(){return this.modelManager}}},3135:(e,t,r)=>{"use strict";const n=r(5437),o=r(1861),s=r(7046),a=r(8968),i=r(1768);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){const r=e.getModelManager();if("true"!=={NODE_ENV:"production"}.ENABLE_MAP_TYPE&&!r.enableMapType)throw new Error('MapType feature is not enabled. Please set the environment variable "ENABLE_MAP_TYPE=true", or add {enableMapType: true} to the ModelManger options, to access this functionality.');super(e,t),this.modelFile=e,this.process()}process(){if(super.process(),!this.ast.key||!this.ast.value)throw new o(`MapDeclaration must contain Key & Value properties ${this.ast.name}`,this.modelFile,this.ast.location);if(!i.isValidMapKey(this.ast.key))throw new o(`MapDeclaration must contain valid MapKeyType ${this.ast.name}`,this.modelFile,this.ast.location);if(!i.isValidMapValue(this.ast.value))throw new o(`MapDeclaration must contain valid MapValueType, for MapDeclaration ${this.ast.name}`,this.modelFile,this.ast.location);this.name=this.ast.name,this.key=new a(this,this.ast.key),this.value=new s(this,this.ast.value),this.fqn=i.getFullyQualifiedName(this.modelFile.getNamespace(),this.ast.name)}validate(){super.validate(),this.key.validate(),this.value.validate()}getFullyQualifiedName(){return this.fqn}getModelFile(){return this.modelFile}getName(){return this.name}getKey(){return this.key}getValue(){return this.value}toString(){return"MapDeclaration {id="+this.getFullyQualifiedName()+"}"}declarationKind(){return"MapDeclaration"}isMapDeclaration(){return!0}}},8968:(e,t,r)=>{"use strict";const n=r(1768),{MetaModelNamespace:o}=r(3348),s=r(7688),a=r(1861);void 0===r.g&&(r(6226),r(3135)),e.exports=class extends s{constructor(e,t){super(t),this.parent=e,this.modelFile=e.getModelFile(),this.process()}process(){super.process(),this.processType(this.ast)}validate(){if(!n.isPrimitiveType(this.type)){const e=this.modelFile.getType(this.ast.type.name);if(!n.isValidMapKeyScalar(e))throw new a(`Scalar must be one of StringScalar, DateTimeScalar in context of MapKeyType. Invalid Scalar: ${this.type}, for MapDeclaration ${this.parent.name}`)}}processType(e){switch(e.$class){case`${o}.DateTimeMapKeyType`:this.type="DateTime";break;case`${o}.StringMapKeyType`:this.type="String";break;case`${o}.ObjectMapKeyType`:this.type=String(this.ast.type.name)}}getModelFile(){return this.parent.getModelFile()}getParent(){return this.parent}getType(){return this.type}toString(){return"MapKeyType {id="+this.getType()+"}"}isKey(){return!0}isValue(){return!1}getNamespace(){return this.modelFile.getNamespace()}}},7046:(e,t,r)=>{"use strict";const n=r(7688),{MetaModelNamespace:o}=r(3348),s=r(1861),a=r(1768);void 0===r.g&&(r(6226),r(3135)),e.exports=class extends n{constructor(e,t){super(t),this.parent=e,this.modelFile=e.getModelFile(),this.process()}process(){super.process(),this.processType(this.ast)}validate(){if(!a.isPrimitiveType(this.type)){const e=this.modelFile.getType(this.ast.type.name);if(e.isMapDeclaration?.())throw new s(`MapDeclaration as Map Type Value is not supported: ${this.type}`)}}processType(e){switch(this.ast.$class){case`${o}.ObjectMapValueType`:if(!("type"in e))throw new s(`ObjectMapValueType must contain property 'type', for MapDeclaration named ${this.parent.name}`);if(!("$class"in e.type)||!("name"in e.type))throw new s(`ObjectMapValueType type must contain property '$class' and property 'name', for MapDeclaration named ${this.parent.name}`);if("concerto.metamodel@1.0.0.TypeIdentifier"!==e.type.$class)throw new s(`ObjectMapValueType type $class must be of TypeIdentifier for MapDeclaration named ${this.parent.name}`);this.type=String(this.ast.type.name);break;case`${o}.BooleanMapValueType`:this.type="Boolean";break;case`${o}.DateTimeMapValueType`:this.type="DateTime";break;case`${o}.StringMapValueType`:this.type="String";break;case`${o}.IntegerMapValueType`:this.type="Integer";break;case`${o}.LongMapValueType`:this.type="Long";break;case`${o}.DoubleMapValueType`:this.type="Double"}}getModelFile(){return this.parent.getModelFile()}getParent(){return this.parent}getType(){return this.type}toString(){return"MapValueType {id="+this.getType()+"}"}isKey(){return!1}isValue(){return!0}getNamespace(){return this.modelFile.getNamespace()}}},3899:(e,t,r)=>{"use strict";const{MetaModelUtil:n}=r(3348),o=r(9481),s=r(1595),a=r(3673),i=r(6226);function c(){const e=new o,t=new i(e,n.metaModelAst,n.metaModelCto,"concerto.metamodel",!0);return e.addModelFile(t,n.metaModelCto,"concerto.metamodel"),e}function l(e){const t=c(),r=new s(t);return new a(r,t).fromJSON(e),e}e.exports={newMetaModelManager:c,validateMetaModel:l,modelManagerFromMetaModel:function(e){const t=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:l(e),r=new o;return t.models.forEach((e=>{const t=new i(r,e,null,null,!0);r.addModelFile(t,null,null)})),r.validateModelFiles(),r}}},6226:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(8330),s=r(2722),a=r(953),i=r(2302),c=r(9869),l=r(6341),u=r(7189),p=r(3218),d=r(745),f=r(7337),h=r(1861),m=r(3135),g=r(1768),y=r(2438),v=r(7688),{Warning:b,ErrorCodes:w}=r(8487);void 0===r.g&&(r(9869),r(9481),r(5437));class A extends v{constructor(e,t,r,n){if(super(t),this.modelManager=e,this.external=!1,this.declarations=[],this.localTypes=null,this.imports=[],this.importShortNames=new Map,this.importWildcardNamespaces=[],this.importUriMap={},this.fileName="UNKNOWN",this.concertoVersion=null,this.version=null,!t||"object"!=typeof t)throw new Error("ModelFile expects a Concerto model AST as input.");if(this.ast=t,r&&"string"!=typeof r)throw new Error("ModelFile expects an (optional) Concerto model definition as a string.");if(this.definitions=r,n&&"string"!=typeof n)throw new Error("ModelFile expects an (optional) filename as a string.");this.fileName=n,n&&(this.external=n.startsWith("@")),this.process(),this.fromAst(this.ast),this.isCompatibleVersion(),this.localTypes=new Map;for(let e in this.declarations){let t=this.declarations[e],r=this.getNamespace()+"."+t.getName();this.localTypes.set(r,this.declarations[e])}}getModelFile(){return this}isModelFile(){return!0}getVersion(){return this.version}isSystemModelFile(){return this.namespace.startsWith("concerto@")||"concerto"===this.namespace}isExternal(){return this.external}getImportURI(e){return this.importUriMap[e]||null}getExternalImports(){return this.importUriMap}accept(e,t){return e.visit(this,t)}getModelManager(){return this.modelManager}getImports(){let e=[];return this.imports.forEach((t=>{e=e.concat(g.importFullyQualifiedNames(t))})),e}validate(){super.validate();const e=new Map;this.getImports().forEach((t=>{const r=g.getNamespace(t),n=g.getShortName(t),o=this.getModelManager().getModelFile(r),{name:s,version:a}=g.parseNamespace(r);if(!o){let e=y.messageFormatter("modelmanager-gettype-noregisteredns");throw new h(e({type:t}),this)}const i=e.get(s);if("concerto"!==s&&void 0!==i&&i!==a){let e=y.messageFormatter("modelmanager-gettype-duplicatensimport");throw new h(e({namespace:r,version1:i,version2:a}),this)}if(e.set(s,a),!t.endsWith("*")&&!o.isLocalType(n)){let e=y.messageFormatter("modelmanager-gettype-notypeinns");throw new h(e({type:n,namespace:r}),this)}}));const t=new Set;this.declarations.forEach((e=>{const r=e.getFullyQualifiedName();if(t.has(r))throw new h(`Duplicate class name ${r}`);t.add(r)}));for(let e=0;e<this.declarations.length;e++)this.declarations[e].validate()}resolveType(e,t,r){if(!g.isPrimitiveType(t))if(this.isImportedType(t))this.getModelManager().resolveType(e,this.resolveImport(t));else if(!this.isLocalType(t)){let n=y("en").messageFormatter("modelfile-resolvetype-undecltype");throw new h(n({type:t,context:e}),this,r)}}isLocalType(e){return e&&null!==this.getLocalType(e)}isImportedType(e){if(this.importShortNames.has(e))return!0;for(let t in this.importWildcardNamespaces){let r=this.importWildcardNamespaces[t];const n=this.getModelManager().getModelFile(r);if(n&&n.isLocalType(e))return!0}return!1}resolveImport(e){if(this.importShortNames.has(e))return this.importShortNames.get(e);for(let t in this.importWildcardNamespaces){let r=this.importWildcardNamespaces[t];const n=this.getModelManager().getModelFile(r);if(n&&n.isLocalType(e))return r+"."+e}let t=y("en").messageFormatter("modelfile-resolveimport-failfindimp");throw new h(t({type:e,imports:JSON.stringify(this.imports),namespace:this.getNamespace()}),this)}getImportedType(e){return this.resolveImport(e).split(".").pop()}isDefined(e){return g.isPrimitiveType(e)||null!==this.getLocalType(e)}getType(e){if(g.isPrimitiveType(e))return e;if(this.isImportedType(e)){const t=this.resolveImport(e),r=this.getModelManager().getModelFile(g.getNamespace(t));return r?r.getLocalType(t):null}return this.isLocalType(e)?this.getLocalType(e):null}getFullyQualifiedTypeName(e){return g.isPrimitiveType(e)?e:this.isImportedType(e)?this.resolveImport(e):this.isLocalType(e)?this.getLocalType(e).getFullyQualifiedName():null}getLocalType(e){if(!this.localTypes)throw new Error("Internal error: local types are not yet initialized. Do not try to resolve types inside `process`.");return e.startsWith(this.getNamespace())||(e=this.getNamespace()+"."+e),this.localTypes.has(e)?this.localTypes.get(e):null}getAssetDeclaration(e){let t=this.getLocalType(e);return t&&t.isAsset()?t:null}getTransactionDeclaration(e){let t=this.getLocalType(e);return t&&t.isTransaction()?t:null}getEventDeclaration(e){let t=this.getLocalType(e);return t&&t.isEvent()?t:null}getParticipantDeclaration(e){let t=this.getLocalType(e);return t&&t.isParticipant()?t:null}getNamespace(){return this.namespace}getName(){return this.fileName}getAssetDeclarations(){return this.getDeclarations(a)}getTransactionDeclarations(){return this.getDeclarations(d)}getEventDeclarations(){return this.getDeclarations(f)}getParticipantDeclarations(){return this.getDeclarations(p)}getClassDeclarations(){return this.getDeclarations(c)}getConceptDeclarations(){return this.getDeclarations(l)}getEnumDeclarations(){return this.getDeclarations(i)}getMapDeclarations(){return this.getDeclarations(m)}getScalarDeclarations(){return this.getDeclarations(u)}getDeclarations(e){let t=[];for(let r=0;r<this.declarations.length;r++){let n=this.declarations[r];n instanceof e&&t.push(n)}return t}getAllDeclarations(){return this.declarations}getDefinitions(){return this.definitions}getAst(){return this.ast}getConcertoVersion(){return this.concertoVersion}isCompatibleVersion(){if(this.ast.concertoVersion){if(!s.satisfies(o.version,this.ast.concertoVersion,{includePrerelease:!0}))throw new Error(`ModelFile expects Concerto version ${this.ast.concertoVersion} but this is ${o.version}`);this.concertoVersion=this.ast.concertoVersion}}enforceImportVersioning(e){if(this.getModelManager().isStrict()&&!g.parseNamespace(e.namespace).version)throw new Error(`Cannot use an unversioned import ${e.namespace} when 'strict' option on Model Manager is set.`)}fromAst(e){const t=g.parseNamespace(e.namespace);t.name.split(".").forEach((e=>{if(!g.isValidIdentifier(e))throw new h(`Invalid namespace part '${e}'`,this.modelFile,this.ast.location)})),this.namespace=e.namespace,this.version=t.version;const r=e.imports?e.imports.concat([]):[];if(this.isSystemModelFile()||r.push({$class:`${n}.ImportTypes`,namespace:"concerto@1.0.0",types:["Concept","Asset","Transaction","Participant","Event"]}),this.imports=r,this.imports.forEach((e=>{switch(this.enforceImportVersioning(e),e.$class){case`${n}.ImportAll`:if(this.getModelManager().isStrict())throw new Error("Wilcard Imports are not permitted in strict mode.");b.printDeprecationWarning("Wilcard Imports are deprecated in this version of Concerto and will be removed in a future version.",w.DEPRECATION_WARNING,w.CONCERTO_DEPRECATION_002,"Please refer to https://concerto.accordproject.org/deprecation/002"),this.importWildcardNamespaces.push(e.namespace);break;case`${n}.ImportTypes`:if(this.getModelManager().isAliasedTypeEnabled()){const t=new Map;e.aliasedTypes&&e.aliasedTypes.forEach((e=>{let{name:r,aliasedName:n}=e;if(g.isPrimitiveType(n))throw new Error("Types cannot be aliased to primitive type");t.set(r,n)})),e.types.forEach((r=>t.has(r)?this.importShortNames.set(t.get(r),`${e.namespace}.${r}`):this.importShortNames.set(r,`${e.namespace}.${r}`)))}else{if(e.aliasedTypes)throw new Error("Aliasing disabled, set importAliasing to true");e.types.forEach((t=>{this.importShortNames.set(t,`${e.namespace}.${t}`)}))}break;default:this.importShortNames.set(e.name,g.importFullyQualifiedNames(e)[0])}e.uri&&(this.importUriMap[g.importFullyQualifiedNames(e)[0]]=e.uri)})),e.declarations)for(let t=0;t<e.declarations.length;t++){let r=Object.assign({},e.declarations[t]);if(r.$class===`${n}.AssetDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Asset"}),this.declarations.push(new a(this,r));else if(r.$class===`${n}.TransactionDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Transaction"}),this.declarations.push(new d(this,r));else if(r.$class===`${n}.EventDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Event"}),this.declarations.push(new f(this,r));else if(r.$class===`${n}.ParticipantDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Participant"}),this.declarations.push(new p(this,r));else if(r.$class===`${n}.EnumDeclaration`)this.declarations.push(new i(this,r));else if(r.$class===`${n}.MapDeclaration`)this.declarations.push(new m(this,r));else if(r.$class===`${n}.ConceptDeclaration`)this.declarations.push(new l(this,r));else{if(![`${n}.BooleanScalar`,`${n}.IntegerScalar`,`${n}.LongScalar`,`${n}.DoubleScalar`,`${n}.StringScalar`,`${n}.DateTimeScalar`].includes(r.$class)){let e=y("en").messageFormatter("modelfile-constructor-unrecmodelelem");throw new h(e({type:r.$class}),this)}this.declarations.push(new u(this,r))}}}filter(e,t,r){let n=[];this.declarations?.forEach((t=>{e(t)?n.push(t.ast):r.push(t.getFullyQualifiedName())}));const o={...this.ast,declarations:n};return o.declarations?.length>0?new A(t,o,void 0,this.fileName):null}}e.exports=A},1976:(e,t,r)=>{"use strict";const{isNull:n}=r(8487).NullUtil,o=r(6375);void 0===r.g&&(r(1529),r(7189));class s extends o{constructor(e,t){if(super(e,t),this.lowerBound=null,this.upperBound=null,Object.prototype.hasOwnProperty.call(t,"lower")&&(this.lowerBound=t.lower),Object.prototype.hasOwnProperty.call(t,"upper")&&(this.upperBound=t.upper),null===this.lowerBound&&null===this.upperBound?this.reportError(null,"Invalid range, lower and-or upper bound must be specified."):null===this.lowerBound||null===this.upperBound||this.lowerBound>this.upperBound&&this.reportError(null,"Lower bound must be less than or equal to upper bound."),void 0!==this.field?.ast?.defaultValue){let e=this.field.ast.defaultValue;null!==this.lowerBound&&e<this.lowerBound&&this.reportError(null,`Value ${e} is outside lower bound ${this.lowerBound}`),null!==this.upperBound&&e>this.upperBound&&this.reportError(null,`Value ${e} is outside upper bound ${this.upperBound}`)}}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound}validate(e,t){null!==t&&(null!==this.lowerBound&&t<this.lowerBound&&this.reportError(e,`Value ${t} is outside lower bound ${this.lowerBound}`),null!==this.upperBound&&t>this.upperBound&&this.reportError(e,`Value ${t} is outside upper bound ${this.upperBound}`))}toString(){return"NumberValidator lower: "+this.lowerBound+" upper: "+this.upperBound}compatibleWith(e){if(!(e instanceof s))return!1;const t=this.getLowerBound(),r=e.getLowerBound();if(n(t)&&!n(r))return!1;if(!n(t)&&!n(r)&&t<r)return!1;const o=this.getUpperBound(),a=e.getUpperBound();return!(n(o)&&!n(a)||!n(o)&&!n(a)&&o>a)}}e.exports=s},3218:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"ParticipantDeclaration"}}},9852:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(1768),s=r(1861),a=r(7688);void 0===r.g&&(r(9869),r(6226)),e.exports=class extends a{constructor(e,t){super(t),this.parent=e,this.process()}getModelFile(){return this.parent.getModelFile()}getParent(){return this.parent}process(){if(super.process(),!o.isValidIdentifier(this.ast.name))throw new s(`Invalid property name '${this.ast.name}'`,this.modelFile,this.ast.location);if(this.name=this.ast.name,this.decorator=null,!this.name)throw new Error("No name for type "+JSON.stringify(this.ast));switch(this.ast.$class){case`${n}.EnumProperty`:break;case`${n}.BooleanProperty`:this.type="Boolean";break;case`${n}.DateTimeProperty`:this.type="DateTime";break;case`${n}.DoubleProperty`:this.type="Double";break;case`${n}.IntegerProperty`:this.type="Integer";break;case`${n}.LongProperty`:this.type="Long";break;case`${n}.StringProperty`:this.type="String";break;case`${n}.ObjectProperty`:this.type=this.ast.type?this.ast.type.name:null;break;case`${n}.RelationshipProperty`:this.type=this.ast.type.name}this.array=!1,this.ast.isArray&&(this.array=!0),this.ast.isOptional?this.optional=!0:this.optional=!1}validate(e){super.validate(),this.type&&e.getModelFile().resolveType("property "+this.getFullyQualifiedName(),this.type)}getName(){return this.name}getType(){return this.type}isOptional(){return this.optional}getFullyQualifiedTypeName(){if(this.isPrimitive())return this.type;const e=this.getParent();if(!e)throw new Error("Property "+this.name+" does not have a parent.");const t=e.getModelFile();if(!t)throw new Error("Parent of property "+this.name+" does not have a ModelFile!");const r=t.getFullyQualifiedTypeName(this.type);if(!r)throw new Error("Failed to find fully qualified type name for property "+this.name+" with type "+this.type);return r}getFullyQualifiedName(){return this.getParent().getFullyQualifiedName()+"."+this.getName()}getNamespace(){return this.getParent().getNamespace()}isArray(){return this.array}isTypeEnum(){return!this.isPrimitive()&&this.getParent().getModelFile().getType(this.getType()).isEnum()}isPrimitive(){return o.isPrimitiveType(this.getType())}}},6099:(e,t,r)=>{"use strict";const n=r(9852),o=r(1861),s=r(1768);void 0===r.g&&r(9869),e.exports=class extends n{constructor(e,t){super(e,t)}validate(e){if(super.validate(e),!this.getType())throw new o("Relationship must have a type",e.getModelFile(),this.ast.location);let t=null;if(s.isPrimitiveType(this.getType()))throw new o("Relationship "+this.getName()+" cannot be to the primitive type "+this.getType(),e.getModelFile(),this.ast.location);if(this.getParent().getNamespace()===s.getNamespace(this.getFullyQualifiedTypeName()))t=this.getParent().getModelFile().getType(this.getType());else try{t=this.getParent().getModelFile().getModelManager().getType(this.getFullyQualifiedTypeName())}catch(e){}if(null===t)throw new o("Relationship "+this.getName()+" points to a missing type "+this.getFullyQualifiedTypeName(),e.getModelFile(),this.ast.location);if(!t.isIdentified())throw new o("Relationship "+this.getName()+" must be to a class that has an identifier, but this is to "+this.getFullyQualifiedTypeName(),e.getModelFile(),this.ast.location)}toString(){return"RelationshipDeclaration {name="+this.name+", type="+this.getFullyQualifiedTypeName()+", array="+this.array+", optional="+this.optional+"}"}isRelationship(){return!0}}},7189:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(5437),s=r(1976),a=r(516),i=r(8487).NullUtil,c=r(1861),l=r(1768);void 0===r.g&&(r(6375),r(9869)),e.exports=class extends o{process(){super.process();const e=this.getName();if(l.isPrimitiveType(e))throw new c(`Invalid scalar name '${e}'. Name conflicts with primitive type.`,this.ast.name.location);switch(this.superType=null,this.superTypeDeclaration=null,this.idField=null,this.timestamped=!1,this.abstract=!1,this.validator=null,this.ast.$class===`${n}.BooleanScalar`?this.type="Boolean":this.ast.$class===`${n}.IntegerScalar`?this.type="Integer":this.ast.$class===`${n}.LongScalar`?this.type="Long":this.ast.$class===`${n}.DoubleScalar`?this.type="Double":this.ast.$class===`${n}.StringScalar`?this.type="String":this.ast.$class===`${n}.DateTimeScalar`?this.type="DateTime":this.type=null,this.getType()){case"Integer":case"Double":case"Long":this.ast.validator&&(this.validator=new s(this,this.ast.validator));break;case"String":(this.ast.validator||this.ast.lengthValidator)&&(this.validator=new a(this,this.ast.validator,this.ast.lengthValidator))}i.isNull(this.ast.defaultValue)?this.defaultValue=null:this.defaultValue=this.ast.defaultValue}validate(){super.validate()}isIdentified(){return!1}isSystemIdentified(){return!1}getIdentifierFieldName(){return null}getType(){return this.type}getSuperType(){return null}getSuperTypeDeclaration(){return null}getValidator(){return this.validator}getDefaultValue(){return this.defaultValue}toString(){return"ScalarDeclaration {id="+this.getFullyQualifiedName()+"}"}isAbstract(){return!0}isScalarDeclaration(){return!0}isAsset(){return!1}isParticipant(){return!1}isTransaction(){return!1}isEvent(){return!1}isConcept(){return!1}}},516:(e,t,r)=>{"use strict";const{ErrorCodes:n}=r(8487),{isNull:o}=r(8487).NullUtil,s=r(6375);void 0===r.g&&(r(1529),r(7189));class a extends s{constructor(e,t,r){if(super(e,t),this.minLength=null,this.maxLength=null,this.regex=null,r&&(this.minLength=r?.minLength,this.maxLength=r?.maxLength,null===this.minLength&&null===this.maxLength?this.reportError(e.getName(),"Invalid string length, minLength and-or maxLength must be specified."):this.minLength<0||this.maxLength<0?this.reportError(e.getName(),"minLength and-or maxLength must be positive integers."):null===this.minLength||null===this.maxLength||this.minLength>this.maxLength&&this.reportError(e.getName(),"minLength must be less than or equal to maxLength.")),t)try{const r=e?.parent?.getModelFile()?.getModelManager()?.options?.regExp||RegExp;this.regex=new r(t.pattern,t.flags)}catch(t){this.reportError(e.getName(),t.message,n.REGEX_VALIDATOR_EXCEPTION)}this.field?.ast?.defaultValue&&this.validate(e.getName(),this.field.ast.defaultValue)}validate(e,t){null!==t&&(null!==this.minLength&&t.length<this.minLength&&this.reportError(e,`The string length of '${t}' should be at least ${this.minLength} characters.`),null!==this.maxLength&&t.length>this.maxLength&&this.reportError(e,`The string length of '${t}' should not exceed ${this.maxLength} characters.`),this.regex&&!this.regex.test(t)&&this.reportError(e,`Value '${t}' failed to match validation regex: ${this.regex}`))}getMinLength(){return this.minLength}getMaxLength(){return this.maxLength}getRegex(){return this.regex}compatibleWith(e){if(!(e instanceof a))return!1;if(this.validator?.pattern!==e.validator?.pattern)return!1;if(this.validator?.flags!==e.validator?.flags)return!1;const t=this.getMinLength(),r=e.getMinLength();if(o(t)&&!o(r))return!1;if(!o(t)&&!o(r)&&t<r)return!1;const n=this.getMaxLength(),s=e.getMaxLength();return!(o(n)&&!o(s)||!o(n)&&!o(s)&&n>s)}}e.exports=a},745:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"TransactionDeclaration"}}},6375:(e,t,r)=>{"use strict";const{BaseException:n,ErrorCodes:o}=r(8487);void 0===r.g&&(r(1529),r(7189)),e.exports=class{constructor(e,t){this.validator=t,this.field=e}reportError(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.DEFAULT_VALIDATOR_EXCEPTION;throw new n("Validator error for field `"+e+"`. "+this.getFieldOrScalarDeclaration().getFullyQualifiedName()+": "+t,void 0,r)}accept(e,t){return e.visit(this,t)}getFieldOrScalarDeclaration(){return this.field}validate(e,t){}compatibleWith(e){return!1}}},5430:(e,t,r)=>{"use strict";const{BaseException:n}=r(8487);e.exports=class extends n{constructor(e){super(e)}}},9259:(e,t,r)=>{"use strict";const n=r(2410),o=r(2523);e.exports=class extends o{constructor(e,t,r,n,o,s){super(e,t,r,n);const a=this.$modelManager.getModelFile(this.getNamespace()),i=a?.getType(this.getFullyQualifiedType());this.$identifierFieldName=i?.getIdentifierFieldName()||"$identifier",this.setIdentifier(o),this.$timestamp=s}getTimestamp(){return this.$timestamp}getIdentifier(){return this[this.$identifierFieldName]}setIdentifier(e){this.$identifier=e,this[this.$identifierFieldName]=e}getFullyQualifiedIdentifier(){return this.getIdentifier()?this.getFullyQualifiedType()+"#"+this.getIdentifier():this.getFullyQualifiedType()}toString(){return"Identifiable {id="+this.getFullyQualifiedIdentifier()+"}"}isRelationship(){return!1}isResource(){return!1}toURI(){return new n(this.getNamespace(),this.getType(),this.getIdentifier()).toURI()}}},6113:(e,t,r)=>{"use strict";const n=r(9259),o=r(1768),s=r(2410);void 0===r.g&&r(9481);class a extends n{constructor(e,t,r,n,o,s){super(e,t,r,n,o,s),this.$class="Relationship"}toString(){return"Relationship {id="+this.getFullyQualifiedIdentifier()+"}"}isRelationship(){return!0}static fromURI(e,t,r,n){const i=s.fromURI(t,r,n);let c=o.getFullyQualifiedName(i.namespace,i.type),l=e.getType(c);return new a(e,l,i.namespace,i.type,i.id)}}e.exports=a},7755:(e,t,r)=>{"use strict";const n=r(9259);e.exports=class extends n{constructor(e,t,r,n,o,s){super(e,t,r,n,o,s)}toString(){return"Resource {id="+this.getFullyQualifiedIdentifier()+"}"}isResource(){return!0}isConcept(){return this.getClassDeclaration().isConcept()}isIdentifiable(){return this.getClassDeclaration().isIdentified()}toJSON(){return this.getModelManager().getSerializer().toJSON(this)}}},2410:(e,t,r)=>{"use strict";const n=r(9472),o=r(1768),s="resource";class a{constructor(e,t,r){if(!e)throw new Error("Missing namespace");if(!t)throw new Error("Missing type");if(!r)throw new Error("Missing id");this.namespace=e,this.type=t,this.id=r}static fromURI(e,t,r){let i;try{i=n.parse(e)}catch(t){throw new Error("Invalid URI: "+e)}const c=i.protocol;if(c&&c!==s)throw new Error("Invalid URI scheme: "+e);if(i.username||i.password||i.port||i.query)throw new Error("Invalid resource URI format: "+e);let l,u,p=i.fragment;if(p){const e=i.path;l=o.getNamespace(e),u=o.getShortName(e)}else l=t,u=r,p=i.path;return new a(l,u,decodeURIComponent(p))}toURI(){const e=o.getFullyQualifiedName(this.namespace,this.type);return s+":"+e+"#"+encodeURI(this.id)}}e.exports=a},2523:(e,t,r)=>{"use strict";const n=r(3464),o=r(7657),s=r(8487).NullUtil;n.extend(o),void 0===r.g&&(r(9869),r(9481)),e.exports=class{constructor(e,t,r,n){this.$modelManager=e,this.$classDeclaration=t,this.$namespace=r,this.$type=n}accept(e,t){return e.visit(this,t)}getModelManager(){return this.$modelManager}getType(){return this.$type}getFullyQualifiedType(){return this.$classDeclaration.getFullyQualifiedName()}getNamespace(){return this.$namespace}getClassDeclaration(){return this.$classDeclaration}setPropertyValue(e,t){this[e]=t}addArrayValue(e,t){this[e]?this[e].push(t):this[e]=[t]}assignFieldDefaults(){let e=this.getClassDeclaration().getProperties();for(let t=0;t<e.length;t++){let r,o,a=e[t];if(a.isTypeScalar?.()&&(a=a.getScalarField()),a.isField?.()&&(r=a.getDefaultValue(),o=a.getType()),!s.isNull(r))if("String"===o)this.setPropertyValue(a.getName(),r);else if("Integer"===o)this.setPropertyValue(a.getName(),parseInt(r));else if("Long"===o)this.setPropertyValue(a.getName(),parseInt(r));else if("Double"===o)this.setPropertyValue(a.getName(),parseFloat(r));else if("Boolean"===o)this.setPropertyValue(a.getName(),!0===r);else if("DateTime"===o){const e=n.utc(r);this.setPropertyValue(a.getName(),e)}else this.setPropertyValue(a.getName(),r)}}instanceOf(e){const t=this.getClassDeclaration();if(t.getFullyQualifiedName()===e)return!0;let r=t.getSuperTypeDeclaration();for(;r;){if(r.getFullyQualifiedName()===e)return!0;r=r.getSuperTypeDeclaration()}return!1}toJSON(){throw new Error("Use Serializer.toJSON to convert resource instances to JSON objects.")}}},289:(e,t,r)=>{"use strict";const n=r(8487).TypedStack,o=r(7755);e.exports=class extends o{constructor(e,t,r,n,o,s,a){super(e,t,r,n,o,s),this.$validator=a}setPropertyValue(e,t){let r=this.getClassDeclaration().getProperty(e);if(!r)throw new Error("The instance with id "+this.getIdentifier()+" trying to set field "+e+" which is not declared in the model.");const o={};o.stack=new n(t),o.modelManager=this.getModelManager(),o.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),r.accept(this.$validator,o),super.setPropertyValue(e,t)}addArrayValue(e,t){let r=this.getClassDeclaration().getProperty(e);if(!r)throw new Error("The instance with id "+this.getIdentifier()+" trying to set field "+e+" which is not declared in the model.");if(!r.isArray())throw new Error("The instance with id "+this.getIdentifier()+" trying to add array item "+e+" which is not declared as an array in the model.");const o={};let s=[];this[e]&&(s=this[e].slice(0)),s.push(t),o.stack=new n(s),o.modelManager=this.getModelManager(),o.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),r.accept(this.$validator,o),super.addArrayValue(e,t)}validate(){const e=this.getClassDeclaration(),t={};t.stack=new n(this),t.modelManager=this.getModelManager(),t.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),e.accept(this.$validator,t)}}},6803:(e,t,r)=>{"use strict";const n=r(6686),o=r(9967).Parser,s=r(8487).DefaultFileLoader,a=r(6226),i=r(9481);class c{static async addModel(e,t,r){let s=null;if(e.accepts(r))s=await e.load(r);else{const e=n.readFileSync(r,"utf8"),i=o.parse(e,r);s=new a(t,i,e,r)}return t.addModelFile(s,null,s.getName(),!0),t}static async loadModelManager(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{offline:!1,strict:!1},r=new i(t);const n=new s(((e,t)=>{const n=o.parse(t);return new a(r,n,t,e)}));for(let t of e)r=await c.addModel(n,r,t);return t&&t.offline?(r.validateModelFiles(),r):(await r.updateExternalModels(),r)}static async loadModelManagerFromModelFiles(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{offline:!1,strict:!1},n=new i(r);return n.addModelFiles(e,t,!0),r&&r.offline?(n.validateModelFiles(),n):(await n.updateExternalModels(),n)}}e.exports=c},9481:(e,t,r)=>{"use strict";const n=r(9967).Parser,o=r(3832),s=r(7833)("concerto:BaseModelManager");void 0===r.g&&r(6226),e.exports=class extends o{constructor(e){super(e,(e=>(t,r)=>{const o={skipLocationNodes:e?.skipLocationNodes};return{ast:n.parse(r,t,o),definitions:r,fileName:t}})(e))}addCTOModel(e,t,r){return s("addCTOModel","addCTOModel",e,t),this.addModel(e,e,t,r)}}},1768:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),{MetaModelUtil:o}=r(3348),s=r(2722),a=r(2438);void 0===r.g&&r(6226);const i=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u,c=["$classDeclaration","$namespace","$type","$modelManager","$validator","$identifierFieldName","$imports","$superTypes","$id"],l=["$class","$identifier","$timestamp",...c];class u{static getShortName(e){let t=e,r=e.lastIndexOf(".");return r>-1&&(t=e.substr(r+1)),t}static getNamespace(e){if(!e)throw new Error(a.formatMessage("modelutil-getnamespace-nofnq"));let t="",r=e.lastIndexOf(".");return r>-1&&(t=e.substr(0,r)),t}static parseNamespace(e,t){if(!e)throw new Error("Namespace is null or undefined.");const r=e.split("@");let n=r[1];if(r.length>2)throw new Error(`Invalid namespace ${e}`);if(2===r.length&&!t?.disableVersionParsing){if(!s.valid(r[1]))throw new Error(`Invalid namespace ${e}`);n=s.parse(r[1])}return t?.disableVersionParsing?{name:r[0]}:{name:r[0],escapedNamespace:e.replace("@","_"),version:r.length>1?r[1]:null,versionParsed:r.length>1?n:null}}static importFullyQualifiedNames(e){return o.importFullyQualifiedNames(e)}static isPrimitiveType(e){return["Boolean","String","DateTime","Double","Integer","Long"].indexOf(e)>=0}static isAssignableTo(e,t,r){const n=r.getFullyQualifiedTypeName(),o=t===n;if(o||u.isPrimitiveType(t)||u.isPrimitiveType(n))return o;const s=e.getType(t);if(!s)throw new Error("Cannot find type "+t);return s.getAllSuperTypeDeclarations().some((e=>e.getFullyQualifiedName()===n))}static capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}static isEnum(e){const t=e.getParent().getModelFile().getType(e.getType());return t?.isEnum()}static isMap(e){const t=e.getParent().getModelFile().getType(e.getType());return t?.isMapDeclaration?.()}static isScalar(e){const t=e.getParent().getModelFile().getType(e.getType());return t?.isScalarDeclaration?.()}static isValidIdentifier(e){return i.test(e)}static getFullyQualifiedName(e,t){return e?`${e}.${t}`:t}static removeNamespaceVersionFromFullyQualifiedName(e){if(u.isPrimitiveType(e))return e;const t=u.getNamespace(e),{name:r}=u.parseNamespace(t),n=u.getShortName(e);return u.getFullyQualifiedName(r,n)}static isSystemProperty(e){return l.includes(e)}static isPrivateSystemProperty(e){return c.includes(e)}static isValidMapKey(e){return[`${n}.StringMapKeyType`,`${n}.DateTimeMapKeyType`,`${n}.ObjectMapKeyType`].includes(e.$class)}static isValidMapKeyScalar(e){return e?.isScalarDeclaration?.()&&e?.ast.$class===`${n}.StringScalar`||e?.isScalarDeclaration?.()&&e?.ast.$class===`${n}.DateTimeScalar`}static isValidMapValue(e){return[`${n}.BooleanMapValueType`,`${n}.DateTimeMapValueType`,`${n}.StringMapValueType`,`${n}.IntegerMapValueType`,`${n}.LongMapValueType`,`${n}.DoubleMapValueType`,`${n}.ObjectMapValueType`,`${n}.RelationshipMapValueType`].includes(e.$class)}}e.exports=u},6128:(e,t,r)=>{"use strict";const n=r(6391);e.exports={getRootModel:function(e){const t=e?"concerto_1.0.0.cto":"concerto.cto",r=e?"concerto@1.0.0":"concerto",o=`@DotNetNamespace("AccordProject.Concerto")\n namespace ${r}\n import concerto.decorator@1.0.0.DotNetNamespace\n abstract concept Concept {}\n abstract concept Asset identified {}\n abstract concept Participant identified {}\n abstract concept Transaction {}\n abstract concept Event {}\n `,s=JSON.parse(JSON.stringify(n));return s.namespace=r,{rootModelFile:t,rootModelCto:o,rootModelAst:s}}}},3686:(e,t,r)=>{"use strict";const{BaseException:n}=r(8487);e.exports=class extends n{constructor(e){super(e)}}},3673:(e,t,r)=>{"use strict";const{TypedStack:n}=r(8487),o=r(7624),s=r(2438),a=r(9),i=r(8998),c=r(2523),l=r(2552),{utcOffset:u}=o.setCurrentTime(),p={validate:!0,utcOffset:u};void 0===r.g&&(r(1595),r(9481),r(7755)),e.exports=class{constructor(e,t,r){if(!e)throw new Error(s.formatMessage("serializer-constructor-factorynull"));if(!t)throw new Error(s.formatMessage("serializer-constructor-modelmanagernull"));this.factory=e,this.modelManager=t,this.defaultOptions=Object.assign({},p,r||{})}setDefaultOptions(e){this.defaultOptions=Object.assign({},p,e)}toJSON(e,t){if(!(e instanceof c))throw new Error(s.formatMessage("serializer-tojson-notcobject"));const r={};r.stack=new n(e),r.modelManager=this.modelManager,r.seenResources=new Set,r.dedupeResources=new Set;const o=this.modelManager.getType(e.getFullyQualifiedType());if((t=t?Object.assign({},this.defaultOptions,t):this.defaultOptions).validate){const e=new l(t);o.accept(e,r)}const i=new a(!0===t.convertResourcesToRelationships,!0===t.permitResourcesForRelationships,!0===t.deduplicateResources,!0===t.convertResourcesToId,!1,t.utcOffset);return r.stack.clear(),r.stack.push(e),o.accept(i,r)}fromJSON(e,t){if(t=t?Object.assign({},this.defaultOptions,t):this.defaultOptions,!e.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier.");const r=this.modelManager.getType(e.$class);let o;if(r.isTransaction?.())o=this.factory.newTransaction(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else if(r.isEvent?.())o=this.factory.newEvent(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else if(r.isConcept?.())o=this.factory.newConcept(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else{if(r.isMapDeclaration?.())throw new Error("Attempting to create a Map declaration is not supported.");if(r.isEnum())throw new Error("Attempting to create an ENUM declaration is not supported.");o=this.factory.newResource(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()])}const s={};s.jsonStack=new n(e),s.resourceStack=new n(o),s.modelManager=this.modelManager,s.factory=this.factory;const a=new i(!0===t.acceptResourcesForRelationships,!1,t.utcOffset,!0===t.strictQualifiedDateTimes);return r.accept(a,s),t.validate&&o.validate(),o}}},6422:(e,t,r)=>{"use strict";const n=r(8487).NullUtil,o=r(2438);e.exports=class{visit(e,t){if(e.isClassDeclaration?.())return this.visitClassDeclaration(e,t);if(e.isMapDeclaration?.())return this.visitMapDeclaration(e,t);if(e.isRelationship?.())return this.visitRelationshipDeclaration(e,t);if(e.isTypeScalar?.())return this.visitField(e.getScalarField(),t);if(e.isField?.())return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitClassDeclaration(e,t){const r=t.stack.pop(),o=e.getProperties();for(const e of o){if(!t.includeOptionalFields&&e.isOptional())continue;const o=r[e.getName()];n.isNull(o)&&(r[e.getName()]=e.accept(this,t))}return r}visitField(e,t){if(e.isPrimitive())t.seen.push("Primitve");else{let r=e.getFullyQualifiedTypeName(),n=t.modelManager.getType(r);n=this.findConcreteSubclass(n);let o=n.getFullyQualifiedName();if(t.seen.includes(o)){if(e.isArray())return[];if(e.isOptional())return null;throw new Error("Model is recursive.")}t.seen.push(o)}let r;if(e.isArray()){const n=()=>this.getFieldValue(e,t);r=t.valueGenerator.getArray(n)}else r=this.getFieldValue(e,t);return t.seen.pop(),r}getFieldValue(e,t){let r=e;e.isTypeScalar?.()&&(r=e.getScalarField());let n=e.getFullyQualifiedTypeName();if(e.isPrimitive())switch(n){case"DateTime":return t.valueGenerator.getDateTime();case"Integer":return r.validator?t.valueGenerator.getRange(r.validator.lowerBound,r.validator.upperBound,n):t.valueGenerator.getInteger();case"Long":return r.validator?t.valueGenerator.getRange(r.validator.lowerBound,r.validator.upperBound,n):t.valueGenerator.getLong();case"Double":return r.validator?t.valueGenerator.getRange(r.validator.lowerBound,r.validator.upperBound,n):t.valueGenerator.getDouble();case"Boolean":return t.valueGenerator.getBoolean();default:return r.validator?.regex?t.valueGenerator.getRegex(r.validator.regex,r.validator.minLength,r.validator.maxLength):t.valueGenerator.getString(r.validator?.minLength,r.validator?.maxLength)}let o=t.modelManager.getType(n);if(o.isEnum()){let e=o.getOwnProperties();return t.valueGenerator.getEnum(e).getName()}if(o=this.findConcreteSubclass(o),!o.isMapDeclaration?.()){let e=null;if(o.isIdentified()){let n=o.getIdentifierFieldName(),s=o.getProperty(n);s?.isTypeScalar?.()&&(s=s.getScalarField()),e=s?.validator?.regex?t.valueGenerator.getRegex(r.validator.regex):this.generateRandomId(o)}let n=t.factory.newResource(o.getNamespace(),o.getName(),e);t.stack.push(n)}return o.accept(this,t)}findConcreteSubclass(e){if(e.isMapDeclaration?.()||!e.isAbstract())return e;const t=e.getAssignableClassDeclarations().filter((e=>!e.isAbstract()));if(0===t.length){const t=o.messageFormatter("instancegenerator-newinstance-noconcreteclass");throw new Error(t({type:e.getFullyQualifiedName()}))}return t[0]}visitRelationshipDeclaration(e,t){let r=t.modelManager.getType(e.getFullyQualifiedTypeName());r=this.findConcreteSubclass(r);const n=t.factory,o=()=>{const e=this.generateRandomId(r);return n.newRelationship(r.getNamespace(),r.getName(),e)};return e.isArray()?t.valueGenerator.getArray(o):o()}visitMapDeclaration(e,t){return t.valueGenerator.getMap()}generateRandomId(e){let t=Math.round(9999*Math.random()).toString();return t=t.padStart(4,"0"),t}}},9:(e,t,r)=>{"use strict";const n=r(7755),o=r(2523),s=r(1768),a=r(8487).NullUtil;e.exports=class{constructor(e,t,r,n,o,s){this.convertResourcesToRelationships=e,this.permitResourcesForRelationships=t,this.deduplicateResources=r,this.convertResourcesToId=n,this.utcOffset=s||0}visit(e,t){if(e.isClassDeclaration?.())return this.visitClassDeclaration(e,t);if(e.isRelationship?.())return this.visitRelationshipDeclaration(e,t);if(e.isMapDeclaration?.())return this.visitMapDeclaration(e,t);if(e.isTypeScalar?.())return this.visitField(e.getScalarField(),t);if(e.isField?.())return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitMapDeclaration(e,t){const r=t.stack.pop();let n=new Map;return r.forEach(((r,o)=>{if(!s.isSystemProperty(o)){if("object"==typeof r){let n=e.getModelFile().getAllDeclarations().find((e=>e.name===r.getType()));t.stack.push(r);const o=n.accept(this,t);r=o}n.set(o,r)}})),Object.fromEntries(n)}visitClassDeclaration(e,t){const r=t.stack.pop();if(!(r instanceof n))throw new Error("Expected a Resource, but found "+r);let o={},s=null;if(r.isIdentifiable()&&this.deduplicateResources){if(s=r.toURI(),t.dedupeResources.has(s))return s;t.dedupeResources.add(s)}o.$class=e.getFullyQualifiedName(),this.deduplicateResources&&s&&(o.$id=s);const i=e.getProperties();for(let e in i){const n=i[e],s=r[n.getName()];a.isNull(s)||(t.stack.push(s),o[n.getName()]=n.accept(this,t))}return o}visitField(e,t){const r=t.stack.pop();let n;if(e.isArray()){let a=[];for(let n in r){const i=r[n];if(e.isPrimitive()||s.isEnum(e))a.push(this.convertToJSON(e,i));else{t.stack.push(i,o);const e=t.modelManager.getType(i.getFullyQualifiedType());a.push(e.accept(this,t))}}n=a}else e.isPrimitive()||s.isEnum(e)?n=this.convertToJSON(e,r):s.isMap(e)?(t.stack.push(r),n=t.modelManager.getType(e.getFullyQualifiedTypeName()).accept(this,t)):(t.stack.push(r),n=t.modelManager.getType(r.getFullyQualifiedType()).accept(this,t));return n}convertToJSON(e,t){if("DateTime"===e.getType()){const e=t.utc().utcOffset(this.utcOffset),r=0===e.utcOffset();return e.format("YYYY-MM-DDTHH:mm:ss.SSS"+(r?"[Z]":"Z"))}return t}visitRelationshipDeclaration(e,t){const r=t.stack.pop();let o;if(e.isArray()){let s=[];for(let o in r){const a=r[o];if(this.permitResourcesForRelationships&&a instanceof n){let r=a.getFullyQualifiedIdentifier();if(t.seenResources.has(r)){let t=this.getRelationshipText(e,a);s.push(t)}else{t.seenResources.add(r),t.stack.push(a,n);const o=t.modelManager.getType(e.getFullyQualifiedTypeName());s.push(o.accept(this,t)),t.seenResources.delete(r)}}else{let t=this.getRelationshipText(e,a);s.push(t)}}o=s}else if(this.permitResourcesForRelationships&&r instanceof n){let s=r.getFullyQualifiedIdentifier();t.seenResources.has(s)?o=this.getRelationshipText(e,r):(t.seenResources.add(s),t.stack.push(r,n),o=t.modelManager.getType(e.getFullyQualifiedTypeName()).accept(this,t),t.seenResources.delete(s))}else o=this.getRelationshipText(e,r);return o}getRelationshipText(e,t){if(t instanceof n&&!this.convertResourcesToRelationships&&!this.permitResourcesForRelationships)throw new Error("Did not find a relationship for "+e.getFullyQualifiedTypeName()+" found "+t);return this.convertResourcesToId?t.getIdentifier():t.toURI()}}},8998:(e,t,r)=>{"use strict";const{TypedStack:n}=r(8487),o=r(6113),s=r(8487).NullUtil,a=r(1768),i=r(390),c=r(3464),l=r(7657);c.extend(l);const u=r(4491);c.extend(u);const p=r(3221);c.extend(p);const d=r(279);function f(e,t){const r=Object.keys(e),n=r.filter(a.isPrivateSystemProperty);if(n.length>0){const e=`Unexpected reserved properties for type ${t.getFullyQualifiedName()}: `+n.join(", ");throw new i(e)}if(r.includes("$timestamp")&&!t.isTransaction?.()&&!t.isEvent?.()){const e=`Unexpected property for type ${t.getFullyQualifiedName()}: $timestamp`;throw new i(e)}return r.filter((t=>!a.isSystemProperty(t)&&!s.isNull(e[t])))}c.extend(d),e.exports=class{constructor(e,t,r,n){this.acceptResourcesForRelationships=e,this.utcOffset=r||0,this.strictQualifiedDateTimes=n,{NODE_ENV:"production"}.TZ&&console.warn(`Environment variable 'TZ' is set to '${{NODE_ENV:"production"}.TZ}', this can cause unexpected behaviour when using unqualified date time formats.`)}visit(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.path??(t.path=new n("$")),e.isClassDeclaration?.())return this.visitClassDeclaration(e,t);if(e.isMapDeclaration?.())return this.visitMapDeclaration(e,t);if(e.isRelationship?.())return this.visitRelationshipDeclaration(e,t);if(e.isTypeScalar?.())return this.visitField(e.getScalarField(),t);if(e.isField?.())return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitClassDeclaration(e,t){const r=t.jsonStack.pop(),o=t.resourceStack.pop();t.path??(t.path=new n("$"));const s=f(r,e);return function(e,t){const r=t.getProperties().map((e=>e.getName())),n=e.filter((e=>!r.includes(e)));if(n.length>0){const e=`Unexpected properties for type ${t.getFullyQualifiedName()}: `+n.join(", ");throw new i(e)}}(s,e),s.forEach((n=>{let s=r[n];if(null!==s){t.path.push(`.${n}`),t.jsonStack.push(s);const r=e.getProperty(n);o[n]=r.accept(this,t),t.path.pop()}})),o}visitMapDeclaration(e,t){let r=t.jsonStack.pop();t.path??(t.path=new n("$")),f(r,e),r=new Map(Object.entries(r));let o=new Map;return r.forEach(((r,n)=>{"$class"!==n?(a.isPrimitiveType(e.getKey().getType())||(n=this.processMapType(e,t,n,e.getKey().getType())),a.isPrimitiveType(e.getValue().getType())||(r=this.processMapType(e,t,r,e.getValue().getType())),o.set(n,r)):o.set(n,r)})),o}processMapType(e,t,r,n){let o;if(o=r&&"object"==typeof r&&r.$class?e.getModelFile().getAllDeclarations().find((e=>e.getFullyQualifiedName()===r.$class)):e.getModelFile().getAllDeclarations().find((e=>e.name===n)),o?.isClassDeclaration()){let e=t.factory.newConcept(o.getNamespace(),o.getName(),o.getIdentifierFieldName());return t.jsonStack.push(r),t.resourceStack.push(e),o.accept(this,t)}return r}visitField(e,t){t.path??(t.path=new n("$"));let r=t.jsonStack.pop(),o=null;if(e.isArray()){o=[];for(let n=0;n<r.length;n++){t.path.push(`[${n}]`);const s=r[n];o.push(this.convertItem(e,s,t)),t.path.pop()}}else o=this.convertItem(e,r,t);return o}convertItem(e,t,r){let n=null;if(e.isPrimitive?.()||e.isTypeEnum?.())n=this.convertToObject(e,t,r);else{let o=t.$class;o||(o=e.getFullyQualifiedTypeName());const s=r.modelManager.getType(o);if(!s.isMapDeclaration?.()){let e=null;e=s.isIdentified()?r.factory.newResource(s.getNamespace(),s.getName(),t[s.getIdentifierFieldName()]):r.factory.newConcept(s.getNamespace(),s.getName()),r.resourceStack.push(e)}r.jsonStack.push(t),n=s.accept(this,r)}return n}convertToObject(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null;r.path??(r.path=new n("$"));const s=r.path.stack.join("");switch(e.getType()){case"DateTime":if(t&&"object"==typeof t&&"function"==typeof t.isBefore)o=t;else{if("string"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);if(this.strictQualifiedDateTimes){if(this.strictQualifiedDateTimes){if(!t.match(/^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2}))$/))throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\` with format YYYY-MM-DDTHH:mm:ss[Z]`);o=c.utc(t)}}else o=c.utc(t).utcOffset(this.utcOffset)}if(!o||!o.isValid())throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);break;case"Integer":case"Long":{const r=t;if("number"!=typeof r)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);if(Math.trunc(r)!==r)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=r}break;case"Double":if("number"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=parseFloat(t);break;case"Boolean":if("boolean"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=t;break;case"String":if("string"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=t;break;default:o=t}return o}visitRelationshipDeclaration(e,t){t.path??(t.path=new n("$"));let r=t.jsonStack.pop(),s=null,i=e.getFullyQualifiedTypeName(),c=a.getNamespace(i);c||(c=e.getNamespace());let l=a.getShortName(i);if(e.isArray()){s=[];for(let n=0;n<r.length;n++){let a=r[n];if("string"==typeof a)s.push(o.fromURI(t.modelManager,a,c,l));else{if(!this.acceptResourcesForRelationships)throw new Error("Invalid JSON data. Found a value that is not a string: "+r+" for relationship "+e);if(!a.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier: "+a+" for relationship "+e);const n=t.modelManager.getType(a.$class);let o=t.factory.newResource(n.getNamespace(),n.getName(),a[n.getIdentifierFieldName()]);t.jsonStack.push(a),t.resourceStack.push(o),n.accept(this,t),s.push(o)}}}else if("string"==typeof r)s=o.fromURI(t.modelManager,r,c,l);else{if(!this.acceptResourcesForRelationships)throw new Error("Invalid JSON data. Found a value that is not a string: "+r+" for relationship "+e);if(!r.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier: "+r+" for relationship "+e);const n=t.modelManager.getType(r.$class);let o=t.factory.newResource(n.getNamespace(),n.getName(),r[n.getIdentifierFieldName()]);t.jsonStack.push(r),t.resourceStack.push(o),n.accept(this,t),s=o}return s}}},3561:(e,t,r)=>{"use strict";const n=r(8487).NullUtil,o=r(1768),s=r(390),a=r(2438),i=r(3464),c=r(7657);i.extend(c);class l{constructor(e,t){if(this.options=t||{},this.concerto=e,!this.concerto)throw new Error("Missing concerto instance")}visit(e,t){return e.isEnum?.()?this.visitEnumDeclaration(e,t):e.isClassDeclaration?.()?this.visitClassDeclaration(e,t):e.isRelationship?.()?this.visitRelationshipDeclaration(e,t):e.isTypeScalar?.()?this.visitField(e.getScalarField(),t):e.isField?.()?this.visitField(e,t):void 0}visitEnumDeclaration(e,t){const r=t.stack.pop(),n=e.getProperties();let o=!1;for(let e=0;e<n.length;e++)n[e].getName()===r&&(o=!0);return o||l.reportInvalidEnumValue(t.rootResourceIdentifier,e,r),null}visitClassDeclaration(e,t){const r=t.stack.pop();this.concerto.isIdentifiable(r)&&(t.rootResourceIdentifier=this.concerto.getFullyQualifiedIdentifier(r));const o=this.concerto.getModelManager().getType(r.$class),s=o.getFullyQualifiedName();o.isAbstract()&&l.reportAbstractClass(o);let a=Object.getOwnPropertyNames(r);for(let e=0;e<a.length;e++){let n=a[e];this.isSystemProperty(n)||o.getProperty(n)||(this.concerto.isIdentifiable(r)?l.reportUndeclaredField(this.concerto.getIdentifier(r),n,s):l.reportUndeclaredField(t.currentIdentifier,n,s))}if(this.concerto.isIdentifiable(r)){const e=this.concerto.getIdentifier(r);e&&0!==e.trim().length||l.reportEmptyIdentifier(t.rootResourceIdentifier),t.currentIdentifier=this.concerto.getFullyQualifiedIdentifier(r)}const i=o.getProperties();for(let e=0;e<i.length;e++){const o=i[e],s=r[o.getName()];n.isNull(s)?o.isOptional()||this.isSystemProperty(o.getName())||l.reportMissingRequiredProperty(t.rootResourceIdentifier,o):(t.stack.push(s),o.accept(this,t))}return null}isSystemProperty(e){return"$"===e.charAt(0)}visitField(e,t){const r=t.stack.pop();let n=typeof r,o=e.getName();return"symbol"===n&&l.reportFieldTypeViolation(t.rootResourceIdentifier,o,r,e,this.concerto),e.isTypeEnum()?this.checkEnum(r,e,t):e.isArray()?this.checkArray(r,e,t):this.checkItem(r,e,t),null}checkEnum(e,t,r){!t.isArray()||e instanceof Array||l.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t,this.concerto);const n=t.getParent().getModelFile().getType(t.getType());if(t.isArray())for(let t=0;t<e.length;t++){const o=e[t];r.stack.push(o),n.accept(this,r)}else{const t=e;r.stack.push(t),n.accept(this,r)}}checkArray(e,t,r){e instanceof Array||l.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t,this.concerto);for(let n=0;n<e.length;n++){const o=e[n];this.checkItem(o,t,r)}}checkItem(e,t,r){let n=typeof e,s=t.getName();if("symbol"===n&&l.reportFieldTypeViolation(r.rootResourceIdentifier,s,e,t,this.concerto),t.isPrimitive()){let o=!1;switch(t.getType()){case"String":"string"!==n&&(o=!0);break;case"Double":case"Long":case"Integer":"number"!==n&&(o=!0);break;case"Boolean":"boolean"!==n&&(o=!0);break;case"DateTime":"string"==typeof e&&i.utc(e).isValid()||(o=!0)}o?l.reportFieldTypeViolation(r.rootResourceIdentifier,s,e,t,this.concerto):null!==t.getValidator()&&t.getValidator().validate(r.currentIdentifier,e)}else{let n=this.concerto.getModelManager().getType(t.getFullyQualifiedTypeName());try{n=this.concerto.getModelManager().getType(e.$class)}catch(n){l.reportFieldTypeViolation(r.rootResourceIdentifier,s,e,t,this.concerto)}o.isAssignableTo(n.getModelFile(),n.getFullyQualifiedName(),t)||l.reportInvalidFieldAssignment(r.rootResourceIdentifier,s,e,t),r.stack.push(e),n.accept(this,r)}}visitRelationshipDeclaration(e,t){const r=t.stack.pop();if(e.isArray()){r instanceof Array||l.reportInvalidFieldAssignment(t.rootResourceIdentifier,e.getName(),r,e);for(let n=0;n<r.length;n++){const o=r[n];this.checkRelationship(t,e,o)}}else this.checkRelationship(t,e,r);return null}checkRelationship(e,t,r){this.concerto.isRelationship(r)||this.concerto.isIdentifiable(r)&&(this.options.convertResourcesToRelationships||this.options.permitResourcesForRelationships)||l.reportNotRelationshipViolation(e.rootResourceIdentifier,t,r);const n=this.concerto.isRelationship(r)?this.concerto.fromURI(r).typeDeclaration:this.concerto.getTypeDeclaration(r);if(!n.getIdentifierFieldName())throw new Error("Relationship can only be to identified types.");o.isAssignableTo(n.getModelFile(),n.getFullyQualifiedName(),t)||l.reportInvalidFieldAssignment(e.rootResourceIdentifier,t.getName(),r,t)}static reportFieldTypeViolation(e,t,r,n,o){let i=n.isArray()?"[]":"",c=typeof r;if(o.isObject(r)&&o.isIdentifiable(r))c=o.getType(r),r=o.getIdentifier(r);else if(r)try{r=JSON.stringify(r)}catch(e){r=r.toString()}let l=a.messageFormatter("resourcevalidator-fieldtypeviolation");throw new s(l({resourceId:e,propertyName:t,fieldType:n.getType()+i,value:r,typeOfValue:c}))}static reportNotRelationshipViolation(e,t,r){let n=a.messageFormatter("resourcevalidator-notrelationship");throw new s(n({resourceId:e,classFQN:t.getFullyQualifiedTypeName(),invalidValue:r.toString()}))}static reportMissingRequiredProperty(e,t){let r=a.messageFormatter("resourcevalidator-missingrequiredproperty");throw new s(r({resourceId:e,fieldName:t.getName()}))}static reportEmptyIdentifier(e){let t=a.messageFormatter("resourcevalidator-emptyidentifier");throw new s(t({resourceId:e}))}static reportInvalidEnumValue(e,t,r){let n=a.messageFormatter("resourcevalidator-invalidenumvalue");throw new s(n({resourceId:e,value:r,fieldName:t.getName()}))}static reportAbstractClass(e){let t=a.messageFormatter("resourcevalidator-abstractclass");throw new s(t({className:e.getFullyQualifiedName()}))}static reportUndeclaredField(e,t,r){let n=a.messageFormatter("resourcevalidator-undeclaredfield");throw new s(n({resourceId:e,propertyName:t,fullyQualifiedTypeName:r}))}static reportInvalidFieldAssignment(e,t,r,n){let o=a.messageFormatter("resourcevalidator-invalidfieldassignment"),i=n.getFullyQualifiedTypeName();throw n.isArray()&&(i+="[]"),new s(o({resourceId:e,propertyName:t,objectType:r.$class,fieldType:i}))}}e.exports=l},2552:(e,t,r)=>{"use strict";const n=r(6113),o=r(7755),s=r(9259),a=r(8487).NullUtil,i=r(1768),c=r(390),l=r(2438),u=r(3464),p=r(7657);u.extend(p);class d{constructor(e){this.options=e||{}}visit(e,t){return e.isEnum?.()?this.visitEnumDeclaration(e,t):e.isClassDeclaration?.()?this.visitClassDeclaration(e,t):e.isMapDeclaration?.()?this.visitMapDeclaration(e,t):e.isRelationship?.()?this.visitRelationshipDeclaration(e,t):e.isTypeScalar?.()?this.visitField(e.getScalarField(),t):e.isField?.()?this.visitField(e,t):void 0}visitEnumDeclaration(e,t){const r=t.stack.pop(),n=e.getProperties();let o=!1;for(let e=0;e<n.length;e++)n[e].getName()===r&&(o=!0);return o||d.reportInvalidEnumValue(t.rootResourceIdentifier,e,r),null}checkMapType(e,t,r,n){if(i.isPrimitiveType(e.getType()))e=e.getType();else{let o=n.getModelFile().getAllDeclarations().find((t=>t.name===e.getType()));if(i.isScalar(n.getKey())&&(e=o.getType()),o?.isClassDeclaration?.())return r.stack.push(t),void o.accept(this,r)}switch(e){case"String":if("string"!=typeof t)throw new Error(`Model violation in ${n.getFullyQualifiedName()}. Expected Type of String but found '${t}' instead.`);break;case"DateTime":if(!u.utc(t).isValid())throw new Error(`Model violation in ${n.getFullyQualifiedName()}. Expected Type of DateTime but found '${t}' instead.`);break;case"Boolean":if("boolean"!=typeof t){const e=typeof t;throw new Error(`Model violation in ${n.getFullyQualifiedName()}. Expected Type of Boolean but found ${e} instead, for value '${t}'.`)}}}visitMapDeclaration(e,t){const r=t.stack.pop();if(!(r instanceof Map))throw new Error("Expected a Map, but found "+JSON.stringify(r));return r.forEach(((r,n)=>{i.isSystemProperty(n)||(this.checkMapType(e.getKey(),n,t,e),this.checkMapType(e.getValue(),r,t,e))})),null}visitClassDeclaration(e,t){const r=t.stack.pop();r instanceof o||d.reportNotResouceViolation(t.rootResourceIdentifier,e,r),r instanceof s&&(t.rootResourceIdentifier=r.getFullyQualifiedIdentifier());const n=t.modelManager.getType(r.getFullyQualifiedType()),c=n.getFullyQualifiedName(),l=n.getIdentifierFieldName();n.isAbstract()&&d.reportAbstractClass(n);let u=Object.getOwnPropertyNames(r);for(let o=0;o<u.length;o++){let s=u[o];i.isSystemProperty(s)||n.getProperty(s)||(e.isIdentified()&&"$identifier"!==s?d.reportUndeclaredField(r.getIdentifier(),s,c):d.reportUndeclaredField(t.currentIdentifier,s,c))}if(e.isIdentified()){const e=r.getIdentifier();e&&0!==e.trim().length||d.reportEmptyIdentifier(t.rootResourceIdentifier),"$identifier"!==l&&(r.$identifier=e),t.currentIdentifier=r.getFullyQualifiedIdentifier()}const p=n.getProperties();for(let e=0;e<p.length;e++){const n=p[e],o=r[n.getName()];if(a.isNull(o)){if(!n.isOptional()){if("$identifier"===n.getName()&&"$identifier"!==l)continue;if(!a.isNull(n?.defaultValue))continue;d.reportMissingRequiredProperty(t.rootResourceIdentifier,n)}}else t.stack.push(o),n.accept(this,t)}return null}visitField(e,t){const r=t.stack.pop();let n=typeof r,o=e.getName();return"undefined"!==n&&"symbol"!==n||d.reportFieldTypeViolation(t.rootResourceIdentifier,o,r,e),e.isTypeEnum()?this.checkEnum(r,e,t):e.isArray()?this.checkArray(r,e,t):this.checkItem(r,e,t),null}checkEnum(e,t,r){!t.isArray()||e instanceof Array||d.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t);const n=t.getParent().getModelFile().getType(t.getType());if(t.isArray())for(let t=0;t<e.length;t++){const o=e[t];r.stack.push(o),n.accept(this,r)}else{const t=e;r.stack.push(t),n.accept(this,r)}}checkArray(e,t,r){e instanceof Array||d.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t);for(let n=0;n<e.length;n++){const o=e[n];this.checkItem(o,t,r)}}checkItem(e,t,r){let n=typeof e,o=t.getName();if("undefined"!==n&&"symbol"!==n||d.reportFieldTypeViolation(r.rootResourceIdentifier,o,e,t),t.isPrimitive()){let s=!1;switch(t.getType()){case"String":"string"!==n&&(s=!0);break;case"Long":case"Integer":case"Double":"number"!==n&&(s=!0),isFinite(e)||(s=!0);break;case"Boolean":"boolean"!==n&&(s=!0);break;case"DateTime":"object"==typeof e&&"function"==typeof e.isBefore||(s=!0)}s?d.reportFieldTypeViolation(r.rootResourceIdentifier,o,e,t):null!==t.getValidator()&&t.getValidator().validate(r.currentIdentifier,e)}else{let n=r.modelManager.getType(t.getFullyQualifiedTypeName());if(e instanceof s){try{n=r.modelManager.getType(e.getFullyQualifiedType())}catch(n){d.reportFieldTypeViolation(r.rootResourceIdentifier,o,e,t)}i.isAssignableTo(n.getModelFile(),n.getFullyQualifiedName(),t)||d.reportInvalidFieldAssignment(r.rootResourceIdentifier,o,e,t)}r.stack.push(e),n.accept(this,r)}}visitRelationshipDeclaration(e,t){const r=t.stack.pop();if(e.isArray()){r instanceof Array||d.reportInvalidFieldAssignment(t.rootResourceIdentifier,e.getName(),r,e);for(let n=0;n<r.length;n++){const o=r[n];this.checkRelationship(t,e,o)}}else this.checkRelationship(t,e,r);return null}checkRelationship(e,t,r){r instanceof n||r instanceof o&&(this.options.convertResourcesToRelationships||this.options.permitResourcesForRelationships)||d.reportNotRelationshipViolation(e.rootResourceIdentifier,t,r);const s=e.modelManager.getType(r.getFullyQualifiedType());if(!s.getIdentifierFieldName())throw new Error("Cannot have a relationship to a field that is not identifiable.");i.isAssignableTo(s.getModelFile(),r.getFullyQualifiedType(),t)||d.reportInvalidFieldAssignment(e.rootResourceIdentifier,t.getName(),r,t)}static reportFieldTypeViolation(e,t,r,n){let o=n.isArray()?"[]":"",a=typeof r;if(r instanceof s)a=r.getFullyQualifiedType(),r=r.getFullyQualifiedIdentifier();else if(r)try{r="number"!=typeof r||isFinite(r)?JSON.stringify(r):r.toString()}catch(e){r=r.toString()}let i=l.messageFormatter("resourcevalidator-fieldtypeviolation");throw new c(i({resourceId:e,propertyName:t,fieldType:n.getType()+o,value:r,typeOfValue:a}))}static reportNotResouceViolation(e,t,r){let n=l.messageFormatter("resourcevalidator-notresourceorconcept");throw new c(n({resourceId:e,classFQN:t.getFullyQualifiedName(),invalidValue:r.toString()}))}static reportNotRelationshipViolation(e,t,r){let n=l.messageFormatter("resourcevalidator-notrelationship");throw new c(n({resourceId:e,classFQN:t.getFullyQualifiedTypeName(),invalidValue:r.toString()}))}static reportMissingRequiredProperty(e,t){let r=l.messageFormatter("resourcevalidator-missingrequiredproperty");throw new c(r({resourceId:e,fieldName:t.getName()}))}static reportEmptyIdentifier(e){let t=l.messageFormatter("resourcevalidator-emptyidentifier");throw new c(t({resourceId:e}))}static reportInvalidEnumValue(e,t,r){let n=l.messageFormatter("resourcevalidator-invalidenumvalue");throw new c(n({resourceId:e,value:r,fieldName:t.getName()}))}static reportAbstractClass(e){let t=l.messageFormatter("resourcevalidator-abstractclass");throw new c(t({className:e.getFullyQualifiedName()}))}static reportUndeclaredField(e,t,r){let n=l.messageFormatter("resourcevalidator-undeclaredfield");throw new c(n({resourceId:e,propertyName:t,fullyQualifiedTypeName:r}))}static reportInvalidFieldAssignment(e,t,r,n){let o=l.messageFormatter("resourcevalidator-invalidfieldassignment"),s=n.getFullyQualifiedTypeName();throw n.isArray()&&(s+="[]"),new c(o({resourceId:e,propertyName:t,objectType:r.getFullyQualifiedType(),fieldType:s}))}}e.exports=d},390:(e,t,r)=>{"use strict";const n=r(8487).BaseException;e.exports=class extends n{constructor(e,t){super(e,t)}}},7854:(e,t,r)=>{"use strict";const{loremIpsum:n}=r(7405),o=r(3174),s=r(3464),a=r(7657);s.extend(a);const i=function(e,t,r,n,o){return null===e&&(e=n),e=Math.min(Math.max(e,n),o),(null===t||t>o)&&(t=o),t=Math.max(Math.min(t,o),n),t+=r,t/=r,e/=r,(Math.random()*(t-e)+e)/(1/r)},c=(e,t,r)=>{let n=e,o=t;switch(null!==o&&null!==n&&o<n&&(n=t,o=e),r){case"Long":return Math.floor(i(n,o,1,-Math.pow(2,32),Math.pow(2,32)));case"Integer":return Math.floor(i(n,o,1,-Math.pow(2,16),Math.pow(2,16)));case"Double":return Number(i(n,o,1e-4,-Math.pow(2,8),Math.pow(2,8)).toFixed(3));default:return 0}},l=(e,t,r,n)=>{t??=0,r??=null;const o=c(t,r,"Integer");for(;e.length<o;)e+=n();return e.substring(0,o)},u=(e,t)=>{let r=n({count:1,units:"sentences",sentenceLowerBound:1,sentenceUpperBound:5});return(e||t)&&(r=l(r,e,t,(()=>n({count:1,units:"sentences",sentenceLowerBound:1,sentenceUpperBound:5})))),r},p=(e,t,r)=>{if(!e)return"";const n=new o(e.source,e.flags);let s=n.gen();return(t||r)&&(s=l(s,t,r,(()=>n.gen()))),s};class d{constructor(){this.currentDate=s.utc()}getDateTime(){return this.currentDate}getInteger(){return 0}getLong(){return 0}getDouble(){return 0}getBoolean(){return!1}getString(e,t){return e||t?u(e,t):""}getEnum(e){return e[0]}getMap(){return new Map}getArray(e){return[]}getRegex(e,t,r){return p(e,t,r)}getRange(e,t,r){return c(e,t,r)}}class f extends d{constructor(){super()}getInteger(){return Math.round(Math.random()*Math.pow(2,16))}getLong(){return Math.round(Math.random()*Math.pow(2,32))}getDouble(){return Number((Math.random()*Math.pow(2,8)).toFixed(3))}getBoolean(){return 1===Math.round(Math.random())}getString(e,t){return u(e,t)}getEnum(e){return e[Math.floor(Math.random()*e.length)]}getMap(){return new Map([[this.getString(1,10),this.getString(1,10)]])}getArray(e){return[e()]}getRegex(e,t,r){return p(e,t,r)}getRange(e,t,r){return c(e,t,r)}}e.exports=class{static empty(){return new d}static sample(){return new f}}},5477:(e,t,r)=>{"use strict";const{BaseException:n,ErrorCodes:o}=r(8487),s=r(2438);e.exports=class extends n{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.TYPE_NOT_FOUND_EXCEPTION;t||(t=s.messageFormatter("typenotfounderror-defaultmessage")({typeName:e})),super(t,r,n),this.typeName=e}getTypeName(){return this.typeName}}},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=i(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=i(e),a=s[0],c=s[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),u=0,p=c>0?a-4:a;for(r=0;r<p;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,s=[],a=16383,i=0,l=n-o;i<l;i+=a)s.push(c(e,i,i+a>l?l:i+a));return 1===o?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var o,s,a=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),a.push(r[(s=o)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1048:(e,t,r)=>{"use strict";const n=r(7991),o=r(9318),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const a=2147483647;function i(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=i(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?i(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return u(e),i(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),r=i(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(o)return n?-1:z(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return D(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){let s,a=1,i=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,i/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(s=r;s<i;s++)if(l(e,s)===l(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===c)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(r+c>i&&(r=i-c),s=r;s>=0;s--){let r=!0;for(let n=0;n<c;n++)if(l(e,s+n)!==l(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Y(n))return a;e[r+a]=n}return a}function A(e,t,r,n){return H(z(t,e.length-r),e,r,n)}function $(e,t,r,n){return H(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return H(W(t),e,r,n)}function T(e,t,r,n){return H(function(e,t){let r,n,o;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function D(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,i,c;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(s=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=e[o+1],n=e[o+2],i=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&i)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&i,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=a}return function(e){const t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=F));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(G(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?D(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const i=Math.min(s,a),l=this.slice(n,o),u=e.slice(t,r);for(let e=0;e<i;++e)if(l[e]!==u[e]){s=l[e],a=u[e];break}return s<a?-1:a<s?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return $(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const F=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function S(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function N(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=J[e[n]];return o}function O(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,o,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function k(e,t,r,n,o){U(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function P(e,t,r,n,o){U(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function L(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=c.isBuffer(e)?e:c.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};const B={};function j(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,n,o,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,o,s)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=V(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=V(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function z(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},3464:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,r="millisecond",n="second",o="minute",s="hour",a="day",i="week",c="month",l="quarter",u="year",p="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,c),s=r-o<0,a=t.clone().add(n+(s?-1:1),c);return+(-(n+(r-o)/(s?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:i,d:a,D:p,h:s,m:o,s:n,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",b={};b[v]=m;var w="$isDayjsObject",A=function(e){return e instanceof C||!(!e||!e[w])},$=function e(t,r,n){var o;if(!t)return v;if("string"==typeof t){var s=t.toLowerCase();b[s]&&(o=s),r&&(b[s]=r,o=s);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var i=t.name;b[i]=t,o=i}return!n&&o&&(v=o),o||!n&&v},E=function(e,t){if(A(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new C(r)},T=y;T.l=$,T.i=A,T.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=$(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(f);if(n){var o=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return T},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,r){return T.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,l=!!T.u(t)||t,d=T.p(e),f=function(e,t){var n=T.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return l?n:n.endOf(a)},h=function(e,t){return T.w(r.toDate()[e].apply(r.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case u:return l?f(1,0):f(31,11);case c:return l?f(1,g):f(0,g+1);case i:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(l?y-w:y+(6-w),g);case a:case p:return h(v+"Hours",0);case s:return h(v+"Minutes",1);case o:return h(v+"Seconds",2);case n:return h(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var i,l=T.p(e),d="set"+(this.$u?"UTC":""),f=(i={},i[a]=d+"Date",i[p]=d+"Date",i[c]=d+"Month",i[u]=d+"FullYear",i[s]=d+"Hours",i[o]=d+"Minutes",i[n]=d+"Seconds",i[r]=d+"Milliseconds",i)[l],h=l===a?this.$D+(t-this.$W):t;if(l===c||l===u){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[T.p(e)]()},g.add=function(r,l){var p,d=this;r=Number(r);var f=T.p(l),h=function(e){var t=E(d);return T.w(t.date(t.date()+Math.round(e*r)),d)};if(f===c)return this.set(c,this.$M+r);if(f===u)return this.set(u,this.$y+r);if(f===a)return h(1);if(f===i)return h(7);var m=(p={},p[o]=e,p[s]=t,p[n]=1e3,p)[f]||1,g=this.$d.getTime()+r*m;return T.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=T.z(this),s=this.$H,a=this.$m,i=this.$M,c=r.weekdays,l=r.months,u=r.meridiem,p=function(e,r,o,s){return e&&(e[r]||e(t,n))||o[r].slice(0,s)},f=function(e){return T.s(s%12||12,e,"0")},m=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(h,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return T.s(t.$y,4,"0");case"M":return i+1;case"MM":return T.s(i+1,2,"0");case"MMM":return p(r.monthsShort,i,l,3);case"MMMM":return p(l,i);case"D":return t.$D;case"DD":return T.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,c,2);case"ddd":return p(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(s);case"HH":return T.s(s,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(s,a,!0);case"A":return m(s,a,!1);case"m":return String(a);case"mm":return T.s(a,2,"0");case"s":return String(t.$s);case"ss":return T.s(t.$s,2,"0");case"SSS":return T.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,d){var f,h=this,m=T.p(p),g=E(r),y=(g.utcOffset()-this.utcOffset())*e,v=this-g,b=function(){return T.m(h,g)};switch(m){case u:f=b()/12;break;case c:f=b();break;case l:f=b()/3;break;case i:f=(v-y)/6048e5;break;case a:f=(v-y)/864e5;break;case s:f=v/t;break;case o:f=v/e;break;case n:f=v/1e3;break;default:f=v}return d?f:T.a(f)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=$(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return T.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),D=C.prototype;return E.prototype=D,[["$ms",r],["$s",n],["$m",o],["$H",s],["$W",a],["$M",c],["$y",u],["$D",p]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,C,E),e.$i=!0),E},E.locale=$,E.isDayjs=A,E.unix=function(e){return E(1e3*e)},E.en=b[v],E.Ls=b,E.p={},E}()},279:function(e){e.exports=function(){"use strict";var e,t,r=1e3,n=6e4,o=36e5,s=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,i=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:i,months:c,days:s,hours:o,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},p=function(e){return e instanceof v},d=function(e,t,r){return new v(e,r,t.$l)},f=function(e){return t.p(e)+"s"},h=function(e){return e<0},m=function(e){return h(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},y=function(e,t){return e?h(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},v=function(){function h(e,t,r){var n=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){n.$d[f(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var o=e.match(l);if(o){var s=o.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=s[0],this.$d.months=s[1],this.$d.weeks=s[2],this.$d.days=s[3],this.$d.hours=s[4],this.$d.minutes=s[5],this.$d.seconds=s[6],this.calMilliseconds(),this}}return this}var g=h.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,r){return t+(e.$d[r]||0)*u[r]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/i),e%=i,this.$d.months=m(e/c),e%=c,this.$d.days=m(e/s),e%=s,this.$d.hours=m(e/o),e%=o,this.$d.minutes=m(e/n),e%=n,this.$d.seconds=m(e/r),e%=r,this.$d.milliseconds=e},g.toISOString=function(){var e=y(this.$d.years,"Y"),t=y(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=y(r,"D"),o=y(this.$d.hours,"H"),s=y(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var i=y(a,"S"),c=e.negative||t.negative||n.negative||o.negative||s.negative||i.negative,l=o.format||s.format||i.format?"T":"",u=(c?"-":"")+"P"+e.format+t.format+n.format+l+o.format+s.format+i.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var r=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return r.replace(a,(function(e,t){return t||String(n[e])}))},g.as=function(e){return this.$ms/u[f(e)]},g.get=function(e){var t=this.$ms,r=f(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?m(t/u[r]):this.$d[r],t||0},g.add=function(e,t,r){var n;return n=t?e*u[f(t)]:p(e)?e.$ms:d(e,this).$ms,d(this.$ms+n*(r?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return d(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},h}(),b=function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")};return function(r,n,o){e=o,t=o().$utils(),o.duration=function(e,t){var r=o.locale();return d(e,{$l:r},t)},o.isDuration=p;var s=n.prototype.add,a=n.prototype.subtract;n.prototype.add=function(e,t){return p(e)?b(this,e,1):s.bind(this)(e,t)},n.prototype.subtract=function(e,t){return p(e)?b(this,e,-1):a.bind(this)(e,t)}}}()},3221:function(e){e.exports=function(){"use strict";return function(e,t,r){var n=function(e,t){if(!t||!t.length||1===t.length&&!t[0]||1===t.length&&Array.isArray(t[0])&&!t[0].length)return null;var r;1===t.length&&t[0].length>0&&(t=t[0]),r=(t=t.filter((function(e){return e})))[0];for(var n=1;n<t.length;n+=1)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r};r.max=function(){var e=[].slice.call(arguments,0);return n("isAfter",e)},r.min=function(){var e=[].slice.call(arguments,0);return n("isBefore",e)}}}()},4491:function(e){e.exports=function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var s=o.add;o.add=function(r,n){return r=Number(r),this.$utils().p(n)===t?this.add(3*r,e):s.bind(this)(r,n)};var a=o.startOf;o.startOf=function(r,n){var o=this.$utils(),s=!!o.u(n)||n;if(o.p(r)===t){var i=this.quarter()-1;return s?this.month(3*i).startOf(e).startOf("day"):this.month(3*i+2).endOf(e).endOf("day")}return a.bind(this)(r,n)}}}()},7657:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,s){var a=o.prototype;s.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var r=s(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var i=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),i.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(n,o){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?l.call(this):this.$offset;if("string"==typeof n&&(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],s=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===s?a:-a}(n),null===n))return this;var a=Math.abs(n)<=16?60*n:n,i=this;if(o)return i.$offset=a,i.$u=0===n,i;if(0!==n){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(i=this.local().add(a+c,e)).$offset=a,i.$x.$localOffset=c}else i=this.utc();return i};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var d=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return d.call(this,e,t,r);var n=this.local(),o=s(e).local();return d.call(n,o,t,r)}}}()},8143:e=>{"use strict";class t{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.high<e.low||this.low>e.high)}touches(e){return!(this.high+1<e.low||this.low-1>e.high)}add(e){return new t(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.high<this.high?[new t(this.low,e.low-1),new t(e.high+1,this.high)]:e.low<=this.low?[new t(e.high+1,this.high)]:[new t(this.low,e.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}}class r{constructor(e,t){this.ranges=[],this.length=0,null!=e&&this.add(e,t)}_update_length(){this.length=this.ranges.reduce(((e,t)=>e+t.length),0)}add(e,n){var o=e=>{for(var t=0;t<this.ranges.length&&!e.touches(this.ranges[t]);)t++;for(var r=this.ranges.slice(0,t);t<this.ranges.length&&e.touches(this.ranges[t]);)e=e.add(this.ranges[t]),t++;r.push(e),this.ranges=r.concat(this.ranges.slice(t)),this._update_length()};return e instanceof r?e.ranges.forEach(o):(null==n&&(n=e),o(new t(e,n))),this}subtract(e,n){var o=e=>{for(var t=0;t<this.ranges.length&&!e.overlaps(this.ranges[t]);)t++;for(var r=this.ranges.slice(0,t);t<this.ranges.length&&e.overlaps(this.ranges[t]);)r=r.concat(this.ranges[t].subtract(e)),t++;this.ranges=r.concat(this.ranges.slice(t)),this._update_length()};return e instanceof r?e.ranges.forEach(o):(null==n&&(n=e),o(new t(e,n))),this}intersect(e,n){var o=[],s=e=>{for(var r=0;r<this.ranges.length&&!e.overlaps(this.ranges[r]);)r++;for(;r<this.ranges.length&&e.overlaps(this.ranges[r]);){var n=Math.max(this.ranges[r].low,e.low),s=Math.min(this.ranges[r].high,e.high);o.push(new t(n,s)),r++}};return e instanceof r?e.ranges.forEach(s):(null==n&&(n=e),s(new t(e,n))),this.ranges=o,this._update_length(),this}index(e){for(var t=0;t<this.ranges.length&&this.ranges[t].length<=e;)e-=this.ranges[t].length,t++;return this.ranges[t].low+e}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new r(this)}numbers(){return this.ranges.reduce(((e,t)=>{for(var r=t.low;r<=t.high;)e.push(r),r++;return e}),[])}subranges(){return this.ranges.map((e=>({low:e.low,high:e.high,length:1+e.high-e.low})))}}e.exports=r},9318:(e,t)=>{t.read=function(e,t,r,n,o){var s,a,i=8*o-n-1,c=(1<<i)-1,l=c>>1,u=-7,p=r?o-1:0,d=r?-1:1,f=e[t+p];for(p+=d,s=f&(1<<-u)-1,f>>=-u,u+=i;u>0;s=256*s+e[t+p],p+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=n;u>0;a=256*a+e[t+p],p+=d,u-=8);if(0===s)s=1-l;else{if(s===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,o,s){var a,i,c,l=8*s-o-1,u=(1<<l)-1,p=u>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(a++,c/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(t*c-1)*Math.pow(2,o),a+=p):(i=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[r+f]=255&i,f+=h,i/=256,o-=8);for(a=a<<o|i,l+=o;l>0;e[r+f]=255&a,f+=h,a/=256,l-=8);e[r+f-h]|=128*m}},8575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FORMAT_PLAIN=t.FORMAT_HTML=t.FORMATS=void 0;var r="html";t.FORMAT_HTML=r;var n="plain";t.FORMAT_PLAIN=n;var o=[r,n];t.FORMATS=o},4801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LINE_ENDINGS=void 0,t.LINE_ENDINGS={POSIX:"\n",WIN32:"\r\n"}},3647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_PLATFORMS=void 0,t.SUPPORTED_PLATFORMS={DARWIN:"darwin",LINUX:"linux",WIN32:"win32"}},9148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNIT_WORDS=t.UNIT_WORD=t.UNIT_SENTENCES=t.UNIT_SENTENCE=t.UNIT_PARAGRAPHS=t.UNIT_PARAGRAPH=t.UNITS=void 0;var r="words";t.UNIT_WORDS=r;var n="word";t.UNIT_WORD=n;var o="sentences";t.UNIT_SENTENCES=o;var s="sentence";t.UNIT_SENTENCE=s;var a="paragraphs";t.UNIT_PARAGRAPHS=a;var i="paragraph";t.UNIT_PARAGRAPH=i;var c=[r,n,o,s,a,i];t.UNITS=c},938:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WORDS=void 0,t.WORDS=["ad","adipisicing","aliqua","aliquip","amet","anim","aute","cillum","commodo","consectetur","consequat","culpa","cupidatat","deserunt","do","dolor","dolore","duis","ea","eiusmod","elit","enim","esse","est","et","eu","ex","excepteur","exercitation","fugiat","id","in","incididunt","ipsum","irure","labore","laboris","laborum","Lorem","magna","minim","mollit","nisi","non","nostrud","nulla","occaecat","officia","pariatur","proident","qui","quis","reprehenderit","sint","sit","sunt","tempor","ullamco","ut","velit","veniam","voluptate"]},7405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoremIpsum",{enumerable:!0,get:function(){return i.default}}),t.loremIpsum=void 0;var n,o=r(8575),s=r(9148),a=r(938),i=(n=r(2508))&&n.__esModule?n:{default:n};t.loremIpsum=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.count,r=void 0===t?1:t,n=e.format,c=void 0===n?o.FORMAT_PLAIN:n,l=e.paragraphLowerBound,u=void 0===l?3:l,p=e.paragraphUpperBound,d=void 0===p?7:p,f=e.random,h=e.sentenceLowerBound,m=void 0===h?5:h,g=e.sentenceUpperBound,y=void 0===g?15:g,v=e.units,b=void 0===v?s.UNIT_SENTENCES:v,w=e.words,A=void 0===w?a.WORDS:w,$=e.suffix,E=void 0===$?"":$,T={random:f,sentencesPerParagraph:{max:d,min:u},words:A,wordsPerSentence:{max:y,min:m}},C=new i.default(T,c,E);switch(b){case s.UNIT_PARAGRAPHS:case s.UNIT_PARAGRAPH:return C.generateParagraphs(r);case s.UNIT_SENTENCES:case s.UNIT_SENTENCE:return C.generateSentences(r);case s.UNIT_WORDS:case s.UNIT_WORD:return C.generateWords(r);default:return""}}},2508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=r(8575),s=r(4801),a=(n=r(9888))&&n.__esModule?n:{default:n},i=r(3798);function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.FORMAT_PLAIN,n=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.format=r,this.suffix=n,function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"generator",void 0),-1===o.FORMATS.indexOf(r.toLowerCase()))throw new Error("".concat(r," is an invalid format. Please use ").concat(o.FORMATS.join(" or "),"."));this.generator=new a.default(t)}var t,r;return t=e,(r=[{key:"getLineEnding",value:function(){return this.suffix?this.suffix:!(0,i.isReactNative)()&&(0,i.isNode)()&&(0,i.isWindows)()?s.LINE_ENDINGS.WIN32:s.LINE_ENDINGS.POSIX}},{key:"formatString",value:function(e){return this.format===o.FORMAT_HTML?"<p>".concat(e,"</p>"):e}},{key:"formatStrings",value:function(e){var t=this;return e.map((function(e){return t.formatString(e)}))}},{key:"generateWords",value:function(e){return this.formatString(this.generator.generateRandomWords(e))}},{key:"generateSentences",value:function(e){return this.formatString(this.generator.generateRandomParagraph(e))}},{key:"generateParagraphs",value:function(e){var t=this.generator.generateRandomParagraph.bind(this.generator);return this.formatStrings((0,i.makeArrayOfStrings)(e,t)).join(this.getLineEnding())}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=l;t.default=u},9888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(938),o=r(3798);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.sentencesPerParagraph,o=void 0===r?{max:7,min:3}:r,s=t.wordsPerSentence,i=void 0===s?{max:15,min:5}:s,c=t.random,l=(t.seed,t.words),u=void 0===l?n.WORDS:l;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"sentencesPerParagraph",void 0),a(this,"wordsPerSentence",void 0),a(this,"random",void 0),a(this,"words",void 0),o.min>o.max)throw new Error("Minimum number of sentences per paragraph (".concat(o.min,") cannot exceed maximum (").concat(o.max,")."));if(i.min>i.max)throw new Error("Minimum number of words per sentence (".concat(i.min,") cannot exceed maximum (").concat(i.max,")."));this.sentencesPerParagraph=o,this.words=u,this.wordsPerSentence=i,this.random=c||Math.random}var t,r;return t=e,(r=[{key:"generateRandomInteger",value:function(e,t){return Math.floor(this.random()*(t-e+1)+e)}},{key:"generateRandomWords",value:function(e){var t=this,r=this.wordsPerSentence,n=r.min,s=r.max,a=e||this.generateRandomInteger(n,s);return(0,o.makeArrayOfLength)(a).reduce((function(e,r){return"".concat(t.pluckRandomWord()," ").concat(e)}),"").trim()}},{key:"generateRandomSentence",value:function(e){return"".concat((0,o.capitalize)(this.generateRandomWords(e)),".")}},{key:"generateRandomParagraph",value:function(e){var t=this,r=this.sentencesPerParagraph,n=r.min,s=r.max,a=e||this.generateRandomInteger(n,s);return(0,o.makeArrayOfLength)(a).reduce((function(e,r){return"".concat(t.generateRandomSentence()," ").concat(e)}),"").trim()}},{key:"pluckRandomWord",value:function(){var e=this.words.length-1,t=this.generateRandomInteger(0,e);return this.words[t]}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},3670:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=e.trim();return t.charAt(0).toUpperCase()+t.slice(1)}},3798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"capitalize",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"isReactNative",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isWindows",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"makeArrayOfLength",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"makeArrayOfStrings",{enumerable:!0,get:function(){return c.default}});var n=l(r(3670)),o=l(r(2392)),s=l(r(458)),a=l(r(8855)),i=l(r(2556)),c=l(r(9480));function l(e){return e&&e.__esModule?e:{default:e}}},2392:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return!!e.exports}},458:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){var e=!1;try{e="ReactNative"===navigator.product}catch(t){e=!1}return e}},8855:(e,t,r)=>{"use strict";var n=r(9907);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(3647);t.default=function(){var e=!1;try{e=n.platform===o.SUPPORTED_PLATFORMS.WIN32}catch(t){e=!1}return e}},2556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Array.apply(null,Array(e)).map((function(e,t){return t}))}},9480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(2556))&&n.__esModule?n:{default:n};t.default=function(e,t){return(0,o.default)(e).map((function(){return t()}))}},7250:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,i){i=i||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var i=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return i.long?(c=e,(l=Math.abs(c))>=o?a(c,l,o,"day"):l>=n?a(c,l,n,"hour"):l>=r?a(c,l,r,"minute"):l>=t?a(c,l,t,"second"):c+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9907:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var i,c=[],l=!1,u=-1;function p(){l&&i&&(l=!1,i.length?c=i.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=c.length;t;){for(i=c,c=[];++u<t;)i&&i[u].run();u=-1,t=c.length}i=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3174:(e,t,r)=>{const n=r(1309),o=r(8143),s=n.types;e.exports=class e{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else{if("string"!=typeof e)throw new Error("Expected a regexp or string");this.ignoreCase=t&&-1!==t.indexOf("i"),this.multiline=t&&-1!==t.indexOf("m")}this.tokens=n(e)}_setDefaults(t){this.max=null!=t.max?t.max:null!=e.prototype.max?e.prototype.max:100,this.defaultRange=t.defaultRange?t.defaultRange:this.defaultRange.clone(),t.randInt&&(this.randInt=t.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var r,n,o,a,i;switch(e.type){case s.ROOT:case s.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&void 0===e.groupNumber&&(e.groupNumber=t.push(null)-1),n="",a=0,i=(r=e.options?this._randSelect(e.options):e.stack).length;a<i;a++)n+=this._gen(r[a],t);return e.remember&&(t[e.groupNumber]=n),n;case s.POSITION:return"";case s.SET:var c=this._expand(e);return c.length?String.fromCharCode(this._randSelect(c)):"";case s.REPETITION:for(o=this.randInt(e.min,e.max===1/0?e.min+this.max:e.max),n="",a=0;a<o;a++)n+=this._gen(e.value,t);return n;case s.REFERENCE:return t[e.value-1]||"";case s.CHAR:var l=this.ignoreCase&&this._randBool()?this._toOtherCase(e.value):e.value;return String.fromCharCode(l)}}_toOtherCase(e){return e+(97<=e&&e<=122?-32:65<=e&&e<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(e){return e instanceof o?e.index(this.randInt(0,e.length-1)):e[this.randInt(0,e.length-1)]}_expand(e){if(e.type===n.types.CHAR)return new o(e.value);if(e.type===n.types.RANGE)return new o(e.from,e.to);{let t=new o;for(let r=0;r<e.set.length;r++){let n=this._expand(e.set[r]);if(t.add(n),this.ignoreCase)for(let e=0;e<n.length;e++){let r=n.index(e),o=this._toOtherCase(r);r!==o&&t.add(o)}}return e.not?this.defaultRange.clone().subtract(t):this.defaultRange.clone().intersect(t)}}randInt(e,t){return e+Math.floor(Math.random()*(1+t-e))}get defaultRange(){return this._range=this._range||new o(32,126)}set defaultRange(e){this._range=e}static randexp(t,r){var n;return"string"==typeof t&&(t=new RegExp(t,r)),void 0===t._randexp?(n=new e(t,r),t._randexp=n):(n=t._randexp)._setDefaults(t),n.gen()}static sugar(){RegExp.prototype.gen=function(){return e.randexp(this)}}}},1309:(e,t,r)=>{const n=r(4045),o=r(8020),s=r(7732),a=r(5097);e.exports=e=>{var t,r,i=0,c={type:o.ROOT,stack:[]},l=c,u=c.stack,p=[],d=t=>{n.error(e,"Nothing to repeat at column "+(t-1))},f=n.strToChars(e);for(t=f.length;i<t;)switch(r=f[i++]){case"\\":switch(r=f[i++]){case"b":u.push(a.wordBoundary());break;case"B":u.push(a.nonWordBoundary());break;case"w":u.push(s.words());break;case"W":u.push(s.notWords());break;case"d":u.push(s.ints());break;case"D":u.push(s.notInts());break;case"s":u.push(s.whitespace());break;case"S":u.push(s.notWhitespace());break;default:/\d/.test(r)?u.push({type:o.REFERENCE,value:parseInt(r,10)}):u.push({type:o.CHAR,value:r.charCodeAt(0)})}break;case"^":u.push(a.begin());break;case"$":u.push(a.end());break;case"[":var h;"^"===f[i]?(h=!0,i++):h=!1;var m=n.tokenizeClass(f.slice(i),e);i+=m[1],u.push({type:o.SET,set:m[0],not:h});break;case".":u.push(s.anyChar());break;case"(":var g={type:o.GROUP,stack:[],remember:!0};"?"===(r=f[i])&&(r=f[i+1],i+=2,"="===r?g.followedBy=!0:"!"===r?g.notFollowedBy=!0:":"!==r&&n.error(e,`Invalid group, character '${r}' after '?' at column `+(i-1)),g.remember=!1),u.push(g),p.push(l),l=g,u=g.stack;break;case")":0===p.length&&n.error(e,"Unmatched ) at column "+(i-1)),u=(l=p.pop()).options?l.options[l.options.length-1]:l.stack;break;case"|":l.options||(l.options=[l.stack],delete l.stack);var y=[];l.options.push(y),u=y;break;case"{":var v,b,w=/^(\d+)(,(\d+)?)?\}/.exec(f.slice(i));null!==w?(0===u.length&&d(i),v=parseInt(w[1],10),b=w[2]?w[3]?parseInt(w[3],10):1/0:v,i+=w[0].length,u.push({type:o.REPETITION,min:v,max:b,value:u.pop()})):u.push({type:o.CHAR,value:123});break;case"?":0===u.length&&d(i),u.push({type:o.REPETITION,min:0,max:1,value:u.pop()});break;case"+":0===u.length&&d(i),u.push({type:o.REPETITION,min:1,max:1/0,value:u.pop()});break;case"*":0===u.length&&d(i),u.push({type:o.REPETITION,min:0,max:1/0,value:u.pop()});break;default:u.push({type:o.CHAR,value:r.charCodeAt(0)})}return 0!==p.length&&n.error(e,"Unterminated group"),c},e.exports.types=o},5097:(e,t,r)=>{const n=r(8020);t.wordBoundary=()=>({type:n.POSITION,value:"b"}),t.nonWordBoundary=()=>({type:n.POSITION,value:"B"}),t.begin=()=>({type:n.POSITION,value:"^"}),t.end=()=>({type:n.POSITION,value:"$"})},7732:(e,t,r)=>{const n=r(8020),o=()=>[{type:n.RANGE,from:48,to:57}],s=()=>[{type:n.CHAR,value:95},{type:n.RANGE,from:97,to:122},{type:n.RANGE,from:65,to:90}].concat(o()),a=()=>[{type:n.CHAR,value:9},{type:n.CHAR,value:10},{type:n.CHAR,value:11},{type:n.CHAR,value:12},{type:n.CHAR,value:13},{type:n.CHAR,value:32},{type:n.CHAR,value:160},{type:n.CHAR,value:5760},{type:n.RANGE,from:8192,to:8202},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233},{type:n.CHAR,value:8239},{type:n.CHAR,value:8287},{type:n.CHAR,value:12288},{type:n.CHAR,value:65279}];t.words=()=>({type:n.SET,set:s(),not:!1}),t.notWords=()=>({type:n.SET,set:s(),not:!0}),t.ints=()=>({type:n.SET,set:o(),not:!1}),t.notInts=()=>({type:n.SET,set:o(),not:!0}),t.whitespace=()=>({type:n.SET,set:a(),not:!1}),t.notWhitespace=()=>({type:n.SET,set:a(),not:!0}),t.anyChar=()=>({type:n.SET,set:[{type:n.CHAR,value:10},{type:n.CHAR,value:13},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233}],not:!0})},8020:e=>{e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},4045:(e,t,r)=>{const n=r(8020),o=r(7732),s={0:0,t:9,n:10,v:11,f:12,r:13};t.strToChars=function(e){return e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,r,n,o,a,i,c){if(r)return e;var l=t?8:n?parseInt(n,16):o?parseInt(o,16):a?parseInt(a,8):i?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(i):s[c],u=String.fromCharCode(l);return/[[\]{}^$.|?*+()]/.test(u)&&(u="\\"+u),u}))},t.tokenizeClass=(e,r)=>{for(var s,a,i=[],c=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(s=c.exec(e));)if(s[1])i.push(o.words());else if(s[2])i.push(o.ints());else if(s[3])i.push(o.whitespace());else if(s[4])i.push(o.notWords());else if(s[5])i.push(o.notInts());else if(s[6])i.push(o.notWhitespace());else if(s[7])i.push({type:n.RANGE,from:(s[8]||s[9]).charCodeAt(0),to:s[10].charCodeAt(0)});else{if(!(a=s[12]))return[i,c.lastIndex];i.push({type:n.CHAR,value:a.charCodeAt(0)})}t.error(r,"Unterminated character class")},t.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}},4971:(e,t,r)=>{"use strict";var n=r(1048).hp;function o(e){return e instanceof n?n.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const t=[],r=[],n=new Map;if(n.set(Date,(e=>new Date(e))),n.set(Map,((e,t)=>new Map(a(Array.from(e),t)))),n.set(Set,((e,t)=>new Set(a(Array.from(e),t)))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return a(i,e);if(i.constructor!==Object&&(s=n.get(i.constructor)))return s(i,e);const c={};t.push(i),r.push(c);for(const a in i){const l=i[a];if("object"!=typeof l||null===l)c[a]=l;else if(l.constructor!==Object&&(s=n.get(l.constructor)))c[a]=s(l,e);else if(ArrayBuffer.isView(l))c[a]=o(l);else{const n=t.indexOf(l);c[a]=-1!==n?r[n]:e(l)}}return t.pop(),r.pop(),c}:function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return a(i,e);if(i.constructor!==Object&&(s=n.get(i.constructor)))return s(i,e);const c={};t.push(i),r.push(c);for(const a in i){if(!1===Object.hasOwnProperty.call(i,a))continue;const l=i[a];if("object"!=typeof l||null===l)c[a]=l;else if(l.constructor!==Object&&(s=n.get(l.constructor)))c[a]=s(l,e);else if(ArrayBuffer.isView(l))c[a]=o(l);else{const n=t.indexOf(l);c[a]=-1!==n?r[n]:e(l)}}return t.pop(),r.pop(),c};function a(e,a){const i=Object.keys(e),c=new Array(i.length);for(let l=0;l<i.length;l++){const u=i[l],p=e[u];if("object"!=typeof p||null===p)c[u]=p;else if(p.constructor!==Object&&(s=n.get(p.constructor)))c[u]=s(p,a);else if(ArrayBuffer.isView(p))c[u]=o(p);else{const e=t.indexOf(p);c[u]=-1!==e?r[e]:a(p)}}return c}}(e);const t=new Map;if(t.set(Date,(e=>new Date(e))),t.set(Map,((e,t)=>new Map(n(Array.from(e),t)))),t.set(Set,((e,t)=>new Set(n(Array.from(e),t)))),e.constructorHandlers)for(const r of e.constructorHandlers)t.set(r[0],r[1]);let r=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(r=t.get(s.constructor)))return r(s,e);const a={};for(const n in s){const i=s[n];"object"!=typeof i||null===i?a[n]=i:i.constructor!==Object&&(r=t.get(i.constructor))?a[n]=r(i,e):ArrayBuffer.isView(i)?a[n]=o(i):a[n]=e(i)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(r=t.get(s.constructor)))return r(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const i=s[n];"object"!=typeof i||null===i?a[n]=i:i.constructor!==Object&&(r=t.get(i.constructor))?a[n]=r(i,e):ArrayBuffer.isView(i)?a[n]=o(i):a[n]=e(i)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let i=0;i<s.length;i++){const c=s[i],l=e[c];"object"!=typeof l||null===l?a[c]=l:l.constructor!==Object&&(r=t.get(l.constructor))?a[c]=r(l,n):ArrayBuffer.isView(l)?a[c]=o(l):a[c]=n(l)}return a}}},1565:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?a[i.COMPARATORLOOSE]:a[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const s=r(3990),{safeRe:a,t:i}=r(2841),c=r(4004),l=r(1361),u=r(4517),p=r(7476)},7476:(e,t,r)=>{const n=/\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,r=s.get(t);if(r)return r;const n=this.options.loose,o=n?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(o,N(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),c("comparator trim",e),e=e.replace(u[p.TILDETRIM],f),c("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),c("caret trim",e);let a=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>S(e,this.options)));n&&(a=a.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),c("range list",a);const l=new Map,v=a.map((e=>new i(e,this.options)));for(const e of v){if(y(e))return[e];l.set(e.value,e)}l.size>1&&l.has("")&&l.delete("");const b=[...l.values()];return s.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Range is required");return this.set.some((r=>b(r,t)&&e.set.some((e=>b(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}e.exports=o;const s=new(r(8953)),a=r(3990),i=r(1565),c=r(1361),l=r(4517),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:h}=r(2841),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=r(9543),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},w=(e,t)=>(c("comp",e,t),e=T(e,t),c("caret",e),e=$(e,t),c("tildes",e),e=D(e,t),c("xrange",e),e=I(e,t),c("stars",e),e),A=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const r=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(r,((t,r,n,o,s)=>{let a;return c("tilde",e,t,r,n,o,s),A(r)?a="":A(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:A(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(c("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,c("tilde return",a),a}))},T=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{c("caret",e,t);const r=t.loose?u[p.CARETLOOSE]:u[p.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,s,a)=>{let i;return c("caret",e,t,r,o,s,a),A(r)?i="":A(o)?i=`>=${r}.0.0${n} <${+r+1}.0.0-0`:A(s)?i="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(c("replaceCaret pr",a),i="0"===r?"0"===o?`>=${r}.${o}.${s}-${a} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${a} <${+r+1}.0.0-0`):(c("no pr"),i="0"===r?"0"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),c("caret return",i),i}))},D=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>F(e,t))).join(" ")),F=(e,t)=>{e=e.trim();const r=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(r,((r,n,o,s,a,i)=>{c("xRange",e,r,n,o,s,a,i);const l=A(o),u=l||A(s),p=u||A(a),d=p;return"="===n&&d&&(n=""),i=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(s=0),a=0,">"===n?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(i="-0"),r=`${n+o}.${s}.${a}${i}`):u?r=`>=${o}.0.0${i} <${+o+1}.0.0-0`:p&&(r=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`),c("xRange return",r),r}))},I=(e,t)=>(c("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),S=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),N=e=>(t,r,n,o,s,a,i,c,l,u,p,d)=>`${r=A(n)?"":A(o)?`>=${n}.0.0${e?"-0":""}`:A(s)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=A(l)?"":A(u)?`<${+l+1}.0.0-0`:A(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:`<=${c}`}`.trim(),O=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},4517:(e,t,r)=>{const n=r(1361),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(9543),{safeRe:a,t:i}=r(2841),c=r(3990),{compareIdentifiers:l}=r(3806);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[i.LOOSE]:a[i.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},2281:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},4004:(e,t,r)=>{const n=r(8848),o=r(8220),s=r(9761),a=r(2386),i=r(1262),c=r(9639);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return s(e,r,l);case">=":return a(e,r,l);case"<":return i(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},6783:(e,t,r)=>{const n=r(4517),o=r(3955),{safeRe:s,t:a}=r(2841);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?s[a.COERCERTLFULL]:s[a.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?s[a.COERCEFULL]:s[a.COERCE]);if(null===r)return null;const i=r[2],c=r[3]||"0",l=r[4]||"0",u=t.includePrerelease&&r[5]?`-${r[5]}`:"",p=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${i}.${c}.${l}${u}${p}`,t)}},6106:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},2132:(e,t,r)=>{const n=r(7851);e.exports=(e,t)=>n(e,t,!0)},7851:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},3269:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),s=r.compare(o);if(0===s)return null;const a=s>0,i=a?r:o,c=a?o:r,l=!!i.prerelease.length;if(c.prerelease.length&&!l)return c.patch||c.minor?i.patch?"patch":i.minor?"minor":"major":"major";const u=l?"pre":"";return r.major!==o.major?u+"major":r.minor!==o.minor?u+"minor":r.patch!==o.patch?u+"patch":"prerelease"}},8848:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>0===n(e,t,r)},9761:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>0},2386:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>=0},8868:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r,o,s)=>{"string"==typeof r&&(s=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,s).version}catch(e){return null}}},1262:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)<0},9639:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)<=0},6381:(e,t,r)=>{const n=r(4517);e.exports=(e,t)=>new n(e,t).major},1353:(e,t,r)=>{const n=r(4517);e.exports=(e,t)=>new n(e,t).minor},8220:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>0!==n(e,t,r)},3955:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},6082:(e,t,r)=>{const n=r(4517);e.exports=(e,t)=>new n(e,t).patch},9428:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},7555:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(t,e,r)},3810:(e,t,r)=>{const n=r(6106);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7229:(e,t,r)=>{const n=r(7476);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4042:(e,t,r)=>{const n=r(6106);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},8474:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},2722:(e,t,r)=>{const n=r(2841),o=r(9543),s=r(4517),a=r(3806),i=r(3955),c=r(8474),l=r(2281),u=r(8868),p=r(3269),d=r(6381),f=r(1353),h=r(6082),m=r(9428),g=r(7851),y=r(7555),v=r(2132),b=r(6106),w=r(4042),A=r(3810),$=r(9761),E=r(1262),T=r(8848),C=r(8220),D=r(2386),F=r(9639),I=r(4004),S=r(6783),N=r(1565),O=r(7476),M=r(7229),x=r(6364),k=r(5039),P=r(5357),L=r(1280),R=r(7403),_=r(8854),B=r(7226),j=r(7183),V=r(8623),U=r(6486),Q=r(583);e.exports={parse:i,valid:c,clean:l,inc:u,diff:p,major:d,minor:f,patch:h,prerelease:m,compare:g,rcompare:y,compareLoose:v,compareBuild:b,sort:w,rsort:A,gt:$,lt:E,eq:T,neq:C,gte:D,lte:F,cmp:I,coerce:S,Comparator:N,Range:O,satisfies:M,toComparators:x,maxSatisfying:k,minSatisfying:P,minVersion:L,validRange:R,outside:_,gtr:B,ltr:j,intersects:V,simplifyRange:U,subset:Q,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},9543:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},1361:(e,t,r)=>{const n="object"==typeof r(9907)&&{NODE_ENV:"production"}.NODE_DEBUG&&/\bsemver\b/i.test({NODE_ENV:"production"}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},3806:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8953:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},3990:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},2841:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=r(9543),a=r(1361),i=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],u=t.t={};let p=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[d,o]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;a(e,o,t),u[e]=o,l[o]=t,i[o]=new RegExp(t,r?"g":void 0),c[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7226:(e,t,r)=>{const n=r(8854);e.exports=(e,t,r)=>n(e,t,">",r)},8623:(e,t,r)=>{const n=r(7476);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},7183:(e,t,r)=>{const n=r(8854);e.exports=(e,t,r)=>n(e,t,"<",r)},5039:(e,t,r)=>{const n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(s&&-1!==a.compare(e)||(s=e,a=new n(s,r)))})),s}},5357:(e,t,r)=>{const n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(s&&1!==a.compare(e)||(s=e,a=new n(s,r)))})),s}},1280:(e,t,r)=>{const n=r(4517),o=r(7476),s=r(9761);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!s(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||r&&!s(r,a)||(r=a)}return r&&e.test(r)?r:null}},8854:(e,t,r)=>{const n=r(4517),o=r(1565),{ANY:s}=o,a=r(7476),i=r(7229),c=r(9761),l=r(1262),u=r(9639),p=r(2386);e.exports=(e,t,r,d)=>{let f,h,m,g,y;switch(e=new n(e,d),t=new a(t,d),r){case">":f=c,h=u,m=l,g=">",y=">=";break;case"<":f=l,h=p,m=c,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(e,t,d))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let a=null,i=null;if(n.forEach((e=>{e.semver===s&&(e=new o(">=0.0.0")),a=a||e,i=i||e,f(e.semver,a.semver,d)?a=e:m(e.semver,i.semver,d)&&(i=e)})),a.operator===g||a.operator===y)return!1;if((!i.operator||i.operator===g)&&h(e,i.semver))return!1;if(i.operator===y&&m(e,i.semver))return!1}return!0}},6486:(e,t,r)=>{const n=r(7229),o=r(7851);e.exports=(e,t,r)=>{const s=[];let a=null,i=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c)n(e,t,r)?(i=e,a||(a=e)):(i&&s.push([a,i]),i=null,a=null);a&&s.push([a,null]);const l=[];for(const[e,t]of s)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const u=l.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},583:(e,t,r)=>{const n=r(7476),o=r(1565),{ANY:s}=o,a=r(7229),i=r(7851),c=[new o(">=0.0.0-0")],l=[new o(">=0.0.0")],u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?c:l}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=l}const n=new Set;let o,u,f,h,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?o=p(o,t,r):"<"===t.operator||"<="===t.operator?u=d(u,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&u){if(f=i(o.semver,u.semver,r),f>0)return null;if(0===f&&(">="!==o.operator||"<="!==u.operator))return null}for(const e of n){if(o&&!a(e,String(o),r))return null;if(u&&!a(e,String(u),r))return null;for(const n of t)if(!a(e,String(n),r))return!1;return!0}let v=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver,b=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;v&&1===v.prerelease.length&&"<"===u.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,o)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(h=p(o,e,r),h===e&&h!==o)return!1}else if(">="===o.operator&&!a(o.semver,String(e),r))return!1;if(u)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(m=d(u,e,r),m===e&&m!==u)return!1}else if("<="===u.operator&&!a(u.semver,String(e),r))return!1;if(!e.operator&&(u||o)&&0!==f)return!1}return!(o&&g&&!u&&0!==f||u&&y&&!o&&0!==f||b||v)},p=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},6364:(e,t,r)=>{const n=r(7476);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},7403:(e,t,r)=>{const n=r(7476);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},9825:function(e,t,r){var n,o;!function(s,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,s=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(s=7),t=0;t<o&&""!==n[t];t++);if(t<s)for(n.splice(t,1,"0000");n.length<s;)n.splice(t,0,"0000");for(var a=0;a<s;a++){r=n[a].split("");for(var i=0;i<3&&"0"===r[0]&&r.length>1;i++)r.splice(0,1);n[a]=r.join("")}var c=-1,l=0,u=0,p=-1,d=!1;for(a=0;a<s;a++)d?"0"===n[a]?u+=1:(d=!1,u>l&&(c=p,l=u)):"0"===n[a]&&(d=!0,p=a,u=1);u>l&&(c=p,l=u),l>1&&n.splice(c,l,""),o=n.length;var f="";for(""===n[0]&&(f=":"),a=0;a<o&&(f+=n[a],a!==o-1);a++)f+=":";return""===n[o-1]&&(f+=":"),f},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},1811:function(e,t,r){var n,o;!function(s,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},9472:function(e,t,r){var n,o,s;!function(a,i){"use strict";e.exports?e.exports=i(r(2675),r(9825),r(1811)):(o=[r(2675),r(9825),r(1811)],void 0===(s="function"==typeof(n=i)?n.apply(t,o):n)||(e.exports=s))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function s(e,t){var r=arguments.length>=1;if(!(this instanceof s))return r?arguments.length>=2?new s(e,t):new s(e):new s;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}s.version="1.19.11";var a=s.prototype,i=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===l(e)}function p(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(u(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++)(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--);return e}function d(e,t){var r,n;if(u(t)){for(r=0,n=t.length;r<n;r++)if(!d(e,t[r]))return!1;return!0}var o=l(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function f(e,t){if(!u(e)||!u(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function h(e){return e.replace(/^\/+|\/+$/g,"")}function m(e){return escape(e)}function g(e){return encodeURIComponent(e).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}s._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:s.preventInvalidHostname,duplicateQueryParameters:s.duplicateQueryParameters,escapeQuerySpace:s.escapeQuerySpace}},s.preventInvalidHostname=!1,s.duplicateQueryParameters=!1,s.escapeQuerySpace=!0,s.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,s.idn_expression=/[^a-z0-9\._-]/i,s.punycode_expression=/(xn--)/i,s.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,s.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,s.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,s.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},s.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,s.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},s.hostProtocols=["http","https"],s.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,s.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},s.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return s.domAttributes[t]}},s.encode=g,s.decode=decodeURIComponent,s.iso8859=function(){s.encode=escape,s.decode=unescape},s.unicode=function(){s.encode=g,s.decode=decodeURIComponent},s.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},s.encodeQuery=function(e,t){var r=s.encode(e+"");return void 0===t&&(t=s.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},s.decodeQuery=function(e,t){e+="",void 0===t&&(t=s.escapeQuerySpace);try{return s.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var y,v={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return s[t](r+"").replace(s.characters[e][t].expression,(function(r){return s.characters[e][t].map[r]}))}catch(e){return r}}};for(y in v)s[y+"PathSegment"]=b("pathname",v[y]),s[y+"UrnPathSegment"]=b("urnpath",v[y]);var w=function(e,t,r){return function(n){var o;o=r?function(e){return s[t](s[r](e))}:s[t];for(var a=(n+"").split(e),i=0,c=a.length;i<c;i++)a[i]=o(a[i]);return a.join(e)}};function A(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function $(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}s.decodePath=w("/","decodePathSegment"),s.decodeUrnPath=w(":","decodeUrnPathSegment"),s.recodePath=w("/","encodePathSegment","decode"),s.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),s.encodeReserved=b("reserved","encode"),s.parse=function(e,t){var r;return t||(t={preventInvalidHostname:s.preventInvalidHostname}),(r=(e=(e=e.replace(s.leading_whitespace_expression,"")).replace(s.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=s.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(s.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=s.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},s.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),i=e.indexOf("/"),c=e.indexOf(":",a+1);-1!==c&&(-1===i||c<i)?(t.hostname=e.substring(0,o)||null,t.port=null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&s.ensureValidHostname(t.hostname,t.protocol),t.port&&s.ensureValidPort(t.port),e.substring(o)||"/"},s.parseAuthority=function(e,t){return e=s.parseUserinfo(e,t),s.parseHost(e,t)},s.parseUserinfo=function(e,t){var r=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var n,o=e.indexOf("/"),a=e.lastIndexOf("@",o>-1?o:e.length-1);return a>-1&&(-1===o||a<o)?(n=e.substring(0,a).split(":"),t.username=n[0]?s.decode(n[0]):null,n.shift(),t.password=n[0]?s.decode(n.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null),e},s.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},c=e.split("&"),l=c.length,u=0;u<l;u++)r=c[u].split("="),n=s.decodeQuery(r.shift(),t),o=r.length?s.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(i.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o);return a},s.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=s.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},s.buildHost=function(e){var t="";return e.hostname?(s.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},s.buildAuthority=function(e){return s.buildUserinfo(e)+s.buildHost(e)},s.buildUserinfo=function(e){var t="";return e.username&&(t+=s.encode(e.username)),e.password&&(t+=":"+s.encode(e.password)),t&&(t+="@"),t},s.buildQuery=function(e,t,r){var n,o,a,c,l="";for(o in e)if("__proto__"!==o&&i.call(e,o))if(u(e[o]))for(n={},a=0,c=e[o].length;a<c;a++)void 0!==e[o][a]&&void 0===n[e[o][a]+""]&&(l+="&"+s.buildQueryParameter(o,e[o][a],r),!0!==t&&(n[e[o][a]+""]=!0));else void 0!==e[o]&&(l+="&"+s.buildQueryParameter(o,e[o],r));return l.substring(1)},s.buildQueryParameter=function(e,t,r){return s.encodeQuery(e,r)+(null!==t?"="+s.encodeQuery(t,r):"")},s.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)i.call(t,n)&&s.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),u(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},s.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)i.call(t,n)&&s.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},s.removeQuery=function(e,t,r){var n,o,a;if(u(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===l(t))for(a in e)t.test(a)&&(e[a]=void 0);else if("object"==typeof t)for(a in t)i.call(t,a)&&s.removeQuery(e,a,t[a]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===l(r)?!u(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=p(e[t],r):e[t]!==String(r)||u(r)&&1!==r.length?u(e[t])&&(e[t]=p(e[t],r)):e[t]=void 0:e[t]=void 0}},s.hasQuery=function(e,t,r,n){switch(l(t)){case"String":break;case"RegExp":for(var o in e)if(i.call(e,o)&&t.test(o)&&(void 0===r||s.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var a in t)if(i.call(t,a)&&!s.hasQuery(e,a,t[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(u(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!u(e[t])&&(n?d:f)(e[t],r);case"RegExp":return u(e[t])?!!n&&d(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return u(e[t])?!!n&&d(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},s.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new s(arguments[n]);e.push(o);for(var a=o.segment(),i=0;i<a.length;i++)"string"==typeof a[i]&&t.push(a[i]),a[i]&&r++}if(!t.length||!r)return new s("");var c=new s("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||c.path("/"+c.path()),c.normalize()},s.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},s.withinString=function(e,t,r){r||(r={});var n=r.start||s.findUri.start,o=r.end||s.findUri.end,a=r.trim||s.findUri.trim,i=r.parens||s.findUri.parens,c=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var l=n.exec(e);if(!l)break;var u=l.index;if(r.ignoreHtml){var p=e.slice(Math.max(u-3,0),u);if(p&&c.test(p))continue}for(var d=u+e.slice(u).search(o),f=e.slice(u,d),h=-1;;){var m=i.exec(f);if(!m)break;var g=m.index+m[0].length;h=Math.max(h,g)}if(!((f=h>-1?f.slice(0,h)+f.slice(h).replace(a,""):f.replace(a,"")).length<=l[0].length||r.ignore&&r.ignore.test(f))){var y=t(f,u,d=u+f.length,e);void 0!==y?(y=String(y),e=e.slice(0,u)+y+e.slice(d),n.lastIndex=u+y.length):n.lastIndex=d}}return n.lastIndex=0,e},s.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(s.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(s.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(s.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},s.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},s.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},a.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=s.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new s(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=A("protocol"),a.username=A("username"),a.password=A("password"),a.hostname=A("hostname"),a.port=A("port"),a.query=$("query","?"),a.fragment=$("fragment","#"),a.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?s.decodeUrnPath:s.decodePath)(r):r}return this._parts.urn?this._parts.path=e?s.recodeUrnPath(e):"":this._parts.path=e?s.recodePath(e):"/",this.build(!t),this},a.path=a.pathname,a.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=s._parts();var n=e instanceof s,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[s.getDomAttribute(e)]||"",o=!1),!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=s.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var a=n?e._parts:e;for(r in a)"query"!==r&&i.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,n=!1,o=!1,a=!1,i=!1,c=!1,l=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,n=s.ip4_expression.test(this._parts.hostname),o=s.ip6_expression.test(this._parts.hostname),i=(a=!(t=n||o))&&r&&r.has(this._parts.hostname),c=a&&s.idn_expression.test(this._parts.hostname),l=a&&s.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return a;case"sld":return i;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var E=a.protocol,T=a.port,C=a.hostname;a.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(s.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},a.scheme=a.protocol,a.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),s.ensureValidPort(e))),T.call(this,e,t))},a.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==s.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&s.ensureValidHostname(e,this._parts.protocol)}return C.call(this,e,t)},a.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=s(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},a.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?s.buildHost(this._parts):"";if("/"!==s.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?s.buildAuthority(this._parts):"";if("/"!==s.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=s.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),s.parseUserinfo(e,this._parts),this.build(!t),this},a.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=s.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},a.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),a=new RegExp("^"+c(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&s.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,e),this.build(!t),this},a.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(s.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},a.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var s;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');s=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");s=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!t),this},a.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?s.decodePath(n):n}var o=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,o),i=new RegExp("^"+c(a));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=s.recodePath(e),this._parts.path=this._parts.path.replace(i,e),this.build(!t),this},a.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?s.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var a=new RegExp(c(this.filename())+"$");return e=s.recodePath(e),this._parts.path=this._parts.path.replace(a,e),o?this.normalizePath(t):this.build(!t),this},a.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),a=o.lastIndexOf(".");return-1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?s.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var i,l=this.suffix();if(l)i=e?new RegExp(c(l)+"$"):new RegExp(c("."+l)+"$");else{if(!e)return this;this._parts.path+="."+s.recodePath(e)}return i&&(e=s.recodePath(e),this._parts.path=this._parts.path.replace(i,e)),this.build(!t),this},a.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),s="/"===o.substring(0,1),a=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(s&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(u(t)){a=[];for(var i=0,c=t.length;i<c;i++)(t[i].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(h(t[i])))}else(t||"string"==typeof t)&&(t=h(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=h(t):a.splice(e,1);return s&&a.unshift(""),this.path(a.join(n),r)},a.segmentCoded=function(e,t,r){var n,o,a;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(u(n=this.segment(e,t,r)))for(o=0,a=n.length;o<a;o++)n[o]=s.decode(n[o]);else n=void 0!==n?s.decode(n):void 0;return n}if(u(t))for(o=0,a=t.length;o<a;o++)t[o]=s.encode(t[o]);else t="string"==typeof t||t instanceof String?s.encode(t):t;return this.segment(e,t,r)};var D=a.query;return a.query=function(e,t){if(!0===e)return s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=s.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=s.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):D.call(this,e,t)},a.setQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)i.call(e,o)&&(n[o]=e[o])}return this._parts.query=s.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.addQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return s.addQuery(n,e,void 0===t?null:t),this._parts.query=s.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.removeQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return s.removeQuery(n,e,t),this._parts.query=s.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.hasQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return s.hasQuery(n,e,t,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===s.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},a.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=s.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,a="";for("/"!==(r=s.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return t&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!e),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(s.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},a.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var e=s.encode,t=s.decode;s.encode=escape,s.decode=decodeURIComponent;try{this.normalize()}finally{s.encode=e,s.decode=t}return this},a.unicode=function(){var e=s.encode,t=s.decode;s.encode=g,s.decode=unescape;try{this.normalize()}finally{s.encode=e,s.decode=t}return this},a.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,a=t._parts.query.split("&"),i=a.length;o<i;o++){var c=(a[o]||"").split("=");n+="&"+s.decodeQuery(c[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==c[1]&&(n+="="+s.decodeQuery(c[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+s.decodeQuery(t.hash(),!0)},a.absoluteTo=function(e){var t,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof s||(e=new s(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=a[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},a.relativeTo=function(e){var t,r,n,o,a,i=this.clone().normalize();if(i._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new s(e).normalize(),t=i._parts,r=e._parts,o=i.path(),a=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return i.build();if(null!==t.protocol||null!==t.username||null!==t.password)return i.build();if(t.hostname!==r.hostname||t.port!==r.port)return i.build();if(t.hostname=null,t.port=null,o===a)return t.path="",i.build();if(!(n=s.commonPath(o,a)))return i.build();var c=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=c+t.path.substring(n.length)||"./",i.build()},a.equals=function(e){var t,r,n,o,a,c=this.clone(),l=new s(e),p={};if(c.normalize(),l.normalize(),c.toString()===l.toString())return!0;if(n=c.query(),o=l.query(),c.query(""),l.query(""),c.toString()!==l.toString())return!1;if(n.length!==o.length)return!1;for(a in t=s.parseQuery(n,this._parts.escapeQuerySpace),r=s.parseQuery(o,this._parts.escapeQuerySpace),t)if(i.call(t,a)){if(u(t[a])){if(!f(t[a],r[a]))return!1}else if(t[a]!==r[a])return!1;p[a]=!0}for(a in r)if(i.call(r,a)&&!p[a])return!1;return!0},a.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},a.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},a.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},s}))},2675:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,i=36,c=/^xn--/,l=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,f=String.fromCharCode;function h(e){throw new RangeError(p[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(u,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,s=e.length;o<s;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<s?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function v(e){return m(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+f(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=i)e=d(e/35);return d(n+36*e/(e+38))}function A(e){var t,r,n,o,s,c,l,u,p,f,m,g=[],y=e.length,b=0,A=128,$=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&h("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(s=b,c=1,l=i;o>=y&&h("invalid-input"),((u=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:i)>=i||u>d((a-b)/c))&&h("overflow"),b+=u*c,!(u<(p=l<=$?1:l>=$+26?26:l-$));l+=i)c>d(a/(f=i-p))&&h("overflow"),c*=f;$=w(b-s,t=g.length+1,0==s),d(b/t)>a-A&&h("overflow"),A+=d(b/t),b%=t,g.splice(b++,0,A)}return v(g)}function $(e){var t,r,n,o,s,c,l,u,p,m,g,v,A,$,E,T=[];for(v=(e=y(e)).length,t=128,r=0,s=72,c=0;c<v;++c)(g=e[c])<128&&T.push(f(g));for(n=o=T.length,o&&T.push("-");n<v;){for(l=a,c=0;c<v;++c)(g=e[c])>=t&&g<l&&(l=g);for(l-t>d((a-r)/(A=n+1))&&h("overflow"),r+=(l-t)*A,t=l,c=0;c<v;++c)if((g=e[c])<t&&++r>a&&h("overflow"),g==t){for(u=r,p=i;!(u<(m=p<=s?1:p>=s+26?26:p-s));p+=i)E=u-m,$=i-m,T.push(f(b(m+E%$,0))),u=d(E/$);T.push(f(b(u,0))),s=w(r,A,n==o),r=0,++n}++r,++t}return T.join("")}s={version:"1.3.2",ucs2:{decode:y,encode:v},decode:A,encode:$,toASCII:function(e){return g(e,(function(e){return l.test(e)?"xn--"+$(e):e}))},toUnicode:function(e){return g(e,(function(e){return c.test(e)?A(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},5237:(e,t,r)=>{"use strict";const n=r(3686),o=r(1861),s=r(5477),a=r(5430),i=r(4404),c=r(8088),l=r(9869),u=r(8058),p=r(953),d=r(6341),f=r(8171),h=r(7337),m=r(3218),g=r(745),y=r(7189),v=r(3135),b=r(8968),w=r(7046),A=r(9852),$=r(1529),E=r(2302),T=r(6099),C=r(6375),D=r(1976),F=r(516),I=r(2523),S=r(9259),N=r(6113),O=r(7755),M=r(1595),x=r(2438),k=r(4471),P=r(6226),L=r(9481),R=r(3673),_=r(1768),B=r(6803),j=r(6033),V=r(7624),U=r(7662),Q=r(3899),q=r(8330);e.exports={SecurityException:n,IllegalModelException:o,TypeNotFoundException:s,MetamodelException:a,Decorator:i,DecoratorFactory:c,DecoratorManager:j,ClassDeclaration:l,IdentifiedDeclaration:u,AssetDeclaration:p,ConceptDeclaration:d,EnumValueDeclaration:f,EventDeclaration:h,ParticipantDeclaration:m,TransactionDeclaration:g,ScalarDeclaration:y,MapDeclaration:v,MapKeyType:b,MapValueType:w,Property:A,Field:$,EnumDeclaration:E,RelationshipDeclaration:T,Validator:C,NumberValidator:D,StringValidator:F,Typed:I,Identifiable:S,Relationship:N,Resource:O,Factory:M,Globalize:x,Introspector:k,ModelFile:P,ModelManager:L,Serializer:R,ModelUtil:_,ModelLoader:B,DateTimeUtil:V,Concerto:U,MetaModel:Q,version:q}},7833:(e,t,r)=>{var n=r(9907);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(7250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},9967:(e,t,r)=>{var n,o=r(9907);self,n=()=>{return e={348:(e,t,r)=>{"use strict";const n=r(954),{DcsCto:o,DcsNamespace:s}=r(497);e.exports={MetaModelUtil:n,MetaModelNamespace:"concerto.metamodel@1.0.0",DcsCto:o,DcsNamespace:s}},497:e=>{"use strict";e.exports={DcsCto:'/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nnamespace org.accordproject.decoratorcommands@0.4.0\n\nimport concerto.metamodel@1.0.0.Decorator\n\n/**\n * A reference to an existing named & versioned DecoratorCommandSet\n */\nconcept DecoratorCommandSetReference {\n o String name\n o String version\n}\n\n/**\n * Whether to upsert or append the decorator\n */\nenum CommandType {\n o UPSERT\n o APPEND\n}\n\n/**\n * Which models elements to add the decorator to. Any null\n * elements are \'wildcards\'.\n */\nconcept CommandTarget {\n o String namespace optional\n o String declaration optional\n o String property optional\n o String[] properties optional // property and properties are mutually exclusive\n o String type optional\n o MapElement mapElement optional\n}\n\n/**\n * Map Declaration elements which might be used as a target\n */\nenum MapElement {\n o KEY\n o VALUE\n o KEY_VALUE\n}\n\n/**\n * Applies a decorator to a given target\n */\nconcept Command {\n o CommandTarget target\n o Decorator decorator\n o CommandType type\n o String decoratorNamespace optional\n}\n\n/**\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\n */\nconcept DecoratorCommandSet {\n o String name\n o String version\n o DecoratorCommandSetReference[] includes optional // not yet supported\n o Command[] commands\n}',DcsNamespace:"org.accordproject.decoratorcommands@0.4.0"}},702:e=>{"use strict";e.exports='/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace("AccordProject.Concerto.Metamodel")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n o String resolvedName optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapKeyType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapValueType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o MapValueType value\n}\n\nconcept StringMapKeyType extends MapKeyType {}\nconcept DateTimeMapKeyType extends MapKeyType {}\n\nconcept ObjectMapKeyType extends MapKeyType {\n o TypeIdentifier type\n}\n\nconcept BooleanMapValueType extends MapValueType {}\nconcept DateTimeMapValueType extends MapValueType {}\nconcept StringMapValueType extends MapValueType {}\nconcept IntegerMapValueType extends MapValueType {}\nconcept LongMapValueType extends MapValueType {}\nconcept DoubleMapValueType extends MapValueType {}\n\nconcept ObjectMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept RelationshipMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept StringLengthValidator {\n o Integer minLength optional\n o Integer maxLength optional\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nconcept AliasedType{\n o String name\n o String aliasedName\n}\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n o AliasedType[] aliasedTypes optional\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n o String namespace optional\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue optional\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n'},954:(e,t,r)=>{"use strict";const n=r(865),o="concerto.metamodel@1.0.0",s=r(702);function a(e,t){return e.declarations.find((e=>e.name===t))}function i(e,t){if(!t[e])throw new Error(`Name ${e} not found`);return t[e].namespace}function c(e,t){switch((e.decorators||[]).forEach((e=>{c(e,t)})),e.$class){case`${o}.Model`:(e.declarations||[]).forEach((e=>{c(e,t)}));break;case`${o}.EnumDeclaration`:case`${o}.AssetDeclaration`:case`${o}.ConceptDeclaration`:case`${o}.EventDeclaration`:case`${o}.TransactionDeclaration`:case`${o}.ParticipantDeclaration`:if(e.superType){const r=e.superType.name;e.superType.namespace=i(r,t),e.superType.name=t[r].name,t[r]?.resolvedName&&(e.superType.resolvedName=t[r].resolvedName)}(e.properties||[]).forEach((e=>{c(e,t)}));break;case`${o}.MapDeclaration`:c(e.key,t),c(e.value,t);break;case`${o}.Decorator`:(e.arguments||[]).forEach((e=>{c(e,t)}));break;case`${o}.ObjectProperty`:case`${o}.RelationshipProperty`:case`${o}.DecoratorTypeReference`:case`${o}.ObjectMapKeyType`:case`${o}.ObjectMapValueType`:case`${o}.RelationshipMapValueType`:e.type.namespace=i(e.type.name,t),e.type.name=t[e.type.name].name,t[e.type.name]?.resolvedName&&(e.type.resolvedName=t[e.type.name].resolvedName);break;case`${o}.StringScalar`:case`${o}.BooleanScalar`:case`${o}.DateTimeScalar`:case`${o}.DoubleScalar`:case`${o}.LongScalar`:case`${o}.IntegerScalar`:e.namespace=i(e.name,t),e.name=t[e.name].name}return e}function l(e,t){const r=JSON.parse(JSON.stringify(t)),n=function(e,t){const r="concerto@1.0.0",n={Concept:{namespace:r,name:"Concept"},Asset:{namespace:r,name:"Asset"},Participant:{namespace:r,name:"Participant"},Transaction:{namespace:r,name:"Transaction"},Event:{namespace:r,name:"Event"}};return(t.imports||[]).forEach((t=>{const r=t.namespace,s=function(e,t){return e.models.find((e=>e.namespace===t))}(e,r);if(t.$class===`${o}.ImportType`){if(!a(s,t.name))throw new Error(`Declaration ${t.name} in namespace ${r} not found`);n[t.name]={namespace:r,name:t.name}}else if(t.$class===`${o}.ImportTypes`){const e=t.aliasedTypes?new Map(t.aliasedTypes.map((({name:e,aliasedName:t})=>[e,t]))):new Map;t.types.forEach((t=>{const o=e.get(t)||t;if(!a(s,t))throw new Error(`Declaration ${t} in namespace ${r} not found`);n[o]=o!==t?{namespace:r,name:o,resolvedName:t}:{namespace:r,name:t}}))}else(s.declarations||[]).forEach((e=>{n[e.name]={namespace:r,name:e.name}}))})),(t.declarations||[]).forEach((e=>{n[e.name]={namespace:t.namespace,name:e.name}})),n}(e,t);return c(r,n),r}function u(e){const t=[];switch(e.$class){case`${o}.ImportAll`:t.push(`${e.namespace}.*`);break;case`${o}.ImportType`:t.push(`${e.namespace}.${e.name}`);break;case`${o}.ImportTypes`:e.types.forEach((r=>{t.push(`${e.namespace}.${r}`)}));break;default:throw new Error(`Unrecognized imports ${e.$class}`)}return t}e.exports={metaModelAst:n,metaModelCto:s,resolveLocalNames:l,resolveLocalNamesForAll:function(e){const t={$class:`${o}.Models`,models:[]};return e.models.forEach((r=>{const n=l(e,r);t.models.push(n)})),t},importFullyQualifiedNames:u,getExternalImports:function(e){const t={};return e.imports&&e.imports.forEach((e=>{const r=u(e);e.uri&&(t[r[0]]=e.uri)})),t}}},573:(e,t,r)=>{"use strict";const n=r(187);e.exports=n.PromisePool},160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(160);t.PromisePoolExecutor=class{constructor(){this.tasks=[],this.items=[],this.errors=[],this.results=[],this.concurrency=10,this.handler=()=>{},this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}for(e){return this.items=e,this}withHandler(e){return this.handler=e,this}handleError(e){return this.errorHandler=e,this}hasReachedConcurrencyLimit(){return this.activeCount()>=this.concurrency}activeCount(){return this.tasks.length}async start(){return this.validateInputs(),await this.process()}validateInputs(){if("function"!=typeof this.handler)throw new Error("The first parameter for the .process(fn) method must be a function");if(!("number"==typeof this.concurrency&&this.concurrency>=1))throw new TypeError(`"concurrency" must be a number, 1 or up. Received "${this.concurrency}" (${typeof this.concurrency})`);if(!Array.isArray(this.items))throw new TypeError('"items" must be an array. Received '+typeof this.items);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw new Error("The error handler must be a function. Received "+typeof this.errorHandler)}async process(){for(const e of this.items)this.hasReachedConcurrencyLimit()&&await this.processingSlot(),this.startProcessing(e);return this.drained()}async processingSlot(){return this.waitForTaskToFinish()}async waitForTaskToFinish(){await Promise.race(this.tasks)}startProcessing(e){const t=this.createTaskFor(e).then((e=>{this.results.push(e),this.tasks.splice(this.tasks.indexOf(t),1)})).catch((r=>{if(this.tasks.splice(this.tasks.indexOf(t),1),this.errorHandler)return this.errorHandler(r,e);this.errors.push(n.PromisePoolError.createFrom(r,e))}));this.tasks.push(t)}async createTaskFor(e){return this.handler(e)}async drained(){return await this.drainActiveTasks(),{results:this.results,errors:this.errors}}async drainActiveTasks(){await Promise.all(this.tasks)}}},187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(241);class o{constructor(e){this.concurrency=10,this.items=null!=e?e:[],this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}for(e){return new o(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}async process(e){return(new n.PromisePoolExecutor).withConcurrency(this.concurrency).withHandler(e).handleError(this.errorHandler).for(this.items).start()}}t.PromisePool=o},548:(e,t,r)=>{"use strict";const n=r(558),{DefaultFileLoader:o,FileDownloader:s}=r(20),a=r(833)("concerto:ModelManager"),i=r(206),{MetaModelUtil:c,MetaModelNamespace:l}=r(348);e.exports={resolveExternal:async function(e,t,r){a("updateExternalModels","updateExternalModels",t),r||(r=new s(new o(((e,t)=>{if(".cto"===n.extname(e))return i.parse(t);throw new Error("External model file references are expected to have a .cto extension")})),c.getExternalImports));const u=await r.downloadExternalDependencies(e.models,t);let p=e;return u.forEach((e=>{p=function(e,t){const r={$class:`${l}.Models`,models:[]},n=t.namespace,o=e.models;let s=!1;return o.forEach(((e,o)=>{e.namespace===n?(r.models.push(t),s=!0):r.models.push(e)})),s||r.models.push(t),r}(p,e)})),p}}},713:(e,t,r)=>{"use strict";const{BaseFileException:n}=r(20);e.exports=class extends n{constructor(e,t,r,n,o){let s=e,a="";r&&(a+=" File "+r),t&&(t.end&&t.start&&t.end.offset&&t.start.offset&&t.end.offset-t.start.offset==1&&(t.end.column=t.start.column,t.end.offset=t.start.offset),a+=a?" line "+t.start.line+" column "+t.start.column:" Line "+t.start.line+" column "+t.start.column),s+=a,super(e,t,n||s,r,o)}}},206:e=>{"use strict";function t(e,r,n,o){var s=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(s,t.prototype),s.expected=r,s.found=n,s.location=o,s.name="SyntaxError",s}function r(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){o=e[n].text.split(/\r\n|\n|\r/g);break}var s=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,i=this.location.source+":"+a.line+":"+a.column;if(o){var c=this.location.end,l=r("",a.line.toString().length," "),u=o[s.line-1],p=(s.line===c.line?c.column:u.length+1)-s.column||1;t+="\n --\x3e "+i+"\n"+l+" |\n"+a.line+" | "+u+"\n"+l+" | "+r("",s.column-1," ")+r("",p,"^")}else t+="\n at "+i}return t},t.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(a);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},e.exports={StartRules:["Start"],SyntaxError:t,parse:function(e,r){var n,o={},s=(r=void 0!==r?r:{}).grammarSource,a={Start:Ns},i=Ns,c="\n",l="\r\n",u="/*",p="*/",d="//",f="\\",h=".",m="0",g="e",y="0x",v='"',b="'",w="b",A="f",$="n",E="r",T="t",C="v",D="x",F="u",I="/",S="[",N="]",O="enum",M="map",x="false",k="import",P="true",L="as",R="}",_="%",B=":",j="?",V="#",U="@",Q="::",q="25",K="2",z="1",W="-",H="+",G="concerto",Y="version",J="namespace",X="abstract",Z="concept",ee="asset",te="transaction",re="event",ne="participant",oe="scalar",se="from",ae="*",ie="Integer",ce="Double",le="Long",ue="String",pe="DateTime",de="Boolean",fe="identified by",he="identified",me="[]",ge="(",ye=",",ve=")",be="extends",we="{",Ae="optional",$e="default",Ee="=",Te="o",Ce="regex",De="length",Fe="range",Ie="--\x3e",Se=".{",Ne=/^[\t\v-\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/,Oe=/^[\n\r\u2028\u2029]/,Me=/^[\r\u2028-\u2029]/,xe=/^[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u09FC\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60-\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD-\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0-\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD-\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,ke=/^[0-9_\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7\u09E2-\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2-\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62-\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B-\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62-\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18-\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1885-\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19D9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C-\u200D\u203F-\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099-\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880-\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C-\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5-\uAAF6\uABE3-\uABEA\uABEC-\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33-\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/,Pe=/^[+\-]/,Le=/^[0-9]/,Re=/^[1-9]/,_e=/^[0-9a-f]/i,Be=/^[\n\r"\\\u2028-\u2029]/,je=/^[\n\r'\\\u2028-\u2029]/,Ve=/^["'\\]/,Ue=/^[0-9ux]/,Qe=/^[*\\\/[]/,qe=/^[\\\/[]/,Ke=/^[\]\\]/,ze=/^[A-Za-z]/,We=/^[A-F]/i,He=/^[\--.0-9A-Z_a-z~]/,Ge=/^[+\--.0-9A-Za-z]/,Ye=/^[!$&-,:-;=]/,Je=/^[\--.0-:A-Z_a-z~]/,Xe=/^[0-5]/,Ze=/^[0-4]/,et=/^[!$&-,:-;=@]/,tt=/^[\/?]/,rt=/^[a-z0-9\-]/i,nt=/^[a-z\-]/i,ot={type:"any"},st=Ds("whitespace"),at=Cs(["\t",["\v","\f"]," "," "," ",[" "," "]," "," "," ","\ufeff"],!1,!1),it=Cs(["\n","\r","\u2028","\u2029"],!1,!1),ct=Ds("end of line"),lt=Ts("\n",!1),ut=Ts("\r\n",!1),pt=Cs(["\r",["\u2028","\u2029"]],!1,!1),dt=Ds("comment"),ft=Ts("/*",!1),ht=Ts("*/",!1),mt=Ts("//",!1),gt=Ds("identifier"),yt=Cs(["$",["A","Z"],"_",["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],["Ͷ","ͷ"],["ͺ","ͽ"],"Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԯ"],["Ա","Ֆ"],"ՙ",["ՠ","ֈ"],["א","ת"],["ׯ","ײ"],["ؠ","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۥ","ۦ"],["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ߴ","ߵ"],"ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],["ࡠ","ࡪ"],["ࡰ","ࢇ"],["ࢉ","ࢎ"],["ࢠ","ࣉ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],"ৼ",["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],"ౝ",["ౠ","ౡ"],"ಀ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ",["ೝ","ೞ"],["ೠ","ೡ"],["ೱ","ೲ"],["ഄ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൔ","ൖ"],["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๆ"],["ກ","ຂ"],"ຄ",["ຆ","ຊ"],["ຌ","ຣ"],"ລ",["ວ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏽ"],["ᏸ","ᏽ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛮ","ᛸ"],["ᜀ","ᜑ"],["ᜟ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡸ"],["ᢀ","ᢄ"],["ᢇ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭌ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᲀ","ᲈ"],["Ა","Ჺ"],["Ჽ","Ჿ"],["ᳩ","ᳬ"],["ᳮ","ᳳ"],["ᳵ","ᳶ"],"ᳺ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ",["Ⅰ","ↈ"],["Ⰰ","ⳤ"],["Ⳬ","ⳮ"],["Ⳳ","ⳳ"],["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ",["々","〇"],["〡","〩"],["〱","〵"],["〸","〼"],["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄯ"],["ㄱ","ㆎ"],["ㆠ","ㆿ"],["ㇰ","ㇿ"],["㐀","䶿"],["一","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],["Ꙁ","ꙮ"],["ꙿ","ꚝ"],["ꚠ","ꛯ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꟊ"],["Ꟑ","ꟑ"],"ꟓ",["ꟕ","ꟙ"],["ꟲ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꣽ","ꣾ"],["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꧠ","ꧤ"],["ꧦ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꬰ","ꭚ"],["ꭜ","ꭩ"],["ꭰ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),vt=Ts("\\",!1),bt=Cs([["0","9"],"_",["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","٩"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],["۰","۹"],"ܑ",["ܰ","݊"],["ަ","ް"],["߀","߉"],["߫","߳"],"߽",["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["࢘","࢟"],["࣊","࣡"],["ࣣ","ः"],["ऺ","़"],["ा","ॏ"],["॑","ॗ"],["ॢ","ॣ"],["०","९"],["ঁ","ঃ"],"়",["া","ৄ"],["ে","ৈ"],["ো","্"],"ৗ",["ৢ","ৣ"],["০","৯"],"৾",["ਁ","ਃ"],"਼",["ਾ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["੦","ੱ"],"ੵ",["ઁ","ઃ"],"઼",["ા","ૅ"],["ે","ૉ"],["ો","્"],["ૢ","ૣ"],["૦","૯"],["ૺ","૿"],["ଁ","ଃ"],"଼",["ା","ୄ"],["େ","ୈ"],["ୋ","୍"],["୕","ୗ"],["ୢ","ୣ"],["୦","୯"],"ஂ",["ா","ூ"],["ெ","ை"],["ொ","்"],"ௗ",["௦","௯"],["ఀ","ఄ"],"఼",["ా","ౄ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],["౦","౯"],["ಁ","ಃ"],"಼",["ಾ","ೄ"],["ೆ","ೈ"],["ೊ","್"],["ೕ","ೖ"],["ೢ","ೣ"],["೦","೯"],"ೳ",["ഀ","ഃ"],["഻","഼"],["ാ","ൄ"],["െ","ൈ"],["ൊ","്"],"ൗ",["ൢ","ൣ"],["൦","൯"],["ඁ","ඃ"],"්",["ා","ු"],"ූ",["ෘ","ෟ"],["෦","෯"],["ෲ","ෳ"],"ั",["ิ","ฺ"],["็","๎"],["๐","๙"],"ັ",["ິ","ຼ"],["່","໎"],["໐","໙"],["༘","༙"],["༠","༩"],"༵","༷","༹",["༾","༿"],["ཱ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ါ","ှ"],["၀","၉"],["ၖ","ၙ"],["ၞ","ၠ"],["ၢ","ၤ"],["ၧ","ၭ"],["ၱ","ၴ"],["ႂ","ႍ"],["ႏ","ႝ"],["፝","፟"],["ᜒ","᜕"],["ᜲ","᜴"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["឴","៓"],"៝",["០","៩"],["᠋","᠍"],["᠏","᠙"],["ᢅ","ᢆ"],"ᢩ",["ᤠ","ᤫ"],["ᤰ","᤻"],["᥆","᥏"],["᧐","᧙"],["ᨗ","ᨛ"],["ᩕ","ᩞ"],["᩠","᩼"],["᩿","᪉"],["᪐","᪙"],["᪰","᪽"],["ᪿ","ᫎ"],["ᬀ","ᬄ"],["᬴","᭄"],["᭐","᭙"],["᭫","᭳"],["ᮀ","ᮂ"],["ᮡ","ᮭ"],["᮰","᮹"],["᯦","᯳"],["ᰤ","᰷"],["᱀","᱉"],["᱐","᱙"],["᳐","᳒"],["᳔","᳨"],"᳭","᳴",["᳷","᳹"],["᷀","᷿"],["‌","‍"],["‿","⁀"],"⁔",["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〯"],["゙","゚"],["꘠","꘩"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠣ","ꠧ"],"꠬",["ꢀ","ꢁ"],["ꢴ","ꣅ"],["꣐","꣙"],["꣠","꣱"],["ꣿ","꤉"],["ꤦ","꤭"],["ꥇ","꥓"],["ꦀ","ꦃ"],["꦳","꧀"],["꧐","꧙"],"ꧥ",["꧰","꧹"],["ꨩ","ꨶ"],"ꩃ",["ꩌ","ꩍ"],["꩐","꩙"],["ꩻ","ꩽ"],"ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫫ","ꫯ"],["ꫵ","꫶"],["ꯣ","ꯪ"],["꯬","꯭"],["꯰","꯹"],"ﬞ",["︀","️"],["︠","︯"],["︳","︴"],["﹍","﹏"],["0","9"],"_"],!1,!1),wt=(Cs([["A","Z"],["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],["Ͷ","ͷ"],["ͺ","ͽ"],"Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԯ"],["Ա","Ֆ"],"ՙ",["ՠ","ֈ"],["א","ת"],["ׯ","ײ"],["ؠ","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۥ","ۦ"],["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ߴ","ߵ"],"ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],["ࡠ","ࡪ"],["ࡰ","ࢇ"],["ࢉ","ࢎ"],["ࢠ","ࣉ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],"ৼ",["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],"ౝ",["ౠ","ౡ"],"ಀ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ",["ೝ","ೞ"],["ೠ","ೡ"],["ೱ","ೲ"],["ഄ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൔ","ൖ"],["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๆ"],["ກ","ຂ"],"ຄ",["ຆ","ຊ"],["ຌ","ຣ"],"ລ",["ວ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏽ"],["ᏸ","ᏽ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛮ","ᛸ"],["ᜀ","ᜑ"],["ᜟ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡸ"],["ᢀ","ᢄ"],["ᢇ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭌ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᲀ","ᲈ"],["Ა","Ჺ"],["Ჽ","Ჿ"],["ᳩ","ᳬ"],["ᳮ","ᳳ"],["ᳵ","ᳶ"],"ᳺ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ",["Ⅰ","ↈ"],["Ⰰ","ⳤ"],["Ⳬ","ⳮ"],["Ⳳ","ⳳ"],["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ",["々","〇"],["〡","〩"],["〱","〵"],["〸","〼"],["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄯ"],["ㄱ","ㆎ"],["ㆠ","ㆿ"],["ㇰ","ㇿ"],["㐀","䶿"],["一","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],["Ꙁ","ꙮ"],["ꙿ","ꚝ"],["ꚠ","ꛯ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꟊ"],["Ꟑ","ꟑ"],"ꟓ",["ꟕ","ꟙ"],["ꟲ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꣽ","ꣾ"],["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꧠ","ꧤ"],["ꧦ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꬰ","ꭚ"],["ꭜ","ꭩ"],["ꭰ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Cs([["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","ٟ"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],"ܑ",["ܰ","݊"],["ަ","ް"],["߫","߳"],"߽",["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["࢘","࢟"],["࣊","࣡"],["ࣣ","ः"],["ऺ","़"],["ा","ॏ"],["॑","ॗ"],["ॢ","ॣ"],["ঁ","ঃ"],"়",["া","ৄ"],["ে","ৈ"],["ো","্"],"ৗ",["ৢ","ৣ"],"৾",["ਁ","ਃ"],"਼",["ਾ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["ੰ","ੱ"],"ੵ",["ઁ","ઃ"],"઼",["ા","ૅ"],["ે","ૉ"],["ો","્"],["ૢ","ૣ"],["ૺ","૿"],["ଁ","ଃ"],"଼",["ା","ୄ"],["େ","ୈ"],["ୋ","୍"],["୕","ୗ"],["ୢ","ୣ"],"ஂ",["ா","ூ"],["ெ","ை"],["ொ","்"],"ௗ",["ఀ","ఄ"],"఼",["ా","ౄ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],["ಁ","ಃ"],"಼",["ಾ","ೄ"],["ೆ","ೈ"],["ೊ","್"],["ೕ","ೖ"],["ೢ","ೣ"],"ೳ",["ഀ","ഃ"],["഻","഼"],["ാ","ൄ"],["െ","ൈ"],["ൊ","്"],"ൗ",["ൢ","ൣ"],["ඁ","ඃ"],"්",["ා","ු"],"ූ",["ෘ","ෟ"],["ෲ","ෳ"],"ั",["ิ","ฺ"],["็","๎"],"ັ",["ິ","ຼ"],["່","໎"],["༘","༙"],"༵","༷","༹",["༾","༿"],["ཱ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ါ","ှ"],["ၖ","ၙ"],["ၞ","ၠ"],["ၢ","ၤ"],["ၧ","ၭ"],["ၱ","ၴ"],["ႂ","ႍ"],"ႏ",["ႚ","ႝ"],["፝","፟"],["ᜒ","᜕"],["ᜲ","᜴"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["឴","៓"],"៝",["᠋","᠍"],"᠏",["ᢅ","ᢆ"],"ᢩ",["ᤠ","ᤫ"],["ᤰ","᤻"],["ᨗ","ᨛ"],["ᩕ","ᩞ"],["᩠","᩼"],"᩿",["᪰","᪽"],["ᪿ","ᫎ"],["ᬀ","ᬄ"],["᬴","᭄"],["᭫","᭳"],["ᮀ","ᮂ"],["ᮡ","ᮭ"],["᯦","᯳"],["ᰤ","᰷"],["᳐","᳒"],["᳔","᳨"],"᳭","᳴",["᳷","᳹"],["᷀","᷿"],["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〯"],["゙","゚"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠣ","ꠧ"],"꠬",["ꢀ","ꢁ"],["ꢴ","ꣅ"],["꣠","꣱"],"ꣿ",["ꤦ","꤭"],["ꥇ","꥓"],["ꦀ","ꦃ"],["꦳","꧀"],"ꧥ",["ꨩ","ꨶ"],"ꩃ",["ꩌ","ꩍ"],["ꩻ","ꩽ"],"ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫫ","ꫯ"],["ꫵ","꫶"],["ꯣ","ꯪ"],["꯬","꯭"],"ﬞ",["︀","️"],["︠","︯"]],!1,!1),Ds("number")),At=Ts(".",!1),$t=Cs(["+","-"],!1,!1),Et=Ts("0",!1),Tt=Cs([["0","9"]],!1,!1),Ct=Cs([["1","9"]],!1,!1),Dt=Ts("e",!0),Ft=Ts("0x",!0),It=Cs([["0","9"],["a","f"]],!1,!0),St=Ds("string"),Nt=Ts('"',!1),Ot=Ts("'",!1),Mt=Cs(["\n","\r",'"',"\\",["\u2028","\u2029"]],!1,!1),xt=Cs(["\n","\r","'","\\",["\u2028","\u2029"]],!1,!1),kt=Cs(['"',"'","\\"],!1,!1),Pt=Ts("b",!1),Lt=Ts("f",!1),Rt=Ts("n",!1),_t=Ts("r",!1),Bt=Ts("t",!1),jt=Ts("v",!1),Vt=Cs([["0","9"],"u","x"],!1,!1),Ut=Ts("x",!1),Qt=Ts("u",!1),qt=Ds("regular expression"),Kt=Ts("/",!1),zt=Cs(["*","\\","/","["],!1,!1),Wt=Cs(["\\","/","["],!1,!1),Ht=Ts("[",!1),Gt=Ts("]",!1),Yt=Cs(["]","\\"],!1,!1),Jt=(Cs([["a","z"],"µ",["ß","ö"],["ø","ÿ"],"ā","ă","ą","ć","ĉ","ċ","č","ď","đ","ē","ĕ","ė","ę","ě","ĝ","ğ","ġ","ģ","ĥ","ħ","ĩ","ī","ĭ","į","ı","ij","ĵ",["ķ","ĸ"],"ĺ","ļ","ľ","ŀ","ł","ń","ņ",["ň","ʼn"],"ŋ","ō","ŏ","ő","œ","ŕ","ŗ","ř","ś","ŝ","ş","š","ţ","ť","ŧ","ũ","ū","ŭ","ů","ű","ų","ŵ","ŷ","ź","ż",["ž","ƀ"],"ƃ","ƅ","ƈ",["ƌ","ƍ"],"ƒ","ƕ",["ƙ","ƛ"],"ƞ","ơ","ƣ","ƥ","ƨ",["ƪ","ƫ"],"ƭ","ư","ƴ","ƶ",["ƹ","ƺ"],["ƽ","ƿ"],"dž","lj","nj","ǎ","ǐ","ǒ","ǔ","ǖ","ǘ","ǚ",["ǜ","ǝ"],"ǟ","ǡ","ǣ","ǥ","ǧ","ǩ","ǫ","ǭ",["ǯ","ǰ"],"dz","ǵ","ǹ","ǻ","ǽ","ǿ","ȁ","ȃ","ȅ","ȇ","ȉ","ȋ","ȍ","ȏ","ȑ","ȓ","ȕ","ȗ","ș","ț","ȝ","ȟ","ȡ","ȣ","ȥ","ȧ","ȩ","ȫ","ȭ","ȯ","ȱ",["ȳ","ȹ"],"ȼ",["ȿ","ɀ"],"ɂ","ɇ","ɉ","ɋ","ɍ",["ɏ","ʓ"],["ʕ","ʯ"],"ͱ","ͳ","ͷ",["ͻ","ͽ"],"ΐ",["ά","ώ"],["ϐ","ϑ"],["ϕ","ϗ"],"ϙ","ϛ","ϝ","ϟ","ϡ","ϣ","ϥ","ϧ","ϩ","ϫ","ϭ",["ϯ","ϳ"],"ϵ","ϸ",["ϻ","ϼ"],["а","џ"],"ѡ","ѣ","ѥ","ѧ","ѩ","ѫ","ѭ","ѯ","ѱ","ѳ","ѵ","ѷ","ѹ","ѻ","ѽ","ѿ","ҁ","ҋ","ҍ","ҏ","ґ","ғ","ҕ","җ","ҙ","қ","ҝ","ҟ","ҡ","ң","ҥ","ҧ","ҩ","ҫ","ҭ","ү","ұ","ҳ","ҵ","ҷ","ҹ","һ","ҽ","ҿ","ӂ","ӄ","ӆ","ӈ","ӊ","ӌ",["ӎ","ӏ"],"ӑ","ӓ","ӕ","ӗ","ә","ӛ","ӝ","ӟ","ӡ","ӣ","ӥ","ӧ","ө","ӫ","ӭ","ӯ","ӱ","ӳ","ӵ","ӷ","ӹ","ӻ","ӽ","ӿ","ԁ","ԃ","ԅ","ԇ","ԉ","ԋ","ԍ","ԏ","ԑ","ԓ","ԕ","ԗ","ԙ","ԛ","ԝ","ԟ","ԡ","ԣ","ԥ","ԧ","ԩ","ԫ","ԭ","ԯ",["ՠ","ֈ"],["ა","ჺ"],["ჽ","ჿ"],["ᏸ","ᏽ"],["ᲀ","ᲈ"],["ᴀ","ᴫ"],["ᵫ","ᵷ"],["ᵹ","ᶚ"],"ḁ","ḃ","ḅ","ḇ","ḉ","ḋ","ḍ","ḏ","ḑ","ḓ","ḕ","ḗ","ḙ","ḛ","ḝ","ḟ","ḡ","ḣ","ḥ","ḧ","ḩ","ḫ","ḭ","ḯ","ḱ","ḳ","ḵ","ḷ","ḹ","ḻ","ḽ","ḿ","ṁ","ṃ","ṅ","ṇ","ṉ","ṋ","ṍ","ṏ","ṑ","ṓ","ṕ","ṗ","ṙ","ṛ","ṝ","ṟ","ṡ","ṣ","ṥ","ṧ","ṩ","ṫ","ṭ","ṯ","ṱ","ṳ","ṵ","ṷ","ṹ","ṻ","ṽ","ṿ","ẁ","ẃ","ẅ","ẇ","ẉ","ẋ","ẍ","ẏ","ẑ","ẓ",["ẕ","ẝ"],"ẟ","ạ","ả","ấ","ầ","ẩ","ẫ","ậ","ắ","ằ","ẳ","ẵ","ặ","ẹ","ẻ","ẽ","ế","ề","ể","ễ","ệ","ỉ","ị","ọ","ỏ","ố","ồ","ổ","ỗ","ộ","ớ","ờ","ở","ỡ","ợ","ụ","ủ","ứ","ừ","ử","ữ","ự","ỳ","ỵ","ỷ","ỹ","ỻ","ỽ",["ỿ","ἇ"],["ἐ","ἕ"],["ἠ","ἧ"],["ἰ","ἷ"],["ὀ","ὅ"],["ὐ","ὗ"],["ὠ","ὧ"],["ὰ","ώ"],["ᾀ","ᾇ"],["ᾐ","ᾗ"],["ᾠ","ᾧ"],["ᾰ","ᾴ"],["ᾶ","ᾷ"],"ι",["ῂ","ῄ"],["ῆ","ῇ"],["ῐ","ΐ"],["ῖ","ῗ"],["ῠ","ῧ"],["ῲ","ῴ"],["ῶ","ῷ"],"ℊ",["ℎ","ℏ"],"ℓ","ℯ","ℴ","ℹ",["ℼ","ℽ"],["ⅆ","ⅉ"],"ⅎ","ↄ",["ⰰ","ⱟ"],"ⱡ",["ⱥ","ⱦ"],"ⱨ","ⱪ","ⱬ","ⱱ",["ⱳ","ⱴ"],["ⱶ","ⱻ"],"ⲁ","ⲃ","ⲅ","ⲇ","ⲉ","ⲋ","ⲍ","ⲏ","ⲑ","ⲓ","ⲕ","ⲗ","ⲙ","ⲛ","ⲝ","ⲟ","ⲡ","ⲣ","ⲥ","ⲧ","ⲩ","ⲫ","ⲭ","ⲯ","ⲱ","ⲳ","ⲵ","ⲷ","ⲹ","ⲻ","ⲽ","ⲿ","ⳁ","ⳃ","ⳅ","ⳇ","ⳉ","ⳋ","ⳍ","ⳏ","ⳑ","ⳓ","ⳕ","ⳗ","ⳙ","ⳛ","ⳝ","ⳟ","ⳡ",["ⳣ","ⳤ"],"ⳬ","ⳮ","ⳳ",["ⴀ","ⴥ"],"ⴧ","ⴭ","ꙁ","ꙃ","ꙅ","ꙇ","ꙉ","ꙋ","ꙍ","ꙏ","ꙑ","ꙓ","ꙕ","ꙗ","ꙙ","ꙛ","ꙝ","ꙟ","ꙡ","ꙣ","ꙥ","ꙧ","ꙩ","ꙫ","ꙭ","ꚁ","ꚃ","ꚅ","ꚇ","ꚉ","ꚋ","ꚍ","ꚏ","ꚑ","ꚓ","ꚕ","ꚗ","ꚙ","ꚛ","ꜣ","ꜥ","ꜧ","ꜩ","ꜫ","ꜭ",["ꜯ","ꜱ"],"ꜳ","ꜵ","ꜷ","ꜹ","ꜻ","ꜽ","ꜿ","ꝁ","ꝃ","ꝅ","ꝇ","ꝉ","ꝋ","ꝍ","ꝏ","ꝑ","ꝓ","ꝕ","ꝗ","ꝙ","ꝛ","ꝝ","ꝟ","ꝡ","ꝣ","ꝥ","ꝧ","ꝩ","ꝫ","ꝭ","ꝯ",["ꝱ","ꝸ"],"ꝺ","ꝼ","ꝿ","ꞁ","ꞃ","ꞅ","ꞇ","ꞌ","ꞎ","ꞑ",["ꞓ","ꞕ"],"ꞗ","ꞙ","ꞛ","ꞝ","ꞟ","ꞡ","ꞣ","ꞥ","ꞧ","ꞩ","ꞯ","ꞵ","ꞷ","ꞹ","ꞻ","ꞽ","ꞿ","ꟁ","ꟃ","ꟈ","ꟊ","ꟑ","ꟓ","ꟕ","ꟗ","ꟙ","ꟶ","ꟺ",["ꬰ","ꭚ"],["ꭠ","ꭨ"],["ꭰ","ꮿ"],["ff","st"],["ﬓ","ﬗ"],["a","z"]],!1,!1),Cs([["ʰ","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ","ʹ","ͺ","ՙ","ـ",["ۥ","ۦ"],["ߴ","ߵ"],"ߺ","ࠚ","ࠤ","ࠨ","ࣉ","ॱ","ๆ","ໆ","ჼ","ៗ","ᡃ","ᪧ",["ᱸ","ᱽ"],["ᴬ","ᵪ"],"ᵸ",["ᶛ","ᶿ"],"ⁱ","ⁿ",["ₐ","ₜ"],["ⱼ","ⱽ"],"ⵯ","ⸯ","々",["〱","〵"],"〻",["ゝ","ゞ"],["ー","ヾ"],"ꀕ",["ꓸ","ꓽ"],"ꘌ","ꙿ",["ꚜ","ꚝ"],["ꜗ","ꜟ"],"ꝰ","ꞈ",["ꟲ","ꟴ"],["ꟸ","ꟹ"],"ꧏ","ꧦ","ꩰ","ꫝ",["ꫳ","ꫴ"],["ꭜ","ꭟ"],"ꭩ","ー",["゙","゚"]],!1,!1),Cs(["ª","º","ƻ",["ǀ","ǃ"],"ʔ",["א","ת"],["ׯ","ײ"],["ؠ","ؿ"],["ف","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ࠀ","ࠕ"],["ࡀ","ࡘ"],["ࡠ","ࡪ"],["ࡰ","ࢇ"],["ࢉ","ࢎ"],["ࢠ","ࣈ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॲ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],"ৼ",["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],"ౝ",["ౠ","ౡ"],"ಀ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ",["ೝ","ೞ"],["ೠ","ೡ"],["ೱ","ೲ"],["ഄ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൔ","ൖ"],["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๅ"],["ກ","ຂ"],"ຄ",["ຆ","ຊ"],["ຌ","ຣ"],"ລ",["ວ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["ᄀ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛱ","ᛸ"],["ᜀ","ᜑ"],["ᜟ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៜ",["ᠠ","ᡂ"],["ᡄ","ᡸ"],["ᢀ","ᢄ"],["ᢇ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],["ᬅ","ᬳ"],["ᭅ","ᭌ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱷ"],["ᳩ","ᳬ"],["ᳮ","ᳳ"],["ᳵ","ᳶ"],"ᳺ",["ℵ","ℸ"],["ⴰ","ⵧ"],["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"〆","〼",["ぁ","ゖ"],"ゟ",["ァ","ヺ"],"ヿ",["ㄅ","ㄯ"],["ㄱ","ㆎ"],["ㆠ","ㆿ"],["ㇰ","ㇿ"],["㐀","䶿"],["一","ꀔ"],["ꀖ","ꒌ"],["ꓐ","ꓷ"],["ꔀ","ꘋ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],"ꙮ",["ꚠ","ꛥ"],"ꞏ","ꟷ",["ꟻ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꣽ","ꣾ"],["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],["ꧠ","ꧤ"],["ꧧ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩯ"],["ꩱ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫜ"],["ꫠ","ꫪ"],"ꫲ",["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꯀ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["ヲ","ッ"],["ア","ン"],["ᅠ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Cs(["Dž","Lj","Nj","Dz",["ᾈ","ᾏ"],["ᾘ","ᾟ"],["ᾨ","ᾯ"],"ᾼ","ῌ","ῼ"],!1,!1),Cs([["A","Z"],["À","Ö"],["Ø","Þ"],"Ā","Ă","Ą","Ć","Ĉ","Ċ","Č","Ď","Đ","Ē","Ĕ","Ė","Ę","Ě","Ĝ","Ğ","Ġ","Ģ","Ĥ","Ħ","Ĩ","Ī","Ĭ","Į","İ","IJ","Ĵ","Ķ","Ĺ","Ļ","Ľ","Ŀ","Ł","Ń","Ņ","Ň","Ŋ","Ō","Ŏ","Ő","Œ","Ŕ","Ŗ","Ř","Ś","Ŝ","Ş","Š","Ţ","Ť","Ŧ","Ũ","Ū","Ŭ","Ů","Ű","Ų","Ŵ","Ŷ",["Ÿ","Ź"],"Ż","Ž",["Ɓ","Ƃ"],"Ƅ",["Ɔ","Ƈ"],["Ɖ","Ƌ"],["Ǝ","Ƒ"],["Ɠ","Ɣ"],["Ɩ","Ƙ"],["Ɯ","Ɲ"],["Ɵ","Ơ"],"Ƣ","Ƥ",["Ʀ","Ƨ"],"Ʃ","Ƭ",["Ʈ","Ư"],["Ʊ","Ƴ"],"Ƶ",["Ʒ","Ƹ"],"Ƽ","DŽ","LJ","NJ","Ǎ","Ǐ","Ǒ","Ǔ","Ǖ","Ǘ","Ǚ","Ǜ","Ǟ","Ǡ","Ǣ","Ǥ","Ǧ","Ǩ","Ǫ","Ǭ","Ǯ","DZ","Ǵ",["Ƕ","Ǹ"],"Ǻ","Ǽ","Ǿ","Ȁ","Ȃ","Ȅ","Ȇ","Ȉ","Ȋ","Ȍ","Ȏ","Ȑ","Ȓ","Ȕ","Ȗ","Ș","Ț","Ȝ","Ȟ","Ƞ","Ȣ","Ȥ","Ȧ","Ȩ","Ȫ","Ȭ","Ȯ","Ȱ","Ȳ",["Ⱥ","Ȼ"],["Ƚ","Ⱦ"],"Ɂ",["Ƀ","Ɇ"],"Ɉ","Ɋ","Ɍ","Ɏ","Ͱ","Ͳ","Ͷ","Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ώ"],["Α","Ρ"],["Σ","Ϋ"],"Ϗ",["ϒ","ϔ"],"Ϙ","Ϛ","Ϝ","Ϟ","Ϡ","Ϣ","Ϥ","Ϧ","Ϩ","Ϫ","Ϭ","Ϯ","ϴ","Ϸ",["Ϲ","Ϻ"],["Ͻ","Я"],"Ѡ","Ѣ","Ѥ","Ѧ","Ѩ","Ѫ","Ѭ","Ѯ","Ѱ","Ѳ","Ѵ","Ѷ","Ѹ","Ѻ","Ѽ","Ѿ","Ҁ","Ҋ","Ҍ","Ҏ","Ґ","Ғ","Ҕ","Җ","Ҙ","Қ","Ҝ","Ҟ","Ҡ","Ң","Ҥ","Ҧ","Ҩ","Ҫ","Ҭ","Ү","Ұ","Ҳ","Ҵ","Ҷ","Ҹ","Һ","Ҽ","Ҿ",["Ӏ","Ӂ"],"Ӄ","Ӆ","Ӈ","Ӊ","Ӌ","Ӎ","Ӑ","Ӓ","Ӕ","Ӗ","Ә","Ӛ","Ӝ","Ӟ","Ӡ","Ӣ","Ӥ","Ӧ","Ө","Ӫ","Ӭ","Ӯ","Ӱ","Ӳ","Ӵ","Ӷ","Ӹ","Ӻ","Ӽ","Ӿ","Ԁ","Ԃ","Ԅ","Ԇ","Ԉ","Ԋ","Ԍ","Ԏ","Ԑ","Ԓ","Ԕ","Ԗ","Ԙ","Ԛ","Ԝ","Ԟ","Ԡ","Ԣ","Ԥ","Ԧ","Ԩ","Ԫ","Ԭ","Ԯ",["Ա","Ֆ"],["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["Ꭰ","Ᏽ"],["Ა","Ჺ"],["Ჽ","Ჿ"],"Ḁ","Ḃ","Ḅ","Ḇ","Ḉ","Ḋ","Ḍ","Ḏ","Ḑ","Ḓ","Ḕ","Ḗ","Ḙ","Ḛ","Ḝ","Ḟ","Ḡ","Ḣ","Ḥ","Ḧ","Ḩ","Ḫ","Ḭ","Ḯ","Ḱ","Ḳ","Ḵ","Ḷ","Ḹ","Ḻ","Ḽ","Ḿ","Ṁ","Ṃ","Ṅ","Ṇ","Ṉ","Ṋ","Ṍ","Ṏ","Ṑ","Ṓ","Ṕ","Ṗ","Ṙ","Ṛ","Ṝ","Ṟ","Ṡ","Ṣ","Ṥ","Ṧ","Ṩ","Ṫ","Ṭ","Ṯ","Ṱ","Ṳ","Ṵ","Ṷ","Ṹ","Ṻ","Ṽ","Ṿ","Ẁ","Ẃ","Ẅ","Ẇ","Ẉ","Ẋ","Ẍ","Ẏ","Ẑ","Ẓ","Ẕ","ẞ","Ạ","Ả","Ấ","Ầ","Ẩ","Ẫ","Ậ","Ắ","Ằ","Ẳ","Ẵ","Ặ","Ẹ","Ẻ","Ẽ","Ế","Ề","Ể","Ễ","Ệ","Ỉ","Ị","Ọ","Ỏ","Ố","Ồ","Ổ","Ỗ","Ộ","Ớ","Ờ","Ở","Ỡ","Ợ","Ụ","Ủ","Ứ","Ừ","Ử","Ữ","Ự","Ỳ","Ỵ","Ỷ","Ỹ","Ỻ","Ỽ","Ỿ",["Ἀ","Ἇ"],["Ἐ","Ἕ"],["Ἠ","Ἧ"],["Ἰ","Ἷ"],["Ὀ","Ὅ"],"Ὑ","Ὓ","Ὕ","Ὗ",["Ὠ","Ὧ"],["Ᾰ","Ά"],["Ὲ","Ή"],["Ῐ","Ί"],["Ῠ","Ῥ"],["Ὸ","Ώ"],"ℂ","ℇ",["ℋ","ℍ"],["ℐ","ℒ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℰ","ℳ"],["ℾ","ℿ"],"ⅅ","Ↄ",["Ⰰ","Ⱟ"],"Ⱡ",["Ɫ","Ɽ"],"Ⱨ","Ⱪ","Ⱬ",["Ɑ","Ɒ"],"Ⱳ","Ⱶ",["Ȿ","Ⲁ"],"Ⲃ","Ⲅ","Ⲇ","Ⲉ","Ⲋ","Ⲍ","Ⲏ","Ⲑ","Ⲓ","Ⲕ","Ⲗ","Ⲙ","Ⲛ","Ⲝ","Ⲟ","Ⲡ","Ⲣ","Ⲥ","Ⲧ","Ⲩ","Ⲫ","Ⲭ","Ⲯ","Ⲱ","Ⲳ","Ⲵ","Ⲷ","Ⲹ","Ⲻ","Ⲽ","Ⲿ","Ⳁ","Ⳃ","Ⳅ","Ⳇ","Ⳉ","Ⳋ","Ⳍ","Ⳏ","Ⳑ","Ⳓ","Ⳕ","Ⳗ","Ⳙ","Ⳛ","Ⳝ","Ⳟ","Ⳡ","Ⳣ","Ⳬ","Ⳮ","Ⳳ","Ꙁ","Ꙃ","Ꙅ","Ꙇ","Ꙉ","Ꙋ","Ꙍ","Ꙏ","Ꙑ","Ꙓ","Ꙕ","Ꙗ","Ꙙ","Ꙛ","Ꙝ","Ꙟ","Ꙡ","Ꙣ","Ꙥ","Ꙧ","Ꙩ","Ꙫ","Ꙭ","Ꚁ","Ꚃ","Ꚅ","Ꚇ","Ꚉ","Ꚋ","Ꚍ","Ꚏ","Ꚑ","Ꚓ","Ꚕ","Ꚗ","Ꚙ","Ꚛ","Ꜣ","Ꜥ","Ꜧ","Ꜩ","Ꜫ","Ꜭ","Ꜯ","Ꜳ","Ꜵ","Ꜷ","Ꜹ","Ꜻ","Ꜽ","Ꜿ","Ꝁ","Ꝃ","Ꝅ","Ꝇ","Ꝉ","Ꝋ","Ꝍ","Ꝏ","Ꝑ","Ꝓ","Ꝕ","Ꝗ","Ꝙ","Ꝛ","Ꝝ","Ꝟ","Ꝡ","Ꝣ","Ꝥ","Ꝧ","Ꝩ","Ꝫ","Ꝭ","Ꝯ","Ꝺ","Ꝼ",["Ᵹ","Ꝿ"],"Ꞁ","Ꞃ","Ꞅ","Ꞇ","Ꞌ","Ɥ","Ꞑ","Ꞓ","Ꞗ","Ꞙ","Ꞛ","Ꞝ","Ꞟ","Ꞡ","Ꞣ","Ꞥ","Ꞧ","Ꞩ",["Ɦ","Ɪ"],["Ʞ","Ꞵ"],"Ꞷ","Ꞹ","Ꞻ","Ꞽ","Ꞿ","Ꟁ","Ꟃ",["Ꞔ","Ꟈ"],"Ꟊ","Ꟑ","Ꟗ","Ꟙ","Ꟶ",["A","Z"]],!1,!1),Cs(["ः","ऻ",["ा","ी"],["ॉ","ौ"],["ॎ","ॏ"],["ং","ঃ"],["া","ী"],["ে","ৈ"],["ো","ৌ"],"ৗ","ਃ",["ਾ","ੀ"],"ઃ",["ા","ી"],"ૉ",["ો","ૌ"],["ଂ","ଃ"],"ା","ୀ",["େ","ୈ"],["ୋ","ୌ"],"ୗ",["ா","ி"],["ு","ூ"],["ெ","ை"],["ொ","ௌ"],"ௗ",["ఁ","ః"],["ు","ౄ"],["ಂ","ಃ"],"ಾ",["ೀ","ೄ"],["ೇ","ೈ"],["ೊ","ೋ"],["ೕ","ೖ"],"ೳ",["ം","ഃ"],["ാ","ീ"],["െ","ൈ"],["ൊ","ൌ"],"ൗ",["ං","ඃ"],["ා","ෑ"],["ෘ","ෟ"],["ෲ","ෳ"],["༾","༿"],"ཿ",["ါ","ာ"],"ေ","း",["ျ","ြ"],["ၖ","ၗ"],["ၢ","ၤ"],["ၧ","ၭ"],["ႃ","ႄ"],["ႇ","ႌ"],"ႏ",["ႚ","ႜ"],"᜕","᜴","ា",["ើ","ៅ"],["ះ","ៈ"],["ᤣ","ᤦ"],["ᤩ","ᤫ"],["ᤰ","ᤱ"],["ᤳ","ᤸ"],["ᨙ","ᨚ"],"ᩕ","ᩗ","ᩡ",["ᩣ","ᩤ"],["ᩭ","ᩲ"],"ᬄ","ᬵ","ᬻ",["ᬽ","ᭁ"],["ᭃ","᭄"],"ᮂ","ᮡ",["ᮦ","ᮧ"],"᮪","ᯧ",["ᯪ","ᯬ"],"ᯮ",["᯲","᯳"],["ᰤ","ᰫ"],["ᰴ","ᰵ"],"᳡","᳷",["〮","〯"],["ꠣ","ꠤ"],"ꠧ",["ꢀ","ꢁ"],["ꢴ","ꣃ"],["ꥒ","꥓"],"ꦃ",["ꦴ","ꦵ"],["ꦺ","ꦻ"],["ꦾ","꧀"],["ꨯ","ꨰ"],["ꨳ","ꨴ"],"ꩍ","ꩻ","ꩽ","ꫫ",["ꫮ","ꫯ"],"ꫵ",["ꯣ","ꯤ"],["ꯦ","ꯧ"],["ꯩ","ꯪ"],"꯬"],!1,!1),Cs([["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","ٟ"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],"ܑ",["ܰ","݊"],["ަ","ް"],["߫","߳"],"߽",["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["࢘","࢟"],["࣊","࣡"],["ࣣ","ं"],"ऺ","़",["ु","ै"],"्",["॑","ॗ"],["ॢ","ॣ"],"ঁ","়",["ু","ৄ"],"্",["ৢ","ৣ"],"৾",["ਁ","ਂ"],"਼",["ੁ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["ੰ","ੱ"],"ੵ",["ઁ","ં"],"઼",["ુ","ૅ"],["ે","ૈ"],"્",["ૢ","ૣ"],["ૺ","૿"],"ଁ","଼","ି",["ୁ","ୄ"],"୍",["୕","ୖ"],["ୢ","ୣ"],"ஂ","ீ","்","ఀ","ఄ","఼",["ా","ీ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],"ಁ","಼","ಿ","ೆ",["ೌ","್"],["ೢ","ೣ"],["ഀ","ഁ"],["഻","഼"],["ു","ൄ"],"്",["ൢ","ൣ"],"ඁ","්",["ි","ු"],"ූ","ั",["ิ","ฺ"],["็","๎"],"ັ",["ິ","ຼ"],["່","໎"],["༘","༙"],"༵","༷","༹",["ཱ","ཾ"],["ྀ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ိ","ူ"],["ဲ","့"],["္","်"],["ွ","ှ"],["ၘ","ၙ"],["ၞ","ၠ"],["ၱ","ၴ"],"ႂ",["ႅ","ႆ"],"ႍ","ႝ",["፝","፟"],["ᜒ","᜔"],["ᜲ","ᜳ"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["឴","឵"],["ិ","ួ"],"ំ",["៉","៓"],"៝",["᠋","᠍"],"᠏",["ᢅ","ᢆ"],"ᢩ",["ᤠ","ᤢ"],["ᤧ","ᤨ"],"ᤲ",["᤹","᤻"],["ᨗ","ᨘ"],"ᨛ","ᩖ",["ᩘ","ᩞ"],"᩠","ᩢ",["ᩥ","ᩬ"],["ᩳ","᩼"],"᩿",["᪰","᪽"],["ᪿ","ᫎ"],["ᬀ","ᬃ"],"᬴",["ᬶ","ᬺ"],"ᬼ","ᭂ",["᭫","᭳"],["ᮀ","ᮁ"],["ᮢ","ᮥ"],["ᮨ","ᮩ"],["᮫","ᮭ"],"᯦",["ᯨ","ᯩ"],"ᯭ",["ᯯ","ᯱ"],["ᰬ","ᰳ"],["ᰶ","᰷"],["᳐","᳒"],["᳔","᳠"],["᳢","᳨"],"᳭","᳴",["᳸","᳹"],["᷀","᷿"],["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〭"],["゙","゚"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠥ","ꠦ"],"꠬",["꣄","ꣅ"],["꣠","꣱"],"ꣿ",["ꤦ","꤭"],["ꥇ","ꥑ"],["ꦀ","ꦂ"],"꦳",["ꦶ","ꦹ"],["ꦼ","ꦽ"],"ꧥ",["ꨩ","ꨮ"],["ꨱ","ꨲ"],["ꨵ","ꨶ"],"ꩃ","ꩌ","ꩼ","ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫬ","ꫭ"],"꫶","ꯥ","ꯨ","꯭","ﬞ",["︀","️"],["︠","︯"]],!1,!1),Cs([["0","9"],["٠","٩"],["۰","۹"],["߀","߉"],["०","९"],["০","৯"],["੦","੯"],["૦","૯"],["୦","୯"],["௦","௯"],["౦","౯"],["೦","೯"],["൦","൯"],["෦","෯"],["๐","๙"],["໐","໙"],["༠","༩"],["၀","၉"],["႐","႙"],["០","៩"],["᠐","᠙"],["᥆","᥏"],["᧐","᧙"],["᪀","᪉"],["᪐","᪙"],["᭐","᭙"],["᮰","᮹"],["᱀","᱉"],["᱐","᱙"],["꘠","꘩"],["꣐","꣙"],["꤀","꤉"],["꧐","꧙"],["꧰","꧹"],["꩐","꩙"],["꯰","꯹"],["0","9"]],!1,!1),Cs([["ᛮ","ᛰ"],["Ⅰ","ↂ"],["ↅ","ↈ"],"〇",["〡","〩"],["〸","〺"],["ꛦ","ꛯ"]],!1,!1),Cs(["_",["‿","⁀"],"⁔",["︳","︴"],["﹍","﹏"],"_"],!1,!1),Cs([" "," "," ",[" "," "]," "," "," "],!1,!1),Ts("enum",!1)),Xt=Ts("map",!1),Zt=Ts("false",!1),er=Ts("import",!1),tr=(Ts("null",!1),Ts("true",!1)),rr=Ts("as",!1),nr=(Ts(";",!1),Ts("}",!1)),or=Cs([["A","Z"],["a","z"]],!1,!1),sr=(Cs([["0","1"]],!1,!1),Cs([["",""]],!1,!1),Ts("\r",!1),Cs([["\0",""],""],!1,!1),Cs(['"'],!1,!1),Cs([["A","F"]],!1,!0)),ar=(Ts("\t",!1),Cs([["\0","ÿ"]],!1,!1),Ts(" ",!1),Cs([["!","~"]],!1,!1),Cs(["\t"," "],!1,!1),Ts("%",!1)),ir=(Cs(["!",["#","$"],["&",","],"/",[":",";"],"=",["?","@"],"[","]"],!1,!1),Cs(["#","/",":",["?","@"],"[","]"],!1,!1),Cs(["!","$",["&",","],";","="],!1,!1),Cs([["-","."],["0","9"],["A","Z"],"_",["a","z"],"~"],!1,!1)),cr=Ts(":",!1),lr=Ts("?",!1),ur=Ts("#",!1),pr=Cs(["+",["-","."],["0","9"],["A","Z"],["a","z"]],!1,!1),dr=Ts("@",!1),fr=Cs(["!","$",["&",","],[":",";"],"="],!1,!1),hr=Cs([["-","."],["0",":"],["A","Z"],"_",["a","z"],"~"],!1,!1),mr=Ts("::",!1),gr=Ts("25",!1),yr=Cs([["0","5"]],!1,!1),vr=Ts("2",!1),br=Cs([["0","4"]],!1,!1),wr=Ts("1",!1),Ar=(Cs(["!","$",["&",","],";","=","@"],!1,!1),Cs(["!","$",["&",","],[":",";"],"=","@"],!1,!1)),$r=Cs(["/","?"],!1,!1),Er=Ts("-",!1),Tr=Ts("+",!1),Cr=Cs([["a","z"],["0","9"],"-"],!1,!0),Dr=Cs([["a","z"],"-"],!1,!0),Fr=Ts("concerto",!1),Ir=Ts("version",!1),Sr=Ts("namespace",!1),Nr=Ts("abstract",!1),Or=Ts("concept",!1),Mr=Ts("asset",!1),xr=Ts("transaction",!1),kr=Ts("event",!1),Pr=Ts("participant",!1),Lr=Ts("scalar",!1),Rr=Ts("from",!1),_r=Ts("*",!1),Br=Ts("Integer",!1),jr=Ts("Double",!1),Vr=Ts("Long",!1),Ur=Ts("String",!1),Qr=Ts("DateTime",!1),qr=Ts("Boolean",!1),Kr=Ts("identified by",!1),zr=Ts("identified",!1),Wr=Ts("[]",!1),Hr=Ts("(",!1),Gr=Ts(",",!1),Yr=Ts(")",!1),Jr=Ts("extends",!1),Xr=Ts("{",!1),Zr=Ts("optional",!1),en=Ts("default",!1),tn=Ts("=",!1),rn=Ts("o",!1),nn=Ts("regex",!1),on=Ts("length",!1),sn=Ts("range",!1),an=Ts("--\x3e",!1),cn=Ts(".{",!1),ln=function(e){return e},un=function(e){return e},pn=function(e,t){return{$class:"concerto.metamodel@1.0.0.TypeIdentifier",name:e+t.join("")}},dn=function(e){return e},fn=function(){return{type:"Literal",value:!0}},hn=function(){return{type:"Literal",value:!1}},mn=function(e){return e},gn=function(e){return e},yn=function(){return{type:"Literal",value:parseFloat($s())}},vn=function(){return{type:"Literal",value:parseFloat($s())}},bn=function(){return{type:"Literal",value:parseFloat($s())}},wn=function(){return{type:"Literal",value:parseFloat($s())}},An=function(e){return{type:"Literal",value:parseInt(e,16)}},$n=function(e){return{type:"Literal",value:e.join("")}},En=function(e){return{type:"Literal",value:e.join("")}},Tn=function(){return $s()},Cn=function(e){return e},Dn=function(){return $s()},Fn=function(e){return e},In=function(){return""},Sn=function(){return"\0"},Nn=function(){return"\b"},On=function(){return"\f"},Mn=function(){return"\n"},xn=function(){return"\r"},kn=function(){return"\t"},Pn=function(){return"\v"},Ln=function(){return $s()},Rn=function(e){return String.fromCharCode(parseInt(e,16))},_n=function(e){return String.fromCharCode(parseInt(e,16))},Bn=function(e,t){return{$class:`${li}.StringRegexValidator`,pattern:e,flags:t}},jn=function(e,t,r){return{versionCore:e,pre:t,build:r}},Vn=function(e,t,r){return{major:parseInt(e,10),minor:parseInt(t,10),patch:parseInt(r,10)}},Un=function(e,t){return[e,...t]},Qn=function(e,t){return[e,...t]},qn=function(){return"Integer"},Kn=function(){return"Double"},zn=function(){return"Long"},Wn=function(){return"String"},Hn=function(){return"DateTime"},Gn=function(){return"Boolean"},Yn=function(e){return{$class:"concerto.metamodel@1.0.0.TypeIdentifier",name:e.name}},Jn=function(e,t){return e+t},Xn=function(e){return{$class:"concerto.metamodel@1.0.0.IdentifiedBy",name:e.name}},Zn=function(){return{$class:"concerto.metamodel@1.0.0.Identified"}},eo=function(e){return{$class:"concerto.metamodel@1.0.0.DecoratorString",value:e.value,...fi(Es())}},to=function(e){return{$class:"concerto.metamodel@1.0.0.DecoratorNumber",value:+e,...fi(Es())}},ro=function(e){return{$class:"concerto.metamodel@1.0.0.DecoratorBoolean",value:"true"==e,...fi(Es())}},no=function(e,t){return{$class:"concerto.metamodel@1.0.0.DecoratorTypeReference",type:e,isArray:!!t,...fi(Es())}},oo=function(e){return e},so=function(e,t){return t?e.concat(t):[]},ao=function(e,t){const r={$class:"concerto.metamodel@1.0.0.Decorator",name:e,...fi(Es())};return t&&(r.arguments=t),r},io=function(e){return e},co=function(e){return{$class:"concerto.metamodel@1.0.0.TypeIdentifier",name:e.name}},lo=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.AssetDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The asset "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},uo=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.ParticipantDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The participant "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},po=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.TransactionDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The transaction "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},fo=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.EventDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The event "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},ho=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.ConceptDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The concept "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},mo=function(e){const t={$class:"concerto.metamodel@1.0.0.BooleanScalar"};return e&&(t.defaultValue="true"===e),t},go=function(e,t){const r={$class:"concerto.metamodel@1.0.0.IntegerScalar"};return e&&(r.defaultValue=parseInt(e)),t&&(r.validator=t),r},yo=function(e,t){const r={$class:"concerto.metamodel@1.0.0.LongScalar"};return e&&(r.defaultValue=parseInt(e)),t&&(r.validator=t),r},vo=function(e,t){const r={$class:"concerto.metamodel@1.0.0.DoubleScalar"};return e&&(r.defaultValue=parseFloat(e)),t&&(r.validator=t),r},bo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.StringScalar"};return e&&(n.defaultValue=e),t&&(n.validator=t),r&&(n.lengthValidator=r),n},wo=function(e){const t={$class:"concerto.metamodel@1.0.0.DateTimeScalar"};return e&&(t.defaultValue=e),t},Ao=function(e,t,r){const n={...r,name:t.name,...fi(Es())};return e.length>0&&(n.decorators=e),n},$o=function(){return{type:"Optional"}},Eo=function(e){return e.value},To=function(e){return e},Co=function(e){return e},Do=function(e){return e},Fo=function(e){return{type:"ClassDeclarationBody",declarations:pi(e),...fi(Es())}},Io=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.ObjectProperty",name:n.name,type:t,isArray:di(r),isOptional:di(s),...fi(Es())};return o&&(a.defaultValue=o),e.length>0&&(a.decorators=e),a},So=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.BooleanProperty",name:r.name,isArray:di(t),isOptional:di(o),...fi(Es())};return n&&(s.defaultValue="true"===n),e.length>0&&(s.decorators=e),s},No=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.DateTimeProperty",name:r.name,isArray:di(t),isOptional:di(o),...fi(Es())};return n&&(s.defaultValue=n),e.length>0&&(s.decorators=e),s},Oo=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.StringProperty",name:r.name,isArray:di(t),isOptional:di(a),...fi(Es())};return n&&(i.defaultValue=n),e.length>0&&(i.decorators=e),o&&(i.validator=o),s&&(i.lengthValidator=s),i},Mo=function(e){return e},xo=function(e,t){const r={$class:`${li}.StringLengthValidator`};return e&&(r.minLength=parseInt(e)),t&&(r.maxLength=parseInt(t)),r},ko=function(e,t){const r={$class:`${li}.DoubleDomainValidator`};return e&&(r.lower=parseFloat(e)),t&&(r.upper=parseFloat(t)),r},Po=function(e,t){const r={$class:`${li}.IntegerDomainValidator`};return e&&(r.lower=parseInt(e)),t&&(r.upper=parseInt(t)),r},Lo=function(e,t){const r={$class:`${li}.LongDomainValidator`};return e&&(r.lower=parseInt(e)),t&&(r.upper=parseInt(t)),r},Ro=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.DoubleProperty",name:n.name,isArray:di(r),isOptional:di(a),...fi(Es())};return o&&(i.defaultValue=parseFloat(o)),e.length>0&&(i.decorators=e),s&&(i.validator=s),i},_o=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.IntegerProperty",name:n.name,isArray:di(r),isOptional:di(a),...fi(Es())};return o&&(i.defaultValue=parseInt(o)),e.length>0&&(i.decorators=e),s&&(i.validator=s),i},Bo=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.LongProperty",name:n.name,isArray:di(r),isOptional:di(a),...fi(Es())};return o&&(i.defaultValue=parseInt(o)),e.length>0&&(i.decorators=e),s&&(i.validator=s),i},jo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.MapDeclaration",name:t.name,key:r.declarations[0],value:r.declarations[1],...fi(Es())};return e.length>0&&(n.decorators=e),n},Vo=function(e,t){return{type:"MapDeclarationBody",declarations:pi([e,t])}},Uo=function(e){const t={$class:"concerto.metamodel@1.0.0.StringMapKeyType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Qo=function(e){const t={$class:"concerto.metamodel@1.0.0.DateTimeMapKeyType",...fi(Es())};return e.length>0&&(t.decorators=e),t},qo=function(e,t){const r={$class:"concerto.metamodel@1.0.0.ObjectMapKeyType",type:t,...fi(Es())};return e.length>0&&(r.decorators=e),r},Ko=function(e){const t={$class:"concerto.metamodel@1.0.0.BooleanMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},zo=function(e){const t={$class:"concerto.metamodel@1.0.0.DateTimeMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Wo=function(e){const t={$class:"concerto.metamodel@1.0.0.StringMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Ho=function(e){const t={$class:"concerto.metamodel@1.0.0.IntegerMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Go=function(e){const t={$class:"concerto.metamodel@1.0.0.LongMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Yo=function(e){const t={$class:"concerto.metamodel@1.0.0.DoubleMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Jo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.ObjectMapValueType",type:r,...fi(Es())};return"--\x3e"===t&&(n.$class="concerto.metamodel@1.0.0.RelationshipMapValueType"),e.length>0&&(n.decorators=e),n},Xo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.EnumDeclaration",name:t.name,properties:r.declarations,...fi(Es())};return e.length>0&&(n.decorators=e),n},Zo=function(e){return{type:"EnumDeclarationBody",declarations:pi(e)}},es=function(e,t){const r={$class:"concerto.metamodel@1.0.0.EnumProperty",name:t.name,...fi(Es())};return e.length>0&&(r.decorators=e),r},ts=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.RelationshipProperty",name:n.name,type:t,isArray:di(r),isOptional:di(o),...fi(Es())};return e.length>0&&(s.decorators=e),s},rs=function(e,t){return e.concat(JSON.stringify(t).replace(/['"]+/g,""))},ns=function(e,t,r){return`${e}@${t}.${r}`},os=function(e,t){return`${e}@${t}`},ss=function(e){return e},as=function(e){return e},is=function(e,t){const r={$class:"concerto.metamodel@1.0.0.ImportAll",namespace:e};return t&&(r.uri=t),r},cs=function(e,t){const{namespace:r,name:n}=function(e){const t=e.split(".");return{name:t.pop(),namespace:t.join(".")}}(e),o={$class:`${li}.ImportType`,name:n,namespace:r};return t&&(o.uri=t),o},ls=function(e,t,r){const{aliasedTypes:n,typesNames:o}=t.reduce(((e,t)=>("concerto.metamodel@1.0.0.AliasedType"===t.$class?(e.aliasedTypes.push(t),e.typesNames.push(t.name)):e.typesNames.push(t),e)),{aliasedTypes:[],typesNames:[]}),s={$class:"concerto.metamodel@1.0.0.ImportTypes",namespace:e,types:o,...n.length>0&&{aliasedTypes:n}};return r&&(s.uri=r),s},us=function(e,t){if(["Boolean","String","DateTime","Double","Integer","Long"].indexOf(t)>=0)throw new Error(`A type cannot be aliased to a Primitive type, here "${e}" is being aliased as "${t}".`);return{$class:"concerto.metamodel@1.0.0.AliasedType",name:e,aliasedName:t}},ps=function(e,t){return[e,...t.map((e=>e[2]))]},ds=function(e){return e.value},fs=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.Model",decorators:pi(t),namespace:r,imports:pi(n),declarations:pi(o)};return e&&(s.concertoVersion=e),s},hs=function(e,t){return ui(e,t,1)},ms=function(e,t){return ui(e,t,1)},gs=0|r.peg$currPos,ys=gs,vs=[{line:1,column:1}],bs=gs,ws=r.peg$maxFailExpected||[],As=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in a))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=a[r.startRule]}function $s(){return e.substring(ys,gs)}function Es(){return Is(ys,gs)}function Ts(e,t){return{type:"literal",text:e,ignoreCase:t}}function Cs(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ds(e){return{type:"other",description:e}}function Fs(t){var r,n=vs[t];if(n)return n;if(t>=vs.length)r=vs.length-1;else for(r=t;!vs[--r];);for(n={line:(n=vs[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return vs[t]=n,n}function Is(e,t,r){var n=Fs(e),o=Fs(t),a={source:s,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:o.line,column:o.column}};return r&&s&&"function"==typeof s.offset&&(a.start=s.offset(a.start),a.end=s.offset(a.end)),a}function Ss(e){gs<bs||(gs>bs&&(bs=gs,ws=[]),ws.push(e))}function Ns(){var t,r;return t=gs,aa(),r=function(){var t,r,n,s,a,i;return t=gs,r=function(){var t,r,n,s;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,8)===G?(r=G,gs+=8):(r=o,0===As&&Ss(Fr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,7)===Y?(r=Y,gs+=7):(r=o,0===As&&Ss(Ir)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Ws())!==o?(aa(),ys=t,t=ds(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r===o&&(r=null),n=Ua(),s=function(){var t,r,n;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,9)===J?(r=J,gs+=9):(r=o,0===As&&Ss(Sr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(aa(),(n=oi())!==o?(aa(),ys=t,t=ss(n)):(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(a=function(){var e,t,r,n,s,a;if(e=gs,(t=ii())!==o){for(r=[],n=gs,s=aa(),(a=ii())!==o?n=s=[s,a]:(gs=n,n=o);n!==o;)r.push(n),n=gs,s=aa(),(a=ii())!==o?n=s=[s,a]:(gs=n,n=o);ys=e,e=hs(t,r)}else gs=e,e=o;return e}(),a===o&&(a=null),i=function(){var e,t,r,n,s,a;if(e=gs,(t=ci())!==o){for(r=[],n=gs,s=aa(),(a=ci())!==o?n=s=[s,a]:(gs=n,n=o);n!==o;)r.push(n),n=gs,s=aa(),(a=ci())!==o?n=s=[s,a]:(gs=n,n=o);ys=e,e=ms(t,r)}else gs=e,e=o;return e}(),i===o&&(i=null),ys=t,t=fs(r,n,s,a,i)):(gs=t,t=o),t}(),r!==o?(aa(),ys=t,t=ln(r)):(gs=t,t=o),t}function Os(){var t;return e.length>gs?(t=e.charAt(gs),gs++):(t=o,0===As&&Ss(ot)),t}function Ms(){var t;return As++,t=e.charAt(gs),Ne.test(t)?gs++:(t=o,0===As&&Ss(at)),As--,t===o&&0===As&&Ss(st),t}function xs(){var t;return t=e.charAt(gs),Oe.test(t)?gs++:(t=o,0===As&&Ss(it)),t}function ks(){var t;return As++,10===e.charCodeAt(gs)?(t=c,gs++):(t=o,0===As&&Ss(lt)),t===o&&(e.substr(gs,2)===l?(t=l,gs+=2):(t=o,0===As&&Ss(ut)),t===o&&(t=e.charAt(gs),Me.test(t)?gs++:(t=o,0===As&&Ss(pt)))),As--,t===o&&0===As&&Ss(ct),t}function Ps(){var t;return As++,(t=function(){var t,r,n,s,a,i;if(t=gs,e.substr(gs,2)===u?(r=u,gs+=2):(r=o,0===As&&Ss(ft)),r!==o){for(n=[],s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);s!==o;)n.push(s),s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);e.substr(gs,2)===p?(s=p,gs+=2):(s=o,0===As&&Ss(ht)),s!==o?t=r=[r,n,s]:(gs=t,t=o)}else gs=t,t=o;return t}())===o&&(t=function(){var t,r,n,s,a,i;if(t=gs,e.substr(gs,2)===d?(r=d,gs+=2):(r=o,0===As&&Ss(mt)),r!==o){for(n=[],s=gs,a=gs,As++,i=xs(),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);s!==o;)n.push(s),s=gs,a=gs,As++,i=xs(),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);t=r=[r,n]}else gs=t,t=o;return t}()),As--,t===o&&0===As&&Ss(dt),t}function Ls(){var t,r,n,s,a,i;if(t=gs,e.substr(gs,2)===u?(r=u,gs+=2):(r=o,0===As&&Ss(ft)),r!==o){for(n=[],s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),i===o&&(i=xs()),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);s!==o;)n.push(s),s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),i===o&&(i=xs()),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);e.substr(gs,2)===p?(s=p,gs+=2):(s=o,0===As&&Ss(ht)),s!==o?t=r=[r,n,s]:(gs=t,t=o)}else gs=t,t=o;return t}function Rs(){var e,t;return e=gs,t=function(){var e,t,r,n;if(As++,e=gs,(t=_s())!==o){for(r=[],n=Bs();n!==o;)r.push(n),n=Bs();ys=e,e=pn(t,r)}else gs=e,e=o;return As--,e===o&&(t=o,0===As&&Ss(gt)),e}(),t!==o&&(ys=e,t=un(t)),t}function _s(){var t,r,n;return t=e.charAt(gs),xe.test(t)?gs++:(t=o,0===As&&Ss(yt)),t===o&&(t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=Zs())!==o?(ys=t,t=dn(n)):(gs=t,t=o)),t}function Bs(){var t;return(t=_s())===o&&(t=e.charAt(gs),ke.test(t)?gs++:(t=o,0===As&&Ss(bt))),t}function js(){var t,r;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,4)===P?(r=P,gs+=4):(r=o,0===As&&Ss(tr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o&&(ys=t,r=fn()),(t=r)===o&&(t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,5)===x?(r=x,gs+=5):(r=o,0===As&&Ss(Zt)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o&&(ys=t,r=hn()),t=r),t}function Vs(){var t,r,n,s,a;if(t=gs,r=e.charAt(gs),Pe.test(r)?gs++:(r=o,0===As&&Ss($t)),r===o&&(r=null),Us()!==o)if(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o){for(s=[],a=Qs();a!==o;)s.push(a),a=Qs();(a=qs())===o&&(a=null),ys=t,t=wn()}else gs=t,t=o;else gs=t,t=o;return t}function Us(){var t,r,n,s;if(48===e.charCodeAt(gs)?(t=m,gs++):(t=o,0===As&&Ss(Et)),t===o)if(t=gs,r=function(){var t;return t=e.charAt(gs),Re.test(t)?gs++:(t=o,0===As&&Ss(Ct)),t}(),r!==o){for(n=[],s=Qs();s!==o;)n.push(s),s=Qs();t=r=[r,n]}else gs=t,t=o;return t}function Qs(){var t;return t=e.charAt(gs),Le.test(t)?gs++:(t=o,0===As&&Ss(Tt)),t}function qs(){var t,r,n;return t=gs,r=function(){var t;return(t=e.charAt(gs)).toLowerCase()===g?gs++:(t=o,0===As&&Ss(Dt)),t}(),r!==o&&(n=Ks())!==o?t=r=[r,n]:(gs=t,t=o),t}function Ks(){var t,r,n,s;if(t=gs,r=e.charAt(gs),Pe.test(r)?gs++:(r=o,0===As&&Ss($t)),r===o&&(r=null),n=[],(s=Qs())!==o)for(;s!==o;)n.push(s),s=Qs();else n=o;return n!==o?t=r=[r,n]:(gs=t,t=o),t}function zs(){var t;return t=e.charAt(gs),_e.test(t)?gs++:(t=o,0===As&&Ss(It)),t}function Ws(){var t,r,n,s;if(As++,t=gs,34===e.charCodeAt(gs)?(r=v,gs++):(r=o,0===As&&Ss(Nt)),r!==o){for(n=[],s=Hs();s!==o;)n.push(s),s=Hs();34===e.charCodeAt(gs)?(s=v,gs++):(s=o,0===As&&Ss(Nt)),s!==o?(ys=t,t=$n(n)):(gs=t,t=o)}else gs=t,t=o;if(t===o)if(t=gs,39===e.charCodeAt(gs)?(r=b,gs++):(r=o,0===As&&Ss(Ot)),r!==o){for(n=[],s=Gs();s!==o;)n.push(s),s=Gs();39===e.charCodeAt(gs)?(s=b,gs++):(s=o,0===As&&Ss(Ot)),s!==o?(ys=t,t=En(n)):(gs=t,t=o)}else gs=t,t=o;return As--,t===o&&(r=o,0===As&&Ss(St)),t}function Hs(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),Be.test(n)?gs++:(n=o,0===As&&Ss(Mt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=Os())!==o?(ys=t,t=Tn()):(gs=t,t=o),t===o&&(t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=Js())!==o?(ys=t,t=Cn(n)):(gs=t,t=o),t===o&&(t=Ys())),t}function Gs(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),je.test(n)?gs++:(n=o,0===As&&Ss(xt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=Os())!==o?(ys=t,t=Dn()):(gs=t,t=o),t===o&&(t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=Js())!==o?(ys=t,t=Fn(n)):(gs=t,t=o),t===o&&(t=Ys())),t}function Ys(){var t,r;return t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&ks()!==o?(ys=t,t=In()):(gs=t,t=o),t}function Js(){var t,r,n,s;return t=function(){var t;return(t=Xs())===o&&(t=function(){var t,r,n;return t=gs,r=gs,As++,n=function(){var t;return(t=Xs())===o&&(t=e.charAt(gs),Ue.test(t)?gs++:(t=o,0===As&&Ss(Vt))),t}(),n===o&&(n=xs()),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=Os())!==o?(ys=t,t=Ln()):(gs=t,t=o),t}()),t}(),t===o&&(t=gs,48===e.charCodeAt(gs)?(r=m,gs++):(r=o,0===As&&Ss(Et)),r!==o?(n=gs,As++,s=Qs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Sn()):(gs=t,t=o)):(gs=t,t=o),t===o&&(t=function(){var t,r,n,s,a,i;return t=gs,120===e.charCodeAt(gs)?(r=D,gs++):(r=o,0===As&&Ss(Ut)),r!==o?(n=gs,s=gs,(a=zs())!==o&&(i=zs())!==o?s=a=[a,i]:(gs=s,s=o),(n=s!==o?e.substring(n,gs):s)!==o?(ys=t,t=Rn(n)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=Zs()))),t}function Xs(){var t,r;return t=e.charAt(gs),Ve.test(t)?gs++:(t=o,0===As&&Ss(kt)),t===o&&(t=gs,98===e.charCodeAt(gs)?(r=w,gs++):(r=o,0===As&&Ss(Pt)),r!==o&&(ys=t,r=Nn()),(t=r)===o&&(t=gs,102===e.charCodeAt(gs)?(r=A,gs++):(r=o,0===As&&Ss(Lt)),r!==o&&(ys=t,r=On()),(t=r)===o&&(t=gs,110===e.charCodeAt(gs)?(r=$,gs++):(r=o,0===As&&Ss(Rt)),r!==o&&(ys=t,r=Mn()),(t=r)===o&&(t=gs,114===e.charCodeAt(gs)?(r=E,gs++):(r=o,0===As&&Ss(_t)),r!==o&&(ys=t,r=xn()),(t=r)===o&&(t=gs,116===e.charCodeAt(gs)?(r=T,gs++):(r=o,0===As&&Ss(Bt)),r!==o&&(ys=t,r=kn()),(t=r)===o&&(t=gs,118===e.charCodeAt(gs)?(r=C,gs++):(r=o,0===As&&Ss(jt)),r!==o&&(ys=t,r=Pn()),t=r)))))),t}function Zs(){var t,r,n,s,a,i,c,l;return t=gs,117===e.charCodeAt(gs)?(r=F,gs++):(r=o,0===As&&Ss(Qt)),r!==o?(n=gs,s=gs,(a=zs())!==o&&(i=zs())!==o&&(c=zs())!==o&&(l=zs())!==o?s=a=[a,i,c,l]:(gs=s,s=o),(n=s!==o?e.substring(n,gs):s)!==o?(ys=t,t=_n(n)):(gs=t,t=o)):(gs=t,t=o),t}function ea(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),qe.test(n)?gs++:(n=o,0===As&&Ss(Wt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t===o&&(t=ta())===o&&(t=na()),t}function ta(){var t,r,n;return t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t}function ra(){var e,t,r;return e=gs,t=gs,As++,r=xs(),As--,r===o?t=void 0:(gs=t,t=o),t!==o&&(r=Os())!==o?e=t=[t,r]:(gs=e,e=o),e}function na(){var t,r,n,s;if(t=gs,91===e.charCodeAt(gs)?(r=S,gs++):(r=o,0===As&&Ss(Ht)),r!==o){for(n=[],s=oa();s!==o;)n.push(s),s=oa();93===e.charCodeAt(gs)?(s=N,gs++):(s=o,0===As&&Ss(Gt)),s!==o?t=r=[r,n,s]:(gs=t,t=o)}else gs=t,t=o;return t}function oa(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),Ke.test(n)?gs++:(n=o,0===As&&Ss(Yt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t===o&&(t=ta()),t}function sa(){var t,r,n,s;return t=gs,e.substr(gs,6)===k?(r=k,gs+=6):(r=o,0===As&&Ss(er)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}function aa(){var e,t;for(e=[],(t=Ms())===o&&(t=ks())===o&&(t=Ps());t!==o;)e.push(t),(t=Ms())===o&&(t=ks())===o&&(t=Ps());return e}function ia(){var e,t;for(e=[],(t=Ms())===o&&(t=Ls());t!==o;)e.push(t),(t=Ms())===o&&(t=Ls());return e}function ca(){var t;return t=e.charAt(gs),Le.test(t)?gs++:(t=o,0===As&&Ss(Tt)),t}function la(){var t;return(t=ca())===o&&(t=e.charAt(gs),We.test(t)?gs++:(t=o,0===As&&Ss(sr))),t}function ua(){var t,r,n,s,a;return t=gs,r=gs,37===e.charCodeAt(gs)?(n=_,gs++):(n=o,0===As&&Ss(ar)),n!==o&&(s=la())!==o&&(a=la())!==o?r=n=[n,s,a]:(gs=r,r=o),r!==o?e.substring(t,gs):r}function pa(){var t;return t=e.charAt(gs),He.test(t)?gs++:(t=o,0===As&&Ss(ir)),t}function da(){var t,r,n,s;return t=gs,(r=ha())!==o?(58===e.charCodeAt(gs)?(n=B,gs++):(n=o,0===As&&Ss(cr)),n!==o&&(s=ha())!==o?t=r=[r,n,s]:(gs=t,t=o)):(gs=t,t=o),t===o&&(t=ma()),t}function fa(){var t,r,n;return t=gs,(r=ha())!==o?(58===e.charCodeAt(gs)?(n=B,gs++):(n=o,0===As&&Ss(cr)),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}function ha(){var t,r,n,s,a,i,c,l;return t=gs,r=gs,(n=la())!==o?(s=gs,(a=la())!==o?(i=gs,(c=la())!==o?((l=la())===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),r=n=[n,s]):(gs=r,r=o),r!==o?e.substring(t,gs):r}function ma(){var t,r,n,s,a,i,c,l,u;return t=gs,r=gs,(n=ga())!==o?(46===e.charCodeAt(gs)?(s=h,gs++):(s=o,0===As&&Ss(At)),s!==o&&(a=ga())!==o?(46===e.charCodeAt(gs)?(i=h,gs++):(i=o,0===As&&Ss(At)),i!==o&&(c=ga())!==o?(46===e.charCodeAt(gs)?(l=h,gs++):(l=o,0===As&&Ss(At)),l!==o&&(u=ga())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o)):(gs=r,r=o)):(gs=r,r=o)):(gs=r,r=o),r!==o?e.substring(t,gs):r}function ga(){var t,r,n,s,a;return t=gs,r=gs,e.substr(gs,2)===q?(n=q,gs+=2):(n=o,0===As&&Ss(gr)),n!==o?(s=e.charAt(gs),Xe.test(s)?gs++:(s=o,0===As&&Ss(yr)),s!==o?r=n=[n,s]:(gs=r,r=o)):(gs=r,r=o),r===o&&(r=gs,50===e.charCodeAt(gs)?(n=K,gs++):(n=o,0===As&&Ss(vr)),n!==o?(s=e.charAt(gs),Ze.test(s)?gs++:(s=o,0===As&&Ss(br)),s!==o&&(a=ca())!==o?r=n=[n,s,a]:(gs=r,r=o)):(gs=r,r=o),r===o&&(r=gs,49===e.charCodeAt(gs)?(n=z,gs++):(n=o,0===As&&Ss(wr)),n!==o&&(s=ca())!==o&&(a=ca())!==o?r=n=[n,s,a]:(gs=r,r=o),r===o&&(r=gs,n=e.charAt(gs),Re.test(n)?gs++:(n=o,0===As&&Ss(Ct)),n!==o&&(s=ca())!==o?r=n=[n,s]:(gs=r,r=o),r===o&&(r=ca())))),r!==o?e.substring(t,gs):r}function ya(){var e;return(e=pa())===o&&(e=ua()),e}function va(){var t,r,n,s;for(t=gs,r=[],n=gs,47===e.charCodeAt(gs)?(s=I,gs++):(s=o,0===As&&Ss(Kt)),s!==o?n=s=[s,ba()]:(gs=n,n=o);n!==o;)r.push(n),n=gs,47===e.charCodeAt(gs)?(s=I,gs++):(s=o,0===As&&Ss(Kt)),s!==o?n=s=[s,ba()]:(gs=n,n=o);return e.substring(t,gs)}function ba(){var t,r,n;for(t=gs,r=[],n=Aa();n!==o;)r.push(n),n=Aa();return e.substring(t,gs)}function wa(){var t,r,n;if(t=gs,r=[],(n=Aa())!==o)for(;n!==o;)r.push(n),n=Aa();else r=o;return r!==o?e.substring(t,gs):r}function Aa(){var t;return(t=pa())===o&&(t=ua())===o&&(t=e.charAt(gs),et.test(t)?gs++:(t=o,0===As&&Ss(Ar))),t}function $a(){var t,r,n;for(t=gs,r=[],(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));n!==o;)r.push(n),(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));return e.substring(t,gs)}function Ea(){var t,r,n;for(t=gs,r=[],(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));n!==o;)r.push(n),(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));return e.substring(t,gs)}function Ta(){var t,r;return t=gs,(r=function(){var t,r,n,s,a,i;return t=gs,r=function(){var t,r,n,s,a,i,c;return t=gs,r=gs,(r=(n=Ia())!==o?e.substring(r,gs):n)!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o?(s=gs,(s=(a=Ia())!==o?e.substring(s,gs):a)!==o?(46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Ia())!==o?e.substring(i,gs):c)!==o?(ys=t,t=Vn(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(n=gs,45===e.charCodeAt(gs)?(s=W,gs++):(s=o,0===As&&Ss(Er)),s!==o?(a=function(){var t,r,n,s,a,i,c;if(t=gs,r=gs,(r=(n=Ca())!==o?e.substring(r,gs):n)!==o){for(n=[],s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Ca())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Ca())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);ys=t,t=Un(r,n)}else gs=t,t=o;return t}(),a!==o?n=a:(gs=n,n=o)):(gs=n,n=o),n===o&&(n=null),s=gs,43===e.charCodeAt(gs)?(a=H,gs++):(a=o,0===As&&Ss(Tr)),a!==o?(i=function(){var t,r,n,s,a,i,c;if(t=gs,r=gs,(r=(n=Da())!==o?e.substring(r,gs):n)!==o){for(n=[],s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Da())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Da())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);ys=t,t=Qn(r,n)}else gs=t,t=o;return t}(),i!==o?s=i:(gs=s,s=o)):(gs=s,s=o),s===o&&(s=null),ys=t,t=jn(r,n,s)):(gs=t,t=o),t}())===o&&(r=function(){var t,r,n,s,a,i;return t=gs,(r=Ia())!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o&&(s=Ia())!==o?(46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(120===e.charCodeAt(gs)?(i=D,gs++):(i=o,0===As&&Ss(Ut)),i!==o?t=r=[r,n,s,a,i]:(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r===o&&(r=function(){var t,r,n,s;return t=gs,(r=Ia())!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o?(120===e.charCodeAt(gs)?(s=D,gs++):(s=o,0===As&&Ss(Ut)),s!==o?t=r=[r,n,s]:(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())),r!==o?e.substring(t,gs):r}function Ca(){var e;return(e=Fa())===o&&(e=Ia()),e}function Da(){var e,t;if((e=Fa())===o)if(e=[],(t=Na())!==o)for(;t!==o;)e.push(t),t=Na();else e=o;return e}function Fa(){var t,r,n,s,a;for(t=gs,r=[],n=Na();n!==o;)r.push(n),n=Na();if(n=function(){var t;return t=e.charAt(gs),nt.test(t)?gs++:(t=o,0===As&&Ss(Dr)),t}(),n!==o){for(s=[],a=Sa();a!==o;)s.push(a),a=Sa();t=r=[r,n,s]}else gs=t,t=o;return t}function Ia(){var t,r,n,s;if(48===e.charCodeAt(gs)?(t=m,gs++):(t=o,0===As&&Ss(Et)),t===o)if(t=gs,r=function(){var t;return t=e.charAt(gs),Re.test(t)?gs++:(t=o,0===As&&Ss(Ct)),t}(),r!==o){for(n=[],s=Na();s!==o;)n.push(s),s=Na();t=r=[r,n]}else gs=t,t=o;return t}function Sa(){var t;return t=e.charAt(gs),rt.test(t)?gs++:(t=o,0===As&&Ss(Cr)),t}function Na(){var t;return t=e.charAt(gs),Le.test(t)?gs++:(t=o,0===As&&Ss(Tt)),t}function Oa(){var t,r,n,s;return t=gs,e.substr(gs,8)===X?(r=X,gs+=8):(r=o,0===As&&Ss(Nr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}function Ma(){var t,r,n,s;return t=gs,e.substr(gs,7)===ie?(r=ie,gs+=7):(r=o,0===As&&Ss(Br)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=qn()):(gs=t,t=o)):(gs=t,t=o),t}function xa(){var t,r,n,s;return t=gs,e.substr(gs,6)===ce?(r=ce,gs+=6):(r=o,0===As&&Ss(jr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Kn()):(gs=t,t=o)):(gs=t,t=o),t}function ka(){var t,r,n,s;return t=gs,e.substr(gs,4)===le?(r=le,gs+=4):(r=o,0===As&&Ss(Vr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=zn()):(gs=t,t=o)):(gs=t,t=o),t}function Pa(){var t,r,n,s;return t=gs,e.substr(gs,6)===ue?(r=ue,gs+=6):(r=o,0===As&&Ss(Ur)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Wn()):(gs=t,t=o)):(gs=t,t=o),t}function La(){var t,r,n,s;return t=gs,e.substr(gs,8)===pe?(r=pe,gs+=8):(r=o,0===As&&Ss(Qr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Hn()):(gs=t,t=o)):(gs=t,t=o),t}function Ra(){var t,r,n,s;return t=gs,e.substr(gs,7)===de?(r=de,gs+=7):(r=o,0===As&&Ss(qr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Gn()):(gs=t,t=o)):(gs=t,t=o),t}function _a(){var e,t,r,n,s;return e=gs,t=gs,As++,r=function(){var e;return(e=Pa())===o&&(e=function(){var e;return(e=Ma())===o&&(e=xa())===o&&(e=ka()),e}())===o&&(e=La())===o&&(e=Ra()),e}(),As--,r===o?t=void 0:(gs=t,t=o),t!==o&&(r=Rs())!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=e,e=Yn(r)):(gs=e,e=o)):(gs=e,e=o),e}function Ba(){var t;return(t=function(){var t,r,n;return t=gs,e.substr(gs,13)===fe?(r=fe,gs+=13):(r=o,0===As&&Ss(Kr)),r!==o?(aa(),(n=Rs())!==o?(ys=t,t=Xn(n)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r;return t=gs,e.substr(gs,10)===he?(r=he,gs+=10):(r=o,0===As&&Ss(zr)),r!==o&&(ys=t,r=Zn()),r}()),t}function ja(){var t;return(t=function(){var e,t;return e=gs,(t=Ws())!==o&&(ys=e,t=eo(t)),t}())===o&&(t=function(){var t,r,n;return t=gs,r=gs,(r=(n=js())!==o?e.substring(r,gs):n)!==o&&(ys=t,r=ro(r)),r}())===o&&(t=function(){var t,r;return t=gs,r=function(){var t,r,n,s;return t=gs,r=gs,45===e.charCodeAt(gs)?(n=W,gs++):(n=o,0===As&&Ss(Er)),n===o&&(n=null),r=e.substring(r,gs),n=gs,(n=(s=function(){var t,r,n,s;return As++,t=gs,r=function(){var t,r,n,s,a;if(t=gs,(r=e.substr(gs,2)).toLowerCase()===y?gs+=2:(r=o,0===As&&Ss(Ft)),r!==o){if(n=gs,s=[],(a=zs())!==o)for(;a!==o;)s.push(a),a=zs();else s=o;(n=s!==o?e.substring(n,gs):s)!==o?(ys=t,t=An(n)):(gs=t,t=o)}else gs=t,t=o;return t}(),r!==o?(n=gs,As++,(s=_s())===o&&(s=Qs()),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=mn(r)):(gs=t,t=o)):(gs=t,t=o),t===o&&(t=gs,r=function(){var t,r,n,s,a;if(t=gs,(r=Us())!==o)if(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o){for(s=[],a=Qs();a!==o;)s.push(a),a=Qs();(a=qs())===o&&(a=null),ys=t,t=yn()}else gs=t,t=o;else gs=t,t=o;if(t===o){if(t=gs,46===e.charCodeAt(gs)?(r=h,gs++):(r=o,0===As&&Ss(At)),r!==o){if(n=[],(s=Qs())!==o)for(;s!==o;)n.push(s),s=Qs();else n=o;n!==o?((s=qs())===o&&(s=null),ys=t,t=vn()):(gs=t,t=o)}else gs=t,t=o;t===o&&(t=gs,(r=Us())!==o?((n=qs())===o&&(n=null),ys=t,t=bn()):(gs=t,t=o))}return t}(),r!==o?(n=gs,As++,(s=_s())===o&&(s=Qs()),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=gn(r)):(gs=t,t=o)):(gs=t,t=o)),As--,t===o&&(r=o,0===As&&Ss(wt)),t}())!==o?e.substring(n,gs):s)!==o?(ys=t,t=Jn(r,n)):(gs=t,t=o),t}(),r!==o&&(ys=t,r=to(r)),r}())===o&&(t=function(){var t,r,n;return t=gs,(r=Rs())!==o?(aa(),e.substr(gs,2)===me?(n=me,gs+=2):(n=o,0===As&&Ss(Wr)),n===o&&(n=null),ys=t,t=no(r,n)):(gs=t,t=o),t}()),t}function Va(){var t,r,n,s;return t=gs,64===e.charCodeAt(gs)?(r=U,gs++):(r=o,0===As&&Ss(dr)),r!==o?(n=gs,(n=(s=Rs())!==o?e.substring(n,gs):s)!==o?(s=function(){var t,r,n,s,a,i,c;if(t=gs,40===e.charCodeAt(gs)?(r=ge,gs++):(r=o,0===As&&Ss(Hr)),r!==o){for(aa(),n=[],s=gs,(a=ja())!==o?(i=aa(),44===e.charCodeAt(gs)?(c=ye,gs++):(c=o,0===As&&Ss(Gr)),c!==o?(aa(),ys=s,s=oo(a)):(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,(a=ja())!==o?(i=aa(),44===e.charCodeAt(gs)?(c=ye,gs++):(c=o,0===As&&Ss(Gr)),c!==o?(aa(),ys=s,s=oo(a)):(gs=s,s=o)):(gs=s,s=o);(s=ja())===o&&(s=null),a=aa(),41===e.charCodeAt(gs)?(i=ve,gs++):(i=o,0===As&&Ss(Yr)),i!==o?(ys=t,t=so(n,s)):(gs=t,t=o)}else gs=t,t=o;return t}(),s===o&&(s=null),ys=t,t=ao(n,s)):(gs=t,t=o)):(gs=t,t=o),t}function Ua(){var e,t,r;for(e=[],t=gs,(r=Va())!==o?(aa(),ys=t,t=io(r)):(gs=t,t=o);t!==o;)e.push(t),t=gs,(r=Va())!==o?(aa(),ys=t,t=io(r)):(gs=t,t=o);return e}function Qa(){var t,r,n;return t=gs,e.substr(gs,7)===be?(r=be,gs+=7):(r=o,0===As&&Ss(Jr)),r!==o?(aa(),(n=Rs())!==o?(ys=t,t=co(n)):(gs=t,t=o)):(gs=t,t=o),t}function qa(){var t,r;return t=gs,e.substr(gs,8)===Ae?(r=Ae,gs+=8):(r=o,0===As&&Ss(Zr)),r!==o&&(ys=t,r=$o()),r}function Ka(){var t,r,n,s;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),(s=Ws())!==o?(ys=t,t=Eo(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function za(){var t,r,n,s,a;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),s=gs,(s=(a=js())!==o?e.substring(s,gs):a)!==o?(ys=t,t=To(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Wa(){var t,r,n,s,a;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),s=gs,(s=(a=Ks())!==o?e.substring(s,gs):a)!==o?(ys=t,t=Co(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Ha(){var t,r,n,s,a;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),s=gs,(s=(a=Vs())!==o?e.substring(s,gs):a)!==o?(ys=t,t=Do(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Ga(){var t;return(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Pa()!==o?(aa(),e.substr(gs,2)===me?(s=me,gs+=2):(s=o,0===As&&Ss(Wr)),s===o&&(s=null),aa(),(a=Rs())!==o?(aa(),(i=Ka())===o&&(i=null),aa(),(c=Ja())===o&&(c=null),aa(),(l=Xa())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=Oo(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=xa())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Ha())===o&&(c=null),aa(),(l=Za())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=Ro(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Ra()!==o?(aa(),e.substr(gs,2)===me?(s=me,gs+=2):(s=o,0===As&&Ss(Wr)),s===o&&(s=null),aa(),(a=Rs())!==o?(aa(),(i=za())===o&&(i=null),aa(),(c=qa())===o&&(c=null),aa(),ys=t,t=So(r,s,a,i,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),La()!==o?(aa(),e.substr(gs,2)===me?(s=me,gs+=2):(s=o,0===As&&Ss(Wr)),s===o&&(s=null),aa(),(a=Rs())!==o?(aa(),(i=Ka())===o&&(i=null),aa(),(c=qa())===o&&(c=null),aa(),ys=t,t=No(r,s,a,i,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),e.substr(gs,3)===Ie?(n=Ie,gs+=3):(n=o,0===As&&Ss(an)),n!==o?(aa(),(s=Rs())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=qa())===o&&(c=null),aa(),ys=t,t=ts(r,s,a,i,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=_a())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Ka())===o&&(c=null),aa(),(l=qa())===o&&(l=null),aa(),ys=t,t=Io(r,s,a,i,c,l)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=Ma())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Wa())===o&&(c=null),aa(),(l=ei())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=_o(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=ka())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Wa())===o&&(c=null),aa(),(l=ti())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=Bo(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}()),t}function Ya(){var e,t,r;for(e=gs,t=[],r=Ga();r!==o;)t.push(r),r=Ga();return ys=e,Fo(t)}function Ja(){var t,r,n,s;return t=gs,e.substr(gs,5)===Ce?(r=Ce,gs+=5):(r=o,0===As&&Ss(nn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),(s=function(){var t,r,n,s,a;return As++,t=gs,47===e.charCodeAt(gs)?(r=I,gs++):(r=o,0===As&&Ss(Kt)),r!==o?(n=gs,s=function(){var t,r,n,s;if(t=gs,r=function(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),Qe.test(n)?gs++:(n=o,0===As&&Ss(zt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t===o&&(t=ta())===o&&(t=na()),t}(),r!==o){for(n=[],s=ea();s!==o;)n.push(s),s=ea();t=r=[r,n]}else gs=t,t=o;return t}(),(n=s!==o?e.substring(n,gs):s)!==o?(47===e.charCodeAt(gs)?(s=I,gs++):(s=o,0===As&&Ss(Kt)),s!==o?(a=gs,function(){var e,t;for(e=[],t=Bs();t!==o;)e.push(t),t=Bs()}(),a=e.substring(a,gs),ys=t,t=Bn(n,a)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),As--,t===o&&(r=o,0===As&&Ss(qt)),t}())!==o?(ys=t,t=Mo(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Xa(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,6)===De?(r=De,gs+=6):(r=o,0===As&&Ss(on)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Ks(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Ks(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=xo(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Za(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,5)===Fe?(r=Fe,gs+=5):(r=o,0===As&&Ss(sn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Vs(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Vs(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=ko(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function ei(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,5)===Fe?(r=Fe,gs+=5):(r=o,0===As&&Ss(sn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Ks(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Ks(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=Po(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function ti(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,5)===Fe?(r=Fe,gs+=5):(r=o,0===As&&Ss(sn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Ks(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Ks(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=Lo(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function ri(){var t,r,n,s;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=Rs())!==o?(aa(),ys=t,t=es(r,s)):(gs=t,t=o)):(gs=t,t=o),t}function ni(){var t,r,n,s,a,i,c;if(t=gs,r=gs,(r=(n=Rs())!==o?e.substring(r,gs):n)!==o){for(n=gs,s=[],a=gs,46===e.charCodeAt(gs)?(i=h,gs++):(i=o,0===As&&Ss(At)),i!==o&&(c=Rs())!==o?a=i=[i,c]:(gs=a,a=o);a!==o;)s.push(a),a=gs,46===e.charCodeAt(gs)?(i=h,gs++):(i=o,0===As&&Ss(At)),i!==o&&(c=Rs())!==o?a=i=[i,c]:(gs=a,a=o);n=e.substring(n,gs),ys=t,t=rs(r,n)}else gs=t,t=o;return t}function oi(){var t;return(t=function(){var t,r,n,s;return t=gs,(r=ni())!==o?(64===e.charCodeAt(gs)?(n=U,gs++):(n=o,0===As&&Ss(dr)),n!==o&&(s=Ta())!==o?(ys=t,t=os(r,s)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=ni()),t}function si(){var t,r,n,s;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,4)===se?(r=se,gs+=4):(r=o,0===As&&Ss(Rr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(aa(),n=gs,(n=(s=function(){var t,r,n,s,a,i,c;return t=gs,(r=function(){var t,r,n,s,a;if(t=gs,r=gs,n=function(){var t;return t=e.charAt(gs),ze.test(t)?gs++:(t=o,0===As&&Ss(or)),t}(),n!==o){for(s=[],a=e.charAt(gs),Ge.test(a)?gs++:(a=o,0===As&&Ss(pr));a!==o;)s.push(a),a=e.charAt(gs),Ge.test(a)?gs++:(a=o,0===As&&Ss(pr));r=n=[n,s]}else gs=r,r=o;return r!==o?e.substring(t,gs):r}())!==o?(58===e.charCodeAt(gs)?(n=B,gs++):(n=o,0===As&&Ss(cr)),n!==o&&(s=function(){var t,r,n;return t=gs,e.substr(gs,2)===d?(r=d,gs+=2):(r=o,0===As&&Ss(mt)),r!==o&&(n=function(){var t,r,n,s,a,i;return t=gs,r=gs,n=function(){var t,r,n;for(t=gs,r=[],(n=pa())===o&&(n=ua())===o&&(n=e.charAt(gs),Ye.test(n)?gs++:(n=o,0===As&&Ss(fr)));n!==o;)r.push(n),(n=pa())===o&&(n=ua())===o&&(n=e.charAt(gs),Ye.test(n)?gs++:(n=o,0===As&&Ss(fr)));return e.substring(t,gs)}(),64===e.charCodeAt(gs)?(s=U,gs++):(s=o,0===As&&Ss(dr)),s!==o?r=n=[n,s]:(gs=r,r=o),r===o&&(r=null),n=function(){var t,r,n,s;return t=gs,r=function(){var t,r,n,s;return t=gs,91===e.charCodeAt(gs)?(r=S,gs++):(r=o,0===As&&Ss(Ht)),r!==o?(n=function(){var t,r,n,s,a,i,c,l,u,p,d,f,h,m;return t=gs,r=gs,(n=fa())!==o&&(s=fa())!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=fa())!==o&&(u=da())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o),r===o&&(r=gs,e.substr(gs,2)===Q?(n=Q,gs+=2):(n=o,0===As&&Ss(mr)),n!==o&&(s=fa())!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=fa())!==o&&(u=da())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o),r===o&&(r=gs,(n=ha())===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=fa())!==o&&(u=da())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o),r===o&&(r=gs,n=gs,(s=fa())===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=da())!==o?r=n=[n,s,a,i,c,l]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?((i=fa())===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=da())!==o?r=n=[n,s,a,i,c]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?((l=fa())===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=da())!==o?r=n=[n,s,a,i]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?(l=gs,(u=fa())!==o?((p=fa())===o&&(p=null),l=u=[u,p]):(gs=l,l=o),l===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=da())!==o?r=n=[n,s,a]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?(l=gs,(u=fa())!==o?(p=gs,(d=fa())!==o?((f=fa())===o&&(f=null),p=d=[d,f]):(gs=p,p=o),p===o&&(p=null),l=u=[u,p]):(gs=l,l=o),l===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=ha())!==o?r=n=[n,s,a]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?(l=gs,(u=fa())!==o?(p=gs,(d=fa())!==o?(f=gs,(h=fa())!==o?((m=fa())===o&&(m=null),f=h=[h,m]):(gs=f,f=o),f===o&&(f=null),p=d=[d,f]):(gs=p,p=o),p===o&&(p=null),l=u=[u,p]):(gs=l,l=o),l===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o?r=n=[n,s]:(gs=r,r=o))))))))),r!==o?e.substring(t,gs):r}(),n===o&&(n=function(){var t,r,n,s,a,i,c;if(t=gs,118===e.charCodeAt(gs)?(r=C,gs++):(r=o,0===As&&Ss(jt)),r!==o){if(n=gs,s=[],(a=la())!==o)for(;a!==o;)s.push(a),a=la();else s=o;if((n=s!==o?e.substring(n,gs):s)!==o)if(46===e.charCodeAt(gs)?(s=h,gs++):(s=o,0===As&&Ss(At)),s!==o){if(a=gs,i=[],c=e.charAt(gs),Je.test(c)?gs++:(c=o,0===As&&Ss(hr)),c!==o)for(;c!==o;)i.push(c),c=e.charAt(gs),Je.test(c)?gs++:(c=o,0===As&&Ss(hr));else i=o;(a=i!==o?e.substring(a,gs):i)!==o?t=r=[r,n,s,a]:(gs=t,t=o)}else gs=t,t=o;else gs=t,t=o}else gs=t,t=o;return t}()),n!==o?(93===e.charCodeAt(gs)?(s=N,gs++):(s=o,0===As&&Ss(Gt)),s!==o?t=r=[r,n,s]:(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(n=gs,As++,s=ya(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t===o&&(t=gs,(r=ma())!==o?(n=gs,As++,s=ya(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t===o&&(t=function(){var t,r,n;for(t=gs,r=[],n=ya();n!==o;)r.push(n),n=ya();return e.substring(t,gs)}())),t}(),n!==o?(s=gs,58===e.charCodeAt(gs)?(a=B,gs++):(a=o,0===As&&Ss(cr)),a!==o?(i=function(){var t,r,n;for(t=gs,r=[],n=ca();n!==o;)r.push(n),n=ca();return e.substring(t,gs)}(),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),t=r=[r,n,s]):(gs=t,t=o),t}())!==o?t=r=[r,n,va()]:(gs=t,t=o),t===o&&(t=function(){var t,r,n,s,a,i,c,l;if(t=gs,r=gs,47===e.charCodeAt(gs)?(n=I,gs++):(n=o,0===As&&Ss(Kt)),n!==o){if(s=gs,(a=wa())!==o){for(i=[],c=gs,47===e.charCodeAt(gs)?(l=I,gs++):(l=o,0===As&&Ss(Kt)),l!==o?c=l=[l,ba()]:(gs=c,c=o);c!==o;)i.push(c),c=gs,47===e.charCodeAt(gs)?(l=I,gs++):(l=o,0===As&&Ss(Kt)),l!==o?c=l=[l,ba()]:(gs=c,c=o);s=a=[a,i]}else gs=s,s=o;s===o&&(s=null),r=n=[n,s]}else gs=r,r=o;return r!==o?e.substring(t,gs):r}())===o&&(t=function(){var t,r,n,s,a,i;if(t=gs,r=gs,(n=wa())!==o){for(s=[],a=gs,47===e.charCodeAt(gs)?(i=I,gs++):(i=o,0===As&&Ss(Kt)),i!==o?a=i=[i,ba()]:(gs=a,a=o);a!==o;)s.push(a),a=gs,47===e.charCodeAt(gs)?(i=I,gs++):(i=o,0===As&&Ss(Kt)),i!==o?a=i=[i,ba()]:(gs=a,a=o);r=n=[n,s]}else gs=r,r=o;return r!==o?e.substring(t,gs):r}(),t===o&&(t="")),t}())!==o?(a=gs,63===e.charCodeAt(gs)?(i=j,gs++):(i=o,0===As&&Ss(lr)),i!==o?a=i=[i,c=$a()]:(gs=a,a=o),a===o&&(a=null),i=gs,35===e.charCodeAt(gs)?(c=V,gs++):(c=o,0===As&&Ss(ur)),c!==o?i=c=[c,Ea()]:(gs=i,i=o),i===o&&(i=null),t=r=[r,n,s,a,i]):(gs=t,t=o)):(gs=t,t=o),t}())!==o?e.substring(n,gs):s)!==o?(s=aa(),ys=t,t=as(n)):(gs=t,t=o)):(gs=t,t=o),t}function ai(){var t,r;return(t=function(){var t,r,n,s,a,i,c;return t=gs,r=gs,(r=(n=Rs())!==o?e.substring(r,gs):n)!==o?(n=ia(),s=gs,a=function(){var t,r,n,s;return t=gs,e.substr(gs,2)===L?(r=L,gs+=2):(r=o,0===As&&Ss(rr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),(s=a!==o?e.substring(s,gs):a)!==o?(a=ia(),i=gs,(i=(c=Rs())!==o?e.substring(i,gs):c)!==o?(ys=t,t=us(r,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=gs,t=(r=Rs())!==o?e.substring(t,gs):r),t}function ii(){var t;return(t=function(){var t,r,n,s,a,i;return t=gs,sa()!==o?(aa(),(r=oi())!==o?(e.substr(gs,2)===Se?(n=Se,gs+=2):(n=o,0===As&&Ss(cn)),n!==o?(ia(),s=function(){var t,r,n,s,a,i,c;if(t=gs,(r=ai())!==o){for(ia(),n=[],s=gs,44===e.charCodeAt(gs)?(a=ye,gs++):(a=o,0===As&&Ss(Gr)),a!==o?(i=ia(),(c=ai())!==o?s=a=[a,i,c]:(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,44===e.charCodeAt(gs)?(a=ye,gs++):(a=o,0===As&&Ss(Gr)),a!==o?(i=ia(),(c=ai())!==o?s=a=[a,i,c]:(gs=s,s=o)):(gs=s,s=o);ys=t,t=ps(r,n)}else gs=t,t=o;return t}(),s!==o?(ia(),125===e.charCodeAt(gs)?(a=R,gs++):(a=o,0===As&&Ss(nr)),a!==o?(aa(),(i=si())===o&&(i=null),ys=t,t=ls(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a;return t=gs,sa()!==o?(aa(),(r=oi())!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o?(s=function(){var t,r,n,s;return t=gs,42===e.charCodeAt(gs)?(r=ae,gs++):(r=o,0===As&&Ss(_r)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=si())===o&&(a=null),ys=t,t=is(r,a)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n;return t=gs,sa()!==o?(aa(),(r=function(){var t;return(t=function(){var t,r,n,s,a,i,c;return t=gs,(r=ni())!==o?(64===e.charCodeAt(gs)?(n=U,gs++):(n=o,0===As&&Ss(dr)),n!==o&&(s=Ta())!==o?(46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Rs())!==o?e.substring(i,gs):c)!==o?(ys=t,t=ns(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=ni()),t}())!==o?(aa(),(n=si())===o&&(n=null),ys=t,t=cs(r,n)):(gs=t,t=o)):(gs=t,t=o),t}()),t}function ci(){var t;return(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,5)===ee?(r=ee,gs+=5):(r=o,0===As&&Ss(Mr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=lo(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,11)===te?(r=te,gs+=11):(r=o,0===As&&Ss(xr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=po(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,5)===re?(r=re,gs+=5):(r=o,0===As&&Ss(kr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=fo(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,11)===ne?(r=ne,gs+=11):(r=o,0===As&&Ss(Pr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=uo(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,4)===O?(r=O,gs+=4):(r=o,0===As&&Ss(Jt)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Rs())!==o?(aa(),123===e.charCodeAt(gs)?(a=we,gs++):(a=o,0===As&&Ss(Xr)),a!==o?(aa(),i=function(){var e,t,r;for(e=gs,t=[],r=ri();r!==o;)t.push(r),r=ri();return ys=e,Zo(t)}(),aa(),125===e.charCodeAt(gs)?(c=R,gs++):(c=o,0===As&&Ss(nr)),c!==o?(ys=t,t=Xo(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,7)===Z?(r=Z,gs+=7):(r=o,0===As&&Ss(Or)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=ho(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i;return t=gs,r=Ua(),aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,6)===oe?(r=oe,gs+=6):(r=o,0===As&&Ss(Lr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Rs())!==o?(aa(),e.substr(gs,7)===be?(a=be,gs+=7):(a=o,0===As&&Ss(Jr)),a!==o?(aa(),(i=function(){var e;return(e=function(){var e,t;return e=gs,Ra()!==o?(aa(),(t=za())===o&&(t=null),aa(),ys=e,e=mo(t)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r;return e=gs,Ma()!==o?(aa(),(t=Wa())===o&&(t=null),aa(),(r=ei())===o&&(r=null),aa(),ys=e,e=go(t,r)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r;return e=gs,ka()!==o?(aa(),(t=Wa())===o&&(t=null),aa(),(r=ti())===o&&(r=null),aa(),ys=e,e=yo(t,r)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r;return e=gs,xa()!==o?(aa(),(t=Ha())===o&&(t=null),aa(),(r=Za())===o&&(r=null),aa(),ys=e,e=vo(t,r)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r,n;return e=gs,Pa()!==o?(aa(),(t=Ka())===o&&(t=null),aa(),(r=Ja())===o&&(r=null),aa(),(n=Xa())===o&&(n=null),aa(),ys=e,e=bo(t,r,n)):(gs=e,e=o),e}())===o&&(e=function(){var e,t;return e=gs,La()!==o?(aa(),(t=Ka())===o&&(t=null),aa(),ys=e,e=wo(t)):(gs=e,e=o),e}()),e}())!==o?(aa(),ys=t,t=Ao(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,3)===M?(r=M,gs+=3):(r=o,0===As&&Ss(Xt)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Rs())!==o?(aa(),123===e.charCodeAt(gs)?(a=we,gs++):(a=o,0===As&&Ss(Xr)),a!==o?(aa(),i=function(){var t,r,n;return t=gs,r=function(){var t;return t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Pa()!==o?(aa(),ys=t,t=Uo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),La()!==o?(aa(),ys=t,t=Qo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n,s;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=_a())!==o?(aa(),ys=t,t=qo(r,s)):(gs=t,t=o)):(gs=t,t=o),t}())),t}(),r!==o?(aa(),n=function(){var t;return t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Ra()!==o?(aa(),ys=t,t=Ko(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),La()!==o?(aa(),ys=t,t=zo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Pa()!==o?(aa(),ys=t,t=Wo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Ma()!==o?(aa(),ys=t,t=Ho(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),ka()!==o?(aa(),ys=t,t=Go(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),xa()!==o?(aa(),ys=t,t=Yo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n,s;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n===o&&(e.substr(gs,3)===Ie?(n=Ie,gs+=3):(n=o,0===As&&Ss(an))),n!==o?(aa(),(s=_a())!==o?(aa(),ys=t,t=Jo(r,n,s)):(gs=t,t=o)):(gs=t,t=o),t}())))))),t}(),n!==o?(ys=t,t=Vo(r,n)):(gs=t,t=o)):(gs=t,t=o),t}(),i!==o?(aa(),125===e.charCodeAt(gs)?(c=R,gs++):(c=o,0===As&&Ss(nr)),c!==o?(ys=t,t=jo(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}()),t}const li="concerto.metamodel@1.0.0";function ui(e,t,r){return[e].concat(function(e,t){var r,n=new Array(e.length);for(r=0;r<e.length;r++)n[r]=e[r][t];return n}(t,r))}function pi(e){return null!==e?e:[]}function di(e){return!!e}function fi(e){if(r?.skipLocationNodes)return;const t=e.start,n=e.end;t.$class=`${li}.Position`,n.$class=`${li}.Position`;const o={$class:`${li}.Range`,start:t,end:n};return e.source&&e.source[0]&&(o.source=e.source[0]),{location:o}}if(n=i(),r.peg$library)return{peg$result:n,peg$currPos:gs,peg$FAILED:o,peg$maxFailExpected:ws,peg$maxFailPos:bs};if(n!==o&&gs===e.length)return n;throw n!==o&&gs<e.length&&Ss({type:"end"}),function(e,r,n){return new t(t.buildMessage(e,r),e,r,n)}(ws,bs<e.length?e.charAt(bs):null,bs<e.length?Is(bs,bs+1):Is(bs,bs))}}},303:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(348),o=r(206),s=r(713);e.exports={parse:function(e,t,r){try{return o.parse(e,r)}catch(e){throw e.location&&e.location.start?new s(e.message,e.location,t):e}},parseModels:function(e,t){const r={$class:`${n}.Models`,models:[]};return e.forEach((e=>{let n=o.parse(e,t);r.models.push(n)})),r}}},993:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(348),{isNull:o}=r(20).NullUtil;function s(e){let t="";switch(e.$class){case`${n}.DecoratorTypeReference`:t+=`${e.type.name}${e.isArray?"[]":""}`;break;case`${n}.DecoratorString`:t+=`"${e.value}"`;break;default:t+=`${e.value}`}return t}function a(e){let t="";return t+=`@${e.name}`,e.arguments&&(t+="(",t+=e.arguments.map(s).join(","),t+=")"),t}function i(e,t){let r="";return r+=e.map(a).join(`\n${t}`),r+=`\n${t}`,r}function c(e){let t="";switch(e.$class){case`${n}.EnumProperty`:break;case`${n}.BooleanScalar`:case`${n}.BooleanProperty`:case`${n}.BooleanMapValueType`:t+=" Boolean";break;case`${n}.DateTimeProperty`:case`${n}.DateTimeScalar`:case`${n}.DateTimeMapKeyType`:case`${n}.DateTimeMapValueType`:t+=" DateTime";break;case`${n}.DoubleProperty`:case`${n}.DoubleScalar`:case`${n}.DoubleMapValueType`:t+=" Double";break;case`${n}.IntegerProperty`:case`${n}.IntegerScalar`:case`${n}.IntegerMapValueType`:t+=" Integer";break;case`${n}.LongProperty`:case`${n}.LongScalar`:case`${n}.LongMapValueType`:t+=" Long";break;case`${n}.StringProperty`:case`${n}.StringScalar`:case`${n}.StringMapKeyType`:case`${n}.StringMapValueType`:t+=" String";break;case`${n}.ObjectProperty`:case`${n}.ObjectMapKeyType`:case`${n}.ObjectMapValueType`:case`${n}.RelationshipProperty`:case`${n}.RelationshipMapValueType`:t+=` ${e.type.name}`}return t}function l(e){let t="",r="",s="";switch(e.$class){case`${n}.EnumProperty`:break;case`${n}.BooleanProperty`:case`${n}.BooleanScalar`:!0!==e.defaultValue&&!1!==e.defaultValue||(e.defaultValue?r+=" default=true":r+=" default=false");break;case`${n}.DateTimeProperty`:case`${n}.DateTimeScalar`:e.defaultValue&&(t+=` default="${e.defaultValue}"`);break;case`${n}.DoubleProperty`:case`${n}.DoubleScalar`:o(e.defaultValue)||(r+=` default=${e.defaultValue.toFixed(Math.max(1,(e.defaultValue.toString().split(".")[1]||[]).length))}`),e.validator&&(s+=` range=[${e.validator.lower?e.validator.lower:""},${e.validator.upper?e.validator.upper:""}]`);break;case`${n}.IntegerProperty`:case`${n}.IntegerScalar`:case`${n}.LongProperty`:case`${n}.LongScalar`:o(e.defaultValue)||(r+=` default=${e.defaultValue.toString()}`),e.validator&&(s+=` range=[${e.validator.lower?e.validator.lower:""},${e.validator.upper?e.validator.upper:""}]`);break;case`${n}.StringProperty`:case`${n}.StringScalar`:e.defaultValue&&(r+=` default="${e.defaultValue}"`),e.validator&&(s+=` regex=/${e.validator.pattern}/${e.validator.flags}`),e.lengthValidator&&(s+=` length=[${e.lengthValidator.minLength?e.lengthValidator.minLength:""},${e.lengthValidator.maxLength?e.lengthValidator.maxLength:""}]`);break;case`${n}.ObjectProperty`:e.defaultValue&&(r+=` default="${e.defaultValue}"`)}return t+=r,t+=s,t}e.exports={toCTO:function(e){let t="";return e.concertoVersion&&(t+=`concerto version "${e.concertoVersion}"`,t+="\n",t+="\n"),e.decorators&&e.decorators.length>0&&(t+=i(e.decorators,"")),t+=`namespace ${e.namespace}`,e.imports&&e.imports.length>0&&(t+="\n",e.imports.forEach((e=>{switch(e.$class){case`${n}.ImportType`:case`${n}.ImportTypeFrom`:t+=`\nimport ${e.namespace}.${e.name}`;break;case`${n}.ImportAll`:case`${n}.ImportAllFrom`:t+=`\nimport ${e.namespace}.*`;break;case`${n}.ImportTypes`:{const r=e.aliasedTypes?new Map(e.aliasedTypes.map((e=>{let{name:t,aliasedName:r}=e;return[t,r]}))):new Map,n=e.types.map((e=>r.has(e)?`${e} as ${r.get(e)}`:e)).join(",");t+=`\nimport ${e.namespace}.{${n}}`;break}default:throw new Error("Unrecognized import")}e.uri&&(t+=` from ${e.uri}`)}))),e.declarations&&e.declarations.length>0&&e.declarations.forEach((e=>{t+=`\n\n${function(e){let t="";if(e.decorators&&(t+=i(e.decorators,"")),function(e){return[`${n}.BooleanScalar`,`${n}.IntegerScalar`,`${n}.LongScalar`,`${n}.DoubleScalar`,`${n}.StringScalar`,`${n}.DateTimeScalar`].includes(e.$class)}(e))t+=`scalar ${e.name} extends`,t+=c(e),t+=l(e);else if(function(e){return e.$class===`${n}.MapDeclaration`}(e)){const r=[e.key,e.value];t+=`map ${e.name} {`,r.forEach((e=>{t+=`\n ${function(e){let t="";return e.decorators&&(t+=i(e.decorators," ")),e.$class===`${n}.RelationshipMapValueType`?t+="--\x3e":t+="o",t+=c(e),t}(e)}`})),t+="\n}"}else{switch(e.isAbstract&&(t+="abstract "),e.$class){case`${n}.AssetDeclaration`:t+=`asset ${e.name} `;break;case`${n}.ConceptDeclaration`:t+=`concept ${e.name} `;break;case`${n}.EventDeclaration`:t+=`event ${e.name} `;break;case`${n}.ParticipantDeclaration`:t+=`participant ${e.name} `;break;case`${n}.TransactionDeclaration`:t+=`transaction ${e.name} `;break;case`${n}.EnumDeclaration`:t+=`enum ${e.name} `}if(e.identified&&(e.identified.$class===`${n}.IdentifiedBy`?t+=`identified by ${e.identified.name} `:t+="identified "),e.superType){if(e.superType.name===e.name)throw new Error(`The declaration "${e.name}" cannot extend itself.`);t+=`extends ${e.superType.name} `}t+="{",e.properties.forEach((e=>{t+=`\n ${function(e){let t="";return e.decorators&&(t+=i(e.decorators," ")),e.$class===`${n}.RelationshipProperty`?t+="--\x3e":t+="o",t+=c(e),e.isArray&&(t+="[]"),t+=` ${e.name}`,t+=l(e),e.isOptional&&(t+=" optional"),t}(e)}`})),t+="\n}"}return t}(e)}`})),t}}},250:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,i){i=i||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var i=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return i.long?(c=e,(l=Math.abs(c))>=o?a(c,l,o,"day"):l>=n?a(c,l,n,"hour"):l>=r?a(c,l,r,"minute"):l>=t?a(c,l,t,"second"):c+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},431:e=>{"use strict";e.exports=e=>{const t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},237:(e,t,r)=>{"use strict";const n=r(713),o=r(303),s=r(993),a=r(548);e.exports={ParseException:n,Parser:o,Printer:s,External:a}},833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==o&&"env"in o&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},20:(e,t,r)=>{"use strict";const n=r(786),o=r(516),s=r(539),a=r(705),i=r(587),c=r(357),l=r(390),u=r(597),p=r(931),d=r(870),f=r(529),h=r(934),m=r(830),g=r(526),y=r(284),v=r(405),b=r(795),w=r(116);e.exports={BaseException:n,BaseFileException:o,FileDownloader:s,CompositeFileLoader:a,DefaultFileLoader:i,GitHubFileLoader:c,HTTPFileLoader:l,Writer:u,FileWriter:p,InMemoryWriter:f,ModelWriter:d,Logger:h,TypedStack:m,Label:g,Identifiers:y,ErrorCodes:v,NullUtil:b,Warning:w}},786:(e,t,r)=>{"use strict";const n=r(775),o=r(405);class s extends Error{constructor(e,t,r){super(e),this.component=t||n.name,this.name=this.constructor.name,this.message=e,this.errorType=r||o.DEFAULT_BASE_EXCEPTION,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}e.exports=s},516:(e,t,r)=>{"use strict";const n=r(786);e.exports=class extends n{constructor(e,t,r,n,o){super(r||e,o),this.fileLocation=t,this.shortMessage=e,this.fileName=n}getFileLocation(){return this.fileLocation}getShortMessage(){return this.shortMessage}getFileName(){return this.fileName}}},405:e=>{"use strict";e.exports={DEFAULT_BASE_EXCEPTION:"DefaultBaseException",DEFAULT_VALIDATOR_EXCEPTION:"DefaultValidatorException",REGEX_VALIDATOR_EXCEPTION:"RegexValidatorException",TYPE_NOT_FOUND_EXCEPTION:"TypeNotFoundException",DEPRECATION_WARNING:"DeprecationWarning",CONCERTO_DEPRECATION_001:"concerto-dep:001",CONCERTO_DEPRECATION_002:"concerto-dep:002"}},539:(e,t,r)=>{"use strict";const n=r(986)("concerto:FileDownloader"),o=r(573),s=e=>[].concat(...e),a=e=>e.filter(Boolean),i=async(e,t)=>{const r=e.response&&e.response.status&&200!==e.response.status,n=e.code&&"ENOTFOUND"===e.code;if(r||n){const e=new Error(`Unable to download external model dependency '${t.url}'`);throw e.code="MISSING_DEPENDENCY",e}throw new Error("Failed to load model file. Job: "+t.url+" Details: "+e)};e.exports=class{constructor(e,t,r=10){this.fileLoader=e,this.concurrency=r,this.getExternalImports=t}downloadExternalDependencies(e,t){n("downloadExternalDependencies");const r=new Set;t||(t={});const c=s(e.map((e=>{const n=this.getExternalImports(e);return Object.keys(n).map((e=>({downloadedUris:r,url:n[e],options:t})))})));return o.withConcurrency(this.concurrency).for(c).handleError(i).process((e=>this.runJob(e,this.fileLoader))).then((({results:e})=>a(s(e))))}runJob(e,t){const r=e.downloadedUris,c=e.options,l=e.url;return r.add(l),n("runJob","Loading",l),t.load(l,c).then((async e=>{n("runJob","Loaded",l);const u=this.getExternalImports(e),p=Array.from(new Set(Object.keys(u).map((e=>u[e]))));return n("runJob","importedUris",p),(await o.withConcurrency(this.concurrency).for(p).handleError(i).process((e=>{if(!r.has(e))return this.runJob({options:c,url:e,downloadedUris:r},t)})).then((({results:e})=>a(s(e))))).concat([e])}))}}},931:(e,t,r)=>{"use strict";const n=r(995),o=r(495),s=r(597);e.exports=class extends s{constructor(e){super(),this.outputDirectory=e,this.relativeDir=null,this.fileName=null,n.mkdirSync(e,{recursive:!0})}openFile(e){this.fileName=e,this.relativeDir=null}openRelativeFile(e,t){this.relativeDir=e,this.fileName=t}writeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeLine(e,t)}writeBeforeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeBeforeLine(e,t)}closeFile(){if(!this.fileName)throw new Error("No file open");let e=this.outputDirectory;this.relativeDir&&(e=o.resolve(e,this.relativeDir)),e=o.resolve(e,this.fileName),n.mkdirSync(o.dirname(e),{recursive:!0}),n.writeFileSync(e,this.getBuffer()),this.fileName=null,this.relativeDir=null,this.clearBuffer()}}},284:e=>{"use strict";const t=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u;e.exports={normalizeIdentifier:function(e,r=-1){const n=(e,t)=>{let r="";for(const e of t)r+=`_${e.codePointAt(0).toString(16)}`;return r};let o=e??String(e);if("string"!=typeof o)throw new Error(`Unsupported identifier type, '${typeof o}'.`);if(o=o.replace(/^\p{Nd}/u,"_$&").replace(/[-‐−@#:;><|/\\\u200c\u200d]/g,"_").replace(/\s/g,"_").replace(/(?!\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D|\\u[0-9A-Fa-f]{4})(.)/gu,n).replace(/([\uD800-\uDFFF])/g,n),r>0&&(o=o.substring(0,r)),!t.test(o))throw new Error(`Unexpected error. Not able to escape identifier '${o}'.`);return o},ID_REGEX:t}},529:(e,t,r)=>{"use strict";const n=r(597);e.exports=class extends n{constructor(){super(),this.fileName="",this.data=new Map}openFile(e){this.fileName=e}closeFile(){this.data.set(this.fileName,this.getBuffer()),this.clearBuffer()}getFilesInMemory(){return this.data}}},526:e=>{"use strict";e.exports={labelToSentence:function(e=""){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z])([a-z])/g," $1$2").replace(/ +/g," ").replace(/^./,(e=>e.toUpperCase())).trim()},sentenceToLabel:function(e=""){const t=e.split(/[^A-Za-z0-9_-]+/);return t.forEach(((e,r)=>{t[r]=t[r].replace(/^./,(e=>e.toUpperCase()))})),t.join("").replace(/^./,(e=>e.toLowerCase()))}}},705:e=>{"use strict";e.exports=class{constructor(){this.fileLoaders=[]}addFileLoader(e){this.fileLoaders.push(e)}getFileLoaders(){return this.fileLoaders}clearFileLoaders(){this.fileLoaders=[]}accepts(e){for(let t=0;t<this.fileLoaders.length;t++)if(this.fileLoaders[t].accepts(e))return!0;return!1}load(e,t){for(let r=0;r<this.fileLoaders.length;r++){const n=this.fileLoaders[r];if(n.accepts(e))return n.load(e,t)}throw new Error("Failed to find a model file loader that can handle: "+e)}}},587:(e,t,r)=>{"use strict";const n=r(705),o=r(390),s=r(357);e.exports=class extends n{constructor(e){super();const t=new o(e),r=new s(e);this.addFileLoader(r),this.addFileLoader(t)}}},357:(e,t,r)=>{"use strict";const n=r(390);e.exports=class extends n{constructor(e){super(e)}accepts(e){return e.startsWith("github://")}load(e,t){const r="https://raw.githubusercontent.com/"+e.substring(9);return super.load(r,t)}}},390:e=>{"use strict";e.exports=class{constructor(e){this.processFile=e}accepts(e){return e.startsWith("http://")||e.startsWith("https://")}async load(e,t){t||(t={method:"GET",headers:{"Content-Type":"text/plain"}}),console.log(e);const r=await fetch(e,t);if(!r.ok)throw new Error(`HTTP request failed with status: ${r.status}`);const n=await r.text(),o=new URL(e),s="@"+(o.host+o.pathname).replace(/\//g,".");return this.processFile(s,n)}}},934:e=>{"use strict";const t={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},r=e=>e,n={};Object.keys(t).forEach((e=>{n[e]=(...n)=>((e,...n)=>{let o=e,s=n,a=s.shift();if(a&&"object"==typeof a&&a.level&&a.message){const e=a.padding&&a.padding[a.level];"error"===a.level&&a.stack?(o="error",a=`${a.message}\n${a.stack}`):Object.keys(t).includes(a.level)&&(o=a.level,a=a.message),a=e?`${e} ${a}`:a}s.unshift(a),(["error","warn"].includes(o)?console.error:console.log)(`${(new Date).toLocaleTimeString()} - ${o}:`,...s.map((e=>e instanceof Error?`${e.message}\n${e.stack}`:e)).map(r))})(e,...n)}));class o{static dispatch(e,...r){t[e]>t[this.level]||this.transports.forEach((t=>{t[e]&&t[e](...r)}))}static add(e){this.transports.push(e)}static error(...e){return this.dispatch("error",...e)}static warn(...e){return this.dispatch("warn",...e)}static info(...e){return this.dispatch("info",...e)}static log(...e){return this.info(...e)}static http(...e){return this.dispatch("http",...e)}static verbose(...e){return this.dispatch("verbose",...e)}static debug(...e){return this.dispatch("debug",...e)}static silly(...e){return this.dispatch("silly",...e)}}o.level="info",o.transports=[n],e.exports=o},870:(e,t,r)=>{"use strict";const n=r(995),o=r(495),s=r(431);e.exports={writeModelsToFileSystem:function(e,t,r={}){if(!t)throw new Error("`path` is a required parameter of writeModelsToFileSystem");const a=Object.assign({includeExternalModels:!0},r);e.forEach((function(e){if(e.external&&!a.includeExternalModels)return;const r=s(e.fileName).split("/").pop();n.writeFileSync(t+o.sep+r,e.definitions)}))}}},795:e=>{"use strict";e.exports=class{static isNull(e){return null==e}}},830:e=>{"use strict";e.exports=class{constructor(e){this.stack=[],this.push(e)}push(e,t){if(t&&!(e instanceof t))throw new Error("Did not find expected type "+t.constructor.name+" as argument to push. Found: "+e.toString());this.stack.push(e)}pop(e){return this.peek(e),this.stack.pop()}peek(e){if(this.stack.length<1)throw new Error("Stack is empty!");const t=this.stack[this.stack.length-1];if(e&&!(t instanceof e))throw new Error("Did not find expected type "+e+" on head of stack. Found: "+t);return t}clear(){this.stack=[]}}},116:e=>{"use strict";let t=!1;e.exports={printDeprecationWarning:function(e,r,n,s){const a=o.emitWarning;t||(t=!0,a(`DEPRECATED: ${e}`,{type:r,code:n,detail:s}))}}},597:e=>{"use strict";e.exports=class{constructor(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}writeBeforeLine(e,t){for(let t=0;t<e;t++)this.beforeBuffer+=" ";this.beforeBuffer+=t,this.beforeBuffer+="\n",this.linesWritten++}writeLine(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t),this.write("\n"),this.linesWritten++}getLineCount(){return this.linesWritten}writeIndented(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t)}write(e){if("string"!=typeof e)throw new Error("Can only append strings. Argument "+e+" has type "+typeof e);this.buffer+=e,this.linesWritten+=e.split(/\r\n|\r|\n/).length}getBuffer(){return this.beforeBuffer+this.buffer}clearBuffer(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}}},986:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==o&&"env"in o&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(77)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},77:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},558:()=>{},995:()=>{},495:()=>{},865:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[{"$class":"concerto.metamodel@1.0.0.Decorator","name":"DotNetNamespace","arguments":[{"$class":"concerto.metamodel@1.0.0.DecoratorString","value":"AccordProject.Concerto.Metamodel"}]}],"namespace":"concerto.metamodel@1.0.0","imports":[],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Position","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"line","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"column","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"offset","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Range","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"start","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"end","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"source","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TypeIdentifier","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"resolvedName","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorLiteral","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorString","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorNumber","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorBoolean","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorTypeReference","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Decorator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"arguments","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Identified","isAbstract":false,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IdentifiedBy","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Declaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapKeyType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapValueType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"key","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"value","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapKeyType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"EnumProperty"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ConceptDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isAbstract","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"identified","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"superType","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AssetDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ParticipantDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TransactionDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EventDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Property","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isOptional","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeProperty","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringRegexValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"pattern","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"flags","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringLengthValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"minLength","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"maxLength","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AliasedType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"aliasedName","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Import","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"uri","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportAll","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportTypes","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"types","isArray":true,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"aliasedTypes","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"AliasedType"},"isArray":true,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Model","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"sourceUri","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"concertoVersion","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"imports","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"declarations","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Models","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"models","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Model"},"isArray":true,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ScalarDeclaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}}]}')},775:e=>{"use strict";e.exports=JSON.parse('{"name":"@accordproject/concerto-util","version":"3.25.0","description":"Utilities for Concerto Modeling Language","homepage":"https://github.com/accordproject/concerto","engines":{"node":">=18","npm":">=10"},"main":"index.js","browser":"dist/concerto-util.js","typings":"types/index.d.ts","scripts":{"prepublishOnly":"npm run webpack","pretest":"npm run lint && npm run doc","lint":"eslint .","doc":"jsdoc --pedantic --recurse -c jsdoc.json","test":"nyc mocha --require test/setup.js --recursive -t 10000","test:watch":"nyc mocha --require test/setup.js --watch --recursive -t 10000","mocha":"mocha --recursive -t 10000","nyc":"nyc mocha --recursive -t 10000","build":"npm run build:types","postbuild":"npm run webpack","webpack":"webpack --config webpack.config.js --mode production","build:types":"tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types"},"repository":{"type":"git","url":"https://github.com/accordproject/concerto.git","directory":"packages/concerto-util"},"keywords":["blockchain","hyperledger","solutions"],"author":"accordproject.org","license":"Apache-2.0","devDependencies":{"chai":"4.3.6","chai-as-promised":"7.1.1","chai-things":"0.2.0","eslint":"8.57.1","jsdoc":"4.0.4","mocha":"10.8.2","node-polyfill-webpack-plugin":"4.0.0","nyc":"17.1.0","sinon":"19.0.2","tmp-promise":"3.0.3","typescript":"5.7.2","undici":"7.16.0","webpack":"5.96.1"},"dependencies":{"@supercharge/promise-pool":"1.7.0","debug":"4.3.7","slash":"3.0.0"},"browserslist":"> 0.25%, not dead","nyc":{"produce-source-map":"true","sourceMap":"inline","reporter":["lcov","text-summary","html","json"],"include":["lib/**/*.js"],"all":true,"check-coverage":true,"statements":99,"branches":93,"functions":98,"lines":99}}')}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}(237);var e,t},e.exports=n()},8487:e=>{var t;self,t=()=>{return e={573:(e,t,r)=>{"use strict";const n=r(187);e.exports=n.PromisePool},160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(160);t.PromisePoolExecutor=class{constructor(){this.tasks=[],this.items=[],this.errors=[],this.results=[],this.concurrency=10,this.handler=()=>{},this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}for(e){return this.items=e,this}withHandler(e){return this.handler=e,this}handleError(e){return this.errorHandler=e,this}hasReachedConcurrencyLimit(){return this.activeCount()>=this.concurrency}activeCount(){return this.tasks.length}async start(){return this.validateInputs(),await this.process()}validateInputs(){if("function"!=typeof this.handler)throw new Error("The first parameter for the .process(fn) method must be a function");if(!("number"==typeof this.concurrency&&this.concurrency>=1))throw new TypeError(`"concurrency" must be a number, 1 or up. Received "${this.concurrency}" (${typeof this.concurrency})`);if(!Array.isArray(this.items))throw new TypeError('"items" must be an array. Received '+typeof this.items);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw new Error("The error handler must be a function. Received "+typeof this.errorHandler)}async process(){for(const e of this.items)this.hasReachedConcurrencyLimit()&&await this.processingSlot(),this.startProcessing(e);return this.drained()}async processingSlot(){return this.waitForTaskToFinish()}async waitForTaskToFinish(){await Promise.race(this.tasks)}startProcessing(e){const t=this.createTaskFor(e).then((e=>{this.results.push(e),this.tasks.splice(this.tasks.indexOf(t),1)})).catch((r=>{if(this.tasks.splice(this.tasks.indexOf(t),1),this.errorHandler)return this.errorHandler(r,e);this.errors.push(n.PromisePoolError.createFrom(r,e))}));this.tasks.push(t)}async createTaskFor(e){return this.handler(e)}async drained(){return await this.drainActiveTasks(),{results:this.results,errors:this.errors}}async drainActiveTasks(){await Promise.all(this.tasks)}}},187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(241);class o{constructor(e){this.concurrency=10,this.items=null!=e?e:[],this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}for(e){return new o(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}async process(e){return(new n.PromisePoolExecutor).withConcurrency(this.concurrency).withHandler(e).handleError(this.errorHandler).for(this.items).start()}}t.PromisePool=o},599:(e,t,r)=>{"use strict";const n=r(330),o=r(673);class s extends Error{constructor(e,t,r){super(e),this.component=t||n.name,this.name=this.constructor.name,this.message=e,this.errorType=r||o.DEFAULT_BASE_EXCEPTION,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}e.exports=s},133:(e,t,r)=>{"use strict";const n=r(599);e.exports=class extends n{constructor(e,t,r,n,o){super(r||e,o),this.fileLocation=t,this.shortMessage=e,this.fileName=n}getFileLocation(){return this.fileLocation}getShortMessage(){return this.shortMessage}getFileName(){return this.fileName}}},673:e=>{"use strict";e.exports={DEFAULT_BASE_EXCEPTION:"DefaultBaseException",DEFAULT_VALIDATOR_EXCEPTION:"DefaultValidatorException",REGEX_VALIDATOR_EXCEPTION:"RegexValidatorException",TYPE_NOT_FOUND_EXCEPTION:"TypeNotFoundException",DEPRECATION_WARNING:"DeprecationWarning",CONCERTO_DEPRECATION_001:"concerto-dep:001",CONCERTO_DEPRECATION_002:"concerto-dep:002"}},168:(e,t,r)=>{"use strict";const n=r(833)("concerto:FileDownloader"),o=r(573),s=e=>[].concat(...e),a=e=>e.filter(Boolean),i=async(e,t)=>{const r=e.response&&e.response.status&&200!==e.response.status,n=e.code&&"ENOTFOUND"===e.code;if(r||n){const e=new Error(`Unable to download external model dependency '${t.url}'`);throw e.code="MISSING_DEPENDENCY",e}throw new Error("Failed to load model file. Job: "+t.url+" Details: "+e)};e.exports=class{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.fileLoader=e,this.concurrency=r,this.getExternalImports=t}downloadExternalDependencies(e,t){n("downloadExternalDependencies");const r=new Set;t||(t={});const c=s(e.map((e=>{const n=this.getExternalImports(e);return Object.keys(n).map((e=>({downloadedUris:r,url:n[e],options:t})))})));return o.withConcurrency(this.concurrency).for(c).handleError(i).process((e=>this.runJob(e,this.fileLoader))).then((e=>{let{results:t}=e;return a(s(t))}))}runJob(e,t){const r=e.downloadedUris,c=e.options,l=e.url;return r.add(l),n("runJob","Loading",l),t.load(l,c).then((async e=>{n("runJob","Loaded",l);const u=this.getExternalImports(e),p=Array.from(new Set(Object.keys(u).map((e=>u[e]))));return n("runJob","importedUris",p),(await o.withConcurrency(this.concurrency).for(p).handleError(i).process((e=>{if(!r.has(e))return this.runJob({options:c,url:e,downloadedUris:r},t)})).then((e=>{let{results:t}=e;return a(s(t))}))).concat([e])}))}}},64:(e,t,r)=>{"use strict";const n=r(686),o=r(558),s=r(926);e.exports=class extends s{constructor(e){super(),this.outputDirectory=e,this.relativeDir=null,this.fileName=null,n.mkdirSync(e,{recursive:!0})}openFile(e){this.fileName=e,this.relativeDir=null}openRelativeFile(e,t){this.relativeDir=e,this.fileName=t}writeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeLine(e,t)}writeBeforeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeBeforeLine(e,t)}closeFile(){if(!this.fileName)throw new Error("No file open");let e=this.outputDirectory;this.relativeDir&&(e=o.resolve(e,this.relativeDir)),e=o.resolve(e,this.fileName),n.mkdirSync(o.dirname(e),{recursive:!0}),n.writeFileSync(e,this.getBuffer()),this.fileName=null,this.relativeDir=null,this.clearBuffer()}}},721:e=>{"use strict";const t=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u;e.exports={normalizeIdentifier:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=(e,t)=>{let r="";for(const e of t)r+=`_${e.codePointAt(0).toString(16)}`;return r};let o=e??String(e);if("string"!=typeof o)throw new Error(`Unsupported identifier type, '${typeof o}'.`);if(o=o.replace(/^\p{Nd}/u,"_$&").replace(/[-‐−@#:;><|/\\\u200c\u200d]/g,"_").replace(/\s/g,"_").replace(/(?!\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D|\\u[0-9A-Fa-f]{4})(.)/gu,n).replace(/([\uD800-\uDFFF])/g,n),r>0&&(o=o.substring(0,r)),!t.test(o))throw new Error(`Unexpected error. Not able to escape identifier '${o}'.`);return o},ID_REGEX:t}},530:(e,t,r)=>{"use strict";const n=r(926);e.exports=class extends n{constructor(){super(),this.fileName="",this.data=new Map}openFile(e){this.fileName=e}closeFile(){this.data.set(this.fileName,this.getBuffer()),this.clearBuffer()}getFilesInMemory(){return this.data}}},911:e=>{"use strict";e.exports={labelToSentence:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z])([a-z])/g," $1$2").replace(/ +/g," ").replace(/^./,(e=>e.toUpperCase())).trim()},sentenceToLabel:function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/[^A-Za-z0-9_-]+/);return e.forEach(((t,r)=>{e[r]=e[r].replace(/^./,(e=>e.toUpperCase()))})),e.join("").replace(/^./,(e=>e.toLowerCase()))}}},996:e=>{"use strict";e.exports=class{constructor(){this.fileLoaders=[]}addFileLoader(e){this.fileLoaders.push(e)}getFileLoaders(){return this.fileLoaders}clearFileLoaders(){this.fileLoaders=[]}accepts(e){for(let t=0;t<this.fileLoaders.length;t++)if(this.fileLoaders[t].accepts(e))return!0;return!1}load(e,t){for(let r=0;r<this.fileLoaders.length;r++){const n=this.fileLoaders[r];if(n.accepts(e))return n.load(e,t)}throw new Error("Failed to find a model file loader that can handle: "+e)}}},546:(e,t,r)=>{"use strict";const n=r(996),o=r(25),s=r(990);e.exports=class extends n{constructor(e){super();const t=new o(e),r=new s(e);this.addFileLoader(r),this.addFileLoader(t)}}},990:(e,t,r)=>{"use strict";const n=r(25);e.exports=class extends n{constructor(e){super(e)}accepts(e){return e.startsWith("github://")}load(e,t){const r="https://raw.githubusercontent.com/"+e.substring(9);return super.load(r,t)}}},25:e=>{"use strict";e.exports=class{constructor(e){this.processFile=e}accepts(e){return e.startsWith("http://")||e.startsWith("https://")}async load(e,t){t||(t={method:"GET",headers:{"Content-Type":"text/plain"}}),console.log(e);const r=await fetch(e,t);if(!r.ok)throw new Error(`HTTP request failed with status: ${r.status}`);const n=await r.text(),o=new URL(e),s="@"+(o.host+o.pathname).replace(/\//g,".");return this.processFile(s,n)}}},545:e=>{"use strict";const t={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},r=e=>e,n={};Object.keys(t).forEach((e=>{n[e]=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return function(e){let n=e;for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];let i=s,c=i.shift();if(c&&"object"==typeof c&&c.level&&c.message){const e=c.padding&&c.padding[c.level];"error"===c.level&&c.stack?(n="error",c=`${c.message}\n${c.stack}`):Object.keys(t).includes(c.level)&&(n=c.level,c=c.message),c=e?`${e} ${c}`:c}i.unshift(c),(["error","warn"].includes(n)?console.error:console.log)(`${(new Date).toLocaleTimeString()} - ${n}:`,...i.map((e=>e instanceof Error?`${e.message}\n${e.stack}`:e)).map(r))}(e,...o)}}));class o{static dispatch(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t[e]>t[this.level]||this.transports.forEach((t=>{t[e]&&t[e](...n)}))}static add(e){this.transports.push(e)}static error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("error",...t)}static warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("warn",...t)}static info(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("info",...t)}static log(){return this.info(...arguments)}static http(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("http",...t)}static verbose(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("verbose",...t)}static debug(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("debug",...t)}static silly(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("silly",...t)}}o.level="info",o.transports=[n],e.exports=o},95:(e,t,r)=>{"use strict";const n=r(686),o=r(558),s=r(431);e.exports={writeModelsToFileSystem:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw new Error("`path` is a required parameter of writeModelsToFileSystem");const a=Object.assign({includeExternalModels:!0},r);e.forEach((function(e){if(e.external&&!a.includeExternalModels)return;const r=s(e.fileName).split("/").pop();n.writeFileSync(t+o.sep+r,e.definitions)}))}}},328:e=>{"use strict";e.exports=class{static isNull(e){return null==e}}},717:e=>{"use strict";e.exports=class{constructor(e){this.stack=[],this.push(e)}push(e,t){if(t&&!(e instanceof t))throw new Error("Did not find expected type "+t.constructor.name+" as argument to push. Found: "+e.toString());this.stack.push(e)}pop(e){return this.peek(e),this.stack.pop()}peek(e){if(this.stack.length<1)throw new Error("Stack is empty!");const t=this.stack[this.stack.length-1];if(e&&!(t instanceof e))throw new Error("Did not find expected type "+e+" on head of stack. Found: "+t);return t}clear(){this.stack=[]}}},361:e=>{"use strict";let t=!1;e.exports={printDeprecationWarning:function(e,r,n,o){t||(t=!0,function(e,t){console.warn({message:`DEPRECATED: ${e}`,type:t?.type,code:t?.code,detail:t?.detail})}(`DEPRECATED: ${e}`,{type:r,code:n,detail:o}))}}},926:e=>{"use strict";e.exports=class{constructor(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}writeBeforeLine(e,t){for(let t=0;t<e;t++)this.beforeBuffer+=" ";this.beforeBuffer+=t,this.beforeBuffer+="\n",this.linesWritten++}writeLine(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t),this.write("\n"),this.linesWritten++}getLineCount(){return this.linesWritten}writeIndented(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t)}write(e){if("string"!=typeof e)throw new Error("Can only append strings. Argument "+e+" has type "+typeof e);this.buffer+=e,this.linesWritten+=e.split(/\r\n|\r|\n/).length}getBuffer(){return this.beforeBuffer+this.buffer}clearBuffer(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}}},250:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,i){i=i||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var i=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return i.long?(c=e,(l=Math.abs(c))>=o?a(c,l,o,"day"):l>=n?a(c,l,n,"hour"):l>=r?a(c,l,r,"minute"):l>=t?a(c,l,t,"second"):c+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},907:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var i,c=[],l=!1,u=-1;function p(){l&&i&&(l=!1,i.length?c=i.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=c.length;t;){for(i=c,c=[];++u<t;)i&&i[u].run();u=-1,t=c.length}i=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},431:e=>{"use strict";e.exports=e=>{const t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},237:(e,t,r)=>{"use strict";const n=r(599),o=r(133),s=r(168),a=r(996),i=r(546),c=r(990),l=r(25),u=r(926),p=r(64),d=r(95),f=r(530),h=r(545),m=r(717),g=r(911),y=r(721),v=r(673),b=r(328),w=r(361);e.exports={BaseException:n,BaseFileException:o,FileDownloader:s,CompositeFileLoader:a,DefaultFileLoader:i,GitHubFileLoader:c,HTTPFileLoader:l,Writer:u,FileWriter:p,InMemoryWriter:f,ModelWriter:d,Logger:h,TypedStack:m,Label:g,Identifiers:y,ErrorCodes:v,NullUtil:b,Warning:w}},833:(e,t,r)=>{var n=r(907);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},686:()=>{},558:()=>{},330:e=>{"use strict";e.exports=JSON.parse('{"name":"@accordproject/concerto-util","version":"3.25.0","description":"Utilities for Concerto Modeling Language","homepage":"https://github.com/accordproject/concerto","engines":{"node":">=18","npm":">=10"},"main":"index.js","browser":"dist/concerto-util.js","typings":"types/index.d.ts","scripts":{"prepublishOnly":"npm run webpack","pretest":"npm run lint && npm run doc","lint":"eslint .","doc":"jsdoc --pedantic --recurse -c jsdoc.json","test":"nyc mocha --require test/setup.js --recursive -t 10000","test:watch":"nyc mocha --require test/setup.js --watch --recursive -t 10000","mocha":"mocha --recursive -t 10000","nyc":"nyc mocha --recursive -t 10000","build":"npm run build:types","postbuild":"npm run webpack","webpack":"webpack --config webpack.config.js --mode production","build:types":"tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types"},"repository":{"type":"git","url":"https://github.com/accordproject/concerto.git","directory":"packages/concerto-util"},"keywords":["blockchain","hyperledger","solutions"],"author":"accordproject.org","license":"Apache-2.0","devDependencies":{"chai":"4.3.6","chai-as-promised":"7.1.1","chai-things":"0.2.0","eslint":"8.57.1","jsdoc":"4.0.4","mocha":"10.8.2","node-polyfill-webpack-plugin":"4.0.0","nyc":"17.1.0","sinon":"19.0.2","tmp-promise":"3.0.3","typescript":"5.7.2","undici":"7.16.0","webpack":"5.96.1"},"dependencies":{"@supercharge/promise-pool":"1.7.0","debug":"4.3.7","slash":"3.0.0"},"browserslist":"> 0.25%, not dead","nyc":{"produce-source-map":"true","sourceMap":"inline","reporter":["lcov","text-summary","html","json"],"include":["lib/**/*.js"],"all":true,"check-coverage":true,"statements":99,"branches":93,"functions":98,"lines":99}}')}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}(237);var e,t},e.exports=t()},6686:()=>{},5558:()=>{},182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var n=r(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return n.default}});var o=r(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return o.default}});var s=r(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return s.default}});var a=r(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.default}});var i=r(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return i.default}});var c=r(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var l=r(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return l.default}});var u=r(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return u.default}});var p=r(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return p.default}});var d=r(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var f=r(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return f.default}});var h=r(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var m=r(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=r(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,o,s,a){return n((i=n(n(t,e),n(o,a)))<<(c=s)|i>>>32-c,r);var i,c}function s(e,t,r,n,s,a,i){return o(t&r|~t&n,e,t,s,a,i)}function a(e,t,r,n,s,a,i){return o(t&n|r&~n,e,t,s,a,i)}function i(e,t,r,n,s,a,i){return o(t^r^n,e,t,s,a,i)}function c(e,t,r,n,s,a,i){return o(r^(t|~n),e,t,s,a,i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let r=0;r<4*e.length;r++)t[r]=e[r>>2]>>>r%4*8&255;return t}(function(e,t){const o=new Uint32Array(r(t)).fill(0);o.set(e),o[t>>5]|=128<<t%32,o[o.length-1]=t,e=o;let l=1732584193,u=-271733879,p=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=l,o=u,f=p,h=d;l=s(l,u,p,d,e[t],7,-680876936),d=s(d,l,u,p,e[t+1],12,-389564586),p=s(p,d,l,u,e[t+2],17,606105819),u=s(u,p,d,l,e[t+3],22,-1044525330),l=s(l,u,p,d,e[t+4],7,-176418897),d=s(d,l,u,p,e[t+5],12,1200080426),p=s(p,d,l,u,e[t+6],17,-1473231341),u=s(u,p,d,l,e[t+7],22,-45705983),l=s(l,u,p,d,e[t+8],7,1770035416),d=s(d,l,u,p,e[t+9],12,-1958414417),p=s(p,d,l,u,e[t+10],17,-42063),u=s(u,p,d,l,e[t+11],22,-1990404162),l=s(l,u,p,d,e[t+12],7,1804603682),d=s(d,l,u,p,e[t+13],12,-40341101),p=s(p,d,l,u,e[t+14],17,-1502002290),u=s(u,p,d,l,e[t+15],22,1236535329),l=a(l,u,p,d,e[t+1],5,-165796510),d=a(d,l,u,p,e[t+6],9,-1069501632),p=a(p,d,l,u,e[t+11],14,643717713),u=a(u,p,d,l,e[t],20,-373897302),l=a(l,u,p,d,e[t+5],5,-701558691),d=a(d,l,u,p,e[t+10],9,38016083),p=a(p,d,l,u,e[t+15],14,-660478335),u=a(u,p,d,l,e[t+4],20,-405537848),l=a(l,u,p,d,e[t+9],5,568446438),d=a(d,l,u,p,e[t+14],9,-1019803690),p=a(p,d,l,u,e[t+3],14,-187363961),u=a(u,p,d,l,e[t+8],20,1163531501),l=a(l,u,p,d,e[t+13],5,-1444681467),d=a(d,l,u,p,e[t+2],9,-51403784),p=a(p,d,l,u,e[t+7],14,1735328473),u=a(u,p,d,l,e[t+12],20,-1926607734),l=i(l,u,p,d,e[t+5],4,-378558),d=i(d,l,u,p,e[t+8],11,-2022574463),p=i(p,d,l,u,e[t+11],16,1839030562),u=i(u,p,d,l,e[t+14],23,-35309556),l=i(l,u,p,d,e[t+1],4,-1530992060),d=i(d,l,u,p,e[t+4],11,1272893353),p=i(p,d,l,u,e[t+7],16,-155497632),u=i(u,p,d,l,e[t+10],23,-1094730640),l=i(l,u,p,d,e[t+13],4,681279174),d=i(d,l,u,p,e[t],11,-358537222),p=i(p,d,l,u,e[t+3],16,-722521979),u=i(u,p,d,l,e[t+6],23,76029189),l=i(l,u,p,d,e[t+9],4,-640364487),d=i(d,l,u,p,e[t+12],11,-421815835),p=i(p,d,l,u,e[t+15],16,530742520),u=i(u,p,d,l,e[t+2],23,-995338651),l=c(l,u,p,d,e[t],6,-198630844),d=c(d,l,u,p,e[t+7],10,1126891415),p=c(p,d,l,u,e[t+14],15,-1416354905),u=c(u,p,d,l,e[t+5],21,-57434055),l=c(l,u,p,d,e[t+12],6,1700485571),d=c(d,l,u,p,e[t+3],10,-1894986606),p=c(p,d,l,u,e[t+10],15,-1051523),u=c(u,p,d,l,e[t+1],21,-2054922799),l=c(l,u,p,d,e[t+8],6,1873313359),d=c(d,l,u,p,e[t+15],10,-30611744),p=c(p,d,l,u,e[t+6],15,-1560198380),u=c(u,p,d,l,e[t+13],21,1309151649),l=c(l,u,p,d,e[t+4],6,-145523070),d=c(d,l,u,p,e[t+11],10,-1120210379),p=c(p,d,l,u,e[t+2],15,718787259),u=c(u,p,d,l,e[t+9],21,-343485551),l=n(l,r),u=n(u,o),p=n(p,f),d=n(d,h)}return Uint32Array.of(l,u,p,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(r(8*e.length)).fill(0);for(let r=0;r<e.length;r++)t[r>>2]|=(255&e[r])<<r%4*8;return t}(e),8*e.length))}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:r}},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},1797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},2291:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(n)};const n=new Uint8Array(16)},2829:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520],s=new Uint8Array(e.length+1);s.set(e),s[e.length]=128;const a=(e=s).length/4+2,i=Math.ceil(a/16),c=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];c[t]=r}c[i-1][14]=8*(e.length-1)/Math.pow(2,32),c[i-1][14]=Math.floor(c[i-1][14]),c[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const s=new Uint32Array(80);for(let t=0;t<16;++t)s[t]=c[e][t];for(let e=16;e<80;++e)s[e]=n(s[e-3]^s[e-8]^s[e-14]^s[e-16],1);let a=o[0],i=o[1],l=o[2],u=o[3],p=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),c=n(a,5)+r(o,i,l,u)+p+t[o]+s[e]>>>0;p=u,u=l,l=n(i,30)>>>0,i=a,a=c}o[0]=o[0]+a>>>0,o[1]=o[1]+i>>>0,o[2]=o[2]+l>>>0,o[3]=o[3]+u>>>0,o[4]=o[4]+p>>>0}return Uint8Array.of(o[0]>>24,o[0]>>16,o[0]>>8,o[0],o[1]>>24,o[1]>>16,o[1]>>8,o[1],o[2]>>24,o[2]>>16,o[2]>>8,o[2],o[3]>>24,o[3]>>16,o[3]>>8,o[3],o[4]>>24,o[4]>>16,o[4]>>8,o[4])}},6011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=s;const n=r(9746),o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function s(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}t.default=function(e,t=0){const r=s(e,t);if(!(0,n.default)(r))throw TypeError("Stringified UUID is invalid");return r}},1425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=a;const n=r(2291),o=r(6011),s={};function a(e,t,r){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=r.slice(10,16),e.node[0]|=1,e.clockseq=16383&(r[8]<<8|r[9])),e.msecs=t,e}function i(e,t,r,n,o,s,a=0){s||(s=new Uint8Array(16),a=0),t??=Date.now(),r??=0,n??=16383&(e[8]<<8|e[9]),o??=e.slice(10,16);const i=(1e4*(268435455&(t+=122192928e5))+r)%4294967296;s[a++]=i>>>24&255,s[a++]=i>>>16&255,s[a++]=i>>>8&255,s[a++]=255&i;const c=t/4294967296*1e4&268435455;s[a++]=c>>>8&255,s[a++]=255&c,s[a++]=c>>>24&15|16,s[a++]=c>>>16&255,s[a++]=n>>>8|128,s[a++]=255&n;for(let e=0;e<6;++e)s[a++]=o[e];return s}t.default=function(e,t,r){let c;const l=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=i(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,r);else{const e=Date.now(),o=(0,n.default)();a(s,e,o),c=i(o,s.msecs,s.nsecs,l?void 0:s.clockseq,l?void 0:s.node,t,r)}return t?c:(0,o.unsafeStringify)(c)}},6568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(r="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&r[6])<<4|r[7]>>4&15,(15&r[7])<<4|(240&r[4])>>4,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,(15&r[1])<<4|(240&r[2])>>4,96|15&r[2],r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof e?(0,o.unsafeStringify)(t):t};const n=r(1797),o=r(6011)},591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=r(338),o=r(2988);var s=r(2988);function a(e,t,r,s){return(0,o.default)(48,n.default,e,t,r,s)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return s.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return s.URL}}),a.DNS=o.DNS,a.URL=o.URL,t.default=a},2988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.stringToBytes=s,t.default=function(e,t,r,a,i,c){const l="string"==typeof r?s(r):r,u="string"==typeof a?(0,n.default)(a):a;if("string"==typeof a&&(a=(0,n.default)(a)),16!==a?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+l.length);if(p.set(u),p.set(l,u.length),p=t(p),p[6]=15&p[6]|e,p[8]=63&p[8]|128,i){c=c||0;for(let e=0;e<16;++e)i[c+e]=p[e];return i}return(0,o.unsafeStringify)(p)};const n=r(1797),o=r(6011);function s(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8"},8286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3779),o=r(2291),s=r(6011);t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const a=(e=e||{}).random||(e.rng||o.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=a[e];return t}return(0,s.unsafeStringify)(a)}},4557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=r(2829),o=r(2988);var s=r(2988);function a(e,t,r,s){return(0,o.default)(80,n.default,e,t,r,s)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return s.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return s.URL}}),a.DNS=o.DNS,a.URL=o.URL,t.default=a},6356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6011),o=r(1425),s=r(6568);t.default=function(e,t,r){e??={},r??=0;let a=(0,o.default)({...e,_v6:!0},new Uint8Array(16));if(a=(0,s.default)(a),t){for(let e=0;e<16;e++)t[r+e]=a[e];return t}return(0,n.unsafeStringify)(a)}},268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(r="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&r[3])<<4|r[4]>>4&15,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|15&r[6],r[7],(15&r[1])<<4|(240&r[2])>>4,(15&r[2])<<4|(240&r[3])>>4,16|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof e?(0,o.unsafeStringify)(t):t};const n=r(1797),o=r(6011)},4299:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=a;const n=r(2291),o=r(6011),s={};function a(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function i(e,t,r,n,o=0){return n||(n=new Uint8Array(16),o=0),t??=Date.now(),r??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[o++]=t/1099511627776&255,n[o++]=t/4294967296&255,n[o++]=t/16777216&255,n[o++]=t/65536&255,n[o++]=t/256&255,n[o++]=255&t,n[o++]=112|r>>>28&15,n[o++]=r>>>20&255,n[o++]=128|r>>>14&63,n[o++]=r>>>6&255,n[o++]=r<<2&255|3&e[10],n[o++]=e[11],n[o++]=e[12],n[o++]=e[13],n[o++]=e[14],n[o++]=e[15],n}t.default=function(e,t,r){let c;if(e)c=i(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,r);else{const e=Date.now(),o=(0,n.default)();a(s,e,o),c=i(o,s.msecs,s.seq,t,r)}return t?c:(0,o.unsafeStringify)(c)}},9746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6697);t.default=function(e){return"string"==typeof e&&n.default.test(e)}},2770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},3198:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Alias:()=>B,CST:()=>n,Composer:()=>Zt,Document:()=>Ct,Lexer:()=>Fr,LineCounter:()=>Ir,Pair:()=>ve,Parser:()=>Pr,Scalar:()=>U,Schema:()=>Tt,YAMLError:()=>Ft,YAMLMap:()=>Te,YAMLParseError:()=>It,YAMLSeq:()=>De,YAMLWarning:()=>St,default:()=>Vr,isAlias:()=>d,isCollection:()=>v,isDocument:()=>f,isMap:()=>h,isNode:()=>b,isPair:()=>m,isScalar:()=>g,isSeq:()=>y,parse:()=>Br,parseAllDocuments:()=>Rr,parseDocument:()=>_r,stringify:()=>jr,visit:()=>T,visitAsync:()=>D});var n={};r.r(n),r.d(n,{BOM:()=>fr,DOCUMENT:()=>hr,FLOW_END:()=>mr,SCALAR:()=>gr,createScalarToken:()=>tr,isCollection:()=>yr,isScalar:()=>vr,prettyToken:()=>br,resolveAsScalar:()=>er,setScalarValue:()=>rr,stringify:()=>sr,tokenType:()=>wr,visit:()=>pr});var o={};r.r(o),r.d(o,{Alias:()=>B,CST:()=>n,Composer:()=>Zt,Document:()=>Ct,Lexer:()=>Fr,LineCounter:()=>Ir,Pair:()=>ve,Parser:()=>Pr,Scalar:()=>U,Schema:()=>Tt,YAMLError:()=>Ft,YAMLMap:()=>Te,YAMLParseError:()=>It,YAMLSeq:()=>De,YAMLWarning:()=>St,isAlias:()=>d,isCollection:()=>v,isDocument:()=>f,isMap:()=>h,isNode:()=>b,isPair:()=>m,isScalar:()=>g,isSeq:()=>y,parse:()=>Br,parseAllDocuments:()=>Rr,parseDocument:()=>_r,stringify:()=>jr,visit:()=>T,visitAsync:()=>D});const s=Symbol.for("yaml.alias"),a=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),c=Symbol.for("yaml.pair"),l=Symbol.for("yaml.scalar"),u=Symbol.for("yaml.seq"),p=Symbol.for("yaml.node.type"),d=e=>!!e&&"object"==typeof e&&e[p]===s,f=e=>!!e&&"object"==typeof e&&e[p]===a,h=e=>!!e&&"object"==typeof e&&e[p]===i,m=e=>!!e&&"object"==typeof e&&e[p]===c,g=e=>!!e&&"object"==typeof e&&e[p]===l,y=e=>!!e&&"object"==typeof e&&e[p]===u;function v(e){if(e&&"object"==typeof e)switch(e[p]){case i:case u:return!0}return!1}function b(e){if(e&&"object"==typeof e)switch(e[p]){case s:case i:case l:case u:return!0}return!1}const w=e=>(g(e)||v(e))&&!!e.anchor,A=Symbol("break visit"),$=Symbol("skip children"),E=Symbol("remove node");function T(e,t){const r=I(t);f(e)?C(null,e.contents,r,Object.freeze([e]))===E&&(e.contents=null):C(null,e,r,Object.freeze([]))}function C(e,t,r,n){const o=S(e,t,r,n);if(b(o)||m(o))return N(e,n,o),C(e,o,r,n);if("symbol"!=typeof o)if(v(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const o=C(e,t.items[e],r,n);if("number"==typeof o)e=o-1;else{if(o===A)return A;o===E&&(t.items.splice(e,1),e-=1)}}}else if(m(t)){n=Object.freeze(n.concat(t));const e=C("key",t.key,r,n);if(e===A)return A;e===E&&(t.key=null);const o=C("value",t.value,r,n);if(o===A)return A;o===E&&(t.value=null)}return o}async function D(e,t){const r=I(t);f(e)?await F(null,e.contents,r,Object.freeze([e]))===E&&(e.contents=null):await F(null,e,r,Object.freeze([]))}async function F(e,t,r,n){const o=await S(e,t,r,n);if(b(o)||m(o))return N(e,n,o),F(e,o,r,n);if("symbol"!=typeof o)if(v(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const o=await F(e,t.items[e],r,n);if("number"==typeof o)e=o-1;else{if(o===A)return A;o===E&&(t.items.splice(e,1),e-=1)}}}else if(m(t)){n=Object.freeze(n.concat(t));const e=await F("key",t.key,r,n);if(e===A)return A;e===E&&(t.key=null);const o=await F("value",t.value,r,n);if(o===A)return A;o===E&&(t.value=null)}return o}function I(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function S(e,t,r,n){return"function"==typeof r?r(e,t,n):h(t)?r.Map?.(e,t,n):y(t)?r.Seq?.(e,t,n):m(t)?r.Pair?.(e,t,n):g(t)?r.Scalar?.(e,t,n):d(t)?r.Alias?.(e,t,n):void 0}function N(e,t,r){const n=t[t.length-1];if(v(n))n.items[e]=r;else if(m(n))"key"===e?n.key=r:n.value=r;else{if(!f(n)){const e=d(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}T.BREAK=A,T.SKIP=$,T.REMOVE=E,D.BREAK=A,D.SKIP=$,D.REMOVE=E;const O={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class M{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},M.defaultYaml,e),this.tags=Object.assign({},M.defaultTags,t)}clone(){const e=new M(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new M(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:M.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},M.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:M.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},M.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+e.substring(r.length).replace(/[!,[\]{}]/g,(e=>O[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&b(e.contents)){const t={};T(e.contents,((e,r)=>{b(r)&&r.tag&&(t[r.tag]=!0)})),n=Object.keys(t)}else n=[];for(const[o,s]of r)"!!"===o&&"tag:yaml.org,2002:"===s||e&&!n.some((e=>e.startsWith(s)))||t.push(`%TAG ${o} ${s}`);return t.join("\n")}}function x(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function k(e){const t=new Set;return T(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function P(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function L(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t){const r=n[t],o=L(e,n,String(t),r);void 0===o?delete n[t]:o!==r&&(n[t]=o)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),o=L(e,n,t,r);void 0===o?n.delete(t):o!==r&&n.set(t,o)}else if(n instanceof Set)for(const t of Array.from(n)){const r=L(e,n,t,t);void 0===r?n.delete(t):r!==t&&(n.delete(t),n.add(r))}else for(const[t,r]of Object.entries(n)){const o=L(e,n,t,r);void 0===o?delete n[t]:o!==r&&(n[t]=o)}return e.call(t,r,n)}function R(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>R(e,String(t),r)));if(e&&"function"==typeof e.toJSON){if(!r||!w(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const o=e.toJSON(t,r);return r.onCreate&&r.onCreate(o),o}return"bigint"!=typeof e||r?.keep?e:Number(e)}M.defaultYaml={explicit:!1,version:"1.2"},M.defaultTags={"!!":"tag:yaml.org,2002:"};class _{constructor(e){Object.defineProperty(this,p,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:o}={}){if(!f(e))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},a=R(this,"",s);if("function"==typeof n)for(const{count:e,res:t}of s.anchors.values())n(t,e);return"function"==typeof o?L(o,{"":a},"",a):a}}class B extends _{constructor(e){super(s),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],T(e,{Node:(e,t)=>{(d(t)||w(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(n=e)}return n}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:o}=t,s=this.resolve(n,t);if(!s){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let a=r.get(s);if(a||(R(s,null,t),a=r.get(s)),!a||void 0===a.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(a.count+=1,0===a.aliasCount&&(a.aliasCount=j(n,s,r)),a.count*a.aliasCount>o))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return a.res}toString(e,t,r){const n=`*${this.source}`;if(e){if(x(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function j(e,t,r){if(d(t)){const n=t.resolve(e),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}if(v(t)){let n=0;for(const o of t.items){const t=j(e,o,r);t>n&&(n=t)}return n}if(m(t)){const n=j(e,t.key,r),o=j(e,t.value,r);return Math.max(n,o)}return 1}const V=e=>!e||"function"!=typeof e&&"object"!=typeof e;class U extends _{constructor(e){super(l),this.value=e}toJSON(e,t){return t?.keep?this.value:R(this.value,e,t)}toString(){return String(this.value)}}function Q(e,t,r){if(f(e)&&(e=e.contents),b(e))return e;if(m(e)){const t=r.schema[i].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:s,schema:a,sourceObjects:c}=r;let l;if(n&&e&&"object"==typeof e){if(l=c.get(e),l)return l.anchor??(l.anchor=o(e)),new B(l.anchor);l={anchor:null,node:null},c.set(e,l)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let p=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>t.identify?.(e)&&!t.format))}(e,t,a.tags);if(!p){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new U(e);return l&&(l.node=t),t}p=e instanceof Map?a[i]:Symbol.iterator in Object(e)?a[u]:a[i]}s&&(s(p),delete r.onTagObj);const d=p?.createNode?p.createNode(r.schema,e,r):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(r.schema,e,r):new U(e);return t?d.tag=t:p.default||(d.tag=p.tag),l&&(l.node=d),d}function q(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return Q(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}U.BLOCK_FOLDED="BLOCK_FOLDED",U.BLOCK_LITERAL="BLOCK_LITERAL",U.PLAIN="PLAIN",U.QUOTE_DOUBLE="QUOTE_DOUBLE",U.QUOTE_SINGLE="QUOTE_SINGLE";const K=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class z extends _{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>b(t)||m(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(K(e))this.add(t);else{const[r,...n]=e,o=this.get(r,!0);if(v(o))o.addIn(n,t);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,q(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(v(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,o=this.get(r,!0);return 0===n.length?!t&&g(o)?o.value:o:v(o)?o.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!m(t))return!1;const r=t.value;return null==r||e&&g(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!v(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(v(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,q(this.schema,n,t))}}}}const W=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function H(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const G=(e,t,r)=>e.endsWith("\n")?H(r,t):r.includes("\n")?"\n"+H(r,t):(e.endsWith(" ")?"":" ")+r,Y="flow",J="block",X="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:a,onOverflow:i}={}){if(!o||o<0)return e;o<s&&(s=0);const c=Math.max(1+s,1+o-t.length);if(e.length<=c)return e;const l=[],u={};let p,d,f=o-t.length;"number"==typeof n&&(n>o-Math.max(2,s)?l.push(0):f=o-n);let h=!1,m=-1,g=-1,y=-1;r===J&&(m=ee(e,m,t.length),-1!==m&&(f=m+c));for(let n;n=e[m+=1];){if(r===X&&"\\"===n){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===n)r===J&&(m=ee(e,m,t.length)),f=m+t.length+c,p=void 0;else{if(" "===n&&d&&" "!==d&&"\n"!==d&&"\t"!==d){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=m)}if(m>=f)if(p)l.push(p),f=p+c,p=void 0;else if(r===X){for(;" "===d||"\t"===d;)d=n,n=e[m+=1],h=!0;const t=m>y+1?m-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,f=t+c,p=void 0}else h=!0}d=n}if(h&&i&&i(),0===l.length)return e;a&&a();let v=e.slice(0,l[0]);for(let n=0;n<l.length;++n){const o=l[n],s=l[n+1]||e.length;0===o?v=`\n${t}${e.slice(0,s)}`:(r===X&&u[o]&&(v+=`${e[o]}\\`),v+=`\n${t}${e.slice(o+1,s)}`)}return v}function ee(e,t,r){let n=t,o=t+1,s=e[o];for(;" "===s||"\t"===s;)if(t<o+r)s=e[++t];else{do{s=e[++t]}while(s&&"\n"!==s);n=t,o=t+1,s=e[o]}return n}const te=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),re=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,o=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(re(e)?" ":"");let a="",i=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(a+=r.slice(i,e)+"\\ ",e+=1,i=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{a+=r.slice(i,e);const t=r.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=r.substr(e,6)}e+=5,i=e+1}break;case"n":if(n||'"'===r[e+2]||r.length<o)e+=1;else{for(a+=r.slice(i,e)+"\n\n";"\\"===r[e+2]&&"n"===r[e+3]&&'"'!==r[e+4];)a+="\n",e+=2;a+=s," "===r[e+2]&&(a+="\\"),e+=1,i=e+1}break;default:e+=1}return a=i?a+r.slice(i):r,n?a:Z(a,s,X,te(t,!1))}function oe(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const r=t.indent||(re(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:Z(n,r,Y,te(t,!1))}function se(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),o=e.includes("'");n=t&&!o?oe:o&&!t?ne:r?oe:ne}return n(e,t)}let ae;try{ae=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{ae=/\n+(?!\n|$)/g}function ie({comment:e,type:t,value:r},n,o,s){const{blockQuote:a,commentString:i,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return se(r,n);const l=n.indent||(n.forceBlockIndent||re(r)?" ":""),u="literal"===a||"folded"!==a&&t!==U.BLOCK_FOLDED&&(t===U.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,o=e.length;if(o<=n)return!1;for(let t=0,r=0;t<o;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,o-r<=n)return!1}return!0}(r,c,l.length));if(!r)return u?"|\n":">\n";let p,d;for(d=r.length;d>0;--d){const e=r[d-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let f=r.substring(d);const h=f.indexOf("\n");-1===h?p="-":r===f||h!==f.length-1?(p="+",s&&s()):p="",f&&(r=r.slice(0,-f.length),"\n"===f[f.length-1]&&(f=f.slice(0,-1)),f=f.replace(ae,`$&${l}`));let m,g=!1,y=-1;for(m=0;m<r.length;++m){const e=r[m];if(" "===e)g=!0;else{if("\n"!==e)break;y=m}}let v=r.substring(0,y<m?y+1:m);v&&(r=r.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let b=(g?l?"2":"1":"")+p;if(e&&(b+=" "+i(e.replace(/ ?[\r\n]+/g," ")),o&&o()),!u){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`);let o=!1;const s=te(n,!0);"folded"!==a&&t!==U.BLOCK_FOLDED&&(s.onOverflow=()=>{o=!0});const i=Z(`${v}${e}${f}`,l,J,s);if(!o)return`>${b}\n${l}${i}`}return`|${b}\n${l}${v}${r=r.replace(/\n+/g,`$&${l}`)}${f}`}function ce(e,t,r,n){const{implicitKey:o,inFlow:s}=t,a="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:i}=e;i!==U.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(i=U.QUOTE_DOUBLE);const c=e=>{switch(e){case U.BLOCK_FOLDED:case U.BLOCK_LITERAL:return o||s?se(a.value,t):ie(a,t,r,n);case U.QUOTE_DOUBLE:return ne(a.value,t);case U.QUOTE_SINGLE:return oe(a.value,t);case U.PLAIN:return function(e,t,r,n){const{type:o,value:s}=e,{actualString:a,implicitKey:i,indent:c,indentStep:l,inFlow:u}=t;if(i&&s.includes("\n")||u&&/[[\]{},]/.test(s))return se(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return i||u||!s.includes("\n")?se(s,t):ie(e,t,r,n);if(!i&&!u&&o!==U.PLAIN&&s.includes("\n"))return ie(e,t,r,n);if(re(s)){if(""===c)return t.forceBlockIndent=!0,ie(e,t,r,n);if(i&&c===l)return se(s,t)}const p=s.replace(/\n+/g,`$&\n${c}`);if(a){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(p),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return se(s,t)}return i?p:Z(p,c,Y,te(t,!1))}(a,t,r,n);default:return null}};let l=c(i);if(null===l){const{defaultKeyType:e,defaultStringType:r}=t.options,n=o&&e||r;if(l=c(n),null===l)throw new Error(`Unsupported default string type ${n}`)}return l}function le(e,t){const r=Object.assign({blockQuote:!0,commentString:W,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function ue(e,t,r,n){if(m(e))return e.toString(t,r,n);if(d(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o;const s=b(e)?e:t.doc.createNode(e,{onTagObj:e=>o=e});o??(o=function(e,t){if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let r,n;if(g(t)){n=t.value;let o=e.filter((e=>e.identify?.(n)));if(o.length>1){const e=o.filter((e=>e.test));e.length>0&&(o=e)}r=o.find((e=>e.format===t.format))??o.find((e=>!e.format))}else n=t,r=e.find((e=>e.nodeClass&&n instanceof e.nodeClass));if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,s));const a=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const o=[],s=(g(e)||v(e))&&e.anchor;s&&x(s)&&(r.add(s),o.push(`&${s}`));const a=e.tag??(t.default?null:t.tag);return a&&o.push(n.directives.tagString(a)),o.join(" ")}(s,o,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const i="function"==typeof o.stringify?o.stringify(s,t,r,n):g(s)?ce(s,t,r,n):s.toString(t,r,n);return a?g(s)||"{"===i[0]||"["===i[0]?`${a} ${i}`:`${a}\n${t.indent}${i}`:i}function pe(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const de="<<",fe={identify:e=>e===de||"symbol"==typeof e&&e.description===de,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new U(Symbol(de)),{addToJSMap:he}),stringify:()=>de};function he(e,t,r){if(r=e&&d(r)?r.resolve(e.doc):r,y(r))for(const n of r.items)me(e,t,n);else if(Array.isArray(r))for(const n of r)me(e,t,n);else me(e,t,r)}function me(e,t,r){const n=e&&d(r)?r.resolve(e.doc):r;if(!h(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,e,Map);for(const[e,r]of o)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function ge(e,t,{key:r,value:n}){if(b(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(fe.identify(t)||g(t)&&(!t.type||t.type===U.PLAIN)&&fe.identify(t.value))&&e?.doc.schema.tags.some((e=>e.tag===fe.tag&&e.default)))(e,r))he(e,t,n);else{const o=R(r,"",e);if(t instanceof Map)t.set(o,R(n,o,e));else if(t instanceof Set)t.add(o);else{const s=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(b(e)&&r?.doc){const t=le(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),pe(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,o,e),a=R(n,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function ye(e,t,r){const n=Q(e,void 0,r),o=Q(t,void 0,r);return new ve(n,o)}class ve{constructor(e,t=null){Object.defineProperty(this,p,{value:c}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return b(t)&&(t=t.clone(e)),b(r)&&(r=r.clone(e)),new ve(t,r)}toJSON(e,t){return ge(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,o){const{allNullValues:s,doc:a,indent:i,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:p}}=r;let d=b(e)&&e.comment||null;if(p){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(v(e)||!b(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let f=!p&&(!e||d&&null==t&&!r.inFlow||v(e)||(g(e)?e.type===U.BLOCK_FOLDED||e.type===U.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(p||!s),indent:i+c});let h,m,w,A=!1,$=!1,E=ue(e,r,(()=>A=!0),(()=>$=!0));if(!f&&!r.inFlow&&E.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(s||null==t)return A&&n&&n(),""===E?"?":f?`? ${E}`:E}else if(s&&!p||null==t&&f)return E=`? ${E}`,d&&!A?E+=G(E,r.indent,l(d)):$&&o&&o(),E;A&&(d=null),f?(d&&(E+=G(E,r.indent,l(d))),E=`? ${E}\n${i}:`):(E=`${E}:`,d&&(E+=G(E,r.indent,l(d)))),b(t)?(h=!!t.spaceBefore,m=t.commentBefore,w=t.comment):(h=!1,m=null,w=null,t&&"object"==typeof t&&(t=a.createNode(t))),r.implicitKey=!1,f||d||!g(t)||(r.indentAtStart=E.length+1),$=!1,u||!(c.length>=2)||r.inFlow||f||!y(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let T=!1;const C=ue(t,r,(()=>T=!0),(()=>$=!0));let D=" ";if(d||h||m)D=h?"\n":"",m&&(D+=`\n${H(l(m),r.indent)}`),""!==C||r.inFlow?D+=`\n${r.indent}`:"\n"===D&&(D="\n\n");else if(!f&&v(t)){const e=C[0],n=C.indexOf("\n"),o=-1!==n,s=r.inFlow??t.flow??0===t.items.length;if(o||!s){let t=!1;if(o&&("&"===e||"!"===e)){let r=C.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===C[r+1]&&(r=C.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(D=`\n${r.indent}`)}}else""!==C&&"\n"!==C[0]||(D="");return E+=D+C,r.inFlow?T&&n&&n():w&&!T?E+=G(E,r.indent,l(w)):$&&o&&o(),E}(this,e,t,r):JSON.stringify(this)}}function be(e,t,r){return(t.inFlow??e.flow?Ae:we)(e,t,r)}function we({comment:e,items:t},r,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:a,onComment:i}){const{indent:c,options:{commentString:l}}=r,u=Object.assign({},r,{indent:s,type:null});let p=!1;const d=[];for(let e=0;e<t.length;++e){const o=t[e];let a=null;if(b(o))!p&&o.spaceBefore&&d.push(""),$e(r,d,o.commentBefore,p),o.comment&&(a=o.comment);else if(m(o)){const e=b(o.key)?o.key:null;e&&(!p&&e.spaceBefore&&d.push(""),$e(r,d,e.commentBefore,p))}p=!1;let i=ue(o,u,(()=>a=null),(()=>p=!0));a&&(i+=G(i,s,l(a))),p&&a&&(p=!1),d.push(n+i)}let f;if(0===d.length)f=o.start+o.end;else{f=d[0];for(let e=1;e<d.length;++e){const t=d[e];f+=t?`\n${c}${t}`:"\n"}}return e?(f+="\n"+H(l(e),c),i&&i()):p&&a&&a(),f}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:o,indentStep:s,flowCollectionPadding:a,options:{commentString:i}}=t;n+=s;const c=Object.assign({},t,{indent:n,inFlow:!0,type:null});let l=!1,u=0;const p=[];for(let r=0;r<e.length;++r){const o=e[r];let s=null;if(b(o))o.spaceBefore&&p.push(""),$e(t,p,o.commentBefore,!1),o.comment&&(s=o.comment);else if(m(o)){const e=b(o.key)?o.key:null;e&&(e.spaceBefore&&p.push(""),$e(t,p,e.commentBefore,!1),e.comment&&(l=!0));const r=b(o.value)?o.value:null;r?(r.comment&&(s=r.comment),r.commentBefore&&(l=!0)):null==o.value&&e?.comment&&(s=e.comment)}s&&(l=!0);let a=ue(o,c,(()=>s=null));r<e.length-1&&(a+=","),s&&(a+=G(a,n,i(s))),!l&&(p.length>u||a.includes("\n"))&&(l=!0),p.push(a),u=p.length}const{start:d,end:f}=r;if(0===p.length)return d+f;if(!l){const e=p.reduce(((e,t)=>e+t.length+2),2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=d;for(const t of p)e+=t?`\n${s}${o}${t}`:"\n";return`${e}\n${o}${f}`}return`${d}${a}${p.join(" ")}${a}${f}`}function $e({indent:e,options:{commentString:t}},r,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const o=H(t(n),e);r.push(o.trimStart())}}function Ee(e,t){const r=g(t)?t.value:t;for(const n of e)if(m(n)){if(n.key===t||n.key===r)return n;if(g(n.key)&&n.key.value===r)return n}}class Te extends z{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(i,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:o}=r,s=new this(e),a=(e,a)=>{if("function"==typeof o)a=o.call(t,e,a);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==a||n)&&s.items.push(ye(e,a,r))};if(t instanceof Map)for(const[e,r]of t)a(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&s.items.sort(e.sortMapEntries),s}add(e,t){let r;r=m(e)?e:e&&"object"==typeof e&&"key"in e?new ve(e.key,e.value):new ve(e,e?.value);const n=Ee(this.items,r.key),o=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);g(n.value)&&V(r.value)?n.value.value=r.value:n.value=r.value}else if(o){const e=this.items.findIndex((e=>o(r,e)<0));-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=Ee(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Ee(this.items,e),n=r?.value;return(!t&&g(n)?n.value:n)??void 0}has(e){return!!Ee(this.items,e)}set(e,t){this.add(new ve(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)ge(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!m(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),be(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const Ce={collection:"map",default:!0,nodeClass:Te,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Te.from(e,t,r)};class De extends z{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(u,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Fe(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=Fe(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&g(n)?n.value:n}has(e){const t=Fe(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=Fe(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];g(n)&&V(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let n=0;for(const e of this.items)r.push(R(e,String(n++),t));return r}toString(e,t,r){return e?be(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,o=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let s of t){if("function"==typeof n){const r=t instanceof Set?s:String(e++);s=n.call(t,r,s)}o.items.push(Q(s,void 0,r))}}return o}}function Fe(e){let t=g(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const Ie={collection:"seq",default:!0,nodeClass:De,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(y(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>De.from(e,t,r)},Se={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>ce(e,t=Object.assign({actualString:!0},t),r,n)},Ne={identify:e=>null==e,createNode:()=>new U(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new U(null),stringify:({source:e},t)=>"string"==typeof e&&Ne.test.test(e)?e:t.options.nullStr},Oe={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new U("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Oe.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Me({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const o="number"==typeof n?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let s=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let r=t-(s.length-e-1);for(;r-- >0;)s+="0"}return s}const xe={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Me},ke={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Me(e)}},Pe={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new U(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Me},Le=e=>"bigint"==typeof e||Number.isInteger(e),Re=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function _e(e,t,r){const{value:n}=e;return Le(n)&&n>=0?r+n.toString(t):Me(e)}const Be={identify:e=>Le(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Re(e,2,8,r),stringify:e=>_e(e,8,"0o")},je={identify:Le,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Re(e,0,10,r),stringify:Me},Ve={identify:e=>Le(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Re(e,2,16,r),stringify:e=>_e(e,16,"0x")},Ue=[Ce,Ie,Se,Ne,Oe,Be,je,Ve,xe,ke,Pe];function Qe(e){return"bigint"==typeof e||Number.isInteger(e)}const qe=({value:e})=>JSON.stringify(e),Ke=[Ce,Ie].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:qe},{identify:e=>null==e,createNode:()=>new U(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:qe},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:qe},{identify:Qe,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Qe(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:qe}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),ze={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,o,s){if(!r)return"";const a=r;let i;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<a.length;++t)e+=String.fromCharCode(a[t]);i=btoa(e)}if(t??(t=U.BLOCK_LITERAL),t!==U.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(i.length/e),o=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)o[t]=i.substr(n,e);i=o.join(t===U.BLOCK_LITERAL?"\n":" ")}return ce({comment:e,type:t,value:i},n,o,s)}};function We(e,t){if(y(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!m(n)){if(h(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new ve(new U(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=m(n)?n:new ve(n)}}else t("Expected a sequence for this tag");return e}function He(e,t,r){const{replacer:n}=r,o=new De(e);o.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let a,i;if("function"==typeof n&&(e=n.call(t,String(s++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);a=e[0],i=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);a=t[0],i=e[a]}else a=e;o.items.push(ye(a,i,r))}return o}const Ge={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:We,createNode:He};class Ye extends De{constructor(){super(),this.add=Te.prototype.add.bind(this),this.delete=Te.prototype.delete.bind(this),this.get=Te.prototype.get.bind(this),this.has=Te.prototype.has.bind(this),this.set=Te.prototype.set.bind(this),this.tag=Ye.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,o;if(m(e)?(n=R(e.key,"",t),o=R(e.value,n,t)):n=R(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,o)}return r}static from(e,t,r){const n=He(e,t,r),o=new this;return o.items=n.items,o}}Ye.tag="tag:yaml.org,2002:omap";const Je={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ye,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=We(e,t),n=[];for(const{key:e}of r.items)g(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new Ye,r)},createNode:(e,t,r)=>Ye.from(e,t,r)};function Xe({value:e,source:t},r){return t&&(e?Ze:et).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const Ze={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new U(!0),stringify:Xe},et={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new U(!1),stringify:Xe},tt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Me},rt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Me(e)}},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new U(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Me},ot=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const o=e[0];if("-"!==o&&"+"!==o||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===o?BigInt(-1)*t:t}const s=parseInt(e,r);return"-"===o?-1*s:s}function at(e,t,r){const{value:n}=e;if(ot(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Me(e)}const it={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>st(e,2,2,r),stringify:e=>at(e,2,"0b")},ct={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>st(e,1,8,r),stringify:e=>at(e,8,"0")},lt={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>st(e,0,10,r),stringify:Me},ut={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>st(e,2,16,r),stringify:e=>at(e,16,"0x")};class pt extends Te{constructor(e){super(e),this.tag=pt.tag}add(e){let t;t=m(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new ve(e.key,null):new ve(e,null),Ee(this.items,t.key)||this.items.push(t)}get(e,t){const r=Ee(this.items,e);return!t&&m(r)?g(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Ee(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new ve(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),o.items.push(ye(e,null,r));return o}}pt.tag="tag:yaml.org,2002:set";const dt={collection:"map",identify:e=>e instanceof Set,nodeClass:pt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>pt.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new pt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ft(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,o=e=>t?BigInt(e):Number(e),s=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*o(60)+o(t)),o(0));return"-"===r?o(-1)*s:s}function ht(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Me(e);let n="";t<0&&(n="-",t*=r(-1));const o=r(60),s=[t%o];return t<60?s.unshift(0):(t=(t-s[0])/o,s.unshift(t%o),t>=60&&(t=(t-s[0])/o,s.unshift(t))),n+s.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const mt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>ft(e,r),stringify:ht},gt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ft(e,!1),stringify:ht},yt={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(yt.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,o,s,a,i]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(r,n-1,o,s||0,a||0,i||0,c);const u=t[8];if(u&&"Z"!==u){let e=ft(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},vt=[Ce,Ie,Se,Ne,Ze,et,it,ct,lt,ut,tt,rt,nt,ze,fe,Je,Ge,dt,mt,gt,yt],bt=new Map([["core",Ue],["failsafe",[Ce,Ie,Se]],["json",Ke],["yaml11",vt],["yaml-1.1",vt]]),wt={binary:ze,bool:Oe,float:Pe,floatExp:ke,floatNaN:xe,floatTime:gt,int:je,intHex:Ve,intOct:Be,intTime:mt,map:Ce,merge:fe,null:Ne,omap:Je,pairs:Ge,seq:Ie,set:dt,timestamp:yt},At={"tag:yaml.org,2002:binary":ze,"tag:yaml.org,2002:merge":fe,"tag:yaml.org,2002:omap":Je,"tag:yaml.org,2002:pairs":Ge,"tag:yaml.org,2002:set":dt,"tag:yaml.org,2002:timestamp":yt};function $t(e,t,r){const n=bt.get(t);if(n&&!e)return r&&!n.includes(fe)?n.concat(fe):n.slice();let o=n;if(!o){if(!Array.isArray(e)){const e=Array.from(bt.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}o=[]}if(Array.isArray(e))for(const t of e)o=o.concat(t);else"function"==typeof e&&(o=e(o.slice()));return r&&(o=o.concat(fe)),o.reduce(((e,t)=>{const r="string"==typeof t?wt[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(wt).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e}),[])}const Et=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Tt{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?$t(e,"compat"):e?$t(null,e):null,this.name="string"==typeof o&&o||"core",this.knownTags=n?At:{},this.tags=$t(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,i,{value:Ce}),Object.defineProperty(this,l,{value:Se}),Object.defineProperty(this,u,{value:Ie}),this.sortMapEntries="function"==typeof s?s:!0===s?Et:null}clone(){const e=Object.create(Tt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class Ct{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,p,{value:a});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:s}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new M({version:s}),this.setSchema(s,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(Ct.prototype,{[p]:{value:a}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=b(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Dt(this.contents)&&this.contents.add(e)}addIn(e,t){Dt(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=k(this);e.anchor=!t||r.has(t)?P(t||"a",r):t}return new B(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:i,onTagObj:c,tag:l}=r??{},{onAnchor:u,setAnchors:p,sourceObjects:d}=function(e,t){const r=[],n=new Map;let o=null;return{onAnchor:n=>{r.push(n),o??(o=k(e));const s=P(t,o);return o.add(s),s},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!g(t.node)&&!v(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,s||"a"),f=Q(e,l,{aliasDuplicateObjects:o??!0,keepUndefined:i??!1,onAnchor:u,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:d});return a&&v(f)&&(f.flow=!0),p(),f}createPair(e,t,r={}){const n=this.createNode(e,null,r),o=this.createNode(t,null,r);return new ve(n,o)}delete(e){return!!Dt(this.contents)&&this.contents.delete(e)}deleteIn(e){return K(e)?null!=this.contents&&(this.contents=null,!0):!!Dt(this.contents)&&this.contents.deleteIn(e)}get(e,t){return v(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return K(e)?!t&&g(this.contents)?this.contents.value:this.contents:v(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!v(this.contents)&&this.contents.has(e)}hasIn(e){return K(e)?void 0!==this.contents:!!v(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=q(this.schema,[e],t):Dt(this.contents)&&this.contents.set(e,t)}setIn(e,t){K(e)?this.contents=t:null==this.contents?this.contents=q(this.schema,Array.from(e),t):Dt(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new M({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new M({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new Tt(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:o,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},i=R(this.contents,t??"",a);if("function"==typeof o)for(const{count:e,res:t}of a.anchors.values())o(t,e);return"function"==typeof s?L(s,{"":i},"",i):i}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const o=le(e,t),{commentString:s}=o.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=s(e.commentBefore);r.unshift(H(t,""))}let a=!1,i=null;if(e.contents){if(b(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=s(e.contents.commentBefore);r.push(H(t,""))}o.forceBlockIndent=!!e.comment,i=e.contents.comment}const t=i?void 0:()=>a=!0;let c=ue(e.contents,o,(()=>i=null),t);i&&(c+=G(c,"",s(i))),"|"!==c[0]&&">"!==c[0]||"---"!==r[r.length-1]?r.push(c):r[r.length-1]=`--- ${c}`}else r.push(ue(e.contents,o));if(e.directives?.docEnd)if(e.comment){const t=s(e.comment);t.includes("\n")?(r.push("..."),r.push(H(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&a&&(t=t.replace(/^\n+/,"")),t&&(a&&!i||""===r[r.length-1]||r.push(""),r.push(H(s(t),"")))}return r.join("\n")+"\n"}(this,e)}}function Dt(e){if(v(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Ft extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class It extends Ft{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class St extends Ft{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Nt=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:o}=r.linePos[0];r.message+=` at line ${n}, column ${o}`;let s=o-1,a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const e=Math.min(s-39,a.length-79);a="…"+a.substring(e),s-=e-1}if(a.length>80&&(a=a.substring(0,79)+"…"),n>1&&/^ *$/.test(a.substring(0,s))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),a=r+a}if(/[^ ]/.test(a)){let e=1;const t=r.linePos[1];t&&t.line===n&&t.col>o&&(e=Math.max(1,Math.min(t.col-o,80-s)));const i=" ".repeat(s)+"^".repeat(e);r.message+=`:\n\n${a}\n${i}\n`}};function Ot(e,{flow:t,indicator:r,next:n,offset:o,onError:s,parentIndent:a,startOnNewline:i}){let c=!1,l=i,u=i,p="",d="",f=!1,h=!1,m=null,g=null,y=null,v=null,b=null,w=null,A=null;for(const o of e)switch(h&&("space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&s(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(l&&"comment"!==o.type&&"newline"!==o.type&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),o.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!o.source.includes("\t")||(m=o),u=!0;break;case"comment":{u||s(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=o.source.substring(1)||" ";p?p+=d+e:p=e,d="",l=!1;break}case"newline":l?p?p+=o.source:w&&"seq-item-ind"===r||(c=!0):d+=o.source,l=!0,f=!0,(g||y)&&(v=o),u=!0;break;case"anchor":g&&s(o,"MULTIPLE_ANCHORS","A node can have at most one anchor"),o.source.endsWith(":")&&s(o.offset+o.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=o,A??(A=o.offset),l=!1,u=!1,h=!0;break;case"tag":y&&s(o,"MULTIPLE_TAGS","A node can have at most one tag"),y=o,A??(A=o.offset),l=!1,u=!1,h=!0;break;case r:(g||y)&&s(o,"BAD_PROP_ORDER",`Anchors and tags must be after the ${o.source} indicator`),w&&s(o,"UNEXPECTED_TOKEN",`Unexpected ${o.source} in ${t??"collection"}`),w=o,l="seq-item-ind"===r||"explicit-key-ind"===r,u=!1;break;case"comma":if(t){b&&s(o,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=o,l=!1,u=!1;break}default:s(o,"UNEXPECTED_TOKEN",`Unexpected ${o.type} token`),l=!1,u=!1}const $=e[e.length-1],E=$?$.offset+$.source.length:o;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(l&&m.indent<=a||"block-map"===n?.type||"block-seq"===n?.type)&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:c,comment:p,hasNewline:f,anchor:g,tag:y,newlineAfterProp:v,end:E,start:A??E}}function Mt(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Mt(t.key)||Mt(t.value))return!0}return!1;default:return!0}}function xt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!Mt(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function kt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const o="function"==typeof n?n:(e,t)=>e===t||g(e)&&g(t)&&e.value===t.value;return t.some((e=>o(e.key,r)))}const Pt="All mapping items must start at the same column";function Lt(e,t,r,n){let o="";if(e){let s=!1,a="";for(const i of e){const{source:e,type:c}=i;switch(c){case"space":s=!0;break;case"comment":{r&&!s&&n(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";o?o+=a+t:o=t,a="";break}case"newline":o&&(a+=e),s=!0;break;default:n(i,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:o,offset:t}}const Rt="Block collections are not allowed within flow collections",_t=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Bt(e,t,r,n,o,s){const a="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,o,s){const a=new(s?.nodeClass??Te)(r.schema);r.atRoot&&(r.atRoot=!1);let i=n.offset,c=null;for(const s of n.items){const{start:l,key:u,sep:p,value:d}=s,f=Ot(l,{indicator:"explicit-key-ind",next:u??p?.[0],offset:i,onError:o,parentIndent:n.indent,startOnNewline:!0}),h=!f.found;if(h){if(u&&("block-seq"===u.type?o(i,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&o(i,"BAD_INDENT",Pt)),!f.anchor&&!f.tag&&!p){c=f.end,f.comment&&(a.comment?a.comment+="\n"+f.comment:a.comment=f.comment);continue}(f.newlineAfterProp||Mt(u))&&o(u??l[l.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==n.indent&&o(i,"BAD_INDENT",Pt);r.atKey=!0;const m=f.end,g=u?e(r,u,f,o):t(r,m,l,null,f,o);r.schema.compat&&xt(n.indent,u,o),r.atKey=!1,kt(r,a.items,g)&&o(m,"DUPLICATE_KEY","Map keys must be unique");const y=Ot(p??[],{indicator:"map-value-ind",next:d,offset:g.range[2],onError:o,parentIndent:n.indent,startOnNewline:!u||"block-scalar"===u.type});if(i=y.end,y.found){h&&("block-map"!==d?.type||y.hasNewline||o(i,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&f.start<y.found.offset-1024&&o(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const c=d?e(r,d,y,o):t(r,i,p,null,y,o);r.schema.compat&&xt(n.indent,d,o),i=c.range[2];const l=new ve(g,c);r.options.keepSourceTokens&&(l.srcToken=s),a.items.push(l)}else{h&&o(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);const e=new ve(g);r.options.keepSourceTokens&&(e.srcToken=s),a.items.push(e)}}return c&&c<i&&o(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,i,c??i],a}(e,t,r,n,s):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,o,s){const a=new(s?.nodeClass??De)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let i=n.offset,c=null;for(const{start:s,value:l}of n.items){const u=Ot(s,{indicator:"seq-item-ind",next:l,offset:i,onError:o,parentIndent:n.indent,startOnNewline:!0});if(!u.found){if(!(u.anchor||u.tag||l)){c=u.end,u.comment&&(a.comment=u.comment);continue}l&&"block-seq"===l.type?o(u.end,"BAD_INDENT","All sequence items must start at the same column"):o(i,"MISSING_CHAR","Sequence item without - indicator")}const p=l?e(r,l,u,o):t(r,u.end,s,null,u,o);r.schema.compat&&xt(n.indent,l,o),i=p.range[2],a.items.push(p)}return a.range=[n.offset,i,c??i],a}(e,t,r,n,s):function({composeNode:e,composeEmptyNode:t},r,n,o,s){const a="{"===n.start.source,i=a?"flow map":"flow sequence",c=new(s?.nodeClass??(a?Te:De))(r.schema);c.flow=!0;const l=r.atRoot;l&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=n.offset+n.start.source.length;for(let s=0;s<n.items.length;++s){const l=n.items[s],{start:p,key:d,sep:f,value:h}=l,g=Ot(p,{flow:i,indicator:"explicit-key-ind",next:d??f?.[0],offset:u,onError:o,parentIndent:n.indent,startOnNewline:!1});if(!g.found){if(!(g.anchor||g.tag||f||h)){0===s&&g.comma?o(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`):s<n.items.length-1&&o(g.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${i}`),g.comment&&(c.comment?c.comment+="\n"+g.comment:c.comment=g.comment),u=g.end;continue}!a&&r.options.strict&&Mt(d)&&o(d,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===s)g.comma&&o(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`);else if(g.comma||o(g.start,"MISSING_CHAR",`Missing , between ${i} items`),g.comment){let e="";e:for(const t of p)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=c.items[c.items.length-1];m(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(a||f||g.found){r.atKey=!0;const s=g.end,m=d?e(r,d,g,o):t(r,s,p,null,g,o);_t(d)&&o(m.range,"BLOCK_IN_FLOW",Rt),r.atKey=!1;const y=Ot(f??[],{flow:i,indicator:"map-value-ind",next:h,offset:m.range[2],onError:o,parentIndent:n.indent,startOnNewline:!1});if(y.found){if(!a&&!g.found&&r.options.strict){if(f)for(const e of f){if(e===y.found)break;if("newline"===e.type){o(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}g.start<y.found.offset-1024&&o(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&h.source&&":"===h.source[0]?o(h,"MISSING_CHAR",`Missing space after : in ${i}`):o(y.start,"MISSING_CHAR",`Missing , or : between ${i} items`));const v=h?e(r,h,y,o):y.found?t(r,y.end,f,null,y,o):null;v?_t(h)&&o(v.range,"BLOCK_IN_FLOW",Rt):y.comment&&(m.comment?m.comment+="\n"+y.comment:m.comment=y.comment);const b=new ve(m,v);if(r.options.keepSourceTokens&&(b.srcToken=l),a){const e=c;kt(r,e.items,m)&&o(s,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(b)}else{const e=new Te(r.schema);e.flow=!0,e.items.push(b);const t=(v??m).range;e.range=[m.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:y.end}else{const n=h?e(r,h,g,o):t(r,g.end,f,null,g,o);c.items.push(n),u=n.range[2],_t(h)&&o(n.range,"BLOCK_IN_FLOW",Rt)}}const p=a?"}":"]",[d,...f]=n.end;let h=u;if(d&&d.source===p)h=d.offset+d.source.length;else{const e=i[0].toUpperCase()+i.substring(1);o(u,l?"MISSING_CHAR":"BAD_INDENT",l?`${e} must end with a ${p}`:`${e} in block collection must be sufficiently indented and end with a ${p}`),d&&1!==d.source.length&&f.unshift(d)}if(f.length>0){const e=Lt(f,h,r.options.strict,o);e.comment&&(c.comment?c.comment+="\n"+e.comment:c.comment=e.comment),c.range=[n.offset,h,e.offset]}else c.range=[n.offset,h,h];return c}(e,t,r,n,s),i=a.constructor;return"!"===o||o===i.tagName?(a.tag=i.tagName,a):(o&&(a.tag=o),a)}function jt(e,t,r){const n=t.offset,o=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=t[0],s=o[0];let a=0,i="",c=-1;for(let t=1;t<o.length;++t){const r=o[t];if(i||"-"!==r&&"+"!==r){const n=Number(r);!a&&n?a=n:-1===c&&(c=e+t)}else i=r}-1!==c&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let l=!1,u="",p=o.length;for(let e=1;e<t.length;++e){const o=t[e];switch(o.type){case"space":l=!0;case"newline":p+=o.source.length;break;case"comment":r&&!l&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=o.source.length,u=o.source.substring(1);break;case"error":n(o,"UNEXPECTED_TOKEN",o.message),p+=o.source.length;break;default:{n(o,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${o.type}`);const e=o.source;e&&"string"==typeof e&&(p+=e.length)}}}return{mode:s,indent:a,chomp:i,comment:u,length:p}}(t,e.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};const s=">"===o.mode?U.BLOCK_FOLDED:U.BLOCK_LITERAL,a=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),o=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)o.push([t[e],t[e+1]]);return o}(t.source):[];let i=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;i=e}if(0===i){const e="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let r=n+o.length;return t.source&&(r+=t.source.length),{value:e,type:s,comment:o.comment,range:[n,r,r]}}let c=t.indent+o.indent,l=t.offset+o.length,u=0;for(let t=0;t<i;++t){const[n,s]=a[t];if(""!==s&&"\r"!==s){if(n.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===o.indent&&(c=n.length),u=t,0!==c||e.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===o.indent&&n.length>c&&(c=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=i;--e)a[e][0].length>c&&(i=e+1);let p="",d="",f=!1;for(let e=0;e<u;++e)p+=a[e][0].slice(c)+"\n";for(let e=u;e<i;++e){let[t,n]=a[e];l+=t.length+n.length+1;const i="\r"===n[n.length-1];if(i&&(n=n.slice(0,-1)),n&&t.length<c){const e="Block scalar lines must not be less indented than their "+(o.indent?"explicit indentation indicator":"first line");r(l-n.length-(i?2:1),"BAD_INDENT",e),t=""}s===U.BLOCK_LITERAL?(p+=d+t.slice(c)+n,d="\n"):t.length>c||"\t"===n[0]?(" "===d?d="\n":f||"\n"!==d||(d="\n\n"),p+=d+t.slice(c)+n,d="\n",f=!0):""===n?"\n"===d?p+="\n":d="\n":(p+=d+n,d=" ",f=!1)}switch(o.chomp){case"-":break;case"+":for(let e=i;e<a.length;++e)p+="\n"+a[e][0].slice(c);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const h=n+o.length+t.source.length;return{value:p,type:s,comment:o.comment,range:[n,h,h]}}function Vt(e,t,r){const{offset:n,type:o,source:s,end:a}=e;let i,c;const l=(e,t,o)=>r(n+e,t,o);switch(o){case"scalar":i=U.PLAIN,c=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Ut(e)}(s,l);break;case"single-quoted-scalar":i=U.QUOTE_SINGLE,c=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Ut(e.slice(1,-1)).replace(/''/g,"'")}(s,l);break;case"double-quoted-scalar":i=U.QUOTE_DOUBLE,c=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const o=e[n];if("\r"!==o||"\n"!==e[n+1])if("\n"===o){const{fold:t,offset:o}=Qt(e,n);r+=t,n=o}else if("\\"===o){let o=e[++n];const s=qt[o];if(s)r+=s;else if("\n"===o)for(o=e[n+1];" "===o||"\t"===o;)o=e[1+ ++n];else if("\r"===o&&"\n"===e[n+1])for(o=e[1+ ++n];" "===o||"\t"===o;)o=e[1+ ++n];else if("x"===o||"u"===o||"U"===o){const s={x:2,u:4,U:8}[o];r+=Kt(e,n+1,s,t),n+=s}else{const o=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(" "===o||"\t"===o){const t=n;let s=e[n+1];for(;" "===s||"\t"===s;)s=e[1+ ++n];"\n"===s||"\r"===s&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):o)}else r+=o}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(s,l);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}const u=n+s.length,p=Lt(a,u,t,r);return{value:c,type:i,comment:p.comment,range:[n,u,p.offset]}}function Ut(e){let t,r;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),r=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let o=n[1],s=" ",a=t.lastIndex;for(r.lastIndex=a;n=r.exec(e);)""===n[1]?"\n"===s?o+=s:s="\n":(o+=s+n[1],s=" "),a=r.lastIndex;const i=/[ \t]*(.*)/sy;return i.lastIndex=a,n=i.exec(e),o+s+(n?.[1]??"")}function Qt(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const qt={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Kt(e,t,r,n){const o=e.substr(t,r),s=o.length===r&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(s)){const o=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(s)}function zt(e,t,r,n){const{value:o,type:s,comment:a,range:i}="block-scalar"===t.type?jt(e,t,n):Vt(t,e.options.strict,n),c=r?e.directives.tagName(r.source,(e=>n(r,"TAG_RESOLVE_FAILED",e))):null;let u,p;u=e.options.stringKeys&&e.atKey?e.schema[l]:c?function(e,t,r,n,o){if("!"===r)return e[l];const s=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;s.push(t)}for(const e of s)if(e.test?.test(t))return e;const a=e.knownTags[r];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[l])}(e.schema,o,c,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,o,s){const a=r.tags.find((t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n)))||r[l];if(r.compat){const e=r.compat.find((e=>e.default&&e.test?.test(n)))??r[l];a.tag!==e.tag&&s(o,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(a.tag)} or ${t.tagString(e.tag)}`,!0)}return a}(e,o,t,n):e.schema[l];try{const s=u.resolve(o,(e=>n(r??t,"TAG_RESOLVE_FAILED",e)),e.options);p=g(s)?s:new U(s)}catch(e){const s=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",s),p=new U(o)}return p.range=i,p.source=o,s&&(p.type=s),c&&(p.tag=c),u.format&&(p.format=u.format),a&&(p.comment=a),p}function Wt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const Ht={composeNode:Gt,composeEmptyNode:Yt};function Gt(e,t,r,n){const o=e.atKey,{spaceBefore:s,comment:a,anchor:i,tag:c}=r;let l,u=!0;switch(t.type){case"alias":l=function({options:e},{offset:t,source:r,end:n},o){const s=new B(r.substring(1));""===s.source&&o(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&o(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=t+r.length,i=Lt(n,a,e.strict,o);return s.range=[t,a,i.offset],i.comment&&(s.comment=i.comment),s}(e,t,n),(i||c)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=zt(e,t,c,n),i&&(l.anchor=i.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=function(e,t,r,n,o){const s=n.tag,a=s?t.directives.tagName(s.source,(e=>o(s,"TAG_RESOLVE_FAILED",e))):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&s?e.offset>s.offset?e:s:e??s;r&&(!t||t.offset<r.offset)&&o(r,"MISSING_CHAR","Missing newline after block sequence props")}const i="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!s||!a||"!"===a||a===Te.tagName&&"map"===i||a===De.tagName&&"seq"===i)return Bt(e,t,r,o,a);let c=t.schema.tags.find((e=>e.tag===a&&e.collection===i));if(!c){const n=t.schema.knownTags[a];if(!n||n.collection!==i)return n?o(s,"BAD_COLLECTION_TYPE",`${n.tag} used for ${i} collection, but expects ${n.collection??"scalar"}`,!0):o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),Bt(e,t,r,o,a);t.schema.tags.push(Object.assign({},n,{default:!1})),c=n}const l=Bt(e,t,r,o,a,c),u=c.resolve?.(l,(e=>o(s,"TAG_RESOLVE_FAILED",e)),t.options)??l,p=b(u)?u:new U(u);return p.range=l.range,p.tag=a,c?.format&&(p.format=c.format),p}(Ht,e,t,r,n),i&&(l.anchor=i.source.substring(1));break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),l=Yt(e,t.offset,void 0,null,r,n),u=!1}return i&&""===l.anchor&&n(i,"BAD_ALIAS","Anchor cannot be an empty string"),o&&e.options.stringKeys&&(!g(l)||"string"!=typeof l.value||l.tag&&"tag:yaml.org,2002:str"!==l.tag)&&n(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&("scalar"===t.type&&""===t.source?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Yt(e,t,r,n,{spaceBefore:o,comment:s,anchor:a,tag:i,end:c},l){const u=zt(e,{type:"scalar",offset:Wt(t,r,n),indent:-1,source:""},i,l);return a&&(u.anchor=a.source.substring(1),""===u.anchor&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=c),u}function Jt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Xt(e){let t="",r=!1,n=!1;for(let o=0;o<e.length;++o){const s=e[o];switch(s[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(s.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[o+1]?.[0]&&(o+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}class Zt{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const o=Jt(e);n?this.warnings.push(new St(o,t,r)):this.errors.push(new It(o,t,r))},this.directives=new M({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Xt(this.prelude);if(r){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!o)e.commentBefore=r;else if(v(o)&&!o.flow&&o.items.length>0){let e=o.items[0];m(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=o.commentBefore;o.commentBefore=e?`${r}\n${e}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Xt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,r,n)=>{const o=Jt(e);o[0]+=t,this.onError(o,"BAD_DIRECTIVE",r,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:o,end:s},a){const i=Object.assign({_directives:t},e),c=new Ct(void 0,i),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Ot(n,{indicator:"doc-start",next:o??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,!o||"block-map"!==o.type&&"block-seq"!==o.type||u.hasNewline||a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=o?Gt(l,o,u,a):Yt(l,u.end,n,null,u,a);const p=c.contents.range[2],d=Lt(s,p,!1,a);return d.comment&&(c.comment=d.comment),c.range=[r,p,d.offset],c}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new It(Jt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new It(Jt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Lt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new It(Jt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new Ct(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function er(e,t=!0,r){if(e){const n=(e,t,n)=>{const o="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new It([o,o+1],t,n);r(o,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Vt(e,t,n);case"block-scalar":return jt({options:{strict:t}},e,n)}}return null}function tr(e,t){const{implicitKey:r=!1,indent:n,inFlow:o=!1,offset:s=-1,type:a="PLAIN"}=t,i=ce({type:a,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(i[0]){case"|":case">":{const e=i.indexOf("\n"),t=i.substring(0,e),r=i.substring(e+1)+"\n",o=[{type:"block-scalar-header",offset:s,indent:n,source:t}];return nr(o,c)||o.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:s,indent:n,props:o,source:r}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:i,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:i,end:c};default:return{type:"scalar",offset:s,indent:n,source:i,end:c}}}function rr(e,t,r={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:s=!1,type:a}=r,i="indent"in e?e.indent:null;if(n&&"number"==typeof i&&(i+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");a=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=ce({type:a,value:t},{implicitKey:o||null===i,indent:null!==i&&i>0?" ".repeat(i):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),o=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=o}else{const{offset:t}=e,r="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:t,indent:r,source:n}];nr(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:s,source:o})}}(e,c);break;case'"':or(e,c,"double-quoted-scalar");break;case"'":or(e,c,"single-quoted-scalar");break;default:or(e,c,"scalar")}}function nr(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function or(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let o=t.length;"block-scalar-header"===e.props[0].type&&(o-=e.props[0].source.length);for(const e of n)e.offset+=o;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,o="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:o})}}}const sr=e=>"type"in e?ar(e):ir(e);function ar(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=ar(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=ir(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=ir(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=ir(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function ir({start:e,key:t,sep:r,value:n}){let o="";for(const t of e)o+=t.source;if(t&&(o+=ar(t)),r)for(const e of r)o+=e.source;return n&&(o+=ar(n)),o}const cr=Symbol("break visit"),lr=Symbol("skip children"),ur=Symbol("remove item");function pr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),dr(Object.freeze([]),e,t)}function dr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const o of["key","value"]){const s=t[o];if(s&&"items"in s){for(let t=0;t<s.items.length;++t){const n=dr(Object.freeze(e.concat([[o,t]])),s.items[t],r);if("number"==typeof n)t=n-1;else{if(n===cr)return cr;n===ur&&(s.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===o&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}pr.BREAK=cr,pr.SKIP=lr,pr.REMOVE=ur,pr.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},pr.parentCollection=(e,t)=>{const r=pr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],o=r?.[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};const fr="\ufeff",hr="",mr="",gr="",yr=e=>!!e&&"items"in e,vr=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function br(e){switch(e){case fr:return"<BOM>";case hr:return"<DOC>";case mr:return"<FLOW_END>";case gr:return"<SCALAR>";default:return JSON.stringify(e)}}function wr(e){switch(e){case fr:return"byte-order-mark";case hr:return"doc-mode";case mr:return"flow-error-end";case gr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ar(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const $r=new Set("0123456789ABCDEFabcdef"),Er=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Tr=new Set(",[]{}"),Cr=new Set(" ,[]{}\n\r\t"),Dr=e=>!e||Cr.has(e);class Fr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ar(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===fr&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield hr,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&Ar(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ar(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ar(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Dr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&Ar(n[3]))&&(r!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield mr,yield*this.parseLineStart();let o=0;for(;","===n[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),n[o]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Dr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ar(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>Ar(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":r+=1;break;case"\n":t=n,r=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const o=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>o))break;t=e}return yield gr,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ar(t)||e&&Tr.has(t))break;r=n}else if(Ar(t)){let o=this.buffer[n+1];if("\r"===t&&("\n"===o?(n+=1,t="\n",o=this.buffer[n+1]):r=n),"#"===o||e&&Tr.has(o))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Tr.has(t))break;r=n}return t||this.atEnd?(yield gr,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Dr))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Ar(t)||e&&Tr.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ar(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Er.has(t))t=this.buffer[++e];else{if("%"!==t||!$r.has(this.buffer[e+1])||!$r.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class Ir{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function Sr(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Nr(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Or(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Mr(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function xr(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function kr(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||Sr(t.start,"explicit-key-ind")||Sr(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Or(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class Pr{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Fr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=wr(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&kr(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Nr(r.start)&&(0===t.indent||r.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Nr(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=xr(Mr(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const o=t.sep[n];switch(o.type){case"newline":r.push(n);break;case"space":break;case"comment":o.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(o=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Sr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Or(t.key)&&!Sr(t.sep,"newline")){const e=xr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(Sr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=xr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Sr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:o,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Sr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:o});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Sr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=xr(Mr(t));kr(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=xr(Mr(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=xr(Mr(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function Lr(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new Ir||null,prettyErrors:t}}function Rr(e,t={}){const{lineCounter:r,prettyErrors:n}=Lr(t),o=new Pr(r?.addNewLine),s=new Zt(t),a=Array.from(s.compose(o.parse(e)));if(n&&r)for(const t of a)t.errors.forEach(Nt(e,r)),t.warnings.forEach(Nt(e,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function _r(e,t={}){const{lineCounter:r,prettyErrors:n}=Lr(t),o=new Pr(r?.addNewLine),s=new Zt(t);let a=null;for(const t of s.compose(o.parse(e),!0,e.length))if(a){if("silent"!==a.options.logLevel){a.errors.push(new It(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else a=t;return n&&r&&(a.errors.forEach(Nt(e,r)),a.warnings.forEach(Nt(e,r))),a}function Br(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const o=_r(e,r);if(!o)return null;if(o.warnings.forEach((e=>pe(o.options.logLevel,e))),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},r))}function jr(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return f(e)&&!n?e.toString(r):new Ct(e,n,r).toString(r)}const Vr=o},4865:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[{"$class":"concerto.metamodel@1.0.0.Decorator","name":"DotNetNamespace","arguments":[{"$class":"concerto.metamodel@1.0.0.DecoratorString","value":"AccordProject.Concerto.Metamodel"}]}],"namespace":"concerto.metamodel@1.0.0","imports":[],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Position","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"line","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"column","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"offset","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Range","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"start","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"end","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"source","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TypeIdentifier","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"resolvedName","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorLiteral","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorString","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorNumber","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorBoolean","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorTypeReference","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Decorator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"arguments","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Identified","isAbstract":false,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IdentifiedBy","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Declaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapKeyType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapValueType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"key","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"value","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapKeyType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"EnumProperty"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ConceptDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isAbstract","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"identified","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"superType","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AssetDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ParticipantDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TransactionDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EventDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Property","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isOptional","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeProperty","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringRegexValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"pattern","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"flags","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringLengthValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"minLength","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"maxLength","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AliasedType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"aliasedName","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Import","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"uri","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportAll","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportTypes","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"types","isArray":true,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"aliasedTypes","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"AliasedType"},"isArray":true,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Model","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"sourceUri","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"concertoVersion","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"imports","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"declarations","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Models","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"models","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Model"},"isArray":true,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ScalarDeclaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}}]}')},480:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[],"namespace":"concerto.decorator@1.0.0","imports":[],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Decorator","isAbstract":true,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DotNetNamespace","superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false}]}]}')},6391:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[{"$class":"concerto.metamodel@1.0.0.Decorator","name":"DotNetNamespace","arguments":[{"$class":"concerto.metamodel@1.0.0.DecoratorString","value":"AccordProject.Concerto"}]}],"namespace":"concerto@1.0.0","imports":[{"$class":"concerto.metamodel@1.0.0.ImportType","name":"DotNetNamespace","namespace":"concerto.decorator@1.0.0"}],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Concept","isAbstract":true,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Asset","isAbstract":true,"properties":[],"identified":{"$class":"concerto.metamodel@1.0.0.Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Participant","isAbstract":true,"properties":[],"identified":{"$class":"concerto.metamodel@1.0.0.Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Transaction","isAbstract":true,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Event","isAbstract":true,"properties":[]}]}')},8168:e=>{"use strict";e.exports=JSON.parse('{"en":{"like":["{0, plural, offset:1"," =0 {Be the first to like this}"," =1 {You liked this}"," one {You and someone else liked this}"," other {You and # others liked this}","}"],"test-hello-array":"Hello, {0} {1} {2}","test-hello-object":"Hello, {first} {middle} {last}","test-repeat-array":"{0} {0} {0}","test-repeat-object":"{value} {value} {value}","classdeclaration-constructor-modelastreq":"\\"ModelFile\\" and \\"AST\\" are required to create a \\"ClassDecl\\".","classdeclaration-process-unrecmodelelem":"Unrecognised model element \\"{type}\\".","classdeclaration-getfield-notfindsupertype":"Could not find supertype \\"{type}\\".","classdeclaration-validate-identifiernotproperty":"Class \\"{class}\\" is identified by field \\"{idField}\\", but does not contain this property.","classdeclaration-validate-identifiernotstring":"Class \\"{class}\\" is identified by field \\"{idField}\\", but the type of the field is not \\"String\\".","classdeclaration-validate-duplicatefieldname":"Class \\"{class}\\" has more than one field named \\"{fieldName}\\".","classdeclaration-validate-missingidentifier":"Class \\"{class}\\" is not declared as \\"abstract\\". It must define an identifying field.","classdeclaration-validate-selfextending":"Class \\"{class}\\" cannot extend itself.","classdeclaration-validate-undefined-properties":"Properties of Class \\"{class}\\" has to be defined.","modelfile-constructor-unrecmodelelem":"Unrecognised model element \\"{type}\\".","modelfile-resolvetype-undecltype":"Undeclared type \\"{type}\\" in \\"{context}\\".","modelfile-resolveimport-failfindimp":"Failed to find \\"{type}\\" in list of imports \\"[{imports}]\\" for namespace \\"{namespace}\\".","transactiondeclaration-getidentifierfieldname-noidentifyingfield":"Transactions do not have an identifying field.","composer-connect-noconopts":"\\"connectOptions\\" not specified.","composer-connect-nokeyvalstore":"\\"connectOptions.keyValStore\\" not specified.","composer-connect-nomembersrvcurl":"\\"connectOptions.membershipServicesURL\\" not specified.","composer-connect-nopeerurl":"\\"connectOptions.peerURL\\" not specified.","composer-connect-noeventhuburl":"\\"connectOptions.eventHubURL\\" not specified.","composer-connect-notconnected":"Connection needs to be connected. Call \\"connect(..)\\".","composer-login-noenrollmentid":"\\"enrollmentID\\" not specified.","composer-login-noenrollmentsecret":"\\"enrollmentSecret\\" not specified.","composer-deploy-nosecuritycontext":"\\"securityContext\\" not specified.","factory-newinstance-missingidentifier":"Missing identifier for Type \\"{type}\\" in namespace \\"{namespace}\\".","factory-newinstance-invalididentifier":"Invalid or missing identifier for Type \\"{type}\\" in namespace \\"{namespace}\\".","factory-newinstance-abstracttype":"Cannot instantiate the abstract type \\"{type}\\" in the \\"{namespace}\\" namespace.","factory-newrelationship-notregisteredwithmm":"Cannot create relationship as namespace \\"{namespace}\\" is not known.","factory-newinstance-typenotdeclaredinns":"Cannot instantiate Type \\"{type}\\" in namespace \\"{namespace}\\".","instancegenerator-newinstance-noconcreteclass":"No concrete extending type for \\"{type}\\".","modelmanager-resolvetype-nonsfortype":"No registered namespace for type \\"{type}\\" in \\"{context}\\".","modelmanager-resolvetype-notypeinnsforcontext":"No type \\"{type}\\" in namespace \\"{namespace}\\" for \\"{context}\\".","modelmanager-gettype-noregisteredns":"Namespace is not defined for type \\"{type}\\".","modelmanager-gettype-duplicatensimport":"Importing types from different versions (\\"{version1}\\", \\"{version2}\\") of the same namespace \\"{namespace}\\" is not permitted.","modelmanager-gettype-notypeinns":"Type \\"{type}\\" is not defined in namespace \\"{namespace}\\".","serializer-constructor-factorynull":"\\"Factory\\" cannot be \\"null\\".","serializer-constructor-modelmanagernull":"\\"ModelManager\\" cannot be \\"null\\".","serializer-tojson-notcobject":"\\"Serializer.toJSON\\" only accepts \\"Concept\\", \\"Event\\", \\"Asset\\", \\"Participant\\" or \\"Transaction\\".","util-securitycheck-novalidcontext":"A valid \\"SecurityContext\\" must be specified.","modelutil-getnamespace-nofnq":"FQN is invalid.","resourcevalidator-notresourceorconcept":"Model violation in the \\"{resourceId}\\" instance. Class \\"{classFQN}\\" has the value of \\"{invalidValue}\\". Expected a \\"Resource\\" or a \\"Concept\\".","resourcevalidator-notrelationship":"Model violation in the \\"{resourceId}\\" instance. Class \\"{classFQN}\\" has a value of \\"{invalidValue}\\". Expected a \\"Relationship\\".","resourcevalidator-fieldtypeviolation":"Model violation in the \\"{resourceId}\\" instance. The field \\"{propertyName}\\" has a value of \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type of value: \\"{fieldType}\\".","resourcevalidator-missingrequiredproperty":"The instance \\"{resourceId}\\" is missing the required field \\"{fieldName}\\".","resourcevalidator-invalidenumvalue":"Model violation in the \\"{resourceId}\\" instance. Invalid enum value of \\"{value}\\" for the field \\"{fieldName}\\".","resourcevalidator-abstractclass":"The class \\"{className}\\" is abstract and should not contain an instance.","resourcevalidator-undeclaredfield":"Instance \\"{resourceId}\\" has a property named \\"{propertyName}\\", which is not declared in \\"{fullyQualifiedTypeName}\\".","resourcevalidator-invalidfieldassignment":"Instance \\"{resourceId}\\" has a property \\"{propertyName}\\" with type \\"{objectType}\\" that is not derived from \\"{fieldType}\\".","resourcevalidator-emptyidentifier":"Instance \\"{resourceId}\\" has an empty identifier.","resourcevalidator-invalidmap":"Model violation in the \\"{resourceId}\\" instance. Invalid Type for Map Key or Value - expected String type.","typenotfounderror-defaultmessage":"Type \\"{typeName}\\" not found.","whereastvalidator-propertytypeviolation":"Property \\"{propertyName}\\" cannot be compared with \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type: \\"{fieldType}\\".","whereastvalidator-enum-propertytypeviolation":"Enum property \\"{propertyName}\\" cannot be compared with \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type: \\"String\\".","whereastvalidator-relationship-propertytypeviolation":"Relationship \\"{propertyName}\\" cannot be compared with \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type: \\"String\\".","whereastvalidator-unsupportedtype":"Property \\"{propertyName}\\" of type \\"{fieldType}\\" cannot be compared with a literal value.","whereastvalidator-invalidoperator":"Property \\"{propertyName}\\" cannot be compared using the \\"{operator}\\" operator."}}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@accordproject/concerto-core","version":"3.25.5","description":"Core Implementation for the Concerto Modeling Language","homepage":"https://github.com/accordproject/concerto","engines":{"node":">=18","npm":">=10"},"main":"index.js","browser":"dist/concerto-core.js","typings":"types/index.d.ts","scripts":{"prepublishOnly":"npm run webpack","pretest":"npm run lint","lint":"eslint .","postlicchk":"npm run doc","doc":"jsdoc --pedantic --recurse -c jsdoc.json","test":"node ./scripts/api-changelog.js && cross-env TZ=UTC nyc mocha --recursive -t 10000","test:watch":"cross-env TZ=UTC nyc mocha --watch --recursive -t 10000","mocha":"mocha --recursive -t 10000","nyc":"nyc mocha --recursive -t 10000","build":"npm run build:types","postbuild":"npm run webpack","webpack":"webpack --config webpack.config.js --mode production","build:types":"tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types"},"repository":{"type":"git","url":"https://github.com/accordproject/concerto.git","directory":"packages/concerto-cto"},"keywords":["schema","data model","verification"],"author":"accordproject.org","license":"Apache-2.0","devDependencies":{"@babel/preset-env":"7.26.0","acorn":"8.14.0","acorn-walk":"8.3.4","babel-loader":"9.2.1","chai":"4.3.6","chai-as-promised":"7.1.1","chai-things":"0.2.0","commander":"2.20.0","cross-env":"7.0.3","doctrine":"3.0.0","eslint":"8.57.1","fs-extra":"11.2.0","jsdoc":"4.0.4","klaw":"4.1.0","mocha":"10.8.2","node-polyfill-webpack-plugin":"4.0.0","nyc":"17.1.0","sinon":"19.0.2","tmp-promise":"3.0.3","typescript":"5.7.2","webpack":"5.96.1","webpack-cli":"5.1.4","xregexp":"5.1.1","yargs":"17.7.2"},"dependencies":{"@accordproject/concerto-cto":"3.25.5","@accordproject/concerto-metamodel":"3.12.6","@accordproject/concerto-util":"3.25.5","dayjs":"1.11.13","debug":"4.3.7","lorem-ipsum":"2.0.8","randexp":"0.5.3","rfdc":"1.4.1","semver":"7.6.3","urijs":"1.19.11","uuid":"11.0.3","yaml":"2.8.0"},"browserslist":"> 0.25%, not dead","nyc":{"produce-source-map":"true","sourceMap":"inline","reporter":["lcov","text-summary","html","json"],"include":["lib/**/*.js"],"exclude":[],"all":true,"check-coverage":true,"statements":99,"branches":97,"functions":98,"lines":99}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}return 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),r(5237)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["concerto-core"]=t():e["concerto-core"]=t()}(self,(()=>(()=>{var e={3348:(e,t,r)=>{"use strict";const n=r(3954),{DcsCto:o,DcsNamespace:s}=r(5497);e.exports={MetaModelUtil:n,MetaModelNamespace:"concerto.metamodel@1.0.0",DcsCto:o,DcsNamespace:s}},5497:e=>{"use strict";e.exports={DcsCto:'/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nnamespace org.accordproject.decoratorcommands@0.4.0\n\nimport concerto.metamodel@1.0.0.Decorator\n\n/**\n * A reference to an existing named & versioned DecoratorCommandSet\n */\nconcept DecoratorCommandSetReference {\n o String name\n o String version\n}\n\n/**\n * Whether to upsert or append the decorator\n */\nenum CommandType {\n o UPSERT\n o APPEND\n}\n\n/**\n * Which models elements to add the decorator to. Any null\n * elements are \'wildcards\'.\n */\nconcept CommandTarget {\n o String namespace optional\n o String declaration optional\n o String property optional\n o String[] properties optional // property and properties are mutually exclusive\n o String type optional\n o MapElement mapElement optional\n}\n\n/**\n * Map Declaration elements which might be used as a target\n */\nenum MapElement {\n o KEY\n o VALUE\n o KEY_VALUE\n}\n\n/**\n * Applies a decorator to a given target\n */\nconcept Command {\n o CommandTarget target\n o Decorator decorator\n o CommandType type\n o String decoratorNamespace optional\n}\n\n/**\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\n */\nconcept DecoratorCommandSet {\n o String name\n o String version\n o DecoratorCommandSetReference[] includes optional // not yet supported\n o Command[] commands\n}',DcsNamespace:"org.accordproject.decoratorcommands@0.4.0"}},4702:e=>{"use strict";e.exports='/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace("AccordProject.Concerto.Metamodel")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n o String resolvedName optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapKeyType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapValueType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o MapValueType value\n}\n\nconcept StringMapKeyType extends MapKeyType {}\nconcept DateTimeMapKeyType extends MapKeyType {}\n\nconcept ObjectMapKeyType extends MapKeyType {\n o TypeIdentifier type\n}\n\nconcept BooleanMapValueType extends MapValueType {}\nconcept DateTimeMapValueType extends MapValueType {}\nconcept StringMapValueType extends MapValueType {}\nconcept IntegerMapValueType extends MapValueType {}\nconcept LongMapValueType extends MapValueType {}\nconcept DoubleMapValueType extends MapValueType {}\n\nconcept ObjectMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept RelationshipMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept StringLengthValidator {\n o Integer minLength optional\n o Integer maxLength optional\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nconcept AliasedType{\n o String name\n o String aliasedName\n}\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n o AliasedType[] aliasedTypes optional\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n o String namespace optional\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue optional\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n'},3954:(e,t,r)=>{"use strict";const n=r(4865),o="concerto.metamodel@1.0.0",s=r(4702);function a(e,t){return e.declarations.find((e=>e.name===t))}function i(e,t){if(!t[e])throw new Error(`Name ${e} not found`);return t[e].namespace}function c(e,t){switch((e.decorators||[]).forEach((e=>{c(e,t)})),e.$class){case`${o}.Model`:(e.declarations||[]).forEach((e=>{c(e,t)}));break;case`${o}.EnumDeclaration`:case`${o}.AssetDeclaration`:case`${o}.ConceptDeclaration`:case`${o}.EventDeclaration`:case`${o}.TransactionDeclaration`:case`${o}.ParticipantDeclaration`:if(e.superType){const r=e.superType.name;e.superType.namespace=i(r,t),e.superType.name=t[r].name,t[r]?.resolvedName&&(e.superType.resolvedName=t[r].resolvedName)}(e.properties||[]).forEach((e=>{c(e,t)}));break;case`${o}.MapDeclaration`:c(e.key,t),c(e.value,t);break;case`${o}.Decorator`:(e.arguments||[]).forEach((e=>{c(e,t)}));break;case`${o}.ObjectProperty`:case`${o}.RelationshipProperty`:case`${o}.DecoratorTypeReference`:case`${o}.ObjectMapKeyType`:case`${o}.ObjectMapValueType`:case`${o}.RelationshipMapValueType`:e.type.namespace=i(e.type.name,t),e.type.name=t[e.type.name].name,t[e.type.name]?.resolvedName&&(e.type.resolvedName=t[e.type.name].resolvedName);break;case`${o}.StringScalar`:case`${o}.BooleanScalar`:case`${o}.DateTimeScalar`:case`${o}.DoubleScalar`:case`${o}.LongScalar`:case`${o}.IntegerScalar`:e.namespace=i(e.name,t),e.name=t[e.name].name}return e}function l(e,t){const r=JSON.parse(JSON.stringify(t)),n=function(e,t){const r="concerto@1.0.0",n={Concept:{namespace:r,name:"Concept"},Asset:{namespace:r,name:"Asset"},Participant:{namespace:r,name:"Participant"},Transaction:{namespace:r,name:"Transaction"},Event:{namespace:r,name:"Event"}};return(t.imports||[]).forEach((t=>{const r=t.namespace,s=function(e,t){return e.models.find((e=>e.namespace===t))}(e,r);if(t.$class===`${o}.ImportType`){if(!a(s,t.name))throw new Error(`Declaration ${t.name} in namespace ${r} not found`);n[t.name]={namespace:r,name:t.name}}else if(t.$class===`${o}.ImportTypes`){const e=t.aliasedTypes?new Map(t.aliasedTypes.map((({name:e,aliasedName:t})=>[e,t]))):new Map;t.types.forEach((t=>{const o=e.get(t)||t;if(!a(s,t))throw new Error(`Declaration ${t} in namespace ${r} not found`);n[o]=o!==t?{namespace:r,name:o,resolvedName:t}:{namespace:r,name:t}}))}else(s.declarations||[]).forEach((e=>{n[e.name]={namespace:r,name:e.name}}))})),(t.declarations||[]).forEach((e=>{n[e.name]={namespace:t.namespace,name:e.name}})),n}(e,t);return c(r,n),r}function u(e){const t=[];switch(e.$class){case`${o}.ImportAll`:t.push(`${e.namespace}.*`);break;case`${o}.ImportType`:t.push(`${e.namespace}.${e.name}`);break;case`${o}.ImportTypes`:e.types.forEach((r=>{t.push(`${e.namespace}.${r}`)}));break;default:throw new Error(`Unrecognized imports ${e.$class}`)}return t}e.exports={metaModelAst:n,metaModelCto:s,resolveLocalNames:l,resolveLocalNamesForAll:function(e){const t={$class:`${o}.Models`,models:[]};return e.models.forEach((r=>{const n=l(e,r);t.models.push(n)})),t},importFullyQualifiedNames:u,getExternalImports:function(e){const t={};return e.imports&&e.imports.forEach((e=>{const r=u(e);e.uri&&(t[r[0]]=e.uri)})),t}}},3832:(e,t,r)=>{"use strict";const n=r(5558),{DefaultFileLoader:o,FileDownloader:s,ModelWriter:a}=r(8487),{MetaModelUtil:i,MetaModelNamespace:c}=r(3348),l=r(1595),u=r(2438),p=r(1861),d=r(6226),f=r(1768),h=r(3673),m=r(5477),{getRootModel:g}=r(6128),{getDecoratorModel:y}=r(1051),v=r(5430);void 0===r.g&&(r(5437),r(953),r(9869),r(3135),r(6341),r(8088),r(2302),r(7337),r(3218),r(745));const b=r(7833)("concerto:BaseModelManager"),w=(e,t)=>({ast:t,definitions:null,fileName:e}),A={missingDecorator:void 0,invalidDecorator:void 0},$=["concerto@1.0.0","concerto","concerto.decorator@1.0.0"];class E{constructor(e,t){this.processFile=t||w,this.modelFiles={},this.factory=new l(this),this.serializer=new h(this.factory,this,e),this.decoratorFactories=[],this.strict=!!e?.strict,this.options=e,this.addDecoratorModel(),this.addRootModel(),this.decoratorValidation=e?.decoratorValidation?e?.decoratorValidation:A,this.enableMapType=!!e?.enableMapType,this.importAliasing="true"==={NODE_ENV:"production"}?.IMPORT_ALIASING||!!e?.importAliasing,this.metamodelModelFile=new d(this,i.metaModelAst,void 0,c),e?.addMetamodel&&this.addModelFile(this.metamodelModelFile)}isModelManager(){return!0}isStrict(){return this.strict}isAliasedTypeEnabled(){return this.importAliasing}addRootModel(){const{rootModelAst:e,rootModelCto:t,rootModelFile:r}=g(!0),n=new d(this,e,t,r);if(this.strict)this.addModelFile(n,t,r,!0);else{this.addModelFile(n,t,r,!0);const e=g(!1),o=new d(this,e.rootModelAst,e.rootModelCto,e.rootModelFile);this.addModelFile(o,e.rootModelCto,e.rootModelFile,!0)}}addDecoratorModel(){const{decoratorModelAst:e,decoratorModelCto:t,decoratorModelFile:r}=y(),n=new d(this,e,t,r);this.addModelFile(n,t,r,!0)}accept(e,t){return e.visit(this,t)}validateModelFile(e,t){if("string"==typeof e){const{ast:r}=this.processFile(t,e);new d(this,r,e,t).validate()}else e.validate()}_throwAlreadyExists(e){const t=this.modelFiles[e.getNamespace()].getName(),r=t?` in file ${t}`:"",n=e.getName()?` specified in file ${e.getName()}`:"";let o=`Namespace ${e.getNamespace()}${n} is already declared${r}`;throw new Error(o)}addModelFile(e,t,r,n){if(b("addModelFile","addModelFile",e,r),this.isStrict()&&!e.getVersion())throw new Error("Cannot add an unversioned namespace when 'strict' is true");return this.modelFiles[e.getNamespace()]?this._throwAlreadyExists(e):(n||(this.options?.metamodelValidation&&this.validateAst(e),e.validate()),this.modelFiles[e.getNamespace()]=e),e}validateAst(e){const{version:t}=f.parseNamespace(f.getNamespace(e.getAst().$class)),{version:r}=f.parseNamespace(c);if(t!==r)throw new v(`Model file version ${t} does not match metamodel version ${r}`);const n=!!this.getModelFile(c);n||this.addModelFile(this.metamodelModelFile,void 0,c,!0);try{this.getSerializer().fromJSON(e.getAst())}catch(e){if(this.isStrict())throw new v(e.message);console.warn("Invalid metamodel found. This will throw an exception in a future release. ",e.message)}n||this.deleteModelFile(c)}addModel(e,t,r,n){b("addModel","addModel",e,r);const{ast:o,definitions:s}=this.processFile(r,e),a=t||s,i=new d(this,o,a,r);return this.addModelFile(i,a,r,n),i}updateModelFile(e,t,r){if(b("updateModelFile","updateModelFile",e,t),"string"==typeof e){const{ast:n}=this.processFile(t,e);let o=new d(this,n,e,t);return this.updateModelFile(o,t,r)}if(!this.modelFiles[e.getNamespace()])throw new Error(`Model file for namespace ${e.getNamespace()} not found`);return r||e.validate(),this.modelFiles[e.getNamespace()]=e,e}deleteModelFile(e){if(!this.modelFiles[e])throw new Error("Model file does not exist");delete this.modelFiles[e]}addModelFiles(e,t,r){const n="addModelFiles";b(n,"addModelFiles",e,t);const o={};Object.assign(o,this.modelFiles);let s=[];try{for(let r=0;r<e.length;r++){const n=e[r];let o,a=null;if(t&&(a=t[r]),"string"==typeof n){const{ast:e}=this.processFile(a,n);o=new d(this,e,n,a)}else o=n;this.modelFiles[o.getNamespace()]?this._throwAlreadyExists(o):(this.modelFiles[o.getNamespace()]=o,s.push(o))}return r||this.validateModelFiles(),s}catch(e){throw this.modelFiles={},Object.assign(this.modelFiles,o),e}finally{b(n,s)}}validateModelFiles(){for(let e in this.modelFiles)this.modelFiles[e].validate()}async updateExternalModels(e,t){b("updateExternalModels","updateExternalModels",e),t||(t=new s(new o(this.processFile),(e=>i.getExternalImports(e.ast))));const r={};Object.assign(r,this.modelFiles);try{const r=await t.downloadExternalDependencies(this.getModelFiles(),e),n=[];return r.forEach((e=>{const t=new d(this,e.ast,e.definitions,e.fileName);this.modelFiles[t.getNamespace()]?n.push(this.updateModelFile(t,t.getName(),!0)):n.push(this.addModelFile(t,null,t.getName(),!0))})),this.validateModelFiles(),n}catch(e){throw this.modelFiles={},Object.assign(this.modelFiles,r),e}}writeModelsToFileSystem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a.writeModelsToFileSystem(this.getModelFiles(),e,t)}getDecoratorValidation(){return this.decoratorValidation}getModelFiles(e){let t=Object.keys(this.modelFiles),r=[];for(let n=0;n<t.length;n++){const o=t[n];!e&&$.includes(o)||r.push(this.modelFiles[o])}return r}getModels(e){const t=this.getModelFiles();let r=[];const o=Object.assign({includeExternalModels:!0},e);return t.forEach((function(e){if(e.isExternal()&&!o.includeExternalModels)return;let t;if("UNKNOWN"!==e.fileName&&null!==e.fileName&&e.fileName){let r=e.fileName;t=n.basename(r)}else t=e.namespace+".cto";r.push({name:t,content:e.definitions})})),r}resolveType(e,t){if(f.isPrimitiveType(t))return t;let r=f.getNamespace(t),n=this.getModelFile(r);if(!n){let r=u.messageFormatter("modelmanager-resolvetype-nonsfortype");throw new p(r({type:t,context:e}))}if(n.isLocalType(t))return t;let o=u.messageFormatter("modelmanager-resolvetype-notypeinnsforcontext");throw new p(o({context:e,type:t,namespace:n.getNamespace()}))}clearModelFiles(){this.modelFiles={},this.addDecoratorModel(),this.addRootModel()}getModelFile(e){return this.modelFiles[e]}getModelFileByFileName(e){return this.getModelFiles().filter((t=>t.getName()===e))[0]}getNamespaces(){return Object.keys(this.modelFiles)}getType(e){const t=f.getNamespace(e),r=this.getModelFile(t);if(!r){const t=u.messageFormatter("modelmanager-gettype-noregisteredns");throw new m(e,t({type:e}))}const n=r.getType(e);if(!n){const r=u.messageFormatter("modelmanager-gettype-notypeinns");throw new m(e,r({type:f.getShortName(e),namespace:t}))}return n}getAssetDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getAssetDeclarations())),[])}getTransactionDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getTransactionDeclarations())),[])}getEventDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getEventDeclarations())),[])}getParticipantDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getParticipantDeclarations())),[])}getMapDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getMapDeclarations())),[])}getEnumDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getEnumDeclarations())),[])}getConceptDeclarations(){return this.getModelFiles().reduce(((e,t)=>e.concat(t.getConceptDeclarations())),[])}getFactory(){return this.factory}getSerializer(){return this.serializer}getDecoratorFactories(){return this.decoratorFactories}addDecoratorFactory(e){this.decoratorFactories.push(e)}derivesFrom(e,t){let r=this.getType(e);for(;r;){if(r.getFullyQualifiedName()===t)return!0;r=r.getSuperTypeDeclaration()}return!1}resolveMetaModel(e){const t=this.getAst(!1,!0);return i.resolveLocalNames(t,e)}fromAst(e,t){this.clearModelFiles(),e.models.forEach((e=>{if(!$.includes(e.namespace)){const t=new d(this,e);this.addModelFile(t,null,null,!0)}})),t?.disableValidation||this.validateModelFiles()}getAst(e,t){const r={$class:`${c}.Models`,models:[]};return this.getModelFiles(t).forEach((t=>{let n=t.getAst();e&&(n=this.resolveMetaModel(n)),r.models.push(n)})),r}filter(e){const t=new E({...this.options},this.processFile),r=[];let n=Object.values(this.modelFiles).map((n=>n.filter(e,t,r))).filter(Boolean);n=n.filter((e=>!e.isSystemModelFile()));const o=n.map((e=>{const t=e.getAst();let n=!1;return r.forEach((r=>{const o=f.getNamespace(r);if(!o.startsWith("concerto@")&&"concerto"!==o&&e.getImports().includes(r)){const e=f.getShortName(r),o=f.getNamespace(r);t.imports=t.imports.filter((t=>{const r="ImportType"===f.getShortName(t.$class)&&t.name===e&&t.namespace===o;return r&&(n=!0),!r})),t.imports.forEach((t=>{t.namespace===o&&"ImportTypes"===f.getShortName(t.$class)&&(t.types=t.types.filter((t=>{const r=t===e;return r&&(n=!0),!r})))}))}})),n?new d(this,t,void 0,e.fileName):e}));return t.addModelFiles(o),t}}e.exports=E},7662:(e,t,r)=>{"use strict";const n=r(9472),o="resource",{TypedStack:s}=r(8487),a=r(3561);void 0===r.g&&r(9481),e.exports=class{constructor(e){this.modelManager=e}validate(e,t){const r=this.getTypeDeclaration(e),n={};n.stack=new s(e);const o=new a(this,t);r.accept(o,n)}getModelManager(){return this.modelManager}isObject(e){return"object"==typeof e&&e.$class}getTypeDeclaration(e){if(!e.$class)throw new Error("Input object does not have a $class attribute.");return this.modelManager.getType(e.$class)}getIdentifier(e){const t=this.getTypeDeclaration(e).getIdentifierFieldName();if(!t)throw new Error(`Object does not have an identifier: ${JSON.stringify(e)}`);return e[t]}isIdentifiable(e){const t=this.getTypeDeclaration(e);return!t.isSystemIdentified()&&null!==t.getIdentifierFieldName()}isRelationship(e){return"string"==typeof e&&e.startsWith(`${o}:`)}setIdentifier(e,t){const r=this.getTypeDeclaration(e).getIdentifierFieldName(),n=JSON.parse(JSON.stringify(e));return n[r]=t,n}getFullyQualifiedIdentifier(e){return this.getTypeDeclaration(e),`${e.$class}#${this.getIdentifier(e)}`}toURI(e){return this.getTypeDeclaration(e),`${o}:${e.$class}#${encodeURI(this.getIdentifier(e))}`}fromURI(e){let t;try{t=n.parse(e)}catch(t){throw new Error("Invalid URI: "+e)}const r=t.protocol;if(r&&r!==o)throw new Error("Invalid URI scheme: "+e);if(t.username||t.password||t.port||t.query)throw new Error("Invalid resource URI format: "+e);return{typeDeclaration:this.getTypeDeclaration({$class:t.path}),id:decodeURIComponent(t.fragment)}}getType(e){return this.getTypeDeclaration(e).getName()}getNamespace(e){return this.getTypeDeclaration(e).getNamespace()}}},7624:(e,t,r)=>{"use strict";const n=r(3464),o=r(7657);n.extend(o);const s=r(4491);n.extend(s);const a=r(3221);n.extend(a);const i=r(279);n.extend(i),e.exports={setCurrentTime:function(e,t){const r="number"==typeof t?t:n().utcOffset(),o=e?n.utc(e):n().utc();if(!o.isValid())throw new Error(`Current time '${e}' is not in standard UTC format`);const s=o.utcOffset(r);if(!s.isValid())throw new Error(`Cannot set current time to '${e}' with UTC offset '${t}'`);return{currentTime:s,utcOffset:r}}}},2307:(e,t,r)=>{"use strict";const n=r(3198),o=r(1768),{MetaModelNamespace:s}=r(3348);function a(e){const t=Object.keys(e),r={};return t.forEach((t=>{"$class"!==t&&(r[t]=e[t])})),r}function i(e){const t={[`${s}.DecoratorString`]:"String",[`${s}.DecoratorNumber`]:"Number",[`${s}.DecoratorBoolean`]:"Boolean"};return e.$class.endsWith("TypeReference")?{typeReference:{name:e.type.name,namespace:e.type.namespace,resolvedName:e.type.resolvedName,isArray:String(e.isArray)}}:{type:t[e.$class],value:String(e.value)}}function c(e){return{action:e.type,target:a(e.target),decorator:(t=e.decorator,{name:t.name,arguments:0===t.arguments?.length?void 0:t.arguments?.map(i)})};var t}e.exports={jsonToYaml:function(e){const t=o.getNamespace(e.$class),r={decoratorCommandsVersion:o.parseNamespace(t).version,name:e.name,version:e.version,commands:e.commands.map(c)};return n.stringify(r,{schema:"failsafe"})},yamlToJson:function(e){const t=n.parse(e,{schema:"failsafe"}),r="org.accordproject.decoratorcommands@"+t.decoratorCommandsVersion;return{$class:o.getFullyQualifiedName(r,"DecoratorCommandSet"),name:t.name,version:t.version,commands:t.commands.map((e=>function(e,t){return{$class:o.getFullyQualifiedName(e,"Command"),type:t.action,target:{$class:o.getFullyQualifiedName(e,"CommandTarget"),...t.target},decorator:(r=t.decorator,{$class:o.getFullyQualifiedName(s,"Decorator"),name:r.name,arguments:r.arguments?r.arguments.map((e=>function(e,t){const r={String:`${e}.DecoratorString`,Number:`${e}.DecoratorNumber`,Boolean:`${e}.DecoratorBoolean`};if("typeReference"===Object.keys(t)[0])return{$class:o.getFullyQualifiedName(e,"DecoratorTypeReference"),type:{$class:o.getFullyQualifiedName(e,"TypeIdentifier"),name:t.typeReference.name,...void 0!==t.typeReference.namespace?{namespace:t.typeReference.namespace}:{},...void 0!==t.typeReference.resolvedName?{resolvedName:t.typeReference.resolvedName}:{}},isArray:"true"===t.typeReference.isArray||!0===t.typeReference.isArray};const n=t.type;let s=t.value;return"Number"===n?s=Number(s):"Boolean"===n&&(s="true"===s),{$class:r[n],value:s}}(s,e))):[]})};var r}(r,e)))}}}},8298:(e,t,r)=>{"use strict";const n=r(9481),o=r(1768),{MetaModelNamespace:s}=r(3348);class a{static Action={EXTRACT_ALL:0,EXTRACT_VOCAB:1,EXTRACT_NON_VOCAB:2};constructor(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.Action.EXTRACT_ALL,s=arguments.length>5?arguments[5]:void 0;this.extractionDictionary={},this.removeDecoratorsFromModel=e,this.locale=t,this.enableDcsNamespaceTarget=!!s?.enableDcsNamespaceTarget,this.dcs_version=r,this.sourceModelAst=n,this.updatedModelAst=n,this.action=Object.values(a.Action).includes(o)?o:a.Action.EXTRACT_ALL}isVocabDecorator(e){return"Term"===e||e.startsWith("Term_")}constructDCSDictionary(e,t,r){const n={declaration:r?.declaration||"",property:r?.property||"",mapElement:r?.mapElement||"",dcs:JSON.stringify(t)};this.extractionDictionary[e]&&Array.isArray(this.extractionDictionary[e])?this.extractionDictionary[e].push(n):this.extractionDictionary[e]=[n]}transformNonVocabularyDecorators(e,t,r){const{name:n,version:s}=o.parseNamespace(t),a=n,i=s;if(e?.length>0){const t={$class:`org.accordproject.decoratorcommands@${this.dcs_version}.DecoratorCommandSet`,name:a,version:i,commands:e};r.push(t)}return r}transformVocabularyDecorators(e,t,r){if(Object.keys(e).length>0){let n="";n+=`locale: ${this.locale}\n`,n+=`namespace: ${t}\n`,n+="declarations:\n",Object.keys(e).forEach((t=>{e[t].term&&(n+=` - ${t}: ${e[t].term}\n`);const r=Object.keys(e[t]).filter((e=>"term"!==e&&"propertyVocabs"!==e));r.length>0&&(e[t].term||(n+=` - ${t}: ${t}\n`),r.forEach((r=>{n+=` ${r}: ${e[t][r]}\n`}))),e[t].propertyVocabs&&Object.keys(e[t].propertyVocabs).length>0&&(e[t].term||0!==r.length||(n+=` - ${t}: ${t}\n`),n+=" properties:\n",Object.keys(e[t].propertyVocabs).forEach((r=>{n+=` - ${r}: ${e[t].propertyVocabs[r].term||""}\n`,Object.keys(e[t].propertyVocabs[r]).filter((e=>"term"!==e)).forEach((o=>{n+=` ${o}: ${e[t].propertyVocabs[r][o]}\n`}))})))})),r.push(n)}return r}transformVocabularyDecoratorsV2(e,t,r){if(Object.keys(e).length>0){let n="";n+=`locale: ${this.locale}\n`,n+=`namespace: ${t}\n`,e.namespace&&Object.keys(e.namespace).length>0&&(e.namespace.term&&(n+=`term: ${e.namespace.term}\n`),Object.keys(e.namespace).filter((e=>"term"!==e)).forEach((t=>{n+=`${t}: ${e.namespace[t]}\n`}))),e.declarations&&Object.keys(e.declarations).length>0?(n+="declarations:\n",Object.keys(e.declarations).forEach((t=>{e.declarations[t].term&&(n+=` - ${t}: ${e.declarations[t].term}\n`);const r=Object.keys(e.declarations[t]).filter((e=>"term"!==e&&"propertyVocabs"!==e));r.length>0&&(e.declarations[t].term||(n+=` - ${t}: ${t}\n`),r.forEach((r=>{n+=` ${r}: ${e.declarations[t][r]}\n`}))),e.declarations[t].propertyVocabs&&Object.keys(e.declarations[t].propertyVocabs).length>0&&(e.declarations[t].term||0!==r.length||(n+=` - ${t}: ${t}\n`),n+=" properties:\n",Object.keys(e.declarations[t].propertyVocabs).forEach((r=>{n+=` - ${r}: ${e.declarations[t].propertyVocabs[r].term||""}\n`,Object.keys(e.declarations[t].propertyVocabs[r]).filter((e=>"term"!==e)).forEach((o=>{n+=` ${o}: ${e.declarations[t].propertyVocabs[r][o]}\n`}))})))}))):n+="declarations: []\n",r.push(n)}return r}constructTarget(e,t){const r={$class:`org.accordproject.decoratorcommands@${this.dcs_version}.CommandTarget`,namespace:e};return t.declaration&&""!==t.declaration&&(r.declaration=t.declaration),t.property&&""!==t.property&&(r.property=t.property),t.mapElement&&""!==t.mapElement&&(r.mapElement=t.mapElement),r}parseNonVocabularyDecorators(e,t,r,n){const o={$class:"concerto.metamodel@1.0.0.Decorator",name:t.name};if(t.arguments){const e=t.arguments.map((e=>({$class:e.$class,value:e.value})));o.arguments=e}let s={$class:`org.accordproject.decoratorcommands@${r}.Command`,type:"UPSERT",target:n,decorator:o};return e.push(s),e}parseVocabularies(e,t,r){if(e[t.declaration]=e[t.declaration]||{propertyVocabs:{}},""!==t.property)if(e[t.declaration].propertyVocabs[t.property]||(e[t.declaration].propertyVocabs[t.property]={}),"Term"===r.name)e[t.declaration].propertyVocabs[t.property].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];e[t.declaration].propertyVocabs[t.property][n]=r.arguments[0].value}else if(""!==t.mapElement)if(e[t.declaration].propertyVocabs[t.mapElement]||(e[t.declaration].propertyVocabs[t.mapElement]={}),"Term"===r.name)e[t.declaration].propertyVocabs[t.mapElement].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];e[t.declaration].propertyVocabs[t.mapElement][n]=r.arguments[0].value}else if("Term"===r.name)e[t.declaration].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];e[t.declaration][n]=r.arguments[0].value}return e}parseVocabulariesV2(e,t,r){if(""===t.declaration){if(e.namespace=e.namespace||{},"Term"===r.name)e.namespace.term=r.arguments[0].value;else{const t=r.name.split("Term_")[1];if("namespace"===t||"locale"===t||"declarations"===t)throw new Error(`Invalid vocabulary key: ${t}. The key should not be one of the reserved keys: namespace, locale, declarations`);e.namespace[t]=r.arguments[0].value}return e}if(e.declarations=e.declarations||{},e.declarations[t.declaration]=e.declarations[t.declaration]||{propertyVocabs:{}},""!==t.property)if(e.declarations[t.declaration].propertyVocabs[t.property]||(e.declarations[t.declaration].propertyVocabs[t.property]={}),"Term"===r.name)e.declarations[t.declaration].propertyVocabs[t.property].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];if(n===t.property)throw new Error(`Invalid vocabulary key: "${n}". The key should not be the name of the current property.`);e.declarations[t.declaration].propertyVocabs[t.property][n]=r.arguments[0].value}else if(""!==t.mapElement)if(e.declarations[t.declaration].propertyVocabs[t.mapElement]||(e.declarations[t.declaration].propertyVocabs[t.mapElement]={}),"Term"===r.name)e.declarations[t.declaration].propertyVocabs[t.mapElement].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];if(n===t.mapElement)throw new Error(`Invalid vocabulary key: "${n}". The key should not be the name of the current property.`);e.declarations[t.declaration].propertyVocabs[t.mapElement][n]=r.arguments[0].value}else if("Term"===r.name)e.declarations[t.declaration].term=r.arguments[0].value;else{const n=r.name.split("Term_")[1];if("properties"===n||n===t.declaration)throw new Error(`Invalid vocabulary key: "${n}". The key cannot be a reserved word such as "properties" or the name of the current declaration.`);e.declarations[t.declaration][n]=r.arguments[0].value}return e}transformDecoratorsAndVocabularies(){let e=[],t=[];return Object.keys(this.extractionDictionary).forEach((r=>{const n=this.extractionDictionary[r];let o=[],s={};n.forEach((e=>{const t=JSON.parse(e.dcs),n=this.constructTarget(r,e);t.forEach((t=>{const r=this.isVocabDecorator(t.name);r||this.action===a.Action.EXTRACT_VOCAB||(o=this.parseNonVocabularyDecorators(o,t,this.dcs_version,n)),r&&this.action!==a.Action.EXTRACT_NON_VOCAB&&(s=this.enableDcsNamespaceTarget?this.parseVocabulariesV2(s,e,t):this.parseVocabularies(s,e,t))}))})),this.action!==a.Action.EXTRACT_VOCAB&&(e=this.transformNonVocabularyDecorators(o,r,e)),this.action!==a.Action.EXTRACT_NON_VOCAB&&(t=this.enableDcsNamespaceTarget?this.transformVocabularyDecoratorsV2(s,r,t):this.transformVocabularyDecorators(s,r,t))})),{decoratorCommandSet:e,vocabularies:t}}filterOutDecorators(e){return this.removeDecoratorsFromModel?this.action===a.Action.EXTRACT_ALL?void 0:this.action===a.Action.EXTRACT_VOCAB?e.filter((e=>!this.isVocabDecorator(e.name))):e.filter((e=>this.isVocabDecorator(e.name))):e}processMapDeclaration(e,t){if(e.key&&e.key.decorators){const r={declaration:e.name,mapElement:"KEY"};this.constructDCSDictionary(t,e.key.decorators,r),e.key.decorators=this.filterOutDecorators(e.key.decorators)}if(e.value&&e.value.decorators){const r={declaration:e.name,mapElement:"VALUE"};this.constructDCSDictionary(t,e.value.decorators,r),e.value.decorators=this.filterOutDecorators(e.value.decorators)}return e}processProperties(e,t,r){return e.map((e=>{if(e.decorators){const n={declaration:t,property:e.name};this.constructDCSDictionary(r,e.decorators,n),e.decorators=this.filterOutDecorators(e.decorators)}return e}))}processDeclarations(e,t){return e.map((e=>{if(e.decorators){const r={declaration:e.name};this.constructDCSDictionary(t,e.decorators,r),e.decorators=this.filterOutDecorators(e.decorators)}if(e.$class===`${s}.MapDeclaration`&&(e=this.processMapDeclaration(e,t)),e.properties){const r=this.processProperties(e.properties,e.name,t);e.properties=r}return e}))}processModels(){const e=this.sourceModelAst.models.map((e=>{e?.decorators?.length>0&&(this.constructDCSDictionary(e.namespace,e.decorators,{}),e.decorators=this.filterOutDecorators(e.decorators));const t=this.processDeclarations(e.declarations,e.namespace);return e.declarations=t,e}));this.updatedModelAst={...this.updatedModelAst,models:e}}extract(){this.processModels();const e=new n;e.fromAst(this.updatedModelAst);const t=this.transformDecoratorsAndVocabularies();return{updatedModelManager:e,decoratorCommandSet:t.decoratorCommandSet,vocabularies:t.vocabularies}}}e.exports=a},6033:(e,t,r)=>{"use strict";const n=r(9481),o=r(3673),s=r(1595),a=r(1768),{MetaModelNamespace:i}=r(3348),c=r(2722),l=r(8298),{Warning:u,ErrorCodes:p}=r(8487),d=r(1861),f=r(4971)({circles:!0,proto:!1}),{jsonToYaml:h,yamlToJson:m}=r(2307);void 0===r.g&&r(6226);const g="0.4.0",y="concerto version \"^3.0.0\"\nnamespace org.accordproject.decoratorcommands@0.4.0\n\nimport concerto.metamodel@1.0.0.Decorator\n\n/**\n * A reference to an existing named & versioned DecoratorCommandSet\n */\nconcept DecoratorCommandSetReference {\n o String name\n o String version\n}\n\n/**\n * Whether to upsert or append the decorator\n */\nenum CommandType {\n o UPSERT\n o APPEND\n}\n\n/**\n * Which models elements to add the decorator to. Any null\n * elements are 'wildcards'.\n */\nconcept CommandTarget {\n o String namespace optional\n o String declaration optional\n o String property optional\n o String[] properties optional // property and properties are mutually exclusive\n o String type optional\n o MapElement mapElement optional\n}\n\n/**\n * Map Declaration elements which might be used as a target\n */\nenum MapElement {\n o KEY\n o VALUE\n o KEY_VALUE\n}\n\n/**\n * Applies a decorator to a given target\n */\nconcept Command {\n o CommandTarget target\n o Decorator decorator\n o CommandType type\n o String decoratorNamespace optional\n}\n\n/**\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\n */\nconcept DecoratorCommandSet {\n o String name\n o String version\n o DecoratorCommandSetReference[] includes optional // not yet supported\n o Command[] commands\n}\n";class v{constructor(e,t){this.command=e,this.index=t}getCommand(){return this.command}getIndex(){return this.index}}class b{static validate(e,t){const r=new n({strict:!0,metamodelValidation:!0,addMetamodel:!0});t&&r.addModelFiles(t),r.addCTOModel(y,"decoratorcommands@0.3.0.cto");const a=new s(r);return new o(a,r).fromJSON(e),r}static migrateTo(e,t){if(e instanceof Object)for(let r in e){if("$class"===r&&e[r].includes("org.accordproject.decoratorcommands")){const t=a.getNamespace(e.$class);e[r]=e[r].replace(a.parseNamespace(t).version,g)}(e[r]instanceof Object||e[r]instanceof Array)&&this.migrateTo(e[r],t)}return e}static canMigrate(e,t){const r=a.parseNamespace(a.getNamespace(e.$class)).version;return c.major(r)===c.major(t)&&c.minor(r)<c.minor(t)}static addDcsWithIndexToMap(e,t,r){const n=e.get(t);n?n.push(r):e.set(t,[r])}static getDecoratorMaps(e){const t=new Map,r=new Map,n=new Map,o=new Map,s=new Map;return e.commands.map(((e,a)=>{const i=new v(e,a);switch(!0){case!!e?.target?.type:this.addDcsWithIndexToMap(s,e.target.type,i);break;case!!e?.target?.property:this.addDcsWithIndexToMap(n,e.target.property,i);break;case!!e?.target?.properties:e.target.properties.forEach((e=>{this.addDcsWithIndexToMap(n,e,i)}));break;case!!e?.target?.mapElement:this.addDcsWithIndexToMap(o,e.target.mapElement,i);break;case!!e?.target?.declaration:this.addDcsWithIndexToMap(r,e.target.declaration,i);break;case!!e?.target?.namespace:this.addDcsWithIndexToMap(t,e.target.namespace,i)}})),{namespaceCommandsMap:t,declarationCommandsMap:r,propertyCommandsMap:n,mapElementCommandsMap:o,typeCommandsMap:s}}static migrateAndValidate(e,t,r,a,i){if(r&&this.canMigrate(t,g)&&(t=this.migrateTo(t,g)),a){const r=new n({strict:!0,metamodelValidation:!0,addMetamodel:!0,enableMapType:!!e?.enableMapType,importAliasing:e.isAliasedTypeEnabled()});r.addModelFiles(e.getModelFiles()),r.addCTOModel(y,"decoratorcommands@0.4.0.cto");const a=new s(r);new o(a,r).fromJSON(t),i&&t.commands.forEach((e=>{b.validateCommand(r,e)}))}}static pushMapValues(e,t,r){for(const n of t.get(r)||[])e.push(n)}static decorateModels(e,t,r){if(r?.skipValidationAndResolution){if(!1===r?.disableMetamodelResolution||0==!r?.disableMetamodelValidation)throw new Error("skipValidationAndResolution cannot be used with disableMetamodelResolution or disableMetamodelValidation options as false");r.disableMetamodelResolution=!0,r.disableMetamodelValidation=!0}this.migrateAndValidate(e,t,r?.migrate,r?.validate,r?.validateCommands);const o=t.commands.flatMap((e=>[{$class:`${i}.ImportType`,name:e.decorator.name,namespace:e.decorator.namespace?e.decorator.namespace:r?.defaultNamespace}].concat(e.decorator.arguments?e.decorator.arguments?.filter((e=>e.type)).map((e=>({$class:`${i}.ImportType`,name:e.type.name,namespace:e.type.namespace?e.type.namespace:r?.defaultNamespace}))):[]))).filter((e=>e.namespace)),{namespaceCommandsMap:s,declarationCommandsMap:c,propertyCommandsMap:l,mapElementCommandsMap:u,typeCommandsMap:p}=this.getDecoratorMaps(t),d=r?.disableMetamodelResolution?e.getAst(!1,!0):e.getAst(!0,!0),h=f(d);h.models.forEach((e=>{const t=o.filter((t=>t.namespace!==e.namespace));e.imports=e.imports?e.imports.concat(t):t;const n=a.parseNamespace(e.namespace).name;e.declarations.forEach((t=>{const o=[],{name:a,$class:d}=t;if(this.pushMapValues(o,c,a),this.pushMapValues(o,s,e.namespace),this.pushMapValues(o,s,n),this.pushMapValues(o,p,d),o.sort(((e,t)=>e.getIndex()-t.getIndex())).forEach((n=>{this.executeCommand(e.namespace,t,n.getCommand(),null,r),this.isNamespaceTargetEnabled(r?.enableDcsNamespaceTarget)&&this.executeNamespaceCommand(e,n.getCommand())})),d===`${i}.MapDeclaration`){const r=[];this.pushMapValues(r,p,t.key.$class),this.pushMapValues(r,p,t.value.$class),this.pushMapValues(r,u,"KEY"),this.pushMapValues(r,u,"VALUE"),this.pushMapValues(r,u,"KEY_VALUE"),r.sort(((e,t)=>e.getIndex()-t.getIndex())).forEach((r=>{this.executeCommand(e.namespace,t,r.getCommand())}))}t.properties&&t.properties.forEach((r=>{const n=[],{name:o,$class:s}=r;this.pushMapValues(n,l,o),this.pushMapValues(n,p,s),n.sort(((e,t)=>e.getIndex()-t.getIndex())).forEach((n=>{this.executeCommand(e.namespace,t,n.getCommand(),r)}))}))}))}));const m=!!e?.enableMapType,g=new n({strict:e.isStrict(),enableMapType:m,importAliasing:e.isAliasedTypeEnabled(),decoratorValidation:e.getDecoratorValidation()});return g.fromAst(h,{disableValidation:r?.disableMetamodelValidation}),g}static extractDecorators(e,t){t={removeDecoratorsFromModel:!1,locale:"en",enableDcsNamespaceTarget:!1,...t};const r=e.getAst(!0,!0),n=new l(t.removeDecoratorsFromModel,t.locale,g,r,l.Action.EXTRACT_ALL,{enableDcsNamespaceTarget:this.isNamespaceTargetEnabled(t.enableDcsNamespaceTarget)}).extract();return{modelManager:n.updatedModelManager,decoratorCommandSet:n.decoratorCommandSet,vocabularies:n.vocabularies}}static extractVocabularies(e,t){t={removeDecoratorsFromModel:!1,locale:"en",enableDcsNamespaceTarget:!1,...t};const r=e.getAst(!0,!0),n=new l(t.removeDecoratorsFromModel,t.locale,g,r,l.Action.EXTRACT_VOCAB,{enableDcsNamespaceTarget:this.isNamespaceTargetEnabled(t.enableDcsNamespaceTarget)}).extract();return{modelManager:n.updatedModelManager,vocabularies:n.vocabularies}}static extractNonVocabDecorators(e,t){t={removeDecoratorsFromModel:!1,locale:"en",enableDcsNamespaceTarget:!1,...t};const r=e.getAst(!0),n=new l(t.removeDecoratorsFromModel,t.locale,g,r,l.Action.EXTRACT_NON_VOCAB,{enableDcsNamespaceTarget:this.isNamespaceTargetEnabled(t.enableDcsNamespaceTarget)}).extract();return{modelManager:n.updatedModelManager,decoratorCommandSet:n.decoratorCommandSet}}static validateCommand(e,t){t.target.type&&e.resolveType("DecoratorCommand.type",t.target.type);let r=null;if(t.target.namespace&&(r=e.getModelFile(t.target.namespace),!r)){const{name:n,version:o}=a.parseNamespace(t.target.namespace);o||(r=e.getModelFiles().find((e=>function(e,t){const{name:r}=a.parseNamespace(e.getNamespace());return r===t}(e,n))))}if(t.target.namespace&&!r)throw new Error(`Decorator Command references namespace "${t.target.namespace}" which does not exist: ${JSON.stringify(t,null,2)}`);if(t.target.namespace&&t.target.declaration&&e.resolveType("DecoratorCommand.target.declaration",`${r.getNamespace()}.${t.target.declaration}`),t.target.properties&&t.target.property)throw new Error("Decorator Command references both property and properties. You must either reference a single property or a list of properites.");if(t.target.namespace&&t.target.declaration&&t.target.property&&!e.getType(`${r.getNamespace()}.${t.target.declaration}`).getProperty(t.target.property))throw new Error(`Decorator Command references property "${t.target.namespace}.${t.target.declaration}.${t.target.property}" which does not exist.`);if(t.target.namespace&&t.target.declaration&&t.target.properties){const n=e.getType(`${r.getNamespace()}.${t.target.declaration}`);t.target.properties.forEach((e=>{if(!n.getProperty(e))throw new Error(`Decorator Command references property "${t.target.namespace}.${t.target.declaration}.${e}" which does not exist.`)}))}}static applyDecoratorForMapElement(e,t,r,n,o){const s="KEY"===e?r.key:r.value;t.type?this.falsyOrEqual(t.type,s.$class)&&this.applyDecorator(s,n,o):this.applyDecorator(s,n,o)}static falsyOrEqual(e,t){return Array.isArray(e)?function(e,t){const r=new Set(e),n=new Set(t),o=new Set([...r].filter((e=>n.has(e))));return Array.from(o)}(e,t).length>0:!e||t.includes(e)}static applyDecorator(e,t,r){if("UPSERT"===t){let t=!1;if(e.decorators)for(let n=0;n<e.decorators.length;n++)e.decorators[n].name===r.name&&(e.decorators[n]=r,t=!0);t||(e.decorators?e.decorators.push(r):e.decorators=[r])}else{if("APPEND"!==t)throw new Error(`Unknown command type ${t}`);e.decorators?e.decorators.push(r):e.decorators=[r],this.checkForDuplicateDecorators(e)}}static checkForDuplicateDecorators(e){const t=new Set;e.decorators.forEach((r=>{const n=r.name;if(t.has(n))throw new d(`Duplicate decorator ${n}`,e.location);t.add(n)}))}static executeNamespaceCommand(e,t){const{target:r,decorator:n,type:o}=t;if(2===Object.keys(r).length&&r.namespace){const{name:t}=a.parseNamespace(e.namespace);this.falsyOrEqual(r.namespace,[e.namespace,t])&&this.applyDecorator(e,o,n)}}static executeCommand(e,t,r,n,o){const{target:s,decorator:c,type:l}=r,{name:u}=a.parseNamespace(e,{disableVersionParsing:!0});if(this.falsyOrEqual(s.namespace,[e,u])&&this.falsyOrEqual(s.declaration,[t.name]))if(t.$class===`${i}.MapDeclaration`)if(s.mapElement)switch(s.mapElement){case"KEY":case"VALUE":this.applyDecoratorForMapElement(s.mapElement,s,t,l,c);break;case"KEY_VALUE":this.applyDecoratorForMapElement("KEY",s,t,l,c),this.applyDecoratorForMapElement("VALUE",s,t,l,c)}else s.type?(this.falsyOrEqual(s.type,t.key.$class)&&this.applyDecorator(t.key,l,c),this.falsyOrEqual(s.type,t.value.$class)&&this.applyDecorator(t.value,l,c)):this.checkForNamespaceTargetAndApplyDecorator(t,l,c,s,o?.enableDcsNamespaceTarget);else s.property||s.properties||s.type?n&&this.executePropertyCommand(n,r):this.checkForNamespaceTargetAndApplyDecorator(t,l,c,s,o?.enableDcsNamespaceTarget)}static executePropertyCommand(e,t){const{target:r,decorator:n,type:o}=t;(r.properties||r.property||r.type)&&this.falsyOrEqual(r.property?r.property:r.properties,[e.name])&&this.falsyOrEqual(r.type,[e.$class])&&this.applyDecorator(e,o,n)}static checkForNamespaceTargetAndApplyDecorator(e,t,r,n,o){this.isNamespaceTargetEnabled(o)?n.declaration&&this.applyDecorator(e,t,r):this.applyDecorator(e,t,r)}static isNamespaceTargetEnabled(e){return!(!e&&"true"!=={NODE_ENV:"production"}.ENABLE_DCS_NAMESPACE_TARGET&&(u.printDeprecationWarning("Functionality for namespace targeted Decorator Command Sets has changed. Using namespace targets to apply decorators on all declarations in a namespace will be deprecated soon.",p.DEPRECATION_WARNING,p.CONCERTO_DEPRECATION_001,"Please refer to https://concerto.accordproject.org/deprecation/001"),1))}static jsonToYaml(e){return this.validate(e),h(e)}static yamlToJson(e){const t=m(e);return this.validate(t),t}}e.exports=b},1051:(e,t,r)=>{"use strict";const n=r(480);e.exports={getDecoratorModel:function(){return{decoratorModelFile:"concerto_decorator_1.0.0.cto",decoratorModelCto:"namespace concerto.decorator@1.0.0\n abstract concept Decorator {}\n concept DotNetNamespace extends Decorator {\n o String namespace\n }",decoratorModelAst:JSON.parse(JSON.stringify(n))}}}},1595:(e,t,r)=>{"use strict";const{TypedStack:n}=r(8487),o=r(7833)("concerto:Factory"),s=r(2438),a=r(1768),i=r(6422),c=r(7854),l=r(2552),u=r(6113),p=r(7755),d=r(289),f=r(182),h=r(3464),m=r(7657);h.extend(m),void 0===r.g&&r(9481);class g{static newId(){return f.v4()}constructor(e){this.modelManager=e}newResource(e,t,r,n){n=n||{};const i=a.getFullyQualifiedName(e,t),c=this.modelManager.getType(i);if(c.isAbstract()){let r=s.messageFormatter("factory-newinstance-abstracttype");throw new Error(r({namespace:e,type:t}))}let u=c.getIdentifierFieldName();if(c.isSystemIdentified()&&(r=null==r?g.newId():r),u){if("string"!=typeof r){let r=s.messageFormatter("factory-newinstance-invalididentifier");throw new Error(r({namespace:e,type:t}))}if(0===r.trim().length){let r=s.messageFormatter("factory-newinstance-missingidentifier");throw new Error(r({namespace:e,type:t}))}if(r){let e=c.getProperty(u);if(e?.isTypeScalar?.()&&(e=e.getScalarField()),e?.validator?.regex&&!1===e.validator?.regex.test(r))throw new Error("Provided id does not match regex: "+e?.validator?.regex)}}else if(r)throw new Error("Type is not identifiable "+c.getFullyQualifiedName());let f=null,m=null;return(c.isTransaction()||c.isEvent())&&(m=h.utc()),f=n.disableValidation?new p(this.modelManager,c,e,t,r,m):new d(this.modelManager,c,e,t,r,m,new l),f.assignFieldDefaults(),this.initializeNewObject(f,c,n),u&&(f[u]=r),o("newResource","Factory.newResource created ",r||"valid"),f}newConcept(e,t,r,n){return this.newResource(e,t,r,n)}newRelationship(e,t,r){const n=a.getFullyQualifiedName(e,t),o=this.modelManager.getType(n);if(!o.isIdentified())throw new Error(`Cannot create a relationship to ${n}, it is not identifiable.`);return new u(this.modelManager,o,e,t,r)}newTransaction(e,t,r,n){if(!e)throw new Error("ns not specified");if(!t)throw new Error("type not specified");let o=this.newResource(e,t,r,n);if(!o.getClassDeclaration().isTransaction())throw new Error(o.getClassDeclaration().getFullyQualifiedName()+" is not a transaction");return o}newEvent(e,t,r,n){if(!e)throw new Error("ns not specified");if(!t)throw new Error("type not specified");let o=this.newResource(e,t,r,n);if(!o.getClassDeclaration().isEvent())throw new Error(o.getClassDeclaration().getFullyQualifiedName()+" is not an event");return o}initializeNewObject(e,t,r){const o=this.parseGenerateOptions(r);if(o){o.stack=new n(e),o.seen=[e.getFullyQualifiedType()];const r=new i;t.accept(r,o)}}parseGenerateOptions(e){if(!e.generate)return null;const t={};return t.modelManager=this.modelManager,t.factory=this,/^empty$/i.test(e.generate)?t.valueGenerator=c.empty():t.valueGenerator=c.sample(),t.includeOptionalFields=!!e.includeOptionalFields,t}}e.exports=g},2438:(e,t,r)=>{"use strict";const n=r(8168);function o(e){return function(t){let r=n.en[e];for(let e in t)r=r.replace(new RegExp(`\\{${e}\\}`,"g"),t[e]);return r}}function s(e){return n.en[e]}function a(e){return{messageFormatter:o,formatMessage:s}}a.messageFormatter=o,a.formatMessage=s,e.exports=a},953:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"AssetDeclaration"}}},9869:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(5437),s=r(8171),a=r(1529),i=r(2438),c=r(1861),l=r(4471),u=r(6099),p=r(1768);void 0===r.g&&r(9852),e.exports=class extends o{process(){if(super.process(),this.properties=[],this.superType=null,this.superTypeDeclaration=null,this.idField=null,this.timestamped=!1,this.abstract=!1,this.type=this.ast.$class,this.ast.isAbstract&&(this.abstract=!0),this.ast.superType?this.superType=this.ast.superType.name:this.modelFile.isSystemModelFile()&&"Concept"===this.name||(this.superType="Concept"),this.ast.identified&&(this.ast.identified.$class===`${n}.IdentifiedBy`?this.idField=this.ast.identified.name:(this.idField="$identifier",this.addIdentifierField())),!Array.isArray(this.ast.properties)){let e=i.messageFormatter("classdeclaration-validate-undefined-properties");throw new c(e({class:this.name}),this.modelFile,this.ast.location)}for(let e=0;e<this.ast.properties.length;e++){let t=this.ast.properties[e];if(p.isSystemProperty(t.name))throw new c(`Invalid field name '${t.name}'`,this.modelFile,this.ast.location);if(t.$class===`${n}.RelationshipProperty`)this.properties.push(new u(this,t));else if(t.$class===`${n}.EnumProperty`)this.properties.push(new s(this,t));else{if(t.$class!==`${n}.BooleanProperty`&&t.$class!==`${n}.StringProperty`&&t.$class!==`${n}.IntegerProperty`&&t.$class!==`${n}.LongProperty`&&t.$class!==`${n}.DoubleProperty`&&t.$class!==`${n}.DateTimeProperty`&&t.$class!==`${n}.ObjectProperty`){let e=i.messageFormatter("classdeclaration-process-unrecmodelelem");throw new c(e({type:t.$class}),this.modelFile,this.ast.location)}this.properties.push(new a(this,t))}}"concerto@1.0.0.Transaction"!==this.fqn&&"concerto@1.0.0.Event"!==this.fqn||this.addTimestampField()}addTimestampField(){const e={};e.$class=`${n}.DateTimeProperty`,e.name="$timestamp",this.properties.push(new a(this,e))}addIdentifierField(){const e={};e.$class=`${n}.StringProperty`,e.name="$identifier",this.properties.push(new a(this,e))}_resolveSuperType(){if(!this.superType)return null;this.superTypeDeclaration=null;let e=null;if(this.getModelFile().isImportedType(this.superType)){let t=this.getModelFile().resolveImport(this.superType);e=this.modelFile.getModelManager().getType(t)}else e=this.getModelFile().getType(this.superType);if(!e)throw new c("Could not find super type "+this.superType,this.modelFile,this.ast.location);if("ConceptDeclaration"!==e.declarationKind()&&this.declarationKind()!==e.declarationKind())throw new c(`${this.declarationKind()} (${this.getName()}) cannot extend ${e.declarationKind()} (${e.getName()})`,this.modelFile,this.ast.location);return this.superTypeDeclaration=e,e}validate(){if(super.validate(),null!==this.superType){if(this.superType===this.name&&!["Asset","Concept","Event","Participant","Transaction"].includes(this.superType)){let e=i("en").messageFormatter("classdeclaration-validate-selfextending");throw new c(e({class:this.name}),this.modelFile,this.ast.location)}this._resolveSuperType()}if(this.idField){const e=this.getProperty(this.idField);if(!e){let e=i("en").messageFormatter("classdeclaration-validate-identifiernotproperty");throw new c(e({class:this.name,idField:this.idField}),this.modelFile,this.ast.location)}{const t="String"===e.getType(),r=e.getParent().getModelFile().getType(e.getType()),n=null!==r&&r.isScalarDeclaration?.()&&"String"===r.getType?.();if(!t&&!n){let e=i("en").messageFormatter("classdeclaration-validate-identifiernotstring");throw new c(e({class:this.name,idField:this.idField}),this.modelFile,this.ast.location)}if(e.isOptional())throw new c("Identifying fields cannot be optional.",this.modelFile,this.ast.location);if(this.superType){const e=this.getModelFile().getType(this.superType);if(e&&e.isIdentified())if(this.isSystemIdentified()){if(!e.isSystemIdentified())throw new c(`Super class ${e.getFullyQualifiedName()} has an explicit identifier ${e.getIdentifierFieldName()} that cannot be redeclared.`,this.modelFile,this.ast.location)}else if(e.isExplicitlyIdentified())throw new c(`Super class ${e.getFullyQualifiedName()} has an explicit identifier ${e.getIdentifierFieldName()} that cannot be redeclared.`,this.modelFile,this.ast.location)}}}const e=this.getProperties(),t=new Set;e.forEach((e=>{const r=e.getName();if(t.has(r)){const e=i("en").messageFormatter("classdeclaration-validate-duplicatefieldname");throw new c(e({class:this.name,fieldName:r}),this.modelFile,this.ast.location)}t.add(r)}));for(let t=0;t<e.length;t++){let r=e[t];if(r.isPrimitive()||this.isEnum()||r.getNamespace()===this.getNamespace())r.validate(this);else{const e=r.getFullyQualifiedTypeName(),t=this.modelFile.getModelManager().getType(e);r.validate(t)}}}isAbstract(){return this.abstract}isIdentified(){return!!this.getIdentifierFieldName()}isSystemIdentified(){return"$identifier"===this.getIdentifierFieldName()}isExplicitlyIdentified(){return!!this.idField&&"$identifier"!==this.idField}getIdentifierFieldName(){if(this.idField)return this.idField;if(this.getSuperType()){let e=this.getModelFile().getLocalType(this.getSuperType());return e||(e=this.modelFile.getModelManager().getType(this.getSuperType())),e.getIdentifierFieldName()}return null}getOwnProperty(e){for(let t=0;t<this.properties.length;t++){const r=this.properties[t];if(r.getName()===e)return r}return null}getOwnProperties(){return this.properties}getSuperType(){const e=this.getSuperTypeDeclaration();return e?e.getFullyQualifiedName():null}getSuperTypeDeclaration(){return this.superType?this.superTypeDeclaration?this.superTypeDeclaration:this._resolveSuperType():null}getAssignableClassDeclarations(){const e=new Set,t=this.getModelFile().getModelManager(),r=new l(t).getClassDeclarations(),n=new Map;r.forEach((e=>{const t=e.getSuperType();if(t){const r=n.get(t)||new Set;r.add(e),n.set(t,r)}}));const o=t=>{t.forEach((t=>{e.add(t);const r=t.getFullyQualifiedName(),s=n.get(r);s&&o(s)}))};return o([this]),Array.from(e)}getDirectSubclasses(){const e=this.getModelFile().getModelManager(),t=new l(e).getClassDeclarations(),r=new Map;t.forEach((e=>{const t=e.getSuperType();if(t){const n=r.get(t)||new Set;n.add(e),r.set(t,n)}}));const n=this.getFullyQualifiedName(),o=r.get(n);return o?Array.from(o):[]}getAllSuperTypeDeclarations(){const e=[];for(let t=this;t=t.getSuperTypeDeclaration();)e.push(t);return e}getProperty(e){let t=this.getOwnProperty(e),r=null;if(null===t&&null!==this.superType){if(this.getModelFile().isImportedType(this.superType)){let e=this.getModelFile().resolveImport(this.superType);r=this.modelFile.getModelManager().getType(e)}else r=this.getModelFile().getType(this.superType);t=r.getProperty(e)}return t}getProperties(){let e=this.getOwnProperties(),t=null;if(null!==this.superType){if(this.getModelFile().isImportedType(this.superType)){let e=this.getModelFile().resolveImport(this.superType);t=this.modelFile.getModelManager().getType(e)}else t=this.getModelFile().getType(this.superType);if(!t)throw new c("Could not find super type "+this.superType,this.modelFile,this.ast.location);e=e.concat(t.getProperties())}return e}getNestedProperty(e){const t=e.split(".");let r=this,n=null;for(let o=0;o<t.length;o++){if(n=r.getProperty(t[o]),null===n)throw new c("Property "+t[o]+" does not exist on "+r.getFullyQualifiedName(),this.modelFile,this.ast.location);if(o<t.length-1){if(n.isPrimitive()||n.isTypeEnum())throw new Error("Property "+t[o]+" is a primitive or enum. Invalid property path: "+e);r=r.getModelFile().getModelManager().getType(n.getFullyQualifiedTypeName())}}return n}toString(){let e="";return this.superType&&(e=" super="+this.superType),"ClassDeclaration {id="+this.getFullyQualifiedName()+e+" enum="+this.isEnum()+" abstract="+this.isAbstract()+"}"}isAsset(){return this.type===`${n}.AssetDeclaration`}isParticipant(){return this.type===`${n}.ParticipantDeclaration`}isTransaction(){return this.type===`${n}.TransactionDeclaration`}isEvent(){return this.type===`${n}.EventDeclaration`}isConcept(){return this.type===`${n}.ConceptDeclaration`}isEnum(){return this.type===`${n}.EnumDeclaration`}isMapDeclaration(){return this.type===`${n}.MapDeclaration`}isClassDeclaration(){return!0}}},6341:(e,t,r)=>{"use strict";const n=r(9869);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"ConceptDeclaration"}}},5437:(e,t,r)=>{"use strict";const n=r(7688),o=r(1768),s=r(1861);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(t),this.modelFile=e,this.process()}process(){if(super.process(),!o.isValidIdentifier(this.ast.name))throw new s(`Invalid class name '${this.ast.name}'`,this.modelFile,this.ast.location);this.name=this.ast.name,this.fqn=o.getFullyQualifiedName(this.modelFile.getNamespace(),this.name)}getModelFile(){return this.modelFile}getName(){return this.name}getNamespace(){return this.modelFile.getNamespace()}getFullyQualifiedName(){return this.fqn}isIdentified(){return!1}isSystemIdentified(){return!1}getIdentifierFieldName(){return null}getType(){return null}toString(){return null}isEnum(){return!1}isClassDeclaration(){return!1}isScalarDeclaration(){return!1}isMapDeclaration(){return!1}}},7688:(e,t,r)=>{"use strict";const n=r(4404),o=r(1861);void 0===r.g&&r(6226),e.exports=class{constructor(e){if(!e)throw new Error("ast not specified");this.ast=e}getModelFile(){throw new Error("not implemented")}accept(e,t){return e.visit(this,t)}process(){if(this.decorators=[],this.ast.decorators)for(let e=0;e<this.ast.decorators.length;e++){let t,r=this.ast.decorators[e],o=this.getModelFile().getModelManager().getDecoratorFactories();for(let e of o)if(t=e.newDecorator(this,r),t)break;t||(t=new n(this,r)),this.decorators.push(t)}}validate(){if(this.decorators&&this.decorators.length>0){for(let e=0;e<this.decorators.length;e++)this.decorators[e].validate();const e=new Set;this.decorators.forEach((t=>{const r=t.getName();if(e.has(r)){const e=this.getModelFile();throw new o(`Duplicate decorator ${r}`,e,this.ast.location)}e.add(r)}))}}getDecorators(){return this.decorators}getDecorator(e){for(let t=0;t<this.decorators.length;t++){let r=this.decorators[t];if(r.getName()===e)return r}return null}}},4404:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),{Logger:o}=r(8487),s=r(1768),a=r(1861);void 0===r.g&&(r(9869),r(9852)),e.exports=class{constructor(e,t){this.ast=t,this.parent=e,this.arguments=null,this.process()}handleError(e,t){if(o.dispatch(e,t),"error"===e)throw new a(t,this.getParent().getModelFile(),this.ast.location)}accept(e,t){return e.visit(this,t)}getParent(){return this.parent}process(){if(this.name=this.ast.name,this.arguments=[],this.ast.arguments)for(let e=0;e<this.ast.arguments.length;e++){let t=this.ast.arguments[e];t&&(t.$class===`${n}.DecoratorTypeReference`?this.arguments.push({type:"Identifier",name:t.type.name,array:t.isArray}):this.arguments.push(t.value))}}validate(){const e=this.getParent().getModelFile(),t=this.getParent().getFullyQualifiedName?.(),r=e.getModelManager().getDecoratorValidation();if(r.missingDecorator||r.invalidDecorator)try{e.resolveType(t,this.getName(),this.ast.location);const n=e.getType(this.getName()),o=n.getProperties().filter((e=>!e.isOptional())),a=n.getProperties().filter((e=>e.isOptional())),i=[...o,...a];if(this.getArguments().length<o.length){const e=`Decorator ${this.getName()} has too few arguments. Required properties are: [${o.map((e=>e.getName())).join()}]`;this.handleError(r.invalidDecorator,e)}const c=this.getArguments();for(let t=0;t<c.length;t++){const n=c[t];if(t>i.length-1){const e=`Decorator ${this.getName()} has too many arguments. Properties are: [${i.map((e=>e.getName())).join()}]`;this.handleError(r.invalidDecorator,e)}else{const o=i[t],a=typeof n;switch(o.getType()){case"Integer":case"Double":case"Long":if("number"!==a){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected number. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}break;case"String":if("string"!==a){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected string. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}break;case"Boolean":if("boolean"!==a){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected boolean. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}break;default:{if("object"!==a||"Identifier"!==n?.type){const e=`Decorator ${this.getName()} has invalid decorator argument. Expected object. Found ${a}, with value ${JSON.stringify(n)}`;this.handleError(r.invalidDecorator,e)}const t=e.getType(n.name);if(t){if(!s.isAssignableTo(t.getModelFile(),t.getFullyQualifiedName(),o)){const e=`Decorator ${this.getName()} references a type ${n.name} which cannot be assigned to the declared type ${o.getFullyQualifiedTypeName()}`;this.handleError(r.invalidDecorator,e)}}else{const e=`Decorator ${this.getName()} references a type ${n.name} which has not been defined/imported.`;this.handleError(r.invalidDecorator,e)}break}}}}}catch(e){this.handleError(r.missingDecorator,e)}}getName(){return this.name}getArguments(){return this.arguments}isDecorator(){return!0}}},8088:(e,t,r)=>{"use strict";void 0===r.g&&(r(9869),r(4404),r(9852)),e.exports=class{newDecorator(e,t){throw new Error("abstract function called")}}},2302:(e,t,r)=>{"use strict";const n=r(9869);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}toString(){return"EnumDeclaration {id="+this.getFullyQualifiedName()+"}"}declarationKind(){return"EnumDeclaration"}}},8171:(e,t,r)=>{"use strict";const n=r(9852);void 0===r.g&&r(9869),e.exports=class extends n{constructor(e,t){super(e,t)}validate(e){super.validate(e)}isEnumValue(){return!0}}},7337:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}process(){super.process()}declarationKind(){return"EventDeclaration"}}},1529:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(9852),s=r(1976),a=r(516),i=r(8487).NullUtil;void 0===r.g&&(r(9869),r(6375));class c extends o{constructor(e,t){super(e,t),this.scalarField=null}process(){switch(super.process(),this.validator=null,this.getType()){case"Integer":case"Double":case"Long":this.ast.validator&&(this.validator=new s(this,this.ast.validator));break;case"String":(this.ast.validator||this.ast.lengthValidator)&&(this.validator=new a(this,this.ast.validator,this.ast.lengthValidator))}i.isNull(this.ast.defaultValue)?this.defaultValue=null:this.defaultValue=this.ast.defaultValue}getValidator(){return this.validator}getDefaultValue(){return this.defaultValue}toString(){return"Field {name="+this.name+", type="+this.getFullyQualifiedTypeName()+", array="+this.array+", optional="+this.optional+"}"}isField(){return!0}isTypeScalar(){if(this.isPrimitive())return!1;{this.getParent().getModelFile().resolveType("property "+this.getFullyQualifiedName(),this.getType());const e=this.getParent().getModelFile().getType(this.getType());return e.isScalarDeclaration?.()}}getScalarField(){if(this.scalarField)return this.scalarField;if(!this.isTypeScalar())throw new Error(`Field ${this.name} is not a scalar property.`);const e=this.getParent().getModelFile().getType(this.getType()),t=JSON.parse(JSON.stringify(e.ast));switch(e.ast.$class){case`${n}.StringScalar`:t.$class=`${n}.StringProperty`;break;case`${n}.BooleanScalar`:t.$class=`${n}.BooleanProperty`;break;case`${n}.DateTimeScalar`:t.$class=`${n}.DateTimeProperty`;break;case`${n}.DoubleScalar`:t.$class=`${n}.DoubleProperty`;break;case`${n}.IntegerScalar`:t.$class=`${n}.IntegerProperty`;break;case`${n}.LongScalar`:t.$class=`${n}.LongProperty`;break;default:throw new Error(`Unrecognized scalar type ${e.ast.$class}`)}return t.name=this.ast.name,this.scalarField=new c(this.getParent(),t),this.scalarField.array=this.isArray(),this.scalarField}}e.exports=c},8058:(e,t,r)=>{"use strict";const n=r(9869);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t),this.process()}}},1861:(e,t,r)=>{"use strict";const{BaseFileException:n}=r(8487);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t,r,n){let o="",s=null;t&&t.getName()&&(s=t.getName(),o="File '"+s+"': "),r&&(o=o+"line "+r.start.line+" column "+r.start.column+", to line "+r.end.line+" column "+r.end.column+". "),o=o.charAt(0).toUpperCase()+o.slice(1),super(e,r,e+" "+o,s,n)}}},4471:(e,t,r)=>{"use strict";void 0===r.g&&(r(9869),r(9481)),e.exports=class{constructor(e){this.modelManager=e}accept(e,t){return e.visit(this,t)}getClassDeclarations(){let e=[];const t=this.modelManager.getModelFiles();for(let r=0;r<t.length;r++){const n=t[r].getAllDeclarations().filter((e=>!e.isMapDeclaration?.()&&!e.isScalarDeclaration?.()));e=e.concat(n)}return e}getClassDeclaration(e){return this.modelManager.getType(e)}getModelManager(){return this.modelManager}}},3135:(e,t,r)=>{"use strict";const n=r(5437),o=r(1861),s=r(7046),a=r(8968),i=r(1768);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){const r=e.getModelManager();if("true"!=={NODE_ENV:"production"}.ENABLE_MAP_TYPE&&!r.enableMapType)throw new Error('MapType feature is not enabled. Please set the environment variable "ENABLE_MAP_TYPE=true", or add {enableMapType: true} to the ModelManger options, to access this functionality.');super(e,t),this.modelFile=e,this.process()}process(){if(super.process(),!this.ast.key||!this.ast.value)throw new o(`MapDeclaration must contain Key & Value properties ${this.ast.name}`,this.modelFile,this.ast.location);if(!i.isValidMapKey(this.ast.key))throw new o(`MapDeclaration must contain valid MapKeyType ${this.ast.name}`,this.modelFile,this.ast.location);if(!i.isValidMapValue(this.ast.value))throw new o(`MapDeclaration must contain valid MapValueType, for MapDeclaration ${this.ast.name}`,this.modelFile,this.ast.location);this.name=this.ast.name,this.key=new a(this,this.ast.key),this.value=new s(this,this.ast.value),this.fqn=i.getFullyQualifiedName(this.modelFile.getNamespace(),this.ast.name)}validate(){super.validate(),this.key.validate(),this.value.validate()}getFullyQualifiedName(){return this.fqn}getModelFile(){return this.modelFile}getName(){return this.name}getKey(){return this.key}getValue(){return this.value}toString(){return"MapDeclaration {id="+this.getFullyQualifiedName()+"}"}declarationKind(){return"MapDeclaration"}isMapDeclaration(){return!0}}},8968:(e,t,r)=>{"use strict";const n=r(1768),{MetaModelNamespace:o}=r(3348),s=r(7688),a=r(1861);void 0===r.g&&(r(6226),r(3135)),e.exports=class extends s{constructor(e,t){super(t),this.parent=e,this.modelFile=e.getModelFile(),this.process()}process(){super.process(),this.processType(this.ast)}validate(){if(!n.isPrimitiveType(this.type)){const e=this.modelFile.getType(this.ast.type.name);if(!n.isValidMapKeyScalar(e))throw new a(`Scalar must be one of StringScalar, DateTimeScalar in context of MapKeyType. Invalid Scalar: ${this.type}, for MapDeclaration ${this.parent.name}`)}}processType(e){switch(e.$class){case`${o}.DateTimeMapKeyType`:this.type="DateTime";break;case`${o}.StringMapKeyType`:this.type="String";break;case`${o}.ObjectMapKeyType`:this.type=String(this.ast.type.name)}}getModelFile(){return this.parent.getModelFile()}getParent(){return this.parent}getType(){return this.type}toString(){return"MapKeyType {id="+this.getType()+"}"}isKey(){return!0}isValue(){return!1}getNamespace(){return this.modelFile.getNamespace()}}},7046:(e,t,r)=>{"use strict";const n=r(7688),{MetaModelNamespace:o}=r(3348),s=r(1861),a=r(1768);void 0===r.g&&(r(6226),r(3135)),e.exports=class extends n{constructor(e,t){super(t),this.parent=e,this.modelFile=e.getModelFile(),this.process()}process(){super.process(),this.processType(this.ast)}validate(){if(!a.isPrimitiveType(this.type)){const e=this.modelFile.getType(this.ast.type.name);if(e.isMapDeclaration?.())throw new s(`MapDeclaration as Map Type Value is not supported: ${this.type}`)}}processType(e){switch(this.ast.$class){case`${o}.ObjectMapValueType`:if(!("type"in e))throw new s(`ObjectMapValueType must contain property 'type', for MapDeclaration named ${this.parent.name}`);if(!("$class"in e.type)||!("name"in e.type))throw new s(`ObjectMapValueType type must contain property '$class' and property 'name', for MapDeclaration named ${this.parent.name}`);if("concerto.metamodel@1.0.0.TypeIdentifier"!==e.type.$class)throw new s(`ObjectMapValueType type $class must be of TypeIdentifier for MapDeclaration named ${this.parent.name}`);this.type=String(this.ast.type.name);break;case`${o}.BooleanMapValueType`:this.type="Boolean";break;case`${o}.DateTimeMapValueType`:this.type="DateTime";break;case`${o}.StringMapValueType`:this.type="String";break;case`${o}.IntegerMapValueType`:this.type="Integer";break;case`${o}.LongMapValueType`:this.type="Long";break;case`${o}.DoubleMapValueType`:this.type="Double"}}getModelFile(){return this.parent.getModelFile()}getParent(){return this.parent}getType(){return this.type}toString(){return"MapValueType {id="+this.getType()+"}"}isKey(){return!1}isValue(){return!0}getNamespace(){return this.modelFile.getNamespace()}}},3899:(e,t,r)=>{"use strict";const{MetaModelUtil:n}=r(3348),o=r(9481),s=r(1595),a=r(3673),i=r(6226);function c(){const e=new o,t=new i(e,n.metaModelAst,n.metaModelCto,"concerto.metamodel",!0);return e.addModelFile(t,n.metaModelCto,"concerto.metamodel"),e}function l(e){const t=c(),r=new s(t);return new a(r,t).fromJSON(e),e}e.exports={newMetaModelManager:c,validateMetaModel:l,modelManagerFromMetaModel:function(e){const t=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:l(e),r=new o;return t.models.forEach((e=>{const t=new i(r,e,null,null,!0);r.addModelFile(t,null,null)})),r.validateModelFiles(),r}}},6226:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(8330),s=r(2722),a=r(953),i=r(2302),c=r(9869),l=r(6341),u=r(7189),p=r(3218),d=r(745),f=r(7337),h=r(1861),m=r(3135),g=r(1768),y=r(2438),v=r(7688),{Warning:b,ErrorCodes:w}=r(8487);void 0===r.g&&(r(9869),r(9481),r(5437));class A extends v{constructor(e,t,r,n){if(super(t),this.modelManager=e,this.external=!1,this.declarations=[],this.localTypes=null,this.imports=[],this.importShortNames=new Map,this.importWildcardNamespaces=[],this.importUriMap={},this.fileName="UNKNOWN",this.concertoVersion=null,this.version=null,!t||"object"!=typeof t)throw new Error("ModelFile expects a Concerto model AST as input.");if(this.ast=t,r&&"string"!=typeof r)throw new Error("ModelFile expects an (optional) Concerto model definition as a string.");if(this.definitions=r,n&&"string"!=typeof n)throw new Error("ModelFile expects an (optional) filename as a string.");this.fileName=n,n&&(this.external=n.startsWith("@")),this.process(),this.fromAst(this.ast),this.isCompatibleVersion(),this.localTypes=new Map;for(let e in this.declarations){let t=this.declarations[e],r=this.getNamespace()+"."+t.getName();this.localTypes.set(r,this.declarations[e])}}getModelFile(){return this}isModelFile(){return!0}getVersion(){return this.version}isSystemModelFile(){return this.namespace.startsWith("concerto@")||"concerto"===this.namespace}isExternal(){return this.external}getImportURI(e){return this.importUriMap[e]||null}getExternalImports(){return this.importUriMap}accept(e,t){return e.visit(this,t)}getModelManager(){return this.modelManager}getImports(){let e=[];return this.imports.forEach((t=>{e=e.concat(g.importFullyQualifiedNames(t))})),e}validate(){super.validate();const e=new Map;this.getImports().forEach((t=>{const r=g.getNamespace(t),n=g.getShortName(t),o=this.getModelManager().getModelFile(r),{name:s,version:a}=g.parseNamespace(r);if(!o){let e=y.messageFormatter("modelmanager-gettype-noregisteredns");throw new h(e({type:t}),this)}const i=e.get(s);if("concerto"!==s&&void 0!==i&&i!==a){let e=y.messageFormatter("modelmanager-gettype-duplicatensimport");throw new h(e({namespace:r,version1:i,version2:a}),this)}if(e.set(s,a),!t.endsWith("*")&&!o.isLocalType(n)){let e=y.messageFormatter("modelmanager-gettype-notypeinns");throw new h(e({type:n,namespace:r}),this)}}));const t=new Set;this.declarations.forEach((e=>{const r=e.getFullyQualifiedName();if(t.has(r))throw new h(`Duplicate class name ${r}`);t.add(r)}));for(let e=0;e<this.declarations.length;e++)this.declarations[e].validate()}resolveType(e,t,r){if(!g.isPrimitiveType(t))if(this.isImportedType(t))this.getModelManager().resolveType(e,this.resolveImport(t));else if(!this.isLocalType(t)){let n=y("en").messageFormatter("modelfile-resolvetype-undecltype");throw new h(n({type:t,context:e}),this,r)}}isLocalType(e){return e&&null!==this.getLocalType(e)}isImportedType(e){if(this.importShortNames.has(e))return!0;for(let t in this.importWildcardNamespaces){let r=this.importWildcardNamespaces[t];const n=this.getModelManager().getModelFile(r);if(n&&n.isLocalType(e))return!0}return!1}resolveImport(e){if(this.importShortNames.has(e))return this.importShortNames.get(e);for(let t in this.importWildcardNamespaces){let r=this.importWildcardNamespaces[t];const n=this.getModelManager().getModelFile(r);if(n&&n.isLocalType(e))return r+"."+e}let t=y("en").messageFormatter("modelfile-resolveimport-failfindimp");throw new h(t({type:e,imports:JSON.stringify(this.imports),namespace:this.getNamespace()}),this)}getImportedType(e){return this.resolveImport(e).split(".").pop()}isDefined(e){return g.isPrimitiveType(e)||null!==this.getLocalType(e)}getType(e){if(g.isPrimitiveType(e))return e;if(this.isImportedType(e)){const t=this.resolveImport(e),r=this.getModelManager().getModelFile(g.getNamespace(t));return r?r.getLocalType(t):null}return this.isLocalType(e)?this.getLocalType(e):null}getFullyQualifiedTypeName(e){return g.isPrimitiveType(e)?e:this.isImportedType(e)?this.resolveImport(e):this.isLocalType(e)?this.getLocalType(e).getFullyQualifiedName():null}getLocalType(e){if(!this.localTypes)throw new Error("Internal error: local types are not yet initialized. Do not try to resolve types inside `process`.");return e.startsWith(this.getNamespace())||(e=this.getNamespace()+"."+e),this.localTypes.has(e)?this.localTypes.get(e):null}getAssetDeclaration(e){let t=this.getLocalType(e);return t&&t.isAsset()?t:null}getTransactionDeclaration(e){let t=this.getLocalType(e);return t&&t.isTransaction()?t:null}getEventDeclaration(e){let t=this.getLocalType(e);return t&&t.isEvent()?t:null}getParticipantDeclaration(e){let t=this.getLocalType(e);return t&&t.isParticipant()?t:null}getNamespace(){return this.namespace}getName(){return this.fileName}getAssetDeclarations(){return this.getDeclarations(a)}getTransactionDeclarations(){return this.getDeclarations(d)}getEventDeclarations(){return this.getDeclarations(f)}getParticipantDeclarations(){return this.getDeclarations(p)}getClassDeclarations(){return this.getDeclarations(c)}getConceptDeclarations(){return this.getDeclarations(l)}getEnumDeclarations(){return this.getDeclarations(i)}getMapDeclarations(){return this.getDeclarations(m)}getScalarDeclarations(){return this.getDeclarations(u)}getDeclarations(e){let t=[];for(let r=0;r<this.declarations.length;r++){let n=this.declarations[r];n instanceof e&&t.push(n)}return t}getAllDeclarations(){return this.declarations}getDefinitions(){return this.definitions}getAst(){return this.ast}getConcertoVersion(){return this.concertoVersion}isCompatibleVersion(){if(this.ast.concertoVersion){if(!s.satisfies(o.version,this.ast.concertoVersion,{includePrerelease:!0}))throw new Error(`ModelFile expects Concerto version ${this.ast.concertoVersion} but this is ${o.version}`);this.concertoVersion=this.ast.concertoVersion}}enforceImportVersioning(e){if(this.getModelManager().isStrict()&&!g.parseNamespace(e.namespace).version)throw new Error(`Cannot use an unversioned import ${e.namespace} when 'strict' option on Model Manager is set.`)}fromAst(e){const t=g.parseNamespace(e.namespace);t.name.split(".").forEach((e=>{if(!g.isValidIdentifier(e))throw new h(`Invalid namespace part '${e}'`,this.modelFile,this.ast.location)})),this.namespace=e.namespace,this.version=t.version;const r=e.imports?e.imports.concat([]):[];if(this.isSystemModelFile()||r.push({$class:`${n}.ImportTypes`,namespace:"concerto@1.0.0",types:["Concept","Asset","Transaction","Participant","Event"]}),this.imports=r,this.imports.forEach((e=>{switch(this.enforceImportVersioning(e),e.$class){case`${n}.ImportAll`:if(this.getModelManager().isStrict())throw new Error("Wilcard Imports are not permitted in strict mode.");b.printDeprecationWarning("Wilcard Imports are deprecated in this version of Concerto and will be removed in a future version.",w.DEPRECATION_WARNING,w.CONCERTO_DEPRECATION_002,"Please refer to https://concerto.accordproject.org/deprecation/002"),this.importWildcardNamespaces.push(e.namespace);break;case`${n}.ImportTypes`:if(this.getModelManager().isAliasedTypeEnabled()){const t=new Map;e.aliasedTypes&&e.aliasedTypes.forEach((e=>{let{name:r,aliasedName:n}=e;if(g.isPrimitiveType(n))throw new Error("Types cannot be aliased to primitive type");t.set(r,n)})),e.types.forEach((r=>t.has(r)?this.importShortNames.set(t.get(r),`${e.namespace}.${r}`):this.importShortNames.set(r,`${e.namespace}.${r}`)))}else{if(e.aliasedTypes)throw new Error("Aliasing disabled, set importAliasing to true");e.types.forEach((t=>{this.importShortNames.set(t,`${e.namespace}.${t}`)}))}break;default:this.importShortNames.set(e.name,g.importFullyQualifiedNames(e)[0])}e.uri&&(this.importUriMap[g.importFullyQualifiedNames(e)[0]]=e.uri)})),e.declarations)for(let t=0;t<e.declarations.length;t++){let r=Object.assign({},e.declarations[t]);if(r.$class===`${n}.AssetDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Asset"}),this.declarations.push(new a(this,r));else if(r.$class===`${n}.TransactionDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Transaction"}),this.declarations.push(new d(this,r));else if(r.$class===`${n}.EventDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Event"}),this.declarations.push(new f(this,r));else if(r.$class===`${n}.ParticipantDeclaration`)r.superType||(r.superType={$class:`${n}.TypeIdentified`,name:"Participant"}),this.declarations.push(new p(this,r));else if(r.$class===`${n}.EnumDeclaration`)this.declarations.push(new i(this,r));else if(r.$class===`${n}.MapDeclaration`)this.declarations.push(new m(this,r));else if(r.$class===`${n}.ConceptDeclaration`)this.declarations.push(new l(this,r));else{if(![`${n}.BooleanScalar`,`${n}.IntegerScalar`,`${n}.LongScalar`,`${n}.DoubleScalar`,`${n}.StringScalar`,`${n}.DateTimeScalar`].includes(r.$class)){let e=y("en").messageFormatter("modelfile-constructor-unrecmodelelem");throw new h(e({type:r.$class}),this)}this.declarations.push(new u(this,r))}}}filter(e,t,r){let n=[];this.declarations?.forEach((t=>{e(t)?n.push(t.ast):r.push(t.getFullyQualifiedName())}));const o={...this.ast,declarations:n};return o.declarations?.length>0?new A(t,o,void 0,this.fileName):null}}e.exports=A},1976:(e,t,r)=>{"use strict";const{isNull:n}=r(8487).NullUtil,o=r(6375);void 0===r.g&&(r(1529),r(7189));class s extends o{constructor(e,t){if(super(e,t),this.lowerBound=null,this.upperBound=null,Object.prototype.hasOwnProperty.call(t,"lower")&&(this.lowerBound=t.lower),Object.prototype.hasOwnProperty.call(t,"upper")&&(this.upperBound=t.upper),null===this.lowerBound&&null===this.upperBound?this.reportError(null,"Invalid range, lower and-or upper bound must be specified."):null===this.lowerBound||null===this.upperBound||this.lowerBound>this.upperBound&&this.reportError(null,"Lower bound must be less than or equal to upper bound."),void 0!==this.field?.ast?.defaultValue){let e=this.field.ast.defaultValue;null!==this.lowerBound&&e<this.lowerBound&&this.reportError(null,`Value ${e} is outside lower bound ${this.lowerBound}`),null!==this.upperBound&&e>this.upperBound&&this.reportError(null,`Value ${e} is outside upper bound ${this.upperBound}`)}}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound}validate(e,t){null!==t&&(null!==this.lowerBound&&t<this.lowerBound&&this.reportError(e,`Value ${t} is outside lower bound ${this.lowerBound}`),null!==this.upperBound&&t>this.upperBound&&this.reportError(e,`Value ${t} is outside upper bound ${this.upperBound}`))}toString(){return"NumberValidator lower: "+this.lowerBound+" upper: "+this.upperBound}compatibleWith(e){if(!(e instanceof s))return!1;const t=this.getLowerBound(),r=e.getLowerBound();if(n(t)&&!n(r))return!1;if(!n(t)&&!n(r)&&t<r)return!1;const o=this.getUpperBound(),a=e.getUpperBound();return!(n(o)&&!n(a)||!n(o)&&!n(a)&&o>a)}}e.exports=s},3218:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"ParticipantDeclaration"}}},9852:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(1768),s=r(1861),a=r(7688);void 0===r.g&&(r(9869),r(6226)),e.exports=class extends a{constructor(e,t){super(t),this.parent=e,this.process()}getModelFile(){return this.parent.getModelFile()}getParent(){return this.parent}process(){if(super.process(),!o.isValidIdentifier(this.ast.name))throw new s(`Invalid property name '${this.ast.name}'`,this.modelFile,this.ast.location);if(this.name=this.ast.name,this.decorator=null,!this.name)throw new Error("No name for type "+JSON.stringify(this.ast));switch(this.ast.$class){case`${n}.EnumProperty`:break;case`${n}.BooleanProperty`:this.type="Boolean";break;case`${n}.DateTimeProperty`:this.type="DateTime";break;case`${n}.DoubleProperty`:this.type="Double";break;case`${n}.IntegerProperty`:this.type="Integer";break;case`${n}.LongProperty`:this.type="Long";break;case`${n}.StringProperty`:this.type="String";break;case`${n}.ObjectProperty`:this.type=this.ast.type?this.ast.type.name:null;break;case`${n}.RelationshipProperty`:this.type=this.ast.type.name}this.array=!1,this.ast.isArray&&(this.array=!0),this.ast.isOptional?this.optional=!0:this.optional=!1}validate(e){super.validate(),this.type&&e.getModelFile().resolveType("property "+this.getFullyQualifiedName(),this.type)}getName(){return this.name}getType(){return this.type}isOptional(){return this.optional}getFullyQualifiedTypeName(){if(this.isPrimitive())return this.type;const e=this.getParent();if(!e)throw new Error("Property "+this.name+" does not have a parent.");const t=e.getModelFile();if(!t)throw new Error("Parent of property "+this.name+" does not have a ModelFile!");const r=t.getFullyQualifiedTypeName(this.type);if(!r)throw new Error("Failed to find fully qualified type name for property "+this.name+" with type "+this.type);return r}getFullyQualifiedName(){return this.getParent().getFullyQualifiedName()+"."+this.getName()}getNamespace(){return this.getParent().getNamespace()}isArray(){return this.array}isTypeEnum(){return!this.isPrimitive()&&this.getParent().getModelFile().getType(this.getType()).isEnum()}isPrimitive(){return o.isPrimitiveType(this.getType())}}},6099:(e,t,r)=>{"use strict";const n=r(9852),o=r(1861),s=r(1768);void 0===r.g&&r(9869),e.exports=class extends n{constructor(e,t){super(e,t)}validate(e){if(super.validate(e),!this.getType())throw new o("Relationship must have a type",e.getModelFile(),this.ast.location);let t=null;if(s.isPrimitiveType(this.getType()))throw new o("Relationship "+this.getName()+" cannot be to the primitive type "+this.getType(),e.getModelFile(),this.ast.location);if(this.getParent().getNamespace()===s.getNamespace(this.getFullyQualifiedTypeName()))t=this.getParent().getModelFile().getType(this.getType());else try{t=this.getParent().getModelFile().getModelManager().getType(this.getFullyQualifiedTypeName())}catch(e){}if(null===t)throw new o("Relationship "+this.getName()+" points to a missing type "+this.getFullyQualifiedTypeName(),e.getModelFile(),this.ast.location);if(!t.isIdentified())throw new o("Relationship "+this.getName()+" must be to a class that has an identifier, but this is to "+this.getFullyQualifiedTypeName(),e.getModelFile(),this.ast.location)}toString(){return"RelationshipDeclaration {name="+this.name+", type="+this.getFullyQualifiedTypeName()+", array="+this.array+", optional="+this.optional+"}"}isRelationship(){return!0}}},7189:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),o=r(5437),s=r(1976),a=r(516),i=r(8487).NullUtil,c=r(1861),l=r(1768);void 0===r.g&&(r(6375),r(9869)),e.exports=class extends o{process(){super.process();const e=this.getName();if(l.isPrimitiveType(e))throw new c(`Invalid scalar name '${e}'. Name conflicts with primitive type.`,this.ast.name.location);switch(this.superType=null,this.superTypeDeclaration=null,this.idField=null,this.timestamped=!1,this.abstract=!1,this.validator=null,this.ast.$class===`${n}.BooleanScalar`?this.type="Boolean":this.ast.$class===`${n}.IntegerScalar`?this.type="Integer":this.ast.$class===`${n}.LongScalar`?this.type="Long":this.ast.$class===`${n}.DoubleScalar`?this.type="Double":this.ast.$class===`${n}.StringScalar`?this.type="String":this.ast.$class===`${n}.DateTimeScalar`?this.type="DateTime":this.type=null,this.getType()){case"Integer":case"Double":case"Long":this.ast.validator&&(this.validator=new s(this,this.ast.validator));break;case"String":(this.ast.validator||this.ast.lengthValidator)&&(this.validator=new a(this,this.ast.validator,this.ast.lengthValidator))}i.isNull(this.ast.defaultValue)?this.defaultValue=null:this.defaultValue=this.ast.defaultValue}validate(){super.validate()}isIdentified(){return!1}isSystemIdentified(){return!1}getIdentifierFieldName(){return null}getType(){return this.type}getSuperType(){return null}getSuperTypeDeclaration(){return null}getValidator(){return this.validator}getDefaultValue(){return this.defaultValue}toString(){return"ScalarDeclaration {id="+this.getFullyQualifiedName()+"}"}isAbstract(){return!0}isScalarDeclaration(){return!0}isAsset(){return!1}isParticipant(){return!1}isTransaction(){return!1}isEvent(){return!1}isConcept(){return!1}}},516:(e,t,r)=>{"use strict";const{ErrorCodes:n}=r(8487),{isNull:o}=r(8487).NullUtil,s=r(6375);void 0===r.g&&(r(1529),r(7189));class a extends s{constructor(e,t,r){if(super(e,t),this.minLength=null,this.maxLength=null,this.regex=null,r&&(this.minLength=r?.minLength,this.maxLength=r?.maxLength,null===this.minLength&&null===this.maxLength?this.reportError(e.getName(),"Invalid string length, minLength and-or maxLength must be specified."):this.minLength<0||this.maxLength<0?this.reportError(e.getName(),"minLength and-or maxLength must be positive integers."):null===this.minLength||null===this.maxLength||this.minLength>this.maxLength&&this.reportError(e.getName(),"minLength must be less than or equal to maxLength.")),t)try{const r=e?.parent?.getModelFile()?.getModelManager()?.options?.regExp||RegExp;this.regex=new r(t.pattern,t.flags)}catch(t){this.reportError(e.getName(),t.message,n.REGEX_VALIDATOR_EXCEPTION)}this.field?.ast?.defaultValue&&this.validate(e.getName(),this.field.ast.defaultValue)}validate(e,t){null!==t&&(null!==this.minLength&&t.length<this.minLength&&this.reportError(e,`The string length of '${t}' should be at least ${this.minLength} characters.`),null!==this.maxLength&&t.length>this.maxLength&&this.reportError(e,`The string length of '${t}' should not exceed ${this.maxLength} characters.`),this.regex&&!this.regex.test(t)&&this.reportError(e,`Value '${t}' failed to match validation regex: ${this.regex}`))}getMinLength(){return this.minLength}getMaxLength(){return this.maxLength}getRegex(){return this.regex}compatibleWith(e){if(!(e instanceof a))return!1;if(this.validator?.pattern!==e.validator?.pattern)return!1;if(this.validator?.flags!==e.validator?.flags)return!1;const t=this.getMinLength(),r=e.getMinLength();if(o(t)&&!o(r))return!1;if(!o(t)&&!o(r)&&t<r)return!1;const n=this.getMaxLength(),s=e.getMaxLength();return!(o(n)&&!o(s)||!o(n)&&!o(s)&&n>s)}}e.exports=a},745:(e,t,r)=>{"use strict";const n=r(8058);void 0===r.g&&r(6226),e.exports=class extends n{constructor(e,t){super(e,t)}declarationKind(){return"TransactionDeclaration"}}},6375:(e,t,r)=>{"use strict";const{BaseException:n,ErrorCodes:o}=r(8487);void 0===r.g&&(r(1529),r(7189)),e.exports=class{constructor(e,t){this.validator=t,this.field=e}reportError(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.DEFAULT_VALIDATOR_EXCEPTION;throw new n("Validator error for field `"+e+"`. "+this.getFieldOrScalarDeclaration().getFullyQualifiedName()+": "+t,void 0,r)}accept(e,t){return e.visit(this,t)}getFieldOrScalarDeclaration(){return this.field}validate(e,t){}compatibleWith(e){return!1}}},5430:(e,t,r)=>{"use strict";const{BaseException:n}=r(8487);e.exports=class extends n{constructor(e){super(e)}}},9259:(e,t,r)=>{"use strict";const n=r(2410),o=r(2523);e.exports=class extends o{constructor(e,t,r,n,o,s){super(e,t,r,n);const a=this.$modelManager.getModelFile(this.getNamespace()),i=a?.getType(this.getFullyQualifiedType());this.$identifierFieldName=i?.getIdentifierFieldName()||"$identifier",this.setIdentifier(o),this.$timestamp=s}getTimestamp(){return this.$timestamp}getIdentifier(){return this[this.$identifierFieldName]}setIdentifier(e){this.$identifier=e,this[this.$identifierFieldName]=e}getFullyQualifiedIdentifier(){return this.getIdentifier()?this.getFullyQualifiedType()+"#"+this.getIdentifier():this.getFullyQualifiedType()}toString(){return"Identifiable {id="+this.getFullyQualifiedIdentifier()+"}"}isRelationship(){return!1}isResource(){return!1}toURI(){return new n(this.getNamespace(),this.getType(),this.getIdentifier()).toURI()}}},6113:(e,t,r)=>{"use strict";const n=r(9259),o=r(1768),s=r(2410);void 0===r.g&&r(9481);class a extends n{constructor(e,t,r,n,o,s){super(e,t,r,n,o,s),this.$class="Relationship"}toString(){return"Relationship {id="+this.getFullyQualifiedIdentifier()+"}"}isRelationship(){return!0}static fromURI(e,t,r,n){const i=s.fromURI(t,r,n);let c=o.getFullyQualifiedName(i.namespace,i.type),l=e.getType(c);return new a(e,l,i.namespace,i.type,i.id)}}e.exports=a},7755:(e,t,r)=>{"use strict";const n=r(9259);e.exports=class extends n{constructor(e,t,r,n,o,s){super(e,t,r,n,o,s)}toString(){return"Resource {id="+this.getFullyQualifiedIdentifier()+"}"}isResource(){return!0}isConcept(){return this.getClassDeclaration().isConcept()}isIdentifiable(){return this.getClassDeclaration().isIdentified()}toJSON(){return this.getModelManager().getSerializer().toJSON(this)}}},2410:(e,t,r)=>{"use strict";const n=r(9472),o=r(1768),s="resource";class a{constructor(e,t,r){if(!e)throw new Error("Missing namespace");if(!t)throw new Error("Missing type");if(!r)throw new Error("Missing id");this.namespace=e,this.type=t,this.id=r}static fromURI(e,t,r){let i;try{i=n.parse(e)}catch(t){throw new Error("Invalid URI: "+e)}const c=i.protocol;if(c&&c!==s)throw new Error("Invalid URI scheme: "+e);if(i.username||i.password||i.port||i.query)throw new Error("Invalid resource URI format: "+e);let l,u,p=i.fragment;if(p){const e=i.path;l=o.getNamespace(e),u=o.getShortName(e)}else l=t,u=r,p=i.path;return new a(l,u,decodeURIComponent(p))}toURI(){const e=o.getFullyQualifiedName(this.namespace,this.type);return s+":"+e+"#"+encodeURI(this.id)}}e.exports=a},2523:(e,t,r)=>{"use strict";const n=r(3464),o=r(7657),s=r(8487).NullUtil;n.extend(o),void 0===r.g&&(r(9869),r(9481)),e.exports=class{constructor(e,t,r,n){this.$modelManager=e,this.$classDeclaration=t,this.$namespace=r,this.$type=n}accept(e,t){return e.visit(this,t)}getModelManager(){return this.$modelManager}getType(){return this.$type}getFullyQualifiedType(){return this.$classDeclaration.getFullyQualifiedName()}getNamespace(){return this.$namespace}getClassDeclaration(){return this.$classDeclaration}setPropertyValue(e,t){this[e]=t}addArrayValue(e,t){this[e]?this[e].push(t):this[e]=[t]}assignFieldDefaults(){let e=this.getClassDeclaration().getProperties();for(let t=0;t<e.length;t++){let r,o,a=e[t];if(a.isTypeScalar?.()&&(a=a.getScalarField()),a.isField?.()&&(r=a.getDefaultValue(),o=a.getType()),!s.isNull(r))if("String"===o)this.setPropertyValue(a.getName(),r);else if("Integer"===o)this.setPropertyValue(a.getName(),parseInt(r));else if("Long"===o)this.setPropertyValue(a.getName(),parseInt(r));else if("Double"===o)this.setPropertyValue(a.getName(),parseFloat(r));else if("Boolean"===o)this.setPropertyValue(a.getName(),!0===r);else if("DateTime"===o){const e=n.utc(r);this.setPropertyValue(a.getName(),e)}else this.setPropertyValue(a.getName(),r)}}instanceOf(e){const t=this.getClassDeclaration();if(t.getFullyQualifiedName()===e)return!0;let r=t.getSuperTypeDeclaration();for(;r;){if(r.getFullyQualifiedName()===e)return!0;r=r.getSuperTypeDeclaration()}return!1}toJSON(){throw new Error("Use Serializer.toJSON to convert resource instances to JSON objects.")}}},289:(e,t,r)=>{"use strict";const n=r(8487).TypedStack,o=r(7755);e.exports=class extends o{constructor(e,t,r,n,o,s,a){super(e,t,r,n,o,s),this.$validator=a}setPropertyValue(e,t){let r=this.getClassDeclaration().getProperty(e);if(!r)throw new Error("The instance with id "+this.getIdentifier()+" trying to set field "+e+" which is not declared in the model.");const o={};o.stack=new n(t),o.modelManager=this.getModelManager(),o.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),r.accept(this.$validator,o),super.setPropertyValue(e,t)}addArrayValue(e,t){let r=this.getClassDeclaration().getProperty(e);if(!r)throw new Error("The instance with id "+this.getIdentifier()+" trying to set field "+e+" which is not declared in the model.");if(!r.isArray())throw new Error("The instance with id "+this.getIdentifier()+" trying to add array item "+e+" which is not declared as an array in the model.");const o={};let s=[];this[e]&&(s=this[e].slice(0)),s.push(t),o.stack=new n(s),o.modelManager=this.getModelManager(),o.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),r.accept(this.$validator,o),super.addArrayValue(e,t)}validate(){const e=this.getClassDeclaration(),t={};t.stack=new n(this),t.modelManager=this.getModelManager(),t.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),e.accept(this.$validator,t)}}},6803:(e,t,r)=>{"use strict";const n=r(6686),o=r(9967).Parser,s=r(8487).DefaultFileLoader,a=r(6226),i=r(9481);class c{static async addModel(e,t,r){let s=null;if(e.accepts(r))s=await e.load(r);else{const e=n.readFileSync(r,"utf8"),i=o.parse(e,r);s=new a(t,i,e,r)}return t.addModelFile(s,null,s.getName(),!0),t}static async loadModelManager(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{offline:!1,strict:!1},r=new i(t);const n=new s(((e,t)=>{const n=o.parse(t);return new a(r,n,t,e)}));for(let t of e)r=await c.addModel(n,r,t);return t&&t.offline?(r.validateModelFiles(),r):(await r.updateExternalModels(),r)}static async loadModelManagerFromModelFiles(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{offline:!1,strict:!1},n=new i(r);return n.addModelFiles(e,t,!0),r&&r.offline?(n.validateModelFiles(),n):(await n.updateExternalModels(),n)}}e.exports=c},9481:(e,t,r)=>{"use strict";const n=r(9967).Parser,o=r(3832),s=r(7833)("concerto:BaseModelManager");void 0===r.g&&r(6226),e.exports=class extends o{constructor(e){super(e,(e=>(t,r)=>{const o={skipLocationNodes:e?.skipLocationNodes};return{ast:n.parse(r,t,o),definitions:r,fileName:t}})(e))}addCTOModel(e,t,r){return s("addCTOModel","addCTOModel",e,t),this.addModel(e,e,t,r)}}},1768:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(3348),{MetaModelUtil:o}=r(3348),s=r(2722),a=r(2438);void 0===r.g&&r(6226);const i=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u,c=["$classDeclaration","$namespace","$type","$modelManager","$validator","$identifierFieldName","$imports","$superTypes","$id"],l=["$class","$identifier","$timestamp",...c];class u{static getShortName(e){let t=e,r=e.lastIndexOf(".");return r>-1&&(t=e.substr(r+1)),t}static getNamespace(e){if(!e)throw new Error(a.formatMessage("modelutil-getnamespace-nofnq"));let t="",r=e.lastIndexOf(".");return r>-1&&(t=e.substr(0,r)),t}static parseNamespace(e,t){if(!e)throw new Error("Namespace is null or undefined.");const r=e.split("@");let n=r[1];if(r.length>2)throw new Error(`Invalid namespace ${e}`);if(2===r.length&&!t?.disableVersionParsing){if(!s.valid(r[1]))throw new Error(`Invalid namespace ${e}`);n=s.parse(r[1])}return t?.disableVersionParsing?{name:r[0]}:{name:r[0],escapedNamespace:e.replace("@","_"),version:r.length>1?r[1]:null,versionParsed:r.length>1?n:null}}static importFullyQualifiedNames(e){return o.importFullyQualifiedNames(e)}static isPrimitiveType(e){return["Boolean","String","DateTime","Double","Integer","Long"].indexOf(e)>=0}static isAssignableTo(e,t,r){const n=r.getFullyQualifiedTypeName(),o=t===n;if(o||u.isPrimitiveType(t)||u.isPrimitiveType(n))return o;const s=e.getType(t);if(!s)throw new Error("Cannot find type "+t);return s.getAllSuperTypeDeclarations().some((e=>e.getFullyQualifiedName()===n))}static capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}static isEnum(e){const t=e.getParent().getModelFile().getType(e.getType());return t?.isEnum()}static isMap(e){const t=e.getParent().getModelFile().getType(e.getType());return t?.isMapDeclaration?.()}static isScalar(e){const t=e.getParent().getModelFile().getType(e.getType());return t?.isScalarDeclaration?.()}static isValidIdentifier(e){return i.test(e)}static getFullyQualifiedName(e,t){return e?`${e}.${t}`:t}static removeNamespaceVersionFromFullyQualifiedName(e){if(u.isPrimitiveType(e))return e;const t=u.getNamespace(e),{name:r}=u.parseNamespace(t),n=u.getShortName(e);return u.getFullyQualifiedName(r,n)}static isSystemProperty(e){return l.includes(e)}static isPrivateSystemProperty(e){return c.includes(e)}static isValidMapKey(e){return[`${n}.StringMapKeyType`,`${n}.DateTimeMapKeyType`,`${n}.ObjectMapKeyType`].includes(e.$class)}static isValidMapKeyScalar(e){return e?.isScalarDeclaration?.()&&e?.ast.$class===`${n}.StringScalar`||e?.isScalarDeclaration?.()&&e?.ast.$class===`${n}.DateTimeScalar`}static isValidMapValue(e){return[`${n}.BooleanMapValueType`,`${n}.DateTimeMapValueType`,`${n}.StringMapValueType`,`${n}.IntegerMapValueType`,`${n}.LongMapValueType`,`${n}.DoubleMapValueType`,`${n}.ObjectMapValueType`,`${n}.RelationshipMapValueType`].includes(e.$class)}}e.exports=u},6128:(e,t,r)=>{"use strict";const n=r(6391);e.exports={getRootModel:function(e){const t=e?"concerto_1.0.0.cto":"concerto.cto",r=e?"concerto@1.0.0":"concerto",o=`@DotNetNamespace("AccordProject.Concerto")\n namespace ${r}\n import concerto.decorator@1.0.0.DotNetNamespace\n abstract concept Concept {}\n abstract concept Asset identified {}\n abstract concept Participant identified {}\n abstract concept Transaction {}\n abstract concept Event {}\n `,s=JSON.parse(JSON.stringify(n));return s.namespace=r,{rootModelFile:t,rootModelCto:o,rootModelAst:s}}}},3686:(e,t,r)=>{"use strict";const{BaseException:n}=r(8487);e.exports=class extends n{constructor(e){super(e)}}},3673:(e,t,r)=>{"use strict";const{TypedStack:n}=r(8487),o=r(7624),s=r(2438),a=r(9),i=r(8998),c=r(2523),l=r(2552),{utcOffset:u}=o.setCurrentTime(),p={validate:!0,utcOffset:u};void 0===r.g&&(r(1595),r(9481),r(7755)),e.exports=class{constructor(e,t,r){if(!e)throw new Error(s.formatMessage("serializer-constructor-factorynull"));if(!t)throw new Error(s.formatMessage("serializer-constructor-modelmanagernull"));this.factory=e,this.modelManager=t,this.defaultOptions=Object.assign({},p,r||{})}setDefaultOptions(e){this.defaultOptions=Object.assign({},p,e)}toJSON(e,t){if(!(e instanceof c))throw new Error(s.formatMessage("serializer-tojson-notcobject"));const r={};r.stack=new n(e),r.modelManager=this.modelManager,r.seenResources=new Set,r.dedupeResources=new Set;const o=this.modelManager.getType(e.getFullyQualifiedType());if((t=t?Object.assign({},this.defaultOptions,t):this.defaultOptions).validate){const e=new l(t);o.accept(e,r)}const i=new a(!0===t.convertResourcesToRelationships,!0===t.permitResourcesForRelationships,!0===t.deduplicateResources,!0===t.convertResourcesToId,!1,t.utcOffset);return r.stack.clear(),r.stack.push(e),o.accept(i,r)}fromJSON(e,t){if(t=t?Object.assign({},this.defaultOptions,t):this.defaultOptions,!e.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier.");const r=this.modelManager.getType(e.$class);let o;if(r.isTransaction?.())o=this.factory.newTransaction(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else if(r.isEvent?.())o=this.factory.newEvent(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else if(r.isConcept?.())o=this.factory.newConcept(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else{if(r.isMapDeclaration?.())throw new Error("Attempting to create a Map declaration is not supported.");if(r.isEnum())throw new Error("Attempting to create an ENUM declaration is not supported.");o=this.factory.newResource(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()])}const s={};s.jsonStack=new n(e),s.resourceStack=new n(o),s.modelManager=this.modelManager,s.factory=this.factory;const a=new i(!0===t.acceptResourcesForRelationships,!1,t.utcOffset,!0===t.strictQualifiedDateTimes);return r.accept(a,s),t.validate&&o.validate(),o}}},6422:(e,t,r)=>{"use strict";const n=r(8487).NullUtil,o=r(2438);e.exports=class{visit(e,t){if(e.isClassDeclaration?.())return this.visitClassDeclaration(e,t);if(e.isMapDeclaration?.())return this.visitMapDeclaration(e,t);if(e.isRelationship?.())return this.visitRelationshipDeclaration(e,t);if(e.isTypeScalar?.())return this.visitField(e.getScalarField(),t);if(e.isField?.())return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitClassDeclaration(e,t){const r=t.stack.pop(),o=e.getProperties();for(const e of o){if(!t.includeOptionalFields&&e.isOptional())continue;const o=r[e.getName()];n.isNull(o)&&(r[e.getName()]=e.accept(this,t))}return r}visitField(e,t){if(e.isPrimitive())t.seen.push("Primitve");else{let r=e.getFullyQualifiedTypeName(),n=t.modelManager.getType(r);n=this.findConcreteSubclass(n);let o=n.getFullyQualifiedName();if(t.seen.includes(o)){if(e.isArray())return[];if(e.isOptional())return null;throw new Error("Model is recursive.")}t.seen.push(o)}let r;if(e.isArray()){const n=()=>this.getFieldValue(e,t);r=t.valueGenerator.getArray(n)}else r=this.getFieldValue(e,t);return t.seen.pop(),r}getFieldValue(e,t){let r=e;e.isTypeScalar?.()&&(r=e.getScalarField());let n=e.getFullyQualifiedTypeName();if(e.isPrimitive())switch(n){case"DateTime":return t.valueGenerator.getDateTime();case"Integer":return r.validator?t.valueGenerator.getRange(r.validator.lowerBound,r.validator.upperBound,n):t.valueGenerator.getInteger();case"Long":return r.validator?t.valueGenerator.getRange(r.validator.lowerBound,r.validator.upperBound,n):t.valueGenerator.getLong();case"Double":return r.validator?t.valueGenerator.getRange(r.validator.lowerBound,r.validator.upperBound,n):t.valueGenerator.getDouble();case"Boolean":return t.valueGenerator.getBoolean();default:return r.validator?.regex?t.valueGenerator.getRegex(r.validator.regex,r.validator.minLength,r.validator.maxLength):t.valueGenerator.getString(r.validator?.minLength,r.validator?.maxLength)}let o=t.modelManager.getType(n);if(o.isEnum()){let e=o.getOwnProperties();return t.valueGenerator.getEnum(e).getName()}if(o=this.findConcreteSubclass(o),!o.isMapDeclaration?.()){let e=null;if(o.isIdentified()){let n=o.getIdentifierFieldName(),s=o.getProperty(n);s?.isTypeScalar?.()&&(s=s.getScalarField()),e=s?.validator?.regex?t.valueGenerator.getRegex(r.validator.regex):this.generateRandomId(o)}let n=t.factory.newResource(o.getNamespace(),o.getName(),e);t.stack.push(n)}return o.accept(this,t)}findConcreteSubclass(e){if(e.isMapDeclaration?.()||!e.isAbstract())return e;const t=e.getAssignableClassDeclarations().filter((e=>!e.isAbstract()));if(0===t.length){const t=o.messageFormatter("instancegenerator-newinstance-noconcreteclass");throw new Error(t({type:e.getFullyQualifiedName()}))}return t[0]}visitRelationshipDeclaration(e,t){let r=t.modelManager.getType(e.getFullyQualifiedTypeName());r=this.findConcreteSubclass(r);const n=t.factory,o=()=>{const e=this.generateRandomId(r);return n.newRelationship(r.getNamespace(),r.getName(),e)};return e.isArray()?t.valueGenerator.getArray(o):o()}visitMapDeclaration(e,t){return t.valueGenerator.getMap()}generateRandomId(e){let t=Math.round(9999*Math.random()).toString();return t=t.padStart(4,"0"),t}}},9:(e,t,r)=>{"use strict";const n=r(7755),o=r(2523),s=r(1768),a=r(8487).NullUtil;e.exports=class{constructor(e,t,r,n,o,s){this.convertResourcesToRelationships=e,this.permitResourcesForRelationships=t,this.deduplicateResources=r,this.convertResourcesToId=n,this.utcOffset=s||0}visit(e,t){if(e.isClassDeclaration?.())return this.visitClassDeclaration(e,t);if(e.isRelationship?.())return this.visitRelationshipDeclaration(e,t);if(e.isMapDeclaration?.())return this.visitMapDeclaration(e,t);if(e.isTypeScalar?.())return this.visitField(e.getScalarField(),t);if(e.isField?.())return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitMapDeclaration(e,t){const r=t.stack.pop();let n=new Map;return r.forEach(((r,o)=>{if(!s.isSystemProperty(o)){if("object"==typeof r){let n=e.getModelFile().getAllDeclarations().find((e=>e.name===r.getType()));t.stack.push(r);const o=n.accept(this,t);r=o}n.set(o,r)}})),Object.fromEntries(n)}visitClassDeclaration(e,t){const r=t.stack.pop();if(!(r instanceof n))throw new Error("Expected a Resource, but found "+r);let o={},s=null;if(r.isIdentifiable()&&this.deduplicateResources){if(s=r.toURI(),t.dedupeResources.has(s))return s;t.dedupeResources.add(s)}o.$class=e.getFullyQualifiedName(),this.deduplicateResources&&s&&(o.$id=s);const i=e.getProperties();for(let e in i){const n=i[e],s=r[n.getName()];a.isNull(s)||(t.stack.push(s),o[n.getName()]=n.accept(this,t))}return o}visitField(e,t){const r=t.stack.pop();let n;if(e.isArray()){let a=[];for(let n in r){const i=r[n];if(e.isPrimitive()||s.isEnum(e))a.push(this.convertToJSON(e,i));else{t.stack.push(i,o);const e=t.modelManager.getType(i.getFullyQualifiedType());a.push(e.accept(this,t))}}n=a}else e.isPrimitive()||s.isEnum(e)?n=this.convertToJSON(e,r):s.isMap(e)?(t.stack.push(r),n=t.modelManager.getType(e.getFullyQualifiedTypeName()).accept(this,t)):(t.stack.push(r),n=t.modelManager.getType(r.getFullyQualifiedType()).accept(this,t));return n}convertToJSON(e,t){if("DateTime"===e.getType()){const e=t.utc().utcOffset(this.utcOffset),r=0===e.utcOffset();return e.format("YYYY-MM-DDTHH:mm:ss.SSS"+(r?"[Z]":"Z"))}return t}visitRelationshipDeclaration(e,t){const r=t.stack.pop();let o;if(e.isArray()){let s=[];for(let o in r){const a=r[o];if(this.permitResourcesForRelationships&&a instanceof n){let r=a.getFullyQualifiedIdentifier();if(t.seenResources.has(r)){let t=this.getRelationshipText(e,a);s.push(t)}else{t.seenResources.add(r),t.stack.push(a,n);const o=t.modelManager.getType(e.getFullyQualifiedTypeName());s.push(o.accept(this,t)),t.seenResources.delete(r)}}else{let t=this.getRelationshipText(e,a);s.push(t)}}o=s}else if(this.permitResourcesForRelationships&&r instanceof n){let s=r.getFullyQualifiedIdentifier();t.seenResources.has(s)?o=this.getRelationshipText(e,r):(t.seenResources.add(s),t.stack.push(r,n),o=t.modelManager.getType(e.getFullyQualifiedTypeName()).accept(this,t),t.seenResources.delete(s))}else o=this.getRelationshipText(e,r);return o}getRelationshipText(e,t){if(t instanceof n&&!this.convertResourcesToRelationships&&!this.permitResourcesForRelationships)throw new Error("Did not find a relationship for "+e.getFullyQualifiedTypeName()+" found "+t);return this.convertResourcesToId?t.getIdentifier():t.toURI()}}},8998:(e,t,r)=>{"use strict";const{TypedStack:n}=r(8487),o=r(6113),s=r(8487).NullUtil,a=r(1768),i=r(390),c=r(3464),l=r(7657);c.extend(l);const u=r(4491);c.extend(u);const p=r(3221);c.extend(p);const d=r(279);function f(e,t){const r=Object.keys(e),n=r.filter(a.isPrivateSystemProperty);if(n.length>0){const e=`Unexpected reserved properties for type ${t.getFullyQualifiedName()}: `+n.join(", ");throw new i(e)}if(r.includes("$timestamp")&&!t.isTransaction?.()&&!t.isEvent?.()){const e=`Unexpected property for type ${t.getFullyQualifiedName()}: $timestamp`;throw new i(e)}return r.filter((t=>!a.isSystemProperty(t)&&!s.isNull(e[t])))}c.extend(d),e.exports=class{constructor(e,t,r,n){this.acceptResourcesForRelationships=e,this.utcOffset=r||0,this.strictQualifiedDateTimes=n,{NODE_ENV:"production"}.TZ&&console.warn(`Environment variable 'TZ' is set to '${{NODE_ENV:"production"}.TZ}', this can cause unexpected behaviour when using unqualified date time formats.`)}visit(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.path??(t.path=new n("$")),e.isClassDeclaration?.())return this.visitClassDeclaration(e,t);if(e.isMapDeclaration?.())return this.visitMapDeclaration(e,t);if(e.isRelationship?.())return this.visitRelationshipDeclaration(e,t);if(e.isTypeScalar?.())return this.visitField(e.getScalarField(),t);if(e.isField?.())return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitClassDeclaration(e,t){const r=t.jsonStack.pop(),o=t.resourceStack.pop();t.path??(t.path=new n("$"));const s=f(r,e);return function(e,t){const r=t.getProperties().map((e=>e.getName())),n=e.filter((e=>!r.includes(e)));if(n.length>0){const e=`Unexpected properties for type ${t.getFullyQualifiedName()}: `+n.join(", ");throw new i(e)}}(s,e),s.forEach((n=>{let s=r[n];if(null!==s){t.path.push(`.${n}`),t.jsonStack.push(s);const r=e.getProperty(n);o[n]=r.accept(this,t),t.path.pop()}})),o}visitMapDeclaration(e,t){let r=t.jsonStack.pop();t.path??(t.path=new n("$")),f(r,e),r=new Map(Object.entries(r));let o=new Map;return r.forEach(((r,n)=>{"$class"!==n?(a.isPrimitiveType(e.getKey().getType())||(n=this.processMapType(e,t,n,e.getKey().getType())),a.isPrimitiveType(e.getValue().getType())||(r=this.processMapType(e,t,r,e.getValue().getType())),o.set(n,r)):o.set(n,r)})),o}processMapType(e,t,r,n){let o;if(o=r&&"object"==typeof r&&r.$class?e.getModelFile().getAllDeclarations().find((e=>e.getFullyQualifiedName()===r.$class)):e.getModelFile().getAllDeclarations().find((e=>e.name===n)),o?.isClassDeclaration()){let e=t.factory.newConcept(o.getNamespace(),o.getName(),o.getIdentifierFieldName());return t.jsonStack.push(r),t.resourceStack.push(e),o.accept(this,t)}return r}visitField(e,t){t.path??(t.path=new n("$"));let r=t.jsonStack.pop(),o=null;if(e.isArray()){o=[];for(let n=0;n<r.length;n++){t.path.push(`[${n}]`);const s=r[n];o.push(this.convertItem(e,s,t)),t.path.pop()}}else o=this.convertItem(e,r,t);return o}convertItem(e,t,r){let n=null;if(e.isPrimitive?.()||e.isTypeEnum?.())n=this.convertToObject(e,t,r);else{let o=t.$class;o||(o=e.getFullyQualifiedTypeName());const s=r.modelManager.getType(o);if(!s.isMapDeclaration?.()){let e=null;e=s.isIdentified()?r.factory.newResource(s.getNamespace(),s.getName(),t[s.getIdentifierFieldName()]):r.factory.newConcept(s.getNamespace(),s.getName()),r.resourceStack.push(e)}r.jsonStack.push(t),n=s.accept(this,r)}return n}convertToObject(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null;r.path??(r.path=new n("$"));const s=r.path.stack.join("");switch(e.getType()){case"DateTime":if(t&&"object"==typeof t&&"function"==typeof t.isBefore)o=t;else{if("string"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);if(this.strictQualifiedDateTimes){if(this.strictQualifiedDateTimes){if(!t.match(/^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2}))$/))throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\` with format YYYY-MM-DDTHH:mm:ss[Z]`);o=c.utc(t)}}else o=c.utc(t).utcOffset(this.utcOffset)}if(!o||!o.isValid())throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);break;case"Integer":case"Long":{const r=t;if("number"!=typeof r)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);if(Math.trunc(r)!==r)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=r}break;case"Double":if("number"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=parseFloat(t);break;case"Boolean":if("boolean"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=t;break;case"String":if("string"!=typeof t)throw new i(`Expected value at path \`${s}\` to be of type \`${e.getType()}\``);o=t;break;default:o=t}return o}visitRelationshipDeclaration(e,t){t.path??(t.path=new n("$"));let r=t.jsonStack.pop(),s=null,i=e.getFullyQualifiedTypeName(),c=a.getNamespace(i);c||(c=e.getNamespace());let l=a.getShortName(i);if(e.isArray()){s=[];for(let n=0;n<r.length;n++){let a=r[n];if("string"==typeof a)s.push(o.fromURI(t.modelManager,a,c,l));else{if(!this.acceptResourcesForRelationships)throw new Error("Invalid JSON data. Found a value that is not a string: "+r+" for relationship "+e);if(!a.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier: "+a+" for relationship "+e);const n=t.modelManager.getType(a.$class);let o=t.factory.newResource(n.getNamespace(),n.getName(),a[n.getIdentifierFieldName()]);t.jsonStack.push(a),t.resourceStack.push(o),n.accept(this,t),s.push(o)}}}else if("string"==typeof r)s=o.fromURI(t.modelManager,r,c,l);else{if(!this.acceptResourcesForRelationships)throw new Error("Invalid JSON data. Found a value that is not a string: "+r+" for relationship "+e);if(!r.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier: "+r+" for relationship "+e);const n=t.modelManager.getType(r.$class);let o=t.factory.newResource(n.getNamespace(),n.getName(),r[n.getIdentifierFieldName()]);t.jsonStack.push(r),t.resourceStack.push(o),n.accept(this,t),s=o}return s}}},3561:(e,t,r)=>{"use strict";const n=r(8487).NullUtil,o=r(1768),s=r(390),a=r(2438),i=r(3464),c=r(7657);i.extend(c);class l{constructor(e,t){if(this.options=t||{},this.concerto=e,!this.concerto)throw new Error("Missing concerto instance")}visit(e,t){return e.isEnum?.()?this.visitEnumDeclaration(e,t):e.isClassDeclaration?.()?this.visitClassDeclaration(e,t):e.isRelationship?.()?this.visitRelationshipDeclaration(e,t):e.isTypeScalar?.()?this.visitField(e.getScalarField(),t):e.isField?.()?this.visitField(e,t):void 0}visitEnumDeclaration(e,t){const r=t.stack.pop(),n=e.getProperties();let o=!1;for(let e=0;e<n.length;e++)n[e].getName()===r&&(o=!0);return o||l.reportInvalidEnumValue(t.rootResourceIdentifier,e,r),null}visitClassDeclaration(e,t){const r=t.stack.pop();this.concerto.isIdentifiable(r)&&(t.rootResourceIdentifier=this.concerto.getFullyQualifiedIdentifier(r));const o=this.concerto.getModelManager().getType(r.$class),s=o.getFullyQualifiedName();o.isAbstract()&&l.reportAbstractClass(o);let a=Object.getOwnPropertyNames(r);for(let e=0;e<a.length;e++){let n=a[e];this.isSystemProperty(n)||o.getProperty(n)||(this.concerto.isIdentifiable(r)?l.reportUndeclaredField(this.concerto.getIdentifier(r),n,s):l.reportUndeclaredField(t.currentIdentifier,n,s))}if(this.concerto.isIdentifiable(r)){const e=this.concerto.getIdentifier(r);e&&0!==e.trim().length||l.reportEmptyIdentifier(t.rootResourceIdentifier),t.currentIdentifier=this.concerto.getFullyQualifiedIdentifier(r)}const i=o.getProperties();for(let e=0;e<i.length;e++){const o=i[e],s=r[o.getName()];n.isNull(s)?o.isOptional()||this.isSystemProperty(o.getName())||l.reportMissingRequiredProperty(t.rootResourceIdentifier,o):(t.stack.push(s),o.accept(this,t))}return null}isSystemProperty(e){return"$"===e.charAt(0)}visitField(e,t){const r=t.stack.pop();let n=typeof r,o=e.getName();return"symbol"===n&&l.reportFieldTypeViolation(t.rootResourceIdentifier,o,r,e,this.concerto),e.isTypeEnum()?this.checkEnum(r,e,t):e.isArray()?this.checkArray(r,e,t):this.checkItem(r,e,t),null}checkEnum(e,t,r){!t.isArray()||e instanceof Array||l.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t,this.concerto);const n=t.getParent().getModelFile().getType(t.getType());if(t.isArray())for(let t=0;t<e.length;t++){const o=e[t];r.stack.push(o),n.accept(this,r)}else{const t=e;r.stack.push(t),n.accept(this,r)}}checkArray(e,t,r){e instanceof Array||l.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t,this.concerto);for(let n=0;n<e.length;n++){const o=e[n];this.checkItem(o,t,r)}}checkItem(e,t,r){let n=typeof e,s=t.getName();if("symbol"===n&&l.reportFieldTypeViolation(r.rootResourceIdentifier,s,e,t,this.concerto),t.isPrimitive()){let o=!1;switch(t.getType()){case"String":"string"!==n&&(o=!0);break;case"Double":case"Long":case"Integer":"number"!==n&&(o=!0);break;case"Boolean":"boolean"!==n&&(o=!0);break;case"DateTime":"string"==typeof e&&i.utc(e).isValid()||(o=!0)}o?l.reportFieldTypeViolation(r.rootResourceIdentifier,s,e,t,this.concerto):null!==t.getValidator()&&t.getValidator().validate(r.currentIdentifier,e)}else{let n=this.concerto.getModelManager().getType(t.getFullyQualifiedTypeName());try{n=this.concerto.getModelManager().getType(e.$class)}catch(n){l.reportFieldTypeViolation(r.rootResourceIdentifier,s,e,t,this.concerto)}o.isAssignableTo(n.getModelFile(),n.getFullyQualifiedName(),t)||l.reportInvalidFieldAssignment(r.rootResourceIdentifier,s,e,t),r.stack.push(e),n.accept(this,r)}}visitRelationshipDeclaration(e,t){const r=t.stack.pop();if(e.isArray()){r instanceof Array||l.reportInvalidFieldAssignment(t.rootResourceIdentifier,e.getName(),r,e);for(let n=0;n<r.length;n++){const o=r[n];this.checkRelationship(t,e,o)}}else this.checkRelationship(t,e,r);return null}checkRelationship(e,t,r){this.concerto.isRelationship(r)||this.concerto.isIdentifiable(r)&&(this.options.convertResourcesToRelationships||this.options.permitResourcesForRelationships)||l.reportNotRelationshipViolation(e.rootResourceIdentifier,t,r);const n=this.concerto.isRelationship(r)?this.concerto.fromURI(r).typeDeclaration:this.concerto.getTypeDeclaration(r);if(!n.getIdentifierFieldName())throw new Error("Relationship can only be to identified types.");o.isAssignableTo(n.getModelFile(),n.getFullyQualifiedName(),t)||l.reportInvalidFieldAssignment(e.rootResourceIdentifier,t.getName(),r,t)}static reportFieldTypeViolation(e,t,r,n,o){let i=n.isArray()?"[]":"",c=typeof r;if(o.isObject(r)&&o.isIdentifiable(r))c=o.getType(r),r=o.getIdentifier(r);else if(r)try{r=JSON.stringify(r)}catch(e){r=r.toString()}let l=a.messageFormatter("resourcevalidator-fieldtypeviolation");throw new s(l({resourceId:e,propertyName:t,fieldType:n.getType()+i,value:r,typeOfValue:c}))}static reportNotRelationshipViolation(e,t,r){let n=a.messageFormatter("resourcevalidator-notrelationship");throw new s(n({resourceId:e,classFQN:t.getFullyQualifiedTypeName(),invalidValue:r.toString()}))}static reportMissingRequiredProperty(e,t){let r=a.messageFormatter("resourcevalidator-missingrequiredproperty");throw new s(r({resourceId:e,fieldName:t.getName()}))}static reportEmptyIdentifier(e){let t=a.messageFormatter("resourcevalidator-emptyidentifier");throw new s(t({resourceId:e}))}static reportInvalidEnumValue(e,t,r){let n=a.messageFormatter("resourcevalidator-invalidenumvalue");throw new s(n({resourceId:e,value:r,fieldName:t.getName()}))}static reportAbstractClass(e){let t=a.messageFormatter("resourcevalidator-abstractclass");throw new s(t({className:e.getFullyQualifiedName()}))}static reportUndeclaredField(e,t,r){let n=a.messageFormatter("resourcevalidator-undeclaredfield");throw new s(n({resourceId:e,propertyName:t,fullyQualifiedTypeName:r}))}static reportInvalidFieldAssignment(e,t,r,n){let o=a.messageFormatter("resourcevalidator-invalidfieldassignment"),i=n.getFullyQualifiedTypeName();throw n.isArray()&&(i+="[]"),new s(o({resourceId:e,propertyName:t,objectType:r.$class,fieldType:i}))}}e.exports=l},2552:(e,t,r)=>{"use strict";const n=r(6113),o=r(7755),s=r(9259),a=r(8487).NullUtil,i=r(1768),c=r(390),l=r(2438),u=r(3464),p=r(7657);u.extend(p);class d{constructor(e){this.options=e||{}}visit(e,t){return e.isEnum?.()?this.visitEnumDeclaration(e,t):e.isClassDeclaration?.()?this.visitClassDeclaration(e,t):e.isMapDeclaration?.()?this.visitMapDeclaration(e,t):e.isRelationship?.()?this.visitRelationshipDeclaration(e,t):e.isTypeScalar?.()?this.visitField(e.getScalarField(),t):e.isField?.()?this.visitField(e,t):void 0}visitEnumDeclaration(e,t){const r=t.stack.pop(),n=e.getProperties();let o=!1;for(let e=0;e<n.length;e++)n[e].getName()===r&&(o=!0);return o||d.reportInvalidEnumValue(t.rootResourceIdentifier,e,r),null}checkMapType(e,t,r,n){if(i.isPrimitiveType(e.getType()))e=e.getType();else{let o=n.getModelFile().getAllDeclarations().find((t=>t.name===e.getType()));if(i.isScalar(n.getKey())&&(e=o.getType()),o?.isClassDeclaration?.())return r.stack.push(t),void o.accept(this,r)}switch(e){case"String":if("string"!=typeof t)throw new Error(`Model violation in ${n.getFullyQualifiedName()}. Expected Type of String but found '${t}' instead.`);break;case"DateTime":if(!u.utc(t).isValid())throw new Error(`Model violation in ${n.getFullyQualifiedName()}. Expected Type of DateTime but found '${t}' instead.`);break;case"Boolean":if("boolean"!=typeof t){const e=typeof t;throw new Error(`Model violation in ${n.getFullyQualifiedName()}. Expected Type of Boolean but found ${e} instead, for value '${t}'.`)}}}visitMapDeclaration(e,t){const r=t.stack.pop();if(!(r instanceof Map))throw new Error("Expected a Map, but found "+JSON.stringify(r));return r.forEach(((r,n)=>{i.isSystemProperty(n)||(this.checkMapType(e.getKey(),n,t,e),this.checkMapType(e.getValue(),r,t,e))})),null}visitClassDeclaration(e,t){const r=t.stack.pop();r instanceof o||d.reportNotResouceViolation(t.rootResourceIdentifier,e,r),r instanceof s&&(t.rootResourceIdentifier=r.getFullyQualifiedIdentifier());const n=t.modelManager.getType(r.getFullyQualifiedType()),c=n.getFullyQualifiedName(),l=n.getIdentifierFieldName();n.isAbstract()&&d.reportAbstractClass(n);let u=Object.getOwnPropertyNames(r);for(let o=0;o<u.length;o++){let s=u[o];i.isSystemProperty(s)||n.getProperty(s)||(e.isIdentified()&&"$identifier"!==s?d.reportUndeclaredField(r.getIdentifier(),s,c):d.reportUndeclaredField(t.currentIdentifier,s,c))}if(e.isIdentified()){const e=r.getIdentifier();e&&0!==e.trim().length||d.reportEmptyIdentifier(t.rootResourceIdentifier),"$identifier"!==l&&(r.$identifier=e),t.currentIdentifier=r.getFullyQualifiedIdentifier()}const p=n.getProperties();for(let e=0;e<p.length;e++){const n=p[e],o=r[n.getName()];if(a.isNull(o)){if(!n.isOptional()){if("$identifier"===n.getName()&&"$identifier"!==l)continue;if(!a.isNull(n?.defaultValue))continue;d.reportMissingRequiredProperty(t.rootResourceIdentifier,n)}}else t.stack.push(o),n.accept(this,t)}return null}visitField(e,t){const r=t.stack.pop();let n=typeof r,o=e.getName();return"undefined"!==n&&"symbol"!==n||d.reportFieldTypeViolation(t.rootResourceIdentifier,o,r,e),e.isTypeEnum()?this.checkEnum(r,e,t):e.isArray()?this.checkArray(r,e,t):this.checkItem(r,e,t),null}checkEnum(e,t,r){!t.isArray()||e instanceof Array||d.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t);const n=t.getParent().getModelFile().getType(t.getType());if(t.isArray())for(let t=0;t<e.length;t++){const o=e[t];r.stack.push(o),n.accept(this,r)}else{const t=e;r.stack.push(t),n.accept(this,r)}}checkArray(e,t,r){e instanceof Array||d.reportFieldTypeViolation(r.rootResourceIdentifier,t.getName(),e,t);for(let n=0;n<e.length;n++){const o=e[n];this.checkItem(o,t,r)}}checkItem(e,t,r){let n=typeof e,o=t.getName();if("undefined"!==n&&"symbol"!==n||d.reportFieldTypeViolation(r.rootResourceIdentifier,o,e,t),t.isPrimitive()){let s=!1;switch(t.getType()){case"String":"string"!==n&&(s=!0);break;case"Long":case"Integer":case"Double":"number"!==n&&(s=!0),isFinite(e)||(s=!0);break;case"Boolean":"boolean"!==n&&(s=!0);break;case"DateTime":"object"==typeof e&&"function"==typeof e.isBefore||(s=!0)}s?d.reportFieldTypeViolation(r.rootResourceIdentifier,o,e,t):null!==t.getValidator()&&t.getValidator().validate(r.currentIdentifier,e)}else{let n=r.modelManager.getType(t.getFullyQualifiedTypeName());if(e instanceof s){try{n=r.modelManager.getType(e.getFullyQualifiedType())}catch(n){d.reportFieldTypeViolation(r.rootResourceIdentifier,o,e,t)}i.isAssignableTo(n.getModelFile(),n.getFullyQualifiedName(),t)||d.reportInvalidFieldAssignment(r.rootResourceIdentifier,o,e,t)}r.stack.push(e),n.accept(this,r)}}visitRelationshipDeclaration(e,t){const r=t.stack.pop();if(e.isArray()){r instanceof Array||d.reportInvalidFieldAssignment(t.rootResourceIdentifier,e.getName(),r,e);for(let n=0;n<r.length;n++){const o=r[n];this.checkRelationship(t,e,o)}}else this.checkRelationship(t,e,r);return null}checkRelationship(e,t,r){r instanceof n||r instanceof o&&(this.options.convertResourcesToRelationships||this.options.permitResourcesForRelationships)||d.reportNotRelationshipViolation(e.rootResourceIdentifier,t,r);const s=e.modelManager.getType(r.getFullyQualifiedType());if(!s.getIdentifierFieldName())throw new Error("Cannot have a relationship to a field that is not identifiable.");i.isAssignableTo(s.getModelFile(),r.getFullyQualifiedType(),t)||d.reportInvalidFieldAssignment(e.rootResourceIdentifier,t.getName(),r,t)}static reportFieldTypeViolation(e,t,r,n){let o=n.isArray()?"[]":"",a=typeof r;if(r instanceof s)a=r.getFullyQualifiedType(),r=r.getFullyQualifiedIdentifier();else if(r)try{r="number"!=typeof r||isFinite(r)?JSON.stringify(r):r.toString()}catch(e){r=r.toString()}let i=l.messageFormatter("resourcevalidator-fieldtypeviolation");throw new c(i({resourceId:e,propertyName:t,fieldType:n.getType()+o,value:r,typeOfValue:a}))}static reportNotResouceViolation(e,t,r){let n=l.messageFormatter("resourcevalidator-notresourceorconcept");throw new c(n({resourceId:e,classFQN:t.getFullyQualifiedName(),invalidValue:r.toString()}))}static reportNotRelationshipViolation(e,t,r){let n=l.messageFormatter("resourcevalidator-notrelationship");throw new c(n({resourceId:e,classFQN:t.getFullyQualifiedTypeName(),invalidValue:r.toString()}))}static reportMissingRequiredProperty(e,t){let r=l.messageFormatter("resourcevalidator-missingrequiredproperty");throw new c(r({resourceId:e,fieldName:t.getName()}))}static reportEmptyIdentifier(e){let t=l.messageFormatter("resourcevalidator-emptyidentifier");throw new c(t({resourceId:e}))}static reportInvalidEnumValue(e,t,r){let n=l.messageFormatter("resourcevalidator-invalidenumvalue");throw new c(n({resourceId:e,value:r,fieldName:t.getName()}))}static reportAbstractClass(e){let t=l.messageFormatter("resourcevalidator-abstractclass");throw new c(t({className:e.getFullyQualifiedName()}))}static reportUndeclaredField(e,t,r){let n=l.messageFormatter("resourcevalidator-undeclaredfield");throw new c(n({resourceId:e,propertyName:t,fullyQualifiedTypeName:r}))}static reportInvalidFieldAssignment(e,t,r,n){let o=l.messageFormatter("resourcevalidator-invalidfieldassignment"),s=n.getFullyQualifiedTypeName();throw n.isArray()&&(s+="[]"),new c(o({resourceId:e,propertyName:t,objectType:r.getFullyQualifiedType(),fieldType:s}))}}e.exports=d},390:(e,t,r)=>{"use strict";const n=r(8487).BaseException;e.exports=class extends n{constructor(e,t){super(e,t)}}},7854:(e,t,r)=>{"use strict";const{loremIpsum:n}=r(7405),o=r(3174),s=r(3464),a=r(7657);s.extend(a);const i=function(e,t,r,n,o){return null===e&&(e=n),e=Math.min(Math.max(e,n),o),(null===t||t>o)&&(t=o),t=Math.max(Math.min(t,o),n),t+=r,t/=r,e/=r,(Math.random()*(t-e)+e)/(1/r)},c=(e,t,r)=>{let n=e,o=t;switch(null!==o&&null!==n&&o<n&&(n=t,o=e),r){case"Long":return Math.floor(i(n,o,1,-Math.pow(2,32),Math.pow(2,32)));case"Integer":return Math.floor(i(n,o,1,-Math.pow(2,16),Math.pow(2,16)));case"Double":return Number(i(n,o,1e-4,-Math.pow(2,8),Math.pow(2,8)).toFixed(3));default:return 0}},l=(e,t,r,n)=>{t??=0,r??=null;const o=c(t,r,"Integer");for(;e.length<o;)e+=n();return e.substring(0,o)},u=(e,t)=>{let r=n({count:1,units:"sentences",sentenceLowerBound:1,sentenceUpperBound:5});return(e||t)&&(r=l(r,e,t,(()=>n({count:1,units:"sentences",sentenceLowerBound:1,sentenceUpperBound:5})))),r},p=(e,t,r)=>{if(!e)return"";const n=new o(e.source,e.flags);let s=n.gen();return(t||r)&&(s=l(s,t,r,(()=>n.gen()))),s};class d{constructor(){this.currentDate=s.utc()}getDateTime(){return this.currentDate}getInteger(){return 0}getLong(){return 0}getDouble(){return 0}getBoolean(){return!1}getString(e,t){return e||t?u(e,t):""}getEnum(e){return e[0]}getMap(){return new Map}getArray(e){return[]}getRegex(e,t,r){return p(e,t,r)}getRange(e,t,r){return c(e,t,r)}}class f extends d{constructor(){super()}getInteger(){return Math.round(Math.random()*Math.pow(2,16))}getLong(){return Math.round(Math.random()*Math.pow(2,32))}getDouble(){return Number((Math.random()*Math.pow(2,8)).toFixed(3))}getBoolean(){return 1===Math.round(Math.random())}getString(e,t){return u(e,t)}getEnum(e){return e[Math.floor(Math.random()*e.length)]}getMap(){return new Map([[this.getString(1,10),this.getString(1,10)]])}getArray(e){return[e()]}getRegex(e,t,r){return p(e,t,r)}getRange(e,t,r){return c(e,t,r)}}e.exports=class{static empty(){return new d}static sample(){return new f}}},5477:(e,t,r)=>{"use strict";const{BaseException:n,ErrorCodes:o}=r(8487),s=r(2438);e.exports=class extends n{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.TYPE_NOT_FOUND_EXCEPTION;t||(t=s.messageFormatter("typenotfounderror-defaultmessage")({typeName:e})),super(t,r,n),this.typeName=e}getTypeName(){return this.typeName}}},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=i(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=i(e),a=s[0],c=s[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),u=0,p=c>0?a-4:a;for(r=0;r<p;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,s=[],a=16383,i=0,l=n-o;i<l;i+=a)s.push(c(e,i,i+a>l?l:i+a));return 1===o?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var o,s,a=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),a.push(r[(s=o)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1048:(e,t,r)=>{"use strict";const n=r(7991),o=r(9318),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const a=2147483647;function i(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=i(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?i(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return u(e),i(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),r=i(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(o)return n?-1:z(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return D(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){let s,a=1,i=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,i/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(s=r;s<i;s++)if(l(e,s)===l(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===c)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(r+c>i&&(r=i-c),s=r;s>=0;s--){let r=!0;for(let n=0;n<c;n++)if(l(e,s+n)!==l(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Y(n))return a;e[r+a]=n}return a}function A(e,t,r,n){return H(z(t,e.length-r),e,r,n)}function $(e,t,r,n){return H(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return H(W(t),e,r,n)}function T(e,t,r,n){return H(function(e,t){let r,n,o;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function D(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,i,c;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(s=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=e[o+1],n=e[o+2],i=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&i)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&i,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=a}return function(e){const t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=F));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(G(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?D(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const i=Math.min(s,a),l=this.slice(n,o),u=e.slice(t,r);for(let e=0;e<i;++e)if(l[e]!==u[e]){s=l[e],a=u[e];break}return s<a?-1:a<s?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return $(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const F=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function S(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function N(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=J[e[n]];return o}function O(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,o,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function k(e,t,r,n,o){U(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function P(e,t,r,n,o){U(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function L(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=c.isBuffer(e)?e:c.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};const B={};function j(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,n,o,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,o,s)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=V(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=V(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function z(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},3464:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,r="millisecond",n="second",o="minute",s="hour",a="day",i="week",c="month",l="quarter",u="year",p="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,c),s=r-o<0,a=t.clone().add(n+(s?-1:1),c);return+(-(n+(r-o)/(s?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:i,d:a,D:p,h:s,m:o,s:n,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",b={};b[v]=m;var w="$isDayjsObject",A=function(e){return e instanceof C||!(!e||!e[w])},$=function e(t,r,n){var o;if(!t)return v;if("string"==typeof t){var s=t.toLowerCase();b[s]&&(o=s),r&&(b[s]=r,o=s);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var i=t.name;b[i]=t,o=i}return!n&&o&&(v=o),o||!n&&v},E=function(e,t){if(A(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new C(r)},T=y;T.l=$,T.i=A,T.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=$(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(f);if(n){var o=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return T},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,r){return T.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,l=!!T.u(t)||t,d=T.p(e),f=function(e,t){var n=T.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return l?n:n.endOf(a)},h=function(e,t){return T.w(r.toDate()[e].apply(r.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case u:return l?f(1,0):f(31,11);case c:return l?f(1,g):f(0,g+1);case i:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(l?y-w:y+(6-w),g);case a:case p:return h(v+"Hours",0);case s:return h(v+"Minutes",1);case o:return h(v+"Seconds",2);case n:return h(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var i,l=T.p(e),d="set"+(this.$u?"UTC":""),f=(i={},i[a]=d+"Date",i[p]=d+"Date",i[c]=d+"Month",i[u]=d+"FullYear",i[s]=d+"Hours",i[o]=d+"Minutes",i[n]=d+"Seconds",i[r]=d+"Milliseconds",i)[l],h=l===a?this.$D+(t-this.$W):t;if(l===c||l===u){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[T.p(e)]()},g.add=function(r,l){var p,d=this;r=Number(r);var f=T.p(l),h=function(e){var t=E(d);return T.w(t.date(t.date()+Math.round(e*r)),d)};if(f===c)return this.set(c,this.$M+r);if(f===u)return this.set(u,this.$y+r);if(f===a)return h(1);if(f===i)return h(7);var m=(p={},p[o]=e,p[s]=t,p[n]=1e3,p)[f]||1,g=this.$d.getTime()+r*m;return T.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=T.z(this),s=this.$H,a=this.$m,i=this.$M,c=r.weekdays,l=r.months,u=r.meridiem,p=function(e,r,o,s){return e&&(e[r]||e(t,n))||o[r].slice(0,s)},f=function(e){return T.s(s%12||12,e,"0")},m=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(h,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return T.s(t.$y,4,"0");case"M":return i+1;case"MM":return T.s(i+1,2,"0");case"MMM":return p(r.monthsShort,i,l,3);case"MMMM":return p(l,i);case"D":return t.$D;case"DD":return T.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,c,2);case"ddd":return p(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(s);case"HH":return T.s(s,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(s,a,!0);case"A":return m(s,a,!1);case"m":return String(a);case"mm":return T.s(a,2,"0");case"s":return String(t.$s);case"ss":return T.s(t.$s,2,"0");case"SSS":return T.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,d){var f,h=this,m=T.p(p),g=E(r),y=(g.utcOffset()-this.utcOffset())*e,v=this-g,b=function(){return T.m(h,g)};switch(m){case u:f=b()/12;break;case c:f=b();break;case l:f=b()/3;break;case i:f=(v-y)/6048e5;break;case a:f=(v-y)/864e5;break;case s:f=v/t;break;case o:f=v/e;break;case n:f=v/1e3;break;default:f=v}return d?f:T.a(f)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=$(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return T.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),D=C.prototype;return E.prototype=D,[["$ms",r],["$s",n],["$m",o],["$H",s],["$W",a],["$M",c],["$y",u],["$D",p]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,C,E),e.$i=!0),E},E.locale=$,E.isDayjs=A,E.unix=function(e){return E(1e3*e)},E.en=b[v],E.Ls=b,E.p={},E}()},279:function(e){e.exports=function(){"use strict";var e,t,r=1e3,n=6e4,o=36e5,s=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,i=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:i,months:c,days:s,hours:o,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},p=function(e){return e instanceof v},d=function(e,t,r){return new v(e,r,t.$l)},f=function(e){return t.p(e)+"s"},h=function(e){return e<0},m=function(e){return h(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},y=function(e,t){return e?h(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},v=function(){function h(e,t,r){var n=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){n.$d[f(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var o=e.match(l);if(o){var s=o.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=s[0],this.$d.months=s[1],this.$d.weeks=s[2],this.$d.days=s[3],this.$d.hours=s[4],this.$d.minutes=s[5],this.$d.seconds=s[6],this.calMilliseconds(),this}}return this}var g=h.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,r){return t+(e.$d[r]||0)*u[r]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/i),e%=i,this.$d.months=m(e/c),e%=c,this.$d.days=m(e/s),e%=s,this.$d.hours=m(e/o),e%=o,this.$d.minutes=m(e/n),e%=n,this.$d.seconds=m(e/r),e%=r,this.$d.milliseconds=e},g.toISOString=function(){var e=y(this.$d.years,"Y"),t=y(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=y(r,"D"),o=y(this.$d.hours,"H"),s=y(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var i=y(a,"S"),c=e.negative||t.negative||n.negative||o.negative||s.negative||i.negative,l=o.format||s.format||i.format?"T":"",u=(c?"-":"")+"P"+e.format+t.format+n.format+l+o.format+s.format+i.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var r=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return r.replace(a,(function(e,t){return t||String(n[e])}))},g.as=function(e){return this.$ms/u[f(e)]},g.get=function(e){var t=this.$ms,r=f(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?m(t/u[r]):this.$d[r],t||0},g.add=function(e,t,r){var n;return n=t?e*u[f(t)]:p(e)?e.$ms:d(e,this).$ms,d(this.$ms+n*(r?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return d(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},h}(),b=function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")};return function(r,n,o){e=o,t=o().$utils(),o.duration=function(e,t){var r=o.locale();return d(e,{$l:r},t)},o.isDuration=p;var s=n.prototype.add,a=n.prototype.subtract;n.prototype.add=function(e,t){return p(e)?b(this,e,1):s.bind(this)(e,t)},n.prototype.subtract=function(e,t){return p(e)?b(this,e,-1):a.bind(this)(e,t)}}}()},3221:function(e){e.exports=function(){"use strict";return function(e,t,r){var n=function(e,t){if(!t||!t.length||1===t.length&&!t[0]||1===t.length&&Array.isArray(t[0])&&!t[0].length)return null;var r;1===t.length&&t[0].length>0&&(t=t[0]),r=(t=t.filter((function(e){return e})))[0];for(var n=1;n<t.length;n+=1)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r};r.max=function(){var e=[].slice.call(arguments,0);return n("isAfter",e)},r.min=function(){var e=[].slice.call(arguments,0);return n("isBefore",e)}}}()},4491:function(e){e.exports=function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var s=o.add;o.add=function(r,n){return r=Number(r),this.$utils().p(n)===t?this.add(3*r,e):s.bind(this)(r,n)};var a=o.startOf;o.startOf=function(r,n){var o=this.$utils(),s=!!o.u(n)||n;if(o.p(r)===t){var i=this.quarter()-1;return s?this.month(3*i).startOf(e).startOf("day"):this.month(3*i+2).endOf(e).endOf("day")}return a.bind(this)(r,n)}}}()},7657:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,s){var a=o.prototype;s.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var r=s(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var i=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),i.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(n,o){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?l.call(this):this.$offset;if("string"==typeof n&&(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],s=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===s?a:-a}(n),null===n))return this;var a=Math.abs(n)<=16?60*n:n,i=this;if(o)return i.$offset=a,i.$u=0===n,i;if(0!==n){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(i=this.local().add(a+c,e)).$offset=a,i.$x.$localOffset=c}else i=this.utc();return i};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var d=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return d.call(this,e,t,r);var n=this.local(),o=s(e).local();return d.call(n,o,t,r)}}}()},8143:e=>{"use strict";class t{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.high<e.low||this.low>e.high)}touches(e){return!(this.high+1<e.low||this.low-1>e.high)}add(e){return new t(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.high<this.high?[new t(this.low,e.low-1),new t(e.high+1,this.high)]:e.low<=this.low?[new t(e.high+1,this.high)]:[new t(this.low,e.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}}class r{constructor(e,t){this.ranges=[],this.length=0,null!=e&&this.add(e,t)}_update_length(){this.length=this.ranges.reduce(((e,t)=>e+t.length),0)}add(e,n){var o=e=>{for(var t=0;t<this.ranges.length&&!e.touches(this.ranges[t]);)t++;for(var r=this.ranges.slice(0,t);t<this.ranges.length&&e.touches(this.ranges[t]);)e=e.add(this.ranges[t]),t++;r.push(e),this.ranges=r.concat(this.ranges.slice(t)),this._update_length()};return e instanceof r?e.ranges.forEach(o):(null==n&&(n=e),o(new t(e,n))),this}subtract(e,n){var o=e=>{for(var t=0;t<this.ranges.length&&!e.overlaps(this.ranges[t]);)t++;for(var r=this.ranges.slice(0,t);t<this.ranges.length&&e.overlaps(this.ranges[t]);)r=r.concat(this.ranges[t].subtract(e)),t++;this.ranges=r.concat(this.ranges.slice(t)),this._update_length()};return e instanceof r?e.ranges.forEach(o):(null==n&&(n=e),o(new t(e,n))),this}intersect(e,n){var o=[],s=e=>{for(var r=0;r<this.ranges.length&&!e.overlaps(this.ranges[r]);)r++;for(;r<this.ranges.length&&e.overlaps(this.ranges[r]);){var n=Math.max(this.ranges[r].low,e.low),s=Math.min(this.ranges[r].high,e.high);o.push(new t(n,s)),r++}};return e instanceof r?e.ranges.forEach(s):(null==n&&(n=e),s(new t(e,n))),this.ranges=o,this._update_length(),this}index(e){for(var t=0;t<this.ranges.length&&this.ranges[t].length<=e;)e-=this.ranges[t].length,t++;return this.ranges[t].low+e}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new r(this)}numbers(){return this.ranges.reduce(((e,t)=>{for(var r=t.low;r<=t.high;)e.push(r),r++;return e}),[])}subranges(){return this.ranges.map((e=>({low:e.low,high:e.high,length:1+e.high-e.low})))}}e.exports=r},9318:(e,t)=>{t.read=function(e,t,r,n,o){var s,a,i=8*o-n-1,c=(1<<i)-1,l=c>>1,u=-7,p=r?o-1:0,d=r?-1:1,f=e[t+p];for(p+=d,s=f&(1<<-u)-1,f>>=-u,u+=i;u>0;s=256*s+e[t+p],p+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=n;u>0;a=256*a+e[t+p],p+=d,u-=8);if(0===s)s=1-l;else{if(s===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,o,s){var a,i,c,l=8*s-o-1,u=(1<<l)-1,p=u>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(a++,c/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(t*c-1)*Math.pow(2,o),a+=p):(i=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[r+f]=255&i,f+=h,i/=256,o-=8);for(a=a<<o|i,l+=o;l>0;e[r+f]=255&a,f+=h,a/=256,l-=8);e[r+f-h]|=128*m}},8575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FORMAT_PLAIN=t.FORMAT_HTML=t.FORMATS=void 0;var r="html";t.FORMAT_HTML=r;var n="plain";t.FORMAT_PLAIN=n;var o=[r,n];t.FORMATS=o},4801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LINE_ENDINGS=void 0,t.LINE_ENDINGS={POSIX:"\n",WIN32:"\r\n"}},3647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_PLATFORMS=void 0,t.SUPPORTED_PLATFORMS={DARWIN:"darwin",LINUX:"linux",WIN32:"win32"}},9148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNIT_WORDS=t.UNIT_WORD=t.UNIT_SENTENCES=t.UNIT_SENTENCE=t.UNIT_PARAGRAPHS=t.UNIT_PARAGRAPH=t.UNITS=void 0;var r="words";t.UNIT_WORDS=r;var n="word";t.UNIT_WORD=n;var o="sentences";t.UNIT_SENTENCES=o;var s="sentence";t.UNIT_SENTENCE=s;var a="paragraphs";t.UNIT_PARAGRAPHS=a;var i="paragraph";t.UNIT_PARAGRAPH=i;var c=[r,n,o,s,a,i];t.UNITS=c},938:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WORDS=void 0,t.WORDS=["ad","adipisicing","aliqua","aliquip","amet","anim","aute","cillum","commodo","consectetur","consequat","culpa","cupidatat","deserunt","do","dolor","dolore","duis","ea","eiusmod","elit","enim","esse","est","et","eu","ex","excepteur","exercitation","fugiat","id","in","incididunt","ipsum","irure","labore","laboris","laborum","Lorem","magna","minim","mollit","nisi","non","nostrud","nulla","occaecat","officia","pariatur","proident","qui","quis","reprehenderit","sint","sit","sunt","tempor","ullamco","ut","velit","veniam","voluptate"]},7405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoremIpsum",{enumerable:!0,get:function(){return i.default}}),t.loremIpsum=void 0;var n,o=r(8575),s=r(9148),a=r(938),i=(n=r(2508))&&n.__esModule?n:{default:n};t.loremIpsum=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.count,r=void 0===t?1:t,n=e.format,c=void 0===n?o.FORMAT_PLAIN:n,l=e.paragraphLowerBound,u=void 0===l?3:l,p=e.paragraphUpperBound,d=void 0===p?7:p,f=e.random,h=e.sentenceLowerBound,m=void 0===h?5:h,g=e.sentenceUpperBound,y=void 0===g?15:g,v=e.units,b=void 0===v?s.UNIT_SENTENCES:v,w=e.words,A=void 0===w?a.WORDS:w,$=e.suffix,E=void 0===$?"":$,T={random:f,sentencesPerParagraph:{max:d,min:u},words:A,wordsPerSentence:{max:y,min:m}},C=new i.default(T,c,E);switch(b){case s.UNIT_PARAGRAPHS:case s.UNIT_PARAGRAPH:return C.generateParagraphs(r);case s.UNIT_SENTENCES:case s.UNIT_SENTENCE:return C.generateSentences(r);case s.UNIT_WORDS:case s.UNIT_WORD:return C.generateWords(r);default:return""}}},2508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=r(8575),s=r(4801),a=(n=r(9888))&&n.__esModule?n:{default:n},i=r(3798);function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.FORMAT_PLAIN,n=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.format=r,this.suffix=n,function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"generator",void 0),-1===o.FORMATS.indexOf(r.toLowerCase()))throw new Error("".concat(r," is an invalid format. Please use ").concat(o.FORMATS.join(" or "),"."));this.generator=new a.default(t)}var t,r;return t=e,(r=[{key:"getLineEnding",value:function(){return this.suffix?this.suffix:!(0,i.isReactNative)()&&(0,i.isNode)()&&(0,i.isWindows)()?s.LINE_ENDINGS.WIN32:s.LINE_ENDINGS.POSIX}},{key:"formatString",value:function(e){return this.format===o.FORMAT_HTML?"<p>".concat(e,"</p>"):e}},{key:"formatStrings",value:function(e){var t=this;return e.map((function(e){return t.formatString(e)}))}},{key:"generateWords",value:function(e){return this.formatString(this.generator.generateRandomWords(e))}},{key:"generateSentences",value:function(e){return this.formatString(this.generator.generateRandomParagraph(e))}},{key:"generateParagraphs",value:function(e){var t=this.generator.generateRandomParagraph.bind(this.generator);return this.formatStrings((0,i.makeArrayOfStrings)(e,t)).join(this.getLineEnding())}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=l;t.default=u},9888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(938),o=r(3798);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.sentencesPerParagraph,o=void 0===r?{max:7,min:3}:r,s=t.wordsPerSentence,i=void 0===s?{max:15,min:5}:s,c=t.random,l=(t.seed,t.words),u=void 0===l?n.WORDS:l;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"sentencesPerParagraph",void 0),a(this,"wordsPerSentence",void 0),a(this,"random",void 0),a(this,"words",void 0),o.min>o.max)throw new Error("Minimum number of sentences per paragraph (".concat(o.min,") cannot exceed maximum (").concat(o.max,")."));if(i.min>i.max)throw new Error("Minimum number of words per sentence (".concat(i.min,") cannot exceed maximum (").concat(i.max,")."));this.sentencesPerParagraph=o,this.words=u,this.wordsPerSentence=i,this.random=c||Math.random}var t,r;return t=e,(r=[{key:"generateRandomInteger",value:function(e,t){return Math.floor(this.random()*(t-e+1)+e)}},{key:"generateRandomWords",value:function(e){var t=this,r=this.wordsPerSentence,n=r.min,s=r.max,a=e||this.generateRandomInteger(n,s);return(0,o.makeArrayOfLength)(a).reduce((function(e,r){return"".concat(t.pluckRandomWord()," ").concat(e)}),"").trim()}},{key:"generateRandomSentence",value:function(e){return"".concat((0,o.capitalize)(this.generateRandomWords(e)),".")}},{key:"generateRandomParagraph",value:function(e){var t=this,r=this.sentencesPerParagraph,n=r.min,s=r.max,a=e||this.generateRandomInteger(n,s);return(0,o.makeArrayOfLength)(a).reduce((function(e,r){return"".concat(t.generateRandomSentence()," ").concat(e)}),"").trim()}},{key:"pluckRandomWord",value:function(){var e=this.words.length-1,t=this.generateRandomInteger(0,e);return this.words[t]}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},3670:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=e.trim();return t.charAt(0).toUpperCase()+t.slice(1)}},3798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"capitalize",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"isReactNative",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isWindows",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"makeArrayOfLength",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"makeArrayOfStrings",{enumerable:!0,get:function(){return c.default}});var n=l(r(3670)),o=l(r(2392)),s=l(r(458)),a=l(r(8855)),i=l(r(2556)),c=l(r(9480));function l(e){return e&&e.__esModule?e:{default:e}}},2392:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return!!e.exports}},458:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){var e=!1;try{e="ReactNative"===navigator.product}catch(t){e=!1}return e}},8855:(e,t,r)=>{"use strict";var n=r(9907);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(3647);t.default=function(){var e=!1;try{e=n.platform===o.SUPPORTED_PLATFORMS.WIN32}catch(t){e=!1}return e}},2556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Array.apply(null,Array(e)).map((function(e,t){return t}))}},9480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(2556))&&n.__esModule?n:{default:n};t.default=function(e,t){return(0,o.default)(e).map((function(){return t()}))}},7250:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,i){i=i||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var i=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return i.long?(c=e,(l=Math.abs(c))>=o?a(c,l,o,"day"):l>=n?a(c,l,n,"hour"):l>=r?a(c,l,r,"minute"):l>=t?a(c,l,t,"second"):c+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9907:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var i,c=[],l=!1,u=-1;function p(){l&&i&&(l=!1,i.length?c=i.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=c.length;t;){for(i=c,c=[];++u<t;)i&&i[u].run();u=-1,t=c.length}i=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3174:(e,t,r)=>{const n=r(1309),o=r(8143),s=n.types;e.exports=class e{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else{if("string"!=typeof e)throw new Error("Expected a regexp or string");this.ignoreCase=t&&-1!==t.indexOf("i"),this.multiline=t&&-1!==t.indexOf("m")}this.tokens=n(e)}_setDefaults(t){this.max=null!=t.max?t.max:null!=e.prototype.max?e.prototype.max:100,this.defaultRange=t.defaultRange?t.defaultRange:this.defaultRange.clone(),t.randInt&&(this.randInt=t.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var r,n,o,a,i;switch(e.type){case s.ROOT:case s.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&void 0===e.groupNumber&&(e.groupNumber=t.push(null)-1),n="",a=0,i=(r=e.options?this._randSelect(e.options):e.stack).length;a<i;a++)n+=this._gen(r[a],t);return e.remember&&(t[e.groupNumber]=n),n;case s.POSITION:return"";case s.SET:var c=this._expand(e);return c.length?String.fromCharCode(this._randSelect(c)):"";case s.REPETITION:for(o=this.randInt(e.min,e.max===1/0?e.min+this.max:e.max),n="",a=0;a<o;a++)n+=this._gen(e.value,t);return n;case s.REFERENCE:return t[e.value-1]||"";case s.CHAR:var l=this.ignoreCase&&this._randBool()?this._toOtherCase(e.value):e.value;return String.fromCharCode(l)}}_toOtherCase(e){return e+(97<=e&&e<=122?-32:65<=e&&e<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(e){return e instanceof o?e.index(this.randInt(0,e.length-1)):e[this.randInt(0,e.length-1)]}_expand(e){if(e.type===n.types.CHAR)return new o(e.value);if(e.type===n.types.RANGE)return new o(e.from,e.to);{let t=new o;for(let r=0;r<e.set.length;r++){let n=this._expand(e.set[r]);if(t.add(n),this.ignoreCase)for(let e=0;e<n.length;e++){let r=n.index(e),o=this._toOtherCase(r);r!==o&&t.add(o)}}return e.not?this.defaultRange.clone().subtract(t):this.defaultRange.clone().intersect(t)}}randInt(e,t){return e+Math.floor(Math.random()*(1+t-e))}get defaultRange(){return this._range=this._range||new o(32,126)}set defaultRange(e){this._range=e}static randexp(t,r){var n;return"string"==typeof t&&(t=new RegExp(t,r)),void 0===t._randexp?(n=new e(t,r),t._randexp=n):(n=t._randexp)._setDefaults(t),n.gen()}static sugar(){RegExp.prototype.gen=function(){return e.randexp(this)}}}},1309:(e,t,r)=>{const n=r(4045),o=r(8020),s=r(7732),a=r(5097);e.exports=e=>{var t,r,i=0,c={type:o.ROOT,stack:[]},l=c,u=c.stack,p=[],d=t=>{n.error(e,"Nothing to repeat at column "+(t-1))},f=n.strToChars(e);for(t=f.length;i<t;)switch(r=f[i++]){case"\\":switch(r=f[i++]){case"b":u.push(a.wordBoundary());break;case"B":u.push(a.nonWordBoundary());break;case"w":u.push(s.words());break;case"W":u.push(s.notWords());break;case"d":u.push(s.ints());break;case"D":u.push(s.notInts());break;case"s":u.push(s.whitespace());break;case"S":u.push(s.notWhitespace());break;default:/\d/.test(r)?u.push({type:o.REFERENCE,value:parseInt(r,10)}):u.push({type:o.CHAR,value:r.charCodeAt(0)})}break;case"^":u.push(a.begin());break;case"$":u.push(a.end());break;case"[":var h;"^"===f[i]?(h=!0,i++):h=!1;var m=n.tokenizeClass(f.slice(i),e);i+=m[1],u.push({type:o.SET,set:m[0],not:h});break;case".":u.push(s.anyChar());break;case"(":var g={type:o.GROUP,stack:[],remember:!0};"?"===(r=f[i])&&(r=f[i+1],i+=2,"="===r?g.followedBy=!0:"!"===r?g.notFollowedBy=!0:":"!==r&&n.error(e,`Invalid group, character '${r}' after '?' at column `+(i-1)),g.remember=!1),u.push(g),p.push(l),l=g,u=g.stack;break;case")":0===p.length&&n.error(e,"Unmatched ) at column "+(i-1)),u=(l=p.pop()).options?l.options[l.options.length-1]:l.stack;break;case"|":l.options||(l.options=[l.stack],delete l.stack);var y=[];l.options.push(y),u=y;break;case"{":var v,b,w=/^(\d+)(,(\d+)?)?\}/.exec(f.slice(i));null!==w?(0===u.length&&d(i),v=parseInt(w[1],10),b=w[2]?w[3]?parseInt(w[3],10):1/0:v,i+=w[0].length,u.push({type:o.REPETITION,min:v,max:b,value:u.pop()})):u.push({type:o.CHAR,value:123});break;case"?":0===u.length&&d(i),u.push({type:o.REPETITION,min:0,max:1,value:u.pop()});break;case"+":0===u.length&&d(i),u.push({type:o.REPETITION,min:1,max:1/0,value:u.pop()});break;case"*":0===u.length&&d(i),u.push({type:o.REPETITION,min:0,max:1/0,value:u.pop()});break;default:u.push({type:o.CHAR,value:r.charCodeAt(0)})}return 0!==p.length&&n.error(e,"Unterminated group"),c},e.exports.types=o},5097:(e,t,r)=>{const n=r(8020);t.wordBoundary=()=>({type:n.POSITION,value:"b"}),t.nonWordBoundary=()=>({type:n.POSITION,value:"B"}),t.begin=()=>({type:n.POSITION,value:"^"}),t.end=()=>({type:n.POSITION,value:"$"})},7732:(e,t,r)=>{const n=r(8020),o=()=>[{type:n.RANGE,from:48,to:57}],s=()=>[{type:n.CHAR,value:95},{type:n.RANGE,from:97,to:122},{type:n.RANGE,from:65,to:90}].concat(o()),a=()=>[{type:n.CHAR,value:9},{type:n.CHAR,value:10},{type:n.CHAR,value:11},{type:n.CHAR,value:12},{type:n.CHAR,value:13},{type:n.CHAR,value:32},{type:n.CHAR,value:160},{type:n.CHAR,value:5760},{type:n.RANGE,from:8192,to:8202},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233},{type:n.CHAR,value:8239},{type:n.CHAR,value:8287},{type:n.CHAR,value:12288},{type:n.CHAR,value:65279}];t.words=()=>({type:n.SET,set:s(),not:!1}),t.notWords=()=>({type:n.SET,set:s(),not:!0}),t.ints=()=>({type:n.SET,set:o(),not:!1}),t.notInts=()=>({type:n.SET,set:o(),not:!0}),t.whitespace=()=>({type:n.SET,set:a(),not:!1}),t.notWhitespace=()=>({type:n.SET,set:a(),not:!0}),t.anyChar=()=>({type:n.SET,set:[{type:n.CHAR,value:10},{type:n.CHAR,value:13},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233}],not:!0})},8020:e=>{e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},4045:(e,t,r)=>{const n=r(8020),o=r(7732),s={0:0,t:9,n:10,v:11,f:12,r:13};t.strToChars=function(e){return e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,r,n,o,a,i,c){if(r)return e;var l=t?8:n?parseInt(n,16):o?parseInt(o,16):a?parseInt(a,8):i?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(i):s[c],u=String.fromCharCode(l);return/[[\]{}^$.|?*+()]/.test(u)&&(u="\\"+u),u}))},t.tokenizeClass=(e,r)=>{for(var s,a,i=[],c=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(s=c.exec(e));)if(s[1])i.push(o.words());else if(s[2])i.push(o.ints());else if(s[3])i.push(o.whitespace());else if(s[4])i.push(o.notWords());else if(s[5])i.push(o.notInts());else if(s[6])i.push(o.notWhitespace());else if(s[7])i.push({type:n.RANGE,from:(s[8]||s[9]).charCodeAt(0),to:s[10].charCodeAt(0)});else{if(!(a=s[12]))return[i,c.lastIndex];i.push({type:n.CHAR,value:a.charCodeAt(0)})}t.error(r,"Unterminated character class")},t.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}},4971:(e,t,r)=>{"use strict";var n=r(1048).hp;function o(e){return e instanceof n?n.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const t=[],r=[],n=new Map;if(n.set(Date,(e=>new Date(e))),n.set(Map,((e,t)=>new Map(a(Array.from(e),t)))),n.set(Set,((e,t)=>new Set(a(Array.from(e),t)))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return a(i,e);if(i.constructor!==Object&&(s=n.get(i.constructor)))return s(i,e);const c={};t.push(i),r.push(c);for(const a in i){const l=i[a];if("object"!=typeof l||null===l)c[a]=l;else if(l.constructor!==Object&&(s=n.get(l.constructor)))c[a]=s(l,e);else if(ArrayBuffer.isView(l))c[a]=o(l);else{const n=t.indexOf(l);c[a]=-1!==n?r[n]:e(l)}}return t.pop(),r.pop(),c}:function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return a(i,e);if(i.constructor!==Object&&(s=n.get(i.constructor)))return s(i,e);const c={};t.push(i),r.push(c);for(const a in i){if(!1===Object.hasOwnProperty.call(i,a))continue;const l=i[a];if("object"!=typeof l||null===l)c[a]=l;else if(l.constructor!==Object&&(s=n.get(l.constructor)))c[a]=s(l,e);else if(ArrayBuffer.isView(l))c[a]=o(l);else{const n=t.indexOf(l);c[a]=-1!==n?r[n]:e(l)}}return t.pop(),r.pop(),c};function a(e,a){const i=Object.keys(e),c=new Array(i.length);for(let l=0;l<i.length;l++){const u=i[l],p=e[u];if("object"!=typeof p||null===p)c[u]=p;else if(p.constructor!==Object&&(s=n.get(p.constructor)))c[u]=s(p,a);else if(ArrayBuffer.isView(p))c[u]=o(p);else{const e=t.indexOf(p);c[u]=-1!==e?r[e]:a(p)}}return c}}(e);const t=new Map;if(t.set(Date,(e=>new Date(e))),t.set(Map,((e,t)=>new Map(n(Array.from(e),t)))),t.set(Set,((e,t)=>new Set(n(Array.from(e),t)))),e.constructorHandlers)for(const r of e.constructorHandlers)t.set(r[0],r[1]);let r=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(r=t.get(s.constructor)))return r(s,e);const a={};for(const n in s){const i=s[n];"object"!=typeof i||null===i?a[n]=i:i.constructor!==Object&&(r=t.get(i.constructor))?a[n]=r(i,e):ArrayBuffer.isView(i)?a[n]=o(i):a[n]=e(i)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(r=t.get(s.constructor)))return r(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const i=s[n];"object"!=typeof i||null===i?a[n]=i:i.constructor!==Object&&(r=t.get(i.constructor))?a[n]=r(i,e):ArrayBuffer.isView(i)?a[n]=o(i):a[n]=e(i)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let i=0;i<s.length;i++){const c=s[i],l=e[c];"object"!=typeof l||null===l?a[c]=l:l.constructor!==Object&&(r=t.get(l.constructor))?a[c]=r(l,n):ArrayBuffer.isView(l)?a[c]=o(l):a[c]=n(l)}return a}}},1565:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?a[i.COMPARATORLOOSE]:a[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const s=r(3990),{safeRe:a,t:i}=r(2841),c=r(4004),l=r(1361),u=r(4517),p=r(7476)},7476:(e,t,r)=>{const n=/\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,r=s.get(t);if(r)return r;const n=this.options.loose,o=n?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(o,N(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(u[p.COMPARATORTRIM],d),c("comparator trim",e),e=e.replace(u[p.TILDETRIM],f),c("tilde trim",e),e=e.replace(u[p.CARETTRIM],h),c("caret trim",e);let a=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>S(e,this.options)));n&&(a=a.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE]))))),c("range list",a);const l=new Map,v=a.map((e=>new i(e,this.options)));for(const e of v){if(y(e))return[e];l.set(e.value,e)}l.size>1&&l.has("")&&l.delete("");const b=[...l.values()];return s.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Range is required");return this.set.some((r=>b(r,t)&&e.set.some((e=>b(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}e.exports=o;const s=new(r(8953)),a=r(3990),i=r(1565),c=r(1361),l=r(4517),{safeRe:u,t:p,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:h}=r(2841),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=r(9543),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},w=(e,t)=>(c("comp",e,t),e=T(e,t),c("caret",e),e=$(e,t),c("tildes",e),e=D(e,t),c("xrange",e),e=I(e,t),c("stars",e),e),A=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const r=t.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(r,((t,r,n,o,s)=>{let a;return c("tilde",e,t,r,n,o,s),A(r)?a="":A(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:A(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(c("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,c("tilde return",a),a}))},T=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{c("caret",e,t);const r=t.loose?u[p.CARETLOOSE]:u[p.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,s,a)=>{let i;return c("caret",e,t,r,o,s,a),A(r)?i="":A(o)?i=`>=${r}.0.0${n} <${+r+1}.0.0-0`:A(s)?i="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(c("replaceCaret pr",a),i="0"===r?"0"===o?`>=${r}.${o}.${s}-${a} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${a} <${+r+1}.0.0-0`):(c("no pr"),i="0"===r?"0"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),c("caret return",i),i}))},D=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>F(e,t))).join(" ")),F=(e,t)=>{e=e.trim();const r=t.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(r,((r,n,o,s,a,i)=>{c("xRange",e,r,n,o,s,a,i);const l=A(o),u=l||A(s),p=u||A(a),d=p;return"="===n&&d&&(n=""),i=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(s=0),a=0,">"===n?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(i="-0"),r=`${n+o}.${s}.${a}${i}`):u?r=`>=${o}.0.0${i} <${+o+1}.0.0-0`:p&&(r=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`),c("xRange return",r),r}))},I=(e,t)=>(c("replaceStars",e,t),e.trim().replace(u[p.STAR],"")),S=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),N=e=>(t,r,n,o,s,a,i,c,l,u,p,d)=>`${r=A(n)?"":A(o)?`>=${n}.0.0${e?"-0":""}`:A(s)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=A(l)?"":A(u)?`<${+l+1}.0.0-0`:A(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:`<=${c}`}`.trim(),O=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},4517:(e,t,r)=>{const n=r(1361),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(9543),{safeRe:a,t:i}=r(2841),c=r(3990),{compareIdentifiers:l}=r(3806);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[i.LOOSE]:a[i.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},2281:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},4004:(e,t,r)=>{const n=r(8848),o=r(8220),s=r(9761),a=r(2386),i=r(1262),c=r(9639);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return s(e,r,l);case">=":return a(e,r,l);case"<":return i(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},6783:(e,t,r)=>{const n=r(4517),o=r(3955),{safeRe:s,t:a}=r(2841);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?s[a.COERCERTLFULL]:s[a.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?s[a.COERCEFULL]:s[a.COERCE]);if(null===r)return null;const i=r[2],c=r[3]||"0",l=r[4]||"0",u=t.includePrerelease&&r[5]?`-${r[5]}`:"",p=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${i}.${c}.${l}${u}${p}`,t)}},6106:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},2132:(e,t,r)=>{const n=r(7851);e.exports=(e,t)=>n(e,t,!0)},7851:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},3269:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),s=r.compare(o);if(0===s)return null;const a=s>0,i=a?r:o,c=a?o:r,l=!!i.prerelease.length;if(c.prerelease.length&&!l)return c.patch||c.minor?i.patch?"patch":i.minor?"minor":"major":"major";const u=l?"pre":"";return r.major!==o.major?u+"major":r.minor!==o.minor?u+"minor":r.patch!==o.patch?u+"patch":"prerelease"}},8848:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>0===n(e,t,r)},9761:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>0},2386:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)>=0},8868:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r,o,s)=>{"string"==typeof r&&(s=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,s).version}catch(e){return null}}},1262:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)<0},9639:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(e,t,r)<=0},6381:(e,t,r)=>{const n=r(4517);e.exports=(e,t)=>new n(e,t).major},1353:(e,t,r)=>{const n=r(4517);e.exports=(e,t)=>new n(e,t).minor},8220:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>0!==n(e,t,r)},3955:(e,t,r)=>{const n=r(4517);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},6082:(e,t,r)=>{const n=r(4517);e.exports=(e,t)=>new n(e,t).patch},9428:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},7555:(e,t,r)=>{const n=r(7851);e.exports=(e,t,r)=>n(t,e,r)},3810:(e,t,r)=>{const n=r(6106);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7229:(e,t,r)=>{const n=r(7476);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4042:(e,t,r)=>{const n=r(6106);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},8474:(e,t,r)=>{const n=r(3955);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},2722:(e,t,r)=>{const n=r(2841),o=r(9543),s=r(4517),a=r(3806),i=r(3955),c=r(8474),l=r(2281),u=r(8868),p=r(3269),d=r(6381),f=r(1353),h=r(6082),m=r(9428),g=r(7851),y=r(7555),v=r(2132),b=r(6106),w=r(4042),A=r(3810),$=r(9761),E=r(1262),T=r(8848),C=r(8220),D=r(2386),F=r(9639),I=r(4004),S=r(6783),N=r(1565),O=r(7476),M=r(7229),x=r(6364),k=r(5039),P=r(5357),L=r(1280),R=r(7403),_=r(8854),B=r(7226),j=r(7183),V=r(8623),U=r(6486),Q=r(583);e.exports={parse:i,valid:c,clean:l,inc:u,diff:p,major:d,minor:f,patch:h,prerelease:m,compare:g,rcompare:y,compareLoose:v,compareBuild:b,sort:w,rsort:A,gt:$,lt:E,eq:T,neq:C,gte:D,lte:F,cmp:I,coerce:S,Comparator:N,Range:O,satisfies:M,toComparators:x,maxSatisfying:k,minSatisfying:P,minVersion:L,validRange:R,outside:_,gtr:B,ltr:j,intersects:V,simplifyRange:U,subset:Q,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},9543:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},1361:(e,t,r)=>{const n="object"==typeof r(9907)&&{NODE_ENV:"production"}.NODE_DEBUG&&/\bsemver\b/i.test({NODE_ENV:"production"}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},3806:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8953:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},3990:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},2841:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=r(9543),a=r(1361),i=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],u=t.t={};let p=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[d,o]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;a(e,o,t),u[e]=o,l[o]=t,i[o]=new RegExp(t,r?"g":void 0),c[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7226:(e,t,r)=>{const n=r(8854);e.exports=(e,t,r)=>n(e,t,">",r)},8623:(e,t,r)=>{const n=r(7476);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},7183:(e,t,r)=>{const n=r(8854);e.exports=(e,t,r)=>n(e,t,"<",r)},5039:(e,t,r)=>{const n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(s&&-1!==a.compare(e)||(s=e,a=new n(s,r)))})),s}},5357:(e,t,r)=>{const n=r(4517),o=r(7476);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(s&&1!==a.compare(e)||(s=e,a=new n(s,r)))})),s}},1280:(e,t,r)=>{const n=r(4517),o=r(7476),s=r(9761);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!s(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||r&&!s(r,a)||(r=a)}return r&&e.test(r)?r:null}},8854:(e,t,r)=>{const n=r(4517),o=r(1565),{ANY:s}=o,a=r(7476),i=r(7229),c=r(9761),l=r(1262),u=r(9639),p=r(2386);e.exports=(e,t,r,d)=>{let f,h,m,g,y;switch(e=new n(e,d),t=new a(t,d),r){case">":f=c,h=u,m=l,g=">",y=">=";break;case"<":f=l,h=p,m=c,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(e,t,d))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let a=null,i=null;if(n.forEach((e=>{e.semver===s&&(e=new o(">=0.0.0")),a=a||e,i=i||e,f(e.semver,a.semver,d)?a=e:m(e.semver,i.semver,d)&&(i=e)})),a.operator===g||a.operator===y)return!1;if((!i.operator||i.operator===g)&&h(e,i.semver))return!1;if(i.operator===y&&m(e,i.semver))return!1}return!0}},6486:(e,t,r)=>{const n=r(7229),o=r(7851);e.exports=(e,t,r)=>{const s=[];let a=null,i=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c)n(e,t,r)?(i=e,a||(a=e)):(i&&s.push([a,i]),i=null,a=null);a&&s.push([a,null]);const l=[];for(const[e,t]of s)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const u=l.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},583:(e,t,r)=>{const n=r(7476),o=r(1565),{ANY:s}=o,a=r(7229),i=r(7851),c=[new o(">=0.0.0-0")],l=[new o(">=0.0.0")],u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?c:l}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=l}const n=new Set;let o,u,f,h,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?o=p(o,t,r):"<"===t.operator||"<="===t.operator?u=d(u,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&u){if(f=i(o.semver,u.semver,r),f>0)return null;if(0===f&&(">="!==o.operator||"<="!==u.operator))return null}for(const e of n){if(o&&!a(e,String(o),r))return null;if(u&&!a(e,String(u),r))return null;for(const n of t)if(!a(e,String(n),r))return!1;return!0}let v=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver,b=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;v&&1===v.prerelease.length&&"<"===u.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,o)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(h=p(o,e,r),h===e&&h!==o)return!1}else if(">="===o.operator&&!a(o.semver,String(e),r))return!1;if(u)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(m=d(u,e,r),m===e&&m!==u)return!1}else if("<="===u.operator&&!a(u.semver,String(e),r))return!1;if(!e.operator&&(u||o)&&0!==f)return!1}return!(o&&g&&!u&&0!==f||u&&y&&!o&&0!==f||b||v)},p=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},6364:(e,t,r)=>{const n=r(7476);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},7403:(e,t,r)=>{const n=r(7476);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},9825:function(e,t,r){var n,o;!function(s,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,s=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(s=7),t=0;t<o&&""!==n[t];t++);if(t<s)for(n.splice(t,1,"0000");n.length<s;)n.splice(t,0,"0000");for(var a=0;a<s;a++){r=n[a].split("");for(var i=0;i<3&&"0"===r[0]&&r.length>1;i++)r.splice(0,1);n[a]=r.join("")}var c=-1,l=0,u=0,p=-1,d=!1;for(a=0;a<s;a++)d?"0"===n[a]?u+=1:(d=!1,u>l&&(c=p,l=u)):"0"===n[a]&&(d=!0,p=a,u=1);u>l&&(c=p,l=u),l>1&&n.splice(c,l,""),o=n.length;var f="";for(""===n[0]&&(f=":"),a=0;a<o&&(f+=n[a],a!==o-1);a++)f+=":";return""===n[o-1]&&(f+=":"),f},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},1811:function(e,t,r){var n,o;!function(s,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},9472:function(e,t,r){var n,o,s;!function(a,i){"use strict";e.exports?e.exports=i(r(2675),r(9825),r(1811)):(o=[r(2675),r(9825),r(1811)],void 0===(s="function"==typeof(n=i)?n.apply(t,o):n)||(e.exports=s))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function s(e,t){var r=arguments.length>=1;if(!(this instanceof s))return r?arguments.length>=2?new s(e,t):new s(e):new s;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}s.version="1.19.11";var a=s.prototype,i=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===l(e)}function p(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(u(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++)(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--);return e}function d(e,t){var r,n;if(u(t)){for(r=0,n=t.length;r<n;r++)if(!d(e,t[r]))return!1;return!0}var o=l(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function f(e,t){if(!u(e)||!u(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function h(e){return e.replace(/^\/+|\/+$/g,"")}function m(e){return escape(e)}function g(e){return encodeURIComponent(e).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}s._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:s.preventInvalidHostname,duplicateQueryParameters:s.duplicateQueryParameters,escapeQuerySpace:s.escapeQuerySpace}},s.preventInvalidHostname=!1,s.duplicateQueryParameters=!1,s.escapeQuerySpace=!0,s.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,s.idn_expression=/[^a-z0-9\._-]/i,s.punycode_expression=/(xn--)/i,s.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,s.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,s.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,s.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},s.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,s.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},s.hostProtocols=["http","https"],s.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,s.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},s.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return s.domAttributes[t]}},s.encode=g,s.decode=decodeURIComponent,s.iso8859=function(){s.encode=escape,s.decode=unescape},s.unicode=function(){s.encode=g,s.decode=decodeURIComponent},s.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},s.encodeQuery=function(e,t){var r=s.encode(e+"");return void 0===t&&(t=s.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},s.decodeQuery=function(e,t){e+="",void 0===t&&(t=s.escapeQuerySpace);try{return s.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var y,v={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return s[t](r+"").replace(s.characters[e][t].expression,(function(r){return s.characters[e][t].map[r]}))}catch(e){return r}}};for(y in v)s[y+"PathSegment"]=b("pathname",v[y]),s[y+"UrnPathSegment"]=b("urnpath",v[y]);var w=function(e,t,r){return function(n){var o;o=r?function(e){return s[t](s[r](e))}:s[t];for(var a=(n+"").split(e),i=0,c=a.length;i<c;i++)a[i]=o(a[i]);return a.join(e)}};function A(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function $(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}s.decodePath=w("/","decodePathSegment"),s.decodeUrnPath=w(":","decodeUrnPathSegment"),s.recodePath=w("/","encodePathSegment","decode"),s.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),s.encodeReserved=b("reserved","encode"),s.parse=function(e,t){var r;return t||(t={preventInvalidHostname:s.preventInvalidHostname}),(r=(e=(e=e.replace(s.leading_whitespace_expression,"")).replace(s.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=s.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(s.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=s.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},s.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),i=e.indexOf("/"),c=e.indexOf(":",a+1);-1!==c&&(-1===i||c<i)?(t.hostname=e.substring(0,o)||null,t.port=null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&s.ensureValidHostname(t.hostname,t.protocol),t.port&&s.ensureValidPort(t.port),e.substring(o)||"/"},s.parseAuthority=function(e,t){return e=s.parseUserinfo(e,t),s.parseHost(e,t)},s.parseUserinfo=function(e,t){var r=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var n,o=e.indexOf("/"),a=e.lastIndexOf("@",o>-1?o:e.length-1);return a>-1&&(-1===o||a<o)?(n=e.substring(0,a).split(":"),t.username=n[0]?s.decode(n[0]):null,n.shift(),t.password=n[0]?s.decode(n.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null),e},s.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},c=e.split("&"),l=c.length,u=0;u<l;u++)r=c[u].split("="),n=s.decodeQuery(r.shift(),t),o=r.length?s.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(i.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o);return a},s.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=s.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},s.buildHost=function(e){var t="";return e.hostname?(s.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},s.buildAuthority=function(e){return s.buildUserinfo(e)+s.buildHost(e)},s.buildUserinfo=function(e){var t="";return e.username&&(t+=s.encode(e.username)),e.password&&(t+=":"+s.encode(e.password)),t&&(t+="@"),t},s.buildQuery=function(e,t,r){var n,o,a,c,l="";for(o in e)if("__proto__"!==o&&i.call(e,o))if(u(e[o]))for(n={},a=0,c=e[o].length;a<c;a++)void 0!==e[o][a]&&void 0===n[e[o][a]+""]&&(l+="&"+s.buildQueryParameter(o,e[o][a],r),!0!==t&&(n[e[o][a]+""]=!0));else void 0!==e[o]&&(l+="&"+s.buildQueryParameter(o,e[o],r));return l.substring(1)},s.buildQueryParameter=function(e,t,r){return s.encodeQuery(e,r)+(null!==t?"="+s.encodeQuery(t,r):"")},s.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)i.call(t,n)&&s.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),u(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},s.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)i.call(t,n)&&s.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},s.removeQuery=function(e,t,r){var n,o,a;if(u(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===l(t))for(a in e)t.test(a)&&(e[a]=void 0);else if("object"==typeof t)for(a in t)i.call(t,a)&&s.removeQuery(e,a,t[a]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===l(r)?!u(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=p(e[t],r):e[t]!==String(r)||u(r)&&1!==r.length?u(e[t])&&(e[t]=p(e[t],r)):e[t]=void 0:e[t]=void 0}},s.hasQuery=function(e,t,r,n){switch(l(t)){case"String":break;case"RegExp":for(var o in e)if(i.call(e,o)&&t.test(o)&&(void 0===r||s.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var a in t)if(i.call(t,a)&&!s.hasQuery(e,a,t[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(u(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!u(e[t])&&(n?d:f)(e[t],r);case"RegExp":return u(e[t])?!!n&&d(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return u(e[t])?!!n&&d(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},s.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new s(arguments[n]);e.push(o);for(var a=o.segment(),i=0;i<a.length;i++)"string"==typeof a[i]&&t.push(a[i]),a[i]&&r++}if(!t.length||!r)return new s("");var c=new s("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||c.path("/"+c.path()),c.normalize()},s.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},s.withinString=function(e,t,r){r||(r={});var n=r.start||s.findUri.start,o=r.end||s.findUri.end,a=r.trim||s.findUri.trim,i=r.parens||s.findUri.parens,c=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var l=n.exec(e);if(!l)break;var u=l.index;if(r.ignoreHtml){var p=e.slice(Math.max(u-3,0),u);if(p&&c.test(p))continue}for(var d=u+e.slice(u).search(o),f=e.slice(u,d),h=-1;;){var m=i.exec(f);if(!m)break;var g=m.index+m[0].length;h=Math.max(h,g)}if(!((f=h>-1?f.slice(0,h)+f.slice(h).replace(a,""):f.replace(a,"")).length<=l[0].length||r.ignore&&r.ignore.test(f))){var y=t(f,u,d=u+f.length,e);void 0!==y?(y=String(y),e=e.slice(0,u)+y+e.slice(d),n.lastIndex=u+y.length):n.lastIndex=d}}return n.lastIndex=0,e},s.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(s.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(s.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(s.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},s.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},s.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},a.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=s.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new s(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=A("protocol"),a.username=A("username"),a.password=A("password"),a.hostname=A("hostname"),a.port=A("port"),a.query=$("query","?"),a.fragment=$("fragment","#"),a.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?s.decodeUrnPath:s.decodePath)(r):r}return this._parts.urn?this._parts.path=e?s.recodeUrnPath(e):"":this._parts.path=e?s.recodePath(e):"/",this.build(!t),this},a.path=a.pathname,a.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=s._parts();var n=e instanceof s,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[s.getDomAttribute(e)]||"",o=!1),!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=s.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var a=n?e._parts:e;for(r in a)"query"!==r&&i.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,n=!1,o=!1,a=!1,i=!1,c=!1,l=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,n=s.ip4_expression.test(this._parts.hostname),o=s.ip6_expression.test(this._parts.hostname),i=(a=!(t=n||o))&&r&&r.has(this._parts.hostname),c=a&&s.idn_expression.test(this._parts.hostname),l=a&&s.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return a;case"sld":return i;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var E=a.protocol,T=a.port,C=a.hostname;a.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(s.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},a.scheme=a.protocol,a.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),s.ensureValidPort(e))),T.call(this,e,t))},a.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==s.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&s.ensureValidHostname(e,this._parts.protocol)}return C.call(this,e,t)},a.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=s(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},a.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?s.buildHost(this._parts):"";if("/"!==s.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?s.buildAuthority(this._parts):"";if("/"!==s.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=s.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),s.parseUserinfo(e,this._parts),this.build(!t),this},a.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=s.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},a.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),a=new RegExp("^"+c(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&s.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,e),this.build(!t),this},a.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(s.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},a.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var s;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');s=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");s=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!t),this},a.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?s.decodePath(n):n}var o=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,o),i=new RegExp("^"+c(a));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=s.recodePath(e),this._parts.path=this._parts.path.replace(i,e),this.build(!t),this},a.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?s.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var a=new RegExp(c(this.filename())+"$");return e=s.recodePath(e),this._parts.path=this._parts.path.replace(a,e),o?this.normalizePath(t):this.build(!t),this},a.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),a=o.lastIndexOf(".");return-1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?s.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var i,l=this.suffix();if(l)i=e?new RegExp(c(l)+"$"):new RegExp(c("."+l)+"$");else{if(!e)return this;this._parts.path+="."+s.recodePath(e)}return i&&(e=s.recodePath(e),this._parts.path=this._parts.path.replace(i,e)),this.build(!t),this},a.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),s="/"===o.substring(0,1),a=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(s&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(u(t)){a=[];for(var i=0,c=t.length;i<c;i++)(t[i].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(h(t[i])))}else(t||"string"==typeof t)&&(t=h(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=h(t):a.splice(e,1);return s&&a.unshift(""),this.path(a.join(n),r)},a.segmentCoded=function(e,t,r){var n,o,a;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(u(n=this.segment(e,t,r)))for(o=0,a=n.length;o<a;o++)n[o]=s.decode(n[o]);else n=void 0!==n?s.decode(n):void 0;return n}if(u(t))for(o=0,a=t.length;o<a;o++)t[o]=s.encode(t[o]);else t="string"==typeof t||t instanceof String?s.encode(t):t;return this.segment(e,t,r)};var D=a.query;return a.query=function(e,t){if(!0===e)return s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=s.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=s.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):D.call(this,e,t)},a.setQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)i.call(e,o)&&(n[o]=e[o])}return this._parts.query=s.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.addQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return s.addQuery(n,e,void 0===t?null:t),this._parts.query=s.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.removeQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return s.removeQuery(n,e,t),this._parts.query=s.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.hasQuery=function(e,t,r){var n=s.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return s.hasQuery(n,e,t,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===s.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},a.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=s.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,a="";for("/"!==(r=s.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return t&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!e),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(s.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},a.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var e=s.encode,t=s.decode;s.encode=escape,s.decode=decodeURIComponent;try{this.normalize()}finally{s.encode=e,s.decode=t}return this},a.unicode=function(){var e=s.encode,t=s.decode;s.encode=g,s.decode=unescape;try{this.normalize()}finally{s.encode=e,s.decode=t}return this},a.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,a=t._parts.query.split("&"),i=a.length;o<i;o++){var c=(a[o]||"").split("=");n+="&"+s.decodeQuery(c[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==c[1]&&(n+="="+s.decodeQuery(c[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+s.decodeQuery(t.hash(),!0)},a.absoluteTo=function(e){var t,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof s||(e=new s(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=a[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},a.relativeTo=function(e){var t,r,n,o,a,i=this.clone().normalize();if(i._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new s(e).normalize(),t=i._parts,r=e._parts,o=i.path(),a=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return i.build();if(null!==t.protocol||null!==t.username||null!==t.password)return i.build();if(t.hostname!==r.hostname||t.port!==r.port)return i.build();if(t.hostname=null,t.port=null,o===a)return t.path="",i.build();if(!(n=s.commonPath(o,a)))return i.build();var c=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=c+t.path.substring(n.length)||"./",i.build()},a.equals=function(e){var t,r,n,o,a,c=this.clone(),l=new s(e),p={};if(c.normalize(),l.normalize(),c.toString()===l.toString())return!0;if(n=c.query(),o=l.query(),c.query(""),l.query(""),c.toString()!==l.toString())return!1;if(n.length!==o.length)return!1;for(a in t=s.parseQuery(n,this._parts.escapeQuerySpace),r=s.parseQuery(o,this._parts.escapeQuerySpace),t)if(i.call(t,a)){if(u(t[a])){if(!f(t[a],r[a]))return!1}else if(t[a]!==r[a])return!1;p[a]=!0}for(a in r)if(i.call(r,a)&&!p[a])return!1;return!0},a.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},a.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},a.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},s}))},2675:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,i=36,c=/^xn--/,l=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,f=String.fromCharCode;function h(e){throw new RangeError(p[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(u,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,s=e.length;o<s;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<s?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function v(e){return m(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+f(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=i)e=d(e/35);return d(n+36*e/(e+38))}function A(e){var t,r,n,o,s,c,l,u,p,f,m,g=[],y=e.length,b=0,A=128,$=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&h("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(s=b,c=1,l=i;o>=y&&h("invalid-input"),((u=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:i)>=i||u>d((a-b)/c))&&h("overflow"),b+=u*c,!(u<(p=l<=$?1:l>=$+26?26:l-$));l+=i)c>d(a/(f=i-p))&&h("overflow"),c*=f;$=w(b-s,t=g.length+1,0==s),d(b/t)>a-A&&h("overflow"),A+=d(b/t),b%=t,g.splice(b++,0,A)}return v(g)}function $(e){var t,r,n,o,s,c,l,u,p,m,g,v,A,$,E,T=[];for(v=(e=y(e)).length,t=128,r=0,s=72,c=0;c<v;++c)(g=e[c])<128&&T.push(f(g));for(n=o=T.length,o&&T.push("-");n<v;){for(l=a,c=0;c<v;++c)(g=e[c])>=t&&g<l&&(l=g);for(l-t>d((a-r)/(A=n+1))&&h("overflow"),r+=(l-t)*A,t=l,c=0;c<v;++c)if((g=e[c])<t&&++r>a&&h("overflow"),g==t){for(u=r,p=i;!(u<(m=p<=s?1:p>=s+26?26:p-s));p+=i)E=u-m,$=i-m,T.push(f(b(m+E%$,0))),u=d(E/$);T.push(f(b(u,0))),s=w(r,A,n==o),r=0,++n}++r,++t}return T.join("")}s={version:"1.3.2",ucs2:{decode:y,encode:v},decode:A,encode:$,toASCII:function(e){return g(e,(function(e){return l.test(e)?"xn--"+$(e):e}))},toUnicode:function(e){return g(e,(function(e){return c.test(e)?A(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},5237:(e,t,r)=>{"use strict";const n=r(3686),o=r(1861),s=r(5477),a=r(5430),i=r(4404),c=r(8088),l=r(9869),u=r(8058),p=r(953),d=r(6341),f=r(8171),h=r(7337),m=r(3218),g=r(745),y=r(7189),v=r(3135),b=r(8968),w=r(7046),A=r(9852),$=r(1529),E=r(2302),T=r(6099),C=r(6375),D=r(1976),F=r(516),I=r(2523),S=r(9259),N=r(6113),O=r(7755),M=r(1595),x=r(2438),k=r(4471),P=r(6226),L=r(9481),R=r(3673),_=r(1768),B=r(6803),j=r(6033),V=r(7624),U=r(7662),Q=r(3899),q=r(8330);e.exports={SecurityException:n,IllegalModelException:o,TypeNotFoundException:s,MetamodelException:a,Decorator:i,DecoratorFactory:c,DecoratorManager:j,ClassDeclaration:l,IdentifiedDeclaration:u,AssetDeclaration:p,ConceptDeclaration:d,EnumValueDeclaration:f,EventDeclaration:h,ParticipantDeclaration:m,TransactionDeclaration:g,ScalarDeclaration:y,MapDeclaration:v,MapKeyType:b,MapValueType:w,Property:A,Field:$,EnumDeclaration:E,RelationshipDeclaration:T,Validator:C,NumberValidator:D,StringValidator:F,Typed:I,Identifiable:S,Relationship:N,Resource:O,Factory:M,Globalize:x,Introspector:k,ModelFile:P,ModelManager:L,Serializer:R,ModelUtil:_,ModelLoader:B,DateTimeUtil:V,Concerto:U,MetaModel:Q,version:q}},7833:(e,t,r)=>{var n=r(9907);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(7250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},9967:(e,t,r)=>{var n,o=r(9907);self,n=()=>{return e={348:(e,t,r)=>{"use strict";const n=r(954),{DcsCto:o,DcsNamespace:s}=r(497);e.exports={MetaModelUtil:n,MetaModelNamespace:"concerto.metamodel@1.0.0",DcsCto:o,DcsNamespace:s}},497:e=>{"use strict";e.exports={DcsCto:'/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nnamespace org.accordproject.decoratorcommands@0.4.0\n\nimport concerto.metamodel@1.0.0.Decorator\n\n/**\n * A reference to an existing named & versioned DecoratorCommandSet\n */\nconcept DecoratorCommandSetReference {\n o String name\n o String version\n}\n\n/**\n * Whether to upsert or append the decorator\n */\nenum CommandType {\n o UPSERT\n o APPEND\n}\n\n/**\n * Which models elements to add the decorator to. Any null\n * elements are \'wildcards\'.\n */\nconcept CommandTarget {\n o String namespace optional\n o String declaration optional\n o String property optional\n o String[] properties optional // property and properties are mutually exclusive\n o String type optional\n o MapElement mapElement optional\n}\n\n/**\n * Map Declaration elements which might be used as a target\n */\nenum MapElement {\n o KEY\n o VALUE\n o KEY_VALUE\n}\n\n/**\n * Applies a decorator to a given target\n */\nconcept Command {\n o CommandTarget target\n o Decorator decorator\n o CommandType type\n o String decoratorNamespace optional\n}\n\n/**\n * A named and versioned set of commands. Includes are supported for modularity/reuse.\n */\nconcept DecoratorCommandSet {\n o String name\n o String version\n o DecoratorCommandSetReference[] includes optional // not yet supported\n o Command[] commands\n}',DcsNamespace:"org.accordproject.decoratorcommands@0.4.0"}},702:e=>{"use strict";e.exports='/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace("AccordProject.Concerto.Metamodel")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n o String resolvedName optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapKeyType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapValueType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o MapValueType value\n}\n\nconcept StringMapKeyType extends MapKeyType {}\nconcept DateTimeMapKeyType extends MapKeyType {}\n\nconcept ObjectMapKeyType extends MapKeyType {\n o TypeIdentifier type\n}\n\nconcept BooleanMapValueType extends MapValueType {}\nconcept DateTimeMapValueType extends MapValueType {}\nconcept StringMapValueType extends MapValueType {}\nconcept IntegerMapValueType extends MapValueType {}\nconcept LongMapValueType extends MapValueType {}\nconcept DoubleMapValueType extends MapValueType {}\n\nconcept ObjectMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept RelationshipMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept StringLengthValidator {\n o Integer minLength optional\n o Integer maxLength optional\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nconcept AliasedType{\n o String name\n o String aliasedName\n}\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n o AliasedType[] aliasedTypes optional\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n o String namespace optional\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue optional\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n'},954:(e,t,r)=>{"use strict";const n=r(865),o="concerto.metamodel@1.0.0",s=r(702);function a(e,t){return e.declarations.find((e=>e.name===t))}function i(e,t){if(!t[e])throw new Error(`Name ${e} not found`);return t[e].namespace}function c(e,t){switch((e.decorators||[]).forEach((e=>{c(e,t)})),e.$class){case`${o}.Model`:(e.declarations||[]).forEach((e=>{c(e,t)}));break;case`${o}.EnumDeclaration`:case`${o}.AssetDeclaration`:case`${o}.ConceptDeclaration`:case`${o}.EventDeclaration`:case`${o}.TransactionDeclaration`:case`${o}.ParticipantDeclaration`:if(e.superType){const r=e.superType.name;e.superType.namespace=i(r,t),e.superType.name=t[r].name,t[r]?.resolvedName&&(e.superType.resolvedName=t[r].resolvedName)}(e.properties||[]).forEach((e=>{c(e,t)}));break;case`${o}.MapDeclaration`:c(e.key,t),c(e.value,t);break;case`${o}.Decorator`:(e.arguments||[]).forEach((e=>{c(e,t)}));break;case`${o}.ObjectProperty`:case`${o}.RelationshipProperty`:case`${o}.DecoratorTypeReference`:case`${o}.ObjectMapKeyType`:case`${o}.ObjectMapValueType`:case`${o}.RelationshipMapValueType`:e.type.namespace=i(e.type.name,t),e.type.name=t[e.type.name].name,t[e.type.name]?.resolvedName&&(e.type.resolvedName=t[e.type.name].resolvedName);break;case`${o}.StringScalar`:case`${o}.BooleanScalar`:case`${o}.DateTimeScalar`:case`${o}.DoubleScalar`:case`${o}.LongScalar`:case`${o}.IntegerScalar`:e.namespace=i(e.name,t),e.name=t[e.name].name}return e}function l(e,t){const r=JSON.parse(JSON.stringify(t)),n=function(e,t){const r="concerto@1.0.0",n={Concept:{namespace:r,name:"Concept"},Asset:{namespace:r,name:"Asset"},Participant:{namespace:r,name:"Participant"},Transaction:{namespace:r,name:"Transaction"},Event:{namespace:r,name:"Event"}};return(t.imports||[]).forEach((t=>{const r=t.namespace,s=function(e,t){return e.models.find((e=>e.namespace===t))}(e,r);if(t.$class===`${o}.ImportType`){if(!a(s,t.name))throw new Error(`Declaration ${t.name} in namespace ${r} not found`);n[t.name]={namespace:r,name:t.name}}else if(t.$class===`${o}.ImportTypes`){const e=t.aliasedTypes?new Map(t.aliasedTypes.map((({name:e,aliasedName:t})=>[e,t]))):new Map;t.types.forEach((t=>{const o=e.get(t)||t;if(!a(s,t))throw new Error(`Declaration ${t} in namespace ${r} not found`);n[o]=o!==t?{namespace:r,name:o,resolvedName:t}:{namespace:r,name:t}}))}else(s.declarations||[]).forEach((e=>{n[e.name]={namespace:r,name:e.name}}))})),(t.declarations||[]).forEach((e=>{n[e.name]={namespace:t.namespace,name:e.name}})),n}(e,t);return c(r,n),r}function u(e){const t=[];switch(e.$class){case`${o}.ImportAll`:t.push(`${e.namespace}.*`);break;case`${o}.ImportType`:t.push(`${e.namespace}.${e.name}`);break;case`${o}.ImportTypes`:e.types.forEach((r=>{t.push(`${e.namespace}.${r}`)}));break;default:throw new Error(`Unrecognized imports ${e.$class}`)}return t}e.exports={metaModelAst:n,metaModelCto:s,resolveLocalNames:l,resolveLocalNamesForAll:function(e){const t={$class:`${o}.Models`,models:[]};return e.models.forEach((r=>{const n=l(e,r);t.models.push(n)})),t},importFullyQualifiedNames:u,getExternalImports:function(e){const t={};return e.imports&&e.imports.forEach((e=>{const r=u(e);e.uri&&(t[r[0]]=e.uri)})),t}}},573:(e,t,r)=>{"use strict";const n=r(187);e.exports=n.PromisePool},160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(160);t.PromisePoolExecutor=class{constructor(){this.tasks=[],this.items=[],this.errors=[],this.results=[],this.concurrency=10,this.handler=()=>{},this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}for(e){return this.items=e,this}withHandler(e){return this.handler=e,this}handleError(e){return this.errorHandler=e,this}hasReachedConcurrencyLimit(){return this.activeCount()>=this.concurrency}activeCount(){return this.tasks.length}async start(){return this.validateInputs(),await this.process()}validateInputs(){if("function"!=typeof this.handler)throw new Error("The first parameter for the .process(fn) method must be a function");if(!("number"==typeof this.concurrency&&this.concurrency>=1))throw new TypeError(`"concurrency" must be a number, 1 or up. Received "${this.concurrency}" (${typeof this.concurrency})`);if(!Array.isArray(this.items))throw new TypeError('"items" must be an array. Received '+typeof this.items);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw new Error("The error handler must be a function. Received "+typeof this.errorHandler)}async process(){for(const e of this.items)this.hasReachedConcurrencyLimit()&&await this.processingSlot(),this.startProcessing(e);return this.drained()}async processingSlot(){return this.waitForTaskToFinish()}async waitForTaskToFinish(){await Promise.race(this.tasks)}startProcessing(e){const t=this.createTaskFor(e).then((e=>{this.results.push(e),this.tasks.splice(this.tasks.indexOf(t),1)})).catch((r=>{if(this.tasks.splice(this.tasks.indexOf(t),1),this.errorHandler)return this.errorHandler(r,e);this.errors.push(n.PromisePoolError.createFrom(r,e))}));this.tasks.push(t)}async createTaskFor(e){return this.handler(e)}async drained(){return await this.drainActiveTasks(),{results:this.results,errors:this.errors}}async drainActiveTasks(){await Promise.all(this.tasks)}}},187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(241);class o{constructor(e){this.concurrency=10,this.items=null!=e?e:[],this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}for(e){return new o(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}async process(e){return(new n.PromisePoolExecutor).withConcurrency(this.concurrency).withHandler(e).handleError(this.errorHandler).for(this.items).start()}}t.PromisePool=o},548:(e,t,r)=>{"use strict";const n=r(558),{DefaultFileLoader:o,FileDownloader:s}=r(20),a=r(833)("concerto:ModelManager"),i=r(206),{MetaModelUtil:c,MetaModelNamespace:l}=r(348);e.exports={resolveExternal:async function(e,t,r){a("updateExternalModels","updateExternalModels",t),r||(r=new s(new o(((e,t)=>{if(".cto"===n.extname(e))return i.parse(t);throw new Error("External model file references are expected to have a .cto extension")})),c.getExternalImports));const u=await r.downloadExternalDependencies(e.models,t);let p=e;return u.forEach((e=>{p=function(e,t){const r={$class:`${l}.Models`,models:[]},n=t.namespace,o=e.models;let s=!1;return o.forEach(((e,o)=>{e.namespace===n?(r.models.push(t),s=!0):r.models.push(e)})),s||r.models.push(t),r}(p,e)})),p}}},713:(e,t,r)=>{"use strict";const{BaseFileException:n}=r(20);e.exports=class extends n{constructor(e,t,r,n,o){let s=e,a="";r&&(a+=" File "+r),t&&(t.end&&t.start&&t.end.offset&&t.start.offset&&t.end.offset-t.start.offset==1&&(t.end.column=t.start.column,t.end.offset=t.start.offset),a+=a?" line "+t.start.line+" column "+t.start.column:" Line "+t.start.line+" column "+t.start.column),s+=a,super(e,t,n||s,r,o)}}},206:e=>{"use strict";function t(e,r,n,o){var s=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(s,t.prototype),s.expected=r,s.found=n,s.location=o,s.name="SyntaxError",s}function r(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){o=e[n].text.split(/\r\n|\n|\r/g);break}var s=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,i=this.location.source+":"+a.line+":"+a.column;if(o){var c=this.location.end,l=r("",a.line.toString().length," "),u=o[s.line-1],p=(s.line===c.line?c.column:u.length+1)-s.column||1;t+="\n --\x3e "+i+"\n"+l+" |\n"+a.line+" | "+u+"\n"+l+" | "+r("",s.column-1," ")+r("",p,"^")}else t+="\n at "+i}return t},t.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(a);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},e.exports={StartRules:["Start"],SyntaxError:t,parse:function(e,r){var n,o={},s=(r=void 0!==r?r:{}).grammarSource,a={Start:Ns},i=Ns,c="\n",l="\r\n",u="/*",p="*/",d="//",f="\\",h=".",m="0",g="e",y="0x",v='"',b="'",w="b",A="f",$="n",E="r",T="t",C="v",D="x",F="u",I="/",S="[",N="]",O="enum",M="map",x="false",k="import",P="true",L="as",R="}",_="%",B=":",j="?",V="#",U="@",Q="::",q="25",K="2",z="1",W="-",H="+",G="concerto",Y="version",J="namespace",X="abstract",Z="concept",ee="asset",te="transaction",re="event",ne="participant",oe="scalar",se="from",ae="*",ie="Integer",ce="Double",le="Long",ue="String",pe="DateTime",de="Boolean",fe="identified by",he="identified",me="[]",ge="(",ye=",",ve=")",be="extends",we="{",Ae="optional",$e="default",Ee="=",Te="o",Ce="regex",De="length",Fe="range",Ie="--\x3e",Se=".{",Ne=/^[\t\v-\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/,Oe=/^[\n\r\u2028\u2029]/,Me=/^[\r\u2028-\u2029]/,xe=/^[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u09FC\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60-\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD-\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0-\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD-\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,ke=/^[0-9_\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7\u09E2-\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2-\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62-\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B-\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62-\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18-\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1885-\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19D9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C-\u200D\u203F-\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099-\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880-\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C-\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5-\uAAF6\uABE3-\uABEA\uABEC-\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33-\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/,Pe=/^[+\-]/,Le=/^[0-9]/,Re=/^[1-9]/,_e=/^[0-9a-f]/i,Be=/^[\n\r"\\\u2028-\u2029]/,je=/^[\n\r'\\\u2028-\u2029]/,Ve=/^["'\\]/,Ue=/^[0-9ux]/,Qe=/^[*\\\/[]/,qe=/^[\\\/[]/,Ke=/^[\]\\]/,ze=/^[A-Za-z]/,We=/^[A-F]/i,He=/^[\--.0-9A-Z_a-z~]/,Ge=/^[+\--.0-9A-Za-z]/,Ye=/^[!$&-,:-;=]/,Je=/^[\--.0-:A-Z_a-z~]/,Xe=/^[0-5]/,Ze=/^[0-4]/,et=/^[!$&-,:-;=@]/,tt=/^[\/?]/,rt=/^[a-z0-9\-]/i,nt=/^[a-z\-]/i,ot={type:"any"},st=Ds("whitespace"),at=Cs(["\t",["\v","\f"]," "," "," ",[" "," "]," "," "," ","\ufeff"],!1,!1),it=Cs(["\n","\r","\u2028","\u2029"],!1,!1),ct=Ds("end of line"),lt=Ts("\n",!1),ut=Ts("\r\n",!1),pt=Cs(["\r",["\u2028","\u2029"]],!1,!1),dt=Ds("comment"),ft=Ts("/*",!1),ht=Ts("*/",!1),mt=Ts("//",!1),gt=Ds("identifier"),yt=Cs(["$",["A","Z"],"_",["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],["Ͷ","ͷ"],["ͺ","ͽ"],"Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԯ"],["Ա","Ֆ"],"ՙ",["ՠ","ֈ"],["א","ת"],["ׯ","ײ"],["ؠ","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۥ","ۦ"],["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ߴ","ߵ"],"ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],["ࡠ","ࡪ"],["ࡰ","ࢇ"],["ࢉ","ࢎ"],["ࢠ","ࣉ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],"ৼ",["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],"ౝ",["ౠ","ౡ"],"ಀ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ",["ೝ","ೞ"],["ೠ","ೡ"],["ೱ","ೲ"],["ഄ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൔ","ൖ"],["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๆ"],["ກ","ຂ"],"ຄ",["ຆ","ຊ"],["ຌ","ຣ"],"ລ",["ວ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏽ"],["ᏸ","ᏽ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛮ","ᛸ"],["ᜀ","ᜑ"],["ᜟ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡸ"],["ᢀ","ᢄ"],["ᢇ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭌ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᲀ","ᲈ"],["Ა","Ჺ"],["Ჽ","Ჿ"],["ᳩ","ᳬ"],["ᳮ","ᳳ"],["ᳵ","ᳶ"],"ᳺ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ",["Ⅰ","ↈ"],["Ⰰ","ⳤ"],["Ⳬ","ⳮ"],["Ⳳ","ⳳ"],["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ",["々","〇"],["〡","〩"],["〱","〵"],["〸","〼"],["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄯ"],["ㄱ","ㆎ"],["ㆠ","ㆿ"],["ㇰ","ㇿ"],["㐀","䶿"],["一","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],["Ꙁ","ꙮ"],["ꙿ","ꚝ"],["ꚠ","ꛯ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꟊ"],["Ꟑ","ꟑ"],"ꟓ",["ꟕ","ꟙ"],["ꟲ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꣽ","ꣾ"],["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꧠ","ꧤ"],["ꧦ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꬰ","ꭚ"],["ꭜ","ꭩ"],["ꭰ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),vt=Ts("\\",!1),bt=Cs([["0","9"],"_",["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","٩"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],["۰","۹"],"ܑ",["ܰ","݊"],["ަ","ް"],["߀","߉"],["߫","߳"],"߽",["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["࢘","࢟"],["࣊","࣡"],["ࣣ","ः"],["ऺ","़"],["ा","ॏ"],["॑","ॗ"],["ॢ","ॣ"],["०","९"],["ঁ","ঃ"],"়",["া","ৄ"],["ে","ৈ"],["ো","্"],"ৗ",["ৢ","ৣ"],["০","৯"],"৾",["ਁ","ਃ"],"਼",["ਾ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["੦","ੱ"],"ੵ",["ઁ","ઃ"],"઼",["ા","ૅ"],["ે","ૉ"],["ો","્"],["ૢ","ૣ"],["૦","૯"],["ૺ","૿"],["ଁ","ଃ"],"଼",["ା","ୄ"],["େ","ୈ"],["ୋ","୍"],["୕","ୗ"],["ୢ","ୣ"],["୦","୯"],"ஂ",["ா","ூ"],["ெ","ை"],["ொ","்"],"ௗ",["௦","௯"],["ఀ","ఄ"],"఼",["ా","ౄ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],["౦","౯"],["ಁ","ಃ"],"಼",["ಾ","ೄ"],["ೆ","ೈ"],["ೊ","್"],["ೕ","ೖ"],["ೢ","ೣ"],["೦","೯"],"ೳ",["ഀ","ഃ"],["഻","഼"],["ാ","ൄ"],["െ","ൈ"],["ൊ","്"],"ൗ",["ൢ","ൣ"],["൦","൯"],["ඁ","ඃ"],"්",["ා","ු"],"ූ",["ෘ","ෟ"],["෦","෯"],["ෲ","ෳ"],"ั",["ิ","ฺ"],["็","๎"],["๐","๙"],"ັ",["ິ","ຼ"],["່","໎"],["໐","໙"],["༘","༙"],["༠","༩"],"༵","༷","༹",["༾","༿"],["ཱ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ါ","ှ"],["၀","၉"],["ၖ","ၙ"],["ၞ","ၠ"],["ၢ","ၤ"],["ၧ","ၭ"],["ၱ","ၴ"],["ႂ","ႍ"],["ႏ","ႝ"],["፝","፟"],["ᜒ","᜕"],["ᜲ","᜴"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["឴","៓"],"៝",["០","៩"],["᠋","᠍"],["᠏","᠙"],["ᢅ","ᢆ"],"ᢩ",["ᤠ","ᤫ"],["ᤰ","᤻"],["᥆","᥏"],["᧐","᧙"],["ᨗ","ᨛ"],["ᩕ","ᩞ"],["᩠","᩼"],["᩿","᪉"],["᪐","᪙"],["᪰","᪽"],["ᪿ","ᫎ"],["ᬀ","ᬄ"],["᬴","᭄"],["᭐","᭙"],["᭫","᭳"],["ᮀ","ᮂ"],["ᮡ","ᮭ"],["᮰","᮹"],["᯦","᯳"],["ᰤ","᰷"],["᱀","᱉"],["᱐","᱙"],["᳐","᳒"],["᳔","᳨"],"᳭","᳴",["᳷","᳹"],["᷀","᷿"],["‌","‍"],["‿","⁀"],"⁔",["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〯"],["゙","゚"],["꘠","꘩"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠣ","ꠧ"],"꠬",["ꢀ","ꢁ"],["ꢴ","ꣅ"],["꣐","꣙"],["꣠","꣱"],["ꣿ","꤉"],["ꤦ","꤭"],["ꥇ","꥓"],["ꦀ","ꦃ"],["꦳","꧀"],["꧐","꧙"],"ꧥ",["꧰","꧹"],["ꨩ","ꨶ"],"ꩃ",["ꩌ","ꩍ"],["꩐","꩙"],["ꩻ","ꩽ"],"ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫫ","ꫯ"],["ꫵ","꫶"],["ꯣ","ꯪ"],["꯬","꯭"],["꯰","꯹"],"ﬞ",["︀","️"],["︠","︯"],["︳","︴"],["﹍","﹏"],["0","9"],"_"],!1,!1),wt=(Cs([["A","Z"],["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],["Ͷ","ͷ"],["ͺ","ͽ"],"Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԯ"],["Ա","Ֆ"],"ՙ",["ՠ","ֈ"],["א","ת"],["ׯ","ײ"],["ؠ","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۥ","ۦ"],["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ߴ","ߵ"],"ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],["ࡠ","ࡪ"],["ࡰ","ࢇ"],["ࢉ","ࢎ"],["ࢠ","ࣉ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],"ৼ",["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],"ౝ",["ౠ","ౡ"],"ಀ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ",["ೝ","ೞ"],["ೠ","ೡ"],["ೱ","ೲ"],["ഄ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൔ","ൖ"],["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๆ"],["ກ","ຂ"],"ຄ",["ຆ","ຊ"],["ຌ","ຣ"],"ລ",["ວ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏽ"],["ᏸ","ᏽ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛮ","ᛸ"],["ᜀ","ᜑ"],["ᜟ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡸ"],["ᢀ","ᢄ"],["ᢇ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭌ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᲀ","ᲈ"],["Ა","Ჺ"],["Ჽ","Ჿ"],["ᳩ","ᳬ"],["ᳮ","ᳳ"],["ᳵ","ᳶ"],"ᳺ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ",["Ⅰ","ↈ"],["Ⰰ","ⳤ"],["Ⳬ","ⳮ"],["Ⳳ","ⳳ"],["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ",["々","〇"],["〡","〩"],["〱","〵"],["〸","〼"],["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄯ"],["ㄱ","ㆎ"],["ㆠ","ㆿ"],["ㇰ","ㇿ"],["㐀","䶿"],["一","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],["Ꙁ","ꙮ"],["ꙿ","ꚝ"],["ꚠ","ꛯ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꟊ"],["Ꟑ","ꟑ"],"ꟓ",["ꟕ","ꟙ"],["ꟲ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꣽ","ꣾ"],["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꧠ","ꧤ"],["ꧦ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꬰ","ꭚ"],["ꭜ","ꭩ"],["ꭰ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Cs([["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","ٟ"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],"ܑ",["ܰ","݊"],["ަ","ް"],["߫","߳"],"߽",["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["࢘","࢟"],["࣊","࣡"],["ࣣ","ः"],["ऺ","़"],["ा","ॏ"],["॑","ॗ"],["ॢ","ॣ"],["ঁ","ঃ"],"়",["া","ৄ"],["ে","ৈ"],["ো","্"],"ৗ",["ৢ","ৣ"],"৾",["ਁ","ਃ"],"਼",["ਾ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["ੰ","ੱ"],"ੵ",["ઁ","ઃ"],"઼",["ા","ૅ"],["ે","ૉ"],["ો","્"],["ૢ","ૣ"],["ૺ","૿"],["ଁ","ଃ"],"଼",["ା","ୄ"],["େ","ୈ"],["ୋ","୍"],["୕","ୗ"],["ୢ","ୣ"],"ஂ",["ா","ூ"],["ெ","ை"],["ொ","்"],"ௗ",["ఀ","ఄ"],"఼",["ా","ౄ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],["ಁ","ಃ"],"಼",["ಾ","ೄ"],["ೆ","ೈ"],["ೊ","್"],["ೕ","ೖ"],["ೢ","ೣ"],"ೳ",["ഀ","ഃ"],["഻","഼"],["ാ","ൄ"],["െ","ൈ"],["ൊ","്"],"ൗ",["ൢ","ൣ"],["ඁ","ඃ"],"්",["ා","ු"],"ූ",["ෘ","ෟ"],["ෲ","ෳ"],"ั",["ิ","ฺ"],["็","๎"],"ັ",["ິ","ຼ"],["່","໎"],["༘","༙"],"༵","༷","༹",["༾","༿"],["ཱ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ါ","ှ"],["ၖ","ၙ"],["ၞ","ၠ"],["ၢ","ၤ"],["ၧ","ၭ"],["ၱ","ၴ"],["ႂ","ႍ"],"ႏ",["ႚ","ႝ"],["፝","፟"],["ᜒ","᜕"],["ᜲ","᜴"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["឴","៓"],"៝",["᠋","᠍"],"᠏",["ᢅ","ᢆ"],"ᢩ",["ᤠ","ᤫ"],["ᤰ","᤻"],["ᨗ","ᨛ"],["ᩕ","ᩞ"],["᩠","᩼"],"᩿",["᪰","᪽"],["ᪿ","ᫎ"],["ᬀ","ᬄ"],["᬴","᭄"],["᭫","᭳"],["ᮀ","ᮂ"],["ᮡ","ᮭ"],["᯦","᯳"],["ᰤ","᰷"],["᳐","᳒"],["᳔","᳨"],"᳭","᳴",["᳷","᳹"],["᷀","᷿"],["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〯"],["゙","゚"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠣ","ꠧ"],"꠬",["ꢀ","ꢁ"],["ꢴ","ꣅ"],["꣠","꣱"],"ꣿ",["ꤦ","꤭"],["ꥇ","꥓"],["ꦀ","ꦃ"],["꦳","꧀"],"ꧥ",["ꨩ","ꨶ"],"ꩃ",["ꩌ","ꩍ"],["ꩻ","ꩽ"],"ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫫ","ꫯ"],["ꫵ","꫶"],["ꯣ","ꯪ"],["꯬","꯭"],"ﬞ",["︀","️"],["︠","︯"]],!1,!1),Ds("number")),At=Ts(".",!1),$t=Cs(["+","-"],!1,!1),Et=Ts("0",!1),Tt=Cs([["0","9"]],!1,!1),Ct=Cs([["1","9"]],!1,!1),Dt=Ts("e",!0),Ft=Ts("0x",!0),It=Cs([["0","9"],["a","f"]],!1,!0),St=Ds("string"),Nt=Ts('"',!1),Ot=Ts("'",!1),Mt=Cs(["\n","\r",'"',"\\",["\u2028","\u2029"]],!1,!1),xt=Cs(["\n","\r","'","\\",["\u2028","\u2029"]],!1,!1),kt=Cs(['"',"'","\\"],!1,!1),Pt=Ts("b",!1),Lt=Ts("f",!1),Rt=Ts("n",!1),_t=Ts("r",!1),Bt=Ts("t",!1),jt=Ts("v",!1),Vt=Cs([["0","9"],"u","x"],!1,!1),Ut=Ts("x",!1),Qt=Ts("u",!1),qt=Ds("regular expression"),Kt=Ts("/",!1),zt=Cs(["*","\\","/","["],!1,!1),Wt=Cs(["\\","/","["],!1,!1),Ht=Ts("[",!1),Gt=Ts("]",!1),Yt=Cs(["]","\\"],!1,!1),Jt=(Cs([["a","z"],"µ",["ß","ö"],["ø","ÿ"],"ā","ă","ą","ć","ĉ","ċ","č","ď","đ","ē","ĕ","ė","ę","ě","ĝ","ğ","ġ","ģ","ĥ","ħ","ĩ","ī","ĭ","į","ı","ij","ĵ",["ķ","ĸ"],"ĺ","ļ","ľ","ŀ","ł","ń","ņ",["ň","ʼn"],"ŋ","ō","ŏ","ő","œ","ŕ","ŗ","ř","ś","ŝ","ş","š","ţ","ť","ŧ","ũ","ū","ŭ","ů","ű","ų","ŵ","ŷ","ź","ż",["ž","ƀ"],"ƃ","ƅ","ƈ",["ƌ","ƍ"],"ƒ","ƕ",["ƙ","ƛ"],"ƞ","ơ","ƣ","ƥ","ƨ",["ƪ","ƫ"],"ƭ","ư","ƴ","ƶ",["ƹ","ƺ"],["ƽ","ƿ"],"dž","lj","nj","ǎ","ǐ","ǒ","ǔ","ǖ","ǘ","ǚ",["ǜ","ǝ"],"ǟ","ǡ","ǣ","ǥ","ǧ","ǩ","ǫ","ǭ",["ǯ","ǰ"],"dz","ǵ","ǹ","ǻ","ǽ","ǿ","ȁ","ȃ","ȅ","ȇ","ȉ","ȋ","ȍ","ȏ","ȑ","ȓ","ȕ","ȗ","ș","ț","ȝ","ȟ","ȡ","ȣ","ȥ","ȧ","ȩ","ȫ","ȭ","ȯ","ȱ",["ȳ","ȹ"],"ȼ",["ȿ","ɀ"],"ɂ","ɇ","ɉ","ɋ","ɍ",["ɏ","ʓ"],["ʕ","ʯ"],"ͱ","ͳ","ͷ",["ͻ","ͽ"],"ΐ",["ά","ώ"],["ϐ","ϑ"],["ϕ","ϗ"],"ϙ","ϛ","ϝ","ϟ","ϡ","ϣ","ϥ","ϧ","ϩ","ϫ","ϭ",["ϯ","ϳ"],"ϵ","ϸ",["ϻ","ϼ"],["а","џ"],"ѡ","ѣ","ѥ","ѧ","ѩ","ѫ","ѭ","ѯ","ѱ","ѳ","ѵ","ѷ","ѹ","ѻ","ѽ","ѿ","ҁ","ҋ","ҍ","ҏ","ґ","ғ","ҕ","җ","ҙ","қ","ҝ","ҟ","ҡ","ң","ҥ","ҧ","ҩ","ҫ","ҭ","ү","ұ","ҳ","ҵ","ҷ","ҹ","һ","ҽ","ҿ","ӂ","ӄ","ӆ","ӈ","ӊ","ӌ",["ӎ","ӏ"],"ӑ","ӓ","ӕ","ӗ","ә","ӛ","ӝ","ӟ","ӡ","ӣ","ӥ","ӧ","ө","ӫ","ӭ","ӯ","ӱ","ӳ","ӵ","ӷ","ӹ","ӻ","ӽ","ӿ","ԁ","ԃ","ԅ","ԇ","ԉ","ԋ","ԍ","ԏ","ԑ","ԓ","ԕ","ԗ","ԙ","ԛ","ԝ","ԟ","ԡ","ԣ","ԥ","ԧ","ԩ","ԫ","ԭ","ԯ",["ՠ","ֈ"],["ა","ჺ"],["ჽ","ჿ"],["ᏸ","ᏽ"],["ᲀ","ᲈ"],["ᴀ","ᴫ"],["ᵫ","ᵷ"],["ᵹ","ᶚ"],"ḁ","ḃ","ḅ","ḇ","ḉ","ḋ","ḍ","ḏ","ḑ","ḓ","ḕ","ḗ","ḙ","ḛ","ḝ","ḟ","ḡ","ḣ","ḥ","ḧ","ḩ","ḫ","ḭ","ḯ","ḱ","ḳ","ḵ","ḷ","ḹ","ḻ","ḽ","ḿ","ṁ","ṃ","ṅ","ṇ","ṉ","ṋ","ṍ","ṏ","ṑ","ṓ","ṕ","ṗ","ṙ","ṛ","ṝ","ṟ","ṡ","ṣ","ṥ","ṧ","ṩ","ṫ","ṭ","ṯ","ṱ","ṳ","ṵ","ṷ","ṹ","ṻ","ṽ","ṿ","ẁ","ẃ","ẅ","ẇ","ẉ","ẋ","ẍ","ẏ","ẑ","ẓ",["ẕ","ẝ"],"ẟ","ạ","ả","ấ","ầ","ẩ","ẫ","ậ","ắ","ằ","ẳ","ẵ","ặ","ẹ","ẻ","ẽ","ế","ề","ể","ễ","ệ","ỉ","ị","ọ","ỏ","ố","ồ","ổ","ỗ","ộ","ớ","ờ","ở","ỡ","ợ","ụ","ủ","ứ","ừ","ử","ữ","ự","ỳ","ỵ","ỷ","ỹ","ỻ","ỽ",["ỿ","ἇ"],["ἐ","ἕ"],["ἠ","ἧ"],["ἰ","ἷ"],["ὀ","ὅ"],["ὐ","ὗ"],["ὠ","ὧ"],["ὰ","ώ"],["ᾀ","ᾇ"],["ᾐ","ᾗ"],["ᾠ","ᾧ"],["ᾰ","ᾴ"],["ᾶ","ᾷ"],"ι",["ῂ","ῄ"],["ῆ","ῇ"],["ῐ","ΐ"],["ῖ","ῗ"],["ῠ","ῧ"],["ῲ","ῴ"],["ῶ","ῷ"],"ℊ",["ℎ","ℏ"],"ℓ","ℯ","ℴ","ℹ",["ℼ","ℽ"],["ⅆ","ⅉ"],"ⅎ","ↄ",["ⰰ","ⱟ"],"ⱡ",["ⱥ","ⱦ"],"ⱨ","ⱪ","ⱬ","ⱱ",["ⱳ","ⱴ"],["ⱶ","ⱻ"],"ⲁ","ⲃ","ⲅ","ⲇ","ⲉ","ⲋ","ⲍ","ⲏ","ⲑ","ⲓ","ⲕ","ⲗ","ⲙ","ⲛ","ⲝ","ⲟ","ⲡ","ⲣ","ⲥ","ⲧ","ⲩ","ⲫ","ⲭ","ⲯ","ⲱ","ⲳ","ⲵ","ⲷ","ⲹ","ⲻ","ⲽ","ⲿ","ⳁ","ⳃ","ⳅ","ⳇ","ⳉ","ⳋ","ⳍ","ⳏ","ⳑ","ⳓ","ⳕ","ⳗ","ⳙ","ⳛ","ⳝ","ⳟ","ⳡ",["ⳣ","ⳤ"],"ⳬ","ⳮ","ⳳ",["ⴀ","ⴥ"],"ⴧ","ⴭ","ꙁ","ꙃ","ꙅ","ꙇ","ꙉ","ꙋ","ꙍ","ꙏ","ꙑ","ꙓ","ꙕ","ꙗ","ꙙ","ꙛ","ꙝ","ꙟ","ꙡ","ꙣ","ꙥ","ꙧ","ꙩ","ꙫ","ꙭ","ꚁ","ꚃ","ꚅ","ꚇ","ꚉ","ꚋ","ꚍ","ꚏ","ꚑ","ꚓ","ꚕ","ꚗ","ꚙ","ꚛ","ꜣ","ꜥ","ꜧ","ꜩ","ꜫ","ꜭ",["ꜯ","ꜱ"],"ꜳ","ꜵ","ꜷ","ꜹ","ꜻ","ꜽ","ꜿ","ꝁ","ꝃ","ꝅ","ꝇ","ꝉ","ꝋ","ꝍ","ꝏ","ꝑ","ꝓ","ꝕ","ꝗ","ꝙ","ꝛ","ꝝ","ꝟ","ꝡ","ꝣ","ꝥ","ꝧ","ꝩ","ꝫ","ꝭ","ꝯ",["ꝱ","ꝸ"],"ꝺ","ꝼ","ꝿ","ꞁ","ꞃ","ꞅ","ꞇ","ꞌ","ꞎ","ꞑ",["ꞓ","ꞕ"],"ꞗ","ꞙ","ꞛ","ꞝ","ꞟ","ꞡ","ꞣ","ꞥ","ꞧ","ꞩ","ꞯ","ꞵ","ꞷ","ꞹ","ꞻ","ꞽ","ꞿ","ꟁ","ꟃ","ꟈ","ꟊ","ꟑ","ꟓ","ꟕ","ꟗ","ꟙ","ꟶ","ꟺ",["ꬰ","ꭚ"],["ꭠ","ꭨ"],["ꭰ","ꮿ"],["ff","st"],["ﬓ","ﬗ"],["a","z"]],!1,!1),Cs([["ʰ","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ","ʹ","ͺ","ՙ","ـ",["ۥ","ۦ"],["ߴ","ߵ"],"ߺ","ࠚ","ࠤ","ࠨ","ࣉ","ॱ","ๆ","ໆ","ჼ","ៗ","ᡃ","ᪧ",["ᱸ","ᱽ"],["ᴬ","ᵪ"],"ᵸ",["ᶛ","ᶿ"],"ⁱ","ⁿ",["ₐ","ₜ"],["ⱼ","ⱽ"],"ⵯ","ⸯ","々",["〱","〵"],"〻",["ゝ","ゞ"],["ー","ヾ"],"ꀕ",["ꓸ","ꓽ"],"ꘌ","ꙿ",["ꚜ","ꚝ"],["ꜗ","ꜟ"],"ꝰ","ꞈ",["ꟲ","ꟴ"],["ꟸ","ꟹ"],"ꧏ","ꧦ","ꩰ","ꫝ",["ꫳ","ꫴ"],["ꭜ","ꭟ"],"ꭩ","ー",["゙","゚"]],!1,!1),Cs(["ª","º","ƻ",["ǀ","ǃ"],"ʔ",["א","ת"],["ׯ","ײ"],["ؠ","ؿ"],["ف","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ࠀ","ࠕ"],["ࡀ","ࡘ"],["ࡠ","ࡪ"],["ࡰ","ࢇ"],["ࢉ","ࢎ"],["ࢠ","ࣈ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॲ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],"ৼ",["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],"ౝ",["ౠ","ౡ"],"ಀ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ",["ೝ","ೞ"],["ೠ","ೡ"],["ೱ","ೲ"],["ഄ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൔ","ൖ"],["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๅ"],["ກ","ຂ"],"ຄ",["ຆ","ຊ"],["ຌ","ຣ"],"ລ",["ວ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["ᄀ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛱ","ᛸ"],["ᜀ","ᜑ"],["ᜟ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៜ",["ᠠ","ᡂ"],["ᡄ","ᡸ"],["ᢀ","ᢄ"],["ᢇ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],["ᬅ","ᬳ"],["ᭅ","ᭌ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱷ"],["ᳩ","ᳬ"],["ᳮ","ᳳ"],["ᳵ","ᳶ"],"ᳺ",["ℵ","ℸ"],["ⴰ","ⵧ"],["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"〆","〼",["ぁ","ゖ"],"ゟ",["ァ","ヺ"],"ヿ",["ㄅ","ㄯ"],["ㄱ","ㆎ"],["ㆠ","ㆿ"],["ㇰ","ㇿ"],["㐀","䶿"],["一","ꀔ"],["ꀖ","ꒌ"],["ꓐ","ꓷ"],["ꔀ","ꘋ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],"ꙮ",["ꚠ","ꛥ"],"ꞏ","ꟷ",["ꟻ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꣽ","ꣾ"],["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],["ꧠ","ꧤ"],["ꧧ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩯ"],["ꩱ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫜ"],["ꫠ","ꫪ"],"ꫲ",["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꯀ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["ヲ","ッ"],["ア","ン"],["ᅠ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Cs(["Dž","Lj","Nj","Dz",["ᾈ","ᾏ"],["ᾘ","ᾟ"],["ᾨ","ᾯ"],"ᾼ","ῌ","ῼ"],!1,!1),Cs([["A","Z"],["À","Ö"],["Ø","Þ"],"Ā","Ă","Ą","Ć","Ĉ","Ċ","Č","Ď","Đ","Ē","Ĕ","Ė","Ę","Ě","Ĝ","Ğ","Ġ","Ģ","Ĥ","Ħ","Ĩ","Ī","Ĭ","Į","İ","IJ","Ĵ","Ķ","Ĺ","Ļ","Ľ","Ŀ","Ł","Ń","Ņ","Ň","Ŋ","Ō","Ŏ","Ő","Œ","Ŕ","Ŗ","Ř","Ś","Ŝ","Ş","Š","Ţ","Ť","Ŧ","Ũ","Ū","Ŭ","Ů","Ű","Ų","Ŵ","Ŷ",["Ÿ","Ź"],"Ż","Ž",["Ɓ","Ƃ"],"Ƅ",["Ɔ","Ƈ"],["Ɖ","Ƌ"],["Ǝ","Ƒ"],["Ɠ","Ɣ"],["Ɩ","Ƙ"],["Ɯ","Ɲ"],["Ɵ","Ơ"],"Ƣ","Ƥ",["Ʀ","Ƨ"],"Ʃ","Ƭ",["Ʈ","Ư"],["Ʊ","Ƴ"],"Ƶ",["Ʒ","Ƹ"],"Ƽ","DŽ","LJ","NJ","Ǎ","Ǐ","Ǒ","Ǔ","Ǖ","Ǘ","Ǚ","Ǜ","Ǟ","Ǡ","Ǣ","Ǥ","Ǧ","Ǩ","Ǫ","Ǭ","Ǯ","DZ","Ǵ",["Ƕ","Ǹ"],"Ǻ","Ǽ","Ǿ","Ȁ","Ȃ","Ȅ","Ȇ","Ȉ","Ȋ","Ȍ","Ȏ","Ȑ","Ȓ","Ȕ","Ȗ","Ș","Ț","Ȝ","Ȟ","Ƞ","Ȣ","Ȥ","Ȧ","Ȩ","Ȫ","Ȭ","Ȯ","Ȱ","Ȳ",["Ⱥ","Ȼ"],["Ƚ","Ⱦ"],"Ɂ",["Ƀ","Ɇ"],"Ɉ","Ɋ","Ɍ","Ɏ","Ͱ","Ͳ","Ͷ","Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ώ"],["Α","Ρ"],["Σ","Ϋ"],"Ϗ",["ϒ","ϔ"],"Ϙ","Ϛ","Ϝ","Ϟ","Ϡ","Ϣ","Ϥ","Ϧ","Ϩ","Ϫ","Ϭ","Ϯ","ϴ","Ϸ",["Ϲ","Ϻ"],["Ͻ","Я"],"Ѡ","Ѣ","Ѥ","Ѧ","Ѩ","Ѫ","Ѭ","Ѯ","Ѱ","Ѳ","Ѵ","Ѷ","Ѹ","Ѻ","Ѽ","Ѿ","Ҁ","Ҋ","Ҍ","Ҏ","Ґ","Ғ","Ҕ","Җ","Ҙ","Қ","Ҝ","Ҟ","Ҡ","Ң","Ҥ","Ҧ","Ҩ","Ҫ","Ҭ","Ү","Ұ","Ҳ","Ҵ","Ҷ","Ҹ","Һ","Ҽ","Ҿ",["Ӏ","Ӂ"],"Ӄ","Ӆ","Ӈ","Ӊ","Ӌ","Ӎ","Ӑ","Ӓ","Ӕ","Ӗ","Ә","Ӛ","Ӝ","Ӟ","Ӡ","Ӣ","Ӥ","Ӧ","Ө","Ӫ","Ӭ","Ӯ","Ӱ","Ӳ","Ӵ","Ӷ","Ӹ","Ӻ","Ӽ","Ӿ","Ԁ","Ԃ","Ԅ","Ԇ","Ԉ","Ԋ","Ԍ","Ԏ","Ԑ","Ԓ","Ԕ","Ԗ","Ԙ","Ԛ","Ԝ","Ԟ","Ԡ","Ԣ","Ԥ","Ԧ","Ԩ","Ԫ","Ԭ","Ԯ",["Ա","Ֆ"],["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["Ꭰ","Ᏽ"],["Ა","Ჺ"],["Ჽ","Ჿ"],"Ḁ","Ḃ","Ḅ","Ḇ","Ḉ","Ḋ","Ḍ","Ḏ","Ḑ","Ḓ","Ḕ","Ḗ","Ḙ","Ḛ","Ḝ","Ḟ","Ḡ","Ḣ","Ḥ","Ḧ","Ḩ","Ḫ","Ḭ","Ḯ","Ḱ","Ḳ","Ḵ","Ḷ","Ḹ","Ḻ","Ḽ","Ḿ","Ṁ","Ṃ","Ṅ","Ṇ","Ṉ","Ṋ","Ṍ","Ṏ","Ṑ","Ṓ","Ṕ","Ṗ","Ṙ","Ṛ","Ṝ","Ṟ","Ṡ","Ṣ","Ṥ","Ṧ","Ṩ","Ṫ","Ṭ","Ṯ","Ṱ","Ṳ","Ṵ","Ṷ","Ṹ","Ṻ","Ṽ","Ṿ","Ẁ","Ẃ","Ẅ","Ẇ","Ẉ","Ẋ","Ẍ","Ẏ","Ẑ","Ẓ","Ẕ","ẞ","Ạ","Ả","Ấ","Ầ","Ẩ","Ẫ","Ậ","Ắ","Ằ","Ẳ","Ẵ","Ặ","Ẹ","Ẻ","Ẽ","Ế","Ề","Ể","Ễ","Ệ","Ỉ","Ị","Ọ","Ỏ","Ố","Ồ","Ổ","Ỗ","Ộ","Ớ","Ờ","Ở","Ỡ","Ợ","Ụ","Ủ","Ứ","Ừ","Ử","Ữ","Ự","Ỳ","Ỵ","Ỷ","Ỹ","Ỻ","Ỽ","Ỿ",["Ἀ","Ἇ"],["Ἐ","Ἕ"],["Ἠ","Ἧ"],["Ἰ","Ἷ"],["Ὀ","Ὅ"],"Ὑ","Ὓ","Ὕ","Ὗ",["Ὠ","Ὧ"],["Ᾰ","Ά"],["Ὲ","Ή"],["Ῐ","Ί"],["Ῠ","Ῥ"],["Ὸ","Ώ"],"ℂ","ℇ",["ℋ","ℍ"],["ℐ","ℒ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℰ","ℳ"],["ℾ","ℿ"],"ⅅ","Ↄ",["Ⰰ","Ⱟ"],"Ⱡ",["Ɫ","Ɽ"],"Ⱨ","Ⱪ","Ⱬ",["Ɑ","Ɒ"],"Ⱳ","Ⱶ",["Ȿ","Ⲁ"],"Ⲃ","Ⲅ","Ⲇ","Ⲉ","Ⲋ","Ⲍ","Ⲏ","Ⲑ","Ⲓ","Ⲕ","Ⲗ","Ⲙ","Ⲛ","Ⲝ","Ⲟ","Ⲡ","Ⲣ","Ⲥ","Ⲧ","Ⲩ","Ⲫ","Ⲭ","Ⲯ","Ⲱ","Ⲳ","Ⲵ","Ⲷ","Ⲹ","Ⲻ","Ⲽ","Ⲿ","Ⳁ","Ⳃ","Ⳅ","Ⳇ","Ⳉ","Ⳋ","Ⳍ","Ⳏ","Ⳑ","Ⳓ","Ⳕ","Ⳗ","Ⳙ","Ⳛ","Ⳝ","Ⳟ","Ⳡ","Ⳣ","Ⳬ","Ⳮ","Ⳳ","Ꙁ","Ꙃ","Ꙅ","Ꙇ","Ꙉ","Ꙋ","Ꙍ","Ꙏ","Ꙑ","Ꙓ","Ꙕ","Ꙗ","Ꙙ","Ꙛ","Ꙝ","Ꙟ","Ꙡ","Ꙣ","Ꙥ","Ꙧ","Ꙩ","Ꙫ","Ꙭ","Ꚁ","Ꚃ","Ꚅ","Ꚇ","Ꚉ","Ꚋ","Ꚍ","Ꚏ","Ꚑ","Ꚓ","Ꚕ","Ꚗ","Ꚙ","Ꚛ","Ꜣ","Ꜥ","Ꜧ","Ꜩ","Ꜫ","Ꜭ","Ꜯ","Ꜳ","Ꜵ","Ꜷ","Ꜹ","Ꜻ","Ꜽ","Ꜿ","Ꝁ","Ꝃ","Ꝅ","Ꝇ","Ꝉ","Ꝋ","Ꝍ","Ꝏ","Ꝑ","Ꝓ","Ꝕ","Ꝗ","Ꝙ","Ꝛ","Ꝝ","Ꝟ","Ꝡ","Ꝣ","Ꝥ","Ꝧ","Ꝩ","Ꝫ","Ꝭ","Ꝯ","Ꝺ","Ꝼ",["Ᵹ","Ꝿ"],"Ꞁ","Ꞃ","Ꞅ","Ꞇ","Ꞌ","Ɥ","Ꞑ","Ꞓ","Ꞗ","Ꞙ","Ꞛ","Ꞝ","Ꞟ","Ꞡ","Ꞣ","Ꞥ","Ꞧ","Ꞩ",["Ɦ","Ɪ"],["Ʞ","Ꞵ"],"Ꞷ","Ꞹ","Ꞻ","Ꞽ","Ꞿ","Ꟁ","Ꟃ",["Ꞔ","Ꟈ"],"Ꟊ","Ꟑ","Ꟗ","Ꟙ","Ꟶ",["A","Z"]],!1,!1),Cs(["ः","ऻ",["ा","ी"],["ॉ","ौ"],["ॎ","ॏ"],["ং","ঃ"],["া","ী"],["ে","ৈ"],["ো","ৌ"],"ৗ","ਃ",["ਾ","ੀ"],"ઃ",["ા","ી"],"ૉ",["ો","ૌ"],["ଂ","ଃ"],"ା","ୀ",["େ","ୈ"],["ୋ","ୌ"],"ୗ",["ா","ி"],["ு","ூ"],["ெ","ை"],["ொ","ௌ"],"ௗ",["ఁ","ః"],["ు","ౄ"],["ಂ","ಃ"],"ಾ",["ೀ","ೄ"],["ೇ","ೈ"],["ೊ","ೋ"],["ೕ","ೖ"],"ೳ",["ം","ഃ"],["ാ","ീ"],["െ","ൈ"],["ൊ","ൌ"],"ൗ",["ං","ඃ"],["ා","ෑ"],["ෘ","ෟ"],["ෲ","ෳ"],["༾","༿"],"ཿ",["ါ","ာ"],"ေ","း",["ျ","ြ"],["ၖ","ၗ"],["ၢ","ၤ"],["ၧ","ၭ"],["ႃ","ႄ"],["ႇ","ႌ"],"ႏ",["ႚ","ႜ"],"᜕","᜴","ា",["ើ","ៅ"],["ះ","ៈ"],["ᤣ","ᤦ"],["ᤩ","ᤫ"],["ᤰ","ᤱ"],["ᤳ","ᤸ"],["ᨙ","ᨚ"],"ᩕ","ᩗ","ᩡ",["ᩣ","ᩤ"],["ᩭ","ᩲ"],"ᬄ","ᬵ","ᬻ",["ᬽ","ᭁ"],["ᭃ","᭄"],"ᮂ","ᮡ",["ᮦ","ᮧ"],"᮪","ᯧ",["ᯪ","ᯬ"],"ᯮ",["᯲","᯳"],["ᰤ","ᰫ"],["ᰴ","ᰵ"],"᳡","᳷",["〮","〯"],["ꠣ","ꠤ"],"ꠧ",["ꢀ","ꢁ"],["ꢴ","ꣃ"],["ꥒ","꥓"],"ꦃ",["ꦴ","ꦵ"],["ꦺ","ꦻ"],["ꦾ","꧀"],["ꨯ","ꨰ"],["ꨳ","ꨴ"],"ꩍ","ꩻ","ꩽ","ꫫ",["ꫮ","ꫯ"],"ꫵ",["ꯣ","ꯤ"],["ꯦ","ꯧ"],["ꯩ","ꯪ"],"꯬"],!1,!1),Cs([["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","ٟ"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],"ܑ",["ܰ","݊"],["ަ","ް"],["߫","߳"],"߽",["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["࢘","࢟"],["࣊","࣡"],["ࣣ","ं"],"ऺ","़",["ु","ै"],"्",["॑","ॗ"],["ॢ","ॣ"],"ঁ","়",["ু","ৄ"],"্",["ৢ","ৣ"],"৾",["ਁ","ਂ"],"਼",["ੁ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["ੰ","ੱ"],"ੵ",["ઁ","ં"],"઼",["ુ","ૅ"],["ે","ૈ"],"્",["ૢ","ૣ"],["ૺ","૿"],"ଁ","଼","ି",["ୁ","ୄ"],"୍",["୕","ୖ"],["ୢ","ୣ"],"ஂ","ீ","்","ఀ","ఄ","఼",["ా","ీ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],"ಁ","಼","ಿ","ೆ",["ೌ","್"],["ೢ","ೣ"],["ഀ","ഁ"],["഻","഼"],["ു","ൄ"],"്",["ൢ","ൣ"],"ඁ","්",["ි","ු"],"ූ","ั",["ิ","ฺ"],["็","๎"],"ັ",["ິ","ຼ"],["່","໎"],["༘","༙"],"༵","༷","༹",["ཱ","ཾ"],["ྀ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ိ","ူ"],["ဲ","့"],["္","်"],["ွ","ှ"],["ၘ","ၙ"],["ၞ","ၠ"],["ၱ","ၴ"],"ႂ",["ႅ","ႆ"],"ႍ","ႝ",["፝","፟"],["ᜒ","᜔"],["ᜲ","ᜳ"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["឴","឵"],["ិ","ួ"],"ំ",["៉","៓"],"៝",["᠋","᠍"],"᠏",["ᢅ","ᢆ"],"ᢩ",["ᤠ","ᤢ"],["ᤧ","ᤨ"],"ᤲ",["᤹","᤻"],["ᨗ","ᨘ"],"ᨛ","ᩖ",["ᩘ","ᩞ"],"᩠","ᩢ",["ᩥ","ᩬ"],["ᩳ","᩼"],"᩿",["᪰","᪽"],["ᪿ","ᫎ"],["ᬀ","ᬃ"],"᬴",["ᬶ","ᬺ"],"ᬼ","ᭂ",["᭫","᭳"],["ᮀ","ᮁ"],["ᮢ","ᮥ"],["ᮨ","ᮩ"],["᮫","ᮭ"],"᯦",["ᯨ","ᯩ"],"ᯭ",["ᯯ","ᯱ"],["ᰬ","ᰳ"],["ᰶ","᰷"],["᳐","᳒"],["᳔","᳠"],["᳢","᳨"],"᳭","᳴",["᳸","᳹"],["᷀","᷿"],["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〭"],["゙","゚"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠥ","ꠦ"],"꠬",["꣄","ꣅ"],["꣠","꣱"],"ꣿ",["ꤦ","꤭"],["ꥇ","ꥑ"],["ꦀ","ꦂ"],"꦳",["ꦶ","ꦹ"],["ꦼ","ꦽ"],"ꧥ",["ꨩ","ꨮ"],["ꨱ","ꨲ"],["ꨵ","ꨶ"],"ꩃ","ꩌ","ꩼ","ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫬ","ꫭ"],"꫶","ꯥ","ꯨ","꯭","ﬞ",["︀","️"],["︠","︯"]],!1,!1),Cs([["0","9"],["٠","٩"],["۰","۹"],["߀","߉"],["०","९"],["০","৯"],["੦","੯"],["૦","૯"],["୦","୯"],["௦","௯"],["౦","౯"],["೦","೯"],["൦","൯"],["෦","෯"],["๐","๙"],["໐","໙"],["༠","༩"],["၀","၉"],["႐","႙"],["០","៩"],["᠐","᠙"],["᥆","᥏"],["᧐","᧙"],["᪀","᪉"],["᪐","᪙"],["᭐","᭙"],["᮰","᮹"],["᱀","᱉"],["᱐","᱙"],["꘠","꘩"],["꣐","꣙"],["꤀","꤉"],["꧐","꧙"],["꧰","꧹"],["꩐","꩙"],["꯰","꯹"],["0","9"]],!1,!1),Cs([["ᛮ","ᛰ"],["Ⅰ","ↂ"],["ↅ","ↈ"],"〇",["〡","〩"],["〸","〺"],["ꛦ","ꛯ"]],!1,!1),Cs(["_",["‿","⁀"],"⁔",["︳","︴"],["﹍","﹏"],"_"],!1,!1),Cs([" "," "," ",[" "," "]," "," "," "],!1,!1),Ts("enum",!1)),Xt=Ts("map",!1),Zt=Ts("false",!1),er=Ts("import",!1),tr=(Ts("null",!1),Ts("true",!1)),rr=Ts("as",!1),nr=(Ts(";",!1),Ts("}",!1)),or=Cs([["A","Z"],["a","z"]],!1,!1),sr=(Cs([["0","1"]],!1,!1),Cs([["",""]],!1,!1),Ts("\r",!1),Cs([["\0",""],""],!1,!1),Cs(['"'],!1,!1),Cs([["A","F"]],!1,!0)),ar=(Ts("\t",!1),Cs([["\0","ÿ"]],!1,!1),Ts(" ",!1),Cs([["!","~"]],!1,!1),Cs(["\t"," "],!1,!1),Ts("%",!1)),ir=(Cs(["!",["#","$"],["&",","],"/",[":",";"],"=",["?","@"],"[","]"],!1,!1),Cs(["#","/",":",["?","@"],"[","]"],!1,!1),Cs(["!","$",["&",","],";","="],!1,!1),Cs([["-","."],["0","9"],["A","Z"],"_",["a","z"],"~"],!1,!1)),cr=Ts(":",!1),lr=Ts("?",!1),ur=Ts("#",!1),pr=Cs(["+",["-","."],["0","9"],["A","Z"],["a","z"]],!1,!1),dr=Ts("@",!1),fr=Cs(["!","$",["&",","],[":",";"],"="],!1,!1),hr=Cs([["-","."],["0",":"],["A","Z"],"_",["a","z"],"~"],!1,!1),mr=Ts("::",!1),gr=Ts("25",!1),yr=Cs([["0","5"]],!1,!1),vr=Ts("2",!1),br=Cs([["0","4"]],!1,!1),wr=Ts("1",!1),Ar=(Cs(["!","$",["&",","],";","=","@"],!1,!1),Cs(["!","$",["&",","],[":",";"],"=","@"],!1,!1)),$r=Cs(["/","?"],!1,!1),Er=Ts("-",!1),Tr=Ts("+",!1),Cr=Cs([["a","z"],["0","9"],"-"],!1,!0),Dr=Cs([["a","z"],"-"],!1,!0),Fr=Ts("concerto",!1),Ir=Ts("version",!1),Sr=Ts("namespace",!1),Nr=Ts("abstract",!1),Or=Ts("concept",!1),Mr=Ts("asset",!1),xr=Ts("transaction",!1),kr=Ts("event",!1),Pr=Ts("participant",!1),Lr=Ts("scalar",!1),Rr=Ts("from",!1),_r=Ts("*",!1),Br=Ts("Integer",!1),jr=Ts("Double",!1),Vr=Ts("Long",!1),Ur=Ts("String",!1),Qr=Ts("DateTime",!1),qr=Ts("Boolean",!1),Kr=Ts("identified by",!1),zr=Ts("identified",!1),Wr=Ts("[]",!1),Hr=Ts("(",!1),Gr=Ts(",",!1),Yr=Ts(")",!1),Jr=Ts("extends",!1),Xr=Ts("{",!1),Zr=Ts("optional",!1),en=Ts("default",!1),tn=Ts("=",!1),rn=Ts("o",!1),nn=Ts("regex",!1),on=Ts("length",!1),sn=Ts("range",!1),an=Ts("--\x3e",!1),cn=Ts(".{",!1),ln=function(e){return e},un=function(e){return e},pn=function(e,t){return{$class:"concerto.metamodel@1.0.0.TypeIdentifier",name:e+t.join("")}},dn=function(e){return e},fn=function(){return{type:"Literal",value:!0}},hn=function(){return{type:"Literal",value:!1}},mn=function(e){return e},gn=function(e){return e},yn=function(){return{type:"Literal",value:parseFloat($s())}},vn=function(){return{type:"Literal",value:parseFloat($s())}},bn=function(){return{type:"Literal",value:parseFloat($s())}},wn=function(){return{type:"Literal",value:parseFloat($s())}},An=function(e){return{type:"Literal",value:parseInt(e,16)}},$n=function(e){return{type:"Literal",value:e.join("")}},En=function(e){return{type:"Literal",value:e.join("")}},Tn=function(){return $s()},Cn=function(e){return e},Dn=function(){return $s()},Fn=function(e){return e},In=function(){return""},Sn=function(){return"\0"},Nn=function(){return"\b"},On=function(){return"\f"},Mn=function(){return"\n"},xn=function(){return"\r"},kn=function(){return"\t"},Pn=function(){return"\v"},Ln=function(){return $s()},Rn=function(e){return String.fromCharCode(parseInt(e,16))},_n=function(e){return String.fromCharCode(parseInt(e,16))},Bn=function(e,t){return{$class:`${li}.StringRegexValidator`,pattern:e,flags:t}},jn=function(e,t,r){return{versionCore:e,pre:t,build:r}},Vn=function(e,t,r){return{major:parseInt(e,10),minor:parseInt(t,10),patch:parseInt(r,10)}},Un=function(e,t){return[e,...t]},Qn=function(e,t){return[e,...t]},qn=function(){return"Integer"},Kn=function(){return"Double"},zn=function(){return"Long"},Wn=function(){return"String"},Hn=function(){return"DateTime"},Gn=function(){return"Boolean"},Yn=function(e){return{$class:"concerto.metamodel@1.0.0.TypeIdentifier",name:e.name}},Jn=function(e,t){return e+t},Xn=function(e){return{$class:"concerto.metamodel@1.0.0.IdentifiedBy",name:e.name}},Zn=function(){return{$class:"concerto.metamodel@1.0.0.Identified"}},eo=function(e){return{$class:"concerto.metamodel@1.0.0.DecoratorString",value:e.value,...fi(Es())}},to=function(e){return{$class:"concerto.metamodel@1.0.0.DecoratorNumber",value:+e,...fi(Es())}},ro=function(e){return{$class:"concerto.metamodel@1.0.0.DecoratorBoolean",value:"true"==e,...fi(Es())}},no=function(e,t){return{$class:"concerto.metamodel@1.0.0.DecoratorTypeReference",type:e,isArray:!!t,...fi(Es())}},oo=function(e){return e},so=function(e,t){return t?e.concat(t):[]},ao=function(e,t){const r={$class:"concerto.metamodel@1.0.0.Decorator",name:e,...fi(Es())};return t&&(r.arguments=t),r},io=function(e){return e},co=function(e){return{$class:"concerto.metamodel@1.0.0.TypeIdentifier",name:e.name}},lo=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.AssetDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The asset "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},uo=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.ParticipantDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The participant "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},po=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.TransactionDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The transaction "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},fo=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.EventDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The event "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},ho=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.ConceptDeclaration",name:r.name,isAbstract:di(t),properties:s.declarations,...fi(Es())};if(o){if(o.name===r.name)throw new Error(`The concept "${r.name}" cannot extend itself.`);a.superType=o}return n&&(a.identified=n),e.length>0&&(a.decorators=e),a},mo=function(e){const t={$class:"concerto.metamodel@1.0.0.BooleanScalar"};return e&&(t.defaultValue="true"===e),t},go=function(e,t){const r={$class:"concerto.metamodel@1.0.0.IntegerScalar"};return e&&(r.defaultValue=parseInt(e)),t&&(r.validator=t),r},yo=function(e,t){const r={$class:"concerto.metamodel@1.0.0.LongScalar"};return e&&(r.defaultValue=parseInt(e)),t&&(r.validator=t),r},vo=function(e,t){const r={$class:"concerto.metamodel@1.0.0.DoubleScalar"};return e&&(r.defaultValue=parseFloat(e)),t&&(r.validator=t),r},bo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.StringScalar"};return e&&(n.defaultValue=e),t&&(n.validator=t),r&&(n.lengthValidator=r),n},wo=function(e){const t={$class:"concerto.metamodel@1.0.0.DateTimeScalar"};return e&&(t.defaultValue=e),t},Ao=function(e,t,r){const n={...r,name:t.name,...fi(Es())};return e.length>0&&(n.decorators=e),n},$o=function(){return{type:"Optional"}},Eo=function(e){return e.value},To=function(e){return e},Co=function(e){return e},Do=function(e){return e},Fo=function(e){return{type:"ClassDeclarationBody",declarations:pi(e),...fi(Es())}},Io=function(e,t,r,n,o,s){const a={$class:"concerto.metamodel@1.0.0.ObjectProperty",name:n.name,type:t,isArray:di(r),isOptional:di(s),...fi(Es())};return o&&(a.defaultValue=o),e.length>0&&(a.decorators=e),a},So=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.BooleanProperty",name:r.name,isArray:di(t),isOptional:di(o),...fi(Es())};return n&&(s.defaultValue="true"===n),e.length>0&&(s.decorators=e),s},No=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.DateTimeProperty",name:r.name,isArray:di(t),isOptional:di(o),...fi(Es())};return n&&(s.defaultValue=n),e.length>0&&(s.decorators=e),s},Oo=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.StringProperty",name:r.name,isArray:di(t),isOptional:di(a),...fi(Es())};return n&&(i.defaultValue=n),e.length>0&&(i.decorators=e),o&&(i.validator=o),s&&(i.lengthValidator=s),i},Mo=function(e){return e},xo=function(e,t){const r={$class:`${li}.StringLengthValidator`};return e&&(r.minLength=parseInt(e)),t&&(r.maxLength=parseInt(t)),r},ko=function(e,t){const r={$class:`${li}.DoubleDomainValidator`};return e&&(r.lower=parseFloat(e)),t&&(r.upper=parseFloat(t)),r},Po=function(e,t){const r={$class:`${li}.IntegerDomainValidator`};return e&&(r.lower=parseInt(e)),t&&(r.upper=parseInt(t)),r},Lo=function(e,t){const r={$class:`${li}.LongDomainValidator`};return e&&(r.lower=parseInt(e)),t&&(r.upper=parseInt(t)),r},Ro=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.DoubleProperty",name:n.name,isArray:di(r),isOptional:di(a),...fi(Es())};return o&&(i.defaultValue=parseFloat(o)),e.length>0&&(i.decorators=e),s&&(i.validator=s),i},_o=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.IntegerProperty",name:n.name,isArray:di(r),isOptional:di(a),...fi(Es())};return o&&(i.defaultValue=parseInt(o)),e.length>0&&(i.decorators=e),s&&(i.validator=s),i},Bo=function(e,t,r,n,o,s,a){const i={$class:"concerto.metamodel@1.0.0.LongProperty",name:n.name,isArray:di(r),isOptional:di(a),...fi(Es())};return o&&(i.defaultValue=parseInt(o)),e.length>0&&(i.decorators=e),s&&(i.validator=s),i},jo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.MapDeclaration",name:t.name,key:r.declarations[0],value:r.declarations[1],...fi(Es())};return e.length>0&&(n.decorators=e),n},Vo=function(e,t){return{type:"MapDeclarationBody",declarations:pi([e,t])}},Uo=function(e){const t={$class:"concerto.metamodel@1.0.0.StringMapKeyType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Qo=function(e){const t={$class:"concerto.metamodel@1.0.0.DateTimeMapKeyType",...fi(Es())};return e.length>0&&(t.decorators=e),t},qo=function(e,t){const r={$class:"concerto.metamodel@1.0.0.ObjectMapKeyType",type:t,...fi(Es())};return e.length>0&&(r.decorators=e),r},Ko=function(e){const t={$class:"concerto.metamodel@1.0.0.BooleanMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},zo=function(e){const t={$class:"concerto.metamodel@1.0.0.DateTimeMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Wo=function(e){const t={$class:"concerto.metamodel@1.0.0.StringMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Ho=function(e){const t={$class:"concerto.metamodel@1.0.0.IntegerMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Go=function(e){const t={$class:"concerto.metamodel@1.0.0.LongMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Yo=function(e){const t={$class:"concerto.metamodel@1.0.0.DoubleMapValueType",...fi(Es())};return e.length>0&&(t.decorators=e),t},Jo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.ObjectMapValueType",type:r,...fi(Es())};return"--\x3e"===t&&(n.$class="concerto.metamodel@1.0.0.RelationshipMapValueType"),e.length>0&&(n.decorators=e),n},Xo=function(e,t,r){const n={$class:"concerto.metamodel@1.0.0.EnumDeclaration",name:t.name,properties:r.declarations,...fi(Es())};return e.length>0&&(n.decorators=e),n},Zo=function(e){return{type:"EnumDeclarationBody",declarations:pi(e)}},es=function(e,t){const r={$class:"concerto.metamodel@1.0.0.EnumProperty",name:t.name,...fi(Es())};return e.length>0&&(r.decorators=e),r},ts=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.RelationshipProperty",name:n.name,type:t,isArray:di(r),isOptional:di(o),...fi(Es())};return e.length>0&&(s.decorators=e),s},rs=function(e,t){return e.concat(JSON.stringify(t).replace(/['"]+/g,""))},ns=function(e,t,r){return`${e}@${t}.${r}`},os=function(e,t){return`${e}@${t}`},ss=function(e){return e},as=function(e){return e},is=function(e,t){const r={$class:"concerto.metamodel@1.0.0.ImportAll",namespace:e};return t&&(r.uri=t),r},cs=function(e,t){const{namespace:r,name:n}=function(e){const t=e.split(".");return{name:t.pop(),namespace:t.join(".")}}(e),o={$class:`${li}.ImportType`,name:n,namespace:r};return t&&(o.uri=t),o},ls=function(e,t,r){const{aliasedTypes:n,typesNames:o}=t.reduce(((e,t)=>("concerto.metamodel@1.0.0.AliasedType"===t.$class?(e.aliasedTypes.push(t),e.typesNames.push(t.name)):e.typesNames.push(t),e)),{aliasedTypes:[],typesNames:[]}),s={$class:"concerto.metamodel@1.0.0.ImportTypes",namespace:e,types:o,...n.length>0&&{aliasedTypes:n}};return r&&(s.uri=r),s},us=function(e,t){if(["Boolean","String","DateTime","Double","Integer","Long"].indexOf(t)>=0)throw new Error(`A type cannot be aliased to a Primitive type, here "${e}" is being aliased as "${t}".`);return{$class:"concerto.metamodel@1.0.0.AliasedType",name:e,aliasedName:t}},ps=function(e,t){return[e,...t.map((e=>e[2]))]},ds=function(e){return e.value},fs=function(e,t,r,n,o){const s={$class:"concerto.metamodel@1.0.0.Model",decorators:pi(t),namespace:r,imports:pi(n),declarations:pi(o)};return e&&(s.concertoVersion=e),s},hs=function(e,t){return ui(e,t,1)},ms=function(e,t){return ui(e,t,1)},gs=0|r.peg$currPos,ys=gs,vs=[{line:1,column:1}],bs=gs,ws=r.peg$maxFailExpected||[],As=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in a))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=a[r.startRule]}function $s(){return e.substring(ys,gs)}function Es(){return Is(ys,gs)}function Ts(e,t){return{type:"literal",text:e,ignoreCase:t}}function Cs(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ds(e){return{type:"other",description:e}}function Fs(t){var r,n=vs[t];if(n)return n;if(t>=vs.length)r=vs.length-1;else for(r=t;!vs[--r];);for(n={line:(n=vs[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return vs[t]=n,n}function Is(e,t,r){var n=Fs(e),o=Fs(t),a={source:s,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:o.line,column:o.column}};return r&&s&&"function"==typeof s.offset&&(a.start=s.offset(a.start),a.end=s.offset(a.end)),a}function Ss(e){gs<bs||(gs>bs&&(bs=gs,ws=[]),ws.push(e))}function Ns(){var t,r;return t=gs,aa(),r=function(){var t,r,n,s,a,i;return t=gs,r=function(){var t,r,n,s;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,8)===G?(r=G,gs+=8):(r=o,0===As&&Ss(Fr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,7)===Y?(r=Y,gs+=7):(r=o,0===As&&Ss(Ir)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Ws())!==o?(aa(),ys=t,t=ds(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r===o&&(r=null),n=Ua(),s=function(){var t,r,n;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,9)===J?(r=J,gs+=9):(r=o,0===As&&Ss(Sr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(aa(),(n=oi())!==o?(aa(),ys=t,t=ss(n)):(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(a=function(){var e,t,r,n,s,a;if(e=gs,(t=ii())!==o){for(r=[],n=gs,s=aa(),(a=ii())!==o?n=s=[s,a]:(gs=n,n=o);n!==o;)r.push(n),n=gs,s=aa(),(a=ii())!==o?n=s=[s,a]:(gs=n,n=o);ys=e,e=hs(t,r)}else gs=e,e=o;return e}(),a===o&&(a=null),i=function(){var e,t,r,n,s,a;if(e=gs,(t=ci())!==o){for(r=[],n=gs,s=aa(),(a=ci())!==o?n=s=[s,a]:(gs=n,n=o);n!==o;)r.push(n),n=gs,s=aa(),(a=ci())!==o?n=s=[s,a]:(gs=n,n=o);ys=e,e=ms(t,r)}else gs=e,e=o;return e}(),i===o&&(i=null),ys=t,t=fs(r,n,s,a,i)):(gs=t,t=o),t}(),r!==o?(aa(),ys=t,t=ln(r)):(gs=t,t=o),t}function Os(){var t;return e.length>gs?(t=e.charAt(gs),gs++):(t=o,0===As&&Ss(ot)),t}function Ms(){var t;return As++,t=e.charAt(gs),Ne.test(t)?gs++:(t=o,0===As&&Ss(at)),As--,t===o&&0===As&&Ss(st),t}function xs(){var t;return t=e.charAt(gs),Oe.test(t)?gs++:(t=o,0===As&&Ss(it)),t}function ks(){var t;return As++,10===e.charCodeAt(gs)?(t=c,gs++):(t=o,0===As&&Ss(lt)),t===o&&(e.substr(gs,2)===l?(t=l,gs+=2):(t=o,0===As&&Ss(ut)),t===o&&(t=e.charAt(gs),Me.test(t)?gs++:(t=o,0===As&&Ss(pt)))),As--,t===o&&0===As&&Ss(ct),t}function Ps(){var t;return As++,(t=function(){var t,r,n,s,a,i;if(t=gs,e.substr(gs,2)===u?(r=u,gs+=2):(r=o,0===As&&Ss(ft)),r!==o){for(n=[],s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);s!==o;)n.push(s),s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);e.substr(gs,2)===p?(s=p,gs+=2):(s=o,0===As&&Ss(ht)),s!==o?t=r=[r,n,s]:(gs=t,t=o)}else gs=t,t=o;return t}())===o&&(t=function(){var t,r,n,s,a,i;if(t=gs,e.substr(gs,2)===d?(r=d,gs+=2):(r=o,0===As&&Ss(mt)),r!==o){for(n=[],s=gs,a=gs,As++,i=xs(),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);s!==o;)n.push(s),s=gs,a=gs,As++,i=xs(),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);t=r=[r,n]}else gs=t,t=o;return t}()),As--,t===o&&0===As&&Ss(dt),t}function Ls(){var t,r,n,s,a,i;if(t=gs,e.substr(gs,2)===u?(r=u,gs+=2):(r=o,0===As&&Ss(ft)),r!==o){for(n=[],s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),i===o&&(i=xs()),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);s!==o;)n.push(s),s=gs,a=gs,As++,e.substr(gs,2)===p?(i=p,gs+=2):(i=o,0===As&&Ss(ht)),i===o&&(i=xs()),As--,i===o?a=void 0:(gs=a,a=o),a!==o&&(i=Os())!==o?s=a=[a,i]:(gs=s,s=o);e.substr(gs,2)===p?(s=p,gs+=2):(s=o,0===As&&Ss(ht)),s!==o?t=r=[r,n,s]:(gs=t,t=o)}else gs=t,t=o;return t}function Rs(){var e,t;return e=gs,t=function(){var e,t,r,n;if(As++,e=gs,(t=_s())!==o){for(r=[],n=Bs();n!==o;)r.push(n),n=Bs();ys=e,e=pn(t,r)}else gs=e,e=o;return As--,e===o&&(t=o,0===As&&Ss(gt)),e}(),t!==o&&(ys=e,t=un(t)),t}function _s(){var t,r,n;return t=e.charAt(gs),xe.test(t)?gs++:(t=o,0===As&&Ss(yt)),t===o&&(t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=Zs())!==o?(ys=t,t=dn(n)):(gs=t,t=o)),t}function Bs(){var t;return(t=_s())===o&&(t=e.charAt(gs),ke.test(t)?gs++:(t=o,0===As&&Ss(bt))),t}function js(){var t,r;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,4)===P?(r=P,gs+=4):(r=o,0===As&&Ss(tr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o&&(ys=t,r=fn()),(t=r)===o&&(t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,5)===x?(r=x,gs+=5):(r=o,0===As&&Ss(Zt)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o&&(ys=t,r=hn()),t=r),t}function Vs(){var t,r,n,s,a;if(t=gs,r=e.charAt(gs),Pe.test(r)?gs++:(r=o,0===As&&Ss($t)),r===o&&(r=null),Us()!==o)if(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o){for(s=[],a=Qs();a!==o;)s.push(a),a=Qs();(a=qs())===o&&(a=null),ys=t,t=wn()}else gs=t,t=o;else gs=t,t=o;return t}function Us(){var t,r,n,s;if(48===e.charCodeAt(gs)?(t=m,gs++):(t=o,0===As&&Ss(Et)),t===o)if(t=gs,r=function(){var t;return t=e.charAt(gs),Re.test(t)?gs++:(t=o,0===As&&Ss(Ct)),t}(),r!==o){for(n=[],s=Qs();s!==o;)n.push(s),s=Qs();t=r=[r,n]}else gs=t,t=o;return t}function Qs(){var t;return t=e.charAt(gs),Le.test(t)?gs++:(t=o,0===As&&Ss(Tt)),t}function qs(){var t,r,n;return t=gs,r=function(){var t;return(t=e.charAt(gs)).toLowerCase()===g?gs++:(t=o,0===As&&Ss(Dt)),t}(),r!==o&&(n=Ks())!==o?t=r=[r,n]:(gs=t,t=o),t}function Ks(){var t,r,n,s;if(t=gs,r=e.charAt(gs),Pe.test(r)?gs++:(r=o,0===As&&Ss($t)),r===o&&(r=null),n=[],(s=Qs())!==o)for(;s!==o;)n.push(s),s=Qs();else n=o;return n!==o?t=r=[r,n]:(gs=t,t=o),t}function zs(){var t;return t=e.charAt(gs),_e.test(t)?gs++:(t=o,0===As&&Ss(It)),t}function Ws(){var t,r,n,s;if(As++,t=gs,34===e.charCodeAt(gs)?(r=v,gs++):(r=o,0===As&&Ss(Nt)),r!==o){for(n=[],s=Hs();s!==o;)n.push(s),s=Hs();34===e.charCodeAt(gs)?(s=v,gs++):(s=o,0===As&&Ss(Nt)),s!==o?(ys=t,t=$n(n)):(gs=t,t=o)}else gs=t,t=o;if(t===o)if(t=gs,39===e.charCodeAt(gs)?(r=b,gs++):(r=o,0===As&&Ss(Ot)),r!==o){for(n=[],s=Gs();s!==o;)n.push(s),s=Gs();39===e.charCodeAt(gs)?(s=b,gs++):(s=o,0===As&&Ss(Ot)),s!==o?(ys=t,t=En(n)):(gs=t,t=o)}else gs=t,t=o;return As--,t===o&&(r=o,0===As&&Ss(St)),t}function Hs(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),Be.test(n)?gs++:(n=o,0===As&&Ss(Mt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=Os())!==o?(ys=t,t=Tn()):(gs=t,t=o),t===o&&(t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=Js())!==o?(ys=t,t=Cn(n)):(gs=t,t=o),t===o&&(t=Ys())),t}function Gs(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),je.test(n)?gs++:(n=o,0===As&&Ss(xt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=Os())!==o?(ys=t,t=Dn()):(gs=t,t=o),t===o&&(t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=Js())!==o?(ys=t,t=Fn(n)):(gs=t,t=o),t===o&&(t=Ys())),t}function Ys(){var t,r;return t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&ks()!==o?(ys=t,t=In()):(gs=t,t=o),t}function Js(){var t,r,n,s;return t=function(){var t;return(t=Xs())===o&&(t=function(){var t,r,n;return t=gs,r=gs,As++,n=function(){var t;return(t=Xs())===o&&(t=e.charAt(gs),Ue.test(t)?gs++:(t=o,0===As&&Ss(Vt))),t}(),n===o&&(n=xs()),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=Os())!==o?(ys=t,t=Ln()):(gs=t,t=o),t}()),t}(),t===o&&(t=gs,48===e.charCodeAt(gs)?(r=m,gs++):(r=o,0===As&&Ss(Et)),r!==o?(n=gs,As++,s=Qs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Sn()):(gs=t,t=o)):(gs=t,t=o),t===o&&(t=function(){var t,r,n,s,a,i;return t=gs,120===e.charCodeAt(gs)?(r=D,gs++):(r=o,0===As&&Ss(Ut)),r!==o?(n=gs,s=gs,(a=zs())!==o&&(i=zs())!==o?s=a=[a,i]:(gs=s,s=o),(n=s!==o?e.substring(n,gs):s)!==o?(ys=t,t=Rn(n)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=Zs()))),t}function Xs(){var t,r;return t=e.charAt(gs),Ve.test(t)?gs++:(t=o,0===As&&Ss(kt)),t===o&&(t=gs,98===e.charCodeAt(gs)?(r=w,gs++):(r=o,0===As&&Ss(Pt)),r!==o&&(ys=t,r=Nn()),(t=r)===o&&(t=gs,102===e.charCodeAt(gs)?(r=A,gs++):(r=o,0===As&&Ss(Lt)),r!==o&&(ys=t,r=On()),(t=r)===o&&(t=gs,110===e.charCodeAt(gs)?(r=$,gs++):(r=o,0===As&&Ss(Rt)),r!==o&&(ys=t,r=Mn()),(t=r)===o&&(t=gs,114===e.charCodeAt(gs)?(r=E,gs++):(r=o,0===As&&Ss(_t)),r!==o&&(ys=t,r=xn()),(t=r)===o&&(t=gs,116===e.charCodeAt(gs)?(r=T,gs++):(r=o,0===As&&Ss(Bt)),r!==o&&(ys=t,r=kn()),(t=r)===o&&(t=gs,118===e.charCodeAt(gs)?(r=C,gs++):(r=o,0===As&&Ss(jt)),r!==o&&(ys=t,r=Pn()),t=r)))))),t}function Zs(){var t,r,n,s,a,i,c,l;return t=gs,117===e.charCodeAt(gs)?(r=F,gs++):(r=o,0===As&&Ss(Qt)),r!==o?(n=gs,s=gs,(a=zs())!==o&&(i=zs())!==o&&(c=zs())!==o&&(l=zs())!==o?s=a=[a,i,c,l]:(gs=s,s=o),(n=s!==o?e.substring(n,gs):s)!==o?(ys=t,t=_n(n)):(gs=t,t=o)):(gs=t,t=o),t}function ea(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),qe.test(n)?gs++:(n=o,0===As&&Ss(Wt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t===o&&(t=ta())===o&&(t=na()),t}function ta(){var t,r,n;return t=gs,92===e.charCodeAt(gs)?(r=f,gs++):(r=o,0===As&&Ss(vt)),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t}function ra(){var e,t,r;return e=gs,t=gs,As++,r=xs(),As--,r===o?t=void 0:(gs=t,t=o),t!==o&&(r=Os())!==o?e=t=[t,r]:(gs=e,e=o),e}function na(){var t,r,n,s;if(t=gs,91===e.charCodeAt(gs)?(r=S,gs++):(r=o,0===As&&Ss(Ht)),r!==o){for(n=[],s=oa();s!==o;)n.push(s),s=oa();93===e.charCodeAt(gs)?(s=N,gs++):(s=o,0===As&&Ss(Gt)),s!==o?t=r=[r,n,s]:(gs=t,t=o)}else gs=t,t=o;return t}function oa(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),Ke.test(n)?gs++:(n=o,0===As&&Ss(Yt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t===o&&(t=ta()),t}function sa(){var t,r,n,s;return t=gs,e.substr(gs,6)===k?(r=k,gs+=6):(r=o,0===As&&Ss(er)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}function aa(){var e,t;for(e=[],(t=Ms())===o&&(t=ks())===o&&(t=Ps());t!==o;)e.push(t),(t=Ms())===o&&(t=ks())===o&&(t=Ps());return e}function ia(){var e,t;for(e=[],(t=Ms())===o&&(t=Ls());t!==o;)e.push(t),(t=Ms())===o&&(t=Ls());return e}function ca(){var t;return t=e.charAt(gs),Le.test(t)?gs++:(t=o,0===As&&Ss(Tt)),t}function la(){var t;return(t=ca())===o&&(t=e.charAt(gs),We.test(t)?gs++:(t=o,0===As&&Ss(sr))),t}function ua(){var t,r,n,s,a;return t=gs,r=gs,37===e.charCodeAt(gs)?(n=_,gs++):(n=o,0===As&&Ss(ar)),n!==o&&(s=la())!==o&&(a=la())!==o?r=n=[n,s,a]:(gs=r,r=o),r!==o?e.substring(t,gs):r}function pa(){var t;return t=e.charAt(gs),He.test(t)?gs++:(t=o,0===As&&Ss(ir)),t}function da(){var t,r,n,s;return t=gs,(r=ha())!==o?(58===e.charCodeAt(gs)?(n=B,gs++):(n=o,0===As&&Ss(cr)),n!==o&&(s=ha())!==o?t=r=[r,n,s]:(gs=t,t=o)):(gs=t,t=o),t===o&&(t=ma()),t}function fa(){var t,r,n;return t=gs,(r=ha())!==o?(58===e.charCodeAt(gs)?(n=B,gs++):(n=o,0===As&&Ss(cr)),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}function ha(){var t,r,n,s,a,i,c,l;return t=gs,r=gs,(n=la())!==o?(s=gs,(a=la())!==o?(i=gs,(c=la())!==o?((l=la())===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),r=n=[n,s]):(gs=r,r=o),r!==o?e.substring(t,gs):r}function ma(){var t,r,n,s,a,i,c,l,u;return t=gs,r=gs,(n=ga())!==o?(46===e.charCodeAt(gs)?(s=h,gs++):(s=o,0===As&&Ss(At)),s!==o&&(a=ga())!==o?(46===e.charCodeAt(gs)?(i=h,gs++):(i=o,0===As&&Ss(At)),i!==o&&(c=ga())!==o?(46===e.charCodeAt(gs)?(l=h,gs++):(l=o,0===As&&Ss(At)),l!==o&&(u=ga())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o)):(gs=r,r=o)):(gs=r,r=o)):(gs=r,r=o),r!==o?e.substring(t,gs):r}function ga(){var t,r,n,s,a;return t=gs,r=gs,e.substr(gs,2)===q?(n=q,gs+=2):(n=o,0===As&&Ss(gr)),n!==o?(s=e.charAt(gs),Xe.test(s)?gs++:(s=o,0===As&&Ss(yr)),s!==o?r=n=[n,s]:(gs=r,r=o)):(gs=r,r=o),r===o&&(r=gs,50===e.charCodeAt(gs)?(n=K,gs++):(n=o,0===As&&Ss(vr)),n!==o?(s=e.charAt(gs),Ze.test(s)?gs++:(s=o,0===As&&Ss(br)),s!==o&&(a=ca())!==o?r=n=[n,s,a]:(gs=r,r=o)):(gs=r,r=o),r===o&&(r=gs,49===e.charCodeAt(gs)?(n=z,gs++):(n=o,0===As&&Ss(wr)),n!==o&&(s=ca())!==o&&(a=ca())!==o?r=n=[n,s,a]:(gs=r,r=o),r===o&&(r=gs,n=e.charAt(gs),Re.test(n)?gs++:(n=o,0===As&&Ss(Ct)),n!==o&&(s=ca())!==o?r=n=[n,s]:(gs=r,r=o),r===o&&(r=ca())))),r!==o?e.substring(t,gs):r}function ya(){var e;return(e=pa())===o&&(e=ua()),e}function va(){var t,r,n,s;for(t=gs,r=[],n=gs,47===e.charCodeAt(gs)?(s=I,gs++):(s=o,0===As&&Ss(Kt)),s!==o?n=s=[s,ba()]:(gs=n,n=o);n!==o;)r.push(n),n=gs,47===e.charCodeAt(gs)?(s=I,gs++):(s=o,0===As&&Ss(Kt)),s!==o?n=s=[s,ba()]:(gs=n,n=o);return e.substring(t,gs)}function ba(){var t,r,n;for(t=gs,r=[],n=Aa();n!==o;)r.push(n),n=Aa();return e.substring(t,gs)}function wa(){var t,r,n;if(t=gs,r=[],(n=Aa())!==o)for(;n!==o;)r.push(n),n=Aa();else r=o;return r!==o?e.substring(t,gs):r}function Aa(){var t;return(t=pa())===o&&(t=ua())===o&&(t=e.charAt(gs),et.test(t)?gs++:(t=o,0===As&&Ss(Ar))),t}function $a(){var t,r,n;for(t=gs,r=[],(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));n!==o;)r.push(n),(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));return e.substring(t,gs)}function Ea(){var t,r,n;for(t=gs,r=[],(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));n!==o;)r.push(n),(n=Aa())===o&&(n=e.charAt(gs),tt.test(n)?gs++:(n=o,0===As&&Ss($r)));return e.substring(t,gs)}function Ta(){var t,r;return t=gs,(r=function(){var t,r,n,s,a,i;return t=gs,r=function(){var t,r,n,s,a,i,c;return t=gs,r=gs,(r=(n=Ia())!==o?e.substring(r,gs):n)!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o?(s=gs,(s=(a=Ia())!==o?e.substring(s,gs):a)!==o?(46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Ia())!==o?e.substring(i,gs):c)!==o?(ys=t,t=Vn(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(n=gs,45===e.charCodeAt(gs)?(s=W,gs++):(s=o,0===As&&Ss(Er)),s!==o?(a=function(){var t,r,n,s,a,i,c;if(t=gs,r=gs,(r=(n=Ca())!==o?e.substring(r,gs):n)!==o){for(n=[],s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Ca())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Ca())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);ys=t,t=Un(r,n)}else gs=t,t=o;return t}(),a!==o?n=a:(gs=n,n=o)):(gs=n,n=o),n===o&&(n=null),s=gs,43===e.charCodeAt(gs)?(a=H,gs++):(a=o,0===As&&Ss(Tr)),a!==o?(i=function(){var t,r,n,s,a,i,c;if(t=gs,r=gs,(r=(n=Da())!==o?e.substring(r,gs):n)!==o){for(n=[],s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Da())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Da())!==o?e.substring(i,gs):c)!==o?s=i:(gs=s,s=o)):(gs=s,s=o);ys=t,t=Qn(r,n)}else gs=t,t=o;return t}(),i!==o?s=i:(gs=s,s=o)):(gs=s,s=o),s===o&&(s=null),ys=t,t=jn(r,n,s)):(gs=t,t=o),t}())===o&&(r=function(){var t,r,n,s,a,i;return t=gs,(r=Ia())!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o&&(s=Ia())!==o?(46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(120===e.charCodeAt(gs)?(i=D,gs++):(i=o,0===As&&Ss(Ut)),i!==o?t=r=[r,n,s,a,i]:(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r===o&&(r=function(){var t,r,n,s;return t=gs,(r=Ia())!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o?(120===e.charCodeAt(gs)?(s=D,gs++):(s=o,0===As&&Ss(Ut)),s!==o?t=r=[r,n,s]:(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())),r!==o?e.substring(t,gs):r}function Ca(){var e;return(e=Fa())===o&&(e=Ia()),e}function Da(){var e,t;if((e=Fa())===o)if(e=[],(t=Na())!==o)for(;t!==o;)e.push(t),t=Na();else e=o;return e}function Fa(){var t,r,n,s,a;for(t=gs,r=[],n=Na();n!==o;)r.push(n),n=Na();if(n=function(){var t;return t=e.charAt(gs),nt.test(t)?gs++:(t=o,0===As&&Ss(Dr)),t}(),n!==o){for(s=[],a=Sa();a!==o;)s.push(a),a=Sa();t=r=[r,n,s]}else gs=t,t=o;return t}function Ia(){var t,r,n,s;if(48===e.charCodeAt(gs)?(t=m,gs++):(t=o,0===As&&Ss(Et)),t===o)if(t=gs,r=function(){var t;return t=e.charAt(gs),Re.test(t)?gs++:(t=o,0===As&&Ss(Ct)),t}(),r!==o){for(n=[],s=Na();s!==o;)n.push(s),s=Na();t=r=[r,n]}else gs=t,t=o;return t}function Sa(){var t;return t=e.charAt(gs),rt.test(t)?gs++:(t=o,0===As&&Ss(Cr)),t}function Na(){var t;return t=e.charAt(gs),Le.test(t)?gs++:(t=o,0===As&&Ss(Tt)),t}function Oa(){var t,r,n,s;return t=gs,e.substr(gs,8)===X?(r=X,gs+=8):(r=o,0===As&&Ss(Nr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}function Ma(){var t,r,n,s;return t=gs,e.substr(gs,7)===ie?(r=ie,gs+=7):(r=o,0===As&&Ss(Br)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=qn()):(gs=t,t=o)):(gs=t,t=o),t}function xa(){var t,r,n,s;return t=gs,e.substr(gs,6)===ce?(r=ce,gs+=6):(r=o,0===As&&Ss(jr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Kn()):(gs=t,t=o)):(gs=t,t=o),t}function ka(){var t,r,n,s;return t=gs,e.substr(gs,4)===le?(r=le,gs+=4):(r=o,0===As&&Ss(Vr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=zn()):(gs=t,t=o)):(gs=t,t=o),t}function Pa(){var t,r,n,s;return t=gs,e.substr(gs,6)===ue?(r=ue,gs+=6):(r=o,0===As&&Ss(Ur)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Wn()):(gs=t,t=o)):(gs=t,t=o),t}function La(){var t,r,n,s;return t=gs,e.substr(gs,8)===pe?(r=pe,gs+=8):(r=o,0===As&&Ss(Qr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Hn()):(gs=t,t=o)):(gs=t,t=o),t}function Ra(){var t,r,n,s;return t=gs,e.substr(gs,7)===de?(r=de,gs+=7):(r=o,0===As&&Ss(qr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=Gn()):(gs=t,t=o)):(gs=t,t=o),t}function _a(){var e,t,r,n,s;return e=gs,t=gs,As++,r=function(){var e;return(e=Pa())===o&&(e=function(){var e;return(e=Ma())===o&&(e=xa())===o&&(e=ka()),e}())===o&&(e=La())===o&&(e=Ra()),e}(),As--,r===o?t=void 0:(gs=t,t=o),t!==o&&(r=Rs())!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=e,e=Yn(r)):(gs=e,e=o)):(gs=e,e=o),e}function Ba(){var t;return(t=function(){var t,r,n;return t=gs,e.substr(gs,13)===fe?(r=fe,gs+=13):(r=o,0===As&&Ss(Kr)),r!==o?(aa(),(n=Rs())!==o?(ys=t,t=Xn(n)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r;return t=gs,e.substr(gs,10)===he?(r=he,gs+=10):(r=o,0===As&&Ss(zr)),r!==o&&(ys=t,r=Zn()),r}()),t}function ja(){var t;return(t=function(){var e,t;return e=gs,(t=Ws())!==o&&(ys=e,t=eo(t)),t}())===o&&(t=function(){var t,r,n;return t=gs,r=gs,(r=(n=js())!==o?e.substring(r,gs):n)!==o&&(ys=t,r=ro(r)),r}())===o&&(t=function(){var t,r;return t=gs,r=function(){var t,r,n,s;return t=gs,r=gs,45===e.charCodeAt(gs)?(n=W,gs++):(n=o,0===As&&Ss(Er)),n===o&&(n=null),r=e.substring(r,gs),n=gs,(n=(s=function(){var t,r,n,s;return As++,t=gs,r=function(){var t,r,n,s,a;if(t=gs,(r=e.substr(gs,2)).toLowerCase()===y?gs+=2:(r=o,0===As&&Ss(Ft)),r!==o){if(n=gs,s=[],(a=zs())!==o)for(;a!==o;)s.push(a),a=zs();else s=o;(n=s!==o?e.substring(n,gs):s)!==o?(ys=t,t=An(n)):(gs=t,t=o)}else gs=t,t=o;return t}(),r!==o?(n=gs,As++,(s=_s())===o&&(s=Qs()),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=mn(r)):(gs=t,t=o)):(gs=t,t=o),t===o&&(t=gs,r=function(){var t,r,n,s,a;if(t=gs,(r=Us())!==o)if(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o){for(s=[],a=Qs();a!==o;)s.push(a),a=Qs();(a=qs())===o&&(a=null),ys=t,t=yn()}else gs=t,t=o;else gs=t,t=o;if(t===o){if(t=gs,46===e.charCodeAt(gs)?(r=h,gs++):(r=o,0===As&&Ss(At)),r!==o){if(n=[],(s=Qs())!==o)for(;s!==o;)n.push(s),s=Qs();else n=o;n!==o?((s=qs())===o&&(s=null),ys=t,t=vn()):(gs=t,t=o)}else gs=t,t=o;t===o&&(t=gs,(r=Us())!==o?((n=qs())===o&&(n=null),ys=t,t=bn()):(gs=t,t=o))}return t}(),r!==o?(n=gs,As++,(s=_s())===o&&(s=Qs()),As--,s===o?n=void 0:(gs=n,n=o),n!==o?(ys=t,t=gn(r)):(gs=t,t=o)):(gs=t,t=o)),As--,t===o&&(r=o,0===As&&Ss(wt)),t}())!==o?e.substring(n,gs):s)!==o?(ys=t,t=Jn(r,n)):(gs=t,t=o),t}(),r!==o&&(ys=t,r=to(r)),r}())===o&&(t=function(){var t,r,n;return t=gs,(r=Rs())!==o?(aa(),e.substr(gs,2)===me?(n=me,gs+=2):(n=o,0===As&&Ss(Wr)),n===o&&(n=null),ys=t,t=no(r,n)):(gs=t,t=o),t}()),t}function Va(){var t,r,n,s;return t=gs,64===e.charCodeAt(gs)?(r=U,gs++):(r=o,0===As&&Ss(dr)),r!==o?(n=gs,(n=(s=Rs())!==o?e.substring(n,gs):s)!==o?(s=function(){var t,r,n,s,a,i,c;if(t=gs,40===e.charCodeAt(gs)?(r=ge,gs++):(r=o,0===As&&Ss(Hr)),r!==o){for(aa(),n=[],s=gs,(a=ja())!==o?(i=aa(),44===e.charCodeAt(gs)?(c=ye,gs++):(c=o,0===As&&Ss(Gr)),c!==o?(aa(),ys=s,s=oo(a)):(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,(a=ja())!==o?(i=aa(),44===e.charCodeAt(gs)?(c=ye,gs++):(c=o,0===As&&Ss(Gr)),c!==o?(aa(),ys=s,s=oo(a)):(gs=s,s=o)):(gs=s,s=o);(s=ja())===o&&(s=null),a=aa(),41===e.charCodeAt(gs)?(i=ve,gs++):(i=o,0===As&&Ss(Yr)),i!==o?(ys=t,t=so(n,s)):(gs=t,t=o)}else gs=t,t=o;return t}(),s===o&&(s=null),ys=t,t=ao(n,s)):(gs=t,t=o)):(gs=t,t=o),t}function Ua(){var e,t,r;for(e=[],t=gs,(r=Va())!==o?(aa(),ys=t,t=io(r)):(gs=t,t=o);t!==o;)e.push(t),t=gs,(r=Va())!==o?(aa(),ys=t,t=io(r)):(gs=t,t=o);return e}function Qa(){var t,r,n;return t=gs,e.substr(gs,7)===be?(r=be,gs+=7):(r=o,0===As&&Ss(Jr)),r!==o?(aa(),(n=Rs())!==o?(ys=t,t=co(n)):(gs=t,t=o)):(gs=t,t=o),t}function qa(){var t,r;return t=gs,e.substr(gs,8)===Ae?(r=Ae,gs+=8):(r=o,0===As&&Ss(Zr)),r!==o&&(ys=t,r=$o()),r}function Ka(){var t,r,n,s;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),(s=Ws())!==o?(ys=t,t=Eo(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function za(){var t,r,n,s,a;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),s=gs,(s=(a=js())!==o?e.substring(s,gs):a)!==o?(ys=t,t=To(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Wa(){var t,r,n,s,a;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),s=gs,(s=(a=Ks())!==o?e.substring(s,gs):a)!==o?(ys=t,t=Co(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Ha(){var t,r,n,s,a;return t=gs,e.substr(gs,7)===$e?(r=$e,gs+=7):(r=o,0===As&&Ss(en)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),s=gs,(s=(a=Vs())!==o?e.substring(s,gs):a)!==o?(ys=t,t=Do(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Ga(){var t;return(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Pa()!==o?(aa(),e.substr(gs,2)===me?(s=me,gs+=2):(s=o,0===As&&Ss(Wr)),s===o&&(s=null),aa(),(a=Rs())!==o?(aa(),(i=Ka())===o&&(i=null),aa(),(c=Ja())===o&&(c=null),aa(),(l=Xa())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=Oo(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=xa())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Ha())===o&&(c=null),aa(),(l=Za())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=Ro(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Ra()!==o?(aa(),e.substr(gs,2)===me?(s=me,gs+=2):(s=o,0===As&&Ss(Wr)),s===o&&(s=null),aa(),(a=Rs())!==o?(aa(),(i=za())===o&&(i=null),aa(),(c=qa())===o&&(c=null),aa(),ys=t,t=So(r,s,a,i,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),La()!==o?(aa(),e.substr(gs,2)===me?(s=me,gs+=2):(s=o,0===As&&Ss(Wr)),s===o&&(s=null),aa(),(a=Rs())!==o?(aa(),(i=Ka())===o&&(i=null),aa(),(c=qa())===o&&(c=null),aa(),ys=t,t=No(r,s,a,i,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),e.substr(gs,3)===Ie?(n=Ie,gs+=3):(n=o,0===As&&Ss(an)),n!==o?(aa(),(s=Rs())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=qa())===o&&(c=null),aa(),ys=t,t=ts(r,s,a,i,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=_a())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Ka())===o&&(c=null),aa(),(l=qa())===o&&(l=null),aa(),ys=t,t=Io(r,s,a,i,c,l)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=Ma())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Wa())===o&&(c=null),aa(),(l=ei())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=_o(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=ka())!==o?(aa(),e.substr(gs,2)===me?(a=me,gs+=2):(a=o,0===As&&Ss(Wr)),a===o&&(a=null),aa(),(i=Rs())!==o?(aa(),(c=Wa())===o&&(c=null),aa(),(l=ti())===o&&(l=null),aa(),(u=qa())===o&&(u=null),aa(),ys=t,t=Bo(r,s,a,i,c,l,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}()),t}function Ya(){var e,t,r;for(e=gs,t=[],r=Ga();r!==o;)t.push(r),r=Ga();return ys=e,Fo(t)}function Ja(){var t,r,n,s;return t=gs,e.substr(gs,5)===Ce?(r=Ce,gs+=5):(r=o,0===As&&Ss(nn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),(s=function(){var t,r,n,s,a;return As++,t=gs,47===e.charCodeAt(gs)?(r=I,gs++):(r=o,0===As&&Ss(Kt)),r!==o?(n=gs,s=function(){var t,r,n,s;if(t=gs,r=function(){var t,r,n;return t=gs,r=gs,As++,n=e.charAt(gs),Qe.test(n)?gs++:(n=o,0===As&&Ss(zt)),As--,n===o?r=void 0:(gs=r,r=o),r!==o&&(n=ra())!==o?t=r=[r,n]:(gs=t,t=o),t===o&&(t=ta())===o&&(t=na()),t}(),r!==o){for(n=[],s=ea();s!==o;)n.push(s),s=ea();t=r=[r,n]}else gs=t,t=o;return t}(),(n=s!==o?e.substring(n,gs):s)!==o?(47===e.charCodeAt(gs)?(s=I,gs++):(s=o,0===As&&Ss(Kt)),s!==o?(a=gs,function(){var e,t;for(e=[],t=Bs();t!==o;)e.push(t),t=Bs()}(),a=e.substring(a,gs),ys=t,t=Bn(n,a)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),As--,t===o&&(r=o,0===As&&Ss(qt)),t}())!==o?(ys=t,t=Mo(s)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Xa(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,6)===De?(r=De,gs+=6):(r=o,0===As&&Ss(on)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Ks(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Ks(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=xo(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function Za(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,5)===Fe?(r=Fe,gs+=5):(r=o,0===As&&Ss(sn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Vs(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Vs(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=ko(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function ei(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,5)===Fe?(r=Fe,gs+=5):(r=o,0===As&&Ss(sn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Ks(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Ks(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=Po(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function ti(){var t,r,n,s,a,i,c,l;return t=gs,e.substr(gs,5)===Fe?(r=Fe,gs+=5):(r=o,0===As&&Ss(sn)),r!==o?(aa(),61===e.charCodeAt(gs)?(n=Ee,gs++):(n=o,0===As&&Ss(tn)),n!==o?(aa(),91===e.charCodeAt(gs)?(s=S,gs++):(s=o,0===As&&Ss(Ht)),s!==o?(aa(),a=gs,Ks(),a=e.substring(a,gs),aa(),44===e.charCodeAt(gs)?(i=ye,gs++):(i=o,0===As&&Ss(Gr)),i!==o?(aa(),c=gs,Ks(),c=e.substring(c,gs),aa(),93===e.charCodeAt(gs)?(l=N,gs++):(l=o,0===As&&Ss(Gt)),l!==o?(ys=t,t=Lo(a,c)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}function ri(){var t,r,n,s;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=Rs())!==o?(aa(),ys=t,t=es(r,s)):(gs=t,t=o)):(gs=t,t=o),t}function ni(){var t,r,n,s,a,i,c;if(t=gs,r=gs,(r=(n=Rs())!==o?e.substring(r,gs):n)!==o){for(n=gs,s=[],a=gs,46===e.charCodeAt(gs)?(i=h,gs++):(i=o,0===As&&Ss(At)),i!==o&&(c=Rs())!==o?a=i=[i,c]:(gs=a,a=o);a!==o;)s.push(a),a=gs,46===e.charCodeAt(gs)?(i=h,gs++):(i=o,0===As&&Ss(At)),i!==o&&(c=Rs())!==o?a=i=[i,c]:(gs=a,a=o);n=e.substring(n,gs),ys=t,t=rs(r,n)}else gs=t,t=o;return t}function oi(){var t;return(t=function(){var t,r,n,s;return t=gs,(r=ni())!==o?(64===e.charCodeAt(gs)?(n=U,gs++):(n=o,0===As&&Ss(dr)),n!==o&&(s=Ta())!==o?(ys=t,t=os(r,s)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=ni()),t}function si(){var t,r,n,s;return t=gs,r=function(){var t,r,n,s;return t=gs,e.substr(gs,4)===se?(r=se,gs+=4):(r=o,0===As&&Ss(Rr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(aa(),n=gs,(n=(s=function(){var t,r,n,s,a,i,c;return t=gs,(r=function(){var t,r,n,s,a;if(t=gs,r=gs,n=function(){var t;return t=e.charAt(gs),ze.test(t)?gs++:(t=o,0===As&&Ss(or)),t}(),n!==o){for(s=[],a=e.charAt(gs),Ge.test(a)?gs++:(a=o,0===As&&Ss(pr));a!==o;)s.push(a),a=e.charAt(gs),Ge.test(a)?gs++:(a=o,0===As&&Ss(pr));r=n=[n,s]}else gs=r,r=o;return r!==o?e.substring(t,gs):r}())!==o?(58===e.charCodeAt(gs)?(n=B,gs++):(n=o,0===As&&Ss(cr)),n!==o&&(s=function(){var t,r,n;return t=gs,e.substr(gs,2)===d?(r=d,gs+=2):(r=o,0===As&&Ss(mt)),r!==o&&(n=function(){var t,r,n,s,a,i;return t=gs,r=gs,n=function(){var t,r,n;for(t=gs,r=[],(n=pa())===o&&(n=ua())===o&&(n=e.charAt(gs),Ye.test(n)?gs++:(n=o,0===As&&Ss(fr)));n!==o;)r.push(n),(n=pa())===o&&(n=ua())===o&&(n=e.charAt(gs),Ye.test(n)?gs++:(n=o,0===As&&Ss(fr)));return e.substring(t,gs)}(),64===e.charCodeAt(gs)?(s=U,gs++):(s=o,0===As&&Ss(dr)),s!==o?r=n=[n,s]:(gs=r,r=o),r===o&&(r=null),n=function(){var t,r,n,s;return t=gs,r=function(){var t,r,n,s;return t=gs,91===e.charCodeAt(gs)?(r=S,gs++):(r=o,0===As&&Ss(Ht)),r!==o?(n=function(){var t,r,n,s,a,i,c,l,u,p,d,f,h,m;return t=gs,r=gs,(n=fa())!==o&&(s=fa())!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=fa())!==o&&(u=da())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o),r===o&&(r=gs,e.substr(gs,2)===Q?(n=Q,gs+=2):(n=o,0===As&&Ss(mr)),n!==o&&(s=fa())!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=fa())!==o&&(u=da())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o),r===o&&(r=gs,(n=ha())===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=fa())!==o&&(u=da())!==o?r=n=[n,s,a,i,c,l,u]:(gs=r,r=o),r===o&&(r=gs,n=gs,(s=fa())===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=fa())!==o&&(l=da())!==o?r=n=[n,s,a,i,c,l]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?((i=fa())===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=fa())!==o&&(c=da())!==o?r=n=[n,s,a,i,c]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?((l=fa())===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=fa())!==o&&(i=da())!==o?r=n=[n,s,a,i]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?(l=gs,(u=fa())!==o?((p=fa())===o&&(p=null),l=u=[u,p]):(gs=l,l=o),l===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=da())!==o?r=n=[n,s,a]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?(l=gs,(u=fa())!==o?(p=gs,(d=fa())!==o?((f=fa())===o&&(f=null),p=d=[d,f]):(gs=p,p=o),p===o&&(p=null),l=u=[u,p]):(gs=l,l=o),l===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o&&(a=ha())!==o?r=n=[n,s,a]:(gs=r,r=o),r===o&&(r=gs,n=gs,s=gs,(a=fa())!==o?(i=gs,(c=fa())!==o?(l=gs,(u=fa())!==o?(p=gs,(d=fa())!==o?(f=gs,(h=fa())!==o?((m=fa())===o&&(m=null),f=h=[h,m]):(gs=f,f=o),f===o&&(f=null),p=d=[d,f]):(gs=p,p=o),p===o&&(p=null),l=u=[u,p]):(gs=l,l=o),l===o&&(l=null),i=c=[c,l]):(gs=i,i=o),i===o&&(i=null),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),(a=ha())!==o?n=s=[s,a]:(gs=n,n=o),n===o&&(n=null),e.substr(gs,2)===Q?(s=Q,gs+=2):(s=o,0===As&&Ss(mr)),s!==o?r=n=[n,s]:(gs=r,r=o))))))))),r!==o?e.substring(t,gs):r}(),n===o&&(n=function(){var t,r,n,s,a,i,c;if(t=gs,118===e.charCodeAt(gs)?(r=C,gs++):(r=o,0===As&&Ss(jt)),r!==o){if(n=gs,s=[],(a=la())!==o)for(;a!==o;)s.push(a),a=la();else s=o;if((n=s!==o?e.substring(n,gs):s)!==o)if(46===e.charCodeAt(gs)?(s=h,gs++):(s=o,0===As&&Ss(At)),s!==o){if(a=gs,i=[],c=e.charAt(gs),Je.test(c)?gs++:(c=o,0===As&&Ss(hr)),c!==o)for(;c!==o;)i.push(c),c=e.charAt(gs),Je.test(c)?gs++:(c=o,0===As&&Ss(hr));else i=o;(a=i!==o?e.substring(a,gs):i)!==o?t=r=[r,n,s,a]:(gs=t,t=o)}else gs=t,t=o;else gs=t,t=o}else gs=t,t=o;return t}()),n!==o?(93===e.charCodeAt(gs)?(s=N,gs++):(s=o,0===As&&Ss(Gt)),s!==o?t=r=[r,n,s]:(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}(),r!==o?(n=gs,As++,s=ya(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t===o&&(t=gs,(r=ma())!==o?(n=gs,As++,s=ya(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t===o&&(t=function(){var t,r,n;for(t=gs,r=[],n=ya();n!==o;)r.push(n),n=ya();return e.substring(t,gs)}())),t}(),n!==o?(s=gs,58===e.charCodeAt(gs)?(a=B,gs++):(a=o,0===As&&Ss(cr)),a!==o?(i=function(){var t,r,n;for(t=gs,r=[],n=ca();n!==o;)r.push(n),n=ca();return e.substring(t,gs)}(),s=a=[a,i]):(gs=s,s=o),s===o&&(s=null),t=r=[r,n,s]):(gs=t,t=o),t}())!==o?t=r=[r,n,va()]:(gs=t,t=o),t===o&&(t=function(){var t,r,n,s,a,i,c,l;if(t=gs,r=gs,47===e.charCodeAt(gs)?(n=I,gs++):(n=o,0===As&&Ss(Kt)),n!==o){if(s=gs,(a=wa())!==o){for(i=[],c=gs,47===e.charCodeAt(gs)?(l=I,gs++):(l=o,0===As&&Ss(Kt)),l!==o?c=l=[l,ba()]:(gs=c,c=o);c!==o;)i.push(c),c=gs,47===e.charCodeAt(gs)?(l=I,gs++):(l=o,0===As&&Ss(Kt)),l!==o?c=l=[l,ba()]:(gs=c,c=o);s=a=[a,i]}else gs=s,s=o;s===o&&(s=null),r=n=[n,s]}else gs=r,r=o;return r!==o?e.substring(t,gs):r}())===o&&(t=function(){var t,r,n,s,a,i;if(t=gs,r=gs,(n=wa())!==o){for(s=[],a=gs,47===e.charCodeAt(gs)?(i=I,gs++):(i=o,0===As&&Ss(Kt)),i!==o?a=i=[i,ba()]:(gs=a,a=o);a!==o;)s.push(a),a=gs,47===e.charCodeAt(gs)?(i=I,gs++):(i=o,0===As&&Ss(Kt)),i!==o?a=i=[i,ba()]:(gs=a,a=o);r=n=[n,s]}else gs=r,r=o;return r!==o?e.substring(t,gs):r}(),t===o&&(t="")),t}())!==o?(a=gs,63===e.charCodeAt(gs)?(i=j,gs++):(i=o,0===As&&Ss(lr)),i!==o?a=i=[i,c=$a()]:(gs=a,a=o),a===o&&(a=null),i=gs,35===e.charCodeAt(gs)?(c=V,gs++):(c=o,0===As&&Ss(ur)),c!==o?i=c=[c,Ea()]:(gs=i,i=o),i===o&&(i=null),t=r=[r,n,s,a,i]):(gs=t,t=o)):(gs=t,t=o),t}())!==o?e.substring(n,gs):s)!==o?(s=aa(),ys=t,t=as(n)):(gs=t,t=o)):(gs=t,t=o),t}function ai(){var t,r;return(t=function(){var t,r,n,s,a,i,c;return t=gs,r=gs,(r=(n=Rs())!==o?e.substring(r,gs):n)!==o?(n=ia(),s=gs,a=function(){var t,r,n,s;return t=gs,e.substr(gs,2)===L?(r=L,gs+=2):(r=o,0===As&&Ss(rr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),(s=a!==o?e.substring(s,gs):a)!==o?(a=ia(),i=gs,(i=(c=Rs())!==o?e.substring(i,gs):c)!==o?(ys=t,t=us(r,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=gs,t=(r=Rs())!==o?e.substring(t,gs):r),t}function ii(){var t;return(t=function(){var t,r,n,s,a,i;return t=gs,sa()!==o?(aa(),(r=oi())!==o?(e.substr(gs,2)===Se?(n=Se,gs+=2):(n=o,0===As&&Ss(cn)),n!==o?(ia(),s=function(){var t,r,n,s,a,i,c;if(t=gs,(r=ai())!==o){for(ia(),n=[],s=gs,44===e.charCodeAt(gs)?(a=ye,gs++):(a=o,0===As&&Ss(Gr)),a!==o?(i=ia(),(c=ai())!==o?s=a=[a,i,c]:(gs=s,s=o)):(gs=s,s=o);s!==o;)n.push(s),s=gs,44===e.charCodeAt(gs)?(a=ye,gs++):(a=o,0===As&&Ss(Gr)),a!==o?(i=ia(),(c=ai())!==o?s=a=[a,i,c]:(gs=s,s=o)):(gs=s,s=o);ys=t,t=ps(r,n)}else gs=t,t=o;return t}(),s!==o?(ia(),125===e.charCodeAt(gs)?(a=R,gs++):(a=o,0===As&&Ss(nr)),a!==o?(aa(),(i=si())===o&&(i=null),ys=t,t=ls(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a;return t=gs,sa()!==o?(aa(),(r=oi())!==o?(46===e.charCodeAt(gs)?(n=h,gs++):(n=o,0===As&&Ss(At)),n!==o?(s=function(){var t,r,n,s;return t=gs,42===e.charCodeAt(gs)?(r=ae,gs++):(r=o,0===As&&Ss(_r)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=si())===o&&(a=null),ys=t,t=is(r,a)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n;return t=gs,sa()!==o?(aa(),(r=function(){var t;return(t=function(){var t,r,n,s,a,i,c;return t=gs,(r=ni())!==o?(64===e.charCodeAt(gs)?(n=U,gs++):(n=o,0===As&&Ss(dr)),n!==o&&(s=Ta())!==o?(46===e.charCodeAt(gs)?(a=h,gs++):(a=o,0===As&&Ss(At)),a!==o?(i=gs,(i=(c=Rs())!==o?e.substring(i,gs):c)!==o?(ys=t,t=ns(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=ni()),t}())!==o?(aa(),(n=si())===o&&(n=null),ys=t,t=cs(r,n)):(gs=t,t=o)):(gs=t,t=o),t}()),t}function ci(){var t;return(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,5)===ee?(r=ee,gs+=5):(r=o,0===As&&Ss(Mr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=lo(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,11)===te?(r=te,gs+=11):(r=o,0===As&&Ss(xr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=po(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,5)===re?(r=re,gs+=5):(r=o,0===As&&Ss(kr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=fo(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,11)===ne?(r=ne,gs+=11):(r=o,0===As&&Ss(Pr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=uo(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,4)===O?(r=O,gs+=4):(r=o,0===As&&Ss(Jt)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Rs())!==o?(aa(),123===e.charCodeAt(gs)?(a=we,gs++):(a=o,0===As&&Ss(Xr)),a!==o?(aa(),i=function(){var e,t,r;for(e=gs,t=[],r=ri();r!==o;)t.push(r),r=ri();return ys=e,Zo(t)}(),aa(),125===e.charCodeAt(gs)?(c=R,gs++):(c=o,0===As&&Ss(nr)),c!==o?(ys=t,t=Xo(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c,l,u,p;return t=gs,r=Ua(),aa(),(n=Oa())===o&&(n=null),aa(),s=function(){var t,r,n,s;return t=gs,e.substr(gs,7)===Z?(r=Z,gs+=7):(r=o,0===As&&Ss(Or)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),s!==o?(aa(),(a=Rs())!==o?(aa(),(i=Ba())===o&&(i=null),aa(),(c=Qa())===o&&(c=null),aa(),123===e.charCodeAt(gs)?(l=we,gs++):(l=o,0===As&&Ss(Xr)),l!==o?(aa(),u=Ya(),aa(),125===e.charCodeAt(gs)?(p=R,gs++):(p=o,0===As&&Ss(nr)),p!==o?(ys=t,t=ho(r,n,a,i,c,u)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i;return t=gs,r=Ua(),aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,6)===oe?(r=oe,gs+=6):(r=o,0===As&&Ss(Lr)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Rs())!==o?(aa(),e.substr(gs,7)===be?(a=be,gs+=7):(a=o,0===As&&Ss(Jr)),a!==o?(aa(),(i=function(){var e;return(e=function(){var e,t;return e=gs,Ra()!==o?(aa(),(t=za())===o&&(t=null),aa(),ys=e,e=mo(t)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r;return e=gs,Ma()!==o?(aa(),(t=Wa())===o&&(t=null),aa(),(r=ei())===o&&(r=null),aa(),ys=e,e=go(t,r)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r;return e=gs,ka()!==o?(aa(),(t=Wa())===o&&(t=null),aa(),(r=ti())===o&&(r=null),aa(),ys=e,e=yo(t,r)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r;return e=gs,xa()!==o?(aa(),(t=Ha())===o&&(t=null),aa(),(r=Za())===o&&(r=null),aa(),ys=e,e=vo(t,r)):(gs=e,e=o),e}())===o&&(e=function(){var e,t,r,n;return e=gs,Pa()!==o?(aa(),(t=Ka())===o&&(t=null),aa(),(r=Ja())===o&&(r=null),aa(),(n=Xa())===o&&(n=null),aa(),ys=e,e=bo(t,r,n)):(gs=e,e=o),e}())===o&&(e=function(){var e,t;return e=gs,La()!==o?(aa(),(t=Ka())===o&&(t=null),aa(),ys=e,e=wo(t)):(gs=e,e=o),e}()),e}())!==o?(aa(),ys=t,t=Ao(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}())===o&&(t=function(){var t,r,n,s,a,i,c;return t=gs,r=Ua(),aa(),n=function(){var t,r,n,s;return t=gs,e.substr(gs,3)===M?(r=M,gs+=3):(r=o,0===As&&Ss(Xt)),r!==o?(n=gs,As++,s=Bs(),As--,s===o?n=void 0:(gs=n,n=o),n!==o?t=r=[r,n]:(gs=t,t=o)):(gs=t,t=o),t}(),n!==o?(aa(),(s=Rs())!==o?(aa(),123===e.charCodeAt(gs)?(a=we,gs++):(a=o,0===As&&Ss(Xr)),a!==o?(aa(),i=function(){var t,r,n;return t=gs,r=function(){var t;return t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Pa()!==o?(aa(),ys=t,t=Uo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),La()!==o?(aa(),ys=t,t=Qo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n,s;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),(s=_a())!==o?(aa(),ys=t,t=qo(r,s)):(gs=t,t=o)):(gs=t,t=o),t}())),t}(),r!==o?(aa(),n=function(){var t;return t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Ra()!==o?(aa(),ys=t,t=Ko(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),La()!==o?(aa(),ys=t,t=zo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Pa()!==o?(aa(),ys=t,t=Wo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),Ma()!==o?(aa(),ys=t,t=Ho(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),ka()!==o?(aa(),ys=t,t=Go(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n!==o?(aa(),xa()!==o?(aa(),ys=t,t=Yo(r)):(gs=t,t=o)):(gs=t,t=o),t}(),t===o&&(t=function(){var t,r,n,s;return t=gs,r=Ua(),aa(),111===e.charCodeAt(gs)?(n=Te,gs++):(n=o,0===As&&Ss(rn)),n===o&&(e.substr(gs,3)===Ie?(n=Ie,gs+=3):(n=o,0===As&&Ss(an))),n!==o?(aa(),(s=_a())!==o?(aa(),ys=t,t=Jo(r,n,s)):(gs=t,t=o)):(gs=t,t=o),t}())))))),t}(),n!==o?(ys=t,t=Vo(r,n)):(gs=t,t=o)):(gs=t,t=o),t}(),i!==o?(aa(),125===e.charCodeAt(gs)?(c=R,gs++):(c=o,0===As&&Ss(nr)),c!==o?(ys=t,t=jo(r,s,i)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o)):(gs=t,t=o),t}()),t}const li="concerto.metamodel@1.0.0";function ui(e,t,r){return[e].concat(function(e,t){var r,n=new Array(e.length);for(r=0;r<e.length;r++)n[r]=e[r][t];return n}(t,r))}function pi(e){return null!==e?e:[]}function di(e){return!!e}function fi(e){if(r?.skipLocationNodes)return;const t=e.start,n=e.end;t.$class=`${li}.Position`,n.$class=`${li}.Position`;const o={$class:`${li}.Range`,start:t,end:n};return e.source&&e.source[0]&&(o.source=e.source[0]),{location:o}}if(n=i(),r.peg$library)return{peg$result:n,peg$currPos:gs,peg$FAILED:o,peg$maxFailExpected:ws,peg$maxFailPos:bs};if(n!==o&&gs===e.length)return n;throw n!==o&&gs<e.length&&Ss({type:"end"}),function(e,r,n){return new t(t.buildMessage(e,r),e,r,n)}(ws,bs<e.length?e.charAt(bs):null,bs<e.length?Is(bs,bs+1):Is(bs,bs))}}},303:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(348),o=r(206),s=r(713);e.exports={parse:function(e,t,r){try{return o.parse(e,r)}catch(e){throw e.location&&e.location.start?new s(e.message,e.location,t):e}},parseModels:function(e,t){const r={$class:`${n}.Models`,models:[]};return e.forEach((e=>{let n=o.parse(e,t);r.models.push(n)})),r}}},993:(e,t,r)=>{"use strict";const{MetaModelNamespace:n}=r(348),{isNull:o}=r(20).NullUtil;function s(e){let t="";switch(e.$class){case`${n}.DecoratorTypeReference`:t+=`${e.type.name}${e.isArray?"[]":""}`;break;case`${n}.DecoratorString`:t+=`"${e.value}"`;break;default:t+=`${e.value}`}return t}function a(e){let t="";return t+=`@${e.name}`,e.arguments&&(t+="(",t+=e.arguments.map(s).join(","),t+=")"),t}function i(e,t){let r="";return r+=e.map(a).join(`\n${t}`),r+=`\n${t}`,r}function c(e){let t="";switch(e.$class){case`${n}.EnumProperty`:break;case`${n}.BooleanScalar`:case`${n}.BooleanProperty`:case`${n}.BooleanMapValueType`:t+=" Boolean";break;case`${n}.DateTimeProperty`:case`${n}.DateTimeScalar`:case`${n}.DateTimeMapKeyType`:case`${n}.DateTimeMapValueType`:t+=" DateTime";break;case`${n}.DoubleProperty`:case`${n}.DoubleScalar`:case`${n}.DoubleMapValueType`:t+=" Double";break;case`${n}.IntegerProperty`:case`${n}.IntegerScalar`:case`${n}.IntegerMapValueType`:t+=" Integer";break;case`${n}.LongProperty`:case`${n}.LongScalar`:case`${n}.LongMapValueType`:t+=" Long";break;case`${n}.StringProperty`:case`${n}.StringScalar`:case`${n}.StringMapKeyType`:case`${n}.StringMapValueType`:t+=" String";break;case`${n}.ObjectProperty`:case`${n}.ObjectMapKeyType`:case`${n}.ObjectMapValueType`:case`${n}.RelationshipProperty`:case`${n}.RelationshipMapValueType`:t+=` ${e.type.name}`}return t}function l(e){let t="",r="",s="";switch(e.$class){case`${n}.EnumProperty`:break;case`${n}.BooleanProperty`:case`${n}.BooleanScalar`:!0!==e.defaultValue&&!1!==e.defaultValue||(e.defaultValue?r+=" default=true":r+=" default=false");break;case`${n}.DateTimeProperty`:case`${n}.DateTimeScalar`:e.defaultValue&&(t+=` default="${e.defaultValue}"`);break;case`${n}.DoubleProperty`:case`${n}.DoubleScalar`:o(e.defaultValue)||(r+=` default=${e.defaultValue.toFixed(Math.max(1,(e.defaultValue.toString().split(".")[1]||[]).length))}`),e.validator&&(s+=` range=[${e.validator.lower?e.validator.lower:""},${e.validator.upper?e.validator.upper:""}]`);break;case`${n}.IntegerProperty`:case`${n}.IntegerScalar`:case`${n}.LongProperty`:case`${n}.LongScalar`:o(e.defaultValue)||(r+=` default=${e.defaultValue.toString()}`),e.validator&&(s+=` range=[${e.validator.lower?e.validator.lower:""},${e.validator.upper?e.validator.upper:""}]`);break;case`${n}.StringProperty`:case`${n}.StringScalar`:e.defaultValue&&(r+=` default="${e.defaultValue}"`),e.validator&&(s+=` regex=/${e.validator.pattern}/${e.validator.flags}`),e.lengthValidator&&(s+=` length=[${e.lengthValidator.minLength?e.lengthValidator.minLength:""},${e.lengthValidator.maxLength?e.lengthValidator.maxLength:""}]`);break;case`${n}.ObjectProperty`:e.defaultValue&&(r+=` default="${e.defaultValue}"`)}return t+=r,t+=s,t}e.exports={toCTO:function(e){let t="";return e.concertoVersion&&(t+=`concerto version "${e.concertoVersion}"`,t+="\n",t+="\n"),e.decorators&&e.decorators.length>0&&(t+=i(e.decorators,"")),t+=`namespace ${e.namespace}`,e.imports&&e.imports.length>0&&(t+="\n",e.imports.forEach((e=>{switch(e.$class){case`${n}.ImportType`:case`${n}.ImportTypeFrom`:t+=`\nimport ${e.namespace}.${e.name}`;break;case`${n}.ImportAll`:case`${n}.ImportAllFrom`:t+=`\nimport ${e.namespace}.*`;break;case`${n}.ImportTypes`:{const r=e.aliasedTypes?new Map(e.aliasedTypes.map((e=>{let{name:t,aliasedName:r}=e;return[t,r]}))):new Map,n=e.types.map((e=>r.has(e)?`${e} as ${r.get(e)}`:e)).join(",");t+=`\nimport ${e.namespace}.{${n}}`;break}default:throw new Error("Unrecognized import")}e.uri&&(t+=` from ${e.uri}`)}))),e.declarations&&e.declarations.length>0&&e.declarations.forEach((e=>{t+=`\n\n${function(e){let t="";if(e.decorators&&(t+=i(e.decorators,"")),function(e){return[`${n}.BooleanScalar`,`${n}.IntegerScalar`,`${n}.LongScalar`,`${n}.DoubleScalar`,`${n}.StringScalar`,`${n}.DateTimeScalar`].includes(e.$class)}(e))t+=`scalar ${e.name} extends`,t+=c(e),t+=l(e);else if(function(e){return e.$class===`${n}.MapDeclaration`}(e)){const r=[e.key,e.value];t+=`map ${e.name} {`,r.forEach((e=>{t+=`\n ${function(e){let t="";return e.decorators&&(t+=i(e.decorators," ")),e.$class===`${n}.RelationshipMapValueType`?t+="--\x3e":t+="o",t+=c(e),t}(e)}`})),t+="\n}"}else{switch(e.isAbstract&&(t+="abstract "),e.$class){case`${n}.AssetDeclaration`:t+=`asset ${e.name} `;break;case`${n}.ConceptDeclaration`:t+=`concept ${e.name} `;break;case`${n}.EventDeclaration`:t+=`event ${e.name} `;break;case`${n}.ParticipantDeclaration`:t+=`participant ${e.name} `;break;case`${n}.TransactionDeclaration`:t+=`transaction ${e.name} `;break;case`${n}.EnumDeclaration`:t+=`enum ${e.name} `}if(e.identified&&(e.identified.$class===`${n}.IdentifiedBy`?t+=`identified by ${e.identified.name} `:t+="identified "),e.superType){if(e.superType.name===e.name)throw new Error(`The declaration "${e.name}" cannot extend itself.`);t+=`extends ${e.superType.name} `}t+="{",e.properties.forEach((e=>{t+=`\n ${function(e){let t="";return e.decorators&&(t+=i(e.decorators," ")),e.$class===`${n}.RelationshipProperty`?t+="--\x3e":t+="o",t+=c(e),e.isArray&&(t+="[]"),t+=` ${e.name}`,t+=l(e),e.isOptional&&(t+=" optional"),t}(e)}`})),t+="\n}"}return t}(e)}`})),t}}},250:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,i){i=i||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var i=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return i.long?(c=e,(l=Math.abs(c))>=o?a(c,l,o,"day"):l>=n?a(c,l,n,"hour"):l>=r?a(c,l,r,"minute"):l>=t?a(c,l,t,"second"):c+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},431:e=>{"use strict";e.exports=e=>{const t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},237:(e,t,r)=>{"use strict";const n=r(713),o=r(303),s=r(993),a=r(548);e.exports={ParseException:n,Parser:o,Printer:s,External:a}},833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==o&&"env"in o&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},20:(e,t,r)=>{"use strict";const n=r(786),o=r(516),s=r(539),a=r(705),i=r(587),c=r(357),l=r(390),u=r(597),p=r(931),d=r(870),f=r(529),h=r(934),m=r(830),g=r(526),y=r(284),v=r(405),b=r(795),w=r(116);e.exports={BaseException:n,BaseFileException:o,FileDownloader:s,CompositeFileLoader:a,DefaultFileLoader:i,GitHubFileLoader:c,HTTPFileLoader:l,Writer:u,FileWriter:p,InMemoryWriter:f,ModelWriter:d,Logger:h,TypedStack:m,Label:g,Identifiers:y,ErrorCodes:v,NullUtil:b,Warning:w}},786:(e,t,r)=>{"use strict";const n=r(775),o=r(405);class s extends Error{constructor(e,t,r){super(e),this.component=t||n.name,this.name=this.constructor.name,this.message=e,this.errorType=r||o.DEFAULT_BASE_EXCEPTION,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}e.exports=s},516:(e,t,r)=>{"use strict";const n=r(786);e.exports=class extends n{constructor(e,t,r,n,o){super(r||e,o),this.fileLocation=t,this.shortMessage=e,this.fileName=n}getFileLocation(){return this.fileLocation}getShortMessage(){return this.shortMessage}getFileName(){return this.fileName}}},405:e=>{"use strict";e.exports={DEFAULT_BASE_EXCEPTION:"DefaultBaseException",DEFAULT_VALIDATOR_EXCEPTION:"DefaultValidatorException",REGEX_VALIDATOR_EXCEPTION:"RegexValidatorException",TYPE_NOT_FOUND_EXCEPTION:"TypeNotFoundException",DEPRECATION_WARNING:"DeprecationWarning",CONCERTO_DEPRECATION_001:"concerto-dep:001",CONCERTO_DEPRECATION_002:"concerto-dep:002"}},539:(e,t,r)=>{"use strict";const n=r(986)("concerto:FileDownloader"),o=r(573),s=e=>[].concat(...e),a=e=>e.filter(Boolean),i=async(e,t)=>{const r=e.response&&e.response.status&&200!==e.response.status,n=e.code&&"ENOTFOUND"===e.code;if(r||n){const e=new Error(`Unable to download external model dependency '${t.url}'`);throw e.code="MISSING_DEPENDENCY",e}throw new Error("Failed to load model file. Job: "+t.url+" Details: "+e)};e.exports=class{constructor(e,t,r=10){this.fileLoader=e,this.concurrency=r,this.getExternalImports=t}downloadExternalDependencies(e,t){n("downloadExternalDependencies");const r=new Set;t||(t={});const c=s(e.map((e=>{const n=this.getExternalImports(e);return Object.keys(n).map((e=>({downloadedUris:r,url:n[e],options:t})))})));return o.withConcurrency(this.concurrency).for(c).handleError(i).process((e=>this.runJob(e,this.fileLoader))).then((({results:e})=>a(s(e))))}runJob(e,t){const r=e.downloadedUris,c=e.options,l=e.url;return r.add(l),n("runJob","Loading",l),t.load(l,c).then((async e=>{n("runJob","Loaded",l);const u=this.getExternalImports(e),p=Array.from(new Set(Object.keys(u).map((e=>u[e]))));return n("runJob","importedUris",p),(await o.withConcurrency(this.concurrency).for(p).handleError(i).process((e=>{if(!r.has(e))return this.runJob({options:c,url:e,downloadedUris:r},t)})).then((({results:e})=>a(s(e))))).concat([e])}))}}},931:(e,t,r)=>{"use strict";const n=r(995),o=r(495),s=r(597);e.exports=class extends s{constructor(e){super(),this.outputDirectory=e,this.relativeDir=null,this.fileName=null,n.mkdirSync(e,{recursive:!0})}openFile(e){this.fileName=e,this.relativeDir=null}openRelativeFile(e,t){this.relativeDir=e,this.fileName=t}writeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeLine(e,t)}writeBeforeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeBeforeLine(e,t)}closeFile(){if(!this.fileName)throw new Error("No file open");let e=this.outputDirectory;this.relativeDir&&(e=o.resolve(e,this.relativeDir)),e=o.resolve(e,this.fileName),n.mkdirSync(o.dirname(e),{recursive:!0}),n.writeFileSync(e,this.getBuffer()),this.fileName=null,this.relativeDir=null,this.clearBuffer()}}},284:e=>{"use strict";const t=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u;e.exports={normalizeIdentifier:function(e,r=-1){const n=(e,t)=>{let r="";for(const e of t)r+=`_${e.codePointAt(0).toString(16)}`;return r};let o=e??String(e);if("string"!=typeof o)throw new Error(`Unsupported identifier type, '${typeof o}'.`);if(o=o.replace(/^\p{Nd}/u,"_$&").replace(/[-‐−@#:;><|/\\\u200c\u200d]/g,"_").replace(/\s/g,"_").replace(/(?!\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D|\\u[0-9A-Fa-f]{4})(.)/gu,n).replace(/([\uD800-\uDFFF])/g,n),r>0&&(o=o.substring(0,r)),!t.test(o))throw new Error(`Unexpected error. Not able to escape identifier '${o}'.`);return o},ID_REGEX:t}},529:(e,t,r)=>{"use strict";const n=r(597);e.exports=class extends n{constructor(){super(),this.fileName="",this.data=new Map}openFile(e){this.fileName=e}closeFile(){this.data.set(this.fileName,this.getBuffer()),this.clearBuffer()}getFilesInMemory(){return this.data}}},526:e=>{"use strict";e.exports={labelToSentence:function(e=""){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z])([a-z])/g," $1$2").replace(/ +/g," ").replace(/^./,(e=>e.toUpperCase())).trim()},sentenceToLabel:function(e=""){const t=e.split(/[^A-Za-z0-9_-]+/);return t.forEach(((e,r)=>{t[r]=t[r].replace(/^./,(e=>e.toUpperCase()))})),t.join("").replace(/^./,(e=>e.toLowerCase()))}}},705:e=>{"use strict";e.exports=class{constructor(){this.fileLoaders=[]}addFileLoader(e){this.fileLoaders.push(e)}getFileLoaders(){return this.fileLoaders}clearFileLoaders(){this.fileLoaders=[]}accepts(e){for(let t=0;t<this.fileLoaders.length;t++)if(this.fileLoaders[t].accepts(e))return!0;return!1}load(e,t){for(let r=0;r<this.fileLoaders.length;r++){const n=this.fileLoaders[r];if(n.accepts(e))return n.load(e,t)}throw new Error("Failed to find a model file loader that can handle: "+e)}}},587:(e,t,r)=>{"use strict";const n=r(705),o=r(390),s=r(357);e.exports=class extends n{constructor(e){super();const t=new o(e),r=new s(e);this.addFileLoader(r),this.addFileLoader(t)}}},357:(e,t,r)=>{"use strict";const n=r(390);e.exports=class extends n{constructor(e){super(e)}accepts(e){return e.startsWith("github://")}load(e,t){const r="https://raw.githubusercontent.com/"+e.substring(9);return super.load(r,t)}}},390:e=>{"use strict";e.exports=class{constructor(e){this.processFile=e}accepts(e){return e.startsWith("http://")||e.startsWith("https://")}async load(e,t){t||(t={method:"GET",headers:{"Content-Type":"text/plain"}}),console.log(e);const r=await fetch(e,t);if(!r.ok)throw new Error(`HTTP request failed with status: ${r.status}`);const n=await r.text(),o=new URL(e),s="@"+(o.host+o.pathname).replace(/\//g,".");return this.processFile(s,n)}}},934:e=>{"use strict";const t={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},r=e=>e,n={};Object.keys(t).forEach((e=>{n[e]=(...n)=>((e,...n)=>{let o=e,s=n,a=s.shift();if(a&&"object"==typeof a&&a.level&&a.message){const e=a.padding&&a.padding[a.level];"error"===a.level&&a.stack?(o="error",a=`${a.message}\n${a.stack}`):Object.keys(t).includes(a.level)&&(o=a.level,a=a.message),a=e?`${e} ${a}`:a}s.unshift(a),(["error","warn"].includes(o)?console.error:console.log)(`${(new Date).toLocaleTimeString()} - ${o}:`,...s.map((e=>e instanceof Error?`${e.message}\n${e.stack}`:e)).map(r))})(e,...n)}));class o{static dispatch(e,...r){t[e]>t[this.level]||this.transports.forEach((t=>{t[e]&&t[e](...r)}))}static add(e){this.transports.push(e)}static error(...e){return this.dispatch("error",...e)}static warn(...e){return this.dispatch("warn",...e)}static info(...e){return this.dispatch("info",...e)}static log(...e){return this.info(...e)}static http(...e){return this.dispatch("http",...e)}static verbose(...e){return this.dispatch("verbose",...e)}static debug(...e){return this.dispatch("debug",...e)}static silly(...e){return this.dispatch("silly",...e)}}o.level="info",o.transports=[n],e.exports=o},870:(e,t,r)=>{"use strict";const n=r(995),o=r(495),s=r(431);e.exports={writeModelsToFileSystem:function(e,t,r={}){if(!t)throw new Error("`path` is a required parameter of writeModelsToFileSystem");const a=Object.assign({includeExternalModels:!0},r);e.forEach((function(e){if(e.external&&!a.includeExternalModels)return;const r=s(e.fileName).split("/").pop();n.writeFileSync(t+o.sep+r,e.definitions)}))}}},795:e=>{"use strict";e.exports=class{static isNull(e){return null==e}}},830:e=>{"use strict";e.exports=class{constructor(e){this.stack=[],this.push(e)}push(e,t){if(t&&!(e instanceof t))throw new Error("Did not find expected type "+t.constructor.name+" as argument to push. Found: "+e.toString());this.stack.push(e)}pop(e){return this.peek(e),this.stack.pop()}peek(e){if(this.stack.length<1)throw new Error("Stack is empty!");const t=this.stack[this.stack.length-1];if(e&&!(t instanceof e))throw new Error("Did not find expected type "+e+" on head of stack. Found: "+t);return t}clear(){this.stack=[]}}},116:e=>{"use strict";let t=!1;e.exports={printDeprecationWarning:function(e,r,n,s){const a=o.emitWarning;t||(t=!0,a(`DEPRECATED: ${e}`,{type:r,code:n,detail:s}))}}},597:e=>{"use strict";e.exports=class{constructor(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}writeBeforeLine(e,t){for(let t=0;t<e;t++)this.beforeBuffer+=" ";this.beforeBuffer+=t,this.beforeBuffer+="\n",this.linesWritten++}writeLine(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t),this.write("\n"),this.linesWritten++}getLineCount(){return this.linesWritten}writeIndented(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t)}write(e){if("string"!=typeof e)throw new Error("Can only append strings. Argument "+e+" has type "+typeof e);this.buffer+=e,this.linesWritten+=e.split(/\r\n|\r|\n/).length}getBuffer(){return this.beforeBuffer+this.buffer}clearBuffer(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}}},986:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==o&&"env"in o&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(77)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},77:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},558:()=>{},995:()=>{},495:()=>{},865:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[{"$class":"concerto.metamodel@1.0.0.Decorator","name":"DotNetNamespace","arguments":[{"$class":"concerto.metamodel@1.0.0.DecoratorString","value":"AccordProject.Concerto.Metamodel"}]}],"namespace":"concerto.metamodel@1.0.0","imports":[],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Position","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"line","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"column","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"offset","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Range","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"start","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"end","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"source","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TypeIdentifier","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"resolvedName","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorLiteral","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorString","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorNumber","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorBoolean","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorTypeReference","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Decorator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"arguments","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Identified","isAbstract":false,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IdentifiedBy","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Declaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapKeyType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapValueType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"key","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"value","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapKeyType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"EnumProperty"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ConceptDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isAbstract","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"identified","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"superType","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AssetDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ParticipantDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TransactionDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EventDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Property","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isOptional","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeProperty","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringRegexValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"pattern","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"flags","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringLengthValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"minLength","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"maxLength","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AliasedType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"aliasedName","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Import","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"uri","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportAll","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportTypes","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"types","isArray":true,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"aliasedTypes","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"AliasedType"},"isArray":true,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Model","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"sourceUri","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"concertoVersion","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"imports","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"declarations","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Models","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"models","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Model"},"isArray":true,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ScalarDeclaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}}]}')},775:e=>{"use strict";e.exports=JSON.parse('{"name":"@accordproject/concerto-util","version":"3.25.0","description":"Utilities for Concerto Modeling Language","homepage":"https://github.com/accordproject/concerto","engines":{"node":">=18","npm":">=10"},"main":"index.js","browser":"dist/concerto-util.js","typings":"types/index.d.ts","scripts":{"prepublishOnly":"npm run webpack","pretest":"npm run lint && npm run doc","lint":"eslint .","doc":"jsdoc --pedantic --recurse -c jsdoc.json","test":"nyc mocha --require test/setup.js --recursive -t 10000","test:watch":"nyc mocha --require test/setup.js --watch --recursive -t 10000","mocha":"mocha --recursive -t 10000","nyc":"nyc mocha --recursive -t 10000","build":"npm run build:types","postbuild":"npm run webpack","webpack":"webpack --config webpack.config.js --mode production","build:types":"tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types"},"repository":{"type":"git","url":"https://github.com/accordproject/concerto.git","directory":"packages/concerto-util"},"keywords":["blockchain","hyperledger","solutions"],"author":"accordproject.org","license":"Apache-2.0","devDependencies":{"chai":"4.3.6","chai-as-promised":"7.1.1","chai-things":"0.2.0","eslint":"8.57.1","jsdoc":"4.0.4","mocha":"10.8.2","node-polyfill-webpack-plugin":"4.0.0","nyc":"17.1.0","sinon":"19.0.2","tmp-promise":"3.0.3","typescript":"5.7.2","undici":"7.16.0","webpack":"5.96.1"},"dependencies":{"@supercharge/promise-pool":"1.7.0","debug":"4.3.7","slash":"3.0.0"},"browserslist":"> 0.25%, not dead","nyc":{"produce-source-map":"true","sourceMap":"inline","reporter":["lcov","text-summary","html","json"],"include":["lib/**/*.js"],"all":true,"check-coverage":true,"statements":99,"branches":93,"functions":98,"lines":99}}')}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}(237);var e,t},e.exports=n()},8487:e=>{var t;self,t=()=>{return e={573:(e,t,r)=>{"use strict";const n=r(187);e.exports=n.PromisePool},160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(160);t.PromisePoolExecutor=class{constructor(){this.tasks=[],this.items=[],this.errors=[],this.results=[],this.concurrency=10,this.handler=()=>{},this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}for(e){return this.items=e,this}withHandler(e){return this.handler=e,this}handleError(e){return this.errorHandler=e,this}hasReachedConcurrencyLimit(){return this.activeCount()>=this.concurrency}activeCount(){return this.tasks.length}async start(){return this.validateInputs(),await this.process()}validateInputs(){if("function"!=typeof this.handler)throw new Error("The first parameter for the .process(fn) method must be a function");if(!("number"==typeof this.concurrency&&this.concurrency>=1))throw new TypeError(`"concurrency" must be a number, 1 or up. Received "${this.concurrency}" (${typeof this.concurrency})`);if(!Array.isArray(this.items))throw new TypeError('"items" must be an array. Received '+typeof this.items);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw new Error("The error handler must be a function. Received "+typeof this.errorHandler)}async process(){for(const e of this.items)this.hasReachedConcurrencyLimit()&&await this.processingSlot(),this.startProcessing(e);return this.drained()}async processingSlot(){return this.waitForTaskToFinish()}async waitForTaskToFinish(){await Promise.race(this.tasks)}startProcessing(e){const t=this.createTaskFor(e).then((e=>{this.results.push(e),this.tasks.splice(this.tasks.indexOf(t),1)})).catch((r=>{if(this.tasks.splice(this.tasks.indexOf(t),1),this.errorHandler)return this.errorHandler(r,e);this.errors.push(n.PromisePoolError.createFrom(r,e))}));this.tasks.push(t)}async createTaskFor(e){return this.handler(e)}async drained(){return await this.drainActiveTasks(),{results:this.results,errors:this.errors}}async drainActiveTasks(){await Promise.all(this.tasks)}}},187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(241);class o{constructor(e){this.concurrency=10,this.items=null!=e?e:[],this.errorHandler=void 0}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}for(e){return new o(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}async process(e){return(new n.PromisePoolExecutor).withConcurrency(this.concurrency).withHandler(e).handleError(this.errorHandler).for(this.items).start()}}t.PromisePool=o},599:(e,t,r)=>{"use strict";const n=r(330),o=r(673);class s extends Error{constructor(e,t,r){super(e),this.component=t||n.name,this.name=this.constructor.name,this.message=e,this.errorType=r||o.DEFAULT_BASE_EXCEPTION,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}e.exports=s},133:(e,t,r)=>{"use strict";const n=r(599);e.exports=class extends n{constructor(e,t,r,n,o){super(r||e,o),this.fileLocation=t,this.shortMessage=e,this.fileName=n}getFileLocation(){return this.fileLocation}getShortMessage(){return this.shortMessage}getFileName(){return this.fileName}}},673:e=>{"use strict";e.exports={DEFAULT_BASE_EXCEPTION:"DefaultBaseException",DEFAULT_VALIDATOR_EXCEPTION:"DefaultValidatorException",REGEX_VALIDATOR_EXCEPTION:"RegexValidatorException",TYPE_NOT_FOUND_EXCEPTION:"TypeNotFoundException",DEPRECATION_WARNING:"DeprecationWarning",CONCERTO_DEPRECATION_001:"concerto-dep:001",CONCERTO_DEPRECATION_002:"concerto-dep:002"}},168:(e,t,r)=>{"use strict";const n=r(833)("concerto:FileDownloader"),o=r(573),s=e=>[].concat(...e),a=e=>e.filter(Boolean),i=async(e,t)=>{const r=e.response&&e.response.status&&200!==e.response.status,n=e.code&&"ENOTFOUND"===e.code;if(r||n){const e=new Error(`Unable to download external model dependency '${t.url}'`);throw e.code="MISSING_DEPENDENCY",e}throw new Error("Failed to load model file. Job: "+t.url+" Details: "+e)};e.exports=class{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.fileLoader=e,this.concurrency=r,this.getExternalImports=t}downloadExternalDependencies(e,t){n("downloadExternalDependencies");const r=new Set;t||(t={});const c=s(e.map((e=>{const n=this.getExternalImports(e);return Object.keys(n).map((e=>({downloadedUris:r,url:n[e],options:t})))})));return o.withConcurrency(this.concurrency).for(c).handleError(i).process((e=>this.runJob(e,this.fileLoader))).then((e=>{let{results:t}=e;return a(s(t))}))}runJob(e,t){const r=e.downloadedUris,c=e.options,l=e.url;return r.add(l),n("runJob","Loading",l),t.load(l,c).then((async e=>{n("runJob","Loaded",l);const u=this.getExternalImports(e),p=Array.from(new Set(Object.keys(u).map((e=>u[e]))));return n("runJob","importedUris",p),(await o.withConcurrency(this.concurrency).for(p).handleError(i).process((e=>{if(!r.has(e))return this.runJob({options:c,url:e,downloadedUris:r},t)})).then((e=>{let{results:t}=e;return a(s(t))}))).concat([e])}))}}},64:(e,t,r)=>{"use strict";const n=r(686),o=r(558),s=r(926);e.exports=class extends s{constructor(e){super(),this.outputDirectory=e,this.relativeDir=null,this.fileName=null,n.mkdirSync(e,{recursive:!0})}openFile(e){this.fileName=e,this.relativeDir=null}openRelativeFile(e,t){this.relativeDir=e,this.fileName=t}writeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeLine(e,t)}writeBeforeLine(e,t){if(!this.fileName)throw Error("File has not been opened!");super.writeBeforeLine(e,t)}closeFile(){if(!this.fileName)throw new Error("No file open");let e=this.outputDirectory;this.relativeDir&&(e=o.resolve(e,this.relativeDir)),e=o.resolve(e,this.fileName),n.mkdirSync(o.dirname(e),{recursive:!0}),n.writeFileSync(e,this.getBuffer()),this.fileName=null,this.relativeDir=null,this.clearBuffer()}}},721:e=>{"use strict";const t=/^(\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4})(?:\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\\u[0-9A-Fa-f]{4}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D)*$/u;e.exports={normalizeIdentifier:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=(e,t)=>{let r="";for(const e of t)r+=`_${e.codePointAt(0).toString(16)}`;return r};let o=e??String(e);if("string"!=typeof o)throw new Error(`Unsupported identifier type, '${typeof o}'.`);if(o=o.replace(/^\p{Nd}/u,"_$&").replace(/[-‐−@#:;><|/\\\u200c\u200d]/g,"_").replace(/\s/g,"_").replace(/(?!\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\$|_|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\u200C|\u200D|\\u[0-9A-Fa-f]{4})(.)/gu,n).replace(/([\uD800-\uDFFF])/g,n),r>0&&(o=o.substring(0,r)),!t.test(o))throw new Error(`Unexpected error. Not able to escape identifier '${o}'.`);return o},ID_REGEX:t}},530:(e,t,r)=>{"use strict";const n=r(926);e.exports=class extends n{constructor(){super(),this.fileName="",this.data=new Map}openFile(e){this.fileName=e}closeFile(){this.data.set(this.fileName,this.getBuffer()),this.clearBuffer()}getFilesInMemory(){return this.data}}},911:e=>{"use strict";e.exports={labelToSentence:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z])([a-z])/g," $1$2").replace(/ +/g," ").replace(/^./,(e=>e.toUpperCase())).trim()},sentenceToLabel:function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/[^A-Za-z0-9_-]+/);return e.forEach(((t,r)=>{e[r]=e[r].replace(/^./,(e=>e.toUpperCase()))})),e.join("").replace(/^./,(e=>e.toLowerCase()))}}},996:e=>{"use strict";e.exports=class{constructor(){this.fileLoaders=[]}addFileLoader(e){this.fileLoaders.push(e)}getFileLoaders(){return this.fileLoaders}clearFileLoaders(){this.fileLoaders=[]}accepts(e){for(let t=0;t<this.fileLoaders.length;t++)if(this.fileLoaders[t].accepts(e))return!0;return!1}load(e,t){for(let r=0;r<this.fileLoaders.length;r++){const n=this.fileLoaders[r];if(n.accepts(e))return n.load(e,t)}throw new Error("Failed to find a model file loader that can handle: "+e)}}},546:(e,t,r)=>{"use strict";const n=r(996),o=r(25),s=r(990);e.exports=class extends n{constructor(e){super();const t=new o(e),r=new s(e);this.addFileLoader(r),this.addFileLoader(t)}}},990:(e,t,r)=>{"use strict";const n=r(25);e.exports=class extends n{constructor(e){super(e)}accepts(e){return e.startsWith("github://")}load(e,t){const r="https://raw.githubusercontent.com/"+e.substring(9);return super.load(r,t)}}},25:e=>{"use strict";e.exports=class{constructor(e){this.processFile=e}accepts(e){return e.startsWith("http://")||e.startsWith("https://")}async load(e,t){t||(t={method:"GET",headers:{"Content-Type":"text/plain"}}),console.log(e);const r=await fetch(e,t);if(!r.ok)throw new Error(`HTTP request failed with status: ${r.status}`);const n=await r.text(),o=new URL(e),s="@"+(o.host+o.pathname).replace(/\//g,".");return this.processFile(s,n)}}},545:e=>{"use strict";const t={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},r=e=>e,n={};Object.keys(t).forEach((e=>{n[e]=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return function(e){let n=e;for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];let i=s,c=i.shift();if(c&&"object"==typeof c&&c.level&&c.message){const e=c.padding&&c.padding[c.level];"error"===c.level&&c.stack?(n="error",c=`${c.message}\n${c.stack}`):Object.keys(t).includes(c.level)&&(n=c.level,c=c.message),c=e?`${e} ${c}`:c}i.unshift(c),(["error","warn"].includes(n)?console.error:console.log)(`${(new Date).toLocaleTimeString()} - ${n}:`,...i.map((e=>e instanceof Error?`${e.message}\n${e.stack}`:e)).map(r))}(e,...o)}}));class o{static dispatch(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t[e]>t[this.level]||this.transports.forEach((t=>{t[e]&&t[e](...n)}))}static add(e){this.transports.push(e)}static error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("error",...t)}static warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("warn",...t)}static info(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("info",...t)}static log(){return this.info(...arguments)}static http(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("http",...t)}static verbose(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("verbose",...t)}static debug(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("debug",...t)}static silly(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.dispatch("silly",...t)}}o.level="info",o.transports=[n],e.exports=o},95:(e,t,r)=>{"use strict";const n=r(686),o=r(558),s=r(431);e.exports={writeModelsToFileSystem:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw new Error("`path` is a required parameter of writeModelsToFileSystem");const a=Object.assign({includeExternalModels:!0},r);e.forEach((function(e){if(e.external&&!a.includeExternalModels)return;const r=s(e.fileName).split("/").pop();n.writeFileSync(t+o.sep+r,e.definitions)}))}}},328:e=>{"use strict";e.exports=class{static isNull(e){return null==e}}},717:e=>{"use strict";e.exports=class{constructor(e){this.stack=[],this.push(e)}push(e,t){if(t&&!(e instanceof t))throw new Error("Did not find expected type "+t.constructor.name+" as argument to push. Found: "+e.toString());this.stack.push(e)}pop(e){return this.peek(e),this.stack.pop()}peek(e){if(this.stack.length<1)throw new Error("Stack is empty!");const t=this.stack[this.stack.length-1];if(e&&!(t instanceof e))throw new Error("Did not find expected type "+e+" on head of stack. Found: "+t);return t}clear(){this.stack=[]}}},361:e=>{"use strict";let t=!1;e.exports={printDeprecationWarning:function(e,r,n,o){t||(t=!0,function(e,t){console.warn({message:`DEPRECATED: ${e}`,type:t?.type,code:t?.code,detail:t?.detail})}(`DEPRECATED: ${e}`,{type:r,code:n,detail:o}))}}},926:e=>{"use strict";e.exports=class{constructor(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}writeBeforeLine(e,t){for(let t=0;t<e;t++)this.beforeBuffer+=" ";this.beforeBuffer+=t,this.beforeBuffer+="\n",this.linesWritten++}writeLine(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t),this.write("\n"),this.linesWritten++}getLineCount(){return this.linesWritten}writeIndented(e,t){for(let t=0;t<e;t++)this.write(" ");this.write(t)}write(e){if("string"!=typeof e)throw new Error("Can only append strings. Argument "+e+" has type "+typeof e);this.buffer+=e,this.linesWritten+=e.split(/\r\n|\r|\n/).length}getBuffer(){return this.beforeBuffer+this.buffer}clearBuffer(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}}},250:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,i){i=i||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var i=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===u&&isFinite(e))return i.long?(c=e,(l=Math.abs(c))>=o?a(c,l,o,"day"):l>=n?a(c,l,n,"hour"):l>=r?a(c,l,r,"minute"):l>=t?a(c,l,t,"second"):c+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},907:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var i,c=[],l=!1,u=-1;function p(){l&&i&&(l=!1,i.length?c=i.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=c.length;t;){for(i=c,c=[];++u<t;)i&&i[u].run();u=-1,t=c.length}i=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},431:e=>{"use strict";e.exports=e=>{const t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},237:(e,t,r)=>{"use strict";const n=r(599),o=r(133),s=r(168),a=r(996),i=r(546),c=r(990),l=r(25),u=r(926),p=r(64),d=r(95),f=r(530),h=r(545),m=r(717),g=r(911),y=r(721),v=r(673),b=r(328),w=r(361);e.exports={BaseException:n,BaseFileException:o,FileDownloader:s,CompositeFileLoader:a,DefaultFileLoader:i,GitHubFileLoader:c,HTTPFileLoader:l,Writer:u,FileWriter:p,InMemoryWriter:f,ModelWriter:d,Logger:h,TypedStack:m,Label:g,Identifiers:y,ErrorCodes:v,NullUtil:b,Warning:w}},833:(e,t,r)=>{var n=r(907);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e={NODE_ENV:"production"}.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,s,a=null;function i(...e){if(!i.enabled)return;const n=i,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];r=s.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},686:()=>{},558:()=>{},330:e=>{"use strict";e.exports=JSON.parse('{"name":"@accordproject/concerto-util","version":"3.25.0","description":"Utilities for Concerto Modeling Language","homepage":"https://github.com/accordproject/concerto","engines":{"node":">=18","npm":">=10"},"main":"index.js","browser":"dist/concerto-util.js","typings":"types/index.d.ts","scripts":{"prepublishOnly":"npm run webpack","pretest":"npm run lint && npm run doc","lint":"eslint .","doc":"jsdoc --pedantic --recurse -c jsdoc.json","test":"nyc mocha --require test/setup.js --recursive -t 10000","test:watch":"nyc mocha --require test/setup.js --watch --recursive -t 10000","mocha":"mocha --recursive -t 10000","nyc":"nyc mocha --recursive -t 10000","build":"npm run build:types","postbuild":"npm run webpack","webpack":"webpack --config webpack.config.js --mode production","build:types":"tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types"},"repository":{"type":"git","url":"https://github.com/accordproject/concerto.git","directory":"packages/concerto-util"},"keywords":["blockchain","hyperledger","solutions"],"author":"accordproject.org","license":"Apache-2.0","devDependencies":{"chai":"4.3.6","chai-as-promised":"7.1.1","chai-things":"0.2.0","eslint":"8.57.1","jsdoc":"4.0.4","mocha":"10.8.2","node-polyfill-webpack-plugin":"4.0.0","nyc":"17.1.0","sinon":"19.0.2","tmp-promise":"3.0.3","typescript":"5.7.2","undici":"7.16.0","webpack":"5.96.1"},"dependencies":{"@supercharge/promise-pool":"1.7.0","debug":"4.3.7","slash":"3.0.0"},"browserslist":"> 0.25%, not dead","nyc":{"produce-source-map":"true","sourceMap":"inline","reporter":["lcov","text-summary","html","json"],"include":["lib/**/*.js"],"all":true,"check-coverage":true,"statements":99,"branches":93,"functions":98,"lines":99}}')}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}(237);var e,t},e.exports=t()},6686:()=>{},5558:()=>{},182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var n=r(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return n.default}});var o=r(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return o.default}});var s=r(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return s.default}});var a=r(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.default}});var i=r(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return i.default}});var c=r(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var l=r(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return l.default}});var u=r(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return u.default}});var p=r(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return p.default}});var d=r(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var f=r(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return f.default}});var h=r(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var m=r(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=r(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,o,s,a){return n((i=n(n(t,e),n(o,a)))<<(c=s)|i>>>32-c,r);var i,c}function s(e,t,r,n,s,a,i){return o(t&r|~t&n,e,t,s,a,i)}function a(e,t,r,n,s,a,i){return o(t&n|r&~n,e,t,s,a,i)}function i(e,t,r,n,s,a,i){return o(t^r^n,e,t,s,a,i)}function c(e,t,r,n,s,a,i){return o(r^(t|~n),e,t,s,a,i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let r=0;r<4*e.length;r++)t[r]=e[r>>2]>>>r%4*8&255;return t}(function(e,t){const o=new Uint32Array(r(t)).fill(0);o.set(e),o[t>>5]|=128<<t%32,o[o.length-1]=t,e=o;let l=1732584193,u=-271733879,p=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=l,o=u,f=p,h=d;l=s(l,u,p,d,e[t],7,-680876936),d=s(d,l,u,p,e[t+1],12,-389564586),p=s(p,d,l,u,e[t+2],17,606105819),u=s(u,p,d,l,e[t+3],22,-1044525330),l=s(l,u,p,d,e[t+4],7,-176418897),d=s(d,l,u,p,e[t+5],12,1200080426),p=s(p,d,l,u,e[t+6],17,-1473231341),u=s(u,p,d,l,e[t+7],22,-45705983),l=s(l,u,p,d,e[t+8],7,1770035416),d=s(d,l,u,p,e[t+9],12,-1958414417),p=s(p,d,l,u,e[t+10],17,-42063),u=s(u,p,d,l,e[t+11],22,-1990404162),l=s(l,u,p,d,e[t+12],7,1804603682),d=s(d,l,u,p,e[t+13],12,-40341101),p=s(p,d,l,u,e[t+14],17,-1502002290),u=s(u,p,d,l,e[t+15],22,1236535329),l=a(l,u,p,d,e[t+1],5,-165796510),d=a(d,l,u,p,e[t+6],9,-1069501632),p=a(p,d,l,u,e[t+11],14,643717713),u=a(u,p,d,l,e[t],20,-373897302),l=a(l,u,p,d,e[t+5],5,-701558691),d=a(d,l,u,p,e[t+10],9,38016083),p=a(p,d,l,u,e[t+15],14,-660478335),u=a(u,p,d,l,e[t+4],20,-405537848),l=a(l,u,p,d,e[t+9],5,568446438),d=a(d,l,u,p,e[t+14],9,-1019803690),p=a(p,d,l,u,e[t+3],14,-187363961),u=a(u,p,d,l,e[t+8],20,1163531501),l=a(l,u,p,d,e[t+13],5,-1444681467),d=a(d,l,u,p,e[t+2],9,-51403784),p=a(p,d,l,u,e[t+7],14,1735328473),u=a(u,p,d,l,e[t+12],20,-1926607734),l=i(l,u,p,d,e[t+5],4,-378558),d=i(d,l,u,p,e[t+8],11,-2022574463),p=i(p,d,l,u,e[t+11],16,1839030562),u=i(u,p,d,l,e[t+14],23,-35309556),l=i(l,u,p,d,e[t+1],4,-1530992060),d=i(d,l,u,p,e[t+4],11,1272893353),p=i(p,d,l,u,e[t+7],16,-155497632),u=i(u,p,d,l,e[t+10],23,-1094730640),l=i(l,u,p,d,e[t+13],4,681279174),d=i(d,l,u,p,e[t],11,-358537222),p=i(p,d,l,u,e[t+3],16,-722521979),u=i(u,p,d,l,e[t+6],23,76029189),l=i(l,u,p,d,e[t+9],4,-640364487),d=i(d,l,u,p,e[t+12],11,-421815835),p=i(p,d,l,u,e[t+15],16,530742520),u=i(u,p,d,l,e[t+2],23,-995338651),l=c(l,u,p,d,e[t],6,-198630844),d=c(d,l,u,p,e[t+7],10,1126891415),p=c(p,d,l,u,e[t+14],15,-1416354905),u=c(u,p,d,l,e[t+5],21,-57434055),l=c(l,u,p,d,e[t+12],6,1700485571),d=c(d,l,u,p,e[t+3],10,-1894986606),p=c(p,d,l,u,e[t+10],15,-1051523),u=c(u,p,d,l,e[t+1],21,-2054922799),l=c(l,u,p,d,e[t+8],6,1873313359),d=c(d,l,u,p,e[t+15],10,-30611744),p=c(p,d,l,u,e[t+6],15,-1560198380),u=c(u,p,d,l,e[t+13],21,1309151649),l=c(l,u,p,d,e[t+4],6,-145523070),d=c(d,l,u,p,e[t+11],10,-1120210379),p=c(p,d,l,u,e[t+2],15,718787259),u=c(u,p,d,l,e[t+9],21,-343485551),l=n(l,r),u=n(u,o),p=n(p,f),d=n(d,h)}return Uint32Array.of(l,u,p,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(r(8*e.length)).fill(0);for(let r=0;r<e.length;r++)t[r>>2]|=(255&e[r])<<r%4*8;return t}(e),8*e.length))}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:r}},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},1797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},2291:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(n)};const n=new Uint8Array(16)},2829:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520],s=new Uint8Array(e.length+1);s.set(e),s[e.length]=128;const a=(e=s).length/4+2,i=Math.ceil(a/16),c=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];c[t]=r}c[i-1][14]=8*(e.length-1)/Math.pow(2,32),c[i-1][14]=Math.floor(c[i-1][14]),c[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const s=new Uint32Array(80);for(let t=0;t<16;++t)s[t]=c[e][t];for(let e=16;e<80;++e)s[e]=n(s[e-3]^s[e-8]^s[e-14]^s[e-16],1);let a=o[0],i=o[1],l=o[2],u=o[3],p=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),c=n(a,5)+r(o,i,l,u)+p+t[o]+s[e]>>>0;p=u,u=l,l=n(i,30)>>>0,i=a,a=c}o[0]=o[0]+a>>>0,o[1]=o[1]+i>>>0,o[2]=o[2]+l>>>0,o[3]=o[3]+u>>>0,o[4]=o[4]+p>>>0}return Uint8Array.of(o[0]>>24,o[0]>>16,o[0]>>8,o[0],o[1]>>24,o[1]>>16,o[1]>>8,o[1],o[2]>>24,o[2]>>16,o[2]>>8,o[2],o[3]>>24,o[3]>>16,o[3]>>8,o[3],o[4]>>24,o[4]>>16,o[4]>>8,o[4])}},6011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=s;const n=r(9746),o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function s(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}t.default=function(e,t=0){const r=s(e,t);if(!(0,n.default)(r))throw TypeError("Stringified UUID is invalid");return r}},1425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=a;const n=r(2291),o=r(6011),s={};function a(e,t,r){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=r.slice(10,16),e.node[0]|=1,e.clockseq=16383&(r[8]<<8|r[9])),e.msecs=t,e}function i(e,t,r,n,o,s,a=0){s||(s=new Uint8Array(16),a=0),t??=Date.now(),r??=0,n??=16383&(e[8]<<8|e[9]),o??=e.slice(10,16);const i=(1e4*(268435455&(t+=122192928e5))+r)%4294967296;s[a++]=i>>>24&255,s[a++]=i>>>16&255,s[a++]=i>>>8&255,s[a++]=255&i;const c=t/4294967296*1e4&268435455;s[a++]=c>>>8&255,s[a++]=255&c,s[a++]=c>>>24&15|16,s[a++]=c>>>16&255,s[a++]=n>>>8|128,s[a++]=255&n;for(let e=0;e<6;++e)s[a++]=o[e];return s}t.default=function(e,t,r){let c;const l=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=i(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,r);else{const e=Date.now(),o=(0,n.default)();a(s,e,o),c=i(o,s.msecs,s.nsecs,l?void 0:s.clockseq,l?void 0:s.node,t,r)}return t?c:(0,o.unsafeStringify)(c)}},6568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(r="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&r[6])<<4|r[7]>>4&15,(15&r[7])<<4|(240&r[4])>>4,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,(15&r[1])<<4|(240&r[2])>>4,96|15&r[2],r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof e?(0,o.unsafeStringify)(t):t};const n=r(1797),o=r(6011)},591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=r(338),o=r(2988);var s=r(2988);function a(e,t,r,s){return(0,o.default)(48,n.default,e,t,r,s)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return s.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return s.URL}}),a.DNS=o.DNS,a.URL=o.URL,t.default=a},2988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.stringToBytes=s,t.default=function(e,t,r,a,i,c){const l="string"==typeof r?s(r):r,u="string"==typeof a?(0,n.default)(a):a;if("string"==typeof a&&(a=(0,n.default)(a)),16!==a?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+l.length);if(p.set(u),p.set(l,u.length),p=t(p),p[6]=15&p[6]|e,p[8]=63&p[8]|128,i){c=c||0;for(let e=0;e<16;++e)i[c+e]=p[e];return i}return(0,o.unsafeStringify)(p)};const n=r(1797),o=r(6011);function s(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8"},8286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3779),o=r(2291),s=r(6011);t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const a=(e=e||{}).random||(e.rng||o.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=a[e];return t}return(0,s.unsafeStringify)(a)}},4557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=r(2829),o=r(2988);var s=r(2988);function a(e,t,r,s){return(0,o.default)(80,n.default,e,t,r,s)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return s.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return s.URL}}),a.DNS=o.DNS,a.URL=o.URL,t.default=a},6356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6011),o=r(1425),s=r(6568);t.default=function(e,t,r){e??={},r??=0;let a=(0,o.default)({...e,_v6:!0},new Uint8Array(16));if(a=(0,s.default)(a),t){for(let e=0;e<16;e++)t[r+e]=a[e];return t}return(0,n.unsafeStringify)(a)}},268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(r="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&r[3])<<4|r[4]>>4&15,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|15&r[6],r[7],(15&r[1])<<4|(240&r[2])>>4,(15&r[2])<<4|(240&r[3])>>4,16|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof e?(0,o.unsafeStringify)(t):t};const n=r(1797),o=r(6011)},4299:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=a;const n=r(2291),o=r(6011),s={};function a(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function i(e,t,r,n,o=0){return n||(n=new Uint8Array(16),o=0),t??=Date.now(),r??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[o++]=t/1099511627776&255,n[o++]=t/4294967296&255,n[o++]=t/16777216&255,n[o++]=t/65536&255,n[o++]=t/256&255,n[o++]=255&t,n[o++]=112|r>>>28&15,n[o++]=r>>>20&255,n[o++]=128|r>>>14&63,n[o++]=r>>>6&255,n[o++]=r<<2&255|3&e[10],n[o++]=e[11],n[o++]=e[12],n[o++]=e[13],n[o++]=e[14],n[o++]=e[15],n}t.default=function(e,t,r){let c;if(e)c=i(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,r);else{const e=Date.now(),o=(0,n.default)();a(s,e,o),c=i(o,s.msecs,s.seq,t,r)}return t?c:(0,o.unsafeStringify)(c)}},9746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6697);t.default=function(e){return"string"==typeof e&&n.default.test(e)}},2770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},3198:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Alias:()=>B,CST:()=>n,Composer:()=>Zt,Document:()=>Ct,Lexer:()=>Fr,LineCounter:()=>Ir,Pair:()=>ve,Parser:()=>Pr,Scalar:()=>U,Schema:()=>Tt,YAMLError:()=>Ft,YAMLMap:()=>Te,YAMLParseError:()=>It,YAMLSeq:()=>De,YAMLWarning:()=>St,default:()=>Vr,isAlias:()=>d,isCollection:()=>v,isDocument:()=>f,isMap:()=>h,isNode:()=>b,isPair:()=>m,isScalar:()=>g,isSeq:()=>y,parse:()=>Br,parseAllDocuments:()=>Rr,parseDocument:()=>_r,stringify:()=>jr,visit:()=>T,visitAsync:()=>D});var n={};r.r(n),r.d(n,{BOM:()=>fr,DOCUMENT:()=>hr,FLOW_END:()=>mr,SCALAR:()=>gr,createScalarToken:()=>tr,isCollection:()=>yr,isScalar:()=>vr,prettyToken:()=>br,resolveAsScalar:()=>er,setScalarValue:()=>rr,stringify:()=>sr,tokenType:()=>wr,visit:()=>pr});var o={};r.r(o),r.d(o,{Alias:()=>B,CST:()=>n,Composer:()=>Zt,Document:()=>Ct,Lexer:()=>Fr,LineCounter:()=>Ir,Pair:()=>ve,Parser:()=>Pr,Scalar:()=>U,Schema:()=>Tt,YAMLError:()=>Ft,YAMLMap:()=>Te,YAMLParseError:()=>It,YAMLSeq:()=>De,YAMLWarning:()=>St,isAlias:()=>d,isCollection:()=>v,isDocument:()=>f,isMap:()=>h,isNode:()=>b,isPair:()=>m,isScalar:()=>g,isSeq:()=>y,parse:()=>Br,parseAllDocuments:()=>Rr,parseDocument:()=>_r,stringify:()=>jr,visit:()=>T,visitAsync:()=>D});const s=Symbol.for("yaml.alias"),a=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),c=Symbol.for("yaml.pair"),l=Symbol.for("yaml.scalar"),u=Symbol.for("yaml.seq"),p=Symbol.for("yaml.node.type"),d=e=>!!e&&"object"==typeof e&&e[p]===s,f=e=>!!e&&"object"==typeof e&&e[p]===a,h=e=>!!e&&"object"==typeof e&&e[p]===i,m=e=>!!e&&"object"==typeof e&&e[p]===c,g=e=>!!e&&"object"==typeof e&&e[p]===l,y=e=>!!e&&"object"==typeof e&&e[p]===u;function v(e){if(e&&"object"==typeof e)switch(e[p]){case i:case u:return!0}return!1}function b(e){if(e&&"object"==typeof e)switch(e[p]){case s:case i:case l:case u:return!0}return!1}const w=e=>(g(e)||v(e))&&!!e.anchor,A=Symbol("break visit"),$=Symbol("skip children"),E=Symbol("remove node");function T(e,t){const r=I(t);f(e)?C(null,e.contents,r,Object.freeze([e]))===E&&(e.contents=null):C(null,e,r,Object.freeze([]))}function C(e,t,r,n){const o=S(e,t,r,n);if(b(o)||m(o))return N(e,n,o),C(e,o,r,n);if("symbol"!=typeof o)if(v(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const o=C(e,t.items[e],r,n);if("number"==typeof o)e=o-1;else{if(o===A)return A;o===E&&(t.items.splice(e,1),e-=1)}}}else if(m(t)){n=Object.freeze(n.concat(t));const e=C("key",t.key,r,n);if(e===A)return A;e===E&&(t.key=null);const o=C("value",t.value,r,n);if(o===A)return A;o===E&&(t.value=null)}return o}async function D(e,t){const r=I(t);f(e)?await F(null,e.contents,r,Object.freeze([e]))===E&&(e.contents=null):await F(null,e,r,Object.freeze([]))}async function F(e,t,r,n){const o=await S(e,t,r,n);if(b(o)||m(o))return N(e,n,o),F(e,o,r,n);if("symbol"!=typeof o)if(v(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const o=await F(e,t.items[e],r,n);if("number"==typeof o)e=o-1;else{if(o===A)return A;o===E&&(t.items.splice(e,1),e-=1)}}}else if(m(t)){n=Object.freeze(n.concat(t));const e=await F("key",t.key,r,n);if(e===A)return A;e===E&&(t.key=null);const o=await F("value",t.value,r,n);if(o===A)return A;o===E&&(t.value=null)}return o}function I(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function S(e,t,r,n){return"function"==typeof r?r(e,t,n):h(t)?r.Map?.(e,t,n):y(t)?r.Seq?.(e,t,n):m(t)?r.Pair?.(e,t,n):g(t)?r.Scalar?.(e,t,n):d(t)?r.Alias?.(e,t,n):void 0}function N(e,t,r){const n=t[t.length-1];if(v(n))n.items[e]=r;else if(m(n))"key"===e?n.key=r:n.value=r;else{if(!f(n)){const e=d(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}T.BREAK=A,T.SKIP=$,T.REMOVE=E,D.BREAK=A,D.SKIP=$,D.REMOVE=E;const O={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class M{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},M.defaultYaml,e),this.tags=Object.assign({},M.defaultTags,t)}clone(){const e=new M(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new M(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:M.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},M.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:M.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},M.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+e.substring(r.length).replace(/[!,[\]{}]/g,(e=>O[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&b(e.contents)){const t={};T(e.contents,((e,r)=>{b(r)&&r.tag&&(t[r.tag]=!0)})),n=Object.keys(t)}else n=[];for(const[o,s]of r)"!!"===o&&"tag:yaml.org,2002:"===s||e&&!n.some((e=>e.startsWith(s)))||t.push(`%TAG ${o} ${s}`);return t.join("\n")}}function x(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function k(e){const t=new Set;return T(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function P(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function L(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t){const r=n[t],o=L(e,n,String(t),r);void 0===o?delete n[t]:o!==r&&(n[t]=o)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),o=L(e,n,t,r);void 0===o?n.delete(t):o!==r&&n.set(t,o)}else if(n instanceof Set)for(const t of Array.from(n)){const r=L(e,n,t,t);void 0===r?n.delete(t):r!==t&&(n.delete(t),n.add(r))}else for(const[t,r]of Object.entries(n)){const o=L(e,n,t,r);void 0===o?delete n[t]:o!==r&&(n[t]=o)}return e.call(t,r,n)}function R(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>R(e,String(t),r)));if(e&&"function"==typeof e.toJSON){if(!r||!w(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const o=e.toJSON(t,r);return r.onCreate&&r.onCreate(o),o}return"bigint"!=typeof e||r?.keep?e:Number(e)}M.defaultYaml={explicit:!1,version:"1.2"},M.defaultTags={"!!":"tag:yaml.org,2002:"};class _{constructor(e){Object.defineProperty(this,p,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:o}={}){if(!f(e))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},a=R(this,"",s);if("function"==typeof n)for(const{count:e,res:t}of s.anchors.values())n(t,e);return"function"==typeof o?L(o,{"":a},"",a):a}}class B extends _{constructor(e){super(s),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],T(e,{Node:(e,t)=>{(d(t)||w(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(n=e)}return n}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:o}=t,s=this.resolve(n,t);if(!s){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let a=r.get(s);if(a||(R(s,null,t),a=r.get(s)),!a||void 0===a.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(a.count+=1,0===a.aliasCount&&(a.aliasCount=j(n,s,r)),a.count*a.aliasCount>o))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return a.res}toString(e,t,r){const n=`*${this.source}`;if(e){if(x(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function j(e,t,r){if(d(t)){const n=t.resolve(e),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}if(v(t)){let n=0;for(const o of t.items){const t=j(e,o,r);t>n&&(n=t)}return n}if(m(t)){const n=j(e,t.key,r),o=j(e,t.value,r);return Math.max(n,o)}return 1}const V=e=>!e||"function"!=typeof e&&"object"!=typeof e;class U extends _{constructor(e){super(l),this.value=e}toJSON(e,t){return t?.keep?this.value:R(this.value,e,t)}toString(){return String(this.value)}}function Q(e,t,r){if(f(e)&&(e=e.contents),b(e))return e;if(m(e)){const t=r.schema[i].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:s,schema:a,sourceObjects:c}=r;let l;if(n&&e&&"object"==typeof e){if(l=c.get(e),l)return l.anchor??(l.anchor=o(e)),new B(l.anchor);l={anchor:null,node:null},c.set(e,l)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let p=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>t.identify?.(e)&&!t.format))}(e,t,a.tags);if(!p){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new U(e);return l&&(l.node=t),t}p=e instanceof Map?a[i]:Symbol.iterator in Object(e)?a[u]:a[i]}s&&(s(p),delete r.onTagObj);const d=p?.createNode?p.createNode(r.schema,e,r):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(r.schema,e,r):new U(e);return t?d.tag=t:p.default||(d.tag=p.tag),l&&(l.node=d),d}function q(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return Q(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}U.BLOCK_FOLDED="BLOCK_FOLDED",U.BLOCK_LITERAL="BLOCK_LITERAL",U.PLAIN="PLAIN",U.QUOTE_DOUBLE="QUOTE_DOUBLE",U.QUOTE_SINGLE="QUOTE_SINGLE";const K=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class z extends _{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>b(t)||m(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(K(e))this.add(t);else{const[r,...n]=e,o=this.get(r,!0);if(v(o))o.addIn(n,t);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,q(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(v(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,o=this.get(r,!0);return 0===n.length?!t&&g(o)?o.value:o:v(o)?o.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!m(t))return!1;const r=t.value;return null==r||e&&g(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!v(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(v(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,q(this.schema,n,t))}}}}const W=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function H(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const G=(e,t,r)=>e.endsWith("\n")?H(r,t):r.includes("\n")?"\n"+H(r,t):(e.endsWith(" ")?"":" ")+r,Y="flow",J="block",X="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:a,onOverflow:i}={}){if(!o||o<0)return e;o<s&&(s=0);const c=Math.max(1+s,1+o-t.length);if(e.length<=c)return e;const l=[],u={};let p,d,f=o-t.length;"number"==typeof n&&(n>o-Math.max(2,s)?l.push(0):f=o-n);let h=!1,m=-1,g=-1,y=-1;r===J&&(m=ee(e,m,t.length),-1!==m&&(f=m+c));for(let n;n=e[m+=1];){if(r===X&&"\\"===n){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===n)r===J&&(m=ee(e,m,t.length)),f=m+t.length+c,p=void 0;else{if(" "===n&&d&&" "!==d&&"\n"!==d&&"\t"!==d){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=m)}if(m>=f)if(p)l.push(p),f=p+c,p=void 0;else if(r===X){for(;" "===d||"\t"===d;)d=n,n=e[m+=1],h=!0;const t=m>y+1?m-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,f=t+c,p=void 0}else h=!0}d=n}if(h&&i&&i(),0===l.length)return e;a&&a();let v=e.slice(0,l[0]);for(let n=0;n<l.length;++n){const o=l[n],s=l[n+1]||e.length;0===o?v=`\n${t}${e.slice(0,s)}`:(r===X&&u[o]&&(v+=`${e[o]}\\`),v+=`\n${t}${e.slice(o+1,s)}`)}return v}function ee(e,t,r){let n=t,o=t+1,s=e[o];for(;" "===s||"\t"===s;)if(t<o+r)s=e[++t];else{do{s=e[++t]}while(s&&"\n"!==s);n=t,o=t+1,s=e[o]}return n}const te=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),re=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,o=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(re(e)?" ":"");let a="",i=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(a+=r.slice(i,e)+"\\ ",e+=1,i=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{a+=r.slice(i,e);const t=r.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=r.substr(e,6)}e+=5,i=e+1}break;case"n":if(n||'"'===r[e+2]||r.length<o)e+=1;else{for(a+=r.slice(i,e)+"\n\n";"\\"===r[e+2]&&"n"===r[e+3]&&'"'!==r[e+4];)a+="\n",e+=2;a+=s," "===r[e+2]&&(a+="\\"),e+=1,i=e+1}break;default:e+=1}return a=i?a+r.slice(i):r,n?a:Z(a,s,X,te(t,!1))}function oe(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const r=t.indent||(re(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:Z(n,r,Y,te(t,!1))}function se(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),o=e.includes("'");n=t&&!o?oe:o&&!t?ne:r?oe:ne}return n(e,t)}let ae;try{ae=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{ae=/\n+(?!\n|$)/g}function ie({comment:e,type:t,value:r},n,o,s){const{blockQuote:a,commentString:i,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return se(r,n);const l=n.indent||(n.forceBlockIndent||re(r)?" ":""),u="literal"===a||"folded"!==a&&t!==U.BLOCK_FOLDED&&(t===U.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,o=e.length;if(o<=n)return!1;for(let t=0,r=0;t<o;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,o-r<=n)return!1}return!0}(r,c,l.length));if(!r)return u?"|\n":">\n";let p,d;for(d=r.length;d>0;--d){const e=r[d-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let f=r.substring(d);const h=f.indexOf("\n");-1===h?p="-":r===f||h!==f.length-1?(p="+",s&&s()):p="",f&&(r=r.slice(0,-f.length),"\n"===f[f.length-1]&&(f=f.slice(0,-1)),f=f.replace(ae,`$&${l}`));let m,g=!1,y=-1;for(m=0;m<r.length;++m){const e=r[m];if(" "===e)g=!0;else{if("\n"!==e)break;y=m}}let v=r.substring(0,y<m?y+1:m);v&&(r=r.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let b=(g?l?"2":"1":"")+p;if(e&&(b+=" "+i(e.replace(/ ?[\r\n]+/g," ")),o&&o()),!u){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`);let o=!1;const s=te(n,!0);"folded"!==a&&t!==U.BLOCK_FOLDED&&(s.onOverflow=()=>{o=!0});const i=Z(`${v}${e}${f}`,l,J,s);if(!o)return`>${b}\n${l}${i}`}return`|${b}\n${l}${v}${r=r.replace(/\n+/g,`$&${l}`)}${f}`}function ce(e,t,r,n){const{implicitKey:o,inFlow:s}=t,a="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:i}=e;i!==U.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(i=U.QUOTE_DOUBLE);const c=e=>{switch(e){case U.BLOCK_FOLDED:case U.BLOCK_LITERAL:return o||s?se(a.value,t):ie(a,t,r,n);case U.QUOTE_DOUBLE:return ne(a.value,t);case U.QUOTE_SINGLE:return oe(a.value,t);case U.PLAIN:return function(e,t,r,n){const{type:o,value:s}=e,{actualString:a,implicitKey:i,indent:c,indentStep:l,inFlow:u}=t;if(i&&s.includes("\n")||u&&/[[\]{},]/.test(s))return se(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return i||u||!s.includes("\n")?se(s,t):ie(e,t,r,n);if(!i&&!u&&o!==U.PLAIN&&s.includes("\n"))return ie(e,t,r,n);if(re(s)){if(""===c)return t.forceBlockIndent=!0,ie(e,t,r,n);if(i&&c===l)return se(s,t)}const p=s.replace(/\n+/g,`$&\n${c}`);if(a){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(p),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return se(s,t)}return i?p:Z(p,c,Y,te(t,!1))}(a,t,r,n);default:return null}};let l=c(i);if(null===l){const{defaultKeyType:e,defaultStringType:r}=t.options,n=o&&e||r;if(l=c(n),null===l)throw new Error(`Unsupported default string type ${n}`)}return l}function le(e,t){const r=Object.assign({blockQuote:!0,commentString:W,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function ue(e,t,r,n){if(m(e))return e.toString(t,r,n);if(d(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o;const s=b(e)?e:t.doc.createNode(e,{onTagObj:e=>o=e});o??(o=function(e,t){if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let r,n;if(g(t)){n=t.value;let o=e.filter((e=>e.identify?.(n)));if(o.length>1){const e=o.filter((e=>e.test));e.length>0&&(o=e)}r=o.find((e=>e.format===t.format))??o.find((e=>!e.format))}else n=t,r=e.find((e=>e.nodeClass&&n instanceof e.nodeClass));if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,s));const a=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const o=[],s=(g(e)||v(e))&&e.anchor;s&&x(s)&&(r.add(s),o.push(`&${s}`));const a=e.tag??(t.default?null:t.tag);return a&&o.push(n.directives.tagString(a)),o.join(" ")}(s,o,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const i="function"==typeof o.stringify?o.stringify(s,t,r,n):g(s)?ce(s,t,r,n):s.toString(t,r,n);return a?g(s)||"{"===i[0]||"["===i[0]?`${a} ${i}`:`${a}\n${t.indent}${i}`:i}function pe(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const de="<<",fe={identify:e=>e===de||"symbol"==typeof e&&e.description===de,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new U(Symbol(de)),{addToJSMap:he}),stringify:()=>de};function he(e,t,r){if(r=e&&d(r)?r.resolve(e.doc):r,y(r))for(const n of r.items)me(e,t,n);else if(Array.isArray(r))for(const n of r)me(e,t,n);else me(e,t,r)}function me(e,t,r){const n=e&&d(r)?r.resolve(e.doc):r;if(!h(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,e,Map);for(const[e,r]of o)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function ge(e,t,{key:r,value:n}){if(b(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(fe.identify(t)||g(t)&&(!t.type||t.type===U.PLAIN)&&fe.identify(t.value))&&e?.doc.schema.tags.some((e=>e.tag===fe.tag&&e.default)))(e,r))he(e,t,n);else{const o=R(r,"",e);if(t instanceof Map)t.set(o,R(n,o,e));else if(t instanceof Set)t.add(o);else{const s=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(b(e)&&r?.doc){const t=le(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),pe(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,o,e),a=R(n,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function ye(e,t,r){const n=Q(e,void 0,r),o=Q(t,void 0,r);return new ve(n,o)}class ve{constructor(e,t=null){Object.defineProperty(this,p,{value:c}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return b(t)&&(t=t.clone(e)),b(r)&&(r=r.clone(e)),new ve(t,r)}toJSON(e,t){return ge(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,o){const{allNullValues:s,doc:a,indent:i,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:p}}=r;let d=b(e)&&e.comment||null;if(p){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(v(e)||!b(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let f=!p&&(!e||d&&null==t&&!r.inFlow||v(e)||(g(e)?e.type===U.BLOCK_FOLDED||e.type===U.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(p||!s),indent:i+c});let h,m,w,A=!1,$=!1,E=ue(e,r,(()=>A=!0),(()=>$=!0));if(!f&&!r.inFlow&&E.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(s||null==t)return A&&n&&n(),""===E?"?":f?`? ${E}`:E}else if(s&&!p||null==t&&f)return E=`? ${E}`,d&&!A?E+=G(E,r.indent,l(d)):$&&o&&o(),E;A&&(d=null),f?(d&&(E+=G(E,r.indent,l(d))),E=`? ${E}\n${i}:`):(E=`${E}:`,d&&(E+=G(E,r.indent,l(d)))),b(t)?(h=!!t.spaceBefore,m=t.commentBefore,w=t.comment):(h=!1,m=null,w=null,t&&"object"==typeof t&&(t=a.createNode(t))),r.implicitKey=!1,f||d||!g(t)||(r.indentAtStart=E.length+1),$=!1,u||!(c.length>=2)||r.inFlow||f||!y(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let T=!1;const C=ue(t,r,(()=>T=!0),(()=>$=!0));let D=" ";if(d||h||m)D=h?"\n":"",m&&(D+=`\n${H(l(m),r.indent)}`),""!==C||r.inFlow?D+=`\n${r.indent}`:"\n"===D&&(D="\n\n");else if(!f&&v(t)){const e=C[0],n=C.indexOf("\n"),o=-1!==n,s=r.inFlow??t.flow??0===t.items.length;if(o||!s){let t=!1;if(o&&("&"===e||"!"===e)){let r=C.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===C[r+1]&&(r=C.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(D=`\n${r.indent}`)}}else""!==C&&"\n"!==C[0]||(D="");return E+=D+C,r.inFlow?T&&n&&n():w&&!T?E+=G(E,r.indent,l(w)):$&&o&&o(),E}(this,e,t,r):JSON.stringify(this)}}function be(e,t,r){return(t.inFlow??e.flow?Ae:we)(e,t,r)}function we({comment:e,items:t},r,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:a,onComment:i}){const{indent:c,options:{commentString:l}}=r,u=Object.assign({},r,{indent:s,type:null});let p=!1;const d=[];for(let e=0;e<t.length;++e){const o=t[e];let a=null;if(b(o))!p&&o.spaceBefore&&d.push(""),$e(r,d,o.commentBefore,p),o.comment&&(a=o.comment);else if(m(o)){const e=b(o.key)?o.key:null;e&&(!p&&e.spaceBefore&&d.push(""),$e(r,d,e.commentBefore,p))}p=!1;let i=ue(o,u,(()=>a=null),(()=>p=!0));a&&(i+=G(i,s,l(a))),p&&a&&(p=!1),d.push(n+i)}let f;if(0===d.length)f=o.start+o.end;else{f=d[0];for(let e=1;e<d.length;++e){const t=d[e];f+=t?`\n${c}${t}`:"\n"}}return e?(f+="\n"+H(l(e),c),i&&i()):p&&a&&a(),f}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:o,indentStep:s,flowCollectionPadding:a,options:{commentString:i}}=t;n+=s;const c=Object.assign({},t,{indent:n,inFlow:!0,type:null});let l=!1,u=0;const p=[];for(let r=0;r<e.length;++r){const o=e[r];let s=null;if(b(o))o.spaceBefore&&p.push(""),$e(t,p,o.commentBefore,!1),o.comment&&(s=o.comment);else if(m(o)){const e=b(o.key)?o.key:null;e&&(e.spaceBefore&&p.push(""),$e(t,p,e.commentBefore,!1),e.comment&&(l=!0));const r=b(o.value)?o.value:null;r?(r.comment&&(s=r.comment),r.commentBefore&&(l=!0)):null==o.value&&e?.comment&&(s=e.comment)}s&&(l=!0);let a=ue(o,c,(()=>s=null));r<e.length-1&&(a+=","),s&&(a+=G(a,n,i(s))),!l&&(p.length>u||a.includes("\n"))&&(l=!0),p.push(a),u=p.length}const{start:d,end:f}=r;if(0===p.length)return d+f;if(!l){const e=p.reduce(((e,t)=>e+t.length+2),2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=d;for(const t of p)e+=t?`\n${s}${o}${t}`:"\n";return`${e}\n${o}${f}`}return`${d}${a}${p.join(" ")}${a}${f}`}function $e({indent:e,options:{commentString:t}},r,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const o=H(t(n),e);r.push(o.trimStart())}}function Ee(e,t){const r=g(t)?t.value:t;for(const n of e)if(m(n)){if(n.key===t||n.key===r)return n;if(g(n.key)&&n.key.value===r)return n}}class Te extends z{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(i,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:o}=r,s=new this(e),a=(e,a)=>{if("function"==typeof o)a=o.call(t,e,a);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==a||n)&&s.items.push(ye(e,a,r))};if(t instanceof Map)for(const[e,r]of t)a(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&s.items.sort(e.sortMapEntries),s}add(e,t){let r;r=m(e)?e:e&&"object"==typeof e&&"key"in e?new ve(e.key,e.value):new ve(e,e?.value);const n=Ee(this.items,r.key),o=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);g(n.value)&&V(r.value)?n.value.value=r.value:n.value=r.value}else if(o){const e=this.items.findIndex((e=>o(r,e)<0));-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=Ee(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Ee(this.items,e),n=r?.value;return(!t&&g(n)?n.value:n)??void 0}has(e){return!!Ee(this.items,e)}set(e,t){this.add(new ve(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)ge(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!m(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),be(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const Ce={collection:"map",default:!0,nodeClass:Te,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Te.from(e,t,r)};class De extends z{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(u,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Fe(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=Fe(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&g(n)?n.value:n}has(e){const t=Fe(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=Fe(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];g(n)&&V(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let n=0;for(const e of this.items)r.push(R(e,String(n++),t));return r}toString(e,t,r){return e?be(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,o=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let s of t){if("function"==typeof n){const r=t instanceof Set?s:String(e++);s=n.call(t,r,s)}o.items.push(Q(s,void 0,r))}}return o}}function Fe(e){let t=g(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const Ie={collection:"seq",default:!0,nodeClass:De,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(y(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>De.from(e,t,r)},Se={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>ce(e,t=Object.assign({actualString:!0},t),r,n)},Ne={identify:e=>null==e,createNode:()=>new U(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new U(null),stringify:({source:e},t)=>"string"==typeof e&&Ne.test.test(e)?e:t.options.nullStr},Oe={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new U("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Oe.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Me({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const o="number"==typeof n?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let s=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let r=t-(s.length-e-1);for(;r-- >0;)s+="0"}return s}const xe={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Me},ke={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Me(e)}},Pe={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new U(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Me},Le=e=>"bigint"==typeof e||Number.isInteger(e),Re=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function _e(e,t,r){const{value:n}=e;return Le(n)&&n>=0?r+n.toString(t):Me(e)}const Be={identify:e=>Le(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Re(e,2,8,r),stringify:e=>_e(e,8,"0o")},je={identify:Le,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Re(e,0,10,r),stringify:Me},Ve={identify:e=>Le(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Re(e,2,16,r),stringify:e=>_e(e,16,"0x")},Ue=[Ce,Ie,Se,Ne,Oe,Be,je,Ve,xe,ke,Pe];function Qe(e){return"bigint"==typeof e||Number.isInteger(e)}const qe=({value:e})=>JSON.stringify(e),Ke=[Ce,Ie].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:qe},{identify:e=>null==e,createNode:()=>new U(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:qe},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:qe},{identify:Qe,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Qe(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:qe}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),ze={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,o,s){if(!r)return"";const a=r;let i;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<a.length;++t)e+=String.fromCharCode(a[t]);i=btoa(e)}if(t??(t=U.BLOCK_LITERAL),t!==U.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(i.length/e),o=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)o[t]=i.substr(n,e);i=o.join(t===U.BLOCK_LITERAL?"\n":" ")}return ce({comment:e,type:t,value:i},n,o,s)}};function We(e,t){if(y(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!m(n)){if(h(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new ve(new U(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=m(n)?n:new ve(n)}}else t("Expected a sequence for this tag");return e}function He(e,t,r){const{replacer:n}=r,o=new De(e);o.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let a,i;if("function"==typeof n&&(e=n.call(t,String(s++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);a=e[0],i=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);a=t[0],i=e[a]}else a=e;o.items.push(ye(a,i,r))}return o}const Ge={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:We,createNode:He};class Ye extends De{constructor(){super(),this.add=Te.prototype.add.bind(this),this.delete=Te.prototype.delete.bind(this),this.get=Te.prototype.get.bind(this),this.has=Te.prototype.has.bind(this),this.set=Te.prototype.set.bind(this),this.tag=Ye.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,o;if(m(e)?(n=R(e.key,"",t),o=R(e.value,n,t)):n=R(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,o)}return r}static from(e,t,r){const n=He(e,t,r),o=new this;return o.items=n.items,o}}Ye.tag="tag:yaml.org,2002:omap";const Je={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ye,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=We(e,t),n=[];for(const{key:e}of r.items)g(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new Ye,r)},createNode:(e,t,r)=>Ye.from(e,t,r)};function Xe({value:e,source:t},r){return t&&(e?Ze:et).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const Ze={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new U(!0),stringify:Xe},et={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new U(!1),stringify:Xe},tt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Me},rt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Me(e)}},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new U(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Me},ot=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const o=e[0];if("-"!==o&&"+"!==o||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===o?BigInt(-1)*t:t}const s=parseInt(e,r);return"-"===o?-1*s:s}function at(e,t,r){const{value:n}=e;if(ot(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Me(e)}const it={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>st(e,2,2,r),stringify:e=>at(e,2,"0b")},ct={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>st(e,1,8,r),stringify:e=>at(e,8,"0")},lt={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>st(e,0,10,r),stringify:Me},ut={identify:ot,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>st(e,2,16,r),stringify:e=>at(e,16,"0x")};class pt extends Te{constructor(e){super(e),this.tag=pt.tag}add(e){let t;t=m(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new ve(e.key,null):new ve(e,null),Ee(this.items,t.key)||this.items.push(t)}get(e,t){const r=Ee(this.items,e);return!t&&m(r)?g(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Ee(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new ve(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),o.items.push(ye(e,null,r));return o}}pt.tag="tag:yaml.org,2002:set";const dt={collection:"map",identify:e=>e instanceof Set,nodeClass:pt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>pt.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new pt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ft(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,o=e=>t?BigInt(e):Number(e),s=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*o(60)+o(t)),o(0));return"-"===r?o(-1)*s:s}function ht(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Me(e);let n="";t<0&&(n="-",t*=r(-1));const o=r(60),s=[t%o];return t<60?s.unshift(0):(t=(t-s[0])/o,s.unshift(t%o),t>=60&&(t=(t-s[0])/o,s.unshift(t))),n+s.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const mt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>ft(e,r),stringify:ht},gt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ft(e,!1),stringify:ht},yt={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(yt.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,o,s,a,i]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(r,n-1,o,s||0,a||0,i||0,c);const u=t[8];if(u&&"Z"!==u){let e=ft(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},vt=[Ce,Ie,Se,Ne,Ze,et,it,ct,lt,ut,tt,rt,nt,ze,fe,Je,Ge,dt,mt,gt,yt],bt=new Map([["core",Ue],["failsafe",[Ce,Ie,Se]],["json",Ke],["yaml11",vt],["yaml-1.1",vt]]),wt={binary:ze,bool:Oe,float:Pe,floatExp:ke,floatNaN:xe,floatTime:gt,int:je,intHex:Ve,intOct:Be,intTime:mt,map:Ce,merge:fe,null:Ne,omap:Je,pairs:Ge,seq:Ie,set:dt,timestamp:yt},At={"tag:yaml.org,2002:binary":ze,"tag:yaml.org,2002:merge":fe,"tag:yaml.org,2002:omap":Je,"tag:yaml.org,2002:pairs":Ge,"tag:yaml.org,2002:set":dt,"tag:yaml.org,2002:timestamp":yt};function $t(e,t,r){const n=bt.get(t);if(n&&!e)return r&&!n.includes(fe)?n.concat(fe):n.slice();let o=n;if(!o){if(!Array.isArray(e)){const e=Array.from(bt.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}o=[]}if(Array.isArray(e))for(const t of e)o=o.concat(t);else"function"==typeof e&&(o=e(o.slice()));return r&&(o=o.concat(fe)),o.reduce(((e,t)=>{const r="string"==typeof t?wt[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(wt).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e}),[])}const Et=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Tt{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?$t(e,"compat"):e?$t(null,e):null,this.name="string"==typeof o&&o||"core",this.knownTags=n?At:{},this.tags=$t(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,i,{value:Ce}),Object.defineProperty(this,l,{value:Se}),Object.defineProperty(this,u,{value:Ie}),this.sortMapEntries="function"==typeof s?s:!0===s?Et:null}clone(){const e=Object.create(Tt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class Ct{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,p,{value:a});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:s}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new M({version:s}),this.setSchema(s,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(Ct.prototype,{[p]:{value:a}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=b(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Dt(this.contents)&&this.contents.add(e)}addIn(e,t){Dt(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=k(this);e.anchor=!t||r.has(t)?P(t||"a",r):t}return new B(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:i,onTagObj:c,tag:l}=r??{},{onAnchor:u,setAnchors:p,sourceObjects:d}=function(e,t){const r=[],n=new Map;let o=null;return{onAnchor:n=>{r.push(n),o??(o=k(e));const s=P(t,o);return o.add(s),s},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!g(t.node)&&!v(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,s||"a"),f=Q(e,l,{aliasDuplicateObjects:o??!0,keepUndefined:i??!1,onAnchor:u,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:d});return a&&v(f)&&(f.flow=!0),p(),f}createPair(e,t,r={}){const n=this.createNode(e,null,r),o=this.createNode(t,null,r);return new ve(n,o)}delete(e){return!!Dt(this.contents)&&this.contents.delete(e)}deleteIn(e){return K(e)?null!=this.contents&&(this.contents=null,!0):!!Dt(this.contents)&&this.contents.deleteIn(e)}get(e,t){return v(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return K(e)?!t&&g(this.contents)?this.contents.value:this.contents:v(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!v(this.contents)&&this.contents.has(e)}hasIn(e){return K(e)?void 0!==this.contents:!!v(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=q(this.schema,[e],t):Dt(this.contents)&&this.contents.set(e,t)}setIn(e,t){K(e)?this.contents=t:null==this.contents?this.contents=q(this.schema,Array.from(e),t):Dt(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new M({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new M({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new Tt(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:o,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},i=R(this.contents,t??"",a);if("function"==typeof o)for(const{count:e,res:t}of a.anchors.values())o(t,e);return"function"==typeof s?L(s,{"":i},"",i):i}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const o=le(e,t),{commentString:s}=o.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=s(e.commentBefore);r.unshift(H(t,""))}let a=!1,i=null;if(e.contents){if(b(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=s(e.contents.commentBefore);r.push(H(t,""))}o.forceBlockIndent=!!e.comment,i=e.contents.comment}const t=i?void 0:()=>a=!0;let c=ue(e.contents,o,(()=>i=null),t);i&&(c+=G(c,"",s(i))),"|"!==c[0]&&">"!==c[0]||"---"!==r[r.length-1]?r.push(c):r[r.length-1]=`--- ${c}`}else r.push(ue(e.contents,o));if(e.directives?.docEnd)if(e.comment){const t=s(e.comment);t.includes("\n")?(r.push("..."),r.push(H(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&a&&(t=t.replace(/^\n+/,"")),t&&(a&&!i||""===r[r.length-1]||r.push(""),r.push(H(s(t),"")))}return r.join("\n")+"\n"}(this,e)}}function Dt(e){if(v(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Ft extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class It extends Ft{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class St extends Ft{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Nt=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:o}=r.linePos[0];r.message+=` at line ${n}, column ${o}`;let s=o-1,a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const e=Math.min(s-39,a.length-79);a="…"+a.substring(e),s-=e-1}if(a.length>80&&(a=a.substring(0,79)+"…"),n>1&&/^ *$/.test(a.substring(0,s))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),a=r+a}if(/[^ ]/.test(a)){let e=1;const t=r.linePos[1];t&&t.line===n&&t.col>o&&(e=Math.max(1,Math.min(t.col-o,80-s)));const i=" ".repeat(s)+"^".repeat(e);r.message+=`:\n\n${a}\n${i}\n`}};function Ot(e,{flow:t,indicator:r,next:n,offset:o,onError:s,parentIndent:a,startOnNewline:i}){let c=!1,l=i,u=i,p="",d="",f=!1,h=!1,m=null,g=null,y=null,v=null,b=null,w=null,A=null;for(const o of e)switch(h&&("space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&s(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(l&&"comment"!==o.type&&"newline"!==o.type&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),o.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!o.source.includes("\t")||(m=o),u=!0;break;case"comment":{u||s(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=o.source.substring(1)||" ";p?p+=d+e:p=e,d="",l=!1;break}case"newline":l?p?p+=o.source:w&&"seq-item-ind"===r||(c=!0):d+=o.source,l=!0,f=!0,(g||y)&&(v=o),u=!0;break;case"anchor":g&&s(o,"MULTIPLE_ANCHORS","A node can have at most one anchor"),o.source.endsWith(":")&&s(o.offset+o.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=o,A??(A=o.offset),l=!1,u=!1,h=!0;break;case"tag":y&&s(o,"MULTIPLE_TAGS","A node can have at most one tag"),y=o,A??(A=o.offset),l=!1,u=!1,h=!0;break;case r:(g||y)&&s(o,"BAD_PROP_ORDER",`Anchors and tags must be after the ${o.source} indicator`),w&&s(o,"UNEXPECTED_TOKEN",`Unexpected ${o.source} in ${t??"collection"}`),w=o,l="seq-item-ind"===r||"explicit-key-ind"===r,u=!1;break;case"comma":if(t){b&&s(o,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=o,l=!1,u=!1;break}default:s(o,"UNEXPECTED_TOKEN",`Unexpected ${o.type} token`),l=!1,u=!1}const $=e[e.length-1],E=$?$.offset+$.source.length:o;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(l&&m.indent<=a||"block-map"===n?.type||"block-seq"===n?.type)&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:c,comment:p,hasNewline:f,anchor:g,tag:y,newlineAfterProp:v,end:E,start:A??E}}function Mt(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Mt(t.key)||Mt(t.value))return!0}return!1;default:return!0}}function xt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!Mt(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function kt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const o="function"==typeof n?n:(e,t)=>e===t||g(e)&&g(t)&&e.value===t.value;return t.some((e=>o(e.key,r)))}const Pt="All mapping items must start at the same column";function Lt(e,t,r,n){let o="";if(e){let s=!1,a="";for(const i of e){const{source:e,type:c}=i;switch(c){case"space":s=!0;break;case"comment":{r&&!s&&n(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";o?o+=a+t:o=t,a="";break}case"newline":o&&(a+=e),s=!0;break;default:n(i,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:o,offset:t}}const Rt="Block collections are not allowed within flow collections",_t=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Bt(e,t,r,n,o,s){const a="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,o,s){const a=new(s?.nodeClass??Te)(r.schema);r.atRoot&&(r.atRoot=!1);let i=n.offset,c=null;for(const s of n.items){const{start:l,key:u,sep:p,value:d}=s,f=Ot(l,{indicator:"explicit-key-ind",next:u??p?.[0],offset:i,onError:o,parentIndent:n.indent,startOnNewline:!0}),h=!f.found;if(h){if(u&&("block-seq"===u.type?o(i,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&o(i,"BAD_INDENT",Pt)),!f.anchor&&!f.tag&&!p){c=f.end,f.comment&&(a.comment?a.comment+="\n"+f.comment:a.comment=f.comment);continue}(f.newlineAfterProp||Mt(u))&&o(u??l[l.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==n.indent&&o(i,"BAD_INDENT",Pt);r.atKey=!0;const m=f.end,g=u?e(r,u,f,o):t(r,m,l,null,f,o);r.schema.compat&&xt(n.indent,u,o),r.atKey=!1,kt(r,a.items,g)&&o(m,"DUPLICATE_KEY","Map keys must be unique");const y=Ot(p??[],{indicator:"map-value-ind",next:d,offset:g.range[2],onError:o,parentIndent:n.indent,startOnNewline:!u||"block-scalar"===u.type});if(i=y.end,y.found){h&&("block-map"!==d?.type||y.hasNewline||o(i,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&f.start<y.found.offset-1024&&o(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const c=d?e(r,d,y,o):t(r,i,p,null,y,o);r.schema.compat&&xt(n.indent,d,o),i=c.range[2];const l=new ve(g,c);r.options.keepSourceTokens&&(l.srcToken=s),a.items.push(l)}else{h&&o(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);const e=new ve(g);r.options.keepSourceTokens&&(e.srcToken=s),a.items.push(e)}}return c&&c<i&&o(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,i,c??i],a}(e,t,r,n,s):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,o,s){const a=new(s?.nodeClass??De)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let i=n.offset,c=null;for(const{start:s,value:l}of n.items){const u=Ot(s,{indicator:"seq-item-ind",next:l,offset:i,onError:o,parentIndent:n.indent,startOnNewline:!0});if(!u.found){if(!(u.anchor||u.tag||l)){c=u.end,u.comment&&(a.comment=u.comment);continue}l&&"block-seq"===l.type?o(u.end,"BAD_INDENT","All sequence items must start at the same column"):o(i,"MISSING_CHAR","Sequence item without - indicator")}const p=l?e(r,l,u,o):t(r,u.end,s,null,u,o);r.schema.compat&&xt(n.indent,l,o),i=p.range[2],a.items.push(p)}return a.range=[n.offset,i,c??i],a}(e,t,r,n,s):function({composeNode:e,composeEmptyNode:t},r,n,o,s){const a="{"===n.start.source,i=a?"flow map":"flow sequence",c=new(s?.nodeClass??(a?Te:De))(r.schema);c.flow=!0;const l=r.atRoot;l&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=n.offset+n.start.source.length;for(let s=0;s<n.items.length;++s){const l=n.items[s],{start:p,key:d,sep:f,value:h}=l,g=Ot(p,{flow:i,indicator:"explicit-key-ind",next:d??f?.[0],offset:u,onError:o,parentIndent:n.indent,startOnNewline:!1});if(!g.found){if(!(g.anchor||g.tag||f||h)){0===s&&g.comma?o(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`):s<n.items.length-1&&o(g.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${i}`),g.comment&&(c.comment?c.comment+="\n"+g.comment:c.comment=g.comment),u=g.end;continue}!a&&r.options.strict&&Mt(d)&&o(d,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===s)g.comma&&o(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`);else if(g.comma||o(g.start,"MISSING_CHAR",`Missing , between ${i} items`),g.comment){let e="";e:for(const t of p)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=c.items[c.items.length-1];m(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(a||f||g.found){r.atKey=!0;const s=g.end,m=d?e(r,d,g,o):t(r,s,p,null,g,o);_t(d)&&o(m.range,"BLOCK_IN_FLOW",Rt),r.atKey=!1;const y=Ot(f??[],{flow:i,indicator:"map-value-ind",next:h,offset:m.range[2],onError:o,parentIndent:n.indent,startOnNewline:!1});if(y.found){if(!a&&!g.found&&r.options.strict){if(f)for(const e of f){if(e===y.found)break;if("newline"===e.type){o(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}g.start<y.found.offset-1024&&o(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&h.source&&":"===h.source[0]?o(h,"MISSING_CHAR",`Missing space after : in ${i}`):o(y.start,"MISSING_CHAR",`Missing , or : between ${i} items`));const v=h?e(r,h,y,o):y.found?t(r,y.end,f,null,y,o):null;v?_t(h)&&o(v.range,"BLOCK_IN_FLOW",Rt):y.comment&&(m.comment?m.comment+="\n"+y.comment:m.comment=y.comment);const b=new ve(m,v);if(r.options.keepSourceTokens&&(b.srcToken=l),a){const e=c;kt(r,e.items,m)&&o(s,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(b)}else{const e=new Te(r.schema);e.flow=!0,e.items.push(b);const t=(v??m).range;e.range=[m.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:y.end}else{const n=h?e(r,h,g,o):t(r,g.end,f,null,g,o);c.items.push(n),u=n.range[2],_t(h)&&o(n.range,"BLOCK_IN_FLOW",Rt)}}const p=a?"}":"]",[d,...f]=n.end;let h=u;if(d&&d.source===p)h=d.offset+d.source.length;else{const e=i[0].toUpperCase()+i.substring(1);o(u,l?"MISSING_CHAR":"BAD_INDENT",l?`${e} must end with a ${p}`:`${e} in block collection must be sufficiently indented and end with a ${p}`),d&&1!==d.source.length&&f.unshift(d)}if(f.length>0){const e=Lt(f,h,r.options.strict,o);e.comment&&(c.comment?c.comment+="\n"+e.comment:c.comment=e.comment),c.range=[n.offset,h,e.offset]}else c.range=[n.offset,h,h];return c}(e,t,r,n,s),i=a.constructor;return"!"===o||o===i.tagName?(a.tag=i.tagName,a):(o&&(a.tag=o),a)}function jt(e,t,r){const n=t.offset,o=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=t[0],s=o[0];let a=0,i="",c=-1;for(let t=1;t<o.length;++t){const r=o[t];if(i||"-"!==r&&"+"!==r){const n=Number(r);!a&&n?a=n:-1===c&&(c=e+t)}else i=r}-1!==c&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let l=!1,u="",p=o.length;for(let e=1;e<t.length;++e){const o=t[e];switch(o.type){case"space":l=!0;case"newline":p+=o.source.length;break;case"comment":r&&!l&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=o.source.length,u=o.source.substring(1);break;case"error":n(o,"UNEXPECTED_TOKEN",o.message),p+=o.source.length;break;default:{n(o,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${o.type}`);const e=o.source;e&&"string"==typeof e&&(p+=e.length)}}}return{mode:s,indent:a,chomp:i,comment:u,length:p}}(t,e.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};const s=">"===o.mode?U.BLOCK_FOLDED:U.BLOCK_LITERAL,a=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),o=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)o.push([t[e],t[e+1]]);return o}(t.source):[];let i=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;i=e}if(0===i){const e="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let r=n+o.length;return t.source&&(r+=t.source.length),{value:e,type:s,comment:o.comment,range:[n,r,r]}}let c=t.indent+o.indent,l=t.offset+o.length,u=0;for(let t=0;t<i;++t){const[n,s]=a[t];if(""!==s&&"\r"!==s){if(n.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===o.indent&&(c=n.length),u=t,0!==c||e.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===o.indent&&n.length>c&&(c=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=i;--e)a[e][0].length>c&&(i=e+1);let p="",d="",f=!1;for(let e=0;e<u;++e)p+=a[e][0].slice(c)+"\n";for(let e=u;e<i;++e){let[t,n]=a[e];l+=t.length+n.length+1;const i="\r"===n[n.length-1];if(i&&(n=n.slice(0,-1)),n&&t.length<c){const e="Block scalar lines must not be less indented than their "+(o.indent?"explicit indentation indicator":"first line");r(l-n.length-(i?2:1),"BAD_INDENT",e),t=""}s===U.BLOCK_LITERAL?(p+=d+t.slice(c)+n,d="\n"):t.length>c||"\t"===n[0]?(" "===d?d="\n":f||"\n"!==d||(d="\n\n"),p+=d+t.slice(c)+n,d="\n",f=!0):""===n?"\n"===d?p+="\n":d="\n":(p+=d+n,d=" ",f=!1)}switch(o.chomp){case"-":break;case"+":for(let e=i;e<a.length;++e)p+="\n"+a[e][0].slice(c);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const h=n+o.length+t.source.length;return{value:p,type:s,comment:o.comment,range:[n,h,h]}}function Vt(e,t,r){const{offset:n,type:o,source:s,end:a}=e;let i,c;const l=(e,t,o)=>r(n+e,t,o);switch(o){case"scalar":i=U.PLAIN,c=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Ut(e)}(s,l);break;case"single-quoted-scalar":i=U.QUOTE_SINGLE,c=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Ut(e.slice(1,-1)).replace(/''/g,"'")}(s,l);break;case"double-quoted-scalar":i=U.QUOTE_DOUBLE,c=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const o=e[n];if("\r"!==o||"\n"!==e[n+1])if("\n"===o){const{fold:t,offset:o}=Qt(e,n);r+=t,n=o}else if("\\"===o){let o=e[++n];const s=qt[o];if(s)r+=s;else if("\n"===o)for(o=e[n+1];" "===o||"\t"===o;)o=e[1+ ++n];else if("\r"===o&&"\n"===e[n+1])for(o=e[1+ ++n];" "===o||"\t"===o;)o=e[1+ ++n];else if("x"===o||"u"===o||"U"===o){const s={x:2,u:4,U:8}[o];r+=Kt(e,n+1,s,t),n+=s}else{const o=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(" "===o||"\t"===o){const t=n;let s=e[n+1];for(;" "===s||"\t"===s;)s=e[1+ ++n];"\n"===s||"\r"===s&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):o)}else r+=o}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(s,l);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}const u=n+s.length,p=Lt(a,u,t,r);return{value:c,type:i,comment:p.comment,range:[n,u,p.offset]}}function Ut(e){let t,r;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),r=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let o=n[1],s=" ",a=t.lastIndex;for(r.lastIndex=a;n=r.exec(e);)""===n[1]?"\n"===s?o+=s:s="\n":(o+=s+n[1],s=" "),a=r.lastIndex;const i=/[ \t]*(.*)/sy;return i.lastIndex=a,n=i.exec(e),o+s+(n?.[1]??"")}function Qt(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const qt={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Kt(e,t,r,n){const o=e.substr(t,r),s=o.length===r&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(s)){const o=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(s)}function zt(e,t,r,n){const{value:o,type:s,comment:a,range:i}="block-scalar"===t.type?jt(e,t,n):Vt(t,e.options.strict,n),c=r?e.directives.tagName(r.source,(e=>n(r,"TAG_RESOLVE_FAILED",e))):null;let u,p;u=e.options.stringKeys&&e.atKey?e.schema[l]:c?function(e,t,r,n,o){if("!"===r)return e[l];const s=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;s.push(t)}for(const e of s)if(e.test?.test(t))return e;const a=e.knownTags[r];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[l])}(e.schema,o,c,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,o,s){const a=r.tags.find((t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n)))||r[l];if(r.compat){const e=r.compat.find((e=>e.default&&e.test?.test(n)))??r[l];a.tag!==e.tag&&s(o,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(a.tag)} or ${t.tagString(e.tag)}`,!0)}return a}(e,o,t,n):e.schema[l];try{const s=u.resolve(o,(e=>n(r??t,"TAG_RESOLVE_FAILED",e)),e.options);p=g(s)?s:new U(s)}catch(e){const s=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",s),p=new U(o)}return p.range=i,p.source=o,s&&(p.type=s),c&&(p.tag=c),u.format&&(p.format=u.format),a&&(p.comment=a),p}function Wt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const Ht={composeNode:Gt,composeEmptyNode:Yt};function Gt(e,t,r,n){const o=e.atKey,{spaceBefore:s,comment:a,anchor:i,tag:c}=r;let l,u=!0;switch(t.type){case"alias":l=function({options:e},{offset:t,source:r,end:n},o){const s=new B(r.substring(1));""===s.source&&o(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&o(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=t+r.length,i=Lt(n,a,e.strict,o);return s.range=[t,a,i.offset],i.comment&&(s.comment=i.comment),s}(e,t,n),(i||c)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=zt(e,t,c,n),i&&(l.anchor=i.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=function(e,t,r,n,o){const s=n.tag,a=s?t.directives.tagName(s.source,(e=>o(s,"TAG_RESOLVE_FAILED",e))):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&s?e.offset>s.offset?e:s:e??s;r&&(!t||t.offset<r.offset)&&o(r,"MISSING_CHAR","Missing newline after block sequence props")}const i="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!s||!a||"!"===a||a===Te.tagName&&"map"===i||a===De.tagName&&"seq"===i)return Bt(e,t,r,o,a);let c=t.schema.tags.find((e=>e.tag===a&&e.collection===i));if(!c){const n=t.schema.knownTags[a];if(!n||n.collection!==i)return n?o(s,"BAD_COLLECTION_TYPE",`${n.tag} used for ${i} collection, but expects ${n.collection??"scalar"}`,!0):o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),Bt(e,t,r,o,a);t.schema.tags.push(Object.assign({},n,{default:!1})),c=n}const l=Bt(e,t,r,o,a,c),u=c.resolve?.(l,(e=>o(s,"TAG_RESOLVE_FAILED",e)),t.options)??l,p=b(u)?u:new U(u);return p.range=l.range,p.tag=a,c?.format&&(p.format=c.format),p}(Ht,e,t,r,n),i&&(l.anchor=i.source.substring(1));break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),l=Yt(e,t.offset,void 0,null,r,n),u=!1}return i&&""===l.anchor&&n(i,"BAD_ALIAS","Anchor cannot be an empty string"),o&&e.options.stringKeys&&(!g(l)||"string"!=typeof l.value||l.tag&&"tag:yaml.org,2002:str"!==l.tag)&&n(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&("scalar"===t.type&&""===t.source?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Yt(e,t,r,n,{spaceBefore:o,comment:s,anchor:a,tag:i,end:c},l){const u=zt(e,{type:"scalar",offset:Wt(t,r,n),indent:-1,source:""},i,l);return a&&(u.anchor=a.source.substring(1),""===u.anchor&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=c),u}function Jt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Xt(e){let t="",r=!1,n=!1;for(let o=0;o<e.length;++o){const s=e[o];switch(s[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(s.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[o+1]?.[0]&&(o+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}class Zt{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const o=Jt(e);n?this.warnings.push(new St(o,t,r)):this.errors.push(new It(o,t,r))},this.directives=new M({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Xt(this.prelude);if(r){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!o)e.commentBefore=r;else if(v(o)&&!o.flow&&o.items.length>0){let e=o.items[0];m(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=o.commentBefore;o.commentBefore=e?`${r}\n${e}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Xt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,r,n)=>{const o=Jt(e);o[0]+=t,this.onError(o,"BAD_DIRECTIVE",r,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:o,end:s},a){const i=Object.assign({_directives:t},e),c=new Ct(void 0,i),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Ot(n,{indicator:"doc-start",next:o??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,!o||"block-map"!==o.type&&"block-seq"!==o.type||u.hasNewline||a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=o?Gt(l,o,u,a):Yt(l,u.end,n,null,u,a);const p=c.contents.range[2],d=Lt(s,p,!1,a);return d.comment&&(c.comment=d.comment),c.range=[r,p,d.offset],c}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new It(Jt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new It(Jt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Lt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new It(Jt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new Ct(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function er(e,t=!0,r){if(e){const n=(e,t,n)=>{const o="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new It([o,o+1],t,n);r(o,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Vt(e,t,n);case"block-scalar":return jt({options:{strict:t}},e,n)}}return null}function tr(e,t){const{implicitKey:r=!1,indent:n,inFlow:o=!1,offset:s=-1,type:a="PLAIN"}=t,i=ce({type:a,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(i[0]){case"|":case">":{const e=i.indexOf("\n"),t=i.substring(0,e),r=i.substring(e+1)+"\n",o=[{type:"block-scalar-header",offset:s,indent:n,source:t}];return nr(o,c)||o.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:s,indent:n,props:o,source:r}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:i,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:i,end:c};default:return{type:"scalar",offset:s,indent:n,source:i,end:c}}}function rr(e,t,r={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:s=!1,type:a}=r,i="indent"in e?e.indent:null;if(n&&"number"==typeof i&&(i+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");a=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=ce({type:a,value:t},{implicitKey:o||null===i,indent:null!==i&&i>0?" ".repeat(i):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),o=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=o}else{const{offset:t}=e,r="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:t,indent:r,source:n}];nr(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:s,source:o})}}(e,c);break;case'"':or(e,c,"double-quoted-scalar");break;case"'":or(e,c,"single-quoted-scalar");break;default:or(e,c,"scalar")}}function nr(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function or(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let o=t.length;"block-scalar-header"===e.props[0].type&&(o-=e.props[0].source.length);for(const e of n)e.offset+=o;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,o="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:o})}}}const sr=e=>"type"in e?ar(e):ir(e);function ar(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=ar(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=ir(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=ir(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=ir(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function ir({start:e,key:t,sep:r,value:n}){let o="";for(const t of e)o+=t.source;if(t&&(o+=ar(t)),r)for(const e of r)o+=e.source;return n&&(o+=ar(n)),o}const cr=Symbol("break visit"),lr=Symbol("skip children"),ur=Symbol("remove item");function pr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),dr(Object.freeze([]),e,t)}function dr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const o of["key","value"]){const s=t[o];if(s&&"items"in s){for(let t=0;t<s.items.length;++t){const n=dr(Object.freeze(e.concat([[o,t]])),s.items[t],r);if("number"==typeof n)t=n-1;else{if(n===cr)return cr;n===ur&&(s.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===o&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}pr.BREAK=cr,pr.SKIP=lr,pr.REMOVE=ur,pr.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},pr.parentCollection=(e,t)=>{const r=pr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],o=r?.[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};const fr="\ufeff",hr="",mr="",gr="",yr=e=>!!e&&"items"in e,vr=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function br(e){switch(e){case fr:return"<BOM>";case hr:return"<DOC>";case mr:return"<FLOW_END>";case gr:return"<SCALAR>";default:return JSON.stringify(e)}}function wr(e){switch(e){case fr:return"byte-order-mark";case hr:return"doc-mode";case mr:return"flow-error-end";case gr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ar(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const $r=new Set("0123456789ABCDEFabcdef"),Er=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Tr=new Set(",[]{}"),Cr=new Set(" ,[]{}\n\r\t"),Dr=e=>!e||Cr.has(e);class Fr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ar(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===fr&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield hr,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&Ar(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ar(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ar(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Dr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&Ar(n[3]))&&(r!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield mr,yield*this.parseLineStart();let o=0;for(;","===n[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),n[o]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Dr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ar(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>Ar(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":r+=1;break;case"\n":t=n,r=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const o=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>o))break;t=e}return yield gr,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ar(t)||e&&Tr.has(t))break;r=n}else if(Ar(t)){let o=this.buffer[n+1];if("\r"===t&&("\n"===o?(n+=1,t="\n",o=this.buffer[n+1]):r=n),"#"===o||e&&Tr.has(o))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Tr.has(t))break;r=n}return t||this.atEnd?(yield gr,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Dr))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Ar(t)||e&&Tr.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ar(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Er.has(t))t=this.buffer[++e];else{if("%"!==t||!$r.has(this.buffer[e+1])||!$r.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class Ir{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function Sr(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Nr(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Or(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Mr(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function xr(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function kr(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||Sr(t.start,"explicit-key-ind")||Sr(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Or(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class Pr{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Fr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=wr(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&kr(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Nr(r.start)&&(0===t.indent||r.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Nr(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=xr(Mr(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const o=t.sep[n];switch(o.type){case"newline":r.push(n);break;case"space":break;case"comment":o.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(o=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Sr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Or(t.key)&&!Sr(t.sep,"newline")){const e=xr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(Sr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=xr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Sr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:o,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Sr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:o});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Sr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=xr(Mr(t));kr(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=xr(Mr(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=xr(Mr(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function Lr(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new Ir||null,prettyErrors:t}}function Rr(e,t={}){const{lineCounter:r,prettyErrors:n}=Lr(t),o=new Pr(r?.addNewLine),s=new Zt(t),a=Array.from(s.compose(o.parse(e)));if(n&&r)for(const t of a)t.errors.forEach(Nt(e,r)),t.warnings.forEach(Nt(e,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function _r(e,t={}){const{lineCounter:r,prettyErrors:n}=Lr(t),o=new Pr(r?.addNewLine),s=new Zt(t);let a=null;for(const t of s.compose(o.parse(e),!0,e.length))if(a){if("silent"!==a.options.logLevel){a.errors.push(new It(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else a=t;return n&&r&&(a.errors.forEach(Nt(e,r)),a.warnings.forEach(Nt(e,r))),a}function Br(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const o=_r(e,r);if(!o)return null;if(o.warnings.forEach((e=>pe(o.options.logLevel,e))),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},r))}function jr(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return f(e)&&!n?e.toString(r):new Ct(e,n,r).toString(r)}const Vr=o},4865:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[{"$class":"concerto.metamodel@1.0.0.Decorator","name":"DotNetNamespace","arguments":[{"$class":"concerto.metamodel@1.0.0.DecoratorString","value":"AccordProject.Concerto.Metamodel"}]}],"namespace":"concerto.metamodel@1.0.0","imports":[],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Position","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"line","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"column","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"offset","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Range","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"start","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"end","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Position"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"source","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TypeIdentifier","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"resolvedName","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorLiteral","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorString","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorNumber","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorBoolean","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"value","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DecoratorTypeReference","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Decorator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"arguments","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DecoratorLiteral"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Identified","isAbstract":false,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IdentifiedBy","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Declaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapKeyType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapValueType","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"MapDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"key","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"},"isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"value","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapKeyType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapKeyType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapKeyType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleMapValueType","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipMapValueType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"MapValueType"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"EnumProperty"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EnumProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ConceptDeclaration","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isAbstract","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"identified","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Identified"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"superType","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"properties","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"},"isArray":true,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AssetDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ParticipantDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"TransactionDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"EventDeclaration","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ConceptDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Property","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false,"validator":{"$class":"concerto.metamodel@1.0.0.StringRegexValidator","pattern":"^(\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4})(?:\\\\p{Lu}|\\\\p{Ll}|\\\\p{Lt}|\\\\p{Lm}|\\\\p{Lo}|\\\\p{Nl}|\\\\$|_|\\\\\\\\u[0-9A-Fa-f]{4}|\\\\p{Mn}|\\\\p{Mc}|\\\\p{Nd}|\\\\p{Pc}|\\\\u200C|\\\\u200D)*$","flags":"u"}},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isArray","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"isOptional","isArray":false,"isOptional":false,"defaultValue":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"location","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Range"},"isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"RelationshipProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ObjectProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"type","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"TypeIdentifier"},"isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeProperty","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringRegexValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"pattern","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"flags","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringLengthValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"minLength","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"maxLength","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongProperty","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Property"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongDomainValidator","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"lower","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"upper","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"AliasedType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"aliasedName","isArray":false,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Import","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"uri","isArray":false,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportAll","isAbstract":false,"properties":[],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportType","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"name","isArray":false,"isOptional":false}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ImportTypes","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"types","isArray":true,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"aliasedTypes","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"AliasedType"},"isArray":true,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Model","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"sourceUri","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"concertoVersion","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"imports","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Import"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"declarations","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"},"isArray":true,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"decorators","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isArray":true,"isOptional":true}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Models","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"models","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Model"},"isArray":true,"isOptional":false}]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"ScalarDeclaration","isAbstract":true,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Declaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"BooleanScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.BooleanProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"IntegerScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.IntegerProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"IntegerDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"LongScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.LongProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"LongDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DoubleScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.DoubleProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"DoubleDomainValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"StringScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"validator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringRegexValidator"},"isArray":false,"isOptional":true},{"$class":"concerto.metamodel@1.0.0.ObjectProperty","name":"lengthValidator","type":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"StringLengthValidator"},"isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DateTimeScalar","isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"defaultValue","isArray":false,"isOptional":true}],"superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"ScalarDeclaration"}}]}')},480:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[],"namespace":"concerto.decorator@1.0.0","imports":[],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Decorator","isAbstract":true,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"DotNetNamespace","superType":{"$class":"concerto.metamodel@1.0.0.TypeIdentifier","name":"Decorator"},"isAbstract":false,"properties":[{"$class":"concerto.metamodel@1.0.0.StringProperty","name":"namespace","isArray":false,"isOptional":false}]}]}')},6391:e=>{"use strict";e.exports=JSON.parse('{"$class":"concerto.metamodel@1.0.0.Model","decorators":[{"$class":"concerto.metamodel@1.0.0.Decorator","name":"DotNetNamespace","arguments":[{"$class":"concerto.metamodel@1.0.0.DecoratorString","value":"AccordProject.Concerto"}]}],"namespace":"concerto@1.0.0","imports":[{"$class":"concerto.metamodel@1.0.0.ImportType","name":"DotNetNamespace","namespace":"concerto.decorator@1.0.0"}],"declarations":[{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Concept","isAbstract":true,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Asset","isAbstract":true,"properties":[],"identified":{"$class":"concerto.metamodel@1.0.0.Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Participant","isAbstract":true,"properties":[],"identified":{"$class":"concerto.metamodel@1.0.0.Identified"}},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Transaction","isAbstract":true,"properties":[]},{"$class":"concerto.metamodel@1.0.0.ConceptDeclaration","name":"Event","isAbstract":true,"properties":[]}]}')},8168:e=>{"use strict";e.exports=JSON.parse('{"en":{"like":["{0, plural, offset:1"," =0 {Be the first to like this}"," =1 {You liked this}"," one {You and someone else liked this}"," other {You and # others liked this}","}"],"test-hello-array":"Hello, {0} {1} {2}","test-hello-object":"Hello, {first} {middle} {last}","test-repeat-array":"{0} {0} {0}","test-repeat-object":"{value} {value} {value}","classdeclaration-constructor-modelastreq":"\\"ModelFile\\" and \\"AST\\" are required to create a \\"ClassDecl\\".","classdeclaration-process-unrecmodelelem":"Unrecognised model element \\"{type}\\".","classdeclaration-getfield-notfindsupertype":"Could not find supertype \\"{type}\\".","classdeclaration-validate-identifiernotproperty":"Class \\"{class}\\" is identified by field \\"{idField}\\", but does not contain this property.","classdeclaration-validate-identifiernotstring":"Class \\"{class}\\" is identified by field \\"{idField}\\", but the type of the field is not \\"String\\".","classdeclaration-validate-duplicatefieldname":"Class \\"{class}\\" has more than one field named \\"{fieldName}\\".","classdeclaration-validate-missingidentifier":"Class \\"{class}\\" is not declared as \\"abstract\\". It must define an identifying field.","classdeclaration-validate-selfextending":"Class \\"{class}\\" cannot extend itself.","classdeclaration-validate-undefined-properties":"Properties of Class \\"{class}\\" has to be defined.","modelfile-constructor-unrecmodelelem":"Unrecognised model element \\"{type}\\".","modelfile-resolvetype-undecltype":"Undeclared type \\"{type}\\" in \\"{context}\\".","modelfile-resolveimport-failfindimp":"Failed to find \\"{type}\\" in list of imports \\"[{imports}]\\" for namespace \\"{namespace}\\".","transactiondeclaration-getidentifierfieldname-noidentifyingfield":"Transactions do not have an identifying field.","composer-connect-noconopts":"\\"connectOptions\\" not specified.","composer-connect-nokeyvalstore":"\\"connectOptions.keyValStore\\" not specified.","composer-connect-nomembersrvcurl":"\\"connectOptions.membershipServicesURL\\" not specified.","composer-connect-nopeerurl":"\\"connectOptions.peerURL\\" not specified.","composer-connect-noeventhuburl":"\\"connectOptions.eventHubURL\\" not specified.","composer-connect-notconnected":"Connection needs to be connected. Call \\"connect(..)\\".","composer-login-noenrollmentid":"\\"enrollmentID\\" not specified.","composer-login-noenrollmentsecret":"\\"enrollmentSecret\\" not specified.","composer-deploy-nosecuritycontext":"\\"securityContext\\" not specified.","factory-newinstance-missingidentifier":"Missing identifier for Type \\"{type}\\" in namespace \\"{namespace}\\".","factory-newinstance-invalididentifier":"Invalid or missing identifier for Type \\"{type}\\" in namespace \\"{namespace}\\".","factory-newinstance-abstracttype":"Cannot instantiate the abstract type \\"{type}\\" in the \\"{namespace}\\" namespace.","factory-newrelationship-notregisteredwithmm":"Cannot create relationship as namespace \\"{namespace}\\" is not known.","factory-newinstance-typenotdeclaredinns":"Cannot instantiate Type \\"{type}\\" in namespace \\"{namespace}\\".","instancegenerator-newinstance-noconcreteclass":"No concrete extending type for \\"{type}\\".","modelmanager-resolvetype-nonsfortype":"No registered namespace for type \\"{type}\\" in \\"{context}\\".","modelmanager-resolvetype-notypeinnsforcontext":"No type \\"{type}\\" in namespace \\"{namespace}\\" for \\"{context}\\".","modelmanager-gettype-noregisteredns":"Namespace is not defined for type \\"{type}\\".","modelmanager-gettype-duplicatensimport":"Importing types from different versions (\\"{version1}\\", \\"{version2}\\") of the same namespace \\"{namespace}\\" is not permitted.","modelmanager-gettype-notypeinns":"Type \\"{type}\\" is not defined in namespace \\"{namespace}\\".","serializer-constructor-factorynull":"\\"Factory\\" cannot be \\"null\\".","serializer-constructor-modelmanagernull":"\\"ModelManager\\" cannot be \\"null\\".","serializer-tojson-notcobject":"\\"Serializer.toJSON\\" only accepts \\"Concept\\", \\"Event\\", \\"Asset\\", \\"Participant\\" or \\"Transaction\\".","util-securitycheck-novalidcontext":"A valid \\"SecurityContext\\" must be specified.","modelutil-getnamespace-nofnq":"FQN is invalid.","resourcevalidator-notresourceorconcept":"Model violation in the \\"{resourceId}\\" instance. Class \\"{classFQN}\\" has the value of \\"{invalidValue}\\". Expected a \\"Resource\\" or a \\"Concept\\".","resourcevalidator-notrelationship":"Model violation in the \\"{resourceId}\\" instance. Class \\"{classFQN}\\" has a value of \\"{invalidValue}\\". Expected a \\"Relationship\\".","resourcevalidator-fieldtypeviolation":"Model violation in the \\"{resourceId}\\" instance. The field \\"{propertyName}\\" has a value of \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type of value: \\"{fieldType}\\".","resourcevalidator-missingrequiredproperty":"The instance \\"{resourceId}\\" is missing the required field \\"{fieldName}\\".","resourcevalidator-invalidenumvalue":"Model violation in the \\"{resourceId}\\" instance. Invalid enum value of \\"{value}\\" for the field \\"{fieldName}\\".","resourcevalidator-abstractclass":"The class \\"{className}\\" is abstract and should not contain an instance.","resourcevalidator-undeclaredfield":"Instance \\"{resourceId}\\" has a property named \\"{propertyName}\\", which is not declared in \\"{fullyQualifiedTypeName}\\".","resourcevalidator-invalidfieldassignment":"Instance \\"{resourceId}\\" has a property \\"{propertyName}\\" with type \\"{objectType}\\" that is not derived from \\"{fieldType}\\".","resourcevalidator-emptyidentifier":"Instance \\"{resourceId}\\" has an empty identifier.","resourcevalidator-invalidmap":"Model violation in the \\"{resourceId}\\" instance. Invalid Type for Map Key or Value - expected String type.","typenotfounderror-defaultmessage":"Type \\"{typeName}\\" not found.","whereastvalidator-propertytypeviolation":"Property \\"{propertyName}\\" cannot be compared with \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type: \\"{fieldType}\\".","whereastvalidator-enum-propertytypeviolation":"Enum property \\"{propertyName}\\" cannot be compared with \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type: \\"String\\".","whereastvalidator-relationship-propertytypeviolation":"Relationship \\"{propertyName}\\" cannot be compared with \\"{value}\\" (type of value: \\"{typeOfValue}\\"). Expected type: \\"String\\".","whereastvalidator-unsupportedtype":"Property \\"{propertyName}\\" of type \\"{fieldType}\\" cannot be compared with a literal value.","whereastvalidator-invalidoperator":"Property \\"{propertyName}\\" cannot be compared using the \\"{operator}\\" operator."}}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@accordproject/concerto-core","version":"3.25.6","description":"Core Implementation for the Concerto Modeling Language","homepage":"https://github.com/accordproject/concerto","engines":{"node":">=18","npm":">=10"},"main":"index.js","browser":"dist/concerto-core.js","typings":"types/index.d.ts","scripts":{"prepublishOnly":"npm run webpack","pretest":"npm run lint","lint":"eslint .","postlicchk":"npm run doc","doc":"jsdoc --pedantic --recurse -c jsdoc.json","test":"node ./scripts/api-changelog.js && cross-env TZ=UTC nyc mocha --recursive -t 10000","test:watch":"cross-env TZ=UTC nyc mocha --watch --recursive -t 10000","mocha":"mocha --recursive -t 10000","nyc":"nyc mocha --recursive -t 10000","build":"npm run build:types","postbuild":"npm run webpack","webpack":"webpack --config webpack.config.js --mode production","build:types":"tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types"},"repository":{"type":"git","url":"https://github.com/accordproject/concerto.git","directory":"packages/concerto-cto"},"keywords":["schema","data model","verification"],"author":"accordproject.org","license":"Apache-2.0","devDependencies":{"@babel/preset-env":"7.26.0","acorn":"8.14.0","acorn-walk":"8.3.4","babel-loader":"9.2.1","chai":"4.3.6","chai-as-promised":"7.1.1","chai-things":"0.2.0","commander":"2.20.0","cross-env":"7.0.3","doctrine":"3.0.0","eslint":"8.57.1","fs-extra":"11.2.0","jsdoc":"4.0.4","klaw":"4.1.0","mocha":"10.8.2","node-polyfill-webpack-plugin":"4.0.0","nyc":"17.1.0","sinon":"19.0.2","tmp-promise":"3.0.3","typescript":"5.7.2","webpack":"5.96.1","webpack-cli":"5.1.4","xregexp":"5.1.1","yargs":"17.7.2"},"dependencies":{"@accordproject/concerto-cto":"3.25.6","@accordproject/concerto-metamodel":"3.12.6","@accordproject/concerto-util":"3.25.6","dayjs":"1.11.13","debug":"4.3.7","lorem-ipsum":"2.0.8","randexp":"0.5.3","rfdc":"1.4.1","semver":"7.6.3","urijs":"1.19.11","uuid":"11.0.3","yaml":"2.8.0"},"browserslist":"> 0.25%, not dead","nyc":{"produce-source-map":"true","sourceMap":"inline","reporter":["lcov","text-summary","html","json"],"include":["lib/**/*.js"],"exclude":[],"all":true,"check-coverage":true,"statements":99,"branches":97,"functions":98,"lines":99}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}return 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),r(5237)})()));