@elyx-code/project-logic-tree 0.0.6691 → 0.0.6693

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -387,8 +387,10 @@ ${go({describe_entity:w})}
387
387
  Alternatively you can update the entity with 'update' action. Or replace it by first removing it and then creating a new one.`}))}E===o.DataType&&(!s.parentRelationType||!(s.parentRelationType===qe.AndDataTypeGroup||s.parentRelationType===qe.OrDataTypeGroup))&&c.push(new De({id:`${i.id}--${ne.InvalidParentRelationType}`,code:ne.InvalidParentRelationType,severity:pe.Error,message:`The entity with id '${i.id}' and type '${i.type}', must have a 'parentRelationType' property set to either 'or-data-type-group' or 'and-data-type-group' when being added as a child to an entity of type 'data-type'.`}))}return{errors:c,modifiedData:s}}get isGroup(){const i=[...this.andChildrenGroup||[],...this.orChildrenGroup||[]];if(i.length>1){let n=0;for(const s of i)if(s.isResolved&&(n++,n>1))return!0}return!1}get isResolved(){return[o.BuiltInBaseEntity,o.ActionDescriptor].includes(this.parent.type)||ku(this.parent)?!0:!(!this.entity&&!this.isGroup&&!this.foreignKeyRef&&!this.foreignKeyAllowed)}validateGeneratedUpdate(i){return{errors:[],modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return n==="entity-field"&&this.setEntity(null,s),n==="foreign-key-ref-field"&&this.setForeignKeyRef(null,s),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return n==="entity-field"&&this.setEntity(i,s),n==="foreign-key-ref-field"&&this.setForeignKeyRef(i,s),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){var i,n,s,c;return(n=(i=this.entity)==null?void 0:i.unsubscribeDependents)==null||n.call(i,[{entity:this,field:"entity-field"}]),(c=(s=this.foreignKeyRef)==null?void 0:s.unsubscribeDependents)==null||c.call(s,[{entity:this,field:"foreign-key-ref-field"}]),this}subscribeToDependencies(){var i,n,s,c;return(n=(i=this.entity)==null?void 0:i.subscribeDependents)==null||n.call(i,[{entity:this,field:"entity-field"}]),(c=(s=this.foreignKeyRef)==null?void 0:s.subscribeDependents)==null||c.call(s,[{entity:this,field:"foreign-key-ref-field"}]),this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new Ei(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.entity=this.entity,i.foreignKeyRef=this.foreignKeyRef,i.andChildrenGroup=this.andChildrenGroup?[...this.andChildrenGroup]:this.andChildrenGroup,i.orChildrenGroup=this.orChildrenGroup?[...this.orChildrenGroup]:this.orChildrenGroup,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];if(this.parent&&this.parent.type!==o.BuiltInBaseEntity){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new Ei(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.entity=y.entity,this.foreignKeyRef=y.foreignKeyRef,this.andChildrenGroup=y.andChildrenGroup?[...y.andChildrenGroup]:null,this.orChildrenGroup=y.orChildrenGroup?[...y.orChildrenGroup]:null,this.parent=y.parent,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){var s,c;if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.unsubscribeFromDependencies(),i.parent){const e=re(i.parent),y=this.project.get(e),m=this.parent;if(m&&m.id!==(y==null?void 0:y.id)&&this.removeFromParent(n),y)this.setParent(y,n),this.addSelfToProject(n);else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.entity){const e=re(i.entity),y=this.project.get(e);y&&(y.type===o.DefinitionEntity&&y.parent===this||this.setEntity(y,n))}else this.setEntity(null,n);if(i.foreignKeyRef){const e=re(i.foreignKeyRef),y=this.project.get(e);y&&this.setForeignKeyRef(y,n)}else this.setForeignKeyRef(null,n);return(s=i.andChildrenGroup)==null||s.forEach(e=>{const y=re(e),m=this.project.get(y);m&&(this.addToAndGroup(m,n),m.setParent(this,n))}),[...this.andChildrenGroup||[]].forEach(e=>{var m;((m=i.andChildrenGroup)==null?void 0:m.find(v=>re(v)===e.id))||(this.removeChildGroup(e,n),e.removeFromParent(n))}),(c=i.orChildrenGroup)==null||c.forEach(e=>{const y=re(e),m=this.project.get(y);m&&(this.addToOrGroup(m,n),m.setParent(this,n))}),[...this.orChildrenGroup||[]].forEach(e=>{var m;((m=i.orChildrenGroup)==null?void 0:m.find(v=>re(v)===e.id))||(this.removeChildGroup(e,n),e.removeFromParent(n))}),this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],c=[];if(this.initialData.parent){const e=re(this.initialData.parent),y=this.project.get(e);if(y)this.setParent(y,null),i.push(y);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.entity){const e=re(this.initialData.entity),y=this.project.get(e);y&&(y.type===o.DefinitionEntity&&y.parent===this||(this.setEntity(y,null),y.type!==o.BuiltInBaseEntity&&y.type!==o.PrimitiveEntity&&i.push(y)))}if(this.initialData.foreignKeyRef){const e=re(this.initialData.foreignKeyRef),y=this.project.get(e);y&&this.setForeignKeyRef(y,null)}return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AfterAllChildrenInitialized))){var y,m,v;if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(this.initialized=!0,((y=this.parent)==null?void 0:y.type)===o.DataType){let E=this.index||0;const b=(this.parentRelationType===qe.AndDataTypeGroup?this.parent.andChildrenGroup||[]:this.parent.orChildrenGroup||[]).filter(P=>!P.deleted&&P.id!==this.id);b.length&&(E>b.length+1?E=b.length:E<0&&(E=0)),b.find(P=>(P.index||0)===E&&!P.deleted)&&b.filter(P=>(P.index||0)>=E&&!P.deleted).forEach(P=>{P.metaSync({index:(P.index||0)+1},i),i==null||i.add(P,Z.Updated),n.push(P)}),this.metaSync({index:E},i)}return(m=this.andChildrenGroup)!=null&&m.length&&this.andChildrenGroup.sort((E,b)=>(E.index||0)-(b.index||0)),(v=this.orChildrenGroup)!=null&&v.length&&this.orChildrenGroup.sort((E,b)=>(E.index||0)-(b.index||0)),this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){const n=[this],s=[],c=[],e=[];return this.parent.type===o.DataType?(this.parentRelationType===qe.AndDataTypeGroup?this.parent.addToAndGroup(this,i):this.parentRelationType===qe.OrDataTypeGroup&&this.parent.addToOrGroup(this,i),e.push(this.parent)):this.parent.type===o.DefinitionEntity?(this.parent.setAdditionalPropertiesDataType(this,i),e.push(this.parent)):this.parent.type!==o.BuiltInBaseEntity&&this.parent.setDataType(this,i),this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}removeChildGroup(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveChildGroup))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[removeChildGroup] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveChildGroup,this.id),this;if(this.andChildrenGroup){const s=this.andChildrenGroup.findIndex(c=>c.id===i.id);s!==-1&&(this.andChildrenGroup.splice(s,1),n==null||n.add(this,Z.Updated))}if(this.orChildrenGroup){const s=this.orChildrenGroup.findIndex(c=>c.id===i.id);s!==-1&&(this.orChildrenGroup.splice(s,1),n==null||n.add(this,Z.Updated))}return n==null||n.attemptAutoclose(_.RemoveChildGroup,this.id),this}initChildren(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"init-children"))){var n,s,c,e,y,m,v,E,b,w;if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.initialData.entity)if(this.initialData.entity.type===o.GenericReference){const P=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=P}else this.entity=ye(this.initialData.entity,this.project),(((s=(n=this.initialData.entity)==null?void 0:n.parent)==null?void 0:s.id)===this.id||((e=(c=this.initialData.entity)==null?void 0:c.parent)==null?void 0:e.type)===o.GenericReference&&((m=(y=this.initialData.entity)==null?void 0:y.parent)==null?void 0:m.entityId)==this.id)&&this.entity.setParent(this,null),(E=(v=this.entity).initChildren)==null||E.call(v,i);if(this.initialData.foreignKeyRef)if(this.initialData.foreignKeyRef.type===o.GenericReference){const P=this.project.findSubscribedInstanceFromReference(this.initialData.foreignKeyRef);this.foreignKeyRef=P}else this.foreignKeyRef=ye(this.initialData.foreignKeyRef,this.project),(w=(b=this.foreignKeyRef).initChildren)==null||w.call(b,i);return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(P=>{const $=ye(P,this.project);return $.setParent(this,null),$.initChildren(i),$})),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(P=>{const $=ye(P,this.project);return $.setParent(this,null),$.initChildren(i),$})),this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.options=s.options||e.options,this.parentRelationType=s.parentRelationType||e.parentRelationType,this.isList=s.isList!==void 0?s.isList:e.isList,this.inferred=s.inferred!==void 0?s.inferred:e.inferred,this.like=s.like!==void 0?s.like:e.like,this.asType=s.asType!==void 0?s.asType:e.asType,this.index=s.index!==void 0?s.index:e.index,this.implementationChooseOne=s.implementationChooseOne!==void 0?s.implementationChooseOne:e.implementationChooseOne,this.staticEntities=s.staticEntities!==void 0?s.staticEntities:e.staticEntities,this.interactiveEntities=s.interactiveEntities!==void 0?s.interactiveEntities:e.interactiveEntities,this.actionEntities=s.actionEntities!==void 0?s.actionEntities:e.actionEntities,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await Ei.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await Ei.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await Ei.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await Ei.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await Ei.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await Ei.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveFromParent))){var y,m;if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(((y=this.parent)==null?void 0:y.type)===o.DataType)this.parent.removeChildGroup(this,i);else if(((m=this.parent)==null?void 0:m.type)===o.DefinitionEntity)this.parent.removeAdditionalPropertiesDataType(i);else{const v=this.parent;v==null||v.removeDataType(i)}return this.parent&&this.parent.type!==o.BuiltInBaseEntity&&n.push(this.parent),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},n),Object.values(this.detachedDependents).forEach(m=>{const{updated:v,removed:E,added:b}=m.entity.onDetachedDependencyRemoved(this,m.field,n);s.push(...v),c.push(...E),e.push(...b)}),this.entity&&this.entity.type===o.DefinitionEntity&&this.entity.parent===this){const{updated:m,removed:v}=this.entity.remove({ignoreUpstream:!0},n);s.push(...m),c.push(...v)}if(this.andChildrenGroup&&this.andChildrenGroup.forEach(m=>{const{removed:v,updated:E}=m.remove({ignoreUpstream:!0},n);c.push(...v),s.push(...E)}),this.orChildrenGroup&&this.orChildrenGroup.forEach(m=>{const{removed:v,updated:E}=m.remove({ignoreUpstream:!0},n);c.push(...v),s.push(...E)}),!i){const m=this.removeFromParent(n);e.push(...m.added),s.push(...m.updated),c.push(...m.removed),y.push(...m.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(i!=null&&i.hasAdded(this.id))return i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);s.push(...m),c.push(...v),n.push(...E)}),this.entity&&this.entity.type===o.DefinitionEntity&&this.entity.parent===this){const{updated:y}=this.entity.restore({},i);s.push(...y)}if(this.andChildrenGroup&&this.andChildrenGroup.forEach(y=>{const{updated:m,added:v}=y.restore({},i);s.push(...m),n.push(...v)}),this.orChildrenGroup&&this.orChildrenGroup.forEach(y=>{const{updated:m,added:v}=y.restore({},i);s.push(...m),n.push(...v)}),this.parent.type===o.DataType){const y=this.parent;Array.isArray(y.andChildrenGroup)&&y.andChildrenGroup.push(this)}if(this.parent.type===o.DataType){const y=this.parent;this.parentRelationType===qe.AndDataTypeGroup?Array.isArray(y.andChildrenGroup)&&y.andChildrenGroup.push(this):this.parentRelationType===qe.OrDataTypeGroup&&Array.isArray(y.orChildrenGroup)&&y.orChildrenGroup.push(this)}else if(this.parent.type===o.DefinitionEntity){const y=this.parent;y.setAdditionalPropertiesDataType(this,i),s.push(y)}else{const y=this.parent;y.setDataType(this,i),s.push(y)}return i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),removed:D(c),affected:D(e),self:this}}toFlat(i=new Set){var s,c,e,y;return i.has(this.id)?[]:(i.add(this.id),[this,...((s=this.andChildrenGroup)==null?void 0:s.flatMap(m=>m.toFlat(i)))||[],...((c=this.orChildrenGroup)==null?void 0:c.flatMap(m=>m.toFlat(i)))||[],...((e=this.entity)==null?void 0:e.toFlat(i))||[],...((y=this.foreignKeyRef)==null?void 0:y.toFlat(i))||[]])}toFlatIds(i=new Set){var s,c,e,y;return i.has(this.id)?[]:(i.add(this.id),[this.id,...((s=this.andChildrenGroup)==null?void 0:s.flatMap(m=>m.toFlatIds(i)))||[],...((c=this.orChildrenGroup)==null?void 0:c.flatMap(m=>m.toFlatIds(i)))||[],...((e=this.entity)==null?void 0:e.toFlatIds(i))||[],...((y=this.foreignKeyRef)==null?void 0:y.toFlatIds(i))||[]])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,like:this.like,isList:this.isList,inferred:this.inferred,index:this.index,foreignKeyAllowed:this.foreignKeyAllowed,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,staticEntities:this.staticEntities,interactiveEntities:this.interactiveEntities,actionEntities:this.actionEntities,options:this.options,asType:this.asType,type:this.type,editable:this.editable,deletable:this.deletable}}toJSON(i=new Set){var n,s,c,e,y;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,options:this.options,isList:this.isList,asType:this.asType,index:this.index,like:this.like,foreignKeyAllowed:this.foreignKeyAllowed,inferred:this.inferred,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,staticEntities:this.staticEntities,interactiveEntities:this.interactiveEntities,actionEntities:this.actionEntities,foreignKeyRef:((n=this.foreignKeyRef)==null?void 0:n.toJSON(i))||null,andChildrenGroup:((s=this.andChildrenGroup)==null?void 0:s.map(m=>m.toJSON(i)))||null,orChildrenGroup:((c=this.orChildrenGroup)==null?void 0:c.map(m=>m.toJSON(i)))||null,entity:((e=this.entity)==null?void 0:e.parent)===this?this.entity.toJSON(i):((y=this.entity)==null?void 0:y.toReference())||null,parent:this.parent.toReference()})}toJSONClone(i=pt){var s,c,e,y,m,v,E,b,w,P;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().toISOString(),previousVersion:null,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,options:this.options,isList:this.isList,asType:this.asType,like:this.like,index:this.index,inferred:this.inferred,foreignKeyAllowed:this.foreignKeyAllowed,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,staticEntities:this.staticEntities,interactiveEntities:this.interactiveEntities,actionEntities:this.actionEntities,foreignKeyRef:((v=this.foreignKeyRef)==null?void 0:v.toJSONClone({...i,newId:null}))||null,andChildrenGroup:((E=this.andChildrenGroup)==null?void 0:E.map($=>$.toJSONClone({...i,newId:null})))||null,orChildrenGroup:((b=this.orChildrenGroup)==null?void 0:b.map($=>$.toJSONClone({...i,newId:null})))||null,entity:((w=this.entity)==null?void 0:w.parent)===this?this.entity.toJSONClone({...i,newId:null}):((P=this.entity)==null?void 0:P.toReference({seenEntityMaps:i.seenEntityMaps}))||null,parent:this.parent.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s,c,e,y,m;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,isList:this.isList,options:this.options,asType:this.asType,index:this.index,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,foreignKeyAllowed:this.foreignKeyAllowed,implementationChooseOne:this.implementationChooseOne,staticEntities:this.staticEntities,interactiveEntities:this.interactiveEntities,actionEntities:this.actionEntities,foreignKeyRef:((c=this.foreignKeyRef)==null?void 0:c.toReference(i))||null,andChildrenGroup:((e=this.andChildrenGroup)==null?void 0:e.map(v=>v.toReference(i)))||null,orChildrenGroup:((y=this.orChildrenGroup)==null?void 0:y.map(v=>v.toReference(i)))||null,entity:((m=this.entity)==null?void 0:m.toReference(i))||null,parent:this.parent.toReference(i)}}toFlatJSON(i=new Set){var s,c,e;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...((s=this.andChildrenGroup)==null?void 0:s.flatMap(y=>y.toFlatJSON(i)))||[],...((c=this.orChildrenGroup)==null?void 0:c.flatMap(y=>y.toFlatJSON(i)))||[],...((e=this.entity)==null?void 0:e.toFlatJSON(i))||[]])}toGenerationTarget(){var i,n;return{id:this.id,type:this.type,options:this.options||void 0,isList:this.isList,like:this.like,parentRelationType:this.parentRelationType||void 0,foreignKeyRef:((i=this.foreignKeyRef)==null?void 0:i.id)||null,asType:this.asType,entity:((n=this.entity)==null?void 0:n.id)||null,parent:this.parent.id}}toFlatGenerationTarget(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...((s=this.andChildrenGroup)==null?void 0:s.flatMap(e=>e.toFlatGenerationTarget(i)))||[],...((c=this.orChildrenGroup)==null?void 0:c.flatMap(e=>e.toFlatGenerationTarget(i)))||[],...this.entity&&this.entity.type==o.DefinitionEntity&&this.entity.parent===this&&this.entity.toFlatGenerationTarget(i)||[]])}clearErrors(){var i,n,s,c;return this.errors=[],(i=this.andChildrenGroup)==null||i.forEach(e=>e.clearErrors()),(n=this.orChildrenGroup)==null||n.forEach(e=>e.clearErrors()),this.inferred&&this.entity&&this.entity.type===o.DefinitionEntity&&((s=this.entity)==null?void 0:s.parent)===this&&((c=this.entity)==null||c.clearErrors()),this}validate(){return this.errors=HUe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await ZUe(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...((n=this.andChildrenGroup)==null?void 0:n.flatMap(c=>c.getErrors()))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(c=>c.getErrors()))||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.andChildrenGroup||[]){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.orChildrenGroup||[]){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}return s}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){var P,$,L,U;const e=Pr(n,this),y=n||this.parent,v={id:s||x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||"1",previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.DataType,isList:this.isList,asType:this.asType,options:this.options,index:this.index,parentRelationType:this.parentRelationType,staticEntities:this.staticEntities,foreignKeyAllowed:this.foreignKeyAllowed,interactiveEntities:this.interactiveEntities,actionEntities:this.actionEntities,like:this.like,inferred:this.inferred,implementationChooseOne:this.implementationChooseOne,foreignKeyRef:((P=this.foreignKeyRef)==null?void 0:P.toReference())||null,andChildrenGroup:null,orChildrenGroup:null,entity:null,parent:y.toReference()},E=Ui(v,e);E.hydrateAncestors(),E.setParent(y,null),c&&(E.subscribe(),E.addSelfToProject(i)),E.initChildren(i),i==null||i.add(E,Z.Added);const b=($=this.andChildrenGroup)==null?void 0:$.map(K=>this.project.diggestedBuiltInBaseEntitiesIds.has(K.id)?e.getBuiltIn(K.id):K.clone(i,E,x.UUID.uuid(),c)),w=(L=this.orChildrenGroup)==null?void 0:L.map(K=>this.project.diggestedBuiltInBaseEntitiesIds.has(K.id)?e.getBuiltIn(K.id):K.clone(i,E,x.UUID.uuid(),c));if(E.andChildrenGroup=b||null,E.orChildrenGroup=w||null,this.entity&&this.entity.type===o.DefinitionEntity&&((U=this.entity)==null?void 0:U.parent)===this)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.entity.id))E.setEntity(e.getBuiltIn(this.entity.id),i);else{const K=this.entity.clone(i,E,x.UUID.uuid(),c);E.setEntity(K,i)}else if(this.entity){const K=e.get(this.entity.id)||e.getBuiltIn(this.entity.id);E.setEntity(K,i)}return i==null||i.attemptAutoclose(_.CloneEntity,this.id),E}merge(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.MergeDataTypes))){var m,v,E;const s=[],c=[],e=[],y=[];if(!this.checkCanEdit(this,n))return J.Logger.warn(`[${_.MergeDataTypes}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.MergeDataTypes,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(this.asType!==(i==null?void 0:i.asType)&&(this.metaSync({asType:i==null?void 0:i.asType},n),n==null||n.add(this,Z.Updated),s.push(this)),this.index!==(i==null?void 0:i.index)&&(this.metaSync({index:i==null?void 0:i.index},n),n==null||n.add(this,Z.Updated),s.push(this)),this.options!==(i==null?void 0:i.options)&&(this.metaSync({options:i==null?void 0:i.options},n),n==null||n.add(this,Z.Updated),s.push(this)),this.foreignKeyAllowed!==(i==null?void 0:i.foreignKeyAllowed)&&(this.metaSync({foreignKeyAllowed:i==null?void 0:i.foreignKeyAllowed},n),n==null||n.add(this,Z.Updated),s.push(this)),this.isList!==(i==null?void 0:i.isList)&&(this.metaSync({isList:i==null?void 0:i.isList},n),n==null||n.add(this,Z.Updated),s.push(this)),this.like!==(i==null?void 0:i.like)&&(this.metaSync({like:i==null?void 0:i.like},n),n==null||n.add(this,Z.Updated),s.push(this)),((m=i==null?void 0:i.foreignKeyRef)==null?void 0:m.id)!==((v=this.foreignKeyRef)==null?void 0:v.id)&&(this.setForeignKeyRef((i==null?void 0:i.foreignKeyRef)||null,n),n==null||n.add(this,Z.Updated),s.push(this)),i!=null&&i.entity&&(i==null?void 0:i.entity.type)===o.DefinitionEntity&&(i==null?void 0:i.entity).parent===i)if(((E=this.entity)==null?void 0:E.type)===o.DefinitionEntity&&this.entity.parent===this)Km(this.entity,i.entity)||HN(this.entity,i.entity,n);else{const b=i.entity.clone(n,this,x.UUID.uuid(),!0);this.setEntity(b,n),c.push(b)}else i!=null&&i.entity&&(this.setEntity(i==null?void 0:i.entity,n),n==null||n.add(this,Z.Updated),s.push(this));return this.inferred!==(i==null?void 0:i.inferred)&&this.metaSync({inferred:(i==null?void 0:i.inferred)??!1},n),n==null||n.attemptAutoclose(_.MergeDataTypes,this.id),{updated:D(s),added:D(c),removed:D(e),affected:D(y),self:this}}addToAndGroup(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddToAndGroup))){return this.checkCanEdit(this,n)?(this.andChildrenGroup||(this.andChildrenGroup=[]),this.andChildrenGroup.includes(i)||(this.andChildrenGroup.push(i),n==null||n.add(i,Z.Affected)),n==null||n.attemptAutoclose(_.AddToAndGroup,this.id),this):(J.Logger.warn(`[${_.AddToAndGroup}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddToAndGroup,this.id),this)}addToOrGroup(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddToOrGroup))){return this.checkCanEdit(this,n)?(this.orChildrenGroup||(this.orChildrenGroup=[]),this.orChildrenGroup.includes(i)||(this.orChildrenGroup.push(i),n==null||n.add(i,Z.Affected)),n==null||n.attemptAutoclose(_.AddToOrGroup,this.id),this):(J.Logger.warn(`[${_.AddToOrGroup}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddToOrGroup,this.id),this)}setForeignKeyRef(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetDataTypeForeignKeyRef))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[${_.SetDataTypeForeignKeyRef}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetDataTypeForeignKeyRef,this.id),this;const s=this.foreignKeyRef;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.foreignKeyRef=i,n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.SetDataTypeForeignKeyRef,this.id),this}setEntity(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetDataTypeEntityValue))){var c;if(!this.checkCanEdit(this,n))return J.Logger.warn(`[${_.SetDataTypeEntityValue}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetDataTypeEntityValue,this.id),this;const s=this.entity;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.entity=i,n==null||n.add(this,Z.Updated),s&&s.type===o.DefinitionEntity&&((c=s.parent)==null?void 0:c.id)===this.id&&(s==null||s.remove({ignoreUpstream:!0},n))),n==null||n.attemptAutoclose(_.SetDataTypeEntityValue,this.id),this}isObject(){return!!this.entity&&(this.entity.type===o.DefinitionEntity||this.entity.type===o.BuiltInBaseEntity||this.entity.name===oe.KeyValue)&&!this.isList}canBeObject(){var n;let i=!1;if(this.parent.type!==o.DataType&&this.parent.type!==o.ActionDescriptor&&this.parent.type!==o.BuiltInBaseEntity&&this.parent.type!==o.DefinitionEntity&&this.parent.type!==o.FunctionDeclaration){const s=(n=this.project.requestActiveDynamicValue(this.parent))==null?void 0:n.value;s?!s.valueAsType&&(s.value===""||s.value===null||aUi(s))&&(i=!0):i=!0}return(this.isObject()||!this.entity||this.entity.name===oe.Untyped)&&i}hasStrictObjectStructure(){var i;return this.isObject()&&((i=this.entity)==null?void 0:i.type)===o.DefinitionEntity}isInlineDeclaredEntity(){var i,n;return((i=this.entity)==null?void 0:i.type)===o.DefinitionEntity&&((n=this.entity.parent)==null?void 0:n.id)===(this==null?void 0:this.id)}isIndependentlyUserDeclaredEntity(){var i,n;return((i=this.entity)==null?void 0:i.type)===o.DefinitionEntity&&((n=this.entity)==null?void 0:n.parent)!==this}canModifyObjectStructure(){var n;const i=this.isIndependentlyUserDeclaredEntity();return(this.isInlineDeclaredEntity()||this.canBeObject()||((n=this.entity)==null?void 0:n.name)===oe.KeyValue)&&!i}inferFromInputs(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"infer-data-type-from-inputs"))){var m;const s=[],c=[],e=[],y=[];if(!this.inferred)return n==null||n.attemptAutoclose("infer-data-type-from-inputs",this.id),{updated:[],added:[],removed:[],affected:[],self:this};if(!this.entity&&i.length){const v=le(this.parent,this.project)+" data type definition",E={id:x.UUID.uuid(),deletable:!0,editable:!0,type:o.DefinitionEntity,version:x.UUID.uuid(),createdAt:(n==null?void 0:n.timestamp)||M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:v,description:((m=this.parent)==null?void 0:m.description)||null,codeName:null,static:!0,abstract:!1,properties:[],methods:[],extends:null,implements:[],abstractMethods:[],allPropertiesImplement:null,additionalPropertiesDataType:null,additionalProperties:!0,x:0,y:0,parent:this.toReference()},b=ye(E,this.project);b.hydrateAncestors(),b.setParent(this,n),b.initChildren(n),n==null||n.add(b,Z.Added),b.metaSync(E,n),this.setEntity(b,n),n==null||n.add(this,Z.Updated)}if(this.entity){const{updated:v,added:E,removed:b,affected:w}=this.entity.inferFromInputs(i,n);c.push(...v),s.push(...E),e.push(...b),y.push(...w)}return this.like||this.metaSync({like:!0},n),n==null||n.attemptAutoclose("infer-data-type-from-inputs",this.id),{updated:D(c),added:D(s),removed:D(e),affected:D(y),self:this}}};I(Ei,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(Ei,"type",o.DataType),I(Ei,"USER_MANAGED_PARENT_TYPES",[o.Property,o.ArgumentDeclaration,o.ReturnStatement,o.BreakStatement,o.ContinueStatement,o.VariableDeclaration,o.ValueDescriptor,o.InputMap,o.OutputMap,o.DataType,o.FunctionDeclaration,o.ActionDescriptor,o.Loop,o.Search,o.DefinitionEntity]),I(Ei,"PARENT_TYPES",[...Ei.USER_MANAGED_PARENT_TYPES,o.BuiltInBaseEntity]),I(Ei,"MUTABLE_BASE_PROPERTIES",["isList","asType","options","foreignKeyAllowed","parentRelationType","like","implementationChooseOne","staticEntities","interactiveEntities","actionEntities"]),I(Ei,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","index","author","previousVersion"]),I(Ei,"BASE_PROPERTIES",[...Ei.MUTABLE_BASE_PROPERTIES,...Ei.INMUTABLE_BASE_PROPERTIES]),I(Ei,"MUTABLE_META_PROPERTIES",[...Ei.MUTABLE_BASE_PROPERTIES,"inferred"]),I(Ei,"INMUTABLE_META_PROPERTIES",[...Ei.INMUTABLE_BASE_PROPERTIES]),I(Ei,"META_PROPERTIES",[...Ei.MUTABLE_META_PROPERTIES,...Ei.INMUTABLE_META_PROPERTIES]),I(Ei,"MUTABLE_UPSTREAM_PROPERTIES",["entity","foreignKeyRef","parent"]),I(Ei,"INMUTABLE_UPSTREAM_PROPERTIES",[]),I(Ei,"UPSTREAM_PROPERTIES",[...Ei.MUTABLE_UPSTREAM_PROPERTIES,...Ei.INMUTABLE_UPSTREAM_PROPERTIES]),I(Ei,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),I(Ei,"INMUTABLE_DOWNSTREAM_PROPERTIES",["andChildrenGroup","orChildrenGroup"]),I(Ei,"DOWNSTREAM_PROPERTIES",[...Ei.MUTABLE_DOWNSTREAM_PROPERTIES,...Ei.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(Ei,"PROPERTIES",[...Ei.META_PROPERTIES,...Ei.UPSTREAM_PROPERTIES,...Ei.DOWNSTREAM_PROPERTIES]);let tr=Ei;async function WUe(d,p={}){var c;const i=J.YieldTracker.from(p),s=[...d.implements.flatMap(e=>Gx(d,e)),...Ds(d),...kx(d)];return await i.tick(),await((c=d.dataType)==null?void 0:c.validateAsync({tracker:i})),s}function zUe(d){var n;const p=d.implements.flatMap(s=>Gx(d,s));return(n=d.dataType)==null||n.validate(),[...p,...Ds(d),...kx(d)]}function Gx(d,p){const i=[];if(!d.implements)return i;if(!p.abstract){const s=$t({id:`${d.id}--${he.PropertyImplementsNonAbstact}`,message:`Property "${le(d,d.project)}" with id "${d.id}" implements a non-abstract property "${le(p,d.project)}" with id "${p.id}".`,severity:pe.Error,code:he.PropertyImplementsNonAbstact,entity:d});i.push(s.error)}if(d.static&&!p.static){const s=$t({id:`${d.id}--${he.NonStaticPropertyImplementsStatic}`,message:`Static property "${le(d,d.project)}" with id "${d.id}" implements a non-static property "${le(p,d.project)}" with id "${p.id}".`,severity:pe.Error,code:he.NonStaticPropertyImplementsStatic,entity:d});i.push(s.error)}if(!d.static&&p.static){const s=$t({id:`${d.id}--${he.StaticPropertyImplementsNonStatic}`,message:`Non-static property "${le(d,d.project)}" with id "${d.id}" implements a static property "${le(p,d.project)}" with id "${p.id}".`,severity:pe.Error,code:he.StaticPropertyImplementsNonStatic,entity:d});i.push(s.error)}if(!zr(d.dataType,p.dataType)){const s=$t({id:`${d.id}--${he.PropertyImplementsIncompatibleType}`,message:`Property "${le(d,d.project)}" with id "${d.id}" implements a property "${le(p,d.project)}" with id "${p.id}" that has an incompatible data type.`,severity:pe.Error,code:he.PropertyImplementsIncompatibleType,entity:d});i.push(s.error)}return Lt(d.errors,i)}function kx(d,p){const n=[...d.parent.allProperties].filter(s=>{var c;return s.id!==d.id&&!d.implements.find(e=>e.id===s.id)&&s.id!==((c=d.extends)==null?void 0:c.id)});return xv(d,[Ji],n,p)}const sUi=Object.freeze(Object.defineProperty({__proto__:null,validate:zUe,validateAsync:WUe,validateImplementation:Gx,validatePropertyEntityName:kx},Symbol.toStringTag,{value:"Module"}));function lUi(d,p){const i=[];if(d.parent){const s=p.get(d.parent);if(!s)i.push(new De({id:`${d.id}--${d.parent}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${d.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}));else{const c=ku(s);if(c){const e=s!==c?`The entity of type '${d.type}' with id '${d.id}' have 'parent' with id '${d.parent}' because the entity belongs to a built-in '${c.type}' entity with id '${c.id}' (${le(c,s.project)}) higher up in the tree.`:`The entity of type '${d.type}' with id '${d.id}' have 'parent' with id '${d.parent}' because it is a built-in entity of type ${c.type}.`;i.push(new De({id:`${d.id}--${ne.InvalidBuiltInEntityReference}`,code:ne.InvalidBuiltInEntityReference,severity:pe.Error,message:e}))}else if(![o.DefinitionEntity].includes(s.type))i.push(new De({id:`${d.id}--${d.parent}--${ne.InvalidParentReference}`,code:ne.InvalidParentReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a parent reference that isn't pointing to an entity of type 'definition-entity'.`}));else{const y=Zn(s).filter(m=>!m.interactive);if(y.length){let m=y.length>1?`The entity of type '${d.type}' with id '${d.id}' can't be added to the 'parent' entity with id '${s.id}' because it extends or implements multiple '${o.BuiltInBaseEntity}' entities that are non-interactive ("${wt(y.map(v=>le(v,v.project)),'", "','" and "')}").`:`The entity of type '${d.type}' with id '${d.id}' can't be added to the 'parent' entity with id '${s.id}' because it extends or implements a '${o.BuiltInBaseEntity}' entity that is non-interactive ("${le(y[0],y[0].project)}").`;m+=`
388
388
  ${Mu}`,i.push(new De({id:`${d.id}--${ne.NonInteractiveEntityReferenced}`,code:ne.NonInteractiveEntityReferenced,severity:pe.Error,message:m}))}else d.implements&&d.implements.forEach(m=>{const v=p.get(m);if(m===d.id)return i.push(new De({id:`${d.id}--${d.implements}--${ne.SelfReference}`,code:ne.SelfReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a reference to itself at 'implements'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`})),i;if(!v)i.push(new De({id:`${d.id}--${d.implements}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${d.implements}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}));else{const E=s.properties.find(b=>b.implements.find(w=>{var P;return(P=d.implements)==null?void 0:P.includes(w.id)}));E?i.push(new De({id:`${d.id}--${Ie.PropertyOverwritesOtherSiblingWithSameImplementation}`,code:Ie.PropertyOverwritesOtherSiblingWithSameImplementation,severity:pe.Error,message:`The property with id "${d.id}" is trying to implement the property with id "${d.implements}", but the parent entity already has a property with id '${E.id}' that implements the same base property.`})):[o.Property].includes(v.type)?v.abstract||i.push(new De({id:`${d.id}--${d.implements}--${ne.InvalidImplementsReference}`,code:ne.InvalidImplementsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' reference that isn't pointing to an abstract entity.`})):i.push(new De({id:`${d.id}--${d.implements}--${ne.InvalidImplementsReference}`,code:ne.InvalidImplementsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' reference that isn't pointing to an entity of type 'property'.`}))}})}}}const n=vn(d,{},p);return i.push(...n.errors),i}function oUi(d){return!!d.implements.find(p=>p.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id)}function Pk(d,p){const i=[],n=[],s=[],c=[];if(d.implements.find(e=>e.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id)){let e=d.defaultValue;if(!d.defaultValue){const y=Yr.new(p);y.name=oe.EntityTemplate,y.parent=d.toReference();const m=ye(y,d.project);m.hydrateAncestors(),m.addSelfToProject(p),p==null||p.add(m,Z.Added),n.push(m),m.initChildren(p),e=m}if(!e.valueAsTypeSingle){const y=MUe(d.project);y&&e.setValueAsTypeSingle(y,p)}}return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:d}}var JUe=(d=>(d.PropertyImplements="property-implements-field",d.PropertyExtends="property-extends-field",d.PropertyDataTypeEntity="property-data-type-entity-field",d.PropertyDataType="property-data-type-field",d))(JUe||{});const ti=class ti extends kr{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"name");I(this,"codeName",null);I(this,"description",null);I(this,"private");I(this,"abstract");I(this,"index");I(this,"static");I(this,"unique");I(this,"required");I(this,"constant",!1);I(this,"interactive",!1);I(this,"type",o.Property);I(this,"hidden",!1);I(this,"parentRelationType",null);I(this,"defaultValue",null);I(this,"dataType",null);I(this,"implements",[]);I(this,"extends",null);I(this,"project");I(this,"errors",[]);I(this,"parent");I(this,"detachedDependents",{});I(this,"knownVersions",null);I(this,"activeVersion",!1);I(this,"initialized",!1);I(this,"startedInitialization",!1);I(this,"suggestion",!1);I(this,"_codeNativeValueValidation",null);this.initialData=i,this.project=n,this.id=i.id,this.name=i.name,this.description=i.description,this.private=i.private,this.abstract=i.abstract,this.index=i.index,this.static=i.static,this.required=i.required||!1,this.unique=i.unique||!1,this.codeName=i.codeName,this.hidden=i.hidden||!1,this.constant=i.constant||!1,this.interactive=i.interactive||!1,this.onProjectInitialized=this.onProjectInitialized.bind(this)}static new(i=null){return{id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,unique:!1,type:o.Property,parentRelationType:null,name:"",codeName:null,description:"",dataType:null,implements:[],extends:null,private:!1,abstract:!1,static:!1,constant:!1,interactive:!0,hidden:!1,index:0,required:!1,defaultValue:null,parent:null}}static fromGenerationTarget(i,n){const s=re(i.parent),c=n.get(s),e=[];i.implements&&i.implements.forEach(E=>{e.push(n.get(E)||n.getBuiltIn(E))});let y=null;if(i.extends){const E=re(i.extends);y=n.get(E)}const m={id:i.id,version:x.UUID.uuid(),createdAt:M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:i.name,deletable:!0,editable:!0,type:o.Property,index:c.properties.length,unique:i.unique||!1,parentRelationType:i.parentRelationType||null,private:i.private||!1,abstract:i.abstract||!1,static:i.static||!1,required:i.required||!1,constant:i.constant||!1,interactive:i.interactive||!1,hidden:!1,codeName:i.codeName||null,description:i.description||null,defaultValue:null,implements:e,extends:y,dataType:null,parent:c},v=ye(m,n);return v.setParent(c,null),v}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[],e=lUi(s,n),y=xx(s,n);return c.push(...e,...y,...Nr(s)),{errors:c,modifiedData:s}}get isExtendedProperty(){const i=this.parent.allBasePropertiesFromExtendedAndImplementedEntities.find(n=>{var s;return n.id===((s=this.extends)==null?void 0:s.id)});return!!i&&i.id!==this.id&&!i.abstract}get codeNativeValueValidation(){const i=[...this.implements].filter(s=>!this.implements.filter(y=>y.id!==s.id).some(y=>!!y.implements.find(m=>m.id===s.id)));return this._codeNativeValueValidation||(i==null?void 0:i.some(s=>s.codeNativeValueValidation))?(s,c)=>{const e=[];let y=c;if(this._codeNativeValueValidation){const m=this._codeNativeValueValidation(s,c);m&&(e.push(...m.errors),y=m.override)}return i.forEach(m=>{const v=m.codeNativeValueValidation;if(v){const E=v(s,c);E&&(e.push(...E.errors),y=E.override)}}),{errors:sv(e),override:y}}:null}validateGeneratedUpdate(i){const n=[];return i.parent&&n.push(new De({id:`${this.id}--${ne.InvalidParentUpdate}`,code:ne.InvalidParentUpdate,severity:pe.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
389
389
  This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`})),(i.readsValue||i.writesValue)&&n.push(new De({id:`${this.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:pe.Error,message:`Entity of type '${this.type}' with id '${this.id}' is not a value reading or writing entity.
390
- ${cA}`})),{errors:n,modifiedData:i}}onProjectInitialized(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,new Date().toISOString(),this,!0,"on-property-received-project-initialized"))){return Pk(this,n),n==null||n.attemptAutoclose("on-property-received-project-initialized",this.id),this}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];if(n==="property-implements-field"&&(this.removeImplementation(i,s),c.push(this)),n==="property-extends-field"){const{updated:v,added:E,removed:b,affected:w}=this.remove({ignoreUpstream:!1},s);c.push(...v),e.push(...E),y.push(...b),m.push(...w)}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];if(n==="property-implements-field"&&(this.addImplementation(i,s),c.push(this)),n==="property-extends-field"){const{updated:v,added:E,removed:b,affected:w}=this.restore({},s);c.push(...v),e.push(...E),y.push(...b),m.push(...w)}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){var i,n,s,c,e,y,m;return this.implements.forEach(v=>{this.project.getBuiltIn(v.id)||v.unsubscribeDependents([{entity:this,field:"property-implements-field"}])}),(n=(i=this.extends)==null?void 0:i.unsubscribeDependents)==null||n.call(i,[{entity:this,field:"property-extends-field"}]),(e=(c=(s=this.dataType)==null?void 0:s.entity)==null?void 0:c.unsubscribeDependents)==null||e.call(c,[{entity:this,field:"property-data-type-entity-field"}]),(m=(y=this.dataType)==null?void 0:y.unsubscribeDependents)==null||m.call(y,[{entity:this,field:"property-data-type-field"}]),this.project.off(ii.PROJECT_INITIALIZED,this.onProjectInitialized),this}subscribeToDependencies(){var i,n,s,c,e,y,m;return this.implements.forEach(v=>{this.project.getBuiltIn(v.id)||v.subscribeDependents([{entity:this,field:"property-implements-field"}])}),(n=(i=this.extends)==null?void 0:i.subscribeDependents)==null||n.call(i,[{entity:this,field:"property-extends-field"}]),(e=(c=(s=this.dataType)==null?void 0:s.entity)==null?void 0:c.subscribeDependents)==null||e.call(c,[{entity:this,field:"property-data-type-entity-field"}]),(m=(y=this.dataType)==null?void 0:y.subscribeDependents)==null||m.call(y,[{entity:this,field:"property-data-type-field"}]),oUi(this)&&this.project.on(ii.PROJECT_INITIALIZED,this.onProjectInitialized),this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new ti(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.defaultValue=this.defaultValue,i.dataType=this.dataType,i.implements=[...this.implements],i.extends=this.extends,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];if(this.parent&&this.parent.type!==o.PrimitiveEntity&&this.parent.type!==o.BuiltInBaseEntity){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new ti(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.defaultValue=y.defaultValue,this.dataType=y.dataType,this.implements=[...y.implements],this.parent=y.parent,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.unsubscribeFromDependencies(),i.parent){const c=re(i.parent),e=this.project.get(c),y=this.parent;if(y&&y.id!==(e==null?void 0:e.id)&&this.removeFromParent(n),e)this.setParent(e,n),this.addSelfToProject(n);else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${c}' that isn't found in the project`)}else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.implements.forEach(c=>{const e=re(c),y=this.project.get(e);if(y)this.addImplementation(y,n);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${e}" which is missing in the project`)}),this.implements.filter(c=>{const e=re(c);return!i.implements.find(y=>re(y)===e)}).forEach(c=>{this.removeImplementation(c,n)}),i.extends){const c=re(i.extends),e=this.project.get(c);if(e)this.setExtends(e,n);else if(c)throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'extends' reference "${c}" which is missing in the project`)}else this.setExtends(null,n);if(i.dataType){const c=re(i.dataType),e=this.project.get(c);e&&this.setDataType(e,n)}else this.setDataType(null,n);if(i.defaultValue){const c=re(i.defaultValue),e=this.project.get(c);e&&this.setDefaultValue(e,n)}else this.setDefaultValue(null,n);return this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],c=[];if(this.initialData.parent){const e=re(this.initialData.parent),y=this.project.get(e);if(y)this.setParent(y,null);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if((this.initialData.implements||[]).forEach(e=>{const y=re(e),m=this.project.get(y);if(m)this.addImplementation(m,null),i.push(m);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${y}" which is missing in the project`)}),this.initialData.extends){const e=re(this.initialData.extends),y=this.project.get(e);if(y)this.setExtends(y,null),i.push(y);else if(e)throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'extends' reference "${e}" which is missing in the project`)}return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AfterAllChildrenInitialized))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(this.initialized=!0,this.parent.type===o.DefinitionEntity&&this.parentRelationType!==yc.AllPropertiesImplementationTarget){let X=this.index||0;const se=this.parent.properties.filter(fe=>!fe.deleted&&fe.id!==this.id);se.length&&(X>se.length+1?X=se.length:X<0&&(X=0)),se.find(fe=>(fe.index||0)===X&&!fe.deleted)&&se.filter(fe=>(fe.index||0)>=X&&!fe.deleted).forEach(fe=>{fe.metaSync({index:(fe.index||0)+1},i),i==null||i.add(fe,Z.Updated),n.push(fe)}),this.metaSync({index:X},i)}const{updated:y,added:m,removed:v,affected:E}=this.syncWithImplementation(i);n.push(...y),s.push(...m),c.push(...v),e.push(...E);const{updated:b,added:w,removed:P,affected:$}=Pk(this,i);n.push(...b),s.push(...w),c.push(...P),e.push(...$);const{updated:L,added:U,removed:K,affected:H}=this.syncWithExtension(i);return n.push(...L),s.push(...U),c.push(...K),e.push(...H),this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){const n=[this],s=[],c=[],e=[];return this.parentRelationType===yc.AllPropertiesImplementationTarget?this.parent.setAllPropertiesImplement(this,i):this.parent.addProperty(this,i),n.push(this.parent),this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}addImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)||(this.implements.push(i),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this):(J.Logger.warn(`[addImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this)}removeImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)&&(this.implements=this.implements.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this):(J.Logger.warn(`[removeImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this)}setExtends(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetExtends))){var s;return this.checkCanEdit(this,n)?(((s=this.extends)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.extends=i,this.subscribeToDependencies(),n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetExtends,this.id),this):(J.Logger.warn(`[setExtends] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetExtends,this.id),this)}initChildren(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"init-children"))){if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.initialData.defaultValue&&(this.defaultValue=ye(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this,null),this.defaultValue.initChildren(i)),this.initialData.dataType){const n=ye(this.initialData.dataType,this.project);n.setParent(this,null),n.initChildren(i),this.dataType=n}if(this.implements=this.initialData.implements.map(n=>ye(n,this.project)),this.initialData.extends){const n=ye(this.initialData.extends,this.project);this.setExtends(n,null)}return this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.codeName=s.codeName!==void 0?s.codeName:e.codeName,this.description=s.description!==void 0?s.description:e.description,this.abstract=s.abstract!==void 0?s.abstract:e.abstract,this.private=s.private!==void 0?s.private:e.private,this.index=s.index||(s.index!==0?e.index:0),this.static=s.static!==void 0?s.static:e.static,this.hidden=s.hidden!==void 0?s.hidden:e.hidden,this.constant=s.constant!==void 0?s.constant:e.constant,this.interactive=s.interactive!==void 0?s.interactive:e.interactive,this.required=s.required!==void 0?s.required:e.required,this.unique=s.unique!==void 0?s.unique:e.unique,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await ti.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await ti.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await ti.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await ti.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await ti.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await ti.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveFromParent))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];return this.parent.type===o.DefinitionEntity&&(this.parentRelationType===yc.AllPropertiesImplementationTarget?this.parent.removeAllPropertiesImplement(i):this.parent.removeProperty(this,i),e.push(this.parent)),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,n))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),n==null||n.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:ir.ActionOwnerEntityNonDeletable,rootAction:((m=n==null?void 0:n.self)==null?void 0:m.id)===this.id&&(n==null?void 0:n.autoCloseActionName)===_.RemoveEntity}),n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},n),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,n);s.push(...E),c.push(...b),e.push(...w)}),this.defaultValue){const{updated:v,removed:E}=this.defaultValue.remove({ignoreUpstream:!0},n);s.push(...v),c.push(...E)}if(this.dataType){const{updated:v,removed:E}=this.dataType.remove({ignoreUpstream:!0},n);s.push(...v),c.push(...E)}if(!i){const v=this.removeFromParent(n);e.push(...v.added),s.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(i!=null&&i.hasAdded(this.id))return i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);s.push(...m),c.push(...v),n.push(...E)}),this.defaultValue){const{updated:y}=this.defaultValue.restore({},i);s.push(...y)}if(this.dataType){const{updated:y}=this.dataType.restore({},i);s.push(...y)}return this.parent.type===o.DefinitionEntity&&(this.parentRelationType===yc.AllPropertiesImplementationTarget?this.parent.removeAllPropertiesImplement(i):this.parent.addProperty(this,i),e.push(this.parent)),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),removed:D(c),affected:D(e),self:this}}toFlat(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this,...((s=this.defaultValue)==null?void 0:s.toFlat(i))||[],...((c=this.dataType)==null?void 0:c.toFlat(i))||[],...this.parent.toFlat(i)])}toFlatIds(i=new Set){var s,c;if(i.has(this.id))return[];if(i.add(this.id),!this.parent)throw new Error(`Property with id '${this.id}' has no parent and cannot be flattened`);return[this.id,...((s=this.defaultValue)==null?void 0:s.toFlatIds(i))||[],...((c=this.dataType)==null?void 0:c.toFlatIds(i))||[],...this.parent.toFlatIds(i)]}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,codeName:this.codeName,description:this.description,index:this.index,hidden:this.hidden,private:this.private,abstract:this.abstract,required:this.required,unique:this.unique,constant:this.constant,interactive:this.interactive,static:this.static,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name}}toJSON(i=new Set){var n,s,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,index:this.index,private:this.private,unique:this.unique,required:this.required,static:this.static,constant:this.constant,interactive:this.interactive,abstract:this.abstract,hidden:this.hidden,parentRelationType:this.parentRelationType,defaultValue:((n=this.defaultValue)==null?void 0:n.toJSON(i))||null,dataType:((s=this.dataType)==null?void 0:s.toJSON(i))||null,implements:this.implements.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null,parent:this.parent.toReference()})}toJSONClone(i=pt){var s,c,e,y,m,v,E;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,index:this.index,unique:this.unique,private:this.private,required:this.required,static:this.static,constant:this.constant,interactive:this.interactive,abstract:this.abstract,hidden:this.hidden,parentRelationType:this.parentRelationType,defaultValue:((v=this.defaultValue)==null?void 0:v.toJSONClone({...i,newId:null}))||null,dataType:((E=this.dataType)==null?void 0:E.toJSONClone({...i,newId:null}))||null,implements:this.implements.map(b=>this.project.getBuiltIn(b.id)?b.toJSON(i.seenEntities):b.toJSONClone({...i,newId:null})),extends:(()=>{var b;return this.extends&&this.project.getBuiltIn(this.extends.id)?this.extends.toJSON():((b=this.extends)==null?void 0:b.toJSONClone({...i,newId:null}))||null})(),parent:this.parent.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s,c,e,y;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,name:this.name,codeName:this.codeName,description:this.description,type:this.type,editable:this.editable,deletable:this.deletable,index:this.index,private:this.private,required:this.required,unique:this.unique,abstract:this.abstract,static:this.static,constant:this.constant,interactive:this.interactive,hidden:this.hidden,parentRelationType:this.parentRelationType,defaultValue:((c=this.defaultValue)==null?void 0:c.toReference(i))||null,dataType:((e=this.dataType)==null?void 0:e.toReference(i))||null,implements:this.implements.map(m=>m.toReference(i)),extends:((y=this.extends)==null?void 0:y.toReference(i))||null,parent:this.parent.toReference(i)}}toFlatJSON(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...((s=this.defaultValue)==null?void 0:s.toFlatJSON(i))||[],...((c=this.dataType)==null?void 0:c.toFlatJSON(i))||[],...this.implements.flatMap(e=>e.toFlatJSON(i)),...this.parent.toFlatJSON(i)])}toGenerationTarget(){var i;return{id:this.id,name:this.name,description:this.description,type:this.type,private:this.private,required:this.required,abstract:this.abstract,static:this.static,parentRelationType:this.parentRelationType,implements:this.implements.map(n=>n.id),extends:(i=this.extends)==null?void 0:i.id,parent:this.parent.id}}toFlatGenerationTarget(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...((s=this.defaultValue)==null?void 0:s.toFlatGenerationTarget(i))||[],...((c=this.dataType)==null?void 0:c.toFlatGenerationTarget(i))||[],...this.implements.flatMap(e=>e.toFlatGenerationTarget(i))])}clearErrors(){var i,n;return this.errors=[],(i=this.defaultValue)==null||i.clearErrors(),(n=this.dataType)==null||n.clearErrors(),this}validate(){return this.errors=zUe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await WUe(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...((n=this.defaultValue)==null?void 0:n.getErrors())||[],...((s=this.dataType)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];if(await n.tick(),this.defaultValue){const c=await this.defaultValue.getErrorsAsync({tracker:n});s.push(...c)}if(this.dataType){const c=await this.dataType.getErrorsAsync({tracker:n});s.push(...c)}return s}getShallowErrors(){return this.errors}implement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"implement-self-as-property")),s=null){var v;const c=s||x.UUID.uuid(),e=ti.new(n);e.id=c,e.name=this.name,e.description=this.description,e.index=this.index,e.private=this.private,e.required=this.required,e.static=this.static,e.constant=this.constant,e.unique=this.unique,e.hidden=this.hidden,e.interactive=this.interactive,e.parent=i.toReference(),e.implements=[this.toJSON()];const y=ye(e,this.project);y.hydrateAncestors(),y.addSelfToProject(n),n==null||n.add(y,Z.Added),y.initChildren(n);const m=(v=this.defaultValue)==null?void 0:v.clone(n,y,x.UUID.uuid());return m&&(m.editable=!0,m.deletable=!0),y}clone(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){var b,w;const e=Pr(n,this),y=s||x.UUID.uuid(),m=n||this.parent,v={hidden:!1,id:y,version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||"1",previousVersion:null,deleted:!1,type:this.type,editable:!0,deletable:!0,name:this.name,codeName:this.codeName,description:this.description,index:this.index,private:this.private,constant:this.constant,unique:this.unique,interactive:this.interactive,required:this.required,abstract:this.abstract,static:this.static,parentRelationType:this.parentRelationType,defaultValue:null,dataType:null,implements:this.implements.map(P=>P.toJSON()),extends:this.extends,parent:m.toReference()},E=Ui(v,e);if(E.hydrateAncestors(),E.setParent(m,i),c&&(E.subscribe(),E.addSelfToProject(i)),E.initChildren(i),i==null||i.add(E,Z.Added),this.dataType&&this.project.diggestedBuiltInBaseEntitiesIds.has(this.dataType.id))E.setDataType(e.getBuiltIn(this.dataType.id),i);else{const P=((b=this.dataType)==null?void 0:b.clone(i,E,x.UUID.uuid(),c))||null;P&&E.setDataType(P,i)}if(this.defaultValue){const P=(w=this.defaultValue)==null?void 0:w.clone(i,E,x.UUID.uuid(),c);E.setDefaultValue(P||null,i)}return this.implements.length&&this.implements.forEach(P=>{const $=e.get(P.id)||e.getBuiltIn(P.id);if($){E.addImplementation($,i);return}}),E.addSelfToProject(null),i==null||i.attemptAutoclose(_.CloneEntity,this.id),E}setDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetDataType))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetDataType,this.id),this;const s=this.dataType;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.dataType=i,this.subscribeToDependencies(),n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose(_.SetDataType,this.id),this}removeDataType(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveDataType))){return this.checkCanEdit(this,i)?(this.dataType&&(this.dataType.remove({ignoreUpstream:!0},i),i==null||i.add(this,Z.Affected),this.dataType=null),i==null||i.attemptAutoclose(_.RemoveDataType,this.id),this):(J.Logger.warn(`[removeDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveDataType,this.id),this)}getDataType(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"get-data-type"))){return i==null||i.attemptAutoclose("get-data-type",this.id),this.dataType}getDefaultValue(){var c;let i=null;for(const e of this.implements){const y=e.getDefaultValue();(!i||qn(i))&&y&&(i=y)}let n=this.defaultValue;const s=(c=this.extends)==null?void 0:c.getDefaultValue();return qn(n)&&s&&!qn(s)&&(n=s),qn(n)&&i&&!qn(i)&&(n=i),n}setDefaultValue(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"set-default-value"))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setDefaultValue] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose("set-default-value",this.id),this;const s=this.defaultValue;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.defaultValue=i,n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose("set-default-value",this.id),this}syncWithImplementation(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-with-implementation"))){var P,$,L,U,K,H,X,se,ee,fe,de;if(!this.checkCanEdit(this,i))return J.Logger.warn(`[syncWithImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose("sync-with-implementation",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];this.parent.type!==o.PrimitiveEntity&&this.interactive&&this.parent.getAllPropertiesImplements().forEach(ve=>{this.addImplementation(ve,i)});let y=null;for(const ce of this.implements)(P=ce.dataType)!=null&&P.isResolved&&(y?($=ce.dataType.orChildrenGroup)!=null&&$.length&&ce.dataType.implementationChooseOne&&(y=ce.dataType):y=ce.dataType);const m=zr(this.dataType,y);if(!this.dataType||!((L=this.dataType)!=null&&L.isResolved)||(U=this.dataType)!=null&&U.isResolved&&(y!=null&&y.isResolved)&&!m.compatible){if(y&&((K=y.orChildrenGroup)!=null&&K.length)&&y.implementationChooseOne){if(!this.dataType||this.dataType&&this.project.diggestedBuiltInBaseEntitiesIds.has(this.dataType.id)){const ve=tr.new(i);ve.parent=this.toReference();const ae=ye(ve,this.project);ae.hydrateAncestors(),i==null||i.add(ae,Z.Added),ae.addSelfToProject(i),ae.afterAllChildrenInitialized(i)}const ce=y.orChildrenGroup.some(ve=>ve.foreignKeyAllowed);if(((X=(H=this.dataType)==null?void 0:H.entity)==null?void 0:X.type)===o.DefinitionEntity&&Si(this.dataType.entity,Re.PERSISTED_ENTITY)&&ce){const ve=$Ue(this.dataType.entity);ve&&this.dataType.setForeignKeyRef(ve,i),(se=this.dataType)==null||se.setEntity(null,i)}else{const ve=y.orChildrenGroup.find(ae=>{var me;return((me=ae.entity)==null?void 0:me.id)===Q["primitive-entity"].string.id});if(ve)(ee=this.dataType)==null||ee.setEntity(ve.entity,i);else{const ae=y.orChildrenGroup.filter(_e=>_e.isResolved),me=ae.filter(_e=>{var Ne;return((Ne=_e.entity)==null?void 0:Ne.type)===o.PrimitiveEntity});me.length?(fe=this.dataType)==null||fe.setEntity(me[0].entity,i):ae.length&&((de=this.dataType)==null||de.setEntity(ae[0].entity,i))}}}else if(y&&this.project.diggestedBuiltInBaseEntitiesIds.has(y.id))this.setDataType(y,i);else if(y){const ce=y.clone(i,this,x.UUID.uuid(),!0);this.setDataType(ce,i),s.push(ce)}}if(!this.defaultValue){let ce=null;for(const ve of this.implements){const ae=ve.getDefaultValue();ae&&(ce=ae)}if(ce){const ve=ce.clone(i,this,x.UUID.uuid(),!0);this.setDefaultValue(ve,i),s.push(ve)}}let v=!1,E=!1,b=!1,w=!1;return this.implements.forEach(ce=>{ce.required&&(v=!0),ce.constant&&(b=!0),ce.unique&&(E=!0),ce.static&&(w=!0)}),this.metaSync({required:v||this.required,constant:b||this.constant,unique:E||this.unique,static:w||this.static},i),i==null||i.attemptAutoclose("sync-with-implementation",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}syncWithExtension(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-with-extension"))){var v,E;if(!this.checkCanEdit(this,i))return J.Logger.warn(`[syncWithExtension] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose("sync-with-extension",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(!this.extends)return i==null||i.attemptAutoclose("sync-with-extension",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const y={...this.extends.toMeta()};if(delete y.id,delete y.version,delete y.createdAt,delete y.previousVersion,delete y.author,delete y.index,this.metaSync(y,i),n.push(this),!this.extends.dataType)return i==null||i.attemptAutoclose("sync-with-extension",this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(!this.dataType){const b=tr.new(i);b.parent=this.toReference();const w=ye(b,this.project);w.hydrateAncestors(),i==null||i.add(w,Z.Added),w.addSelfToProject(i),w.afterAllChildrenInitialized(i)}if(zr(this.dataType,this.extends.dataType).compatible||(v=this.dataType)==null||v.merge(this.extends.dataType,i),this.extends.defaultValue&&!this.defaultValue){const b=this.extends.defaultValue.clone(i,this,x.UUID.uuid(),!0);this.setDefaultValue(b,i),s.push(b)}else this.extends.defaultValue?this.extends.defaultValue&&this.defaultValue&&!Wke(this.defaultValue,this.extends.defaultValue)&&(this.defaultValue.merge(this.extends.defaultValue,i),n.push(this.defaultValue)):((E=this.defaultValue)==null||E.remove({ignoreUpstream:!0},i),this.defaultValue=null,e.push(this));return i==null||i.attemptAutoclose("sync-with-extension",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}implementAsInputMap(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"implement-as-return-declaration")),n,s){const c=ds.new(i);c.id=s||c.id,c.name=this.name,c.description=this.description,c.parent=n.toReference(),c.declaration=this.toJSON();const e=Ui(c,this.project);if(e.hydrateAncestors(),e.addSelfToProject(i),i==null||i.add(e,Z.Added),e.initChildren(i),this.dataType)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.dataType.id))e.setDataType(this.dataType,i),i==null||i.add(e,Z.Affected);else{const y=this.dataType.clone(i,e);e.setDataType(y,i)}if(this.defaultValue){const y=this.defaultValue.clone(i,e);e.setDefaultValue(y,i)}return i==null||i.attemptAutoclose("implement-as-return-declaration",this.id),e}};I(ti,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(ti,"type",o.Property),I(ti,"USER_MANAGED_PARENT_TYPES",[o.DefinitionEntity]),I(ti,"PARENT_TYPES",[...ti.USER_MANAGED_PARENT_TYPES,o.PrimitiveEntity,o.BuiltInBaseEntity]),I(ti,"MUTABLE_BASE_PROPERTIES",["name","codeName","description","private","abstract","static","required","constant","unique","interactive"]),I(ti,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(ti,"BASE_PROPERTIES",[...ti.MUTABLE_BASE_PROPERTIES,...ti.INMUTABLE_BASE_PROPERTIES]),I(ti,"MUTABLE_META_PROPERTIES",[...ti.MUTABLE_BASE_PROPERTIES,"index"]),I(ti,"INMUTABLE_META_PROPERTIES",[...ti.INMUTABLE_BASE_PROPERTIES]),I(ti,"META_PROPERTIES",[...ti.MUTABLE_META_PROPERTIES,...ti.INMUTABLE_META_PROPERTIES]),I(ti,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(ti,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements","extends"]),I(ti,"UPSTREAM_PROPERTIES",[...ti.MUTABLE_UPSTREAM_PROPERTIES,...ti.INMUTABLE_UPSTREAM_PROPERTIES]),I(ti,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),I(ti,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(ti,"DOWNSTREAM_PROPERTIES",[...ti.MUTABLE_DOWNSTREAM_PROPERTIES,...ti.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(ti,"PROPERTIES",[...ti.META_PROPERTIES,...ti.UPSTREAM_PROPERTIES,...ti.DOWNSTREAM_PROPERTIES]);let ka=ti;async function YUe(d,p={}){var E,b;const i=J.YieldTracker.from(p),n=d.implements.flatMap(w=>tKe(d,w)),s=iKe(d,d.extends),c=nKe(d),e=rKe(d),y=jx(d),m=[...n,...s,...c,...e,...y],v=Lt(d.errors,m);await i.tick();for(const w of d.properties)await w.validateAsync({tracker:i});for(const w of d.methods)await w.validateAsync({tracker:i});for(const w of d.abstractMethods)await w.validateAsync({tracker:i});return await((E=d.allPropertiesImplement)==null?void 0:E.validateAsync({tracker:i})),await((b=d.additionalPropertiesDataType)==null?void 0:b.validateAsync({tracker:i})),v}function XUe(d){var m,v;const p=d.implements.flatMap(E=>tKe(d,E)),i=iKe(d,d.extends),n=nKe(d),s=rKe(d),c=jx(d);d.properties.forEach(E=>{E.validate()}),d.methods.flatMap(E=>E.validate()),d.abstractMethods.flatMap(E=>E.validate()),(m=d.allPropertiesImplement)==null||m.validate(),(v=d.additionalPropertiesDataType)==null||v.validate();const e=[...p,...i,...n,...s,...c];return Lt(d.errors,e)}function QUe(d,p){const i=p.properties.filter(c=>c.abstract),n=[];let s=[...d.properties];return i.forEach(c=>{const e=s.find(y=>!!y.implements.find(m=>m.id===c.id));e?s=s.filter(y=>y.id!==e.id):n.push(c)}),n}function eKe(d,p){const i=p.abstractMethods,n=[];let s=[...d.methods];return i.forEach(c=>{const e=s.find(y=>{var m;return((m=y.implements)==null?void 0:m.id)===c.id});e?s=s.filter(y=>y.id!==e.id):n.push(c)}),n}function tKe(d,p){const i=[];if(!p.abstract){const E=$t({id:d.id+"--"+he.ImplementingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is implementing a non-abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.ImplementingNonAbstractEntity,entity:d});return i.push(E.error),i}const n=p.properties.filter(E=>E.abstract),s=[];let c=[...d.properties];n.forEach(E=>{const b=c.find(w=>!!w.implements.find(P=>P.id===E.id));b?c=c.filter(w=>w.id!==b.id):s.push(E)}),s.length&&s.forEach(E=>{const b=$t({id:d.id+"--"+he.MissingPropertyImplementation+"--"+E.id,message:`Property "${E.name}" with id "${E.id}" of entity "${p.name}" with id "${p.id}" is not implemented when entity "${d.name}" with id "${d.id}" implements it`,severity:pe.Error,code:he.MissingPropertyImplementation,entity:d});i.push(b.error)});const e=[];let y=[...d.methods];p.abstractMethods.forEach(E=>{const b=y.find(w=>{var P;return((P=w.implements)==null?void 0:P.id)===E.id});b?y=y.filter(w=>w.id!==b.id):e.push(E)}),e.length&&e.forEach(E=>{const b=$t({id:d.id+"--"+he.MissingMethodImplementation+"--"+E.id,message:`Method "${E.name}" with id "${E.id}" of entity "${p.name}" with id "${p.id}" is not implemented when entity "${d.name}" with id "${d.id}" implements it`,severity:pe.Error,code:he.MissingMethodImplementation,entity:d});i.push(b.error)});const m=[];p.properties.forEach(E=>{const b=c.find(w=>w.name===E.name);b&&m.push([b,E])}),m.length&&m.forEach(([E])=>{const b=$t({id:d.id+"--"+Ie.PropertyOverwritesOtherSiblingWithSameName+"--"+E.id,message:`Property "${E.name}" with id "${E.id}" of entity "${d.name}" with id "${d.id}" overwrites the property with the same name from the base entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.PropertyOverwritesOtherSiblingWithSameName,entity:d});i.push(b.error)});const v=[];return p.methods.forEach(E=>{const b=y.find(w=>w.name===E.name);b&&v.push([b,E])}),v.length&&v.forEach(([E])=>{const b=$t({id:d.id+"--"+Ie.MethodOverwritesOtherSiblingWithSameName+"--"+E.id,message:`Method "${E.name}" with id "${E.id}" of entity "${d.name}" with id "${d.id}" overwrites the method with the same name from the base entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.MethodOverwritesOtherSiblingWithSameName,entity:d});i.push(b.error)}),i}function iKe(d,p){const i=[];if(!p)return i;const n=[];if(!d.abstract&&p.abstract){const c=$t({id:d.id+"--"+p.id+"--"+he.NonAbstractExtendingAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is not-abstract but is extending an abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonAbstractExtendingAbstractEntity,entity:d,firstRelationship:p});return i.push(c.error),i}if(d.abstract&&!p.abstract){const c=$t({id:d.id+"--"+p.id+"--"+he.AbstractExtendingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is abstract but is extending an non-abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.AbstractExtendingNonAbstractEntity,entity:d,firstRelationship:p});return i.push(c.error),i}d.properties.forEach(c=>{const e=p.properties.find(y=>{var m;return y.name===c.name&&((m=c.extends)==null?void 0:m.id)!==y.id});c.implements.find(y=>y.id===(e==null?void 0:e.id))||e&&n.push(c)}),n.length&&n.forEach(c=>{const e=$t({id:d.id+"--"+Ie.PropertyOverwritesOtherSiblingWithSameName,message:`Property "${c.name}" with id "${c.id}" of entity "${d.name}" with id "${d.id}" overwrites the property with the same name from the extended entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.PropertyOverwritesOtherSiblingWithSameName,entity:d});i.push(e.error)});const s=[];return d.methods.forEach(c=>{var y;const e=p.methods.find(m=>{var v;return m.name===c.name&&((v=c.extends)==null?void 0:v.id)!==m.id});((y=c.implements)==null?void 0:y.id)!==(e==null?void 0:e.id)&&e&&s.push(c)}),s.length&&s.forEach(c=>{const e=$t({id:d.id+"--"+Ie.MethodOverwritesOtherSiblingWithSameName,message:`Method "${c.name}" with id "${c.id}" of entity "${d.name}" with id "${d.id}" overwrites the method with the same name from the extended entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.MethodOverwritesOtherSiblingWithSameName,entity:d});i.push(e.error)}),i}function rKe(d){const p=[];if(!d.properties.length){const i=$t({id:d.id+"--"+he.NoProperties,message:"No properties implemented",severity:pe.Warning,code:he.NoProperties,entity:d});p.push(i.error)}return p}function nKe(d){const p=[];if(d.abstract){if(d.methods.length){const i=$t({id:d.id+"--"+he.AbstractEntityWithNonAbstractMethods,message:`Entity "${d.name}" with id "${d.id}" is marked as abstract but has non-abstract methods`,severity:pe.Error,code:he.AbstractEntityWithNonAbstractMethods,entity:d});p.push(i.error)}if(d.properties.some(i=>!i.abstract)){const i=$t({id:d.id+"--"+he.AbstractEntityWithNonAbstractProperties,message:`Entity "${d.name}" with id "${d.id}" is marked as abstract but has non-abstract properties`,severity:pe.Error,code:he.AbstractEntityWithNonAbstractProperties,entity:d});p.push(i.error),d.properties.forEach(n=>{if(!n.abstract){const s=$t({id:d.id+"--"+he.StaticEntityWithNonStaticProperties+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${d.name}" with id "${d.id}" is not marked as abstract but the entity is marked as abstract`,severity:pe.Error,code:he.StaticEntityWithNonStaticProperties,entity:d});p.push(s.error)}})}}else{if(d.abstractMethods.length){const i=$t({id:d.id+"--"+he.AbstractPropertyInNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is not marked as abstract but has abstract methods`,severity:pe.Error,code:he.AbstractPropertyInNonAbstractEntity,entity:d});p.push(i.error)}d.properties.some(i=>i.abstract)&&d.properties.forEach(i=>{if(i.abstract){const n=$t({id:d.id+"--"+he.AbstractPropertyInNonAbstractEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${d.name}" with id "${d.id}" is marked as abstract but the entity is not marked as abstract`,severity:pe.Error,code:he.AbstractPropertyInNonAbstractEntity,entity:d,firstRelationship:i});p.push(n.error)}})}return d.static&&d.properties.some(i=>!i.static)&&d.properties.forEach(i=>{if(!i.static){const n=$t({id:d.id+"--"+he.NonStaticPropertyInStaticEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${d.name}" with id "${d.id}" is not marked as static but the entity is marked as static`,severity:pe.Error,code:he.NonStaticPropertyInStaticEntity,entity:d,firstRelationship:i});p.push(n.error)}}),p}function dUi(d,p){const i=[],n=Zn(p);if(!p.abstract){const e=new Mi({id:d.id+"--"+p.id+"--"+he.ImplementingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is implementing a non-abstract built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.ImplementingNonAbstractEntity,entity:d,firstRelationship:p});i.push(e)}const s=d.implements.filter(e=>e.id!==p.id);if(d.abstract){const e=new Mi({id:d.id+"--"+p.id+"--"+he.AbstractEntityImplements,message:`Entity "${d.name}" with id "${d.id}" is marked as abstract and cannot implement built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.AbstractEntityImplements,entity:d,firstRelationship:p});i.push(e)}if(d.static&&!p.static){const e=new Mi({id:d.id+"--"+p.id+"--"+he.StaticImplementingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is marked as static and cannot implement non-static built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.StaticImplementingNonStaticEntity,entity:d,firstRelationship:p});i.push(e)}if(!d.static&&p.static){const e=new Mi({id:d.id+"--"+p.id+"--"+he.NonStaticImplementingStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is not marked as static and cannot implement static built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonStaticImplementingStaticEntity,entity:d,firstRelationship:p});i.push(e)}return s.length&&s.forEach(e=>{if(e.type===o.BuiltInBaseEntity){const y=n.filter(m=>m.id!==e.id);y.length&&y.forEach(m=>{if(m.id!==e.id){const v=new Mi({id:d.id+"--"+m.id+"--"+e.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${m.name}" with id "${m.id}" but also implements entity "${e.name}" with id "${e.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:m,secondRelationship:e});i.push(v)}})}else{Zn(e).forEach(E=>{const b=n.filter(w=>w.id!==E.id);b.length&&b.forEach(w=>{if(w.id!==E.id){const P=new Mi({id:d.id+"--"+w.id+"--"+E.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${w.name}" with id "${w.id}" but also implements entity "${E.name}" with id "${E.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:w,secondRelationship:E});i.push(P)}})});const m=od(p.ownDeclaredProperties,e.ownDeclaredProperties,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameName);i.push(...m.errors);const v=od(p.abstractMethods,[...e.abstractMethods,...e.methods],Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation,Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameName);i.push(...v.errors)}}),D(d.extends?Zn(d.extends):[]).forEach(e=>{if(!n.find(y=>y.id===e.id)){const y=new Mi({id:d.id+"--"+p.id+"--"+e.id+"--"+he.ExtendsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${p.name}" with id "${p.id}" but also extends entity "${e.name}" with id "${e.id}" which is incompatible`,severity:pe.Error,code:he.ExtendsIncompatibleEntities,entity:d,firstRelationship:p,secondRelationship:e});i.push(y)}}),i}function uUi(d,p,i=!1){var v,E;const n=[],s=Zn(p);if(!d.abstract&&p.abstract){const b=$t({id:d.id+"--"+p.id+"--"+he.NonAbstractExtendingAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is not-abstract but is extending an abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonAbstractExtendingAbstractEntity,entity:d,firstRelationship:p});n.push(b.error)}if(d.abstract&&!p.abstract){const b=$t({id:d.id+"--"+p.id+"--"+he.AbstractExtendingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is abstract but is extending an non-abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.AbstractExtendingNonAbstractEntity,entity:d,firstRelationship:p});n.push(b.error)}if(!d.static&&p.static){const b=$t({id:d.id+"--"+p.id+"--"+he.NonStaticExtendingStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is not static but is extending a static entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonStaticExtendingStaticEntity,entity:d,firstRelationship:p});n.push(b.error)}if(d.static&&!p.static){const b=$t({id:d.id+"--"+p.id+"--"+he.StaticExtendingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is static but is extending an non-static entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.StaticExtendingNonStaticEntity,entity:d,firstRelationship:p});n.push(b.error)}if(!lf(p)){const b=$t({id:d.id+"--"+p.id+"--"+he.ExtendingNonInteractiveEntity,message:`Entity "${d.name}" with id "${d.id}" is extending an non-interactive entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.ExtendingNonInteractiveEntity,entity:d,firstRelationship:p});n.push(b.error)}if(d.extends&&((v=d.extends)==null?void 0:v.id)!==p.id)if(((E=d.extends)==null?void 0:E.type)===o.BuiltInBaseEntity){const b=s.filter(w=>{var P;return w.id!==((P=d.extends)==null?void 0:P.id)});b.length&&b.forEach(w=>{var P,$,L,U;if(w.id!==((P=d.extends)==null?void 0:P.id)){const K=$t({id:d.id+"--"+w.id+"--"+(($=d.extends)==null?void 0:$.id)+"--"+he.ExtendsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is extending built-in entity "${w.name}" with id "${w.id}" but also extends entity "${(L=d.extends)==null?void 0:L.name}" with id "${(U=d.extends)==null?void 0:U.id}" which is incompatible`,severity:pe.Error,code:he.ExtendsIncompatibleEntities,entity:d,firstRelationship:w,secondRelationship:d.extends});n.push(K.error)}})}else{Zn(d.extends).forEach(K=>{const H=s.filter(X=>X.id!==K.id);H.length&&H.forEach(X=>{if(X.id!==K.id){const se=new Mi({id:d.id+"--"+X.id+"--"+K.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is extending built-in entity "${X.name}" with id "${X.id}" but also extends or implements entity "${K.name}" with id "${K.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:X,secondRelationship:K});n.push(se)}})});const w=!!Zn(d.extends).find(K=>K.id===p.id);let P=[...d.extends.properties];w&&(P=P.filter(K=>!p.properties.find(H=>H.id===K.id||H.name===K.name||!!K.implements.find(X=>X.id===H.id))));let $=[...d.extends.methods];w&&($=$.filter(K=>!p.methods.find(H=>{var X;return H.id===K.id||H.name===K.name||H.id===((X=K.implements)==null?void 0:X.id)})));const L=od(p.ownDeclaredProperties,P,Ie.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation,Ie.PropertyOverwritesOtherExtendedEntitysPropertyWithSameName);n.push(...L.errors);const U=od(p.abstractMethods,$,Ie.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation,Ie.MethodOverwritesOtherExtendedEntitysMethodWithSameName);n.push(...U.errors)}i&&J.Logger.log("self.implements.length",d.implements.length),d.implements.length&&d.implements.forEach(b=>{if(b.type===o.BuiltInBaseEntity){const w=s.filter(P=>P.id!==b.id);w.length&&w.forEach(P=>{if(P.id!==b.id){const $=new Mi({id:d.id+"--"+P.id+"--"+b.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${P.name}" with id "${P.id}" but also implements entity "${b.name}" with id "${b.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:P,secondRelationship:b});n.push($)}})}else{Zn(b).forEach(L=>{const U=s.filter(K=>K.id!==L.id);U.length&&U.forEach(K=>{if(K.id!==L.id){const H=new Mi({id:d.id+"--"+K.id+"--"+L.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${K.name}" with id "${K.id}" but also implements entity "${L.name}" with id "${L.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:K,secondRelationship:L});n.push(H)}})});const P=od(p.ownDeclaredProperties,b.ownDeclaredProperties,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameName);n.push(...P.errors);const $=od(p.abstractMethods,[...b.abstractMethods,...b.methods],Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation,Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameName);n.push(...$.errors)}});const e=od(d.ownDeclaredProperties,p.ownDeclaredProperties,Ie.PropertyOverwritesOtherSiblingWithSameImplementation,Ie.PropertyOverwritesOtherSiblingWithSameName);n.push(...e.errors);const y=od(p.methods,p.abstractMethods,Ie.MethodOverwritesOtherSiblingWithSameImplementation,Ie.MethodOverwritesOtherSiblingWithSameName);return n.push(...y.errors),D(d.extends?Zn(d.extends):[]).forEach(b=>{if(!s.find(w=>w.id===b.id)){const w=new Mi({id:d.id+"--"+p.id+"--"+b.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is extending built-in entity "${p.name}" with id "${p.id}" but also extends entity "${b.name}" with id "${b.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:p,secondRelationship:b});n.push(w)}}),n}function pUi(d){const p=[];if(d.implements.forEach(i=>{if(!i.static){const n=new Mi({id:d.id+"--"+i.id+"--"+he.StaticImplementingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is static but implements entity "${i.name}" with id "${i.id}" which is non-static`,severity:pe.Error,code:he.StaticImplementingNonStaticEntity,entity:d,firstRelationship:i});p.push(n)}}),d.extends&&!d.extends.static){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.StaticExtendingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is static but extends entity "${d.extends.name}" with id "${d.extends.id}" which is non-static`,severity:pe.Error,code:he.StaticExtendingNonStaticEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function cUi(d){const p=[];if(d.implements.length){const i=new Mi({id:d.id+"--"+he.AbstractEntityImplements,message:`Entity "${d.name}" with id "${d.id}" cannot be marked as abstract because it implements other entities`,severity:pe.Error,code:he.AbstractEntityImplements,entity:d});p.push(i)}if(d.extends&&!d.extends.abstract){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.AbstractExtendingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is abstract but extends entity "${d.extends.name}" with id "${d.extends.id}" which is non-abstract`,severity:pe.Error,code:he.AbstractExtendingNonAbstractEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function fUi(d){const p=[];if(d.extends&&d.extends.static){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.NonStaticExtendingStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is non-static but extends entity "${d.extends.name}" with id "${d.extends.id}" which is static`,severity:pe.Error,code:he.NonStaticExtendingStaticEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function yUi(d){const p=[];if(d.extends&&d.extends.abstract){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.NonAbstractExtendingAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is non-abstract but extends entity "${d.extends.name}" with id "${d.extends.id}" which is abstract`,severity:pe.Error,code:he.NonAbstractExtendingAbstractEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function jx(d,p){const n=[...d.project.entities].filter(s=>s.id!==d.id);return xv(d,[Ji,wc],n,p)}const hUi=Object.freeze(Object.defineProperty({__proto__:null,getBaseMethodsNotImplemented:eKe,getBasePropertiesNotImplemented:QUe,validate:XUe,validateAsync:YUe,validateCanBecomeAbstract:cUi,validateCanBecomeNonAbstract:yUi,validateCanBecomeNonStatic:fUi,validateCanBecomeStatic:pUi,validateCanExtendEntity:uUi,validateCanImplementEntity:dUi,validateDefinitionEntityName:jx},Symbol.toStringTag,{value:"Module"}));function mUi(d,p){const i=[];if(d.parent)if(d.id===d.parent)i.push(new De({id:`${d.id}--${d.parent}--${ne.SelfReference}`,code:ne.SelfReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a reference to itself at 'parent'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`}));else{const n=p.get(d.parent);n?[o.Project,o.DataType].includes(n.type)||i.push(new De({id:`${d.id}--${d.parent}--${ne.InvalidParentReference}`,code:ne.InvalidParentReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`})):i.push(new De({id:`${d.id}--${d.parent}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${d.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}return d.implements&&Array.isArray(d.implements)?d.implements.forEach(n=>{if(d.id===n){i.push(new De({id:`${d.id}--${n}--${ne.SelfReference}`,code:ne.SelfReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a reference to itself at one of the 'implements' references. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`}));return}const s=p.get(n);s?[o.DefinitionEntity,o.BuiltInBaseEntity].includes(s.type)?s.abstract||i.push(new De({id:`${d.id}--${n}--${ne.InvalidImplementsReference}`,code:ne.InvalidImplementsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' reference that isn't pointing to an abstract entity.`})):i.push(new De({id:`${d.id}--${n}--${ne.InvalidImplementsReference}`,code:ne.InvalidImplementsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`})):i.push(new De({id:`${d.id}--${n}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}):i.push(new De({id:`${d.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' property that isn't an array.`})),d.extends&&Array.isArray(d.extends)&&d.extends.forEach(n=>{const s=p.get(n);s?[o.DefinitionEntity,o.BuiltInBaseEntity].includes(s.type)?s.abstract&&i.push(new De({id:`${d.id}--${n}--${ne.InvalidExtendsReference}`,code:ne.InvalidExtendsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'extends' reference that isn't pointing to a non-abstract entity. Did you want to use the property 'implements', which holds a list of references to absract entities, instead?`})):i.push(new De({id:`${d.id}--${n}--${ne.InvalidExtendsReference}`,code:ne.InvalidExtendsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'extends' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`})):i.push(new De({id:`${d.id}--${n}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}),i}var IA=(d=>(d.Extends="extends",d.Implements="implements",d))(IA||{});const bi=class bi extends kr{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"name");I(this,"codeName",null);I(this,"description",null);I(this,"x");I(this,"y");I(this,"static");I(this,"abstract");I(this,"type",o.DefinitionEntity);I(this,"additionalProperties",!1);I(this,"properties",[]);I(this,"allPropertiesImplement",null);I(this,"additionalPropertiesDataType",null);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"implements",[]);I(this,"project");I(this,"errors",[]);I(this,"parent");I(this,"detachedDependents",{});I(this,"knownVersions",null);I(this,"activeVersion",!1);I(this,"initialized",!1);I(this,"startedInitialization",!1);I(this,"suggestedProperties",[]);I(this,"suggestedMethods",[]);this.initialData=i,this.project=n,this.id=i.id,this.name=i.name,this.description=i.description,this.x=i.x,this.y=i.y,this.codeName=i.codeName,this.static=i.static,this.abstract=i.abstract}static new(i=null){return{id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.DefinitionEntity,additionalProperties:!1,additionalPropertiesDataType:null,allPropertiesImplement:null,name:"",codeName:null,description:"",static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:null,implements:[],x:0,y:0,parent:null}}static fromGenerationTarget(i,n){let s=n;if(i.parent){const v=re(i.parent);s=n.get(v)}const c=[];i.implements&&i.implements.forEach(v=>{c.push(n.get(v)||n.getBuiltIn(v))});let e=null;i.extends&&(e=n.get(i.extends)||n.getBuiltIn(i.extends));const y={id:i.id,version:x.UUID.uuid(),createdAt:M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:i.name,deletable:!0,editable:!0,type:o.DefinitionEntity,codeName:i.codeName||null,description:i.description,static:i.static,abstract:i.abstract,additionalProperties:i.additionalProperties||!1,allPropertiesImplement:null,additionalPropertiesDataType:null,properties:[],methods:[],abstractMethods:[],extends:e,implements:c,x:0,y:0,parent:s},m=ye(y,n);return m.setParent(s,null),m}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[],e=mUi(s,n),y=Px(s,n);c.push(...e,...y,...Nr(s));const m=s.parent?n.get(s.parent):null;if(m&&m.type===o.DataType){const v=m;v.entity&&c.push(new De({id:`${i.id}--${ne.NewEntityWouldOverriteExisting}`,code:ne.NewEntityWouldOverriteExisting,severity:pe.Error,message:`The entity of type '${i.type}' with id '${i.id}' can't be added to the 'parent' entity with id '${v.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
390
+ ${cA}`})),{errors:n,modifiedData:i}}onProjectInitialized(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,new Date().toISOString(),this,!0,"on-property-received-project-initialized"))){return Pk(this,n),n==null||n.attemptAutoclose("on-property-received-project-initialized",this.id),this}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];if(n==="property-implements-field"&&(this.removeImplementation(i,s),c.push(this)),n==="property-extends-field"){const{updated:v,added:E,removed:b,affected:w}=this.remove({ignoreUpstream:!1},s);c.push(...v),e.push(...E),y.push(...b),m.push(...w)}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];if(n==="property-implements-field"&&(this.addImplementation(i,s),c.push(this)),n==="property-extends-field"){const{updated:v,added:E,removed:b,affected:w}=this.restore({},s);c.push(...v),e.push(...E),y.push(...b),m.push(...w)}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){var i,n,s,c,e,y,m;return this.implements.forEach(v=>{this.project.getBuiltIn(v.id)||v.unsubscribeDependents([{entity:this,field:"property-implements-field"}])}),(n=(i=this.extends)==null?void 0:i.unsubscribeDependents)==null||n.call(i,[{entity:this,field:"property-extends-field"}]),(e=(c=(s=this.dataType)==null?void 0:s.entity)==null?void 0:c.unsubscribeDependents)==null||e.call(c,[{entity:this,field:"property-data-type-entity-field"}]),(m=(y=this.dataType)==null?void 0:y.unsubscribeDependents)==null||m.call(y,[{entity:this,field:"property-data-type-field"}]),this.project.off(ii.PROJECT_INITIALIZED,this.onProjectInitialized),this}subscribeToDependencies(){var i,n,s,c,e,y,m;return this.implements.forEach(v=>{this.project.getBuiltIn(v.id)||v.subscribeDependents([{entity:this,field:"property-implements-field"}])}),(n=(i=this.extends)==null?void 0:i.subscribeDependents)==null||n.call(i,[{entity:this,field:"property-extends-field"}]),(e=(c=(s=this.dataType)==null?void 0:s.entity)==null?void 0:c.subscribeDependents)==null||e.call(c,[{entity:this,field:"property-data-type-entity-field"}]),(m=(y=this.dataType)==null?void 0:y.subscribeDependents)==null||m.call(y,[{entity:this,field:"property-data-type-field"}]),oUi(this)&&this.project.on(ii.PROJECT_INITIALIZED,this.onProjectInitialized),this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new ti(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.defaultValue=this.defaultValue,i.dataType=this.dataType,i.implements=[...this.implements],i.extends=this.extends,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];if(this.parent&&this.parent.type!==o.PrimitiveEntity&&this.parent.type!==o.BuiltInBaseEntity){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new ti(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.defaultValue=y.defaultValue,this.dataType=y.dataType,this.implements=[...y.implements],this.parent=y.parent,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.unsubscribeFromDependencies(),i.parent){const c=re(i.parent),e=this.project.get(c),y=this.parent;if(y&&y.id!==(e==null?void 0:e.id)&&this.removeFromParent(n),e)this.setParent(e,n),this.addSelfToProject(n);else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${c}' that isn't found in the project`)}else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.implements.forEach(c=>{const e=re(c),y=this.project.get(e);if(y)this.addImplementation(y,n);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${e}" which is missing in the project`)}),this.implements.filter(c=>{const e=re(c);return!i.implements.find(y=>re(y)===e)}).forEach(c=>{this.removeImplementation(c,n)}),i.extends){const c=re(i.extends),e=this.project.get(c);if(e)this.setExtends(e,n);else if(c)throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'extends' reference "${c}" which is missing in the project`)}else this.setExtends(null,n);if(i.dataType){const c=re(i.dataType),e=this.project.get(c);e&&this.setDataType(e,n)}else this.setDataType(null,n);if(i.defaultValue){const c=re(i.defaultValue),e=this.project.get(c);e&&this.setDefaultValue(e,n)}else this.setDefaultValue(null,n);return this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],c=[];if(this.initialData.parent){const e=re(this.initialData.parent),y=this.project.get(e);if(y)this.setParent(y,null);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if((this.initialData.implements||[]).forEach(e=>{const y=re(e),m=this.project.get(y);if(m)this.addImplementation(m,null),i.push(m);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${y}" which is missing in the project`)}),this.initialData.extends){const e=re(this.initialData.extends),y=this.project.get(e);if(y)this.setExtends(y,null),i.push(y);else if(e)throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'extends' reference "${e}" which is missing in the project`)}return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AfterAllChildrenInitialized))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(this.initialized=!0,this.parent.type===o.DefinitionEntity&&this.parentRelationType!==yc.AllPropertiesImplementationTarget){let X=this.index||0;const se=this.parent.properties.filter(fe=>!fe.deleted&&fe.id!==this.id);se.length&&(X>se.length+1?X=se.length:X<0&&(X=0)),se.find(fe=>(fe.index||0)===X&&!fe.deleted)&&se.filter(fe=>(fe.index||0)>=X&&!fe.deleted).forEach(fe=>{fe.metaSync({index:(fe.index||0)+1},i),i==null||i.add(fe,Z.Updated),n.push(fe)}),this.metaSync({index:X},i)}const{updated:y,added:m,removed:v,affected:E}=this.syncWithImplementation(i);n.push(...y),s.push(...m),c.push(...v),e.push(...E);const{updated:b,added:w,removed:P,affected:$}=Pk(this,i);n.push(...b),s.push(...w),c.push(...P),e.push(...$);const{updated:L,added:U,removed:K,affected:H}=this.syncWithExtension(i);return n.push(...L),s.push(...U),c.push(...K),e.push(...H),this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){const n=[this],s=[],c=[],e=[];return this.parentRelationType===yc.AllPropertiesImplementationTarget?this.parent.setAllPropertiesImplement(this,i):this.parent.addProperty(this,i),n.push(this.parent),this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}addImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)||(this.implements.push(i),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this):(J.Logger.warn(`[addImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this)}removeImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)&&(this.implements=this.implements.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this):(J.Logger.warn(`[removeImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this)}setExtends(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetExtends))){var s;return this.checkCanEdit(this,n)?(((s=this.extends)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.extends=i,this.subscribeToDependencies(),n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetExtends,this.id),this):(J.Logger.warn(`[setExtends] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetExtends,this.id),this)}initChildren(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"init-children"))){if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.initialData.defaultValue&&(this.defaultValue=ye(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this,null),this.defaultValue.initChildren(i)),this.initialData.dataType){const n=ye(this.initialData.dataType,this.project);n.setParent(this,null),n.initChildren(i),this.dataType=n}if(this.implements=this.initialData.implements.map(n=>ye(n,this.project)),this.initialData.extends){const n=ye(this.initialData.extends,this.project);this.setExtends(n,null)}return this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.codeName=s.codeName!==void 0?s.codeName:e.codeName,this.description=s.description!==void 0?s.description:e.description,this.abstract=s.abstract!==void 0?s.abstract:e.abstract,this.private=s.private!==void 0?s.private:e.private,this.index=s.index||(s.index!==0?e.index:0),this.static=s.static!==void 0?s.static:e.static,this.hidden=s.hidden!==void 0?s.hidden:e.hidden,this.constant=s.constant!==void 0?s.constant:e.constant,this.interactive=s.interactive!==void 0?s.interactive:e.interactive,this.required=s.required!==void 0?s.required:e.required,this.unique=s.unique!==void 0?s.unique:e.unique,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await ti.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await ti.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await ti.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await ti.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await ti.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await ti.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveFromParent))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];return this.parent.type===o.DefinitionEntity&&(this.parentRelationType===yc.AllPropertiesImplementationTarget?this.parent.removeAllPropertiesImplement(i):this.parent.removeProperty(this,i),e.push(this.parent)),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,n))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),n==null||n.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:ir.ActionOwnerEntityNonDeletable,rootAction:((m=n==null?void 0:n.self)==null?void 0:m.id)===this.id&&(n==null?void 0:n.autoCloseActionName)===_.RemoveEntity}),n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},n),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,n);s.push(...E),c.push(...b),e.push(...w)}),this.defaultValue){const{updated:v,removed:E}=this.defaultValue.remove({ignoreUpstream:!0},n);s.push(...v),c.push(...E)}if(this.dataType){const{updated:v,removed:E}=this.dataType.remove({ignoreUpstream:!0},n);s.push(...v),c.push(...E)}if(!i){const v=this.removeFromParent(n);e.push(...v.added),s.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(i!=null&&i.hasAdded(this.id))return i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);s.push(...m),c.push(...v),n.push(...E)}),this.defaultValue){const{updated:y}=this.defaultValue.restore({},i);s.push(...y)}if(this.dataType){const{updated:y}=this.dataType.restore({},i);s.push(...y)}return this.parent.type===o.DefinitionEntity&&(this.parentRelationType===yc.AllPropertiesImplementationTarget?this.parent.removeAllPropertiesImplement(i):this.parent.addProperty(this,i),e.push(this.parent)),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),removed:D(c),affected:D(e),self:this}}toFlat(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this,...((s=this.defaultValue)==null?void 0:s.toFlat(i))||[],...((c=this.dataType)==null?void 0:c.toFlat(i))||[],...this.parent.toFlat(i)])}toFlatIds(i=new Set){var s,c;if(i.has(this.id))return[];if(i.add(this.id),!this.parent)throw new Error(`Property with id '${this.id}' has no parent and cannot be flattened`);return[this.id,...((s=this.defaultValue)==null?void 0:s.toFlatIds(i))||[],...((c=this.dataType)==null?void 0:c.toFlatIds(i))||[],...this.parent.toFlatIds(i)]}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,codeName:this.codeName,description:this.description,index:this.index,hidden:this.hidden,private:this.private,abstract:this.abstract,required:this.required,unique:this.unique,constant:this.constant,interactive:this.interactive,static:this.static,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name}}toJSON(i=new Set){var n,s,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,index:this.index,private:this.private,unique:this.unique,required:this.required,static:this.static,constant:this.constant,interactive:this.interactive,abstract:this.abstract,hidden:this.hidden,parentRelationType:this.parentRelationType,defaultValue:((n=this.defaultValue)==null?void 0:n.toJSON(i))||null,dataType:((s=this.dataType)==null?void 0:s.toJSON(i))||null,implements:this.implements.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null,parent:this.parent.toReference()})}toJSONClone(i=pt){var s,c,e,y,m,v,E;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,index:this.index,unique:this.unique,private:this.private,required:this.required,static:this.static,constant:this.constant,interactive:this.interactive,abstract:this.abstract,hidden:this.hidden,parentRelationType:this.parentRelationType,defaultValue:((v=this.defaultValue)==null?void 0:v.toJSONClone({...i,newId:null}))||null,dataType:((E=this.dataType)==null?void 0:E.toJSONClone({...i,newId:null}))||null,implements:this.implements.map(b=>this.project.getBuiltIn(b.id)?b.toJSON(i.seenEntities):b.toJSONClone({...i,newId:null})),extends:(()=>{var b;return this.extends&&this.project.getBuiltIn(this.extends.id)?this.extends.toJSON():((b=this.extends)==null?void 0:b.toJSONClone({...i,newId:null}))||null})(),parent:this.parent.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s,c,e,y;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,name:this.name,codeName:this.codeName,description:this.description,type:this.type,editable:this.editable,deletable:this.deletable,index:this.index,private:this.private,required:this.required,unique:this.unique,abstract:this.abstract,static:this.static,constant:this.constant,interactive:this.interactive,hidden:this.hidden,parentRelationType:this.parentRelationType,defaultValue:((c=this.defaultValue)==null?void 0:c.toReference(i))||null,dataType:((e=this.dataType)==null?void 0:e.toReference(i))||null,implements:this.implements.map(m=>m.toReference(i)),extends:((y=this.extends)==null?void 0:y.toReference(i))||null,parent:this.parent.toReference(i)}}toFlatJSON(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...((s=this.defaultValue)==null?void 0:s.toFlatJSON(i))||[],...((c=this.dataType)==null?void 0:c.toFlatJSON(i))||[],...this.implements.flatMap(e=>e.toFlatJSON(i)),...this.parent.toFlatJSON(i)])}toGenerationTarget(){var i;return{id:this.id,name:this.name,description:this.description,type:this.type,private:this.private,required:this.required,abstract:this.abstract,static:this.static,parentRelationType:this.parentRelationType,implements:this.implements.map(n=>n.id),extends:(i=this.extends)==null?void 0:i.id,parent:this.parent.id}}toFlatGenerationTarget(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...((s=this.defaultValue)==null?void 0:s.toFlatGenerationTarget(i))||[],...((c=this.dataType)==null?void 0:c.toFlatGenerationTarget(i))||[],...this.implements.flatMap(e=>e.toFlatGenerationTarget(i))])}clearErrors(){var i,n;return this.errors=[],(i=this.defaultValue)==null||i.clearErrors(),(n=this.dataType)==null||n.clearErrors(),this}validate(){return this.errors=zUe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await WUe(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...((n=this.defaultValue)==null?void 0:n.getErrors())||[],...((s=this.dataType)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];if(await n.tick(),this.defaultValue){const c=await this.defaultValue.getErrorsAsync({tracker:n});s.push(...c)}if(this.dataType){const c=await this.dataType.getErrorsAsync({tracker:n});s.push(...c)}return s}getShallowErrors(){return this.errors}implement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"implement-self-as-property")),s=null){var v;const c=s||x.UUID.uuid(),e=ti.new(n);e.id=c,e.name=this.name,e.description=this.description,e.index=this.index,e.private=this.private,e.required=this.required,e.static=this.static,e.constant=this.constant,e.unique=this.unique,e.hidden=this.hidden,e.interactive=this.interactive,e.parent=i.toReference(),e.implements=[this.toJSON()];const y=ye(e,this.project);y.hydrateAncestors(),y.addSelfToProject(n),n==null||n.add(y,Z.Added),y.initChildren(n);const m=(v=this.defaultValue)==null?void 0:v.clone(n,y,x.UUID.uuid());return m&&(m.editable=!0,m.deletable=!0),y}clone(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){var b,w;const e=Pr(n,this),y=s||x.UUID.uuid(),m=n||this.parent,v={hidden:!1,id:y,version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||"1",previousVersion:null,deleted:!1,type:this.type,editable:!0,deletable:!0,name:this.name,codeName:this.codeName,description:this.description,index:this.index,private:this.private,constant:this.constant,unique:this.unique,interactive:this.interactive,required:this.required,abstract:this.abstract,static:this.static,parentRelationType:this.parentRelationType,defaultValue:null,dataType:null,implements:this.implements.map(P=>P.toJSON()),extends:this.extends,parent:m.toReference()},E=Ui(v,e);if(E.hydrateAncestors(),E.setParent(m,i),c&&(E.subscribe(),E.addSelfToProject(i)),E.initChildren(i),i==null||i.add(E,Z.Added),this.dataType&&this.project.diggestedBuiltInBaseEntitiesIds.has(this.dataType.id))E.setDataType(e.getBuiltIn(this.dataType.id),i);else{const P=((b=this.dataType)==null?void 0:b.clone(i,E,x.UUID.uuid(),c))||null;P&&E.setDataType(P,i)}if(this.defaultValue){const P=(w=this.defaultValue)==null?void 0:w.clone(i,E,x.UUID.uuid(),c);E.setDefaultValue(P||null,i)}return this.implements.length&&this.implements.forEach(P=>{const $=e.get(P.id)||e.getBuiltIn(P.id);if($){E.addImplementation($,i);return}}),E.addSelfToProject(null),i==null||i.attemptAutoclose(_.CloneEntity,this.id),E}setDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetDataType))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetDataType,this.id),this;const s=this.dataType;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.dataType=i,this.subscribeToDependencies(),n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose(_.SetDataType,this.id),this}removeDataType(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveDataType))){return this.checkCanEdit(this,i)?(this.dataType&&(this.dataType.remove({ignoreUpstream:!0},i),i==null||i.add(this,Z.Affected),this.dataType=null),i==null||i.attemptAutoclose(_.RemoveDataType,this.id),this):(J.Logger.warn(`[removeDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveDataType,this.id),this)}getDataType(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"get-data-type"))){return i==null||i.attemptAutoclose("get-data-type",this.id),this.dataType}getDefaultValue(){var c;console.log("[getDefaultValue] Resolving default value for property",this.id," name:",this.name),console.log(`[getDefaultValue] implements:
391
+ - ${this.implements.map(e=>e.id+" name: "+e.name).join(`
392
+ - `)}`);let i=null;for(const e of this.implements){const y=e.getDefaultValue();(!i||qn(i))&&y&&(i=y)}let n=this.defaultValue;const s=(c=this.extends)==null?void 0:c.getDefaultValue();return qn(n)&&s&&!qn(s)&&(n=s),qn(n)&&i&&!qn(i)&&(n=i),n}setDefaultValue(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"set-default-value"))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setDefaultValue] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose("set-default-value",this.id),this;const s=this.defaultValue;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.defaultValue=i,n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose("set-default-value",this.id),this}syncWithImplementation(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-with-implementation"))){var P,$,L,U,K,H,X,se,ee,fe,de;if(!this.checkCanEdit(this,i))return J.Logger.warn(`[syncWithImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose("sync-with-implementation",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];this.parent.type!==o.PrimitiveEntity&&this.interactive&&this.parent.getAllPropertiesImplements().filter(ve=>ve.id!==this.id).forEach(ve=>{this.addImplementation(ve,i)}),this.implements.find(ce=>ce.id===this.id)&&this.removeImplementation(this,i);let y=null;for(const ce of this.implements)(P=ce.dataType)!=null&&P.isResolved&&(y?($=ce.dataType.orChildrenGroup)!=null&&$.length&&ce.dataType.implementationChooseOne&&(y=ce.dataType):y=ce.dataType);const m=zr(this.dataType,y);if(!this.dataType||!((L=this.dataType)!=null&&L.isResolved)||(U=this.dataType)!=null&&U.isResolved&&(y!=null&&y.isResolved)&&!m.compatible){if(y&&((K=y.orChildrenGroup)!=null&&K.length)&&y.implementationChooseOne){if(!this.dataType||this.dataType&&this.project.diggestedBuiltInBaseEntitiesIds.has(this.dataType.id)){const ve=tr.new(i);ve.parent=this.toReference();const ae=ye(ve,this.project);ae.hydrateAncestors(),i==null||i.add(ae,Z.Added),ae.addSelfToProject(i),ae.afterAllChildrenInitialized(i)}const ce=y.orChildrenGroup.some(ve=>ve.foreignKeyAllowed);if(((X=(H=this.dataType)==null?void 0:H.entity)==null?void 0:X.type)===o.DefinitionEntity&&Si(this.dataType.entity,Re.PERSISTED_ENTITY)&&ce){const ve=$Ue(this.dataType.entity);ve&&this.dataType.setForeignKeyRef(ve,i),(se=this.dataType)==null||se.setEntity(null,i)}else{const ve=y.orChildrenGroup.find(ae=>{var me;return((me=ae.entity)==null?void 0:me.id)===Q["primitive-entity"].string.id});if(ve)(ee=this.dataType)==null||ee.setEntity(ve.entity,i);else{const ae=y.orChildrenGroup.filter(_e=>_e.isResolved),me=ae.filter(_e=>{var Ne;return((Ne=_e.entity)==null?void 0:Ne.type)===o.PrimitiveEntity});me.length?(fe=this.dataType)==null||fe.setEntity(me[0].entity,i):ae.length&&((de=this.dataType)==null||de.setEntity(ae[0].entity,i))}}}else if(y&&this.project.diggestedBuiltInBaseEntitiesIds.has(y.id))this.setDataType(y,i);else if(y){const ce=y.clone(i,this,x.UUID.uuid(),!0);this.setDataType(ce,i),s.push(ce)}}if(!this.defaultValue){let ce=null;for(const ve of this.implements){const ae=ve.getDefaultValue();ae&&(ce=ae)}if(ce){const ve=ce.clone(i,this,x.UUID.uuid(),!0);this.setDefaultValue(ve,i),s.push(ve)}}let v=!1,E=!1,b=!1,w=!1;return this.implements.forEach(ce=>{ce.required&&(v=!0),ce.constant&&(b=!0),ce.unique&&(E=!0),ce.static&&(w=!0)}),this.metaSync({required:v||this.required,constant:b||this.constant,unique:E||this.unique,static:w||this.static},i),i==null||i.attemptAutoclose("sync-with-implementation",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}syncWithExtension(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-with-extension"))){var v,E;if(!this.checkCanEdit(this,i))return J.Logger.warn(`[syncWithExtension] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose("sync-with-extension",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(!this.extends)return i==null||i.attemptAutoclose("sync-with-extension",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const y={...this.extends.toMeta()};if(delete y.id,delete y.version,delete y.createdAt,delete y.previousVersion,delete y.author,delete y.index,this.metaSync(y,i),n.push(this),!this.extends.dataType)return i==null||i.attemptAutoclose("sync-with-extension",this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(!this.dataType){const b=tr.new(i);b.parent=this.toReference();const w=ye(b,this.project);w.hydrateAncestors(),i==null||i.add(w,Z.Added),w.addSelfToProject(i),w.afterAllChildrenInitialized(i)}if(zr(this.dataType,this.extends.dataType).compatible||(v=this.dataType)==null||v.merge(this.extends.dataType,i),this.extends.defaultValue&&!this.defaultValue){const b=this.extends.defaultValue.clone(i,this,x.UUID.uuid(),!0);this.setDefaultValue(b,i),s.push(b)}else this.extends.defaultValue?this.extends.defaultValue&&this.defaultValue&&!Wke(this.defaultValue,this.extends.defaultValue)&&(this.defaultValue.merge(this.extends.defaultValue,i),n.push(this.defaultValue)):((E=this.defaultValue)==null||E.remove({ignoreUpstream:!0},i),this.defaultValue=null,e.push(this));return i==null||i.attemptAutoclose("sync-with-extension",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}implementAsInputMap(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"implement-as-return-declaration")),n,s){const c=ds.new(i);c.id=s||c.id,c.name=this.name,c.description=this.description,c.parent=n.toReference(),c.declaration=this.toJSON();const e=Ui(c,this.project);if(e.hydrateAncestors(),e.addSelfToProject(i),i==null||i.add(e,Z.Added),e.initChildren(i),this.dataType)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.dataType.id))e.setDataType(this.dataType,i),i==null||i.add(e,Z.Affected);else{const y=this.dataType.clone(i,e);e.setDataType(y,i)}if(this.defaultValue){const y=this.defaultValue.clone(i,e);e.setDefaultValue(y,i)}return i==null||i.attemptAutoclose("implement-as-return-declaration",this.id),e}};I(ti,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(ti,"type",o.Property),I(ti,"USER_MANAGED_PARENT_TYPES",[o.DefinitionEntity]),I(ti,"PARENT_TYPES",[...ti.USER_MANAGED_PARENT_TYPES,o.PrimitiveEntity,o.BuiltInBaseEntity]),I(ti,"MUTABLE_BASE_PROPERTIES",["name","codeName","description","private","abstract","static","required","constant","unique","interactive"]),I(ti,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(ti,"BASE_PROPERTIES",[...ti.MUTABLE_BASE_PROPERTIES,...ti.INMUTABLE_BASE_PROPERTIES]),I(ti,"MUTABLE_META_PROPERTIES",[...ti.MUTABLE_BASE_PROPERTIES,"index"]),I(ti,"INMUTABLE_META_PROPERTIES",[...ti.INMUTABLE_BASE_PROPERTIES]),I(ti,"META_PROPERTIES",[...ti.MUTABLE_META_PROPERTIES,...ti.INMUTABLE_META_PROPERTIES]),I(ti,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(ti,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements","extends"]),I(ti,"UPSTREAM_PROPERTIES",[...ti.MUTABLE_UPSTREAM_PROPERTIES,...ti.INMUTABLE_UPSTREAM_PROPERTIES]),I(ti,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),I(ti,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(ti,"DOWNSTREAM_PROPERTIES",[...ti.MUTABLE_DOWNSTREAM_PROPERTIES,...ti.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(ti,"PROPERTIES",[...ti.META_PROPERTIES,...ti.UPSTREAM_PROPERTIES,...ti.DOWNSTREAM_PROPERTIES]);let ka=ti;async function YUe(d,p={}){var E,b;const i=J.YieldTracker.from(p),n=d.implements.flatMap(w=>tKe(d,w)),s=iKe(d,d.extends),c=nKe(d),e=rKe(d),y=jx(d),m=[...n,...s,...c,...e,...y],v=Lt(d.errors,m);await i.tick();for(const w of d.properties)await w.validateAsync({tracker:i});for(const w of d.methods)await w.validateAsync({tracker:i});for(const w of d.abstractMethods)await w.validateAsync({tracker:i});return await((E=d.allPropertiesImplement)==null?void 0:E.validateAsync({tracker:i})),await((b=d.additionalPropertiesDataType)==null?void 0:b.validateAsync({tracker:i})),v}function XUe(d){var m,v;const p=d.implements.flatMap(E=>tKe(d,E)),i=iKe(d,d.extends),n=nKe(d),s=rKe(d),c=jx(d);d.properties.forEach(E=>{E.validate()}),d.methods.flatMap(E=>E.validate()),d.abstractMethods.flatMap(E=>E.validate()),(m=d.allPropertiesImplement)==null||m.validate(),(v=d.additionalPropertiesDataType)==null||v.validate();const e=[...p,...i,...n,...s,...c];return Lt(d.errors,e)}function QUe(d,p){const i=p.properties.filter(c=>c.abstract),n=[];let s=[...d.properties];return i.forEach(c=>{const e=s.find(y=>!!y.implements.find(m=>m.id===c.id));e?s=s.filter(y=>y.id!==e.id):n.push(c)}),n}function eKe(d,p){const i=p.abstractMethods,n=[];let s=[...d.methods];return i.forEach(c=>{const e=s.find(y=>{var m;return((m=y.implements)==null?void 0:m.id)===c.id});e?s=s.filter(y=>y.id!==e.id):n.push(c)}),n}function tKe(d,p){const i=[];if(!p.abstract){const E=$t({id:d.id+"--"+he.ImplementingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is implementing a non-abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.ImplementingNonAbstractEntity,entity:d});return i.push(E.error),i}const n=p.properties.filter(E=>E.abstract),s=[];let c=[...d.properties];n.forEach(E=>{const b=c.find(w=>!!w.implements.find(P=>P.id===E.id));b?c=c.filter(w=>w.id!==b.id):s.push(E)}),s.length&&s.forEach(E=>{const b=$t({id:d.id+"--"+he.MissingPropertyImplementation+"--"+E.id,message:`Property "${E.name}" with id "${E.id}" of entity "${p.name}" with id "${p.id}" is not implemented when entity "${d.name}" with id "${d.id}" implements it`,severity:pe.Error,code:he.MissingPropertyImplementation,entity:d});i.push(b.error)});const e=[];let y=[...d.methods];p.abstractMethods.forEach(E=>{const b=y.find(w=>{var P;return((P=w.implements)==null?void 0:P.id)===E.id});b?y=y.filter(w=>w.id!==b.id):e.push(E)}),e.length&&e.forEach(E=>{const b=$t({id:d.id+"--"+he.MissingMethodImplementation+"--"+E.id,message:`Method "${E.name}" with id "${E.id}" of entity "${p.name}" with id "${p.id}" is not implemented when entity "${d.name}" with id "${d.id}" implements it`,severity:pe.Error,code:he.MissingMethodImplementation,entity:d});i.push(b.error)});const m=[];p.properties.forEach(E=>{const b=c.find(w=>w.name===E.name);b&&m.push([b,E])}),m.length&&m.forEach(([E])=>{const b=$t({id:d.id+"--"+Ie.PropertyOverwritesOtherSiblingWithSameName+"--"+E.id,message:`Property "${E.name}" with id "${E.id}" of entity "${d.name}" with id "${d.id}" overwrites the property with the same name from the base entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.PropertyOverwritesOtherSiblingWithSameName,entity:d});i.push(b.error)});const v=[];return p.methods.forEach(E=>{const b=y.find(w=>w.name===E.name);b&&v.push([b,E])}),v.length&&v.forEach(([E])=>{const b=$t({id:d.id+"--"+Ie.MethodOverwritesOtherSiblingWithSameName+"--"+E.id,message:`Method "${E.name}" with id "${E.id}" of entity "${d.name}" with id "${d.id}" overwrites the method with the same name from the base entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.MethodOverwritesOtherSiblingWithSameName,entity:d});i.push(b.error)}),i}function iKe(d,p){const i=[];if(!p)return i;const n=[];if(!d.abstract&&p.abstract){const c=$t({id:d.id+"--"+p.id+"--"+he.NonAbstractExtendingAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is not-abstract but is extending an abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonAbstractExtendingAbstractEntity,entity:d,firstRelationship:p});return i.push(c.error),i}if(d.abstract&&!p.abstract){const c=$t({id:d.id+"--"+p.id+"--"+he.AbstractExtendingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is abstract but is extending an non-abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.AbstractExtendingNonAbstractEntity,entity:d,firstRelationship:p});return i.push(c.error),i}d.properties.forEach(c=>{const e=p.properties.find(y=>{var m;return y.name===c.name&&((m=c.extends)==null?void 0:m.id)!==y.id});c.implements.find(y=>y.id===(e==null?void 0:e.id))||e&&n.push(c)}),n.length&&n.forEach(c=>{const e=$t({id:d.id+"--"+Ie.PropertyOverwritesOtherSiblingWithSameName,message:`Property "${c.name}" with id "${c.id}" of entity "${d.name}" with id "${d.id}" overwrites the property with the same name from the extended entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.PropertyOverwritesOtherSiblingWithSameName,entity:d});i.push(e.error)});const s=[];return d.methods.forEach(c=>{var y;const e=p.methods.find(m=>{var v;return m.name===c.name&&((v=c.extends)==null?void 0:v.id)!==m.id});((y=c.implements)==null?void 0:y.id)!==(e==null?void 0:e.id)&&e&&s.push(c)}),s.length&&s.forEach(c=>{const e=$t({id:d.id+"--"+Ie.MethodOverwritesOtherSiblingWithSameName,message:`Method "${c.name}" with id "${c.id}" of entity "${d.name}" with id "${d.id}" overwrites the method with the same name from the extended entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:Ie.MethodOverwritesOtherSiblingWithSameName,entity:d});i.push(e.error)}),i}function rKe(d){const p=[];if(!d.properties.length){const i=$t({id:d.id+"--"+he.NoProperties,message:"No properties implemented",severity:pe.Warning,code:he.NoProperties,entity:d});p.push(i.error)}return p}function nKe(d){const p=[];if(d.abstract){if(d.methods.length){const i=$t({id:d.id+"--"+he.AbstractEntityWithNonAbstractMethods,message:`Entity "${d.name}" with id "${d.id}" is marked as abstract but has non-abstract methods`,severity:pe.Error,code:he.AbstractEntityWithNonAbstractMethods,entity:d});p.push(i.error)}if(d.properties.some(i=>!i.abstract)){const i=$t({id:d.id+"--"+he.AbstractEntityWithNonAbstractProperties,message:`Entity "${d.name}" with id "${d.id}" is marked as abstract but has non-abstract properties`,severity:pe.Error,code:he.AbstractEntityWithNonAbstractProperties,entity:d});p.push(i.error),d.properties.forEach(n=>{if(!n.abstract){const s=$t({id:d.id+"--"+he.StaticEntityWithNonStaticProperties+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${d.name}" with id "${d.id}" is not marked as abstract but the entity is marked as abstract`,severity:pe.Error,code:he.StaticEntityWithNonStaticProperties,entity:d});p.push(s.error)}})}}else{if(d.abstractMethods.length){const i=$t({id:d.id+"--"+he.AbstractPropertyInNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is not marked as abstract but has abstract methods`,severity:pe.Error,code:he.AbstractPropertyInNonAbstractEntity,entity:d});p.push(i.error)}d.properties.some(i=>i.abstract)&&d.properties.forEach(i=>{if(i.abstract){const n=$t({id:d.id+"--"+he.AbstractPropertyInNonAbstractEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${d.name}" with id "${d.id}" is marked as abstract but the entity is not marked as abstract`,severity:pe.Error,code:he.AbstractPropertyInNonAbstractEntity,entity:d,firstRelationship:i});p.push(n.error)}})}return d.static&&d.properties.some(i=>!i.static)&&d.properties.forEach(i=>{if(!i.static){const n=$t({id:d.id+"--"+he.NonStaticPropertyInStaticEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${d.name}" with id "${d.id}" is not marked as static but the entity is marked as static`,severity:pe.Error,code:he.NonStaticPropertyInStaticEntity,entity:d,firstRelationship:i});p.push(n.error)}}),p}function dUi(d,p){const i=[],n=Zn(p);if(!p.abstract){const e=new Mi({id:d.id+"--"+p.id+"--"+he.ImplementingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is implementing a non-abstract built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.ImplementingNonAbstractEntity,entity:d,firstRelationship:p});i.push(e)}const s=d.implements.filter(e=>e.id!==p.id);if(d.abstract){const e=new Mi({id:d.id+"--"+p.id+"--"+he.AbstractEntityImplements,message:`Entity "${d.name}" with id "${d.id}" is marked as abstract and cannot implement built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.AbstractEntityImplements,entity:d,firstRelationship:p});i.push(e)}if(d.static&&!p.static){const e=new Mi({id:d.id+"--"+p.id+"--"+he.StaticImplementingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is marked as static and cannot implement non-static built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.StaticImplementingNonStaticEntity,entity:d,firstRelationship:p});i.push(e)}if(!d.static&&p.static){const e=new Mi({id:d.id+"--"+p.id+"--"+he.NonStaticImplementingStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is not marked as static and cannot implement static built-in entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonStaticImplementingStaticEntity,entity:d,firstRelationship:p});i.push(e)}return s.length&&s.forEach(e=>{if(e.type===o.BuiltInBaseEntity){const y=n.filter(m=>m.id!==e.id);y.length&&y.forEach(m=>{if(m.id!==e.id){const v=new Mi({id:d.id+"--"+m.id+"--"+e.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${m.name}" with id "${m.id}" but also implements entity "${e.name}" with id "${e.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:m,secondRelationship:e});i.push(v)}})}else{Zn(e).forEach(E=>{const b=n.filter(w=>w.id!==E.id);b.length&&b.forEach(w=>{if(w.id!==E.id){const P=new Mi({id:d.id+"--"+w.id+"--"+E.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${w.name}" with id "${w.id}" but also implements entity "${E.name}" with id "${E.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:w,secondRelationship:E});i.push(P)}})});const m=od(p.ownDeclaredProperties,e.ownDeclaredProperties,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameName);i.push(...m.errors);const v=od(p.abstractMethods,[...e.abstractMethods,...e.methods],Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation,Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameName);i.push(...v.errors)}}),D(d.extends?Zn(d.extends):[]).forEach(e=>{if(!n.find(y=>y.id===e.id)){const y=new Mi({id:d.id+"--"+p.id+"--"+e.id+"--"+he.ExtendsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${p.name}" with id "${p.id}" but also extends entity "${e.name}" with id "${e.id}" which is incompatible`,severity:pe.Error,code:he.ExtendsIncompatibleEntities,entity:d,firstRelationship:p,secondRelationship:e});i.push(y)}}),i}function uUi(d,p,i=!1){var v,E;const n=[],s=Zn(p);if(!d.abstract&&p.abstract){const b=$t({id:d.id+"--"+p.id+"--"+he.NonAbstractExtendingAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is not-abstract but is extending an abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonAbstractExtendingAbstractEntity,entity:d,firstRelationship:p});n.push(b.error)}if(d.abstract&&!p.abstract){const b=$t({id:d.id+"--"+p.id+"--"+he.AbstractExtendingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is abstract but is extending an non-abstract entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.AbstractExtendingNonAbstractEntity,entity:d,firstRelationship:p});n.push(b.error)}if(!d.static&&p.static){const b=$t({id:d.id+"--"+p.id+"--"+he.NonStaticExtendingStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is not static but is extending a static entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.NonStaticExtendingStaticEntity,entity:d,firstRelationship:p});n.push(b.error)}if(d.static&&!p.static){const b=$t({id:d.id+"--"+p.id+"--"+he.StaticExtendingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is static but is extending an non-static entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.StaticExtendingNonStaticEntity,entity:d,firstRelationship:p});n.push(b.error)}if(!lf(p)){const b=$t({id:d.id+"--"+p.id+"--"+he.ExtendingNonInteractiveEntity,message:`Entity "${d.name}" with id "${d.id}" is extending an non-interactive entity "${p.name}" with id "${p.id}"`,severity:pe.Error,code:he.ExtendingNonInteractiveEntity,entity:d,firstRelationship:p});n.push(b.error)}if(d.extends&&((v=d.extends)==null?void 0:v.id)!==p.id)if(((E=d.extends)==null?void 0:E.type)===o.BuiltInBaseEntity){const b=s.filter(w=>{var P;return w.id!==((P=d.extends)==null?void 0:P.id)});b.length&&b.forEach(w=>{var P,$,L,U;if(w.id!==((P=d.extends)==null?void 0:P.id)){const K=$t({id:d.id+"--"+w.id+"--"+(($=d.extends)==null?void 0:$.id)+"--"+he.ExtendsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is extending built-in entity "${w.name}" with id "${w.id}" but also extends entity "${(L=d.extends)==null?void 0:L.name}" with id "${(U=d.extends)==null?void 0:U.id}" which is incompatible`,severity:pe.Error,code:he.ExtendsIncompatibleEntities,entity:d,firstRelationship:w,secondRelationship:d.extends});n.push(K.error)}})}else{Zn(d.extends).forEach(K=>{const H=s.filter(X=>X.id!==K.id);H.length&&H.forEach(X=>{if(X.id!==K.id){const se=new Mi({id:d.id+"--"+X.id+"--"+K.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is extending built-in entity "${X.name}" with id "${X.id}" but also extends or implements entity "${K.name}" with id "${K.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:X,secondRelationship:K});n.push(se)}})});const w=!!Zn(d.extends).find(K=>K.id===p.id);let P=[...d.extends.properties];w&&(P=P.filter(K=>!p.properties.find(H=>H.id===K.id||H.name===K.name||!!K.implements.find(X=>X.id===H.id))));let $=[...d.extends.methods];w&&($=$.filter(K=>!p.methods.find(H=>{var X;return H.id===K.id||H.name===K.name||H.id===((X=K.implements)==null?void 0:X.id)})));const L=od(p.ownDeclaredProperties,P,Ie.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation,Ie.PropertyOverwritesOtherExtendedEntitysPropertyWithSameName);n.push(...L.errors);const U=od(p.abstractMethods,$,Ie.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation,Ie.MethodOverwritesOtherExtendedEntitysMethodWithSameName);n.push(...U.errors)}i&&J.Logger.log("self.implements.length",d.implements.length),d.implements.length&&d.implements.forEach(b=>{if(b.type===o.BuiltInBaseEntity){const w=s.filter(P=>P.id!==b.id);w.length&&w.forEach(P=>{if(P.id!==b.id){const $=new Mi({id:d.id+"--"+P.id+"--"+b.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${P.name}" with id "${P.id}" but also implements entity "${b.name}" with id "${b.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:P,secondRelationship:b});n.push($)}})}else{Zn(b).forEach(L=>{const U=s.filter(K=>K.id!==L.id);U.length&&U.forEach(K=>{if(K.id!==L.id){const H=new Mi({id:d.id+"--"+K.id+"--"+L.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is implementing built-in entity "${K.name}" with id "${K.id}" but also implements entity "${L.name}" with id "${L.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:K,secondRelationship:L});n.push(H)}})});const P=od(p.ownDeclaredProperties,b.ownDeclaredProperties,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation,Ie.PropertyOverwritesOtherImplementedEntitysPropertyWithSameName);n.push(...P.errors);const $=od(p.abstractMethods,[...b.abstractMethods,...b.methods],Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation,Ie.MethodOverwritesOtherImplementedEntitysMethodWithSameName);n.push(...$.errors)}});const e=od(d.ownDeclaredProperties,p.ownDeclaredProperties,Ie.PropertyOverwritesOtherSiblingWithSameImplementation,Ie.PropertyOverwritesOtherSiblingWithSameName);n.push(...e.errors);const y=od(p.methods,p.abstractMethods,Ie.MethodOverwritesOtherSiblingWithSameImplementation,Ie.MethodOverwritesOtherSiblingWithSameName);return n.push(...y.errors),D(d.extends?Zn(d.extends):[]).forEach(b=>{if(!s.find(w=>w.id===b.id)){const w=new Mi({id:d.id+"--"+p.id+"--"+b.id+"--"+he.ImplementsIncompatibleEntities,message:`Entity "${d.name}" with id "${d.id}" is extending built-in entity "${p.name}" with id "${p.id}" but also extends entity "${b.name}" with id "${b.id}" which is incompatible`,severity:pe.Error,code:he.ImplementsIncompatibleEntities,entity:d,firstRelationship:p,secondRelationship:b});n.push(w)}}),n}function pUi(d){const p=[];if(d.implements.forEach(i=>{if(!i.static){const n=new Mi({id:d.id+"--"+i.id+"--"+he.StaticImplementingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is static but implements entity "${i.name}" with id "${i.id}" which is non-static`,severity:pe.Error,code:he.StaticImplementingNonStaticEntity,entity:d,firstRelationship:i});p.push(n)}}),d.extends&&!d.extends.static){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.StaticExtendingNonStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is static but extends entity "${d.extends.name}" with id "${d.extends.id}" which is non-static`,severity:pe.Error,code:he.StaticExtendingNonStaticEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function cUi(d){const p=[];if(d.implements.length){const i=new Mi({id:d.id+"--"+he.AbstractEntityImplements,message:`Entity "${d.name}" with id "${d.id}" cannot be marked as abstract because it implements other entities`,severity:pe.Error,code:he.AbstractEntityImplements,entity:d});p.push(i)}if(d.extends&&!d.extends.abstract){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.AbstractExtendingNonAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is abstract but extends entity "${d.extends.name}" with id "${d.extends.id}" which is non-abstract`,severity:pe.Error,code:he.AbstractExtendingNonAbstractEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function fUi(d){const p=[];if(d.extends&&d.extends.static){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.NonStaticExtendingStaticEntity,message:`Entity "${d.name}" with id "${d.id}" is non-static but extends entity "${d.extends.name}" with id "${d.extends.id}" which is static`,severity:pe.Error,code:he.NonStaticExtendingStaticEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function yUi(d){const p=[];if(d.extends&&d.extends.abstract){const i=new Mi({id:d.id+"--"+d.extends.id+"--"+he.NonAbstractExtendingAbstractEntity,message:`Entity "${d.name}" with id "${d.id}" is non-abstract but extends entity "${d.extends.name}" with id "${d.extends.id}" which is abstract`,severity:pe.Error,code:he.NonAbstractExtendingAbstractEntity,entity:d,firstRelationship:d.extends});p.push(i)}return p}function jx(d,p){const n=[...d.project.entities].filter(s=>s.id!==d.id);return xv(d,[Ji,wc],n,p)}const hUi=Object.freeze(Object.defineProperty({__proto__:null,getBaseMethodsNotImplemented:eKe,getBasePropertiesNotImplemented:QUe,validate:XUe,validateAsync:YUe,validateCanBecomeAbstract:cUi,validateCanBecomeNonAbstract:yUi,validateCanBecomeNonStatic:fUi,validateCanBecomeStatic:pUi,validateCanExtendEntity:uUi,validateCanImplementEntity:dUi,validateDefinitionEntityName:jx},Symbol.toStringTag,{value:"Module"}));function mUi(d,p){const i=[];if(d.parent)if(d.id===d.parent)i.push(new De({id:`${d.id}--${d.parent}--${ne.SelfReference}`,code:ne.SelfReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a reference to itself at 'parent'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`}));else{const n=p.get(d.parent);n?[o.Project,o.DataType].includes(n.type)||i.push(new De({id:`${d.id}--${d.parent}--${ne.InvalidParentReference}`,code:ne.InvalidParentReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`})):i.push(new De({id:`${d.id}--${d.parent}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${d.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}return d.implements&&Array.isArray(d.implements)?d.implements.forEach(n=>{if(d.id===n){i.push(new De({id:`${d.id}--${n}--${ne.SelfReference}`,code:ne.SelfReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has a reference to itself at one of the 'implements' references. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`}));return}const s=p.get(n);s?[o.DefinitionEntity,o.BuiltInBaseEntity].includes(s.type)?s.abstract||i.push(new De({id:`${d.id}--${n}--${ne.InvalidImplementsReference}`,code:ne.InvalidImplementsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' reference that isn't pointing to an abstract entity.`})):i.push(new De({id:`${d.id}--${n}--${ne.InvalidImplementsReference}`,code:ne.InvalidImplementsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`})):i.push(new De({id:`${d.id}--${n}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}):i.push(new De({id:`${d.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'implements' property that isn't an array.`})),d.extends&&Array.isArray(d.extends)&&d.extends.forEach(n=>{const s=p.get(n);s?[o.DefinitionEntity,o.BuiltInBaseEntity].includes(s.type)?s.abstract&&i.push(new De({id:`${d.id}--${n}--${ne.InvalidExtendsReference}`,code:ne.InvalidExtendsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'extends' reference that isn't pointing to a non-abstract entity. Did you want to use the property 'implements', which holds a list of references to absract entities, instead?`})):i.push(new De({id:`${d.id}--${n}--${ne.InvalidExtendsReference}`,code:ne.InvalidExtendsReference,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", has an 'extends' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`})):i.push(new De({id:`${d.id}--${n}--${ne.ReferencedEntityNotFound}`,code:ne.ReferencedEntityNotFound,severity:pe.Error,message:`Entity of type "${d.type}" with id "${d.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}),i}var IA=(d=>(d.Extends="extends",d.Implements="implements",d))(IA||{});const bi=class bi extends kr{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"name");I(this,"codeName",null);I(this,"description",null);I(this,"x");I(this,"y");I(this,"static");I(this,"abstract");I(this,"type",o.DefinitionEntity);I(this,"additionalProperties",!1);I(this,"properties",[]);I(this,"allPropertiesImplement",null);I(this,"additionalPropertiesDataType",null);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"implements",[]);I(this,"project");I(this,"errors",[]);I(this,"parent");I(this,"detachedDependents",{});I(this,"knownVersions",null);I(this,"activeVersion",!1);I(this,"initialized",!1);I(this,"startedInitialization",!1);I(this,"suggestedProperties",[]);I(this,"suggestedMethods",[]);this.initialData=i,this.project=n,this.id=i.id,this.name=i.name,this.description=i.description,this.x=i.x,this.y=i.y,this.codeName=i.codeName,this.static=i.static,this.abstract=i.abstract}static new(i=null){return{id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.DefinitionEntity,additionalProperties:!1,additionalPropertiesDataType:null,allPropertiesImplement:null,name:"",codeName:null,description:"",static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:null,implements:[],x:0,y:0,parent:null}}static fromGenerationTarget(i,n){let s=n;if(i.parent){const v=re(i.parent);s=n.get(v)}const c=[];i.implements&&i.implements.forEach(v=>{c.push(n.get(v)||n.getBuiltIn(v))});let e=null;i.extends&&(e=n.get(i.extends)||n.getBuiltIn(i.extends));const y={id:i.id,version:x.UUID.uuid(),createdAt:M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:i.name,deletable:!0,editable:!0,type:o.DefinitionEntity,codeName:i.codeName||null,description:i.description,static:i.static,abstract:i.abstract,additionalProperties:i.additionalProperties||!1,allPropertiesImplement:null,additionalPropertiesDataType:null,properties:[],methods:[],abstractMethods:[],extends:e,implements:c,x:0,y:0,parent:s},m=ye(y,n);return m.setParent(s,null),m}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[],e=mUi(s,n),y=Px(s,n);c.push(...e,...y,...Nr(s));const m=s.parent?n.get(s.parent):null;if(m&&m.type===o.DataType){const v=m;v.entity&&c.push(new De({id:`${i.id}--${ne.NewEntityWouldOverriteExisting}`,code:ne.NewEntityWouldOverriteExisting,severity:pe.Error,message:`The entity of type '${i.type}' with id '${i.id}' can't be added to the 'parent' entity with id '${v.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
391
393
  You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
392
394
  ${go({describe_entity:v.entity.id})}
393
- Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`}))}return{errors:c,modifiedData:s}}get interactive(){return this.implements.length?this.implements.every(i=>i.interactive):!0}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.type)===o.DefinitionEntity?this.extends.allMethods:[],n=[...i].filter(c=>!i.some(e=>{var y,m;return e.id!==c.id&&(((y=e.implements)==null?void 0:y.id)===c.id||((m=e.extends)==null?void 0:m.id)===c.id)}));return D([...n,...this.implements.flatMap(c=>{const e=c.type===o.DefinitionEntity?[...c.allMethods]:[];return[...e].filter(m=>!e.some(v=>{var E,b;return v.id!==m.id&&(((E=v.implements)==null?void 0:E.id)===m.id||((b=v.extends)==null?void 0:b.id)===m.id)}))})])}get allBasePropertiesFromOriginalParents(){var c;const i=((c=this.extends)==null?void 0:c.allProperties)||[],n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D([...n,...this.implements.flatMap(e=>{const y=[...e.allProperties];return[...y].filter(v=>!y.some(E=>{var b;return E.id!==v.id&&(!!E.implements.find(w=>w.id===v.id)||((b=E.extends)==null?void 0:b.id)===v.id)}))})])}get allBasePropertiesFromExtendedAndImplementedEntities(){var c,e;const i=[...((c=this.extends)==null?void 0:c.ownDeclaredProperties)||[],...((e=this.extends)==null?void 0:e.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(y=>!y.abstract),n=[...i].filter(y=>!i.some(m=>{var v;return m.id!==y.id&&(!!m.implements.find(E=>E.id===y.id)||((v=m.extends)==null?void 0:v.id)===y.id)})),s=this.implements.reduce((y,m)=>{const v=m.implementedPropertiesFromOriginalParents,E=[...m.ownDeclaredProperties].filter(P=>!P.abstract),b=[...v,...E,...y];return[...b].filter(P=>!!!b.find(L=>{var U;return!!L.implements.find(K=>K.id===P.id)||((U=L.extends)==null?void 0:U.id)===P.id}))},[]);return D([...n,...s])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>n.type!==o.DefinitionEntity?[]:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==o.ActionDescriptor),...i],[]),...this.implements.reduce((i,n)=>n.type!==o.DefinitionEntity?n.abstractMethods:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==o.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||!!E.implements.find(w=>w.id===m.id)}))},[]),...this.implements.reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return!!E.implements.find(w=>w.id===m.id)||((b=E.extends)==null?void 0:b.id)===m.id}))},[])].filter(i=>!!i.abstract))}get extendedMethodsFromOriginalParents(){return D((this.extends?[this.extends]:[]).reduce((i,n)=>{if(n.type!==o.DefinitionEntity)return[];const s=[...n.ownDeclaredMethods,...n.extendedMethodsFromOriginalParents].filter(c=>c.type!==o.ActionDescriptor);return[...i,...s]},[]))}get implementedMethodsFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.type===o.DefinitionEntity?n.methods:[],c=[...n.abstractMethods].filter(e=>!s.find(y=>y.name===e.name));return[...s,...c,...i]},[]),...this.implements.reduce((i,n)=>[...n.abstractMethods,...i],[])].filter(i=>i.type===o.ActionDescriptor))}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(n=>!n.isExtendedProperty)}get extendedMethods(){return this.methods.filter(i=>i.isExtendedMethod)}get ownDeclaredMethods(){return this.methods.filter(i=>!i.isExtendedMethod)}validateGeneratedUpdate(i){const n=[];return i.parent&&n.push(new De({id:`${this.id}--${ne.InvalidParentUpdate}`,code:ne.InvalidParentUpdate,severity:pe.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an '${this.type}', must be the root project as it is a globally declared entity.`})),{errors:n,modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return n==="implements"&&(this.removeImplementation(i,s),c.push(this)),n==="extends"&&(this.setExtension(null,s),c.push(this)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return n==="implements"&&(this.addImplementation(i,s),c.push(this)),n==="extends"&&(this.setExtension(i,s),c.push(this)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){return this.implements.forEach(i=>{Hn.includes(i.type)||i.unsubscribeDependents([{entity:this,field:"implements"}])}),this.extends&&(Hn.includes(this.extends.type)||this.extends.unsubscribeDependents([{entity:this,field:"extends"}])),this}subscribeToDependencies(){return this.implements.forEach(i=>{Hn.includes(i.type)||i.subscribeDependents([{entity:this,field:"implements"}])}),this.extends&&(Hn.includes(this.extends.type)||this.extends.subscribeDependents([{entity:this,field:"extends"}])),this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new bi(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.properties=[...this.properties],i.methods=[...this.methods],i.abstractMethods=[...this.abstractMethods],i.extends=this.extends,i.implements=[...this.implements],i.allPropertiesImplement=this.allPropertiesImplement,i.additionalPropertiesDataType=this.additionalPropertiesDataType,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];if(this.parent){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new bi(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.properties=[...y.properties],this.methods=[...y.methods],this.abstractMethods=[...y.abstractMethods],this.extends=y.extends,this.implements=[...y.implements],this.allPropertiesImplement=y.allPropertiesImplement,this.additionalPropertiesDataType=y.additionalPropertiesDataType,this.parent=y.parent,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.unsubscribeFromDependencies(),i.parent){const y=re(i.parent),m=this.project.get(y),v=this.parent;if(v&&v.id!==(m==null?void 0:m.id)&&this.removeFromParent(n),m)this.setParent(m,n),this.addSelfToProject(n);else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${y}' that isn't found in the project`)}else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.extends){const y=re(i.extends),m=this.project.get(y);m&&this.setExtension(m,n)}else this.setExtension(null,n);if(i.implements.forEach(y=>{const m=re(y),v=this.project.get(m);if(v)this.addImplementation(v,n);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${m}" which is missing in the project`)}),this.implements.filter(y=>{const m=re(y);return!i.implements.find(v=>re(v)===m)}).forEach(y=>{this.removeImplementation(y,n)}),i.methods.forEach(y=>{const m=re(y),v=this.project.get(m);v&&this.addMethod(v,n)}),this.methods.filter(y=>{const m=re(y);return!i.methods.find(v=>re(v)===m)}).forEach(y=>{this.removeMethod(y,n)}),i.properties.forEach(y=>{const m=re(y),v=this.project.get(m);v&&this.addProperty(v,n)}),this.properties.filter(y=>{const m=re(y);return!i.properties.find(v=>re(v)===m)}).forEach(y=>{this.removeProperty(y,n)}),i.allPropertiesImplement){const y=re(i.allPropertiesImplement),m=this.project.get(y);m&&this.setAllPropertiesImplement(m,n)}else this.setAllPropertiesImplement(null,n);if(i.additionalPropertiesDataType){const y=re(i.additionalPropertiesDataType),m=this.project.get(y);m&&this.setAdditionalPropertiesDataType(m,n)}else this.setAdditionalPropertiesDataType(null,n);return this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],c=[];if(this.initialData.parent){const e=re(this.initialData.parent),y=this.project.get(e);if(y)this.setParent(y,null),i.push(y);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.extends){const e=re(this.initialData.extends),y=this.project.get(e);y&&(this.setExtension(y,null),y.type!==o.BuiltInBaseEntity&&i.push(y))}return this.initialData.implements.forEach(e=>{const y=re(e),m=this.project.get(y);if(m)this.addImplementation(m,null),m.type!==o.BuiltInBaseEntity&&i.push(m);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${y}" which is missing in the project`)}),{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AfterAllChildrenInitialized))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];this.initialized=!0;const{updated:y,added:m,removed:v,affected:E}=this.syncImplementationProperties(i);n.push(...y),s.push(...m),c.push(...v),e.push(...E);const{updated:b,added:w,removed:P,affected:$}=this.addExtendedProperties(i);n.push(...b),s.push(...w),c.push(...P),e.push(...$);const{updated:L,added:U,removed:K}=this.removeUnrecognizedProperties(i);n.push(...L),s.push(...U),c.push(...K);const{updated:H,added:X,removed:se,affected:ee}=this.syncImplementationMethods(i);n.push(...H),s.push(...X),c.push(...se),e.push(...ee);const{updated:fe,added:de,removed:ce,affected:ve}=this.addExtendedMethods(i);n.push(...fe),s.push(...de),c.push(...ce),e.push(...ve);const{updated:ae,added:me,removed:_e}=this.removeUnrecognizedMethods(i);return n.push(...ae),s.push(...me),c.push(..._e),this.addSuggestions(),this.properties.sort((Ne,ke)=>Ne.index-ke.index),this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){const n=[this],s=[],c=[],e=[];if(this.parent.type===o.DataType){const y=this.parent;y.entity=this,n.push(y)}else this.project.addDefinitionEntity(this);return this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}setExtension(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetExtension))){var s;return this.checkCanEdit(this,n)?(((s=this.extends)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.extends=i,this.subscribeToDependencies(),n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetExtension,this.id),this):(J.Logger.warn(`[setExtension] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetExtension,this.id),this)}addImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)||(this.implements.push(i),this.subscribeToDependencies(),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this):(J.Logger.warn(`[addImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this)}removeImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)&&(this.implements=this.implements.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this):(J.Logger.warn(`[removeImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this)}removeProperty(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveProperty))){return this.checkCanEdit(this,n)?(this.properties.includes(i)&&(this.properties=this.properties.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveProperty,this.id),this):(J.Logger.warn(`[removeProperty] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveProperty,this.id),this)}addMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddMethod))){return this.checkCanEdit(this,n)?(this.methods.includes(i)||(this.methods.push(i),this.suggestedMethods=this.suggestedMethods.filter(s=>s.name!==i.name),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddMethod,this.id),this):(J.Logger.warn(`[addMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddMethod,this.id),this)}removeMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveMethod))){return this.checkCanEdit(this,n)?(this.methods.includes(i)&&(this.methods=this.methods.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveMethod,this.id),this):(J.Logger.warn(`[removeMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveMethod,this.id),this)}addProperty(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddProperty))){return this.checkCanEdit(this,n)?(this.properties.includes(i)||(this.properties.push(i),this.suggestedProperties=this.suggestedProperties.filter(s=>s.name!==i.name),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddProperty,this.id),this):(J.Logger.warn(`[addProperty] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddProperty,this.id),this)}addSuggestedProperty(i){return this.suggestedProperties.includes(i)||this.suggestedProperties.push(i),this}addSuggestedMethod(i){return this.suggestedMethods.includes(i)||this.suggestedMethods.push(i),this}removeSuggestedProperty(i){return this.suggestedProperties=this.suggestedProperties.filter(n=>n.id!==i.id),this}removeSuggestedMethod(i){return this.suggestedMethods=this.suggestedMethods.filter(n=>n.id!==i.id),this}addAbstractMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddAbstractMethod))){return this.checkCanEdit(this,n)?(this.abstractMethods.includes(i)||(this.abstractMethods.push(i),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddAbstractMethod,this.id),this):(J.Logger.warn(`[addAbstractMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddAbstractMethod,this.id),this)}removeAbstractMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveAbstractMethod))){return this.checkCanEdit(this,n)?(this.abstractMethods.includes(i)&&(this.abstractMethods=this.abstractMethods.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveAbstractMethod,this.id),this):(J.Logger.warn(`[removeAbstractMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveAbstractMethod,this.id),this)}initChildren(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"init-children"))){if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.properties=this.initialData.properties.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(i),s}),this.methods=this.initialData.methods.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(i),s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(i),s}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project)),this.implements=this.initialData.implements.map(n=>ye(n,this.project)),this.initialData.allPropertiesImplement){const n=ye(this.initialData.allPropertiesImplement,this.project);n.setParent(this,null),n.initChildren(null),this.setAllPropertiesImplement(n,i)}if(this.initialData.additionalPropertiesDataType){const n=ye(this.initialData.additionalPropertiesDataType,this.project);n.setParent(this,null),n.initChildren(null),this.setAdditionalPropertiesDataType(n,i)}return this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}removeUnrecognizedProperties(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"remove-unrecognized-properties"))){const n=[],s=[],c=[],e=[];let y=[...this.properties];y=y.filter(b=>b.parent.id===this.id),y=y.filter(b=>!b.isExtendedProperty);const m=this.implementedPropertiesFromOriginalParents,v=this.getAllPropertiesImplements();return y.filter(b=>this.interactive&&!b.implements.length?!1:!b.implements.find(P=>!!m.find($=>$.id===P.id)||!!v.find($=>$.id===P.id))).forEach(b=>{const w=b.remove({ignoreUpstream:!1},i);c.push(...w.removed),n.push(...w.updated)}),i==null||i.attemptAutoclose("remove-unrecognized-properties",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}removeUnrecognizedMethods(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"remove-unrecognized-methods"))){const n=[],s=[],c=[],e=[];let y=[...this.methods];y=y.filter(v=>v.parent.id===this.id),y=y.filter(v=>!v.isExtendedMethod);const m=this.implementedMethodsFromOriginalParents;return y=y.filter(v=>this.interactive&&!v.implements?!1:!m.find(E=>{var b;return E.id===((b=v.implements)==null?void 0:b.id)})),y.forEach(v=>{const E=v.remove({ignoreUpstream:!1},i);c.push(...E.removed),n.push(...E.updated)}),i==null||i.attemptAutoclose("remove-unrecognized-methods",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}syncImplementationMethods(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-implementation-methods"))){const n=[],s=[],c=[],e=[],y=this.methods,m=this.implementedMethodsFromOriginalParents,v=[...this.allBaseMethodsFromExtendedAndImplementedEntities,...y];return m.filter(b=>!v.find(P=>{var $;return(($=P.implements)==null?void 0:$.id)===b.id})).forEach(b=>{if(this.methods.find(L=>{var U;return((U=L.implements)==null?void 0:U.id)===b.id}))return;const P=this.methods.find(L=>{var se,ee;if(L.name===b.name&&!L.implements)return!0;const U=Si(this,Re.CRON_JOB),K=Si(this,Re.HTTP_ENDPOINT),H=((se=L.implements)==null?void 0:se.id)===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id,X=((ee=L.implements)==null?void 0:ee.id)===Q["built-in-base-entity"].BUILT_IN_CRON_JOB_ENTITY.methods.handler.id;return!!(U&&!X&&!K&&H||K&&!H&&!U&&X)});if(P&&P.type===o.FunctionDeclaration){P.setImplements(b,i),P.metaSync({name:b.name},i),i==null||i.add(P,Z.Updated),i==null||i.add(this,Z.Updated);return}const $=b.implementAsFunctionDeclaration(i,this);s.push($),i==null||i.add($,Z.Added),this.addMethod($,i)}),this.methods.sort((b,w)=>b.index-w.index).forEach(b=>{b.afterAllChildrenInitialized(i)}),i==null||i.attemptAutoclose("sync-implementation-methods",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}syncImplementationProperties(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-implementation-properties"))){const n=[],s=[],c=[],e=[],y=this.properties,m=this.implementedPropertiesFromOriginalParents.filter(E=>!this.allBasePropertiesFromExtendedAndImplementedEntities.find(w=>!!w.implements.find(P=>P.id===E.id))),v=[...this.allBasePropertiesFromExtendedAndImplementedEntities,...y];return m.forEach(E=>{const b=v.find(L=>!!L.implements.find(U=>U.id===E.id));if(b){const{updated:L,added:U,removed:K,affected:H}=b.syncWithImplementation(i);n.push(...L),s.push(...U),c.push(...K),e.push(...H);return}if(this.properties.find(L=>!!L.implements.find(U=>U.id===E.id)))return;const P=this.properties.find(L=>L.name===E.name&&!!L.abstract&&!L.implements);if(P){P.addImplementation(E,i),P.metaSync({abstract:!1},i),P.afterAllChildrenInitialized(i);return}const $=E.implement(this,i,x.UUID.uuid());s.push($),i==null||i.add($,Z.Added)}),i==null||i.attemptAutoclose("sync-implementation-properties",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addExtendedMethods(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-extended-methods"))){const n=[],s=[],c=[],e=[],y=this.methods,v=this.extendedMethodsFromOriginalParents.filter(b=>b.type===o.FunctionDeclaration),E=new Set(y.filter(b=>{var w;return!!((w=b.extends)!=null&&w.id)}).map(b=>b.extends.id));return v.forEach(b=>{if(E.has(b.id))return;E.add(b.id);const w=b.clone(i,this,x.UUID.uuid());w.setExtends(b,i),w.initChildren(i),s.push(w),i==null||i.add(w,Z.Added),this.addMethod(w,i)}),i==null||i.attemptAutoclose("add-extended-methods",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addExtendedProperties(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-extended-properties"))){const n=[],s=[],c=[],e=[],y=this.properties,m=this.extendedPropertiesFromOriginalParents,v=m.filter(b=>m.find(P=>!!P.implements.find($=>$.id===b.id))?!1:!b.abstract),E=new Set(y.filter(b=>{var w;return!!((w=b.extends)!=null&&w.id)}).map(b=>b.extends.id));return v.forEach(b=>{if(E.has(b.id))return;E.add(b.id);const w=b.clone(i,this,x.UUID.uuid());w.setExtends(b,i),w.initChildren(i),s.push(w),i==null||i.add(w,Z.Added),this.addProperty(w,i)}),[...this.properties].forEach(b=>{if(b.extends)return;if(v.find(P=>P.name===b.name&&P.implements.every($=>!!b.implements.find(L=>L.id===$.id)))){const P=b.remove({ignoreUpstream:!1},i);c.push(...P.removed),n.push(...P.updated)}}),this.properties.forEach(b=>{const w=b.afterAllChildrenInitialized(i);n.push(...w.updated),e.push(...w.affected),s.push(...w.added),c.push(...w.removed)}),i==null||i.attemptAutoclose("add-extended-properties",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSuggestions(){return this.implements.forEach(i=>{QUe(this,i).forEach(c=>{const e=c.toJSON();e.id=`_suggestion--parent--${this.id}--${c.id}`;const y=ye(e,this.project);y.suggestion=!0,y.setParent(this,null),y.initChildren(null),this.addSuggestedProperty(y)}),eKe(this,i).forEach(c=>{const e=`_suggestion--parent--${this.id}--${c.id}`,y=c.implementAsFunctionDeclaration(null,this,e),m=ye(y,this.project);if(m.suggestion=!0,m.setParent(this,null),m.initChildren(null),this.methods=this.methods.filter(v=>v.id!==e),m.inputs.forEach(v=>{v.suggestion=!0}),m.returnStatements.length){const v=m.returnStatements[0];v.suggestion=!0,v.outputs.forEach(E=>{E.suggestion=!0})}this.addSuggestedMethod(m)})}),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.codeName=s.codeName!==void 0?s.codeName:e.codeName,this.description=s.description!==void 0?s.description:e.description,this.x=s.x||e.x,this.y=s.y||e.y,this.static=s.static!==void 0?s.static:this.static,this.abstract=s.abstract!==void 0?s.abstract:this.abstract,this.additionalProperties=s.additionalProperties!==void 0?s.additionalProperties:e.additionalProperties,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await bi.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await bi.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await bi.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await bi.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await bi.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await bi.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveFromParent))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(this.parent.type===o.Project)this.parent.removeDefinitionEntity(this);else if(this.parent.type===o.DataType&&this.parent.entity&&this.parent.entity.id===this.id){const y=this.parent.setEntity(null,i);n.push(y)}return i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,n))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),n==null||n.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:ir.ActionOwnerEntityNonDeletable,rootAction:((m=n==null?void 0:n.self)==null?void 0:m.id)===this.id&&(n==null?void 0:n.autoCloseActionName)===_.RemoveEntity}),n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},n),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,n);s.push(...E),c.push(...b),e.push(...w)}),this.properties.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.methods.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.abstractMethods.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.suggestedProperties.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.suggestedMethods.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),!i){const v=this.removeFromParent(n);e.push(...v.added),s.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];return i!=null&&i.hasAdded(this.id)?(i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);s.push(...m),c.push(...v),n.push(...E)}),this.properties.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.methods.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.abstractMethods.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.suggestedProperties.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.suggestedMethods.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),removed:D(c),affected:D(e),self:this})}toFlat(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this,...((s=this.extends)==null?void 0:s.toFlat(i))||[],...this.implements.flatMap(c=>c.toFlat(i)),...this.properties.flatMap(c=>c.toFlat(i)),...this.methods.flatMap(c=>c.toFlat(i)),...this.abstractMethods.flatMap(c=>c.toFlat(i)),...this.parent.toFlat(i)])}toFlatIds(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this.id,...((s=this.extends)==null?void 0:s.toFlatIds(i))||[],...this.implements.flatMap(c=>c.toFlatIds(i)),...this.properties.flatMap(c=>c.toFlatIds(i)),...this.methods.flatMap(c=>c.toFlatIds(i)),...this.abstractMethods.flatMap(c=>c.toFlatIds(i)),...this.parent.toFlatIds(i)])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,codeName:this.codeName,description:this.description,static:this.static,abstract:this.abstract,x:this.x,y:this.y,type:this.type,editable:this.editable,deletable:this.deletable,additionalProperties:this.additionalProperties,name:this.name}}toJSON(i=new Set){var n,s,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,additionalProperties:this.additionalProperties,allPropertiesImplement:((n=this.allPropertiesImplement)==null?void 0:n.toJSON(i))||null,additionalPropertiesDataType:((s=this.additionalPropertiesDataType)==null?void 0:s.toJSON(i))||null,properties:this.properties.map(e=>e.toJSON(i)),methods:this.methods.map(e=>e.toJSON(i)),abstractMethods:this.abstractMethods.map(e=>e.toJSON(i)),implements:this.implements.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null,parent:this.parent.toReference()})}toJSONClone(i=pt){var s,c,e,y,m,v,E,b,w,P;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,additionalProperties:this.additionalProperties,allPropertiesImplement:((v=this.allPropertiesImplement)==null?void 0:v.toJSONClone(i))||null,additionalPropertiesDataType:((E=this.additionalPropertiesDataType)==null?void 0:E.toJSONClone(i))||null,properties:this.properties.map($=>$.toJSONClone({...i,newId:null})),methods:this.methods.map($=>$.toJSONClone({...i,newId:null})),abstractMethods:this.abstractMethods.map($=>$.toJSONClone({...i,newId:null})),implements:this.implements.map($=>$.type===o.BuiltInBaseEntity?$.toJSON(i.seenEntities):$.toJSONClone({...i,newId:null})),extends:((b=this.extends)==null?void 0:b.type)===o.BuiltInBaseEntity?(w=this.extends)==null?void 0:w.toJSON(i.seenEntities):(P=this.extends)==null?void 0:P.toJSONClone({...i,newId:null}),parent:this.parent.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s,c,e,y;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,name:this.name,codeName:this.codeName,description:this.description,type:this.type,editable:this.editable,deletable:this.deletable,x:this.x,y:this.y,static:this.static,abstract:this.abstract,additionalProperties:this.additionalProperties,allPropertiesImplement:((c=this.allPropertiesImplement)==null?void 0:c.toReference(i))||null,additionalPropertiesDataType:((e=this.additionalPropertiesDataType)==null?void 0:e.toReference(i))||null,properties:this.properties.map(m=>m.toReference(i)),methods:this.methods.map(m=>m.toReference(i)),abstractMethods:this.abstractMethods.map(m=>m.toReference(i)),implements:this.implements.map(m=>m.toReference(i)),extends:((y=this.extends)==null?void 0:y.toReference(i))||null,parent:this.parent.toReference(i)}}toFlatJSON(i=new Set){var s,c,e;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(y=>y.toFlatJSON(i)),...this.methods.flatMap(y=>y.toFlatJSON(i)),...this.abstractMethods.flatMap(y=>y.toFlatJSON(i)),...this.implements.flatMap(y=>y.toFlatJSON(i)),...((s=this.extends)==null?void 0:s.toFlatJSON(i))||[],...this.parent.toFlatJSON(i),...((c=this.additionalPropertiesDataType)==null?void 0:c.toFlatJSON(i))||[],...((e=this.allPropertiesImplement)==null?void 0:e.toFlatJSON(i))||[]])}toGenerationTarget(){var n;const i=this.parent.type===o.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,static:this.static,abstract:this.abstract,extends:(n=this.extends)==null?void 0:n.id,additionalProperties:this.additionalProperties,implements:this.implements.map(s=>s.id),parent:i}}toFlatGenerationTarget(i=new Set){var s,c,e;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(y=>y.toFlatGenerationTarget(i)),...this.methods.flatMap(y=>y.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(y=>y.toFlatGenerationTarget(i)),...this.implements.filter(y=>y.type===o.DefinitionEntity).flatMap(y=>y.toFlatGenerationTarget(i)),...((s=this.extends)==null?void 0:s.toFlatGenerationTarget(i))||[],...this.parent.toFlatGenerationTarget(i),...((c=this.additionalPropertiesDataType)==null?void 0:c.toFlatGenerationTarget(i))||[],...((e=this.allPropertiesImplement)==null?void 0:e.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,n;return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(n=this.allPropertiesImplement)==null||n.clearErrors(),this}validate(){return this.errors=XUe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await YUe(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((n=this.additionalPropertiesDataType)==null?void 0:n.getErrors())||[],...((s=this.allPropertiesImplement)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties)s.push(...await c.getErrorsAsync({tracker:n}));for(const c of this.methods)s.push(...await c.getErrorsAsync({tracker:n}));for(const c of this.abstractMethods)s.push(...await c.getErrorsAsync({tracker:n}));return this.additionalPropertiesDataType&&s.push(...await this.additionalPropertiesDataType.getErrorsAsync({tracker:n})),this.allPropertiesImplement&&s.push(...await this.allPropertiesImplement.getErrorsAsync({tracker:n})),s}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){var U,K,H;const e=Pr(n,this),y=this.toJSON(),m=s||x.UUID.uuid(),v=n||this.parent;y.properties=[],y.methods=[],y.abstractMethods=[];const E=m.split("-id"),b=E[E.length-1||0]||m;y.id=m,y.version=x.UUID.uuid(),y.createdAt=(i==null?void 0:i.timestamp)||M().toISOString(),y.author=(i==null?void 0:i.author)||"1",y.previousVersion=null,y.deleted=!1,y.editable=!0,y.deletable=!0,y.parent=v.toReference();const w=Ui(y,e);w.hydrateAncestors(),w.setParent(v,i),c&&(w.subscribe(),w.addSelfToProject(i)),w.initChildren(i),i==null||i.add(w,Z.Added);const P=(U=this.properties)==null?void 0:U.map(X=>this.project.diggestedBuiltInBaseEntitiesIds.has(X.id)?e.getBuiltIn(X.id):X.clone(i,w,x.UUID.uuid(),c));w.properties=P;const $=(K=this.methods)==null?void 0:K.map((X,se)=>this.project.diggestedBuiltInBaseEntitiesIds.has(X.id)?e.getBuiltIn(X.id):X.clone(i,w,b+"-method-"+se+"-id",c));w.methods=$;const L=(H=this.abstractMethods)==null?void 0:H.map((X,se)=>this.project.diggestedBuiltInBaseEntitiesIds.has(X.id)?e.getBuiltIn(X.id):X.clone(i,w,b+"-abstract-method-"+se+"-id",c));if(w.abstractMethods=L,this.additionalPropertiesDataType)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.additionalPropertiesDataType.id))w.setAdditionalPropertiesDataType(this.project.getBuiltIn(this.additionalPropertiesDataType.id),i);else{const X=this.additionalPropertiesDataType.clone(i,w,x.UUID.uuid(),c);w.setAdditionalPropertiesDataType(X,i)}if(this.allPropertiesImplement)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.allPropertiesImplement.id))w.setAllPropertiesImplement(this.project.getBuiltIn(this.allPropertiesImplement.id),i);else{const X=this.allPropertiesImplement.clone(i,w,x.UUID.uuid(),c);w.setAllPropertiesImplement(X,i)}return i==null||i.attemptAutoclose(_.CloneEntity,this.id),w}getFunctionDeclaration(i){return this.methods.find(n=>n.id===i)}implement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"implement-definition-entity")),s){const c=x1(this,i,n,s);return n==null||n.attemptAutoclose("implement-definition-entity",this.id),c}getAllPropertiesImplements(){var n;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),i.push(...((n=this.extends)==null?void 0:n.getAllPropertiesImplements())||[],...this.implements.flatMap(s=>s.getAllPropertiesImplements())),i}getAllInteractiveMethods(){var e;const i=this.implements.filter(y=>y.type===o.DefinitionEntity||y.type===o.BuiltInBaseEntity&&y.interactive),n=((e=this.extends)==null?void 0:e.getAllInteractiveMethods())||[],s=i.flatMap(y=>y.getAllInteractiveMethods());return D([...this.methods,...n,...s])}inferFromInputs(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"infer-definition-entity-from-inputs"))){const s=[],c=[],e=[],y=[];if(this.parent.type!==o.DataType||!this.parent.inferred)return n==null||n.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const m=[];i.forEach(b=>{m.find(P=>le(P,this.project)===le(b,this.project))||m.push(b)});const v=this.properties.filter(b=>!b.dataType);m.forEach(b=>{var H,X,se;const w=v.find(ee=>le(ee,this.project)===le(b,this.project));if(!w)return;const $=Wn(b.parent).getMasterInputWithValueWritterFromAllInstances(b),L=Do($,n),U=L==null?void 0:L.clone(n,w,x.UUID.uuid(),!0);U&&((H=w.dataType)==null||H.merge(U,n),U.id!==((X=w.dataType)==null?void 0:X.id)&&U.remove({ignoreUpstream:!1},n),w.dataType&&(w.dataType.metaSync({inferred:!0,like:!0},n),w.setDataType(w.dataType,n),n==null||n.add(w,Z.Affected)));let K=null;if(b.declaration&&w.id!==((se=b.declaration)==null?void 0:se.id)&&(K=b.declaration),b.setDeclaration(w,n),n==null||n.add(b,Z.Updated),K){const{updated:ee,removed:fe}=K.remove({ignoreUpstream:!1},n);c.push(...ee),e.push(...fe)}});const E=[];return m.forEach(b=>{if(!b.declaration){E.push(b);return}}),E.length===0?(n==null||n.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(E.forEach(b=>{var se,ee,fe,de;const w=this.properties.find(ce=>le(ce,this.project)===le(b,this.project));if(w){if(b.setDeclaration(w,n),!w.getDataType(n)){const ve=Wn(b.parent).getMasterInputWithValueWritterFromAllInstances(b),ae=Do(ve),me=ae==null?void 0:ae.clone(n,w,x.UUID.uuid(),!0);me&&((se=w.dataType)==null||se.merge(me,n),me.id!==((ee=w.dataType)==null?void 0:ee.id)&&me.remove({ignoreUpstream:!1},n),w.dataType&&(w.dataType.metaSync({inferred:!0,like:!0},n),w.setDataType(w.dataType,n),n==null||n.add(w,Z.Affected)))}return}const P=le(b,this.project),$=b.codeName||k1(b,this.project)||Tc(Ji(P)),L=ka.new(n);L.parent=this.toReference(),L.index=b.index,L.name=P,L.codeName=$,L.description=b.description;const U=ye(L,this.project);U.hydrateAncestors(),n==null||n.add(U,Z.Added),U.setParent(this,n),U.initChildren(n);const H=Wn(b.parent).getMasterInputWithValueWritterFromAllInstances(b),X=Do(H);if(X)if(this.project.diggestedBuiltInBaseEntitiesIds.has(X.id))U.setDataType(X,n),n==null||n.add(U,Z.Affected);else{const ce=X==null?void 0:X.clone(n,U,x.UUID.uuid(),!0);ce&&((fe=U.dataType)==null||fe.merge(ce,n),ce.id!==((de=U.dataType)==null?void 0:de.id)&&ce.remove({ignoreUpstream:!1},n),U.dataType&&(U.dataType.metaSync({inferred:!0,like:!0},n),U.setDataType(U.dataType,n),n==null||n.add(U,Z.Affected)))}return this.addProperty(U,n),b.setDeclaration(U,n),n==null||n.add(b,Z.Updated),U}),n==null||n.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:D(s),updated:D(c),removed:D(e),affected:D(y),self:this})}getRawDefaultValue(){const i={};return this.properties.forEach(n=>{var c;if(!uC(n))return;const s=Ji(n.name);i[s]=((c=n.getDefaultValue())==null?void 0:c.value)||null}),i}getActiveRawDefaultValue(){const i={};return this.properties.forEach(n=>{var e;if(!uC(n))return;const s=Ji(n.name),c=(e=this.project.requestActiveDynamicValue(n,!0))==null?void 0:e.value;i[s]=(c==null?void 0:c.value)||null}),i}setAdditionalPropertiesDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetAdditionalPropertiesDataType))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setAdditionalPropertiesDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetAdditionalPropertiesDataType,this.id),this;const s=this.additionalPropertiesDataType;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.additionalPropertiesDataType=i,this.subscribeToDependencies(),n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose(_.SetAdditionalPropertiesDataType,this.id),this}removeAdditionalPropertiesDataType(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveAllPropertiesImplement))){return this.checkCanEdit(this,i)?(this.additionalPropertiesDataType&&(this.additionalPropertiesDataType.remove({ignoreUpstream:!0},i),i==null||i.add(this,Z.Affected),this.additionalPropertiesDataType=null),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this):(J.Logger.warn(`[removeAdditionalPropertiesDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this)}setAllPropertiesImplement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetAllPropertiesImplement))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setAllPropertiesImplement] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetAllPropertiesImplement,this.id),this;const s=this.allPropertiesImplement;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.allPropertiesImplement=i,this.subscribeToDependencies(),n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose(_.SetAllPropertiesImplement,this.id),this}removeAllPropertiesImplement(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveAllPropertiesImplement))){return this.checkCanEdit(this,i)?(this.allPropertiesImplement&&(this.allPropertiesImplement.remove({ignoreUpstream:!0},i),i==null||i.add(this,Z.Affected),this.allPropertiesImplement=null),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this):(J.Logger.warn(`[removeAllPropertiesImplement] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this)}};I(bi,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(bi,"type",o.DefinitionEntity),I(bi,"USER_MANAGED_PARENT_TYPES",[o.Project,o.DataType]),I(bi,"PARENT_TYPES",[...bi.USER_MANAGED_PARENT_TYPES]),I(bi,"MUTABLE_BASE_PROPERTIES",["name","codeName","description","static","abstract","additionalProperties"]),I(bi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(bi,"BASE_PROPERTIES",[...bi.MUTABLE_BASE_PROPERTIES,...bi.INMUTABLE_BASE_PROPERTIES]),I(bi,"MUTABLE_META_PROPERTIES",[...bi.MUTABLE_BASE_PROPERTIES,"x","y"]),I(bi,"INMUTABLE_META_PROPERTIES",[...bi.INMUTABLE_BASE_PROPERTIES]),I(bi,"META_PROPERTIES",[...bi.MUTABLE_META_PROPERTIES,...bi.INMUTABLE_META_PROPERTIES]),I(bi,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),I(bi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(bi,"UPSTREAM_PROPERTIES",[...bi.MUTABLE_UPSTREAM_PROPERTIES,...bi.INMUTABLE_UPSTREAM_PROPERTIES]),I(bi,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods","allPropertiesImplement","additionalPropertiesDataType"]),I(bi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(bi,"DOWNSTREAM_PROPERTIES",[...bi.MUTABLE_DOWNSTREAM_PROPERTIES,...bi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(bi,"PROPERTIES",[...bi.META_PROPERTIES,...bi.UPSTREAM_PROPERTIES,...bi.DOWNSTREAM_PROPERTIES]);let us=bi;async function TUi(d,p={}){const i=J.YieldTracker.from(p),n=[],s=Lt(d.errors,n);return await i.tick(),s}function vUi(d){const p=[];return Lt(d.errors,p)}const xm=class xm extends YV{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"version");I(this,"name");I(this,"description",null);I(this,"type",o.BuiltInBaseEntity);I(this,"abstract",!1);I(this,"static");I(this,"additionalProperties",!1);I(this,"properties",[]);I(this,"allPropertiesImplement",null);I(this,"additionalPropertiesDataType",null);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"interactive",!1);I(this,"errors",[]);I(this,"project");if(this.initialData=this.initialData||i,this.project=this.project||n,this.id=this.id||i.id,this.version=this.version||i.version,this.name=this.name||i.name,this.static=this.static||i.static,this.interactive=this.interactive||i.interactive,this.abstract=i.abstract,this.additionalProperties=i.additionalProperties,this.properties=this.initialData.properties.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const s=ye(this.initialData.allPropertiesImplement,this.project);s.setParent(this,null),s.initChildren(null),this.allPropertiesImplement=s}if(this.initialData.additionalPropertiesDataType){const s=ye(this.initialData.additionalPropertiesDataType,this.project);s.setParent(this,null),s.initChildren(null),this.additionalPropertiesDataType=s}this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allMethods)||[],n=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(n)}get allBasePropertiesFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allProperties)||[],n=[...i].filter(c=>!i.some(e=>{var y;return e.id!==c.id&&(!!e.implements.find(m=>m.id===c.id)||((y=e.extends)==null?void 0:y.id)===c.id)}));return D(n)}get allBasePropertiesFromExtendedAndImplementedEntities(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D([...n])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>n.type===o.PrimitiveEntity?i:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==o.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||!!E.implements.find(w=>w.id===m.id)}))},[])].filter(i=>!!i.abstract))}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredMethods(){return[...this.methods,...this.abstractMethods]}get ownDeclaredProperties(){return this.properties.filter(i=>!i.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(i=Ge,...n){return await xm.repository.APILoad(this.id,...n),this}toFlat(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this,...this.properties.flatMap(c=>c.toFlat(i)),...this.methods.flatMap(c=>c.toFlat(i)),...this.abstractMethods.flatMap(c=>c.toFlat(i)),...((s=this.extends)==null?void 0:s.toFlat(i))||[]])}toFlatIds(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.properties.flatMap(c=>c.toFlatIds(i)),...this.methods.flatMap(c=>c.toFlatIds(i)),...this.abstractMethods.flatMap(c=>c.toFlatIds(i)),...((s=this.extends)==null?void 0:s.toFlatIds(i))||[]])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,interactive:this.interactive,additionalProperties:this.additionalProperties,abstract:this.abstract,static:this.static,type:this.type,name:this.name}}toJSON(i=new Set){var n,s,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,additionalProperties:this.additionalProperties,interactive:this.interactive,additionalPropertiesDataType:((n=this.additionalPropertiesDataType)==null?void 0:n.toJSON(i))||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.toJSON(i))||null,properties:this.properties.map(e=>e.toJSON(i)),methods:this.methods.map(e=>e.toJSON(i)),abstractMethods:this.abstractMethods.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null})}toReference(i=pt){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var n,s,c;return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,additionalProperties:this.additionalProperties,additionalPropertiesDataType:((n=this.additionalPropertiesDataType)==null?void 0:n.toReference())||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.toReference())||null,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:((c=this.extends)==null?void 0:c.toReference())||null}}toFlatJSON(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(e=>e.toFlatJSON(i)),...this.methods.flatMap(e=>e.toFlatJSON(i)),...this.abstractMethods.flatMap(e=>e.toFlatJSON(i)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatJSON(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatJSON(i))||[]])}toGenerationTarget(){var i;return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,additionalProperties:this.additionalProperties,extends:(i=this.extends)==null?void 0:i.id}}toFlatGenerationTarget(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(e=>e.toFlatGenerationTarget(i)),...this.methods.flatMap(e=>e.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(e=>e.toFlatGenerationTarget(i)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatGenerationTarget(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,n;return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(n=this.allPropertiesImplement)==null||n.clearErrors(),this}validate(){return this.errors=vUi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await TUi(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((n=this.additionalPropertiesDataType)==null?void 0:n.getErrors())||[],...((s=this.allPropertiesImplement)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}if(this.additionalPropertiesDataType){const c=await this.additionalPropertiesDataType.getErrorsAsync({tracker:n});s.push(...c)}if(this.allPropertiesImplement){const c=await this.allPropertiesImplement.getErrorsAsync({tracker:n});s.push(...c)}return s}getShallowErrors(){return this.errors}implement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),null,!0,"implement-built-in-base-entity")),s){const c=x1(this,i,n,s);return n==null||n.attemptAutoclose("implement-built-in-base-entity",this.id),c}getAllPropertiesImplements(){var n;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),((n=this.extends)==null?void 0:n.type)===o.BuiltInBaseEntity&&i.push(...this.extends.getAllPropertiesImplements()||[]),i}getAllInteractiveMethods(){const i=[];if(this.interactive){if(i.push(...this.methods,...this.abstractMethods),!this.extends||this.extends.type===o.BuiltInBaseEntity&&this.extends.interactive||this.extends.type===o.PrimitiveEntity)return i;this.extends instanceof xm&&i.push(...this.extends.getAllInteractiveMethods())}return D(i)}};I(xm,"repository",{APILoad:async(i,...n)=>null});let Po=xm;async function EUi(d,p={}){const i=J.YieldTracker.from(p),n=[],s=Lt(d.errors,n);return await i.tick(),s}function bUi(d){const p=[];return Lt(d.errors,p)}const OA=class OA extends YV{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"name");I(this,"description",null);I(this,"type",o.PrimitiveEntity);I(this,"static");I(this,"abstract");I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=i,this.project=n,this.id=i.id,this.name=i.name,this.static=i.static,this.abstract=i.abstract,this.properties=this.initialData.properties.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=ye(s,this.project);return c.parent=this,c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=ye(s,this.project);return c.parent=this,c}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allMethods)||[],n=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(n)}get allBasePropertiesFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allProperties)||[],n=[...i].filter(c=>!i.some(e=>{var y;return e.id!==c.id&&(e.implements.find(m=>m.id===c.id)||((y=e.extends)==null?void 0:y.id)===c.id)}));return D(n)}get allBasePropertiesFromExtendedAndImplementedEntities(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||E.implements.find(w=>w.id===m.id)}))},[])])}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredMethods(){return[...this.methods]}get ownDeclaredProperties(){return this.properties.filter(i=>!i.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(i=Ge,...n){return await OA.repository.APILoad(this.id,...n),this}toFlat(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this,...this.properties.flatMap(s=>s.toFlat(i)),...this.methods.flatMap(s=>s.toFlat(i)),...this.abstractMethods.flatMap(s=>s.toFlat(i))])}toFlatIds(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.properties.flatMap(s=>s.toFlatIds(i)),...this.methods.flatMap(s=>s.toFlatIds(i)),...this.abstractMethods.flatMap(s=>s.toFlatIds(i))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,static:this.static,abstract:this.abstract,type:this.type,name:this.name}}toJSON(i=new Set){var n;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(s=>s.toJSON(i)),methods:this.methods.map(s=>s.toJSON(i)),abstractMethods:this.abstractMethods.map(s=>s.toJSON(i)),extends:((n=this.extends)==null?void 0:n.toJSON(i))||null})}toReference(i=pt){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var n;return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(s=>s.toReference()),methods:this.methods.map(s=>s.toReference()),abstractMethods:this.abstractMethods.map(s=>s.toReference()),extends:((n=this.extends)==null?void 0:n.toReference())||null}}toFlatJSON(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(s=>s.toFlatJSON(i)),...this.methods.flatMap(s=>s.toFlatJSON(i)),...this.abstractMethods.flatMap(s=>s.toFlatJSON(i))])}toGenerationTarget(){var i;return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:(i=this.extends)==null?void 0:i.id}}toFlatGenerationTarget(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(s=>s.toFlatGenerationTarget(i)),...this.methods.flatMap(s=>s.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(s=>s.toFlatGenerationTarget(i))])}clearErrors(){return this.errors=[],this.properties.forEach(i=>i.clearErrors()),this.methods.forEach(i=>i.clearErrors()),this.abstractMethods.forEach(i=>i.clearErrors()),this}validate(){return this.errors=bUi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await EUi(this,{tracker:n}),{success:!0}}getErrors(){return[...this.errors,...this.properties.flatMap(n=>n.getErrors()),...this.methods.flatMap(n=>n.getErrors()),...this.abstractMethods.flatMap(n=>n.getErrors())]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}return s}getShallowErrors(){return this.errors}getAllInteractiveMethods(){const i=[];return i.push(...this.methods),!this.extends||this.extends.type===o.BuiltInBaseEntity&&this.extends.interactive||this.extends.type===o.PrimitiveEntity?i:(this.extends instanceof Po&&i.push(...this.extends.getAllInteractiveMethods()),D(i))}};I(OA,"repository",{APILoad:async(i,...n)=>null});let ma=OA;function Ui(d,p){if(!d)throw new Error("Entity is null");const i=p.get(d.id);switch(d.type){case o.LiteralValue:return i||new Yr(d,p);case o.DefinitionEntity:return i||new us(d,p);case o.PrimitiveEntity:return i||new ma(d,p);case o.FunctionDeclaration:return i||new _o(d,p);case o.GlobalEvent:return i||new Ru(d,p);case o.DataType:return i||new tr(d,p);case o.Property:return i||new ka(d,p);case o.FunctionCall:return i||new Bu(d,p);case o.Condition:return i||new wu(d,p);case o.Operation:return i||new Iu(d,p);case o.VariableDeclaration:return i||new _u(d,p);case o.VariableInstance:return i||new Cu(d,p);case o.OutputMap:return i||new gl(d,p);case o.ArgumentDeclaration:return i||new Ea(d,p);case o.InputMap:return i||new ds(d,p);case o.Project:return i||new x(d);case o.InstalledProject:return i||new Vu(d,p);case o.ActionDescriptor:return i||new $i(d,p);case o.ReturnStatement:return i||new md(d,p);case o.Loop:return i||new Du(d,p);case o.Search:return i||new Pu(d,p);case o.ValueDescriptor:return i||new Td(d,p);case o.BuiltInBaseEntity:return i||new Po(d,p);case o.InternalCall:return i||new Nu(d,p);case o.ContinueStatement:return i||new $u(d,p);case o.BreakStatement:return i||new xu(d,p);case o.GenericReference:return p.get(d.entityId);default:throw new Error("Invalid entity type: "+d.type)}}function ye(d,p){if(!d)throw new Error("Entity is null");const i=Ui(d,p);return i.subscribe(),i}function AUi(d,p){if(!d)throw new Error("Entity is null");switch(d.type){case o.LiteralValue:return Yr.fromGenerationTarget(d,p);case o.DefinitionEntity:return us.fromGenerationTarget(d,p);case o.FunctionDeclaration:return _o.fromGenerationTarget(d,p);case o.GlobalEvent:return Ru.fromGenerationTarget(d,p);case o.DataType:return tr.fromGenerationTarget(d,p);case o.Property:return ka.fromGenerationTarget(d,p);case o.FunctionCall:return Bu.fromGenerationTarget(d,p);case o.Condition:return wu.fromGenerationTarget(d,p);case o.Operation:return Iu.fromGenerationTarget(d,p);case o.VariableDeclaration:return _u.fromGenerationTarget(d,p);case o.VariableInstance:return Cu.fromGenerationTarget(d,p);case o.OutputMap:return gl.fromGenerationTarget(d,p);case o.ArgumentDeclaration:return Ea.fromGenerationTarget(d,p);case o.InputMap:return ds.fromGenerationTarget(d,p);case o.InstalledProject:return Vu.fromGenerationTarget(d,p);case o.ReturnStatement:return md.fromGenerationTarget(d,p);case o.Loop:return Du.fromGenerationTarget(d,p);case o.Search:return Pu.fromGenerationTarget(d,p);case o.ActionDescriptor:return $i.fromGenerationTarget(d,p);case o.ValueDescriptor:return Td.fromGenerationTarget(d,p);case o.InternalCall:return Nu.fromGenerationTarget(d,p);case o.ContinueStatement:return $u.fromGenerationTarget(d,p);case o.BreakStatement:return xu.fromGenerationTarget(d,p);default:throw new Error("Invalid entity type: "+d.type)}}const pt={seenEntityMaps:new Map,seenEntities:new Set,timestamp:M().toISOString()};class aKe{constructor(){I(this,"initialData")}}const Ge={cascade:!1},sKe={APILoad:async(d,...p)=>null},gUi={APICreate:async(d,...p)=>d,APIUpdate:async(d,...p)=>d,APIDelete:async(d,...p)=>d,APIClone:async(d,...p)=>{},APILoadVersion:async(d,p,...i)=>null,...sKe};class IUi{}class lKe extends aKe{}class RUi extends lKe{}class DUi{}class wUi{}class OUi{}class Ux{}class CUi extends Ux{}class _Ui extends Ux{}class PUi{}class of{static initReadsValue(p){if(p.initialData.readsValue&&p.initialData.readsValue.type!==o.GenericReference)p.readsValue=ye(p.initialData.readsValue,p.project);else if(p.initialData.readsValue&&p.initialData.readsValue.type===o.GenericReference){const i=Sn(p.initialData.readsValue,p.project);i&&(p.readsValue=i)}if(p.readsValue){if(qt.includes(p.readsValue.type)){let i=p.parent;!dr.includes(i.type)&&i.type!==o.Project&&(i=i.parent);const n=p.type===o.InputMap&&p.parent.type===o.Loop;n&&(i=p.parent.parent),p.readsValue.setParent(i,null),p.readsValue.initChildren(null),i&&i.type!==o.Project&&!n&&i.detachedChildren.includes(p)?i.replaceDetachedChild(p,p.readsValue):i&&i.type!==o.Project&&!n&&i.subscribeDetachedChild(p.readsValue)}p.readsValue.addValueReader(p,null)}return p.readsValue}}class Bv{static initWritesValues(p,i){const n=p.initialData.writesValues.reduce((c,e)=>{if(e.type===o.GenericReference||p.writesValues.some(m=>m.id===e.id))return c;const y=ye(e,p.project);return y.setValueWriter(p,null),qt.includes(y.type)&&(y.setParent(i,null),y.initChildren(null)),[...c,y]},[]),s=[...p.writesValues];return p.writesValues=D([...s,...n]),p.writesValues}}class VUi{}var ii=(d=>(d.PROJECT_INITIALIZED="project-initialized",d.BEFORE_CHANGE_SET_CLOSE_BEFORE_SIDE_EFFECTS="before-change-set-close-before-side-effects",d.BEFORE_CHANGE_SET_CLOSE_AFTER_SIDE_EFFECTS="before-change-set-close-after-side-effects",d.CHANGE_SET_CLOSED_BEFORE_PERSIST="change-set-closed-before-persist",d.CHANGE_SET_PERSISTED="change-set-persisted",d.BEFORE_CHANGE_SET_PERSIST="before-change-set-persist",d.EXPLICIT_DEFINITION_ENTITY_ADDED="explicit-definition-entity-added",d.EXPLICIT_DEFINITION_ENTITY_REMOVED="explicit-definition-entity-removed",d.EXPLICIT_DEFINITION_ENTITY_UPDATED="explicit-definition-entity-updated",d.PERSISTED_DEFINITION_ENTITY_ADDED="persisted-definition-entity-added",d.PERSISTED_DEFINITION_ENTITY_REMOVED="persisted-definition-entity-removed",d.PERSISTED_DEFINITION_ENTITY_UPDATED="persisted-definition-entity-updated",d.RELATIONAL_DATABASE_DEFINITION_ENTITY_ADDED="relational-database-definition-entity-added",d.RELATIONAL_DATABASE_DEFINITION_ENTITY_REMOVED="relational-database-definition-entity-removed",d.RELATIONAL_DATABASE_DEFINITION_ENTITY_UPDATED="relational-database-definition-entity-updated",d))(ii||{});const Kx={...IN,events:new J.Events("def-proj-static-p-ctx-events")},oKe={requestActiveDynamicValue:(d,p=!1)=>null,...Kx},_t=class _t extends kr{constructor(i,n={...oKe,events:new J.Events("def-proj-inst-p-ctx-events")}){super(i);I(this,"initialData");I(this,"id");I(this,"type",o.Project);I(this,"name",null);I(this,"description",null);I(this,"x");I(this,"y");I(this,"entities",[]);I(this,"projects",[]);I(this,"functions",[]);I(this,"events",[]);I(this,"variableDeclarations",[]);I(this,"variableInstances",[]);I(this,"conditions",[]);I(this,"operations",[]);I(this,"functionCalls",[]);I(this,"loops",[]);I(this,"searches",[]);I(this,"primitives",[]);I(this,"builtInBaseEntities",[]);I(this,"operationDeclarations",[]);I(this,"globalEventActionDescriptors",[]);I(this,"loopDeclarations",[]);I(this,"loopDeclarationsBodies",[]);I(this,"conditionDeclarations",[]);I(this,"valueDescriptors",[]);I(this,"dataTypes",[]);I(this,"project");I(this,"instances",{});I(this,"builtInInstances",{});I(this,"deletedInstances",{});I(this,"errors",[]);I(this,"references",[]);I(this,"history",[]);I(this,"undoableStackValueIndex",-1);I(this,"detachedDependents",{});I(this,"knownVersions",null);I(this,"activeVersion",!1);I(this,"initialized",!1);I(this,"startedInitialization",!1);I(this,"diggestedBuiltInBaseEntitiesIds",new Set);I(this,"rejectParallelCS",!1);I(this,"onPersistChangeSetSequentiallyCallback",null);I(this,"onPersistChangeSetInParallelCallback",null);I(this,"onAddChangeSetCallback",null);I(this,"onDiscardChangeSetCallback",null);if(this.parentContext=n,this.initialData=i,this.id=i.id,this.name=i.name,this.description=i.description,this.x=0,this.y=0,this.instances[this.id]=this,!_t.UUID)throw new Error("UUID module is already initialized. Please inject a valid UUID module.")}static get UUID(){var i;return(i=this.parentContext.requestExtension("uuid"))==null?void 0:i.module}static new(i=null){return{id:_t.UUID.uuid(),version:_t.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||_t.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.Project,name:"",description:"",entities:[],functions:[],events:[],projects:[],variableDeclarations:[],variableInstances:[],conditions:[],operations:[],functionCalls:[],loops:[],searches:[]}}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[];return c.push(...Nr(s)),{errors:c,modifiedData:s}}get off(){return this.parentContext.events.off}get on(){return this.parentContext.events.on}get emit(){return this.parentContext.events.emit}get emitAsync(){return this.parentContext.events.emitAsync}get emitAsyncAll(){return this.parentContext.events.emitAsyncAll}get emitAsyncAllSettled(){return this.parentContext.events.emitAsyncAllSettled}get emitAsyncSequentially(){return this.parentContext.events.emitAsyncSequentially}get emitAsyncSequentiallyAll(){return this.parentContext.events.emitAsyncSequentiallyAll}get emitAsyncSequentiallyAllSettled(){return this.parentContext.events.emitAsyncSequentiallyAllSettled}async closePersistChangeSetsSequentially(){J.Logger.log("[ProjectState.closePersistChangeSetsSequentially] called");const i=this.history.find(n=>n.dirty&&!n.open&&!n.submitting);i&&(J.Logger.log(`[ProjectState.closePersistChangeSetsSequentially] closing pending change-set ${i.id} - ${i.autoCloseActionName}`),await this.persistChangeSetSequentially(i))}async onPersistChangeSetSequentially(i){this.onPersistChangeSetSequentiallyCallback=i,J.Logger.log("[ProjectState.onPersistChangeSetSequentially] onPersistChangeSetSequentiallyCallback has been set. Checking for pending change-sets."),await this.closePersistChangeSetsSequentially()}offPersistChangeSetSequentially(){this.onPersistChangeSetSequentiallyCallback=null}async onPersistChangeSetInParallel(i){this.onPersistChangeSetInParallelCallback=i,J.Logger.log("[ProjectState.onPersistChangeSetInParallel] onPersistChangeSetInParallelCallback has been set. Checking for pending change-sets.");for(const n of this.history)this.persistChangeSetInParallel(n),await new Promise(s=>setTimeout(s,27))}offPersistChangeSetInParallel(){this.onPersistChangeSetInParallelCallback=null}onAddChangeSet(i){this.onAddChangeSetCallback=i}offAddChangeSet(){this.onAddChangeSetCallback=null}onDiscardChangeSet(i){this.onDiscardChangeSetCallback=i}offDiscardChangeSet(){this.onDiscardChangeSetCallback=null}async persistChangeSetSequentially(i){if(J.Logger.log(`[ProjectState.persistChangeSetSequentially] called for change-set ${i.id} - ${i.autoCloseActionName}`),!i.dirty||i.open||i.submitting){J.Logger.log(`[ProjectState.persistChangeSetSequentially] change-set ${i.id} - ${i.autoCloseActionName} is not dirty, or is open, or is already being submitted, skipping.`);return}const n=this.history.findIndex(e=>e.id===i.id),s=this.history.slice(0,n),c=s[s.length-1];if(c!=null&&c.dirty){J.Logger.log(`[ProjectState.persistChangeSetSequentially] lastBeforeSelf is dirty: ${c.id} - ${c.autoCloseActionName}, closing it first.`);return}this.onPersistChangeSetSequentiallyCallback&&(J.Logger.log(`[ProjectState.persistChangeSetSequentially] invoking onPersistChangeSetSequentiallyCallback for change-set ${i.id} - ${i.autoCloseActionName}`),this.emit("before-change-set-persist",i),i.submitting=!0,(await this.onPersistChangeSetSequentiallyCallback(i)).success&&(i.dirty=!1,this.emit("change-set-persisted",i),J.Logger.log(`[ProjectState.persistChangeSetSequentially] change-set ${i.id} - ${i.autoCloseActionName} closed successfully, checking for pending change-sets to close.`),this.closePersistChangeSetsSequentially()))}async persistChangeSetInParallel(i){if(J.Logger.log(`[ProjectState.persistChangeSetInParallel] called for change-set ${i.id} - ${i.autoCloseActionName}`),!i.dirty||i.open||i.submitting){J.Logger.log(`[ProjectState.persistChangeSetInParallel] change-set ${i.id} - ${i.autoCloseActionName} is not dirty, or is open, or is already being submitted, skipping.`);return}this.onPersistChangeSetInParallelCallback&&(J.Logger.log(`[ProjectState.persistChangeSetInParallel] invoking onPersistChangeSetInParallelCallback for change-set ${i.id} - ${i.autoCloseActionName}`),this.emit("before-change-set-persist",i),i.submitting=!0,(await this.onPersistChangeSetInParallelCallback(i)).success&&(i.dirty=!1,this.emit("change-set-persisted",i)))}toLatestChangeSet(i,n,s,c=!1,e="here-this"){if(!this.history.length)return new q(this,i,n,s,c,e);const y=this.history[this.history.length-1];return y.open?y:this.addChangeSet(new q(this,i,n,s,c,e))}addChangeSet(i){var s,c;if(!this.history.length)return this.undoableStackValueIndex=$O(this.undoableStackValueIndex,this.history,i),(s=this.onAddChangeSetCallback)==null||s.call(this,i,this.undoableStackValueIndex),i;const n=this.history.find(e=>e.id===(i==null?void 0:i.id));if(n)return n;if(this.rejectParallelCS){const e=this.history.find(y=>y.open);if(e)throw J.Logger.warn("Previous still open: ",e),J.Logger.warn("New change set: ",i),new Error(`There is already an open change-set with id '${e.id}'${e.autoCloseActionName?` auto-close: ${e.autoCloseActionName}`:""}${e.self?` root: ${e.self.type} ${le(e.self,this)}`:""}.`)}return this.undoableStackValueIndex=$O(this.undoableStackValueIndex,this.history,i),(c=this.onAddChangeSetCallback)==null||c.call(this,i,this.undoableStackValueIndex),i}discardChangeSet(i){var s;J.Logger.log(`[ProjectState.discardChangeSet] called for change-set ${i.id} - ${i.autoCloseActionName}`);const n=this.history.findIndex(c=>c.id===(i==null?void 0:i.id));return n!==-1&&(this.history.splice(n,1),J.Logger.log(`[ProjectState.discardChangeSet] Removed change-set ${i.id} - ${i.autoCloseActionName} from history.`),this.undoableStackValueIndex=this.undoableStackValueIndex-1,(s=this.onDiscardChangeSetCallback)==null||s.call(this,i),i==null||i.teardown()),this}validateGeneratedUpdate(i){return{errors:[],modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){return this}subscribeToDependencies(){return this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=_t.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new _t(this);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.entities=[...this.entities],i.projects=[...this.projects],i.functions=[...this.functions],i.events=[...this.events],i.variableDeclarations=[...this.variableDeclarations],i.variableInstances=[...this.variableInstances],i.conditions=[...this.conditions],i.operations=[...this.operations],i.functionCalls=[...this.functionCalls],i.loops=[...this.loops],i.searches=[...this.searches],this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new _t(v)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.entities=y.entities,this.projects=y.projects,this.functions=y.functions,this.events=y.events,this.variableDeclarations=y.variableDeclarations,this.variableInstances=y.variableInstances,this.conditions=y.conditions,this.operations=y.operations,this.functionCalls=y.functionCalls,this.loops=y.loops,this.searches=y.searches,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){return this.checkCanEdit(this,n)?(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this):(J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this)}hydrateAncestors(){const i=[],n=[],s=[],c=[];return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=null){const n=[],s=[],c=[],e=[];return this.initialized||(this.initialized=!0,this.emit("project-initialized",this,i)),this.validate(),this.captureVersion(),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i){const n=[],s=[],c=[],e=[];return this.subscribe(),this.subscribeToDependencies(),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(i){return this.operationDeclarations.includes(i)}isGlobalEventActionDescriptor(i){return this.globalEventActionDescriptors.includes(i)}isLoopDeclaration(i){return this.loopDeclarations.includes(i)}isConditionDeclaration(i){return this.conditionDeclarations.includes(i)}initChildren(i=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.entities=this.initialData.entities.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.projects=this.initialData.projects.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.variableDeclarations=this.initialData.variableDeclarations.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.variableInstances=this.initialData.variableInstances.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.conditions=this.initialData.conditions.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.operations=this.initialData.operations.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.functions=this.initialData.functions.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.events=this.initialData.events.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.functionCalls=this.initialData.functionCalls.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.loops=this.initialData.loops.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.searches=this.initialData.searches.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.attachOrphanReferences(),this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this)}subscribeInstance(i){return(!this.instances[i.id]||this.instances[i.id]!==i)&&(this.instances[i.id]=i),this}subscribeDeletedInstance(i){return(!this.deletedInstances[i.id]||this.deletedInstances[i.id]!==i)&&(this.deletedInstances[i.id]=i),this}subscribeBuiltInInstance(i){return(!this.builtInInstances[i.id]||this.builtInInstances[i.id]!==i)&&(this.builtInInstances[i.id]=i),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(i){return delete this.instances[i.id],this}unsubscribeDeletedInstance(i){return delete this.deletedInstances[i.id],this}findSubscribedBuiltInInstance(i){return this.builtInInstances[i.id]||null}get(i){return this.instances[i]||this.builtInInstances[i]||null}getDeleted(i){return this.deletedInstances[i]||null}getManaged(i){return this.getBuiltIn(i)?null:this.instances[i]||null}getBuiltIn(i){return this.builtInInstances[i]||null}findSubscribedInstanceFromReference(i){return this.instances[i.entityId]||null}findSubscribedBuiltInInstanceFromReference(i){return this.builtInInstances[i.entityId]||null}metaSync(i,n=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.description=s.description!==void 0?s.description:e.description,this.x=s.x||e.x,this.y=s.y||e.y,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await _t.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await _t.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await _t.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await _t.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await _t.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await _t.repository.APILoadVersion(this.id,n,...s)}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){return{added:[],updated:[],removed:[],affected:[],self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){return{added:[],updated:[],removed:[],affected:[],self:this}}getAllBuiltInIds(){const i=new Set;return[...this.primitives.flatMap(n=>n.toFlatIds(i)),...this.builtInBaseEntities.flatMap(n=>n.toFlatIds(i)),...this.operationDeclarations.flatMap(n=>n.toFlatIds(i)),...this.globalEventActionDescriptors.flatMap(n=>n.toFlatIds(i)),...this.loopDeclarations.flatMap(n=>n.toFlatIds(i)),...this.conditionDeclarations.flatMap(n=>n.toFlatIds(i)),...this.valueDescriptors.flatMap(n=>n.toFlatIds(i)),...this.dataTypes.flatMap(n=>n.toFlatIds(i))]}getAllBuiltIn(){const i=new Set;return[...this.primitives.flatMap(n=>n.toFlat(i)),...this.builtInBaseEntities.flatMap(n=>n.toFlat(i)),...this.operationDeclarations.flatMap(n=>n.toFlat(i)),...this.globalEventActionDescriptors.flatMap(n=>n.toFlat(i)),...this.loopDeclarations.flatMap(n=>n.toFlat(i)),...this.conditionDeclarations.flatMap(n=>n.toFlat(i)),...this.valueDescriptors.flatMap(n=>n.toFlat(i)),...this.dataTypes.flatMap(n=>n.toFlat(i))]}toFlat(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this,...this.entities.flatMap(s=>s.toFlat(i)),...this.functions.flatMap(s=>s.toFlat(i)),...this.events.flatMap(s=>s.toFlat(i)),...this.projects.flatMap(s=>s.toFlat(i)),...this.variableDeclarations.flatMap(s=>s.toFlat(i)),...this.variableInstances.flatMap(s=>s.toFlat(i)),...this.conditions.flatMap(s=>s.toFlat(i)),...this.operations.flatMap(s=>s.toFlat(i)),...this.functionCalls.flatMap(s=>s.toFlat(i)),...this.loops.flatMap(s=>s.toFlat(i)),...this.searches.flatMap(s=>s.toFlat(i))])}toFlatIds(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.entities.flatMap(s=>s.toFlatIds(i)),...this.functions.flatMap(s=>s.toFlatIds(i)),...this.events.flatMap(s=>s.toFlatIds(i)),...this.projects.flatMap(s=>s.toFlatIds(i)),...this.variableDeclarations.flatMap(s=>s.toFlatIds(i)),...this.variableInstances.flatMap(s=>s.toFlatIds(i)),...this.conditions.flatMap(s=>s.toFlatIds(i)),...this.operations.flatMap(s=>s.toFlatIds(i)),...this.functionCalls.flatMap(s=>s.toFlatIds(i)),...this.loops.flatMap(s=>s.toFlatIds(i)),...this.searches.flatMap(s=>s.toFlatIds(i))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name}}toJSON(i=new Set){return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,description:this.description,entities:this.entities.map(n=>n.toJSON(i)),variableDeclarations:this.variableDeclarations.map(n=>n.toJSON(i)),variableInstances:this.variableInstances.map(n=>n.toJSON(i)),conditions:this.conditions.map(n=>n.toJSON(i)),operations:this.operations.map(n=>n.toJSON(i)),loops:this.loops.map(n=>n.toJSON(i)),searches:this.searches.map(n=>n.toJSON(i)),functions:this.functions.map(n=>n.toJSON(i)),events:this.events.map(n=>n.toJSON(i)),projects:this.projects.map(n=>n.toJSON(i)),functionCalls:this.functionCalls.map(n=>n.toJSON(i))})}toJSONClone(i={uuidStrategy:"uuid"}){const n=new Map,s=new Set,c=this.getAllBuiltInIds();return Object.keys(this.instances).forEach(e=>{if(c.includes(e)){n.set(e,e);return}n.set(e,_t.UUID.uuid())}),s.add(this.id),{id:n.get(this.id),version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,description:this.description,entities:this.entities.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),projects:this.projects.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),variableDeclarations:this.variableDeclarations.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),variableInstances:this.variableInstances.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),conditions:this.conditions.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),operations:this.operations.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),functions:this.functions.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),events:this.events.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),functionCalls:this.functionCalls.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),loops:this.loops.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),searches:this.searches.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null}))}}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+_t.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,description:this.description,entities:this.entities.map(c=>c.toReference(i)),functions:this.functions.map(c=>c.toReference(i)),events:this.events.map(c=>c.toReference(i)),projects:this.projects.map(c=>c.toReference(i)),variableDeclarations:this.variableDeclarations.map(c=>c.toReference(i)),variableInstances:this.variableInstances.map(c=>c.toReference(i)),conditions:this.conditions.map(c=>c.toReference(i)),operations:this.operations.map(c=>c.toReference(i)),functionCalls:this.functionCalls.map(c=>c.toReference(i)),loops:this.loops.map(c=>c.toReference(i)),searches:this.searches.map(c=>c.toReference(i))}}toFlatJSON(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.entities.flatMap(s=>s.toFlatJSON(i)),...this.functions.flatMap(s=>s.toFlatJSON(i)),...this.events.flatMap(s=>s.toFlatJSON(i)),...this.projects.flatMap(s=>s.toFlatJSON(i)),...this.variableDeclarations.flatMap(s=>s.toFlatJSON(i)),...this.variableInstances.flatMap(s=>s.toFlatJSON(i)),...this.conditions.flatMap(s=>s.toFlatJSON(i)),...this.operations.flatMap(s=>s.toFlatJSON(i)),...this.functionCalls.flatMap(s=>s.toFlatJSON(i)),...this.loops.flatMap(s=>s.toFlatJSON(i)),...this.searches.flatMap(s=>s.toFlatJSON(i))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[...this.entities.flatMap(s=>s.toFlatGenerationTarget(i)),...this.functions.flatMap(s=>s.toFlatGenerationTarget(i)),...this.events.flatMap(s=>s.toFlatGenerationTarget(i)),...this.projects.flatMap(s=>s.toFlatGenerationTarget(i)),...this.variableDeclarations.flatMap(s=>s.toFlatGenerationTarget(i)),...this.variableInstances.flatMap(s=>s.toFlatGenerationTarget(i)),...this.conditions.flatMap(s=>s.toFlatGenerationTarget(i)),...this.operations.flatMap(s=>s.toFlatGenerationTarget(i)),...this.functionCalls.flatMap(s=>s.toFlatGenerationTarget(i)),...this.loops.flatMap(s=>s.toFlatGenerationTarget(i)),...this.searches.flatMap(s=>s.toFlatGenerationTarget(i))])}clearErrors(){return this.errors=[],this.entities.forEach(i=>i.clearErrors()),this.projects.forEach(i=>i.clearErrors()),this.functions.forEach(i=>i.clearErrors()),this.events.forEach(i=>i.clearErrors()),this.variableDeclarations.forEach(i=>i.clearErrors()),this.variableInstances.forEach(i=>i.clearErrors()),this.conditions.forEach(i=>i.clearErrors()),this.operations.forEach(i=>i.clearErrors()),this.functionCalls.forEach(i=>i.clearErrors()),this.loops.forEach(i=>i.clearErrors()),this.searches.forEach(i=>i.clearErrors()),this}validate(){return this.validateChildren(),sv([...this.errors]),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return await this.validateChildrenAsync({tracker:n}),await B_e([...this.errors]),{success:!0}}validateChildren(){this.entities.forEach(i=>i.validate()),this.projects.forEach(i=>i.validate()),this.functions.forEach(i=>i.validate()),this.events.forEach(i=>i.validate()),this.variableDeclarations.forEach(i=>i.validate()),this.variableInstances.forEach(i=>i.validate()),this.conditions.forEach(i=>i.validate()),this.operations.forEach(i=>i.validate()),this.functionCalls.forEach(i=>i.validate()),this.loops.forEach(i=>i.validate()),this.searches.forEach(i=>i.validate())}async validateChildrenAsync(i={}){const n=J.YieldTracker.from(i);for(let s=0;s<this.entities.length;s++)await this.entities[s].validateAsync({tracker:n});for(let s=0;s<this.projects.length;s++)await this.projects[s].validateAsync({tracker:n});for(let s=0;s<this.functions.length;s++)await this.functions[s].validateAsync({tracker:n});for(let s=0;s<this.events.length;s++)await this.events[s].validateAsync({tracker:n});for(let s=0;s<this.variableDeclarations.length;s++)await this.variableDeclarations[s].validateAsync({tracker:n});for(let s=0;s<this.variableInstances.length;s++)await this.variableInstances[s].validateAsync({tracker:n});for(let s=0;s<this.conditions.length;s++)await this.conditions[s].validateAsync({tracker:n});for(let s=0;s<this.operations.length;s++)await this.operations[s].validateAsync({tracker:n});for(let s=0;s<this.functionCalls.length;s++)await this.functionCalls[s].validateAsync({tracker:n});for(let s=0;s<this.loops.length;s++)await this.loops[s].validateAsync({tracker:n});for(let s=0;s<this.searches.length;s++)await this.searches[s].validateAsync({tracker:n})}getErrors(){return[...this.errors,...this.entities.flatMap(n=>n.getErrors()),...this.projects.flatMap(n=>n.getErrors()),...this.functions.flatMap(n=>n.getErrors()),...this.events.flatMap(n=>n.getErrors()),...this.variableDeclarations.flatMap(n=>n.getErrors()),...this.variableInstances.flatMap(n=>n.getErrors()),...this.conditions.flatMap(n=>n.getErrors()),...this.operations.flatMap(n=>n.getErrors()),...this.functionCalls.flatMap(n=>n.getErrors()),...this.loops.flatMap(n=>n.getErrors()),...this.searches.flatMap(n=>n.getErrors())]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(let c=0;c<this.entities.length;c++){const e=await this.entities[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.projects.length;c++){const e=await this.projects[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.functions.length;c++){const e=await this.functions[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.events.length;c++){const e=await this.events[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.variableDeclarations.length;c++){const e=await this.variableDeclarations[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.variableInstances.length;c++){const e=await this.variableInstances[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.conditions.length;c++){const e=await this.conditions[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.operations.length;c++){const e=await this.operations[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.functionCalls.length;c++){const e=await this.functionCalls[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.loops.length;c++){const e=await this.loops[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.searches.length;c++){const e=await this.searches[c].getErrorsAsync({tracker:n});s.push(...e)}return s}getShallowErrors(){return this.errors}clone(){return this}getDefinitionEntity(i){return this.entities.find(n=>n.id===i)||null}addDefinitionEntity(i){return this.entities.includes(i)||this.entities.push(i),i}addFunctionDeclaration(i){return this.functions.includes(i)||this.functions.push(i),i}addFunctionCall(i){return this.functionCalls.includes(i)||this.functionCalls.push(i),i}addVariableDeclaration(i){return this.variableDeclarations.includes(i)||this.variableDeclarations.push(i),i}addVariableInstance(i){return this.variableInstances.includes(i)||this.variableInstances.push(i),i}addInstalledProject(i){return this.projects.includes(i)||this.projects.push(i),this}addGlobalEvent(i){return this.events.includes(i)||this.events.push(i),this}addCondition(i){return this.conditions.includes(i)||this.conditions.push(i),this}addOperation(i){return this.operations.includes(i)||this.operations.push(i),this}addLoop(i){return this.loops.includes(i)||this.loops.push(i),this}addSearch(i){return this.searches.includes(i)||this.searches.push(i),this}removeDefinitionEntity(i){const n=this.entities.findIndex(s=>s.id===i.id);if(n>-1){const s=this.entities[n];return this.entities.splice(n,1),s}return null}removeCondition(i){const n=this.conditions.findIndex(s=>s.id===i.id);if(n>-1){const s=this.conditions[n];return this.conditions.splice(n,1),s}return null}removeOperation(i){const n=this.operations.findIndex(s=>s.id===i.id);if(n>-1){const s=this.operations[n];return this.operations.splice(n,1),s}return null}removeLoop(i){const n=this.loops.findIndex(s=>s.id===i.id);if(n>-1){const s=this.loops[n];return this.loops.splice(n,1),s}return null}removeSearch(i){const n=this.searches.findIndex(s=>s.id===i.id);if(n>-1){const s=this.searches[n];return this.searches.splice(n,1),s}return null}removeFunctionCall(i){const n=this.functionCalls.findIndex(s=>s.id===i.id);if(n>-1){const s=this.functionCalls[n];return this.functionCalls.splice(n,1),s}return null}removeVariableInstance(i){const n=this.variableInstances.findIndex(s=>s.id===i.id);if(n>-1){const s=this.variableInstances[n];return this.variableInstances.splice(n,1),s}return null}removeVariableDeclaration(i){const n=this.variableDeclarations.findIndex(s=>s.id===i.id);if(n>-1){const s=this.variableDeclarations[n];return this.variableDeclarations.splice(n,1),s}return null}removeFunctionDeclaration(i){const n=this.functions.findIndex(s=>s.id===i.id);if(n>-1){const s=this.functions[n];return this.functions.splice(n,1),s}return null}removeInstalledProject(i){const n=this.projects.findIndex(s=>s.id===i.id);if(n>-1){const s=this.projects[n];return this.projects.splice(n,1),s}return null}removeGlobalEvent(i){const n=this.events.findIndex(s=>s.id===i.id);if(n>-1){const s=this.events[n];return this.events.splice(n,1),s}return null}removeTopLevelVariableDeclaration(i){if(i.type!==o.VariableDeclaration)return null;const n=this.variableDeclarations.findIndex(s=>s.id===i.id);if(n>-1){const s=this.variableDeclarations[n];return this.variableDeclarations.splice(n,1),s}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(n=>n.methods)]}getTerminationStatements(){return[...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.ReturnStatement||e.type===o.ContinueStatement||e.type===o.BreakStatement)]},[])]}getFunctionDeclaration(i){return this.functions.find(n=>n.id===i)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.functionCalls.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.conditions.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.operations.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.loops.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.searches.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[])]}getVariableInstances(){return[...this.variableInstances,...this.entities.reduce((n,s)=>[...n,...s.methods.flatMap(c=>{const y=Dt(c).filter(m=>m.type===o.VariableInstance);return[...n,...y]})],[]),...this.getEntryPoints().reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.functionCalls.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.conditions.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.operations.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.loops.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.searches.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[])]}getVariableDeclarations(){return D([...this.variableDeclarations,...this.entities.reduce((n,s)=>[...n,...s.methods.flatMap(c=>{const y=Dt(c).filter(m=>m.type===o.VariableDeclaration);return[...n,...y]})],[]),...this.getEntryPoints().reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.functionCalls.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.conditions.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.operations.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.loops.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.searches.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[])])}getLoops(){return[...this.loops,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[])]}getSearches(){return[...this.searches,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[])]}attachOrphanReferences(){const i=this.getVariableInstances(),n=this.getVariableDeclarations();return i.forEach(s=>{if(!s.declaration){const c=s.initialData,e=c.declaration.entityId||c.declaration.id,y=n.find(m=>m.id===e);y&&s.setDeclaration(y)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(i=>i.name===Re.PERSISTED_ENTITY)||null}requestActiveDynamicValue(i,n=!1){var c,e;const s=(e=(c=this.parentContext).requestActiveDynamicValue)==null?void 0:e.call(c,i,n);if(!s&&_A.includes(i.type)){const y=i.getDefaultValue();return y?{value:y,type:Le.DefaultValue,inheritanceLink:null,valueOwner:i}:null}return s||null}requestExtension(i){if(this.parentContext.requestExtension){const n=this.parentContext.requestExtension(i);if(n&&!n.module)throw new Error(`Module ${i} is not registered properly.`);return n.module||null}return null}undo(){J.Logger.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex-1,J.Logger.log("To: ",this.undoableStackValueIndex);const i=this.history[this.undoableStackValueIndex+1],n=this.history[this.undoableStackValueIndex];return J.Logger.log("Current change set: ",i==null?void 0:i.toJSON()),J.Logger.log("Change set to restore: ",n==null?void 0:n.toJSON()),NO(i||"initial",n||"initial",this)}redo(){J.Logger.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex+1,J.Logger.log("To: ",this.undoableStackValueIndex);const i=this.history[this.undoableStackValueIndex-1],n=this.history[this.undoableStackValueIndex];return J.Logger.log("Current change set: ",i==null?void 0:i.toJSON()),J.Logger.log("Change set to restore: ",n.toJSON()),NO(i||"initial",n||"initial",this)}applyExternalChangeSet(i){const n=i.payload,s=this.addChangeSet(new q(this,i.userAuthor,i.emittedAt,this));s.ignoreNonEditable=!0,s.ignoreNonDeletable=!0;const c=n.updated[this.id];if(!c)throw new Error("Project root not found in change set transfer. Cannot apply changes.");const e={...n.added,...n.updated,...n.removed},y=[...Object.keys(n.added),...Object.keys(n.updated),...Object.keys(n.removed)];y.forEach(v=>{var E;if(!e[v]){J.Logger.warn(`Entity '${v}' not found in change set transfer. Cannot apply changes.`);const b=(E=this.get(v))==null?void 0:E.toShallowJSON();throw b?J.Logger.warn("Entity in project: ",b):J.Logger.warn("Entity not in project"),new Error(`Entity '${v}' not found in change set transfer. Cannot apply changes.`)}});const m=new Yn(c,{allBuiltInEntityIds:this.diggestedBuiltInBaseEntitiesIds});return m.flatRecord=e,m.order=y,m.orderEntities(),J.Logger.log("All entities: ",m.order.map((v,E)=>`${E+1}: ${e[v].type} - ${v}`).join(`,
395
+ Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`}))}return{errors:c,modifiedData:s}}get interactive(){return this.implements.length?this.implements.every(i=>i.interactive):!0}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.type)===o.DefinitionEntity?this.extends.allMethods:[],n=[...i].filter(c=>!i.some(e=>{var y,m;return e.id!==c.id&&(((y=e.implements)==null?void 0:y.id)===c.id||((m=e.extends)==null?void 0:m.id)===c.id)}));return D([...n,...this.implements.flatMap(c=>{const e=c.type===o.DefinitionEntity?[...c.allMethods]:[];return[...e].filter(m=>!e.some(v=>{var E,b;return v.id!==m.id&&(((E=v.implements)==null?void 0:E.id)===m.id||((b=v.extends)==null?void 0:b.id)===m.id)}))})])}get allBasePropertiesFromOriginalParents(){var c;const i=((c=this.extends)==null?void 0:c.allProperties)||[],n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D([...n,...this.implements.flatMap(e=>{const y=[...e.allProperties];return[...y].filter(v=>!y.some(E=>{var b;return E.id!==v.id&&(!!E.implements.find(w=>w.id===v.id)||((b=E.extends)==null?void 0:b.id)===v.id)}))})])}get allBasePropertiesFromExtendedAndImplementedEntities(){var c,e;const i=[...((c=this.extends)==null?void 0:c.ownDeclaredProperties)||[],...((e=this.extends)==null?void 0:e.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(y=>!y.abstract),n=[...i].filter(y=>!i.some(m=>{var v;return m.id!==y.id&&(!!m.implements.find(E=>E.id===y.id)||((v=m.extends)==null?void 0:v.id)===y.id)})),s=this.implements.reduce((y,m)=>{const v=m.implementedPropertiesFromOriginalParents,E=[...m.ownDeclaredProperties].filter(P=>!P.abstract),b=[...v,...E,...y];return[...b].filter(P=>!!!b.find(L=>{var U;return!!L.implements.find(K=>K.id===P.id)||((U=L.extends)==null?void 0:U.id)===P.id}))},[]);return D([...n,...s])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>n.type!==o.DefinitionEntity?[]:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==o.ActionDescriptor),...i],[]),...this.implements.reduce((i,n)=>n.type!==o.DefinitionEntity?n.abstractMethods:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==o.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||!!E.implements.find(w=>w.id===m.id)}))},[]),...this.implements.reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return!!E.implements.find(w=>w.id===m.id)||((b=E.extends)==null?void 0:b.id)===m.id}))},[])].filter(i=>!!i.abstract))}get extendedMethodsFromOriginalParents(){return D((this.extends?[this.extends]:[]).reduce((i,n)=>{if(n.type!==o.DefinitionEntity)return[];const s=[...n.ownDeclaredMethods,...n.extendedMethodsFromOriginalParents].filter(c=>c.type!==o.ActionDescriptor);return[...i,...s]},[]))}get implementedMethodsFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.type===o.DefinitionEntity?n.methods:[],c=[...n.abstractMethods].filter(e=>!s.find(y=>y.name===e.name));return[...s,...c,...i]},[]),...this.implements.reduce((i,n)=>[...n.abstractMethods,...i],[])].filter(i=>i.type===o.ActionDescriptor))}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(n=>!n.isExtendedProperty)}get extendedMethods(){return this.methods.filter(i=>i.isExtendedMethod)}get ownDeclaredMethods(){return this.methods.filter(i=>!i.isExtendedMethod)}validateGeneratedUpdate(i){const n=[];return i.parent&&n.push(new De({id:`${this.id}--${ne.InvalidParentUpdate}`,code:ne.InvalidParentUpdate,severity:pe.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an '${this.type}', must be the root project as it is a globally declared entity.`})),{errors:n,modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return n==="implements"&&(this.removeImplementation(i,s),c.push(this)),n==="extends"&&(this.setExtension(null,s),c.push(this)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return n==="implements"&&(this.addImplementation(i,s),c.push(this)),n==="extends"&&(this.setExtension(i,s),c.push(this)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){return this.implements.forEach(i=>{Hn.includes(i.type)||i.unsubscribeDependents([{entity:this,field:"implements"}])}),this.extends&&(Hn.includes(this.extends.type)||this.extends.unsubscribeDependents([{entity:this,field:"extends"}])),this}subscribeToDependencies(){return this.implements.forEach(i=>{Hn.includes(i.type)||i.subscribeDependents([{entity:this,field:"implements"}])}),this.extends&&(Hn.includes(this.extends.type)||this.extends.subscribeDependents([{entity:this,field:"extends"}])),this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new bi(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.properties=[...this.properties],i.methods=[...this.methods],i.abstractMethods=[...this.abstractMethods],i.extends=this.extends,i.implements=[...this.implements],i.allPropertiesImplement=this.allPropertiesImplement,i.additionalPropertiesDataType=this.additionalPropertiesDataType,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];if(this.parent){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new bi(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.properties=[...y.properties],this.methods=[...y.methods],this.abstractMethods=[...y.abstractMethods],this.extends=y.extends,this.implements=[...y.implements],this.allPropertiesImplement=y.allPropertiesImplement,this.additionalPropertiesDataType=y.additionalPropertiesDataType,this.parent=y.parent,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.unsubscribeFromDependencies(),i.parent){const y=re(i.parent),m=this.project.get(y),v=this.parent;if(v&&v.id!==(m==null?void 0:m.id)&&this.removeFromParent(n),m)this.setParent(m,n),this.addSelfToProject(n);else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${y}' that isn't found in the project`)}else throw n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.extends){const y=re(i.extends),m=this.project.get(y);m&&this.setExtension(m,n)}else this.setExtension(null,n);if(i.implements.forEach(y=>{const m=re(y),v=this.project.get(m);if(v)this.addImplementation(v,n);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${m}" which is missing in the project`)}),this.implements.filter(y=>{const m=re(y);return!i.implements.find(v=>re(v)===m)}).forEach(y=>{this.removeImplementation(y,n)}),i.methods.forEach(y=>{const m=re(y),v=this.project.get(m);v&&this.addMethod(v,n)}),this.methods.filter(y=>{const m=re(y);return!i.methods.find(v=>re(v)===m)}).forEach(y=>{this.removeMethod(y,n)}),i.properties.forEach(y=>{const m=re(y),v=this.project.get(m);v&&this.addProperty(v,n)}),this.properties.filter(y=>{const m=re(y);return!i.properties.find(v=>re(v)===m)}).forEach(y=>{this.removeProperty(y,n)}),i.allPropertiesImplement){const y=re(i.allPropertiesImplement),m=this.project.get(y);m&&this.setAllPropertiesImplement(m,n)}else this.setAllPropertiesImplement(null,n);if(i.additionalPropertiesDataType){const y=re(i.additionalPropertiesDataType),m=this.project.get(y);m&&this.setAdditionalPropertiesDataType(m,n)}else this.setAdditionalPropertiesDataType(null,n);return this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],c=[];if(this.initialData.parent){const e=re(this.initialData.parent),y=this.project.get(e);if(y)this.setParent(y,null),i.push(y);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.extends){const e=re(this.initialData.extends),y=this.project.get(e);y&&(this.setExtension(y,null),y.type!==o.BuiltInBaseEntity&&i.push(y))}return this.initialData.implements.forEach(e=>{const y=re(e),m=this.project.get(y);if(m)this.addImplementation(m,null),m.type!==o.BuiltInBaseEntity&&i.push(m);else throw new Error(`${Fr(this.type)} with id '${this.id}' has a 'implements' reference "${y}" which is missing in the project`)}),{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AfterAllChildrenInitialized))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];this.initialized=!0;const{updated:y,added:m,removed:v,affected:E}=this.syncImplementationProperties(i);n.push(...y),s.push(...m),c.push(...v),e.push(...E);const{updated:b,added:w,removed:P,affected:$}=this.addExtendedProperties(i);n.push(...b),s.push(...w),c.push(...P),e.push(...$);const{updated:L,added:U,removed:K}=this.removeUnrecognizedProperties(i);n.push(...L),s.push(...U),c.push(...K);const{updated:H,added:X,removed:se,affected:ee}=this.syncImplementationMethods(i);n.push(...H),s.push(...X),c.push(...se),e.push(...ee);const{updated:fe,added:de,removed:ce,affected:ve}=this.addExtendedMethods(i);n.push(...fe),s.push(...de),c.push(...ce),e.push(...ve);const{updated:ae,added:me,removed:_e}=this.removeUnrecognizedMethods(i);return n.push(...ae),s.push(...me),c.push(..._e),this.addSuggestions(),this.properties.sort((Ne,ke)=>Ne.index-ke.index),this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){const n=[this],s=[],c=[],e=[];if(this.parent.type===o.DataType){const y=this.parent;y.entity=this,n.push(y)}else this.project.addDefinitionEntity(this);return this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}setExtension(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetExtension))){var s;return this.checkCanEdit(this,n)?(((s=this.extends)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.extends=i,this.subscribeToDependencies(),n&&(n==null||n.add(this,Z.Updated))),n==null||n.attemptAutoclose(_.SetExtension,this.id),this):(J.Logger.warn(`[setExtension] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetExtension,this.id),this)}addImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)||(this.implements.push(i),this.subscribeToDependencies(),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this):(J.Logger.warn(`[addImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddImplementation,this.id),this)}removeImplementation(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveImplementation))){return this.checkCanEdit(this,n)?(this.implements.includes(i)&&(this.implements=this.implements.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this):(J.Logger.warn(`[removeImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveImplementation,this.id),this)}removeProperty(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveProperty))){return this.checkCanEdit(this,n)?(this.properties.includes(i)&&(this.properties=this.properties.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveProperty,this.id),this):(J.Logger.warn(`[removeProperty] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveProperty,this.id),this)}addMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddMethod))){return this.checkCanEdit(this,n)?(this.methods.includes(i)||(this.methods.push(i),this.suggestedMethods=this.suggestedMethods.filter(s=>s.name!==i.name),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddMethod,this.id),this):(J.Logger.warn(`[addMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddMethod,this.id),this)}removeMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveMethod))){return this.checkCanEdit(this,n)?(this.methods.includes(i)&&(this.methods=this.methods.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveMethod,this.id),this):(J.Logger.warn(`[removeMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveMethod,this.id),this)}addProperty(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddProperty))){return this.checkCanEdit(this,n)?(this.properties.includes(i)||(this.properties.push(i),this.suggestedProperties=this.suggestedProperties.filter(s=>s.name!==i.name),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddProperty,this.id),this):(J.Logger.warn(`[addProperty] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddProperty,this.id),this)}addSuggestedProperty(i){return this.suggestedProperties.includes(i)||this.suggestedProperties.push(i),this}addSuggestedMethod(i){return this.suggestedMethods.includes(i)||this.suggestedMethods.push(i),this}removeSuggestedProperty(i){return this.suggestedProperties=this.suggestedProperties.filter(n=>n.id!==i.id),this}removeSuggestedMethod(i){return this.suggestedMethods=this.suggestedMethods.filter(n=>n.id!==i.id),this}addAbstractMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddAbstractMethod))){return this.checkCanEdit(this,n)?(this.abstractMethods.includes(i)||(this.abstractMethods.push(i),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.AddAbstractMethod,this.id),this):(J.Logger.warn(`[addAbstractMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddAbstractMethod,this.id),this)}removeAbstractMethod(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveAbstractMethod))){return this.checkCanEdit(this,n)?(this.abstractMethods.includes(i)&&(this.abstractMethods=this.abstractMethods.filter(s=>s.id!==i.id),n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose(_.RemoveAbstractMethod,this.id),this):(J.Logger.warn(`[removeAbstractMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveAbstractMethod,this.id),this)}initChildren(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"init-children"))){if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.properties=this.initialData.properties.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(i),s}),this.methods=this.initialData.methods.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(i),s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(i),s}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project)),this.implements=this.initialData.implements.map(n=>ye(n,this.project)),this.initialData.allPropertiesImplement){const n=ye(this.initialData.allPropertiesImplement,this.project);n.setParent(this,null),n.initChildren(null),this.setAllPropertiesImplement(n,i)}if(this.initialData.additionalPropertiesDataType){const n=ye(this.initialData.additionalPropertiesDataType,this.project);n.setParent(this,null),n.initChildren(null),this.setAdditionalPropertiesDataType(n,i)}return this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}removeUnrecognizedProperties(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"remove-unrecognized-properties"))){const n=[],s=[],c=[],e=[];let y=[...this.properties];y=y.filter(b=>b.parent.id===this.id),y=y.filter(b=>!b.isExtendedProperty);const m=this.implementedPropertiesFromOriginalParents,v=this.getAllPropertiesImplements();return y.filter(b=>this.interactive&&!b.implements.length?!1:!b.implements.find(P=>!!m.find($=>$.id===P.id)||!!v.find($=>$.id===P.id))).forEach(b=>{const w=b.remove({ignoreUpstream:!1},i);c.push(...w.removed),n.push(...w.updated)}),i==null||i.attemptAutoclose("remove-unrecognized-properties",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}removeUnrecognizedMethods(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"remove-unrecognized-methods"))){const n=[],s=[],c=[],e=[];let y=[...this.methods];y=y.filter(v=>v.parent.id===this.id),y=y.filter(v=>!v.isExtendedMethod);const m=this.implementedMethodsFromOriginalParents;return y=y.filter(v=>this.interactive&&!v.implements?!1:!m.find(E=>{var b;return E.id===((b=v.implements)==null?void 0:b.id)})),y.forEach(v=>{const E=v.remove({ignoreUpstream:!1},i);c.push(...E.removed),n.push(...E.updated)}),i==null||i.attemptAutoclose("remove-unrecognized-methods",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}syncImplementationMethods(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-implementation-methods"))){const n=[],s=[],c=[],e=[],y=this.methods,m=this.implementedMethodsFromOriginalParents,v=[...this.allBaseMethodsFromExtendedAndImplementedEntities,...y];return m.filter(b=>!v.find(P=>{var $;return(($=P.implements)==null?void 0:$.id)===b.id})).forEach(b=>{if(this.methods.find(L=>{var U;return((U=L.implements)==null?void 0:U.id)===b.id}))return;const P=this.methods.find(L=>{var se,ee;if(L.name===b.name&&!L.implements)return!0;const U=Si(this,Re.CRON_JOB),K=Si(this,Re.HTTP_ENDPOINT),H=((se=L.implements)==null?void 0:se.id)===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id,X=((ee=L.implements)==null?void 0:ee.id)===Q["built-in-base-entity"].BUILT_IN_CRON_JOB_ENTITY.methods.handler.id;return!!(U&&!X&&!K&&H||K&&!H&&!U&&X)});if(P&&P.type===o.FunctionDeclaration){P.setImplements(b,i),P.metaSync({name:b.name},i),i==null||i.add(P,Z.Updated),i==null||i.add(this,Z.Updated);return}const $=b.implementAsFunctionDeclaration(i,this);s.push($),i==null||i.add($,Z.Added),this.addMethod($,i)}),this.methods.sort((b,w)=>b.index-w.index).forEach(b=>{b.afterAllChildrenInitialized(i)}),i==null||i.attemptAutoclose("sync-implementation-methods",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}syncImplementationProperties(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-implementation-properties"))){const n=[],s=[],c=[],e=[],y=this.properties,m=this.implementedPropertiesFromOriginalParents.filter(E=>!this.allBasePropertiesFromExtendedAndImplementedEntities.find(w=>!!w.implements.find(P=>P.id===E.id))),v=[...this.allBasePropertiesFromExtendedAndImplementedEntities,...y];return m.forEach(E=>{const b=v.find(L=>!!L.implements.find(U=>U.id===E.id));if(b){const{updated:L,added:U,removed:K,affected:H}=b.syncWithImplementation(i);n.push(...L),s.push(...U),c.push(...K),e.push(...H);return}if(this.properties.find(L=>!!L.implements.find(U=>U.id===E.id)))return;const P=this.properties.find(L=>L.name===E.name&&!!L.abstract&&!L.implements);if(P){P.addImplementation(E,i),P.metaSync({abstract:!1},i),P.afterAllChildrenInitialized(i);return}const $=E.implement(this,i,x.UUID.uuid());s.push($),i==null||i.add($,Z.Added)}),this.properties.find(E=>{var b;return E.id===((b=this.allPropertiesImplement)==null?void 0:b.id)})&&this.removeAllPropertiesImplement(i),i==null||i.attemptAutoclose("sync-implementation-properties",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addExtendedMethods(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-extended-methods"))){const n=[],s=[],c=[],e=[],y=this.methods,v=this.extendedMethodsFromOriginalParents.filter(b=>b.type===o.FunctionDeclaration),E=new Set(y.filter(b=>{var w;return!!((w=b.extends)!=null&&w.id)}).map(b=>b.extends.id));return v.forEach(b=>{if(E.has(b.id))return;E.add(b.id);const w=b.clone(i,this,x.UUID.uuid());w.setExtends(b,i),w.initChildren(i),s.push(w),i==null||i.add(w,Z.Added),this.addMethod(w,i)}),i==null||i.attemptAutoclose("add-extended-methods",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addExtendedProperties(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-extended-properties"))){const n=[],s=[],c=[],e=[],y=this.properties,m=this.extendedPropertiesFromOriginalParents,v=m.filter(b=>m.find(P=>!!P.implements.find($=>$.id===b.id))?!1:!b.abstract),E=new Set(y.filter(b=>{var w;return!!((w=b.extends)!=null&&w.id)}).map(b=>b.extends.id));return v.forEach(b=>{if(E.has(b.id))return;E.add(b.id);const w=b.clone(i,this,x.UUID.uuid());w.setExtends(b,i),w.initChildren(i),s.push(w),i==null||i.add(w,Z.Added),this.addProperty(w,i)}),[...this.properties].forEach(b=>{if(b.extends)return;if(v.find(P=>P.name===b.name&&P.implements.every($=>!!b.implements.find(L=>L.id===$.id)))){const P=b.remove({ignoreUpstream:!1},i);c.push(...P.removed),n.push(...P.updated)}}),this.properties.forEach(b=>{const w=b.afterAllChildrenInitialized(i);n.push(...w.updated),e.push(...w.affected),s.push(...w.added),c.push(...w.removed)}),i==null||i.attemptAutoclose("add-extended-properties",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSuggestions(){return this.implements.forEach(i=>{QUe(this,i).forEach(c=>{const e=c.toJSON();e.id=`_suggestion--parent--${this.id}--${c.id}`;const y=ye(e,this.project);y.suggestion=!0,y.setParent(this,null),y.initChildren(null),this.addSuggestedProperty(y)}),eKe(this,i).forEach(c=>{const e=`_suggestion--parent--${this.id}--${c.id}`,y=c.implementAsFunctionDeclaration(null,this,e),m=ye(y,this.project);if(m.suggestion=!0,m.setParent(this,null),m.initChildren(null),this.methods=this.methods.filter(v=>v.id!==e),m.inputs.forEach(v=>{v.suggestion=!0}),m.returnStatements.length){const v=m.returnStatements[0];v.suggestion=!0,v.outputs.forEach(E=>{E.suggestion=!0})}this.addSuggestedMethod(m)})}),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.codeName=s.codeName!==void 0?s.codeName:e.codeName,this.description=s.description!==void 0?s.description:e.description,this.x=s.x||e.x,this.y=s.y||e.y,this.static=s.static!==void 0?s.static:this.static,this.abstract=s.abstract!==void 0?s.abstract:this.abstract,this.additionalProperties=s.additionalProperties!==void 0?s.additionalProperties:e.additionalProperties,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await bi.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await bi.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await bi.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await bi.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await bi.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await bi.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveFromParent))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];if(this.parent.type===o.Project)this.parent.removeDefinitionEntity(this);else if(this.parent.type===o.DataType&&this.parent.entity&&this.parent.entity.id===this.id){const y=this.parent.setEntity(null,i);n.push(y)}return i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,n))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),n==null||n.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:ir.ActionOwnerEntityNonDeletable,rootAction:((m=n==null?void 0:n.self)==null?void 0:m.id)===this.id&&(n==null?void 0:n.autoCloseActionName)===_.RemoveEntity}),n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},n),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,n);s.push(...E),c.push(...b),e.push(...w)}),this.properties.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.methods.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.abstractMethods.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.suggestedProperties.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),this.suggestedMethods.forEach(v=>{const{updated:E,removed:b}=v.remove({ignoreUpstream:!0},n);s.push(...E),c.push(...b)}),!i){const v=this.removeFromParent(n);e.push(...v.added),s.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const n=[],s=[],c=[],e=[];return i!=null&&i.hasAdded(this.id)?(i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);s.push(...m),c.push(...v),n.push(...E)}),this.properties.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.methods.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.abstractMethods.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.suggestedProperties.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),this.suggestedMethods.forEach(y=>{const{updated:m}=y.restore({},i);s.push(...m)}),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),removed:D(c),affected:D(e),self:this})}toFlat(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this,...((s=this.extends)==null?void 0:s.toFlat(i))||[],...this.implements.flatMap(c=>c.toFlat(i)),...this.properties.flatMap(c=>c.toFlat(i)),...this.methods.flatMap(c=>c.toFlat(i)),...this.abstractMethods.flatMap(c=>c.toFlat(i)),...this.parent.toFlat(i)])}toFlatIds(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this.id,...((s=this.extends)==null?void 0:s.toFlatIds(i))||[],...this.implements.flatMap(c=>c.toFlatIds(i)),...this.properties.flatMap(c=>c.toFlatIds(i)),...this.methods.flatMap(c=>c.toFlatIds(i)),...this.abstractMethods.flatMap(c=>c.toFlatIds(i)),...this.parent.toFlatIds(i)])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,codeName:this.codeName,description:this.description,static:this.static,abstract:this.abstract,x:this.x,y:this.y,type:this.type,editable:this.editable,deletable:this.deletable,additionalProperties:this.additionalProperties,name:this.name}}toJSON(i=new Set){var n,s,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,additionalProperties:this.additionalProperties,allPropertiesImplement:((n=this.allPropertiesImplement)==null?void 0:n.toJSON(i))||null,additionalPropertiesDataType:((s=this.additionalPropertiesDataType)==null?void 0:s.toJSON(i))||null,properties:this.properties.map(e=>e.toJSON(i)),methods:this.methods.map(e=>e.toJSON(i)),abstractMethods:this.abstractMethods.map(e=>e.toJSON(i)),implements:this.implements.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null,parent:this.parent.toReference()})}toJSONClone(i=pt){var s,c,e,y,m,v,E,b,w,P;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,codeName:this.codeName,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,additionalProperties:this.additionalProperties,allPropertiesImplement:((v=this.allPropertiesImplement)==null?void 0:v.toJSONClone(i))||null,additionalPropertiesDataType:((E=this.additionalPropertiesDataType)==null?void 0:E.toJSONClone(i))||null,properties:this.properties.map($=>$.toJSONClone({...i,newId:null})),methods:this.methods.map($=>$.toJSONClone({...i,newId:null})),abstractMethods:this.abstractMethods.map($=>$.toJSONClone({...i,newId:null})),implements:this.implements.map($=>$.type===o.BuiltInBaseEntity?$.toJSON(i.seenEntities):$.toJSONClone({...i,newId:null})),extends:((b=this.extends)==null?void 0:b.type)===o.BuiltInBaseEntity?(w=this.extends)==null?void 0:w.toJSON(i.seenEntities):(P=this.extends)==null?void 0:P.toJSONClone({...i,newId:null}),parent:this.parent.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s,c,e,y;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,name:this.name,codeName:this.codeName,description:this.description,type:this.type,editable:this.editable,deletable:this.deletable,x:this.x,y:this.y,static:this.static,abstract:this.abstract,additionalProperties:this.additionalProperties,allPropertiesImplement:((c=this.allPropertiesImplement)==null?void 0:c.toReference(i))||null,additionalPropertiesDataType:((e=this.additionalPropertiesDataType)==null?void 0:e.toReference(i))||null,properties:this.properties.map(m=>m.toReference(i)),methods:this.methods.map(m=>m.toReference(i)),abstractMethods:this.abstractMethods.map(m=>m.toReference(i)),implements:this.implements.map(m=>m.toReference(i)),extends:((y=this.extends)==null?void 0:y.toReference(i))||null,parent:this.parent.toReference(i)}}toFlatJSON(i=new Set){var s,c,e;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(y=>y.toFlatJSON(i)),...this.methods.flatMap(y=>y.toFlatJSON(i)),...this.abstractMethods.flatMap(y=>y.toFlatJSON(i)),...this.implements.flatMap(y=>y.toFlatJSON(i)),...((s=this.extends)==null?void 0:s.toFlatJSON(i))||[],...this.parent.toFlatJSON(i),...((c=this.additionalPropertiesDataType)==null?void 0:c.toFlatJSON(i))||[],...((e=this.allPropertiesImplement)==null?void 0:e.toFlatJSON(i))||[]])}toGenerationTarget(){var n;const i=this.parent.type===o.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,static:this.static,abstract:this.abstract,extends:(n=this.extends)==null?void 0:n.id,additionalProperties:this.additionalProperties,implements:this.implements.map(s=>s.id),parent:i}}toFlatGenerationTarget(i=new Set){var s,c,e;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(y=>y.toFlatGenerationTarget(i)),...this.methods.flatMap(y=>y.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(y=>y.toFlatGenerationTarget(i)),...this.implements.filter(y=>y.type===o.DefinitionEntity).flatMap(y=>y.toFlatGenerationTarget(i)),...((s=this.extends)==null?void 0:s.toFlatGenerationTarget(i))||[],...this.parent.toFlatGenerationTarget(i),...((c=this.additionalPropertiesDataType)==null?void 0:c.toFlatGenerationTarget(i))||[],...((e=this.allPropertiesImplement)==null?void 0:e.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,n;return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(n=this.allPropertiesImplement)==null||n.clearErrors(),this}validate(){return this.errors=XUe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await YUe(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((n=this.additionalPropertiesDataType)==null?void 0:n.getErrors())||[],...((s=this.allPropertiesImplement)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties)s.push(...await c.getErrorsAsync({tracker:n}));for(const c of this.methods)s.push(...await c.getErrorsAsync({tracker:n}));for(const c of this.abstractMethods)s.push(...await c.getErrorsAsync({tracker:n}));return this.additionalPropertiesDataType&&s.push(...await this.additionalPropertiesDataType.getErrorsAsync({tracker:n})),this.allPropertiesImplement&&s.push(...await this.allPropertiesImplement.getErrorsAsync({tracker:n})),s}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){var U,K,H;const e=Pr(n,this),y=this.toJSON(),m=s||x.UUID.uuid(),v=n||this.parent;y.properties=[],y.methods=[],y.abstractMethods=[];const E=m.split("-id"),b=E[E.length-1||0]||m;y.id=m,y.version=x.UUID.uuid(),y.createdAt=(i==null?void 0:i.timestamp)||M().toISOString(),y.author=(i==null?void 0:i.author)||"1",y.previousVersion=null,y.deleted=!1,y.editable=!0,y.deletable=!0,y.parent=v.toReference();const w=Ui(y,e);w.hydrateAncestors(),w.setParent(v,i),c&&(w.subscribe(),w.addSelfToProject(i)),w.initChildren(i),i==null||i.add(w,Z.Added);const P=(U=this.properties)==null?void 0:U.map(X=>this.project.diggestedBuiltInBaseEntitiesIds.has(X.id)?e.getBuiltIn(X.id):X.clone(i,w,x.UUID.uuid(),c));w.properties=P;const $=(K=this.methods)==null?void 0:K.map((X,se)=>this.project.diggestedBuiltInBaseEntitiesIds.has(X.id)?e.getBuiltIn(X.id):X.clone(i,w,b+"-method-"+se+"-id",c));w.methods=$;const L=(H=this.abstractMethods)==null?void 0:H.map((X,se)=>this.project.diggestedBuiltInBaseEntitiesIds.has(X.id)?e.getBuiltIn(X.id):X.clone(i,w,b+"-abstract-method-"+se+"-id",c));if(w.abstractMethods=L,this.additionalPropertiesDataType)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.additionalPropertiesDataType.id))w.setAdditionalPropertiesDataType(this.project.getBuiltIn(this.additionalPropertiesDataType.id),i);else{const X=this.additionalPropertiesDataType.clone(i,w,x.UUID.uuid(),c);w.setAdditionalPropertiesDataType(X,i)}if(this.allPropertiesImplement)if(this.project.diggestedBuiltInBaseEntitiesIds.has(this.allPropertiesImplement.id))w.setAllPropertiesImplement(this.project.getBuiltIn(this.allPropertiesImplement.id),i);else{const X=this.allPropertiesImplement.clone(i,w,x.UUID.uuid(),c);w.setAllPropertiesImplement(X,i)}return i==null||i.attemptAutoclose(_.CloneEntity,this.id),w}getFunctionDeclaration(i){return this.methods.find(n=>n.id===i)}implement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"implement-definition-entity")),s){const c=x1(this,i,n,s);return n==null||n.attemptAutoclose("implement-definition-entity",this.id),c}getAllPropertiesImplements(){var n;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),i.push(...((n=this.extends)==null?void 0:n.getAllPropertiesImplements())||[],...this.implements.flatMap(s=>s.getAllPropertiesImplements())),i}getAllInteractiveMethods(){var e;const i=this.implements.filter(y=>y.type===o.DefinitionEntity||y.type===o.BuiltInBaseEntity&&y.interactive),n=((e=this.extends)==null?void 0:e.getAllInteractiveMethods())||[],s=i.flatMap(y=>y.getAllInteractiveMethods());return D([...this.methods,...n,...s])}inferFromInputs(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"infer-definition-entity-from-inputs"))){const s=[],c=[],e=[],y=[];if(this.parent.type!==o.DataType||!this.parent.inferred)return n==null||n.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const m=[];i.forEach(b=>{m.find(P=>le(P,this.project)===le(b,this.project))||m.push(b)});const v=this.properties.filter(b=>!b.dataType);m.forEach(b=>{var H,X,se;const w=v.find(ee=>le(ee,this.project)===le(b,this.project));if(!w)return;const $=Wn(b.parent).getMasterInputWithValueWritterFromAllInstances(b),L=Do($,n),U=L==null?void 0:L.clone(n,w,x.UUID.uuid(),!0);U&&((H=w.dataType)==null||H.merge(U,n),U.id!==((X=w.dataType)==null?void 0:X.id)&&U.remove({ignoreUpstream:!1},n),w.dataType&&(w.dataType.metaSync({inferred:!0,like:!0},n),w.setDataType(w.dataType,n),n==null||n.add(w,Z.Affected)));let K=null;if(b.declaration&&w.id!==((se=b.declaration)==null?void 0:se.id)&&(K=b.declaration),b.setDeclaration(w,n),n==null||n.add(b,Z.Updated),K){const{updated:ee,removed:fe}=K.remove({ignoreUpstream:!1},n);c.push(...ee),e.push(...fe)}});const E=[];return m.forEach(b=>{if(!b.declaration){E.push(b);return}}),E.length===0?(n==null||n.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(E.forEach(b=>{var se,ee,fe,de;const w=this.properties.find(ce=>le(ce,this.project)===le(b,this.project));if(w){if(b.setDeclaration(w,n),!w.getDataType(n)){const ve=Wn(b.parent).getMasterInputWithValueWritterFromAllInstances(b),ae=Do(ve),me=ae==null?void 0:ae.clone(n,w,x.UUID.uuid(),!0);me&&((se=w.dataType)==null||se.merge(me,n),me.id!==((ee=w.dataType)==null?void 0:ee.id)&&me.remove({ignoreUpstream:!1},n),w.dataType&&(w.dataType.metaSync({inferred:!0,like:!0},n),w.setDataType(w.dataType,n),n==null||n.add(w,Z.Affected)))}return}const P=le(b,this.project),$=b.codeName||k1(b,this.project)||Tc(Ji(P)),L=ka.new(n);L.parent=this.toReference(),L.index=b.index,L.name=P,L.codeName=$,L.description=b.description;const U=ye(L,this.project);U.hydrateAncestors(),n==null||n.add(U,Z.Added),U.setParent(this,n),U.initChildren(n);const H=Wn(b.parent).getMasterInputWithValueWritterFromAllInstances(b),X=Do(H);if(X)if(this.project.diggestedBuiltInBaseEntitiesIds.has(X.id))U.setDataType(X,n),n==null||n.add(U,Z.Affected);else{const ce=X==null?void 0:X.clone(n,U,x.UUID.uuid(),!0);ce&&((fe=U.dataType)==null||fe.merge(ce,n),ce.id!==((de=U.dataType)==null?void 0:de.id)&&ce.remove({ignoreUpstream:!1},n),U.dataType&&(U.dataType.metaSync({inferred:!0,like:!0},n),U.setDataType(U.dataType,n),n==null||n.add(U,Z.Affected)))}return this.addProperty(U,n),b.setDeclaration(U,n),n==null||n.add(b,Z.Updated),U}),n==null||n.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:D(s),updated:D(c),removed:D(e),affected:D(y),self:this})}getRawDefaultValue(){const i={};return this.properties.forEach(n=>{var c;if(!uC(n))return;const s=Ji(n.name);i[s]=((c=n.getDefaultValue())==null?void 0:c.value)||null}),i}getActiveRawDefaultValue(){const i={};return this.properties.forEach(n=>{var e;if(!uC(n))return;const s=Ji(n.name),c=(e=this.project.requestActiveDynamicValue(n,!0))==null?void 0:e.value;i[s]=(c==null?void 0:c.value)||null}),i}setAdditionalPropertiesDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetAdditionalPropertiesDataType))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setAdditionalPropertiesDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetAdditionalPropertiesDataType,this.id),this;const s=this.additionalPropertiesDataType;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.additionalPropertiesDataType=i,this.subscribeToDependencies(),n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose(_.SetAdditionalPropertiesDataType,this.id),this}removeAdditionalPropertiesDataType(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveAllPropertiesImplement))){return this.checkCanEdit(this,i)?(this.additionalPropertiesDataType&&(this.additionalPropertiesDataType.remove({ignoreUpstream:!0},i),i==null||i.add(this,Z.Affected),this.additionalPropertiesDataType=null),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this):(J.Logger.warn(`[removeAdditionalPropertiesDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this)}setAllPropertiesImplement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetAllPropertiesImplement))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[setAllPropertiesImplement] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetAllPropertiesImplement,this.id),this;const s=this.allPropertiesImplement;return(s==null?void 0:s.id)!==(i==null?void 0:i.id)&&(s==null||s.remove({ignoreUpstream:!0},n),this.allPropertiesImplement=i,this.subscribeToDependencies(),n==null||n.add(this,Z.Affected)),n==null||n.attemptAutoclose(_.SetAllPropertiesImplement,this.id),this}removeAllPropertiesImplement(i=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveAllPropertiesImplement))){return this.checkCanEdit(this,i)?(this.allPropertiesImplement&&(this.allPropertiesImplement.remove({ignoreUpstream:!0},i),i==null||i.add(this,Z.Affected),this.allPropertiesImplement=null),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this):(J.Logger.warn(`[removeAllPropertiesImplement] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveAllPropertiesImplement,this.id),this)}};I(bi,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(bi,"type",o.DefinitionEntity),I(bi,"USER_MANAGED_PARENT_TYPES",[o.Project,o.DataType]),I(bi,"PARENT_TYPES",[...bi.USER_MANAGED_PARENT_TYPES]),I(bi,"MUTABLE_BASE_PROPERTIES",["name","codeName","description","static","abstract","additionalProperties"]),I(bi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(bi,"BASE_PROPERTIES",[...bi.MUTABLE_BASE_PROPERTIES,...bi.INMUTABLE_BASE_PROPERTIES]),I(bi,"MUTABLE_META_PROPERTIES",[...bi.MUTABLE_BASE_PROPERTIES,"x","y"]),I(bi,"INMUTABLE_META_PROPERTIES",[...bi.INMUTABLE_BASE_PROPERTIES]),I(bi,"META_PROPERTIES",[...bi.MUTABLE_META_PROPERTIES,...bi.INMUTABLE_META_PROPERTIES]),I(bi,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),I(bi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(bi,"UPSTREAM_PROPERTIES",[...bi.MUTABLE_UPSTREAM_PROPERTIES,...bi.INMUTABLE_UPSTREAM_PROPERTIES]),I(bi,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods","allPropertiesImplement","additionalPropertiesDataType"]),I(bi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(bi,"DOWNSTREAM_PROPERTIES",[...bi.MUTABLE_DOWNSTREAM_PROPERTIES,...bi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(bi,"PROPERTIES",[...bi.META_PROPERTIES,...bi.UPSTREAM_PROPERTIES,...bi.DOWNSTREAM_PROPERTIES]);let us=bi;async function TUi(d,p={}){const i=J.YieldTracker.from(p),n=[],s=Lt(d.errors,n);return await i.tick(),s}function vUi(d){const p=[];return Lt(d.errors,p)}const xm=class xm extends YV{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"version");I(this,"name");I(this,"description",null);I(this,"type",o.BuiltInBaseEntity);I(this,"abstract",!1);I(this,"static");I(this,"additionalProperties",!1);I(this,"properties",[]);I(this,"allPropertiesImplement",null);I(this,"additionalPropertiesDataType",null);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"interactive",!1);I(this,"errors",[]);I(this,"project");if(this.initialData=this.initialData||i,this.project=this.project||n,this.id=this.id||i.id,this.version=this.version||i.version,this.name=this.name||i.name,this.static=this.static||i.static,this.interactive=this.interactive||i.interactive,this.abstract=i.abstract,this.additionalProperties=i.additionalProperties,this.properties=this.initialData.properties.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const s=ye(this.initialData.allPropertiesImplement,this.project);s.setParent(this,null),s.initChildren(null),this.allPropertiesImplement=s}if(this.initialData.additionalPropertiesDataType){const s=ye(this.initialData.additionalPropertiesDataType,this.project);s.setParent(this,null),s.initChildren(null),this.additionalPropertiesDataType=s}this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allMethods)||[],n=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(n)}get allBasePropertiesFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allProperties)||[],n=[...i].filter(c=>!i.some(e=>{var y;return e.id!==c.id&&(!!e.implements.find(m=>m.id===c.id)||((y=e.extends)==null?void 0:y.id)===c.id)}));return D(n)}get allBasePropertiesFromExtendedAndImplementedEntities(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D([...n])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>n.type===o.PrimitiveEntity?i:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==o.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||!!E.implements.find(w=>w.id===m.id)}))},[])].filter(i=>!!i.abstract))}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredMethods(){return[...this.methods,...this.abstractMethods]}get ownDeclaredProperties(){return this.properties.filter(i=>!i.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(i=Ge,...n){return await xm.repository.APILoad(this.id,...n),this}toFlat(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this,...this.properties.flatMap(c=>c.toFlat(i)),...this.methods.flatMap(c=>c.toFlat(i)),...this.abstractMethods.flatMap(c=>c.toFlat(i)),...((s=this.extends)==null?void 0:s.toFlat(i))||[]])}toFlatIds(i=new Set){var s;return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.properties.flatMap(c=>c.toFlatIds(i)),...this.methods.flatMap(c=>c.toFlatIds(i)),...this.abstractMethods.flatMap(c=>c.toFlatIds(i)),...((s=this.extends)==null?void 0:s.toFlatIds(i))||[]])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,interactive:this.interactive,additionalProperties:this.additionalProperties,abstract:this.abstract,static:this.static,type:this.type,name:this.name}}toJSON(i=new Set){var n,s,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,additionalProperties:this.additionalProperties,interactive:this.interactive,additionalPropertiesDataType:((n=this.additionalPropertiesDataType)==null?void 0:n.toJSON(i))||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.toJSON(i))||null,properties:this.properties.map(e=>e.toJSON(i)),methods:this.methods.map(e=>e.toJSON(i)),abstractMethods:this.abstractMethods.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null})}toReference(i=pt){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var n,s,c;return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,additionalProperties:this.additionalProperties,additionalPropertiesDataType:((n=this.additionalPropertiesDataType)==null?void 0:n.toReference())||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.toReference())||null,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:((c=this.extends)==null?void 0:c.toReference())||null}}toFlatJSON(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(e=>e.toFlatJSON(i)),...this.methods.flatMap(e=>e.toFlatJSON(i)),...this.abstractMethods.flatMap(e=>e.toFlatJSON(i)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatJSON(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatJSON(i))||[]])}toGenerationTarget(){var i;return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,additionalProperties:this.additionalProperties,extends:(i=this.extends)==null?void 0:i.id}}toFlatGenerationTarget(i=new Set){var s,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(e=>e.toFlatGenerationTarget(i)),...this.methods.flatMap(e=>e.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(e=>e.toFlatGenerationTarget(i)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatGenerationTarget(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,n;return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(n=this.allPropertiesImplement)==null||n.clearErrors(),this}validate(){return this.errors=vUi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await TUi(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((n=this.additionalPropertiesDataType)==null?void 0:n.getErrors())||[],...((s=this.allPropertiesImplement)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}if(this.additionalPropertiesDataType){const c=await this.additionalPropertiesDataType.getErrorsAsync({tracker:n});s.push(...c)}if(this.allPropertiesImplement){const c=await this.allPropertiesImplement.getErrorsAsync({tracker:n});s.push(...c)}return s}getShallowErrors(){return this.errors}implement(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),null,!0,"implement-built-in-base-entity")),s){const c=x1(this,i,n,s);return n==null||n.attemptAutoclose("implement-built-in-base-entity",this.id),c}getAllPropertiesImplements(){var n;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),((n=this.extends)==null?void 0:n.type)===o.BuiltInBaseEntity&&i.push(...this.extends.getAllPropertiesImplements()||[]),i}getAllInteractiveMethods(){const i=[];if(this.interactive){if(i.push(...this.methods,...this.abstractMethods),!this.extends||this.extends.type===o.BuiltInBaseEntity&&this.extends.interactive||this.extends.type===o.PrimitiveEntity)return i;this.extends instanceof xm&&i.push(...this.extends.getAllInteractiveMethods())}return D(i)}};I(xm,"repository",{APILoad:async(i,...n)=>null});let Po=xm;async function EUi(d,p={}){const i=J.YieldTracker.from(p),n=[],s=Lt(d.errors,n);return await i.tick(),s}function bUi(d){const p=[];return Lt(d.errors,p)}const OA=class OA extends YV{constructor(i,n){super(i);I(this,"initialData");I(this,"id");I(this,"name");I(this,"description",null);I(this,"type",o.PrimitiveEntity);I(this,"static");I(this,"abstract");I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=i,this.project=n,this.id=i.id,this.name=i.name,this.static=i.static,this.abstract=i.abstract,this.properties=this.initialData.properties.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=ye(s,this.project);return c.parent=this,c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=ye(s,this.project);return c.parent=this,c}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allMethods)||[],n=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(n)}get allBasePropertiesFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allProperties)||[],n=[...i].filter(c=>!i.some(e=>{var y;return e.id!==c.id&&(e.implements.find(m=>m.id===c.id)||((y=e.extends)==null?void 0:y.id)===c.id)}));return D(n)}get allBasePropertiesFromExtendedAndImplementedEntities(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||E.implements.find(w=>w.id===m.id)}))},[])])}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredMethods(){return[...this.methods]}get ownDeclaredProperties(){return this.properties.filter(i=>!i.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(i=Ge,...n){return await OA.repository.APILoad(this.id,...n),this}toFlat(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this,...this.properties.flatMap(s=>s.toFlat(i)),...this.methods.flatMap(s=>s.toFlat(i)),...this.abstractMethods.flatMap(s=>s.toFlat(i))])}toFlatIds(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.properties.flatMap(s=>s.toFlatIds(i)),...this.methods.flatMap(s=>s.toFlatIds(i)),...this.abstractMethods.flatMap(s=>s.toFlatIds(i))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,static:this.static,abstract:this.abstract,type:this.type,name:this.name}}toJSON(i=new Set){var n;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(s=>s.toJSON(i)),methods:this.methods.map(s=>s.toJSON(i)),abstractMethods:this.abstractMethods.map(s=>s.toJSON(i)),extends:((n=this.extends)==null?void 0:n.toJSON(i))||null})}toReference(i=pt){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:o.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var n;return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(s=>s.toReference()),methods:this.methods.map(s=>s.toReference()),abstractMethods:this.abstractMethods.map(s=>s.toReference()),extends:((n=this.extends)==null?void 0:n.toReference())||null}}toFlatJSON(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(s=>s.toFlatJSON(i)),...this.methods.flatMap(s=>s.toFlatJSON(i)),...this.abstractMethods.flatMap(s=>s.toFlatJSON(i))])}toGenerationTarget(){var i;return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:(i=this.extends)==null?void 0:i.id}}toFlatGenerationTarget(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(s=>s.toFlatGenerationTarget(i)),...this.methods.flatMap(s=>s.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(s=>s.toFlatGenerationTarget(i))])}clearErrors(){return this.errors=[],this.properties.forEach(i=>i.clearErrors()),this.methods.forEach(i=>i.clearErrors()),this.abstractMethods.forEach(i=>i.clearErrors()),this}validate(){return this.errors=bUi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await EUi(this,{tracker:n}),{success:!0}}getErrors(){return[...this.errors,...this.properties.flatMap(n=>n.getErrors()),...this.methods.flatMap(n=>n.getErrors()),...this.abstractMethods.flatMap(n=>n.getErrors())]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}return s}getShallowErrors(){return this.errors}getAllInteractiveMethods(){const i=[];return i.push(...this.methods),!this.extends||this.extends.type===o.BuiltInBaseEntity&&this.extends.interactive||this.extends.type===o.PrimitiveEntity?i:(this.extends instanceof Po&&i.push(...this.extends.getAllInteractiveMethods()),D(i))}};I(OA,"repository",{APILoad:async(i,...n)=>null});let ma=OA;function Ui(d,p){if(!d)throw new Error("Entity is null");const i=p.get(d.id);switch(d.type){case o.LiteralValue:return i||new Yr(d,p);case o.DefinitionEntity:return i||new us(d,p);case o.PrimitiveEntity:return i||new ma(d,p);case o.FunctionDeclaration:return i||new _o(d,p);case o.GlobalEvent:return i||new Ru(d,p);case o.DataType:return i||new tr(d,p);case o.Property:return i||new ka(d,p);case o.FunctionCall:return i||new Bu(d,p);case o.Condition:return i||new wu(d,p);case o.Operation:return i||new Iu(d,p);case o.VariableDeclaration:return i||new _u(d,p);case o.VariableInstance:return i||new Cu(d,p);case o.OutputMap:return i||new gl(d,p);case o.ArgumentDeclaration:return i||new Ea(d,p);case o.InputMap:return i||new ds(d,p);case o.Project:return i||new x(d);case o.InstalledProject:return i||new Vu(d,p);case o.ActionDescriptor:return i||new $i(d,p);case o.ReturnStatement:return i||new md(d,p);case o.Loop:return i||new Du(d,p);case o.Search:return i||new Pu(d,p);case o.ValueDescriptor:return i||new Td(d,p);case o.BuiltInBaseEntity:return i||new Po(d,p);case o.InternalCall:return i||new Nu(d,p);case o.ContinueStatement:return i||new $u(d,p);case o.BreakStatement:return i||new xu(d,p);case o.GenericReference:return p.get(d.entityId);default:throw new Error("Invalid entity type: "+d.type)}}function ye(d,p){if(!d)throw new Error("Entity is null");const i=Ui(d,p);return i.subscribe(),i}function AUi(d,p){if(!d)throw new Error("Entity is null");switch(d.type){case o.LiteralValue:return Yr.fromGenerationTarget(d,p);case o.DefinitionEntity:return us.fromGenerationTarget(d,p);case o.FunctionDeclaration:return _o.fromGenerationTarget(d,p);case o.GlobalEvent:return Ru.fromGenerationTarget(d,p);case o.DataType:return tr.fromGenerationTarget(d,p);case o.Property:return ka.fromGenerationTarget(d,p);case o.FunctionCall:return Bu.fromGenerationTarget(d,p);case o.Condition:return wu.fromGenerationTarget(d,p);case o.Operation:return Iu.fromGenerationTarget(d,p);case o.VariableDeclaration:return _u.fromGenerationTarget(d,p);case o.VariableInstance:return Cu.fromGenerationTarget(d,p);case o.OutputMap:return gl.fromGenerationTarget(d,p);case o.ArgumentDeclaration:return Ea.fromGenerationTarget(d,p);case o.InputMap:return ds.fromGenerationTarget(d,p);case o.InstalledProject:return Vu.fromGenerationTarget(d,p);case o.ReturnStatement:return md.fromGenerationTarget(d,p);case o.Loop:return Du.fromGenerationTarget(d,p);case o.Search:return Pu.fromGenerationTarget(d,p);case o.ActionDescriptor:return $i.fromGenerationTarget(d,p);case o.ValueDescriptor:return Td.fromGenerationTarget(d,p);case o.InternalCall:return Nu.fromGenerationTarget(d,p);case o.ContinueStatement:return $u.fromGenerationTarget(d,p);case o.BreakStatement:return xu.fromGenerationTarget(d,p);default:throw new Error("Invalid entity type: "+d.type)}}const pt={seenEntityMaps:new Map,seenEntities:new Set,timestamp:M().toISOString()};class aKe{constructor(){I(this,"initialData")}}const Ge={cascade:!1},sKe={APILoad:async(d,...p)=>null},gUi={APICreate:async(d,...p)=>d,APIUpdate:async(d,...p)=>d,APIDelete:async(d,...p)=>d,APIClone:async(d,...p)=>{},APILoadVersion:async(d,p,...i)=>null,...sKe};class IUi{}class lKe extends aKe{}class RUi extends lKe{}class DUi{}class wUi{}class OUi{}class Ux{}class CUi extends Ux{}class _Ui extends Ux{}class PUi{}class of{static initReadsValue(p){if(p.initialData.readsValue&&p.initialData.readsValue.type!==o.GenericReference)p.readsValue=ye(p.initialData.readsValue,p.project);else if(p.initialData.readsValue&&p.initialData.readsValue.type===o.GenericReference){const i=Sn(p.initialData.readsValue,p.project);i&&(p.readsValue=i)}if(p.readsValue){if(qt.includes(p.readsValue.type)){let i=p.parent;!dr.includes(i.type)&&i.type!==o.Project&&(i=i.parent);const n=p.type===o.InputMap&&p.parent.type===o.Loop;n&&(i=p.parent.parent),p.readsValue.setParent(i,null),p.readsValue.initChildren(null),i&&i.type!==o.Project&&!n&&i.detachedChildren.includes(p)?i.replaceDetachedChild(p,p.readsValue):i&&i.type!==o.Project&&!n&&i.subscribeDetachedChild(p.readsValue)}p.readsValue.addValueReader(p,null)}return p.readsValue}}class Bv{static initWritesValues(p,i){const n=p.initialData.writesValues.reduce((c,e)=>{if(e.type===o.GenericReference||p.writesValues.some(m=>m.id===e.id))return c;const y=ye(e,p.project);return y.setValueWriter(p,null),qt.includes(y.type)&&(y.setParent(i,null),y.initChildren(null)),[...c,y]},[]),s=[...p.writesValues];return p.writesValues=D([...s,...n]),p.writesValues}}class VUi{}var ii=(d=>(d.PROJECT_INITIALIZED="project-initialized",d.BEFORE_CHANGE_SET_CLOSE_BEFORE_SIDE_EFFECTS="before-change-set-close-before-side-effects",d.BEFORE_CHANGE_SET_CLOSE_AFTER_SIDE_EFFECTS="before-change-set-close-after-side-effects",d.CHANGE_SET_CLOSED_BEFORE_PERSIST="change-set-closed-before-persist",d.CHANGE_SET_PERSISTED="change-set-persisted",d.BEFORE_CHANGE_SET_PERSIST="before-change-set-persist",d.EXPLICIT_DEFINITION_ENTITY_ADDED="explicit-definition-entity-added",d.EXPLICIT_DEFINITION_ENTITY_REMOVED="explicit-definition-entity-removed",d.EXPLICIT_DEFINITION_ENTITY_UPDATED="explicit-definition-entity-updated",d.PERSISTED_DEFINITION_ENTITY_ADDED="persisted-definition-entity-added",d.PERSISTED_DEFINITION_ENTITY_REMOVED="persisted-definition-entity-removed",d.PERSISTED_DEFINITION_ENTITY_UPDATED="persisted-definition-entity-updated",d.RELATIONAL_DATABASE_DEFINITION_ENTITY_ADDED="relational-database-definition-entity-added",d.RELATIONAL_DATABASE_DEFINITION_ENTITY_REMOVED="relational-database-definition-entity-removed",d.RELATIONAL_DATABASE_DEFINITION_ENTITY_UPDATED="relational-database-definition-entity-updated",d))(ii||{});const Kx={...IN,events:new J.Events("def-proj-static-p-ctx-events")},oKe={requestActiveDynamicValue:(d,p=!1)=>null,...Kx},_t=class _t extends kr{constructor(i,n={...oKe,events:new J.Events("def-proj-inst-p-ctx-events")}){super(i);I(this,"initialData");I(this,"id");I(this,"type",o.Project);I(this,"name",null);I(this,"description",null);I(this,"x");I(this,"y");I(this,"entities",[]);I(this,"projects",[]);I(this,"functions",[]);I(this,"events",[]);I(this,"variableDeclarations",[]);I(this,"variableInstances",[]);I(this,"conditions",[]);I(this,"operations",[]);I(this,"functionCalls",[]);I(this,"loops",[]);I(this,"searches",[]);I(this,"primitives",[]);I(this,"builtInBaseEntities",[]);I(this,"operationDeclarations",[]);I(this,"globalEventActionDescriptors",[]);I(this,"loopDeclarations",[]);I(this,"loopDeclarationsBodies",[]);I(this,"conditionDeclarations",[]);I(this,"valueDescriptors",[]);I(this,"dataTypes",[]);I(this,"project");I(this,"instances",{});I(this,"builtInInstances",{});I(this,"deletedInstances",{});I(this,"errors",[]);I(this,"references",[]);I(this,"history",[]);I(this,"undoableStackValueIndex",-1);I(this,"detachedDependents",{});I(this,"knownVersions",null);I(this,"activeVersion",!1);I(this,"initialized",!1);I(this,"startedInitialization",!1);I(this,"diggestedBuiltInBaseEntitiesIds",new Set);I(this,"rejectParallelCS",!1);I(this,"onPersistChangeSetSequentiallyCallback",null);I(this,"onPersistChangeSetInParallelCallback",null);I(this,"onAddChangeSetCallback",null);I(this,"onDiscardChangeSetCallback",null);if(this.parentContext=n,this.initialData=i,this.id=i.id,this.name=i.name,this.description=i.description,this.x=0,this.y=0,this.instances[this.id]=this,!_t.UUID)throw new Error("UUID module is already initialized. Please inject a valid UUID module.")}static get UUID(){var i;return(i=this.parentContext.requestExtension("uuid"))==null?void 0:i.module}static new(i=null){return{id:_t.UUID.uuid(),version:_t.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||M().toISOString(),author:(i==null?void 0:i.author)||_t.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.Project,name:"",description:"",entities:[],functions:[],events:[],projects:[],variableDeclarations:[],variableInstances:[],conditions:[],operations:[],functionCalls:[],loops:[],searches:[]}}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[];return c.push(...Nr(s)),{errors:c,modifiedData:s}}get off(){return this.parentContext.events.off}get on(){return this.parentContext.events.on}get emit(){return this.parentContext.events.emit}get emitAsync(){return this.parentContext.events.emitAsync}get emitAsyncAll(){return this.parentContext.events.emitAsyncAll}get emitAsyncAllSettled(){return this.parentContext.events.emitAsyncAllSettled}get emitAsyncSequentially(){return this.parentContext.events.emitAsyncSequentially}get emitAsyncSequentiallyAll(){return this.parentContext.events.emitAsyncSequentiallyAll}get emitAsyncSequentiallyAllSettled(){return this.parentContext.events.emitAsyncSequentiallyAllSettled}async closePersistChangeSetsSequentially(){J.Logger.log("[ProjectState.closePersistChangeSetsSequentially] called");const i=this.history.find(n=>n.dirty&&!n.open&&!n.submitting);i&&(J.Logger.log(`[ProjectState.closePersistChangeSetsSequentially] closing pending change-set ${i.id} - ${i.autoCloseActionName}`),await this.persistChangeSetSequentially(i))}async onPersistChangeSetSequentially(i){this.onPersistChangeSetSequentiallyCallback=i,J.Logger.log("[ProjectState.onPersistChangeSetSequentially] onPersistChangeSetSequentiallyCallback has been set. Checking for pending change-sets."),await this.closePersistChangeSetsSequentially()}offPersistChangeSetSequentially(){this.onPersistChangeSetSequentiallyCallback=null}async onPersistChangeSetInParallel(i){this.onPersistChangeSetInParallelCallback=i,J.Logger.log("[ProjectState.onPersistChangeSetInParallel] onPersistChangeSetInParallelCallback has been set. Checking for pending change-sets.");for(const n of this.history)this.persistChangeSetInParallel(n),await new Promise(s=>setTimeout(s,27))}offPersistChangeSetInParallel(){this.onPersistChangeSetInParallelCallback=null}onAddChangeSet(i){this.onAddChangeSetCallback=i}offAddChangeSet(){this.onAddChangeSetCallback=null}onDiscardChangeSet(i){this.onDiscardChangeSetCallback=i}offDiscardChangeSet(){this.onDiscardChangeSetCallback=null}async persistChangeSetSequentially(i){if(J.Logger.log(`[ProjectState.persistChangeSetSequentially] called for change-set ${i.id} - ${i.autoCloseActionName}`),!i.dirty||i.open||i.submitting){J.Logger.log(`[ProjectState.persistChangeSetSequentially] change-set ${i.id} - ${i.autoCloseActionName} is not dirty, or is open, or is already being submitted, skipping.`);return}const n=this.history.findIndex(e=>e.id===i.id),s=this.history.slice(0,n),c=s[s.length-1];if(c!=null&&c.dirty){J.Logger.log(`[ProjectState.persistChangeSetSequentially] lastBeforeSelf is dirty: ${c.id} - ${c.autoCloseActionName}, closing it first.`);return}this.onPersistChangeSetSequentiallyCallback&&(J.Logger.log(`[ProjectState.persistChangeSetSequentially] invoking onPersistChangeSetSequentiallyCallback for change-set ${i.id} - ${i.autoCloseActionName}`),this.emit("before-change-set-persist",i),i.submitting=!0,(await this.onPersistChangeSetSequentiallyCallback(i)).success&&(i.dirty=!1,this.emit("change-set-persisted",i),J.Logger.log(`[ProjectState.persistChangeSetSequentially] change-set ${i.id} - ${i.autoCloseActionName} closed successfully, checking for pending change-sets to close.`),this.closePersistChangeSetsSequentially()))}async persistChangeSetInParallel(i){if(J.Logger.log(`[ProjectState.persistChangeSetInParallel] called for change-set ${i.id} - ${i.autoCloseActionName}`),!i.dirty||i.open||i.submitting){J.Logger.log(`[ProjectState.persistChangeSetInParallel] change-set ${i.id} - ${i.autoCloseActionName} is not dirty, or is open, or is already being submitted, skipping.`);return}this.onPersistChangeSetInParallelCallback&&(J.Logger.log(`[ProjectState.persistChangeSetInParallel] invoking onPersistChangeSetInParallelCallback for change-set ${i.id} - ${i.autoCloseActionName}`),this.emit("before-change-set-persist",i),i.submitting=!0,(await this.onPersistChangeSetInParallelCallback(i)).success&&(i.dirty=!1,this.emit("change-set-persisted",i)))}toLatestChangeSet(i,n,s,c=!1,e="here-this"){if(!this.history.length)return new q(this,i,n,s,c,e);const y=this.history[this.history.length-1];return y.open?y:this.addChangeSet(new q(this,i,n,s,c,e))}addChangeSet(i){var s,c;if(!this.history.length)return this.undoableStackValueIndex=$O(this.undoableStackValueIndex,this.history,i),(s=this.onAddChangeSetCallback)==null||s.call(this,i,this.undoableStackValueIndex),i;const n=this.history.find(e=>e.id===(i==null?void 0:i.id));if(n)return n;if(this.rejectParallelCS){const e=this.history.find(y=>y.open);if(e)throw J.Logger.warn("Previous still open: ",e),J.Logger.warn("New change set: ",i),new Error(`There is already an open change-set with id '${e.id}'${e.autoCloseActionName?` auto-close: ${e.autoCloseActionName}`:""}${e.self?` root: ${e.self.type} ${le(e.self,this)}`:""}.`)}return this.undoableStackValueIndex=$O(this.undoableStackValueIndex,this.history,i),(c=this.onAddChangeSetCallback)==null||c.call(this,i,this.undoableStackValueIndex),i}discardChangeSet(i){var s;J.Logger.log(`[ProjectState.discardChangeSet] called for change-set ${i.id} - ${i.autoCloseActionName}`);const n=this.history.findIndex(c=>c.id===(i==null?void 0:i.id));return n!==-1&&(this.history.splice(n,1),J.Logger.log(`[ProjectState.discardChangeSet] Removed change-set ${i.id} - ${i.autoCloseActionName} from history.`),this.undoableStackValueIndex=this.undoableStackValueIndex-1,(s=this.onDiscardChangeSetCallback)==null||s.call(this,i),i==null||i.teardown()),this}validateGeneratedUpdate(i){return{errors:[],modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){return this}subscribeToDependencies(){return this}increaseVersion(i){if(i&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=_t.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new _t(this);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.entities=[...this.entities],i.projects=[...this.projects],i.functions=[...this.functions],i.events=[...this.events],i.variableDeclarations=[...this.variableDeclarations],i.variableInstances=[...this.variableInstances],i.conditions=[...this.conditions],i.operations=[...this.operations],i.functionCalls=[...this.functionCalls],i.loops=[...this.loops],i.searches=[...this.searches],this}recursiveCaptureUpstreamVersions(i){const n=[],s=[],c=[],e=[];return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,P]of b.knownVersions)v.set(w,P);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new _t(v)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.entities=y.entities,this.projects=y.projects,this.functions=y.functions,this.events=y.events,this.variableDeclarations=y.variableDeclarations,this.variableInstances=y.variableInstances,this.conditions=y.conditions,this.operations=y.operations,this.functionCalls=y.functionCalls,this.loops=y.loops,this.searches=y.searches,{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){return this.checkCanEdit(this,n)?(this.metaSync(i,n),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this):(J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this)}hydrateAncestors(){const i=[],n=[],s=[],c=[];return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=null){const n=[],s=[],c=[],e=[];return this.initialized||(this.initialized=!0,this.emit("project-initialized",this,i)),this.validate(),this.captureVersion(),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i){const n=[],s=[],c=[],e=[];return this.subscribe(),this.subscribeToDependencies(),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(i){return this.operationDeclarations.includes(i)}isGlobalEventActionDescriptor(i){return this.globalEventActionDescriptors.includes(i)}isLoopDeclaration(i){return this.loopDeclarations.includes(i)}isConditionDeclaration(i){return this.conditionDeclarations.includes(i)}initChildren(i=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.entities=this.initialData.entities.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.projects=this.initialData.projects.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.variableDeclarations=this.initialData.variableDeclarations.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.variableInstances=this.initialData.variableInstances.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.conditions=this.initialData.conditions.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.operations=this.initialData.operations.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.functions=this.initialData.functions.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.events=this.initialData.events.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.functionCalls=this.initialData.functionCalls.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.loops=this.initialData.loops.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.searches=this.initialData.searches.map(n=>{const s=ye(n,this);return s.setParent(this,null),s.initChildren(i),s}),this.attachOrphanReferences(),this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this)}subscribeInstance(i){return(!this.instances[i.id]||this.instances[i.id]!==i)&&(this.instances[i.id]=i),this}subscribeDeletedInstance(i){return(!this.deletedInstances[i.id]||this.deletedInstances[i.id]!==i)&&(this.deletedInstances[i.id]=i),this}subscribeBuiltInInstance(i){return(!this.builtInInstances[i.id]||this.builtInInstances[i.id]!==i)&&(this.builtInInstances[i.id]=i),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(i){return delete this.instances[i.id],this}unsubscribeDeletedInstance(i){return delete this.deletedInstances[i.id],this}findSubscribedBuiltInInstance(i){return this.builtInInstances[i.id]||null}get(i){return this.instances[i]||this.builtInInstances[i]||null}getDeleted(i){return this.deletedInstances[i]||null}getManaged(i){return this.getBuiltIn(i)?null:this.instances[i]||null}getBuiltIn(i){return this.builtInInstances[i]||null}findSubscribedInstanceFromReference(i){return this.instances[i.entityId]||null}findSubscribedBuiltInInstanceFromReference(i){return this.builtInInstances[i.entityId]||null}metaSync(i,n=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=$r(this,i,n),c=xr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.description=s.description!==void 0?s.description:e.description,this.x=s.x||e.x,this.y=s.y||e.y,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,Z.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,Z.Added):c&&(n==null||n.add(this,Z.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=Ge,...n){return await _t.repository.APILoad(this.id,...n),this}async APICreate(i=Ge,...n){return await _t.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=Ge,...n){return await _t.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=Ge,...n){return await _t.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=Ge,...n){return await _t.repository.APIClone(this.id,...n),this}async APILoadVersion(i=Ge,n,...s){return await _t.repository.APILoadVersion(this.id,n,...s)}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){return{added:[],updated:[],removed:[],affected:[],self:this}}restore({}={},i=this.project.addChangeSet(new q(this.project,_t.sessionAuthor,M().toISOString(),this,!0,_.RestoreEntity))){return{added:[],updated:[],removed:[],affected:[],self:this}}getAllBuiltInIds(){const i=new Set;return[...this.primitives.flatMap(n=>n.toFlatIds(i)),...this.builtInBaseEntities.flatMap(n=>n.toFlatIds(i)),...this.operationDeclarations.flatMap(n=>n.toFlatIds(i)),...this.globalEventActionDescriptors.flatMap(n=>n.toFlatIds(i)),...this.loopDeclarations.flatMap(n=>n.toFlatIds(i)),...this.conditionDeclarations.flatMap(n=>n.toFlatIds(i)),...this.valueDescriptors.flatMap(n=>n.toFlatIds(i)),...this.dataTypes.flatMap(n=>n.toFlatIds(i))]}getAllBuiltIn(){const i=new Set;return[...this.primitives.flatMap(n=>n.toFlat(i)),...this.builtInBaseEntities.flatMap(n=>n.toFlat(i)),...this.operationDeclarations.flatMap(n=>n.toFlat(i)),...this.globalEventActionDescriptors.flatMap(n=>n.toFlat(i)),...this.loopDeclarations.flatMap(n=>n.toFlat(i)),...this.conditionDeclarations.flatMap(n=>n.toFlat(i)),...this.valueDescriptors.flatMap(n=>n.toFlat(i)),...this.dataTypes.flatMap(n=>n.toFlat(i))]}toFlat(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this,...this.entities.flatMap(s=>s.toFlat(i)),...this.functions.flatMap(s=>s.toFlat(i)),...this.events.flatMap(s=>s.toFlat(i)),...this.projects.flatMap(s=>s.toFlat(i)),...this.variableDeclarations.flatMap(s=>s.toFlat(i)),...this.variableInstances.flatMap(s=>s.toFlat(i)),...this.conditions.flatMap(s=>s.toFlat(i)),...this.operations.flatMap(s=>s.toFlat(i)),...this.functionCalls.flatMap(s=>s.toFlat(i)),...this.loops.flatMap(s=>s.toFlat(i)),...this.searches.flatMap(s=>s.toFlat(i))])}toFlatIds(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.entities.flatMap(s=>s.toFlatIds(i)),...this.functions.flatMap(s=>s.toFlatIds(i)),...this.events.flatMap(s=>s.toFlatIds(i)),...this.projects.flatMap(s=>s.toFlatIds(i)),...this.variableDeclarations.flatMap(s=>s.toFlatIds(i)),...this.variableInstances.flatMap(s=>s.toFlatIds(i)),...this.conditions.flatMap(s=>s.toFlatIds(i)),...this.operations.flatMap(s=>s.toFlatIds(i)),...this.functionCalls.flatMap(s=>s.toFlatIds(i)),...this.loops.flatMap(s=>s.toFlatIds(i)),...this.searches.flatMap(s=>s.toFlatIds(i))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name}}toJSON(i=new Set){return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,description:this.description,entities:this.entities.map(n=>n.toJSON(i)),variableDeclarations:this.variableDeclarations.map(n=>n.toJSON(i)),variableInstances:this.variableInstances.map(n=>n.toJSON(i)),conditions:this.conditions.map(n=>n.toJSON(i)),operations:this.operations.map(n=>n.toJSON(i)),loops:this.loops.map(n=>n.toJSON(i)),searches:this.searches.map(n=>n.toJSON(i)),functions:this.functions.map(n=>n.toJSON(i)),events:this.events.map(n=>n.toJSON(i)),projects:this.projects.map(n=>n.toJSON(i)),functionCalls:this.functionCalls.map(n=>n.toJSON(i))})}toJSONClone(i={uuidStrategy:"uuid"}){const n=new Map,s=new Set,c=this.getAllBuiltInIds();return Object.keys(this.instances).forEach(e=>{if(c.includes(e)){n.set(e,e);return}n.set(e,_t.UUID.uuid())}),s.add(this.id),{id:n.get(this.id),version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,description:this.description,entities:this.entities.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),projects:this.projects.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),variableDeclarations:this.variableDeclarations.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),variableInstances:this.variableInstances.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),conditions:this.conditions.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),operations:this.operations.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),functions:this.functions.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),events:this.events.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),functionCalls:this.functionCalls.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),loops:this.loops.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null})),searches:this.searches.map(e=>e.toJSONClone({...i,seenEntityMaps:n,seenEntities:s,newId:null}))}}toReference(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+_t.UUID.uuid()+"--ref",type:o.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=pt){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,description:this.description,entities:this.entities.map(c=>c.toReference(i)),functions:this.functions.map(c=>c.toReference(i)),events:this.events.map(c=>c.toReference(i)),projects:this.projects.map(c=>c.toReference(i)),variableDeclarations:this.variableDeclarations.map(c=>c.toReference(i)),variableInstances:this.variableInstances.map(c=>c.toReference(i)),conditions:this.conditions.map(c=>c.toReference(i)),operations:this.operations.map(c=>c.toReference(i)),functionCalls:this.functionCalls.map(c=>c.toReference(i)),loops:this.loops.map(c=>c.toReference(i)),searches:this.searches.map(c=>c.toReference(i))}}toFlatJSON(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.entities.flatMap(s=>s.toFlatJSON(i)),...this.functions.flatMap(s=>s.toFlatJSON(i)),...this.events.flatMap(s=>s.toFlatJSON(i)),...this.projects.flatMap(s=>s.toFlatJSON(i)),...this.variableDeclarations.flatMap(s=>s.toFlatJSON(i)),...this.variableInstances.flatMap(s=>s.toFlatJSON(i)),...this.conditions.flatMap(s=>s.toFlatJSON(i)),...this.operations.flatMap(s=>s.toFlatJSON(i)),...this.functionCalls.flatMap(s=>s.toFlatJSON(i)),...this.loops.flatMap(s=>s.toFlatJSON(i)),...this.searches.flatMap(s=>s.toFlatJSON(i))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[...this.entities.flatMap(s=>s.toFlatGenerationTarget(i)),...this.functions.flatMap(s=>s.toFlatGenerationTarget(i)),...this.events.flatMap(s=>s.toFlatGenerationTarget(i)),...this.projects.flatMap(s=>s.toFlatGenerationTarget(i)),...this.variableDeclarations.flatMap(s=>s.toFlatGenerationTarget(i)),...this.variableInstances.flatMap(s=>s.toFlatGenerationTarget(i)),...this.conditions.flatMap(s=>s.toFlatGenerationTarget(i)),...this.operations.flatMap(s=>s.toFlatGenerationTarget(i)),...this.functionCalls.flatMap(s=>s.toFlatGenerationTarget(i)),...this.loops.flatMap(s=>s.toFlatGenerationTarget(i)),...this.searches.flatMap(s=>s.toFlatGenerationTarget(i))])}clearErrors(){return this.errors=[],this.entities.forEach(i=>i.clearErrors()),this.projects.forEach(i=>i.clearErrors()),this.functions.forEach(i=>i.clearErrors()),this.events.forEach(i=>i.clearErrors()),this.variableDeclarations.forEach(i=>i.clearErrors()),this.variableInstances.forEach(i=>i.clearErrors()),this.conditions.forEach(i=>i.clearErrors()),this.operations.forEach(i=>i.clearErrors()),this.functionCalls.forEach(i=>i.clearErrors()),this.loops.forEach(i=>i.clearErrors()),this.searches.forEach(i=>i.clearErrors()),this}validate(){return this.validateChildren(),sv([...this.errors]),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return await this.validateChildrenAsync({tracker:n}),await B_e([...this.errors]),{success:!0}}validateChildren(){this.entities.forEach(i=>i.validate()),this.projects.forEach(i=>i.validate()),this.functions.forEach(i=>i.validate()),this.events.forEach(i=>i.validate()),this.variableDeclarations.forEach(i=>i.validate()),this.variableInstances.forEach(i=>i.validate()),this.conditions.forEach(i=>i.validate()),this.operations.forEach(i=>i.validate()),this.functionCalls.forEach(i=>i.validate()),this.loops.forEach(i=>i.validate()),this.searches.forEach(i=>i.validate())}async validateChildrenAsync(i={}){const n=J.YieldTracker.from(i);for(let s=0;s<this.entities.length;s++)await this.entities[s].validateAsync({tracker:n});for(let s=0;s<this.projects.length;s++)await this.projects[s].validateAsync({tracker:n});for(let s=0;s<this.functions.length;s++)await this.functions[s].validateAsync({tracker:n});for(let s=0;s<this.events.length;s++)await this.events[s].validateAsync({tracker:n});for(let s=0;s<this.variableDeclarations.length;s++)await this.variableDeclarations[s].validateAsync({tracker:n});for(let s=0;s<this.variableInstances.length;s++)await this.variableInstances[s].validateAsync({tracker:n});for(let s=0;s<this.conditions.length;s++)await this.conditions[s].validateAsync({tracker:n});for(let s=0;s<this.operations.length;s++)await this.operations[s].validateAsync({tracker:n});for(let s=0;s<this.functionCalls.length;s++)await this.functionCalls[s].validateAsync({tracker:n});for(let s=0;s<this.loops.length;s++)await this.loops[s].validateAsync({tracker:n});for(let s=0;s<this.searches.length;s++)await this.searches[s].validateAsync({tracker:n})}getErrors(){return[...this.errors,...this.entities.flatMap(n=>n.getErrors()),...this.projects.flatMap(n=>n.getErrors()),...this.functions.flatMap(n=>n.getErrors()),...this.events.flatMap(n=>n.getErrors()),...this.variableDeclarations.flatMap(n=>n.getErrors()),...this.variableInstances.flatMap(n=>n.getErrors()),...this.conditions.flatMap(n=>n.getErrors()),...this.operations.flatMap(n=>n.getErrors()),...this.functionCalls.flatMap(n=>n.getErrors()),...this.loops.flatMap(n=>n.getErrors()),...this.searches.flatMap(n=>n.getErrors())]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(let c=0;c<this.entities.length;c++){const e=await this.entities[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.projects.length;c++){const e=await this.projects[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.functions.length;c++){const e=await this.functions[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.events.length;c++){const e=await this.events[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.variableDeclarations.length;c++){const e=await this.variableDeclarations[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.variableInstances.length;c++){const e=await this.variableInstances[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.conditions.length;c++){const e=await this.conditions[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.operations.length;c++){const e=await this.operations[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.functionCalls.length;c++){const e=await this.functionCalls[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.loops.length;c++){const e=await this.loops[c].getErrorsAsync({tracker:n});s.push(...e)}for(let c=0;c<this.searches.length;c++){const e=await this.searches[c].getErrorsAsync({tracker:n});s.push(...e)}return s}getShallowErrors(){return this.errors}clone(){return this}getDefinitionEntity(i){return this.entities.find(n=>n.id===i)||null}addDefinitionEntity(i){return this.entities.includes(i)||this.entities.push(i),i}addFunctionDeclaration(i){return this.functions.includes(i)||this.functions.push(i),i}addFunctionCall(i){return this.functionCalls.includes(i)||this.functionCalls.push(i),i}addVariableDeclaration(i){return this.variableDeclarations.includes(i)||this.variableDeclarations.push(i),i}addVariableInstance(i){return this.variableInstances.includes(i)||this.variableInstances.push(i),i}addInstalledProject(i){return this.projects.includes(i)||this.projects.push(i),this}addGlobalEvent(i){return this.events.includes(i)||this.events.push(i),this}addCondition(i){return this.conditions.includes(i)||this.conditions.push(i),this}addOperation(i){return this.operations.includes(i)||this.operations.push(i),this}addLoop(i){return this.loops.includes(i)||this.loops.push(i),this}addSearch(i){return this.searches.includes(i)||this.searches.push(i),this}removeDefinitionEntity(i){const n=this.entities.findIndex(s=>s.id===i.id);if(n>-1){const s=this.entities[n];return this.entities.splice(n,1),s}return null}removeCondition(i){const n=this.conditions.findIndex(s=>s.id===i.id);if(n>-1){const s=this.conditions[n];return this.conditions.splice(n,1),s}return null}removeOperation(i){const n=this.operations.findIndex(s=>s.id===i.id);if(n>-1){const s=this.operations[n];return this.operations.splice(n,1),s}return null}removeLoop(i){const n=this.loops.findIndex(s=>s.id===i.id);if(n>-1){const s=this.loops[n];return this.loops.splice(n,1),s}return null}removeSearch(i){const n=this.searches.findIndex(s=>s.id===i.id);if(n>-1){const s=this.searches[n];return this.searches.splice(n,1),s}return null}removeFunctionCall(i){const n=this.functionCalls.findIndex(s=>s.id===i.id);if(n>-1){const s=this.functionCalls[n];return this.functionCalls.splice(n,1),s}return null}removeVariableInstance(i){const n=this.variableInstances.findIndex(s=>s.id===i.id);if(n>-1){const s=this.variableInstances[n];return this.variableInstances.splice(n,1),s}return null}removeVariableDeclaration(i){const n=this.variableDeclarations.findIndex(s=>s.id===i.id);if(n>-1){const s=this.variableDeclarations[n];return this.variableDeclarations.splice(n,1),s}return null}removeFunctionDeclaration(i){const n=this.functions.findIndex(s=>s.id===i.id);if(n>-1){const s=this.functions[n];return this.functions.splice(n,1),s}return null}removeInstalledProject(i){const n=this.projects.findIndex(s=>s.id===i.id);if(n>-1){const s=this.projects[n];return this.projects.splice(n,1),s}return null}removeGlobalEvent(i){const n=this.events.findIndex(s=>s.id===i.id);if(n>-1){const s=this.events[n];return this.events.splice(n,1),s}return null}removeTopLevelVariableDeclaration(i){if(i.type!==o.VariableDeclaration)return null;const n=this.variableDeclarations.findIndex(s=>s.id===i.id);if(n>-1){const s=this.variableDeclarations[n];return this.variableDeclarations.splice(n,1),s}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(n=>n.methods)]}getTerminationStatements(){return[...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.ReturnStatement||e.type===o.ContinueStatement||e.type===o.BreakStatement)]},[])]}getFunctionDeclaration(i){return this.functions.find(n=>n.id===i)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.functionCalls.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.conditions.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.operations.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.loops.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[]),...this.searches.reduce((n,s)=>{const c=Wi(s);return[...n,...c]},[])]}getVariableInstances(){return[...this.variableInstances,...this.entities.reduce((n,s)=>[...n,...s.methods.flatMap(c=>{const y=Dt(c).filter(m=>m.type===o.VariableInstance);return[...n,...y]})],[]),...this.getEntryPoints().reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.functionCalls.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.conditions.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.operations.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.loops.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[]),...this.searches.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableInstance);return[...n,...e]},[])]}getVariableDeclarations(){return D([...this.variableDeclarations,...this.entities.reduce((n,s)=>[...n,...s.methods.flatMap(c=>{const y=Dt(c).filter(m=>m.type===o.VariableDeclaration);return[...n,...y]})],[]),...this.getEntryPoints().reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.functionCalls.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.conditions.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.operations.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.loops.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[]),...this.searches.reduce((n,s)=>{const e=Wi(s).filter(y=>y.type===o.VariableDeclaration);return[...n,...e]},[])])}getLoops(){return[...this.loops,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[]),...this.searches.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Loop)]},[])]}getSearches(){return[...this.searches,...this.getEntryPoints().reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.functionCalls.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.conditions.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.operations.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[]),...this.loops.reduce((n,s)=>{const c=Dt(s);return[...n,...c.filter(e=>e.type===o.Search)]},[])]}attachOrphanReferences(){const i=this.getVariableInstances(),n=this.getVariableDeclarations();return i.forEach(s=>{if(!s.declaration){const c=s.initialData,e=c.declaration.entityId||c.declaration.id,y=n.find(m=>m.id===e);y&&s.setDeclaration(y)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(i=>i.name===Re.PERSISTED_ENTITY)||null}requestActiveDynamicValue(i,n=!1){var c,e;const s=(e=(c=this.parentContext).requestActiveDynamicValue)==null?void 0:e.call(c,i,n);if(!s&&_A.includes(i.type)){const y=i.getDefaultValue();return y?{value:y,type:Le.DefaultValue,inheritanceLink:null,valueOwner:i}:null}return s||null}requestExtension(i){if(this.parentContext.requestExtension){const n=this.parentContext.requestExtension(i);if(n&&!n.module)throw new Error(`Module ${i} is not registered properly.`);return n.module||null}return null}undo(){J.Logger.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex-1,J.Logger.log("To: ",this.undoableStackValueIndex);const i=this.history[this.undoableStackValueIndex+1],n=this.history[this.undoableStackValueIndex];return J.Logger.log("Current change set: ",i==null?void 0:i.toJSON()),J.Logger.log("Change set to restore: ",n==null?void 0:n.toJSON()),NO(i||"initial",n||"initial",this)}redo(){J.Logger.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex+1,J.Logger.log("To: ",this.undoableStackValueIndex);const i=this.history[this.undoableStackValueIndex-1],n=this.history[this.undoableStackValueIndex];return J.Logger.log("Current change set: ",i==null?void 0:i.toJSON()),J.Logger.log("Change set to restore: ",n.toJSON()),NO(i||"initial",n||"initial",this)}applyExternalChangeSet(i){const n=i.payload,s=this.addChangeSet(new q(this,i.userAuthor,i.emittedAt,this));s.ignoreNonEditable=!0,s.ignoreNonDeletable=!0;const c=n.updated[this.id];if(!c)throw new Error("Project root not found in change set transfer. Cannot apply changes.");const e={...n.added,...n.updated,...n.removed},y=[...Object.keys(n.added),...Object.keys(n.updated),...Object.keys(n.removed)];y.forEach(v=>{var E;if(!e[v]){J.Logger.warn(`Entity '${v}' not found in change set transfer. Cannot apply changes.`);const b=(E=this.get(v))==null?void 0:E.toShallowJSON();throw b?J.Logger.warn("Entity in project: ",b):J.Logger.warn("Entity not in project"),new Error(`Entity '${v}' not found in change set transfer. Cannot apply changes.`)}});const m=new Yn(c,{allBuiltInEntityIds:this.diggestedBuiltInBaseEntitiesIds});return m.flatRecord=e,m.order=y,m.orderEntities(),J.Logger.log("All entities: ",m.order.map((v,E)=>`${E+1}: ${e[v].type} - ${v}`).join(`,
394
396
  `)),J.Logger.log("Persisting new additions"),m.visit(async(v,E)=>{if(n.added[v.id]){J.Logger.log("Adding: ",v.id);try{const b=ye(v,this);if(b.hydrateAncestors(),b.addSelfToProject(s),s.add(b,Z.Added),!this.get(v.id))throw new Error(`Entity ${v.id} was not added to the project`)}catch(b){J.Logger.error("Error: ",b),J.Logger.error("Errored entity: ",v)}}}),J.Logger.log("Persisting updates"),m.visit(async(v,E)=>{if(n.updated[v.id]){J.Logger.log("Updating: ",v.id);try{const b=this.get(v.id);b?(b.updateWithShallowTransfer(v,s),s.add(b,Z.Updated)):J.Logger.warn(`Active version of ${v.id} not found when applying external changes`)}catch(b){J.Logger.error("Error: ",b),J.Logger.error("Errored entity: ",v)}}}),J.Logger.log("Persisting removals"),m.visit(async(v,E)=>{if(n.removed[v.id]){J.Logger.log("Removing: ",v.id);try{const b=this.get(v.id);b&&b.remove({ignoreUpstream:!1},s)}catch(b){J.Logger.error("Error: ",b),J.Logger.error("Errored entity: ",v)}}}),s.open=!1,s}toBuiltInShallowRecord(){const i={};return Object.values(this.builtInInstances).forEach(n=>{const s=n.toShallowJSON();i[n.id]=s}),i}toShallowRecord(){const i={};return Object.values(this.instances).forEach(n=>{const s=n.toShallowJSON();i[n.id]=s}),i}toFullProjectTransfer(){const i=new Yn(this,{allBuiltInEntityIds:this.diggestedBuiltInBaseEntitiesIds}),n={};return i.visit(s=>{const c=s.toShallowJSON();n[s.id]=c}),{order:i.order,size:i.order.length,record:n}}};I(_t,"parentContext",Kx),I(_t,"sessionAuthor","1"),I(_t,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(_t,"type",o.Project),I(_t,"USER_MANAGED_PARENT_TYPES",[]),I(_t,"PARENT_TYPES",[..._t.USER_MANAGED_PARENT_TYPES]),I(_t,"MUTABLE_BASE_PROPERTIES",["name","description"]),I(_t,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(_t,"BASE_PROPERTIES",[..._t.MUTABLE_BASE_PROPERTIES,..._t.INMUTABLE_BASE_PROPERTIES]),I(_t,"MUTABLE_META_PROPERTIES",[..._t.MUTABLE_BASE_PROPERTIES,"x","y"]),I(_t,"INMUTABLE_META_PROPERTIES",[..._t.INMUTABLE_BASE_PROPERTIES]),I(_t,"META_PROPERTIES",[..._t.MUTABLE_META_PROPERTIES,..._t.INMUTABLE_META_PROPERTIES]),I(_t,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(_t,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),I(_t,"UPSTREAM_PROPERTIES",[..._t.MUTABLE_UPSTREAM_PROPERTIES,..._t.INMUTABLE_UPSTREAM_PROPERTIES]),I(_t,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),I(_t,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(_t,"DOWNSTREAM_PROPERTIES",[..._t.MUTABLE_DOWNSTREAM_PROPERTIES,..._t.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(_t,"PROPERTIES",[..._t.META_PROPERTIES,..._t.UPSTREAM_PROPERTIES,..._t.DOWNSTREAM_PROPERTIES]);let x=_t;class NUi extends $i{constructor(p){super(BT,p)}}class dKe extends $i{constructor(i){super(Ao,i);I(this,"id",ki.Parallel);I(this,"name",ki.Parallel);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",o.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=Ao.inputs.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=ye(Ao.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=Ao.error?ye(Ao.error,this.project):null}}class uKe extends $i{constructor(i){super(is,i);I(this,"id",is.id);I(this,"name",is.name);I(this,"description",is.description);I(this,"version",is.version);I(this,"autoexecutable",!1);I(this,"type",o.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=is.inputs.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=ye(is.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=is.error?ye(is.error,this.project):null}}class pKe extends $i{constructor(i){super(hu,i);I(this,"id",ki.Sequential);I(this,"name",ki.Sequential);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",o.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=hu.inputs.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=ye(hu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=hu.error?ye(hu.error,this.project):null}}class xUi extends $i{constructor(i){super(Yy,i);I(this,"autoexecutable",!0)}getEntityToMatchInputMap(i){return i.inputs.find(n=>{var s;return((s=n.declaration)==null?void 0:s.id)===Q.operation[Ce.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(i){return i.inputs.find(n=>{var s;return((s=n.declaration)==null?void 0:s.id)===Q.operation[Ce.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(i){return i.outputs.find(n=>{var s;return((s=n.declaration)==null?void 0:s.id)===Q.operation[Ce.Validate].dataType.entity.properties.outputEntity.id})||null}getEntityToMatch(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"get-entity-to-match-validate-data"))){var e;const s=((e=this.project.requestActiveDynamicValue(i))==null?void 0:e.value)||null,c=s==null?void 0:s.valueAsTypeSingle;return n==null||n.attemptAutoclose("get-entity-to-match-validate-data",this.id),c}syncOperationInstance(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-operation-instance-validate-data"))){const s=[],c=[],e=[],y=[],m=this.getEntityToMatchInputMap(i);if(m){const{added:b,updated:w,removed:P,affected:$}=this.syncEntityToMatchInputMapDataType(m,n);s.push(...w),c.push(...b),e.push(...P),y.push(...$)}const v=this.getDataToValidateInputMap(i);if(v){const{added:b,updated:w,removed:P,affected:$}=this.syncDataToValidateInputMapDataType(v,n);s.push(...w),c.push(...b),e.push(...P),y.push(...$)}const E=this.getOutputDataOutputMap(i);if(E){const{added:b,updated:w,removed:P,affected:$}=this.syncOutputDataOutputMapDataType(E,n);s.push(...w),c.push(...b),e.push(...P),y.push(...$)}return n==null||n.attemptAutoclose("sync-operation-instance-validate-data",this.id),{updated:D(s),added:D(c),removed:D(e),affected:D(y),self:i}}syncEntityToMatchInputMapDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-entity-to-match-input-map-data-type"))){var E,b,w,P,$,L,U,K,H,X,se,ee,fe,de,ce,ve,ae,me;const s=[],c=[],e=[],y=[];if(((E=i.declaration)==null?void 0:E.id)!==Q.operation[Ce.Validate].inputs.entityToMatch.id)return n==null||n.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const m=((b=this.project.requestActiveDynamicValue(i))==null?void 0:b.value)||null,v=m==null?void 0:m.valueAsTypeSingle;if(!i.dataType){const _e={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(n==null?void 0:n.timestamp)||new Date().toISOString(),author:(n==null?void 0:n.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.DataType,parentRelationType:null,options:((w=i.declaration.dataType)==null?void 0:w.options)||null,implementationChooseOne:((P=i.declaration.dataType)==null?void 0:P.implementationChooseOne)||!1,staticEntities:(($=i.declaration.dataType)==null?void 0:$.staticEntities)??null,interactiveEntities:((L=i.declaration.dataType)==null?void 0:L.interactiveEntities)??null,actionEntities:((U=i.declaration.dataType)==null?void 0:U.actionEntities)??null,index:((K=i.declaration.dataType)==null?void 0:K.index)??null,isList:((H=i.declaration.dataType)==null?void 0:H.isList)||!1,foreignKeyAllowed:((X=i.declaration.dataType)==null?void 0:X.foreignKeyAllowed)??null,andChildrenGroup:null,orChildrenGroup:null,foreignKeyRef:null,asType:!0,entity:(v==null?void 0:v.toJSON())||null,like:!0,inferred:!0,parent:i.toReference()},Ne=ye(_e,i.project);Ne.hydrateAncestors(),Ne.setParent(i,n),Ne.initChildren(n),Ne.setEntity(v,n),n==null||n.add(Ne,Z.Added),s.push(Ne),i.setDataType(Ne,n)}return(ae=i.dataType)==null||ae.metaSync({inferred:!0,like:!1,asType:!0,options:((se=i.declaration.dataType)==null?void 0:se.options)||null,implementationChooseOne:((ee=i.declaration.dataType)==null?void 0:ee.implementationChooseOne)||!1,staticEntities:((fe=i.declaration.dataType)==null?void 0:fe.staticEntities)??null,interactiveEntities:((de=i.declaration.dataType)==null?void 0:de.interactiveEntities)??null,actionEntities:((ce=i.declaration.dataType)==null?void 0:ce.actionEntities)??null,isList:((ve=i.declaration.dataType)==null?void 0:ve.isList)||!1},n),(me=i.dataType)==null||me.setEntity(v,n),i.dataType&&c.push(i.dataType),n==null||n.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:D(c),added:D(s),removed:D(e),affected:D(y),self:i.dataType}}syncDataToValidateInputMapDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-data-to-validate-input-map-data-type"))){var b,w,P;const s=[],c=[],e=[],y=[];if(((b=i.declaration)==null?void 0:b.id)!==Q.operation[Ce.Validate].inputs.dataToValidate.id)return n==null||n.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const m=this.getEntityToMatchInputMap(i.parent);if(!m)return n==null||n.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(m,n))return n==null||n.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!i.dataType){const $={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(n==null?void 0:n.timestamp)||new Date().toISOString(),author:(n==null?void 0:n.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.DataType,index:null,parentRelationType:null,options:null,implementationChooseOne:!1,foreignKeyAllowed:null,isList:!1,foreignKeyRef:null,andChildrenGroup:null,orChildrenGroup:null,staticEntities:null,interactiveEntities:null,actionEntities:null,asType:!1,entity:null,like:!0,inferred:!0,parent:i.toReference()},L=ye($,i.project);L.setParent(i,n),L.initChildren(n),n==null||n.add(L,Z.Added),s.push(L),i.setDataType(L,n)}(w=i.dataType)==null||w.metaSync({inferred:!0,like:!0,asType:!1},n);const E=this.getEntityToMatch(m,n);return(P=i.dataType)==null||P.setEntity(E,n),i.dataType&&c.push(i.dataType),n==null||n.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:D(c),added:D(s),removed:D(e),affected:D(y),self:i.dataType}}syncOutputDataOutputMapDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-output-data-output-map-data-type"))){var w,P,$,L;const s=[],c=[],e=[],y=[];if(((w=i.declaration)==null?void 0:w.id)!==Q.operation[Ce.Validate].dataType.entity.properties.outputEntity.id)return n==null||n.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const m=this.getEntityToMatchInputMap(i.parent);if(!m)return n==null||n.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(m,n))return n==null||n.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const E=((P=this.project.requestActiveDynamicValue(m))==null?void 0:P.value)||null,b=(E==null?void 0:E.valueAsTypeSingle)||null;if(!i.dataType){const U={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(n==null?void 0:n.timestamp)||new Date().toISOString(),author:(n==null?void 0:n.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:o.DataType,parentRelationType:null,options:null,foreignKeyRef:null,implementationChooseOne:!1,foreignKeyAllowed:null,staticEntities:null,interactiveEntities:null,index:null,actionEntities:null,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:(b==null?void 0:b.toJSON())||null,like:!0,inferred:!0,parent:i.toReference()},K=ye(U,i.project);K.hydrateAncestors(),K.setParent(i,n),K.initChildren(n),K.setEntity(b,n),n==null||n.add(K,Z.Added),s.push(K),i.setDataType(K,n)}return($=i.dataType)==null||$.metaSync({inferred:!0,like:!0,asType:!1},n),(L=i.dataType)==null||L.setEntity(b,n),i.dataType&&c.push(i.dataType),n==null||n.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:D(c),added:D(s),removed:D(e),affected:D(y),self:i.dataType}}inferInputMapDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"infer-input-map-data-type-validate-data"))){var c,e,y;if(((c=i.declaration)==null?void 0:c.id)===Q.operation[Ce.Validate].inputs.entityToMatch.id){const{added:m,updated:v,removed:E,affected:b}=this.syncEntityToMatchInputMapDataType(i,n);return n==null||n.attemptAutoclose("infer-input-map-data-type",this.id),{updated:D(v),added:D(m),removed:D(E),affected:D(b),self:i.dataType}}if(((e=i.declaration)==null?void 0:e.id)===Q.operation[Ce.Validate].inputs.dataToValidate.id){const{added:m,updated:v,removed:E,affected:b}=this.syncDataToValidateInputMapDataType(i,n);return n==null||n.attemptAutoclose("infer-input-map-data-type",this.id),{updated:D(v),added:D(m),removed:D(E),affected:D(b),self:i.dataType}}const s=(y=i.declaration)==null?void 0:y.getDataType(n);if(s&&s.isResolved)return n==null||n.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:s};if(i.readsValue){const m=Do(i.readsValue,n);return n==null||n.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:m}}return n==null||n.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:null}}inferOutputMapDataType(i,n=this.project.addChangeSet(new q(this.project,x.sessionAuthor,M().toISOString(),this,!0,"infer-output-map-data-type-validate-data"))){var s;if(((s=i.declaration)==null?void 0:s.id)===Q.operation[Ce.Validate].dataType.entity.properties.outputEntity.id){const{added:c,updated:e,removed:y,affected:m}=this.syncOutputDataOutputMapDataType(i,n);return n==null||n.attemptAutoclose("infer-output-map-data-type-validate-data",this.id),{updated:D(e),added:D(c),removed:D(y),affected:D(m),self:i.dataType}}return{updated:[],added:[],removed:[],affected:[],self:null}}}class $Ui extends $i{constructor(p){super(n_,p)}}class LUi extends $i{constructor(p){super(a_,p)}}class MUi extends $i{constructor(p){super(s_,p)}}class BUi extends $i{constructor(p){super(fg,p)}}class GUi extends $i{constructor(p){super(NA,p)}}class kUi extends $i{constructor(p){super(Xm,p)}}function cKe(d){const p=[new pKe(d),new dKe(d),new uKe(d),new NUi(d),new xUi(d),new BUi(d),new $Ui(d),new MUi(d),new LUi(d),new GUi(d),new kUi(d)];return VP.forEach(i=>{p.some(n=>n.id===i.id)||p.push(new $i(i,d))}),p.forEach(i=>{i.initChildren(null),d.subscribeBuiltInInstance(i)}),d.operationDeclarations=p,p}class fKe extends Po{constructor(i){super(dn,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",dn.description);I(this,"type",o.BuiltInBaseEntity);I(this,"abstract",dn.abstract);I(this,"static",dn.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=dn,this.project=i,this.id=dn.id,this.version=dn.version,this.name=dn.name,this.static=dn.static,this.abstract=dn.abstract,this.properties=this.initialData.properties.map(n=>{const s=ye(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.methods=this.initialData.methods.map(n=>{const s=ye(n,this.project);return s.parent=this,s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=ye(n,this.project);return s.parent=this,s}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project))}}var Vo=(d=>(d.StatusCodeMustBeNumber="status-code-must-be-number",d.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",d))(Vo||{});function yKe(d,p){const i=[];if(typeof p!="number"){const n=new Mi({id:d.id+"--status-code-must-be-number",message:`Entity of type ${d.type} with id "${d.id}" has an invalid value "${p}". The value must be a number.`,severity:pe.Error,code:"status-code-must-be-number",entity:d});return i.push(n),{errors:i,override:p}}if(p<100){const n=new Mi({id:d.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${d.type} with id "${d.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:pe.Error,code:"status-code-must-be-between-100-and-599",entity:d});i.push(n)}if(p>599){const n=new Mi({id:d.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${d.type} with id "${d.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:pe.Error,code:"status-code-must-be-between-100-and-599",entity:d});i.push(n)}return{errors:i,override:p}}class hKe extends Po{constructor(i){var e,y;super(xa,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",xa.description);I(this,"type",o.BuiltInBaseEntity);I(this,"abstract",xa.abstract);I(this,"static",xa.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=xa,this.project=i,this.id=xa.id,this.version=xa.version,this.name=xa.name,this.static=xa.static,this.abstract=xa.abstract,this.properties=this.initialData.properties.map(m=>{const v=ye(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=ye(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=ye(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project));const n=this.properties.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!n)throw new Error("Path property not found in endpoint entity");n._codeNativeValueValidation=(m,v)=>{const E=hx(m,v);if(m.project.entities.filter(w=>Si(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const P=w.properties.find(U=>U.implements.find(K=>K.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!P)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=P.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new Mi({id:m.id+"--"+sa.MustBeUniqueAmongSameEntities,message:`Entity of type ${m.type} with id "${m.id}" has an invalid value "${v}". The value must be unique among all endpoint paths.`,severity:pe.Error,code:sa.MustBeUniqueAmongSameEntities,entity:m});E.errors.push(w)}return E};const s=this.abstractMethods.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!s)throw new Error("Handler method not found in endpoint entity");const c=(((y=(e=s.dataType)==null?void 0:e.entity)==null?void 0:y.properties)||[]).find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.dataType.entity.properties.statusCode.id);if(!c)throw new Error("Status code output not found in handler method");c._codeNativeValueValidation=(m,v)=>yKe(m,v)}}var Ba=(d=>(d.UUIDMustBeString="uuid-must-be-string",d.UUIDMustBeValidFormat="uuid-must-be-valid-format",d.UUIDMustNotContainSpaces="uuid-must-not-contain-spaces",d))(Ba||{});function jUi(d,p){const i=[];if(typeof p!="string"){const s=new Mi({id:d.id+"--uuid-must-be-string",message:`Entity of type ${d.type} with id "${d.id}" has an invalid value "${p}". The value must be text.`,severity:pe.Error,code:"uuid-must-be-string",entity:d});return i.push(s),{errors:i,override:p}}const n=hx(d,p);if(n.errors.length>0)return i.push(...n.errors),{errors:i,override:p};if(!Mx(p)){const s=new Mi({id:d.id+"--uuid-must-be-valid-format",message:`Entity of type ${d.type} with id "${d.id}" has an invalid value "${p}". The value must be a valid UUID format. Eg: "123e4567-e89b-12d3-a456-426614174000".`,severity:pe.Error,code:"uuid-must-be-valid-format",entity:d});i.push(s)}return{errors:i,override:p}}class UUi extends Po{constructor(i){super(An,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",An.description);I(this,"type",o.BuiltInBaseEntity);I(this,"abstract",An.abstract);I(this,"static",An.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=An,this.project=i,this.id=An.id,this.version=An.version,this.name=An.name,this.static=An.static,this.abstract=An.abstract,this.properties=this.initialData.properties.map(s=>{const c=ye(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=ye(s,this.project);return c.parent=this,c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=ye(s,this.project);return c.parent=this,c}),this.initialData.extends&&(this.extends=ye(this.initialData.extends,this.project));const n=this.properties.find(s=>s.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id);if(!n)throw new Error("Path property not found in endpoint entity");n._codeNativeValueValidation=(s,c)=>Jje(s,c)}}const KUi=[];function mKe(d){const p=[new fKe(d),new hKe(d),new UUi(d)];return rV.forEach(i=>{!p.some(n=>n.id===i.id)&&!KUi.includes(i.id)&&p.push(new Po(i,d))}),p.forEach(i=>{d.subscribeBuiltInInstance(i)}),d.builtInBaseEntities=p,p}function TKe(d){const p=[new ma(ue,d),new ma(st,d),new ma(we,d),new ma(ba,d),new ma(ht,d),new ma(It,d),new ma(at,d),new ma(Il,d),new ma(qi,d)];return p.forEach(i=>{d.subscribeBuiltInInstance(i)}),d.primitives=p,p}function vKe(d){const p=[new $i(CI,d)];return p.forEach(i=>{i.initChildren(null),d.subscribeBuiltInInstance(i)}),d.globalEventActionDescriptors=p,p}function EKe(d){const p=[new $i(WT,d),new $i(Hc,d),new $i(ZT,d),new $i(bh,d),new $i(Ah,d),new $i(dI,d)];p.forEach(n=>{n.initChildren(null),d.subscribeBuiltInInstance(n)}),d.loopDeclarations=p;const i=[new $i(EI,d),new $i(HT,d),new $i(fI,d),new $i(BP,d),new $i(jP,d),new $i(uI,d)];return i.forEach(n=>{n.initChildren(null),d.subscribeBuiltInInstance(n)}),d.loopDeclarationsBodies=i,p}function bKe(d){const p=[new Td(uV,d)];return p.forEach(i=>{i.initChildren(null),d.subscribeBuiltInInstance(i)}),d.valueDescriptors=p,p}function AKe(d){const p=[new $i(aV,d),new $i(nV,d),new $i(sV,d),new $i(lV,d)];return oV.forEach(i=>{p.some(n=>n.id===i.id)||p.push(new $i(i,d))}),p.forEach(i=>{i.initChildren(null),d.subscribeBuiltInInstance(i)}),d.conditionDeclarations=p,p}const mc={},Cb={},Hm={empty:!1,enrich:!0,mock:!1,ignoreCache:!1,onFetch:async()=>null,manuallyInit:!1};function gKe(d,p={enrich:!0,shallowErrors:!1},i){const n={enrich:!0,shallowErrors:!1,...p},{enrich:s,shallowErrors:c}=n,e=d.project,y=d.record,m=j1(d.project,{shallowErrors:c},i);m.instances[e.id]=m;const v=new Yn(e,{allBuiltInEntityIds:m.diggestedBuiltInBaseEntitiesIds}),E=new Set;y[e.id]=e,E.add(e.id);const b=M().toISOString();Object.values(y).forEach(P=>{!P||v.allBuiltInEntityIds.has(P.id)||E.add(P.id)}),v.order=Array.from(E),v.flatRecord=y,v.orderEntities();const w=s?m.addChangeSet(new q(m,x.sessionAuthor,b,m,!0,"project-init-from-fetch-result")):null;return v.visit(P=>{if(P.id===m.id)return;const $=ye(P,m);try{$.hydrateAncestors(),$.addSelfToProject(null);const L=fd(P);Object.keys(L.downstream).forEach(U=>{const K=m.get(U);K&&K.hydrateAncestors()})}catch(L){if(c)J.Logger.error("Error hydrating ancestors: ",L);else throw L}}),s?(v.visit(P=>{if(P.id===m.id)return;const $=m.get(P.id);$&&$.afterAllChildrenInitialized(w)}),m.afterAllChildrenInitialized(w)):df(m,b).forEach($=>{$.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(P=>{P.previousVersion=null}),m.initialized=!0,w==null||w.attemptAutoclose("project-init-from-fetch-result",m.id),m}async function FUi(d,p={enrich:!0,shallowErrors:!1,yieldEvery:100},i){const n={enrich:!0,shallowErrors:!1,yieldEvery:100,...p},{enrich:s,shallowErrors:c,yieldEvery:e}=n,y=d.project,m=d.record,v=await U1(d.project,{shallowErrors:c,yieldEvery:e},i);v.instances[y.id]=v;const E=new Yn(void 0,{allBuiltInEntityIds:v.diggestedBuiltInBaseEntitiesIds});await E.flattenAsync(y,{yieldEvery:e}),await E.orderEntitiesAsync({yieldEvery:e});const b=new Set;m[y.id]=y,b.add(y.id);const w=M().toISOString();let P=0;for(const[U,K]of Object.entries(m))!K||E.allBuiltInEntityIds.has(K.id)||(b.add(K.id),++P%e===0&&await J.yieldToEventLoop());E.order=Array.from(b),E.flatRecord=m,await E.orderEntitiesAsync();const $=s?v.addChangeSet(new q(v,x.sessionAuthor,w,v,!0,"project-init-from-fetch-result")):null;await E.visitAsync(U=>{if(U.id===v.id)return;const K=ye(U,v);try{K.hydrateAncestors(),K.addSelfToProject(null);const H=fd(U);Object.keys(H.downstream).forEach(X=>{const se=v.get(X);se&&se.hydrateAncestors()})}catch(H){if(c)J.Logger.error("Error hydrating ancestors: ",H);else throw H}},{yieldEvery:e}),s?(await E.visitAsync(U=>{if(U.id===v.id)return;const K=v.get(U.id);K&&K.afterAllChildrenInitialized($)},{yieldEvery:e}),v.afterAllChildrenInitialized($)):df(v,w).forEach(K=>{K.remove({ignoreUpstream:!0},null)});let L=0;for(const U of v.instancesList)U.previousVersion=null,++L%e===0&&await J.yieldToEventLoop();return v.initialized=!0,$==null||$.attemptAutoclose("project-init-from-fetch-result",v.id),v}async function SUi(d,p=Hm){const i={...Hm,...p};if(i.empty)return{data:{project:{id:d.id,deletable:!0,editable:!0,type:o.Project,version:x.UUID.uuid(),createdAt:M().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]},record:{}}};if(i.mock){const s={...JV};return s.id=d.id,{data:{project:s,record:{}}}}return J.Logger.log("Fetching project from external API"),new Promise(async s=>{try{if(i.onFetch){const c=await i.onFetch(d.id);if(c){s({data:c});return}}else s({data:null})}catch(c){J.Logger.error("Error fetching project: ",c),s({data:null})}})}function j1(d,p={shallowErrors:!1},i){const n=new x(d,i);TKe(n),mKe(n),cKe(n),vKe(n),EKe(n),bKe(n),AKe(n);const s=p.allBuiltInIds??new Set([...n.getAllBuiltInIds(),...V1()]);return n.diggestedBuiltInBaseEntitiesIds=s,s.forEach(c=>{if(!n.builtInInstances[c]&&n.instances[c])n.builtInInstances[c]=n.instances[c],delete n.instances[c];else if(!n.builtInInstances[c]&&!p.shallowErrors)throw new Error(`Built in entity was not properly initialized: ${c}`)}),n.instances[n.id]=n,n}async function U1(d,p={shallowErrors:!1,yieldEvery:100},i){const n=new x(d,i);TKe(n),mKe(n),await J.yieldToEventLoop(),cKe(n),await J.yieldToEventLoop(),vKe(n),EKe(n),bKe(n),AKe(n),await J.yieldToEventLoop();const s=p.allBuiltInIds??new Set([...n.getAllBuiltInIds(),...await N1()]);if(n.diggestedBuiltInBaseEntitiesIds=s,s.has("change-bank-account-owner-function-return-statement-id"))throw new Error("Debug 3");let c=0;const{yieldEvery:e=100}=p;for(const y of s){if(!n.builtInInstances[y]&&n.instances[y])n.builtInInstances[y]=n.instances[y],delete n.instances[y];else if(!n.builtInInstances[y]&&!p.shallowErrors)throw new Error(`Built in entity was not properly initialized: ${y}`);++c%e===0&&await J.yieldToEventLoop()}return n.instances[n.id]=n,n}function df(d,p){return d.instancesList.filter(n=>M(n.createdAt).isAfter(M(p)||!!n.previousVersion))}function qUi(d,{enrich:p,shallowErrors:i}={enrich:!0,shallowErrors:!1},n){const s=new Map,c=new Map;Object.keys(d.instances).forEach(b=>{if(d.diggestedBuiltInBaseEntitiesIds.has(b)){s.set(b,b),c.set(b,b);return}const w=d.get(b);if(!Cx(w,{...d.instances,...d.builtInInstances}).every(U=>!d.diggestedBuiltInBaseEntitiesIds.has(U))){s.set(b,b),c.set(b,b);return}const L=x.UUID.uuid();s.set(b,L),c.set(L,b)});const e=M().toISOString(),y=d.toShallowJSON({seenEntityMaps:s});y.previousVersion=null,y.createdAt=e,y.version=x.UUID.uuid();const m=j1(y,{shallowErrors:i,allBuiltInIds:d.diggestedBuiltInBaseEntitiesIds},n);m.instances[m.id]=m;const v=p?m.addChangeSet(new q(m,x.sessionAuthor,e,m,!0,"project-clone")):null,E=new Yn(d,{allBuiltInEntityIds:d.diggestedBuiltInBaseEntitiesIds});return E.visit(b=>{const w=b.toShallowJSON({seenEntityMaps:s});w.previousVersion=null,w.createdAt=e,w.version=x.UUID.uuid();const P=fd(w,bx(E.flatRecord,s));if(Object.keys(P.upstream).length){let L=!1;if(Object.keys(P.upstream).forEach(U=>{if(!L&&(!m.get(U)||m.getDeleted(U))){L=!0;return}}),L)return}const $=ye(w,m);$.hydrateAncestors(),$.addSelfToProject(v),v==null||v.add($,Z.Added)}),p?(E.visit(b=>{if(b.id===m.id)return;const w=m.get(s.get(b.id));w&&w.afterAllChildrenInitialized(v)}),m.afterAllChildrenInitialized(v)):df(m,e).forEach(w=>{w.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(b=>{b.previousVersion=null}),v==null||v.attemptAutoclose("project-clone",m.id),m}async function ZUi(d,{enrich:p,shallowErrors:i,...n}={enrich:!0,shallowErrors:!1,yieldEvery:100},s){const c=new Map,e=new Map,{yieldEvery:y=100}=n;Object.keys(d.instances).forEach($=>{if(d.diggestedBuiltInBaseEntitiesIds.has($)){c.set($,$),e.set($,$);return}const L=x.UUID.uuid();c.set($,L),e.set(L,$)});const m=M().toISOString(),v=d.toShallowJSON({seenEntityMaps:c});v.previousVersion=null,v.createdAt=m,v.version=x.UUID.uuid();const E=await U1(v,{shallowErrors:i,yieldEvery:y},s);E.diggestedBuiltInBaseEntitiesIds=d.diggestedBuiltInBaseEntitiesIds,E.instances[E.id]=E;const b=p?E.addChangeSet(new q(E,x.sessionAuthor,m,E,!0,"project-clone")):null,w=new Yn(void 0,{allBuiltInEntityIds:d.diggestedBuiltInBaseEntitiesIds});await w.flattenAsync(d,{yieldEvery:y}),await w.orderEntitiesAsync({yieldEvery:y}),await w.visitAsync($=>{const L=$.toShallowJSON({seenEntityMaps:c});L.previousVersion=null,L.createdAt=m,L.version=x.UUID.uuid();const U=fd(L,bx(w.flatRecord,c));if(Object.keys(U.upstream).length){let H=!1;if(Object.keys(U.upstream).forEach(X=>{if(!H&&(!E.get(X)||E.getDeleted(X))){H=!0;return}}),H)return}const K=ye(L,E);K.hydrateAncestors(),K.addSelfToProject(b),b==null||b.add(K,Z.Added)},{yieldEvery:y}),p?(await w.visitAsync($=>{if($.id===E.id)return;const L=E.get(c.get($.id));L&&L.afterAllChildrenInitialized(b)},{yieldEvery:y}),E.afterAllChildrenInitialized(b)):df(E,m).forEach(L=>{L.remove({ignoreUpstream:!0},null)});let P=0;for(const $ of E.instancesList)$.previousVersion=null,++P%y===0&&await J.yieldToEventLoop();return b==null||b.attemptAutoclose("project-clone",E.id),E}function IKe(d,{enrich:p,shallowErrors:i}={enrich:!0,shallowErrors:!1},n){const s=j1(d,{shallowErrors:i},n),c=M().toISOString(),e=p?s.addChangeSet(new q(s,x.sessionAuthor,c,s,!0,"project-init")):null;e&&(e.type=HI.Automatic);const y=new Yn(d,{allBuiltInEntityIds:s.diggestedBuiltInBaseEntitiesIds});return y.visit(m=>{const v=ye(m,s);v.hydrateAncestors(),v.addSelfToProject(e)}),p?(y.visit(m=>{if(m.id===s.id)return;const v=s.get(m.id);v&&v.afterAllChildrenInitialized(e)}),s.afterAllChildrenInitialized(e)):(df(s,c).forEach(E=>{E.remove({ignoreUpstream:!0},null)}),new Yn(s,{allBuiltInEntityIds:s.diggestedBuiltInBaseEntitiesIds}).visit(E=>{E.initialized=!0,E.captureVersion()})),s.initialized=!0,e==null||e.attemptAutoclose("project-init",s.id),s}async function HUi(d,{enrich:p,shallowErrors:i,yieldEvery:n}={enrich:!0,shallowErrors:!1,yieldEvery:100},s){const c=await U1(d,{shallowErrors:i,yieldEvery:n},s),e=M().toISOString(),y=p?c.addChangeSet(new q(c,x.sessionAuthor,e,c,!0,"project-init")):null;y&&(y.type=HI.Automatic);const m=new Yn(void 0,{allBuiltInEntityIds:c.diggestedBuiltInBaseEntitiesIds});if(await m.flattenAsync(d,{yieldEvery:n}),await m.orderEntitiesAsync({yieldEvery:n}),await m.visitAsync(v=>{const E=ye(v,c);E.hydrateAncestors(),E.addSelfToProject(y)},{yieldEvery:n}),p)await m.visitAsync(v=>{if(v.id===c.id)return;const E=c.get(v.id);E&&E.afterAllChildrenInitialized(y)},{yieldEvery:n}),c.afterAllChildrenInitialized(y);else{df(c,e).forEach(b=>{b.remove({ignoreUpstream:!0},null)});const E=new Yn(void 0,{allBuiltInEntityIds:c.diggestedBuiltInBaseEntitiesIds});await E.flattenAsync(c,{yieldEvery:n}),await E.orderEntitiesAsync({yieldEvery:n}),await E.visitAsync(b=>{b.initialized=!0,b.captureVersion()},{yieldEvery:n})}return c.initialized=!0,y==null||y.attemptAutoclose("project-init",c.id),c}async function WUi(d,p=Hm,i){const n={...Hm,...p};if(d.id&&mc[d.id]&&!n.ignoreCache)return mc[d.id];if(d.id&&Cb[d.id]&&!n.ignoreCache)return await Cb[d.id],mc[d.id];const s=SUi(d,n);d.id&&(Cb[d.id]=s);const c=await s;if(c.data){let e;return n.mock?e=IKe(JV,{enrich:!!n.enrich},i):c.data instanceof x?e=c.data:e=gKe(c.data,{enrich:!!n.enrich},i),mc[d.id]=e,d.id&&delete Cb[d.id],e}return null}function zUi(d){return mc[d.id]&&delete mc[d.id],null}exports.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=lC;exports.ALL_BUILT_EXTERNAL_AUTH_PROVIDERS=Eme;exports.ALL_BUILT_IN_BASE_ENTITIES=rV;exports.ALL_BUILT_IN_CONDITION_ENTITIES=oV;exports.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=zDe;exports.ALL_BUILT_IN_LOOP_BODY_ENTITIES=r1e;exports.ALL_BUILT_IN_LOOP_ENTITIES=i1e;exports.ALL_BUILT_IN_OPERATION_ENTITIES=VP;exports.ALL_BUILT_IN_PRIMITIVE_ENTITIES=Zk;exports.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=pV;exports.ALL_BUILT_IN_VALUE_DESCRIPTORS=XDe;exports.ALL_CONNECTION_DISABLED_REASONS=HMi;exports.ALL_OTHER_DISABLED_REASONS=zMi;exports.ALL_TESTING_DISABLED_REASONS=WMi;exports.ActionDescriptorState=$i;exports.ActionInputMapState=p4i;exports.ActionOutputMapState=y4i;exports.Area=bn;exports.ArgumentDeclarationDependencyField=U_e;exports.ArgumentDeclarationState=Ea;exports.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Hki;exports.BUILT_INT_CONDITIONS_IMPLEMENTATIONS__PREFIX=Na;exports.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PREFIX=Oe;exports.BUILT_IN_BASE_ENTITY_IDS=Q;exports.BUILT_IN_ENTITY_TYPES=Hn;exports.BUILT_IN_FUNCTION_IMPLEMENTATIONS__PREFIX=ay;exports.BaseCanvasDraggableState=DUi;exports.BaseEntityNames=Re;exports.BaseExtensionState=OPe;exports.BaseRegisteredExtension=ge;exports.BaseState=lKe;exports.BaseValueDescriptorIds=PA;exports.BreakStatementDependencyField=_4e;exports.BreakStatementState=xu;exports.BuiltInBaseEntityState=Po;exports.BuiltInFunctionIds=Mr;exports.BuiltInFunctionImplementationAbortExecutionModule=_Pe;exports.BuiltInFunctionImplementationCreatePersistedEntityModule=VPe;exports.BuiltInFunctionImplementationDeletePersistedEntityModule=PPe;exports.BuiltInFunctionImplementationUpdatePersistedEntityModule=NPe;exports.CACHED_PROJECTS_BY_ID=mc;exports.CALLABLE_ENTITIES_EXPLANATION=Zki;exports.CALLABLE_TYPES=Jr;exports.CALLER_ENTITIES_EXPLANATION=Lke;exports.CALLER_TYPES=Sr;exports.CALLS_UPDATE_EXPLANATION=fu;exports.CANVAS_BASE_X=pBe;exports.CANVAS_BASE_Y=cBe;exports.CANVAS_CARD_HEADER_CENTER_HEIGHT=sy;exports.CANVAS_CARD_WIDTH=oBe;exports.CANVAS_COMPLEX_CARD_HEIGHT=UMi;exports.CANVAS_HORIZONTAL_BUFFER_BETWEEN_CARDS=WO;exports.CANVAS_SIMPLE_CARD_HEIGHT=CN;exports.CANVAS_SIZE=ON;exports.CANVAS_VERTICAL_BUFFER_BETWEEN_CARDS=Bb;exports.CARD_FOOTER_HEIGHT=lA;exports.CARD_PROPERTIES_SECTION_PADDING=ld;exports.CARD_PROPERTIES_SECTION_SINGLE_PADDING=_N;exports.CHILDREN_TYPES=m5t;exports.COMPARISON_OPERATIONS=Ufe;exports.CONDITIONS=qDe;exports.CRYPTO_OPERATIONS=zue;exports.CallableEntityClass=OUi;exports.CallerEntityClass=Ux;exports.CanvasEntityConnectionDisabledReason=PN;exports.CanvasEntityOtherDisabledReason=NN;exports.CanvasEntityTestingDisabledReason=VN;exports.ChangeSet=q;exports.ChangeSetChangeCaptureType=HI;exports.ChangeSetEntityChangeType=Z;exports.ChangeSetEvent=M_e;exports.ChildEntityBaseClass=wUi;exports.CloudHostedCodebaseInfrastructureResource=bBe;exports.CommonStringValidationErrorCodes=sa;exports.ComparisonOperations=Vt;exports.CompiledLocalCodebaseInfrastructureResource=ABe;exports.ConditionDependencyField=lPe;exports.ConditionState=wu;exports.ContinueStatementDependencyField=N4e;exports.ContinueStatementState=$u;exports.CryptoOperations=ni;exports.DATA_TYPE_OPERATIONS=lhe;exports.DATE_OPERATIONS=Tne;exports.DEFAULT_BASE_EXTENSIONS_CONTEXT=IN;exports.DEFAULT_EXECUTION_INSTANCE_PARENT_CONTEXT=sBe;exports.DEFAULT_MODULE_IDS=Ae;exports.DEFAULT_PROJECT_INSTANCE_PARENT_CONTEXT=oKe;exports.DEFAULT_PROJECT_STATIC_PARENT_CONTEXT=Kx;exports.DEFAULT_UUID_MODULE=fC;exports.DRAGGABLE_CALLABLE_TYPES=hC;exports.DRAGGABLE_CALLER_TYPES=Mk;exports.DRAGGABLE_ELEMENT_TYPES=Wm;exports.DRAGGABLE_EXECUTABLE_TYPES=u5t;exports.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=CA;exports.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=yC;exports.DataTypeCompatibilityTypes=Ms;exports.DataTypeDependencyField=Bx;exports.DataTypeOperations=He;exports.DataTypeParentChildRelation=qe;exports.DataTypeState=tr;exports.DateOperations=j;exports.DefaultEditorContext=ZO;exports.DefaultProjectLogicContext=BO;exports.DefaultPublicationRunContext=HO;exports.DefinitionEntityDependencyField=IA;exports.DefinitionEntityState=us;exports.DynamicValueTypes=Le;exports.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=gUi;exports.ENTITIES_WITH_VALLUES_EXPLANATION=cA;exports.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=Ge;exports.ENTITY_RECUSION_OPTIONS_DEFAULTS=pt;exports.ENTITY_TYPES=y5t;exports.ENTITY_WITH_CODE_NAMES_TYPES=h5t;exports.ENTITY_WITH_DECLARATION_TYPES=f5t;exports.ENTITY_WITH_DEFAULT_VALUE_TYPES=_A;exports.ENTITY_WITH_LOGIC_SCOPE_TYPES=dr;exports.ENTITY_WITH_NAMES_TYPES=kk;exports.ENTITY_WITH_PARENT_TYPES=p5t;exports.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=Gk;exports.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=c5t;exports.ENTITY_WITH_VALUE_TYPES=Bk;exports.ENTRY_POINT_ENTITIES_EXPLANATION=Pv;exports.ENTRY_POINT_TYPES=Yt;exports.ERROR_PROPERTY_HEIGHT=Mb;exports.EVENT_TYPES=ju;exports.EXECUTABLE_TYPES=mC;exports.EXECUTION_OPERATIONS=kne;exports.EXTERNAL_INTERGRATION_OPERATIONS=Hge;exports.EfimeralValueStore=Im;exports.EndpointEntity=hKe;exports.EntityError=Mi;exports.EntityErrorSeverity=pe;exports.EntityGenerationError=De;exports.EntityGenerationErrorCode=ne;exports.EntityInstanceErrorCode=he;exports.EntityType=o;exports.EntityWithDefaultValueClass=PUi;exports.EntityWithLogicScopeClass=VUi;exports.EntryPointEntityClass=CUi;exports.Execution=mu;exports.ExecutionOperations=ki;exports.ExecutionState=RN;exports.ExecutionTerminationType=G;exports.ExtensionContextBase=WI;exports.ExtensionContextType=Y;exports.ExtensionPermissions=be;exports.ExtensionState=CPe;exports.ExtensionsRegistry=gN;exports.ExtentionPriority=Ee;exports.ExternalIntegrationAliasMaps=ohe;exports.ExternalIntegrationAliasProviders=oP;exports.ExternalIntegrationNames=Dr;exports.ExternalIntegrationOperations=Xt;exports.ExternalIntegrationRootProviders=lP;exports.FORBIDDEN_KEYWORDS=qke;exports.FunctionCallDependencyField=px;exports.FunctionCallState=Bu;exports.FunctionDeclarationDependencyField=Z_e;exports.FunctionDeclarationState=_o;exports.GET_PROJECT_OPTIONS_DEFAULTS=Hm;exports.GLOBAL_EVENT_DECLARATIONS=WDe;exports.GOOGLE_DRIVE_MIME_TYPES=qT;exports.GOOGLE_DRIVE_SMART_FETCH_MODE_OPTIONS=RAe;exports.GROUP_CONDITIONS=BDe;exports.GlobalEventNames=Al;exports.GlobalEventState=Ru;exports.GoogleDriveMimeType=PP;exports.GroupOperatorTypes=lr;exports.HTTPOperations=zn;exports.HTTPStatucCodeValidationErrorCodes=Vo;exports.HTTP_OPERATIONS=yoe;exports.HttpApiInfrastructureResource=vBe;exports.HttpEndpointInfrastructureResource=eBi;exports.InfrastructureResource=rf;exports.InfrastructureResourceStatus=TBe;exports.InputMapDependencyField=b4e;exports.InputMapParentChildRelation=yd;exports.InputMapState=ds;exports.InstalledProjectState=Vu;exports.InternalCallDependencyField=T4e;exports.InternalCallState=Nu;exports.JSON_OPERATIONS=upe;exports.JWT_OPERATIONS=Wce;exports.JsonOperations=Xr;exports.JwtOperations=Yi;exports.LIST_OPERATIONS=RY;exports.ListOperations=ie;exports.LiteralValueDependencyField=w4e;exports.LiteralValueState=Yr;exports.LoopDependencyField=nPe;exports.LoopState=Du;exports.LoopTypes=lt;exports.MAIN_VALUE_PROPERTY_HEADER_HEIGHT=sA;exports.MAIN_VALUE_SUB_PROPERTY_HEIGHT=KMi;exports.NESTED_PROPERTY_HEIGHT=dBe;exports.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Mu;exports.NUMBER_OPERATIONS=d3;exports.NumberOperations=te;exports.OBJECT_OPERATIONS=Ple;exports.OPERATION_DECLARATIONS=Wge;exports.ObjectOperations=Ce;exports.OperationDependencyField=z_e;exports.OperationState=Iu;exports.OperationsImplementationsComparisonEmptyModule=DLi;exports.OperationsImplementationsComparisonNotEmptyModule=wLi;exports.OperationsImplementationsComparisonPrimitiveEqualModule=GO;exports.OperationsImplementationsComparisonPrimitiveNotEqualModule=kO;exports.OperationsImplementationsCryptoConstantTimeEqualModule=YMe;exports.OperationsImplementationsCryptoDeriveKeyPBKDF2Module=XMe;exports.OperationsImplementationsCryptoGenerateRandomBytesModule=OMe;exports.OperationsImplementationsCryptoHashModule=zMe;exports.OperationsImplementationsCryptoHmacModule=JMe;exports.OperationsImplementationsDataTypeDecodeBase64Module=SMe;exports.OperationsImplementationsDataTypeDecodeBase64UrlModule=ZMe;exports.OperationsImplementationsDataTypeDecodeHexModule=WMe;exports.OperationsImplementationsDataTypeEncodeBase64Module=FMe;exports.OperationsImplementationsDataTypeEncodeBase64UrlModule=qMe;exports.OperationsImplementationsDataTypeEncodeHexModule=HMe;exports.OperationsImplementationsDataTypeFromBytesToStringModule=KMe;exports.OperationsImplementationsDataTypeGetTypeOfModule=GMe;exports.OperationsImplementationsDataTypeToBytesModule=UMe;exports.OperationsImplementationsDataTypeToNumberModule=jMe;exports.OperationsImplementationsDataTypeToStringModule=kMe;exports.OperationsImplementationsDateAddBusinessDaysModule=SNe;exports.OperationsImplementationsDateAddToDateModule=QVe;exports.OperationsImplementationsDateClampToRangeModule=GNe;exports.OperationsImplementationsDateConvertTimezoneModule=WNe;exports.OperationsImplementationsDateDifferenceBetweenDatesModule=tNe;exports.OperationsImplementationsDateEndOfModule=CNe;exports.OperationsImplementationsDateFormatDateModule=YVe;exports.OperationsImplementationsDateFromNowModule=UNe;exports.OperationsImplementationsDateFromUnixModule=rNe;exports.OperationsImplementationsDateGetCurrentIanaTimeZoneModule=TNe;exports.OperationsImplementationsDateGetCurrentTimestampModule=JVe;exports.OperationsImplementationsDateGetDateModule=lNe;exports.OperationsImplementationsDateGetDayOfYearModule=hNe;exports.OperationsImplementationsDateGetDaysInMonthModule=mNe;exports.OperationsImplementationsDateGetHourModule=oNe;exports.OperationsImplementationsDateGetIsoWeekdayModule=cNe;exports.OperationsImplementationsDateGetMillisecondModule=pNe;exports.OperationsImplementationsDateGetMinuteModule=dNe;exports.OperationsImplementationsDateGetMonthModule=sNe;exports.OperationsImplementationsDateGetQuarterModule=yNe;exports.OperationsImplementationsDateGetSecondModule=uNe;exports.OperationsImplementationsDateGetTimezoneOffsetModule=zNe;exports.OperationsImplementationsDateGetWeekOfYearModule=fNe;exports.OperationsImplementationsDateGetYearModule=aNe;exports.OperationsImplementationsDateHumanizeDiffModule=FNe;exports.OperationsImplementationsDateIsAfterModule=VNe;exports.OperationsImplementationsDateIsBeforeModule=PNe;exports.OperationsImplementationsDateIsBetweenModule=LNe;exports.OperationsImplementationsDateIsLeapYearModule=BNe;exports.OperationsImplementationsDateIsSameModule=NNe;exports.OperationsImplementationsDateIsSameOrAfterModule=$Ne;exports.OperationsImplementationsDateIsSameOrBeforeModule=xNe;exports.OperationsImplementationsDateIsValidModule=MNe;exports.OperationsImplementationsDateMaxOfModule=jNe;exports.OperationsImplementationsDateMinOfModule=kNe;exports.OperationsImplementationsDateNextWeekdayModule=qNe;exports.OperationsImplementationsDateParseDateModule=XVe;exports.OperationsImplementationsDatePreviousWeekdayModule=ZNe;exports.OperationsImplementationsDateRoundToModule=_Ne;exports.OperationsImplementationsDateSetDateModule=bNe;exports.OperationsImplementationsDateSetHourModule=ANe;exports.OperationsImplementationsDateSetIsoWeekdayModule=DNe;exports.OperationsImplementationsDateSetMillisecondModule=RNe;exports.OperationsImplementationsDateSetMinuteModule=gNe;exports.OperationsImplementationsDateSetMonthModule=ENe;exports.OperationsImplementationsDateSetQuarterModule=wNe;exports.OperationsImplementationsDateSetSecondModule=INe;exports.OperationsImplementationsDateSetUTCOffsetModule=JNe;exports.OperationsImplementationsDateSetYearModule=vNe;exports.OperationsImplementationsDateStartOfModule=ONe;exports.OperationsImplementationsDateSubtractFromDateModule=eNe;exports.OperationsImplementationsDateToDateModule=YLi;exports.OperationsImplementationsDateToISOStringModule=nNe;exports.OperationsImplementationsDateToNowModule=KNe;exports.OperationsImplementationsDateToUTCModule=HNe;exports.OperationsImplementationsDateToUnixModule=iNe;exports.OperationsImplementationsExecutionParallelModule=YNe;exports.OperationsImplementationsExecutionSequentialModule=XNe;exports.OperationsImplementationsExecutionWaitModule=QNe;exports.OperationsImplementationsHttpRequestModule=P2e;exports.OperationsImplementationsJsonParseModule=QMe;exports.OperationsImplementationsJsonStringifyModule=eBe;exports.OperationsImplementationsJwtBuildHmacModule=tBe;exports.OperationsImplementationsJwtDecodeModule=rBe;exports.OperationsImplementationsJwtVerifyHmacModule=iBe;exports.OperationsImplementationsListAddAtIndexModule=Sxe;exports.OperationsImplementationsListAppendModule=Xxe;exports.OperationsImplementationsListChunkModule=c$e;exports.OperationsImplementationsListConcatModule=a$e;exports.OperationsImplementationsListContainsAllModule=T$e;exports.OperationsImplementationsListContainsAnyModule=v$e;exports.OperationsImplementationsListContainsModule=m$e;exports.OperationsImplementationsListDeleteAtIndexModule=t$e;exports.OperationsImplementationsListDeleteFirstNItemsModule=Fxe;exports.OperationsImplementationsListDeleteLastNItemsModule=Kxe;exports.OperationsImplementationsListFlattenModule=d$e;exports.OperationsImplementationsListGetFirstModule=Jxe;exports.OperationsImplementationsListGetFirstNItemsModule=i$e;exports.OperationsImplementationsListGetIndexItemModule=zxe;exports.OperationsImplementationsListGetIndexOfModule=s$e;exports.OperationsImplementationsListGetLastIndexOfModule=l$e;exports.OperationsImplementationsListGetLastModule=Yxe;exports.OperationsImplementationsListGetLastNItemsModule=r$e;exports.OperationsImplementationsListGetLengthModule=e$e;exports.OperationsImplementationsListJoinModule=kxe;exports.OperationsImplementationsListPadEndModule=y$e;exports.OperationsImplementationsListPadStartModule=f$e;exports.OperationsImplementationsListPrependModule=Qxe;exports.OperationsImplementationsListRepeatModule=h$e;exports.OperationsImplementationsListReplaceAllModule=Wxe;exports.OperationsImplementationsListReplaceAtIndexModule=qxe;exports.OperationsImplementationsListReplaceFirstNItemsModule=Zxe;exports.OperationsImplementationsListReplaceLastNItemsModule=Hxe;exports.OperationsImplementationsListReverseModule=Uxe;exports.OperationsImplementationsListShuffleModule=p$e;exports.OperationsImplementationsListSliceModule=n$e;exports.OperationsImplementationsListSortModule=u$e;exports.OperationsImplementationsListSplitModule=jxe;exports.OperationsImplementationsListUniqueModule=o$e;exports.OperationsImplementationsNumberAbsoluteModule=OLe;exports.OperationsImplementationsNumberAcosModule=YLe;exports.OperationsImplementationsNumberAdditionModule=bLe;exports.OperationsImplementationsNumberAsinModule=JLe;exports.OperationsImplementationsNumberAtan2Module=QLe;exports.OperationsImplementationsNumberAtanModule=XLe;exports.OperationsImplementationsNumberAverageModule=BLe;exports.OperationsImplementationsNumberCeilModule=VLe;exports.OperationsImplementationsNumberClampModule=LLe;exports.OperationsImplementationsNumberCosModule=WLe;exports.OperationsImplementationsNumberCubeRootModule=KLe;exports.OperationsImplementationsNumberDivisionModule=ILe;exports.OperationsImplementationsNumberExpModule=SLe;exports.OperationsImplementationsNumberExponentiationModule=DLe;exports.OperationsImplementationsNumberFloorModule=PLe;exports.OperationsImplementationsNumberLessThanModule=r2e;exports.OperationsImplementationsNumberLessThanOrEqualModule=a2e;exports.OperationsImplementationsNumberLog10Module=ZLe;exports.OperationsImplementationsNumberLogNaturalModule=qLe;exports.OperationsImplementationsNumberMapRangeModule=MLe;exports.OperationsImplementationsNumberMaxOfModule=jLe;exports.OperationsImplementationsNumberMedianModule=GLe;exports.OperationsImplementationsNumberMinOfModule=kLe;exports.OperationsImplementationsNumberMoreThanModule=n2e;exports.OperationsImplementationsNumberMoreThanOrEqualModule=s2e;exports.OperationsImplementationsNumberMultiplicationModule=gLe;exports.OperationsImplementationsNumberNegateModule=wLe;exports.OperationsImplementationsNumberNthRootModule=FLe;exports.OperationsImplementationsNumberPercentOfModule=i2e;exports.OperationsImplementationsNumberPercentageChangeModule=UO;exports.OperationsImplementationsNumberRemainderModule=RLe;exports.OperationsImplementationsNumberRoundModule=_Le;exports.OperationsImplementationsNumberRoundToDecimalsModule=xLe;exports.OperationsImplementationsNumberSignModule=CLe;exports.OperationsImplementationsNumberSinModule=HLe;exports.OperationsImplementationsNumberSnapToStepModule=$Le;exports.OperationsImplementationsNumberSquareRootModule=ULe;exports.OperationsImplementationsNumberSubstractionModule=ALe;exports.OperationsImplementationsNumberTanModule=zLe;exports.OperationsImplementationsNumberToDegreesModule=t2e;exports.OperationsImplementationsNumberToRadiansModule=e2e;exports.OperationsImplementationsNumberTruncModule=NLe;exports.OperationsImplementationsObjectDeleteKeyModule=z2e;exports.OperationsImplementationsObjectDeleteNestedKeyModule=Q2e;exports.OperationsImplementationsObjectHasKeyModule=eMe;exports.OperationsImplementationsObjectHasNestedKeyModule=iMe;exports.OperationsImplementationsObjectIsInstanceOfTypeModule=nMe;exports.OperationsImplementationsObjectKeyValueEqualsModule=tMe;exports.OperationsImplementationsObjectMergeObjectsModule=aMe;exports.OperationsImplementationsObjectNestedKeyValueEqualsModule=rMe;exports.OperationsImplementationsObjectObjectEntriesModule=oMe;exports.OperationsImplementationsObjectObjectKeysModule=sMe;exports.OperationsImplementationsObjectObjectValuesModule=lMe;exports.OperationsImplementationsObjectReadKeyModule=H2e;exports.OperationsImplementationsObjectReadNestedKeyModule=J2e;exports.OperationsImplementationsObjectValidateModule=Z2e;exports.OperationsImplementationsObjectWriteKeyModule=W2e;exports.OperationsImplementationsObjectWriteNestedKeyModule=Y2e;exports.OperationsImplementationsObjectWriteSafeNestedKeyRecursivelyModule=X2e;exports.OperationsImplementationsPasswordHashPBKDF2Module=nBe;exports.OperationsImplementationsPasswordVerifyPBKDF2Module=aBe;exports.OperationsImplementationsRandomGenerateHexadecimalTokenModule=BMe;exports.OperationsImplementationsRandomGenerateIdentifierModule=$Me;exports.OperationsImplementationsRandomGenerateShortIdentifierModule=MMe;exports.OperationsImplementationsRandomGenerateUUIDv4Module=LMe;exports.OperationsImplementationsRandomnessGenerateRandomAlphaNumericModule=xMe;exports.OperationsImplementationsRandomnessGenerateRandomBase62Module=VMe;exports.OperationsImplementationsRandomnessGenerateRandomBase64Module=NMe;exports.OperationsImplementationsRandomnessGenerateRandomFloatModule=_Me;exports.OperationsImplementationsRandomnessGenerateRandomHexadecimalModule=PMe;exports.OperationsImplementationsRandomnessGenerateRandomIntegerModule=CMe;exports.OperationsImplementationsStringAddAtIndexModule=P$e;exports.OperationsImplementationsStringAppendModule=U$e;exports.OperationsImplementationsStringContainsModule=uLe;exports.OperationsImplementationsStringCountOccurrencesModule=rLe;exports.OperationsImplementationsStringDeleteAtIndexModule=_$e;exports.OperationsImplementationsStringDeleteFirstNCharsModule=D$e;exports.OperationsImplementationsStringDeleteLastNCharsModule=R$e;exports.OperationsImplementationsStringEndsWithModule=dLe;exports.OperationsImplementationsStringEnsurePrefixModule=nLe;exports.OperationsImplementationsStringEnsureSuffixModule=aLe;exports.OperationsImplementationsStringGetFirstNCharsModule=k$e;exports.OperationsImplementationsStringGetIndexItemModule=B$e;exports.OperationsImplementationsStringGetIndexOfModule=j$e;exports.OperationsImplementationsStringGetLastIndexOfModule=W$e;exports.OperationsImplementationsStringGetLastNCharsModule=G$e;exports.OperationsImplementationsStringGetLengthModule=QLi;exports.OperationsImplementationsStringJoinModule=E$e;exports.OperationsImplementationsStringMatchAllRegexModule=Q$e;exports.OperationsImplementationsStringMatchRegexModule=X$e;exports.OperationsImplementationsStringMatchesRegexModule=pLe;exports.OperationsImplementationsStringNormalizeUnicodeModule=iLe;exports.OperationsImplementationsStringPadEndModule=J$e;exports.OperationsImplementationsStringPadStartModule=z$e;exports.OperationsImplementationsStringPrependModule=K$e;exports.OperationsImplementationsStringRemoveDiacriticsModule=iA;exports.OperationsImplementationsStringRemovePrefixModule=sLe;exports.OperationsImplementationsStringRemoveSuffixModule=lLe;exports.OperationsImplementationsStringRepeatModule=Y$e;exports.OperationsImplementationsStringReplaceAllMatchesModule=M$e;exports.OperationsImplementationsStringReplaceAtIndexModule=x$e;exports.OperationsImplementationsStringReplaceFirstMatchModule=$$e;exports.OperationsImplementationsStringReplaceFirstNCharsModule=V$e;exports.OperationsImplementationsStringReplaceLastMatchModule=L$e;exports.OperationsImplementationsStringReplaceLastNCharsModule=N$e;exports.OperationsImplementationsStringReplaceRegexModule=tLe;exports.OperationsImplementationsStringReverseModule=w$e;exports.OperationsImplementationsStringSearchRegexModule=eLe;exports.OperationsImplementationsStringSliceModule=H$e;exports.OperationsImplementationsStringSplitAtAllSeparatorsModule=A$e;exports.OperationsImplementationsStringSplitAtFirstSeparatorModule=g$e;exports.OperationsImplementationsStringSplitAtIndexModule=b$e;exports.OperationsImplementationsStringSplitAtLastSeparatorModule=I$e;exports.OperationsImplementationsStringStartsWithModule=oLe;exports.OperationsImplementationsStringSubstringModule=Z$e;exports.OperationsImplementationsStringToLowerCaseModule=O$e;exports.OperationsImplementationsStringToUpperCaseModule=C$e;exports.OperationsImplementationsStringTrimEndModule=q$e;exports.OperationsImplementationsStringTrimModule=F$e;exports.OperationsImplementationsStringTrimStartModule=S$e;exports.OutputMapDependencyField=I4e;exports.OutputMapParentChildRelation=dd;exports.OutputMapState=gl;exports.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=Fb;exports.PASSWORD_OPERATIONS=xde;exports.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Lu;exports.PASS_THROUGH_CALLABLE_TYPES=_i;exports.PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=cy;exports.PLACEHOLDER_VALUE_STORE_CLIENT=oPe;exports.PROPERTY_HEIGHT=Lb;exports.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=ox;exports.PUBLISHING_DISABLED_REASONS=gBe;exports.ParallelExecutionOperation=dKe;exports.PassThroughCallableEntityClass=_Ui;exports.PasswordOperations=Qr;exports.PersistedEntity=fKe;exports.PrimitiveEntityState=ma;exports.PrimitiveTypes=oe;exports.ProjectState=x;exports.ProjectStateEvents=ii;exports.PropertyDependencyField=JUe;exports.PropertyParentChildRelation=yc;exports.PropertyState=ka;exports.PublicationRun=iBi;exports.PublicationStep=mBe;exports.RANDOMNESS_OPERATIONS=pde;exports.READABLE_ENTITY_TYPES=ns;exports.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=sKe;exports.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=Wki;exports.RandomnessOperations=Qe;exports.RelationalDatabaseInfrastructureResource=EBe;exports.ReturnStatementDependencyField=QV;exports.ReturnStatementState=md;exports.SLACK_CONVERSATION_TYPES=xme;exports.SQLAST=t4i;exports.STANDALONE_CONDITIONS=SDe;exports.STATIC_PROPERTY_HEIGHT=uBe;exports.STRING_OPERATIONS=l8;exports.ScopeCompatibilityType=AA;exports.SearchDependencyField=QGe;exports.SearchNodeImplementationModule=xPe;exports.SearchState=Pu;exports.SequentialExecutionOperation=pKe;exports.ServerlessFunctionInfrastructureResource=tBi;exports.SharedEntityErrorCode=Ie;exports.SharedStateFunctionality=aKe;exports.StandaloneOperatorTypes=en;exports.StateMutationAction=_;exports.StateMutationErrorCode=ir;exports.StringOperations=S;exports.TERMINATION_TYPES=Ft;exports.TerminationInputMapState=u4i;exports.Traverser=Yn;exports.USER_MANAGED_ENTITY_TYPES=jk;exports.UUIDModule=$Pe;exports.UUIDV4ValidationErrorCodes=Ba;exports.UserManagedBaseState=RUi;exports.UserManagedEntityStateTemplate=IUi;exports.VALUE_READING_ENTITIES_EXPLANATION=lx;exports.VALUE_READING_TYPES=as;exports.VALUE_WRITING_ENTITIES_EXPLANATION=Mke;exports.VALUE_WRITING_TYPES=Tr;exports.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=sC;exports.VARIABLE_TYPES=qt;exports.ValueAutogenerationType=Br;exports.ValueDescriptorDependencyField=L4e;exports.ValueDescriptorParentChildRelation=B;exports.ValueDescriptorState=Td;exports.ValueReadingEntityClass=of;exports.ValueWritingEntityClass=Bv;exports.VariableDeclarationDependencyField=PBe;exports.VariableDeclarationState=_u;exports.VariableInputMapState=d4i;exports.VariableInstanceDependencyField=LN;exports.VariableInstanceState=Cu;exports.VariableOutputMapState=f4i;exports.WaitOperation=uKe;exports.actionDescriptorValidation=hLi;exports.addBDBusinessDaysArgument=lX;exports.addBDBusinessDaysDataType=tX;exports.addBDDateArgument=sX;exports.addBDDateDataType=eX;exports.addBDError=pX;exports.addBDHolidaysArgument=dX;exports.addBDHolidaysDataType=rX;exports.addBDHolidaysDefaultValue=aX;exports.addBDResponseDataType=uX;exports.addBDWeekendMaskArgument=oX;exports.addBDWeekendMaskDataType=iX;exports.addBDWeekendMaskDefaultValue=nX;exports.addBusinessDays=KVe;exports.addBusinessDaysOperation=cX;exports.addDifferencesToRowTransformer=mx;exports.addDisabledReasons=YMi;exports.addToDate=XPe;exports.addToDateAmountArg=RQ;exports.addToDateAmountDT=AQ;exports.addToDateDateArg=IQ;exports.addToDateDateDT=hT;exports.addToDateError=CQ;exports.addToDateOperation=_Q;exports.addToDateResponseDT=OQ;exports.addToDateUnitArg=wQ;exports.addToDateUnitArgDefaultValue=DQ;exports.addToDateUnitDT=gQ;exports.afterLiteralValueAsTypeChangeSideEffects=DPe;exports.afterLiteralValueAsTypeDeleteSideEffects=RPe;exports.afterLiteralValueChangeSideEffects=gPe;exports.afterLiteralValueDeleteSideEffects=APe;exports.aggregateVariableInputsNextValues=Rm;exports.aggregateVariableInputsValues=Pb;exports.airtableAuthExternalConnectionBuiltInBaseEntity=I0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=g0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=b0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=E0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=A0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=v0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=Eyi;exports.airtableAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=m0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=h0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=T0e;exports.airtableAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=y0e;exports.andCondition=aV;exports.andConditionRef=ami;exports.andConditionResultVoidDataType=MDe;exports.andConditionResultVoidDataTypeParentRef=LDe;exports.appendToList=Exe;exports.applyNewScope=mt;exports.applyQueuedToCached=Q$i;exports.areLiteralValuesEqual=Wke;exports.argumentDeclarationValidation=S$i;exports.asGenerationActionExample=go;exports.assembleAndAddLiteralValueFromDataType=zl;exports.assembleStandaloneLiteralValueFromDataType=bt;exports.atlassianAuthExternalConnectionBuiltInBaseEntity=X0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=Y0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=z0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=W0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=J0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=H0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=Dyi;exports.atlassianAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=q0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=S0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=Z0e;exports.atlassianAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=F0e;exports.audienceStringListDT=Epe;exports.average=mLe;exports.booleanIsFalseCondition=sV;exports.booleanIsFalseConditionResultVoidDT=jDe;exports.booleanIsFalseConditionVArg=kDe;exports.booleanIsFalseConditionVDT=GDe;exports.booleanIsTrueCondition=lV;exports.booleanIsTrueConditionResultVoidDT=FDe;exports.booleanIsTrueConditionVArg=KDe;exports.booleanIsTrueConditionVDT=UDe;exports.booleanPrototype=st;exports.breakStatementValidation=T4i;exports.buildJwtHmac=AMe;exports.bytesPrototype=No;exports.calculateCardSize=yBe;exports.calculateMethodCardSize=fBe;exports.calculateNewParentBasedOnCallers=Om;exports.capitalizeFirstLetter=Fr;exports.changeSetJSONRecordToUniqueIds=O$i;exports.channelsIntegrationBuiltInActionDescriptorTransfer=ATe;exports.checkAreDataTypesCompatible=zr;exports.checkAreDefinitionEntitiesCompatibleAsDataType=Km;exports.checkArePropertiesCompatibleAsDataType=Vm;exports.checkEveryCallerComesFromCaller=nUe;exports.checkEveryCallerReachesOrIsAncestor=eUe;exports.checkExtendsBaseEntity=B1;exports.checkHasBaseEntity=Si;exports.checkHasMetadataChanged=xr;exports.checkImplementationsOverlap=od;exports.checkImplementsBaseEntity=Uji;exports.checkIsBranchDependentButNotDirectlyOnBranch=Rc;exports.checkIsBranchDependentOnBranch=dC;exports.checkIsBuiltIn=Wb;exports.checkIsCallableEntityReachable=Nm;exports.checkIsCallerBranchDependentOnBranch=hA;exports.checkIsCanvasEntity=kji;exports.checkIsDefEntityInlineDeclaredForSearchOutputType=tC;exports.checkIsDetachedBranch=_Ue;exports.checkIsDetachedBranchShallow=wx;exports.checkIsEmptyValue=cx;exports.checkIsGlobalVariable=Bji;exports.checkIsGloballyDeclared=Dx;exports.checkIsLiteralValueEmpty=qn;exports.checkIsMethod=Ox;exports.checkIsNestedScope=dy;exports.checkIsRequiredValue=Jd;exports.checkIsRowTransformerUpToDate=Yje;exports.checkParentEntryPointRequiresTermination=ux;exports.checkReachesOrIsTarget=vji;exports.checkScopeCompatibility=rs;exports.checkShouldInputOrOutputBePartOfFinalVariableObjectValue=Lv;exports.checkShouldPropertyBePartOfFinalVariableObjectValue=uC;exports.chunkList=Nxe;exports.clamp=yLe;exports.clampError=_ie;exports.clampInputArg=Die;exports.clampInputDT=xT;exports.clampMaxArg=Oie;exports.clampMaxDT=Rie;exports.clampMinArg=wie;exports.clampMinDT=Iie;exports.clampResponseDT=Cie;exports.clampToRange=MVe;exports.clampToRangeOperation=Pie;exports.cloneProject=qUi;exports.cloneProjectAsync=ZUi;exports.comparisonEmptyOperation=efe;exports.comparisonEmptyOperationArgument=Yce;exports.comparisonEmptyOperationRef=Jce;exports.comparisonEmptyOperationResultVoidDataType=Qce;exports.comparisonEmptyOperationResultVoidDataTypeParentRef=Xce;exports.comparisonNotEmptyOperation=sh;exports.comparisonNotEmptyOperationArgument=rfe;exports.comparisonNotEmptyOperationRef=ife;exports.comparisonNotEmptyOperationResultVoidDataType=afe;exports.comparisonNotEmptyOperationResultVoidDataTypeParentRef=nfe;exports.comparisonPrimitiveEqualOperation=Afe;exports.comparisonPrimitiveEqualOperationAArg=vfe;exports.comparisonPrimitiveEqualOperationADT=pfe;exports.comparisonPrimitiveEqualOperationADTOrBooleanDataType=ofe;exports.comparisonPrimitiveEqualOperationADTOrDateDataType=sfe;exports.comparisonPrimitiveEqualOperationADTOrNullDataType=lfe;exports.comparisonPrimitiveEqualOperationADTOrNumberDataType=dfe;exports.comparisonPrimitiveEqualOperationADTOrStringDataType=ufe;exports.comparisonPrimitiveEqualOperationBArg=Efe;exports.comparisonPrimitiveEqualOperationBDT=Tfe;exports.comparisonPrimitiveEqualOperationBDTOrBooleanDataType=yfe;exports.comparisonPrimitiveEqualOperationBDTOrDateDataType=cfe;exports.comparisonPrimitiveEqualOperationBDTOrNullDataType=ffe;exports.comparisonPrimitiveEqualOperationBDTOrNumberDataType=hfe;exports.comparisonPrimitiveEqualOperationBDTOrStringDataType=mfe;exports.comparisonPrimitiveEqualOperationResultVoidDT=bfe;exports.comparisonPrimitiveNotEqualOperation=jfe;exports.comparisonPrimitiveNotEqualOperationADT=Ofe;exports.comparisonPrimitiveNotEqualOperationADTOrBooleanDataType=Rfe;exports.comparisonPrimitiveNotEqualOperationADTOrDateDataType=gfe;exports.comparisonPrimitiveNotEqualOperationADTOrNullDataType=Ife;exports.comparisonPrimitiveNotEqualOperationADTOrNumberDataType=Dfe;exports.comparisonPrimitiveNotEqualOperationADTOrStringDataType=wfe;exports.comparisonPrimitiveNotEqualOperationBDT=xfe;exports.comparisonPrimitiveNotEqualOperationBDTOrBooleanDataType=Pfe;exports.comparisonPrimitiveNotEqualOperationBDTOrDateDataType=Cfe;exports.comparisonPrimitiveNotEqualOperationBDTOrNullDataType=_fe;exports.comparisonPrimitiveNotEqualOperationBDTOrNumberDataType=Vfe;exports.comparisonPrimitiveNotEqualOperationBDTOrStringDataType=Nfe;exports.comparisonPrimitiveNotEqualOperationLeftHandArgument=Lfe;exports.comparisonPrimitiveNotEqualOperationLeftHandArgumentParentRef=$fe;exports.comparisonPrimitiveNotEqualOperationResultVoidDataType=kfe;exports.comparisonPrimitiveNotEqualOperationResultVoidDataTypeParentRef=Gfe;exports.comparisonPrimitiveNotEqualOperationRightHandArgument=Bfe;exports.comparisonPrimitiveNotEqualOperationRightHandArgumentParentRef=Mfe;exports.concatLists=sxe;exports.conditionValidation=mLi;exports.constantTimeEqual=i1;exports.continueStatementValidation=v4i;exports.convertTimezone=HVe;exports.convertTimezoneDateArg=SX;exports.convertTimezoneDateDT=yT;exports.convertTimezoneError=WX;exports.convertTimezoneKeepLocalTimeArg=ZX;exports.convertTimezoneKeepLocalTimeDT=KX;exports.convertTimezoneKeepLocalTimeDefault=FX;exports.convertTimezoneOperation=zX;exports.convertTimezoneResponseDT=HX;exports.convertTimezoneTargetTzArg=qX;exports.convertTimezoneTargetTzDT=UX;exports.convertToAbstract=fji;exports.convertToNonAbstract=yji;exports.convertToNonStatic=mji;exports.convertToStatic=hji;exports.countedLoopActionDescriptor=WT;exports.countedLoopActionDescriptorStringArgumentDeclaration=WIe;exports.countedLoopActionDescriptorStringArgumentDeclarationDataType=ZIe;exports.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=SIe;exports.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=FIe;exports.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=qIe;exports.countedLoopActionDescriptorStringArgumentDeclarationParentRef=HIe;exports.countedLoopBodyActionDescriptor=EI;exports.countedLoopBodyActionDescriptorAnyDynamicArgument=e1e;exports.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=QIe;exports.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=UP;exports.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=YIe;exports.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=JIe;exports.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=XIe;exports.countedLoopBodyDataType=t1e;exports.countedLoopDataType=zIe;exports.createDefinitionEntityFromJSONObject=Hb;exports.createEntityError=$t;exports.createNestedDataTypeForEntity=zje;exports.createOrUpdateRowTransformer=Tji;exports.createPersistedEntityMethod=vRe;exports.createPersistedEntityMethodParentRef=hRe;exports.createPersistedEntityMethodVoidDataType=TRe;exports.createPersistedEntityMethodVoidDataTypeParentRef=mRe;exports.createSemanticId=qUe;exports.createStateFromGenerationTargetType=AUi;exports.createStateFromType=Ui;exports.createStateFromTypeAndSubscribe=ye;exports.cronJobBuiltInBaseEntity=iV;exports.cronJobBuiltInBaseEntityExpressionProperty=NDe;exports.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=emi;exports.cronJobBuiltInBaseEntityExpressionPropertyRef=PDe;exports.cronJobBuiltInBaseEntityRef=VDe;exports.cronJobHandlerVoidDataType=CDe;exports.cronJobHandlerVoidDataTypeParentRef=ODe;exports.cronJobTriggeredFunctionDeclarationBlueprint=tV;exports.cronJobTriggeredFunctionDeclarationBlueprintParentRef=wDe;exports.cryptoConstantTimeEqualOperation=Sde;exports.cryptoCteA=Gde;exports.cryptoCteADT=kT;exports.cryptoCteAEncDT=X_;exports.cryptoCteAEncDefault=Mde;exports.cryptoCteAEncoding=jde;exports.cryptoCteB=kde;exports.cryptoCteBDT=$de;exports.cryptoCteBEncDT=Lde;exports.cryptoCteBEncDefault=Bde;exports.cryptoCteBEncoding=Ude;exports.cryptoCteError=Fde;exports.cryptoCteResponseDT=Kde;exports.cryptoDeriveKeyPBKDF2Operation=fue;exports.cryptoHashAlg=bue;exports.cryptoHashAlgDT=nI;exports.cryptoHashAlgDefault=Tue;exports.cryptoHashData=Aue;exports.cryptoHashDataDT=yue;exports.cryptoHashError=Due;exports.cryptoHashInputEncDT=hue;exports.cryptoHashInputEncDefault=vue;exports.cryptoHashInputEncoding=gue;exports.cryptoHashOperation=wue;exports.cryptoHashOutputEncDT=mue;exports.cryptoHashOutputEncDefault=Eue;exports.cryptoHashOutputEncoding=Iue;exports.cryptoHashResponseDT=Rue;exports.cryptoHmacAlg=$ue;exports.cryptoHmacAlgDT=Ep;exports.cryptoHmacAlgDefaultValue=xue;exports.cryptoHmacAlgDefaultValueParentRef=Nue;exports.cryptoHmacData=Mue;exports.cryptoHmacDataDT=Cue;exports.cryptoHmacDataEncDT=Pue;exports.cryptoHmacDataEncoding=Kue;exports.cryptoHmacDataEncodingDefaultValue=Uue;exports.cryptoHmacDataEncodingDefaultValueParentRef=jue;exports.cryptoHmacError=Hue;exports.cryptoHmacKey=Lue;exports.cryptoHmacKeyDT=Oue;exports.cryptoHmacKeyEncDT=_ue;exports.cryptoHmacKeyEncoding=kue;exports.cryptoHmacKeyEncodingDefaultValue=Gue;exports.cryptoHmacKeyEncodingDefaultValueParentRef=Bue;exports.cryptoHmacOperation=Wue;exports.cryptoHmacOutEncDT=Vue;exports.cryptoHmacOutputEncoding=que;exports.cryptoHmacOutputEncodingDefaultValue=Sue;exports.cryptoHmacOutputEncodingDefaultValueParentRef=Fue;exports.cryptoHmacResponseDT=Zue;exports.cryptoPBKDF2Error=cue;exports.cryptoPBKDF2HashAlg=lue;exports.cryptoPBKDF2HashAlgDT=Hde;exports.cryptoPBKDF2Iterations=aue;exports.cryptoPBKDF2IterationsDT=Q_;exports.cryptoPBKDF2Length=sue;exports.cryptoPBKDF2LengthDT=Zde;exports.cryptoPBKDF2OutputEncoding=uue;exports.cryptoPBKDF2OutputEncodingDT=Jde;exports.cryptoPBKDF2Password=rue;exports.cryptoPBKDF2PasswordDT=Md;exports.cryptoPBKDF2PasswordEncoding=oue;exports.cryptoPBKDF2PasswordEncodingDT=Wde;exports.cryptoPBKDF2ResponseDT=pue;exports.cryptoPBKDF2Salt=nue;exports.cryptoPBKDF2SaltDT=qde;exports.cryptoPBKDF2SaltEncoding=due;exports.cryptoPBKDF2SaltEncodingDT=zde;exports.dataTypeCompatibilityToErrorExplanation=Ske;exports.dataTypeDecodeBase64Error=Zfe;exports.dataTypeDecodeBase64Operation=Hfe;exports.dataTypeDecodeBase64ResponseDT=Sfe;exports.dataTypeDecodeBase64StringDT=Ffe;exports.dataTypeDecodeBase64UrlError=Xfe;exports.dataTypeDecodeBase64UrlOperation=Qfe;exports.dataTypeDecodeBase64UrlResponseDT=Jfe;exports.dataTypeDecodeBase64UrlStringDT=zfe;exports.dataTypeDecodeBase64UrlValue=Yfe;exports.dataTypeDecodeBase64Value=qfe;exports.dataTypeDecodeHexError=nye;exports.dataTypeDecodeHexOperation=aye;exports.dataTypeDecodeHexResponseDT=iye;exports.dataTypeDecodeHexStringDT=tye;exports.dataTypeDecodeHexValue=rye;exports.dataTypeEncodeBase64Bytes=dye;exports.dataTypeEncodeBase64BytesDT=lye;exports.dataTypeEncodeBase64Error=uye;exports.dataTypeEncodeBase64Operation=pye;exports.dataTypeEncodeBase64ResponseDT=oye;exports.dataTypeEncodeBase64UrlBytes=hye;exports.dataTypeEncodeBase64UrlBytesDT=fye;exports.dataTypeEncodeBase64UrlError=mye;exports.dataTypeEncodeBase64UrlOperation=Tye;exports.dataTypeEncodeBase64UrlResponseDT=yye;exports.dataTypeEncodeHexBytes=Aye;exports.dataTypeEncodeHexBytesDT=Eye;exports.dataTypeEncodeHexError=gye;exports.dataTypeEncodeHexOperation=Iye;exports.dataTypeEncodeHexResponseDT=bye;exports.dataTypeFromBytesBytes=wye;exports.dataTypeFromBytesBytesDT=Rye;exports.dataTypeFromBytesEncoding=Cye;exports.dataTypeFromBytesEncodingDT=Dye;exports.dataTypeFromBytesEncodingDefault=Oye;exports.dataTypeFromBytesError=Pye;exports.dataTypeFromBytesOperation=Vye;exports.dataTypeFromBytesResponseDT=_ye;exports.dataTypeGetTypeOfError=Mye;exports.dataTypeGetTypeOfOperation=Bye;exports.dataTypeGetTypeOfResponseDT=Lye;exports.dataTypeGetTypeOfValue=$ye;exports.dataTypeGetTypeOfValueDT=xye;exports.dataTypeToBytesEncoding=qye;exports.dataTypeToBytesEncodingDT=Kye;exports.dataTypeToBytesEncodingDefault=Sye;exports.dataTypeToBytesError=Hye;exports.dataTypeToBytesInput=Fye;exports.dataTypeToBytesInputBytesDT=jye;exports.dataTypeToBytesInputDT=Uye;exports.dataTypeToBytesInputStringDT=kye;exports.dataTypeToBytesOperation=Wye;exports.dataTypeToBytesResponseDT=Zye;exports.dataTypeToNumberError=Qye;exports.dataTypeToNumberOperation=ehe;exports.dataTypeToNumberResponseDT=Xye;exports.dataTypeToNumberValue=Yye;exports.dataTypeToNumberValueDT=Jye;exports.dataTypeToStringError=ahe;exports.dataTypeToStringOperation=she;exports.dataTypeToStringResponseDT=nhe;exports.dataTypeToStringValue=rhe;exports.dataTypeToStringValueDT=ihe;exports.dataTypeValidation=rUi;exports.dateIsAfterOperation=fre;exports.dateIsAfterOperationAArg=ore;exports.dateIsAfterOperationADT=jg;exports.dateIsAfterOperationBArg=dre;exports.dateIsAfterOperationBDT=sre;exports.dateIsAfterOperationResultVoidDT=cre;exports.dateIsAfterOperationUnitArg=pre;exports.dateIsAfterOperationUnitDT=lre;exports.dateIsBeforeOperation=Are;exports.dateIsBeforeOperationAArg=mre;exports.dateIsBeforeOperationADT=Ug;exports.dateIsBeforeOperationBArg=Tre;exports.dateIsBeforeOperationBDT=yre;exports.dateIsBeforeOperationResultVoidDT=bre;exports.dateIsBeforeOperationUnitArg=Ere;exports.dateIsBeforeOperationUnitDT=hre;exports.dateIsBetweenOperation=xre;exports.dateIsBetweenOperationEndArg=Cre;exports.dateIsBetweenOperationEndDT=Ire;exports.dateIsBetweenOperationInclusivityArg=Vre;exports.dateIsBetweenOperationInclusivityDT=Dre;exports.dateIsBetweenOperationResultVoidDT=Nre;exports.dateIsBetweenOperationStartArg=Ore;exports.dateIsBetweenOperationStartDT=gre;exports.dateIsBetweenOperationTargetArg=wre;exports.dateIsBetweenOperationTargetDT=zy;exports.dateIsBetweenOperationUnitArg=Pre;exports.dateIsBetweenOperationUnitDT=Rre;exports.dateIsLeapYearOperation=Bre;exports.dateIsLeapYearOperationDateArg=Lre;exports.dateIsLeapYearOperationDateDT=$re;exports.dateIsLeapYearOperationResultVoidDT=Mre;exports.dateIsSameOperation=qre;exports.dateIsSameOperationAArg=jre;exports.dateIsSameOperationADT=Fg;exports.dateIsSameOperationBArg=Ure;exports.dateIsSameOperationBDT=Gre;exports.dateIsSameOperationResultVoidDT=Sre;exports.dateIsSameOperationUnitArg=Fre;exports.dateIsSameOperationUnitDT=kre;exports.dateIsSameOrAfterOperation=Qre;exports.dateIsSameOrAfterOperationAArg=Wre;exports.dateIsSameOrAfterOperationADT=Sg;exports.dateIsSameOrAfterOperationBArg=zre;exports.dateIsSameOrAfterOperationBDT=Zre;exports.dateIsSameOrAfterOperationUnitArg=Yre;exports.dateIsSameOrAfterOperationUnitDT=Hre;exports.dateIsSameOrBeforeOperation=lne;exports.dateIsSameOrBeforeOperationAArg=ine;exports.dateIsSameOrBeforeOperationADT=qg;exports.dateIsSameOrBeforeOperationBArg=rne;exports.dateIsSameOrBeforeOperationBDT=ene;exports.dateIsSameOrBeforeOperationResultVoidDT=sne;exports.dateIsSameOrBeforeOperationUnitArg=ane;exports.dateIsSameOrBeforeOperationUnitDT=tne;exports.dateIsValidOperation=pne;exports.dateIsValidOperationResultVoidDT=une;exports.dateIsValidOperationValueArg=dne;exports.datePrototype=at;exports.dateToDateOperation=mne;exports.dateToDateOperationError=hne;exports.dateToDateOperationResultDT=yne;exports.dateToDateOperationValueArg=fne;exports.dateToDateOperationValueDT=cne;exports.dateValueAutogenerationSchema=Y4e;exports.decodeBase64=dMe;exports.decodeBase64Url=gc;exports.decodeBuildJwtHmac=gMe;exports.decodeHashEncode=hMe;exports.decodeHashPasswordPBKDF2=bMe;exports.decodeHex=cMe;exports.decodeJWTToString=wMe;exports.decodeJwt=DMe;exports.definitionEntityToZodSchema=PI;exports.definitionEntityValidation=hUi;exports.deleteFirstNItems=uxe;exports.deleteLastNItems=dxe;exports.deleteObjectKey=x2e;exports.deleteObjectNestedKey=B2e;exports.deletePersistedEntityMethod=XP;exports.deletePersistedEntityMethodParentRef=pRe;exports.deletePersistedEntityMethodVoidDataType=fRe;exports.deletePersistedEntityMethodVoidDataTypeParentRef=cRe;exports.deleteRootProject=zUi;exports.deriveKeyPBKDF2=n1;exports.diffADateArg=GQ;exports.diffADateDT=TT;exports.diffAsFloatArg=KQ;exports.diffAsFloatDT=MQ;exports.diffAsFloatDefault=BQ;exports.diffBDateArg=kQ;exports.diffBDateDT=$Q;exports.diffUnitArg=UQ;exports.diffUnitDT=LQ;exports.differenceBetweenDates=eVe;exports.differenceBetweenDatesError=SQ;exports.differenceBetweenDatesOperation=qQ;exports.differenceBetweenDatesResponseDT=FQ;exports.differenceBetweenDatesUnitArgDefaultValue=jQ;exports.downSqlRowTransformerEntityMethod=lDe;exports.downSqlRowTransformerEntityMethodNewShapeDataType=tDe;exports.downSqlRowTransformerEntityMethodNewShapeDataTypeParentRef=eDe;exports.downSqlRowTransformerEntityMethodParentRef=sDe;exports.downSqlRowTransformerEntityMethodRootDataType=aDe;exports.downSqlRowTransformerEntityMethodRootDataTypeParentRef=nDe;exports.downSqlRowTransformerEntityMethodVoidDataType=rDe;exports.downSqlRowTransformerEntityMethodVoidDataTypeParentRef=iDe;exports.emitAsyncProjectSideEffects=L_e;exports.emitProjectSideEffects=$_e;exports.encodeBase64=uMe;exports.encodeBase64Url=by;exports.encodeConstantTimeEqual=fMe;exports.encodeDeriveKeyPBKDF2=TMe;exports.encodeHex=pMe;exports.encodeHmacDecode=mMe;exports.encodeVerifyJwtHmac=RMe;exports.endOf=wVe;exports.endOfDateArg=Hie;exports.endOfDateDT=Gg;exports.endOfError=Yie;exports.endOfOperation=Xie;exports.endOfResponseDT=Jie;exports.endOfUnitArg=zie;exports.endOfUnitArgDefaultValue=Wie;exports.endOfUnitDT=Zie;exports.endpointBuiltInBaseEntity=xa;exports.endpointBuiltInBaseEntityRef=l1e;exports.endpointBuiltInBaseEntityRefFour=q1e;exports.endpointBuiltInBaseEntityRefThree=m1e;exports.endpointBuiltInBaseEntityRefTwo=c1e;exports.endpointBuiltInCorsProperty=o1e;exports.endpointBuiltInCorsPropertyDataType=s1e;exports.endpointBuiltInCorsPropertyDataTypeRef=n1e;exports.endpointBuiltInCorsPropertyRef=a1e;exports.endpointBuiltInMethodProperty=FP;exports.endpointBuiltInMethodPropertyDataType=h1e;exports.endpointBuiltInMethodPropertyDataTypeRef=f1e;exports.endpointBuiltInMethodPropertyRef=y1e;exports.endpointBuiltInPathProperty=KP;exports.endpointBuiltInPathPropertyDataType=p1e;exports.endpointBuiltInPathPropertyDataTypeRef=d1e;exports.endpointBuiltInPathPropertyRef=u1e;exports.endpointHandlerBodyProperty=AI;exports.endpointHandlerBodyPropertyDataType=k1e;exports.endpointHandlerBodyPropertyParentRef=j1e;exports.endpointHandlerBodyPropertyRef=G1e;exports.endpointHandlerHeadersProperty=WP;exports.endpointHandlerHeadersPropertyDataType=M1e;exports.endpointHandlerHeadersPropertyParentRef=B1e;exports.endpointHandlerHeadersPropertyRef=L1e;exports.endpointHandlerResponseDataType=S1e;exports.endpointHandlerResponseDataTypeEntity=K1e;exports.endpointHandlerResponseDataTypeEntityParentRef=U1e;exports.endpointHandlerResponseDataTypeParentRef=F1e;exports.endpointHandlerStatusCodeProperty=bI;exports.endpointHandlerStatusCodePropertyDataType=$1e;exports.endpointHandlerStatusCodePropertyParentRef=N1e;exports.endpointHandlerStatusCodePropertyRef=x1e;exports.endpointPathParamsArgumentDeclaration=qP;exports.endpointPathParamsArgumentDeclarationRef=w1e;exports.endpointPathParamsVariableDataType=O1e;exports.endpointPathParamsVariableDataTypeRef=D1e;exports.endpointReachedTriggerActionDescriptor=zP;exports.endpointReachedTriggerActionDescriptorRef=C1e;exports.endpointReachedTriggerActionDescriptorRefFour=V1e;exports.endpointReachedTriggerActionDescriptorRefThree=P1e;exports.endpointReachedTriggerActionDescriptorRefTwo=_1e;exports.endpointRequestBodyArgumentDeclaration=HP;exports.endpointRequestBodyArgumentDeclarationRef=b1e;exports.endpointRequestBodyVariableDataType=A1e;exports.endpointRequestHeadersArgumentDeclaration=SP;exports.endpointRequestHeadersArgumentDeclarationRef=v1e;exports.endpointRequestHeadersVariableDataType=E1e;exports.endpointRequestHeadersVariableDataTypeRef=T1e;exports.endpointRequestQueryParamsArgumentDeclaration=ZP;exports.endpointRequestQueryParamsArgumentDeclarationRef=I1e;exports.endpointRequestQueryParamsVariableDataType=R1e;exports.endpointRequestQueryParamsVariableDataTypeRef=g1e;exports.enrichFromKnownEntities=oy;exports.entitiesToUniqueCanvasEntities=GUe;exports.enumOptionsProperty=qk;exports.enumOptionsPropertyDataType=Fk;exports.enumOptionsPropertyDataTypeRef=Uk;exports.enumOptionsPropertyRef=Kk;exports.enumPrototype=It;exports.enumPrototypeRef=Sk;exports.errorCodeToMessage=yv;exports.externalIntegrationConnectionBuiltInBaseEntity=Ud;exports.externalIntegrationConnectionBuiltInBaseEntityConnectionIdProperty=jd;exports.externalIntegrationConnectionBuiltInBaseEntityConnectionIdPropertyDataType=che;exports.externalIntegrationConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=phe;exports.externalIntegrationConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=fhe;exports.externalIntegrationConnectionBuiltInBaseEntityIntegrationProperty=kd;exports.externalIntegrationConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=ayi;exports.externalIntegrationConnectionBuiltInBaseEntityIntegrationPropertyParentRef=uhe;exports.externalIntegrationConnectionBuiltInBaseEntityIntegrationPropertyRef=dhe;exports.filesIntegrationBuiltInActionDescriptorTransfer=IAe;exports.filterOutDependentCallers=tUe;exports.filterOutDuplicateEntities=D;exports.filterOutDuplicateEntitiesAsync=RUe;exports.filterOutDuplicateErrors=sv;exports.filterOutDuplicateErrorsAsync=B_e;exports.findEntityFromKeys=fx;exports.findNextAvailableName=Lx;exports.findNextCombinedSingleCallerAncestor=rUe;exports.findNextSingleCallerAncestor=fc;exports.findReferenceToSelfInList=EUe;exports.findReferencesToSelfInProject=Cji;exports.flattenActionDescriptor=zke;exports.flattenActionDescriptorAsync=Aje;exports.flattenArgumentDeclaration=Jke;exports.flattenArgumentDeclarationAsync=gje;exports.flattenBreakStatement=Yke;exports.flattenBreakStatementAsync=Ije;exports.flattenBuiltInBaseEntity=Xke;exports.flattenBuiltInBaseEntityAsync=Rje;exports.flattenCallerAncestorsUntil=bu;exports.flattenCallers=Tx;exports.flattenCalls=gn;exports.flattenCanvasAncestorsUntil=Ry;exports.flattenCondition=Qke;exports.flattenConditionAsync=Dje;exports.flattenContinueStatement=eje;exports.flattenContinueStatementAsync=wje;exports.flattenDataType=ije;exports.flattenDataTypeAsync=Cje;exports.flattenDefinitionEntity=tje;exports.flattenDefinitionEntityAsync=Oje;exports.flattenDefinitionEntityExtensionAndImplementationTypes=Dy;exports.flattenDefinitionEntityExtensionTypes=Gu;exports.flattenDefinitionEntityExtensions=Zm;exports.flattenDefinitionEntityImplementations=Ix;exports.flattenDefinitionEntityImplementionTypes=$v;exports.flattenDerivedCanvasEntities=La;exports.flattenDerivedCanvasEntitiesAsync=Fh;exports.flattenDetachedBranch=VUe;exports.flattenElementCalls=Dt;exports.flattenElementCallsOnTheSameScope=Oji;exports.flattenElementCallsWithCallType=Bs;exports.flattenEntity=xe;exports.flattenEntityAsync=Ve;exports.flattenFunctionCall=rje;exports.flattenFunctionCallAsync=_je;exports.flattenFunctionDeclaration=nje;exports.flattenFunctionDeclarationAsync=Pje;exports.flattenGlobalEvent=aje;exports.flattenGlobalEventAsync=Vje;exports.flattenInputMap=sje;exports.flattenInputMapAsync=Nje;exports.flattenInstalledProject=lje;exports.flattenInstalledProjectAsync=xje;exports.flattenInternalCall=oje;exports.flattenInternalCallAsync=$je;exports.flattenLiteralValue=dje;exports.flattenLiteralValueAsync=Lje;exports.flattenLoop=uje;exports.flattenLoopAsync=Mje;exports.flattenOneLevel=_xe;exports.flattenOperation=pje;exports.flattenOperationAsync=Bje;exports.flattenOutputMap=cje;exports.flattenOutputMapAsync=Gje;exports.flattenPrimitiveEntity=fje;exports.flattenPrimitiveEntityAsync=kje;exports.flattenProject=yje;exports.flattenProjectAsync=jje;exports.flattenProjectElements=vUe;exports.flattenProperty=hje;exports.flattenPropertyAsync=Uje;exports.flattenRelatedCallableElementsOnTheRight=wUe;exports.flattenRelatedCanvasElementsOnTheLeft=CUe;exports.flattenRelatedCanvasElementsOnTheRight=bA;exports.flattenReturnStatement=mje;exports.flattenReturnStatementAsync=Kje;exports.flattenSearch=Tje;exports.flattenSearchAsync=Fje;exports.flattenValueDescriptor=vje;exports.flattenValueDescriptorAsync=Sje;exports.flattenVariableDeclaration=Eje;exports.flattenVariableDeclarationAsync=qje;exports.flattenVariableInstance=bje;exports.flattenVariableInstanceAsync=Zje;exports.flattenVariableReads=TUe;exports.flattenVariableWrites=mUe;exports.flattenVariables=Wi;exports.flattenWrites=fA;exports.formatDate=zPe;exports.formatDateDateArg=cQ;exports.formatDateDateDT=Og;exports.formatDateError=hQ;exports.formatDateFormatArg=fQ;exports.formatDateFormatDT=pQ;exports.formatDateOperation=mQ;exports.formatDateResponseDT=yQ;exports.freezeDownstreamEntitiesFromGiven=Jji;exports.fromBytes=Xl;exports.fromChangeSetToRecordChangeSet=Zji;exports.fromLiteralValueTypeToPrimitiveType=QO;exports.fromNow=kVe;exports.fromNowDateArgument=VY;exports.fromNowDateArgumentParentRef=PY;exports.fromNowDateDataType=_Y;exports.fromNowError=xY;exports.fromNowOperation=$Y;exports.fromNowResponseDataType=NY;exports.fromNowWithoutSuffixArgument=CY;exports.fromNowWithoutSuffixArgumentDefaultValue=OY;exports.fromNowWithoutSuffixDataType=wY;exports.fromNowWithoutSuffixDataTypeParentRef=DY;exports.fromPublishingDisabledCodeToReadable=aBi;exports.fromUnix=iVe;exports.fromUnixError=lee;exports.fromUnixOperation=oee;exports.fromUnixResponseDT=see;exports.fromUnixSecondsArg=aee;exports.fromUnixSecondsDT=R_;exports.fromZodParseToEntityGenerationErrors=ax;exports.functionCallValidation=rji;exports.functionDeclarationValidation=eLi;exports.gdriveSmartFetchActionDescriptorTransfer=YAe;exports.gdriveSmartFetchConnectionInputDataTypeTransfer=DAe;exports.gdriveSmartFetchConnectionInputTransfer=wAe;exports.gdriveSmartFetchFileIdInputDataTypeTransfer=OAe;exports.gdriveSmartFetchFileIdInputTransfer=CAe;exports.gdriveSmartFetchModeInputDataTypeTransfer=_Ae;exports.gdriveSmartFetchModeInputTransfer=PAe;exports.gdriveSmartFetchResponseDataTypeTransfer=JAe;exports.gdriveSmartFetchResponseEntityTransfer=zAe;exports.generate=VI;exports.generateActionExample=zki;exports.generateContentConnectionInputDataTypeTransfer=Nbe;exports.generateContentConnectionInputTransfer=xbe;exports.generateContentIntegrationBuiltInActionDescriptorTransfer=Kbe;exports.generateContentModelInputDataTypeTransfer=Mbe;exports.generateContentModelInputTransfer=Bbe;exports.generateContentPromptInputDataTypeTransfer=$be;exports.generateContentPromptInputTransfer=Lbe;exports.generateContentResponseContentPropertyDataTypeTransfer=Gbe;exports.generateContentResponseContentPropertyTransfer=kbe;exports.generateContentResponseDataTypeTransfer=Ube;exports.generateContentResponseEntityTransfer=jbe;exports.generateHexadecimalTokenOperation=dde;exports.generateHexadecimalTokenOperationError=ode;exports.generateHexadecimalTokenOperationErrorParentRef=lde;exports.generateHexadecimalTokenResponseDataType=sde;exports.generateId=pN;exports.generateIdFromStrategy=jr;exports.generateIdentifierOperation=Qoe;exports.generateIdentifierOperationAlphabetInput=Joe;exports.generateIdentifierOperationAlphabetInputType=zoe;exports.generateIdentifierOperationError=Xoe;exports.generateIdentifierOperationLengthInput=Woe;exports.generateIdentifierOperationLengthInputType=Hoe;exports.generateIdentifierOperationResponseDataType=Yoe;exports.generateMutablePropertiesExplanation=Ub;exports.generateNewRowMigrationDefinition=Qje;exports.generatePlaceholderValueStore=TLi;exports.generateRandomAlphanumericOperation=Zoe;exports.generateRandomAlphanumericOperationError=qoe;exports.generateRandomAlphanumericOperationLengthInput=Foe;exports.generateRandomAlphanumericOperationLengthInputType=Koe;exports.generateRandomAlphanumericOperationResponseDataType=Soe;exports.generateRandomBase62Operation=Moe;exports.generateRandomBase62OperationError=Loe;exports.generateRandomBase62OperationLengthInput=xoe;exports.generateRandomBase62OperationLengthInputType=Noe;exports.generateRandomBase62OperationResponseDataType=$oe;exports.generateRandomBase64Operation=Uoe;exports.generateRandomBase64OperationError=joe;exports.generateRandomBase64OperationLengthInput=Goe;exports.generateRandomBase64OperationLengthInputType=Boe;exports.generateRandomBase64OperationResponseDataType=koe;exports.generateRandomBoolean=Twe;exports.generateRandomBytes=AN;exports.generateRandomDate=lwe;exports.generateRandomDateAfter=nwe;exports.generateRandomDateBefore=awe;exports.generateRandomDateBetweenRange=swe;exports.generateRandomFloatOperation=Doe;exports.generateRandomFloatOperationError=Roe;exports.generateRandomFloatOperationResponseDataType=Ioe;exports.generateRandomHexadecimalOperation=Voe;exports.generateRandomHexadecimalOperationError=Poe;exports.generateRandomHexadecimalOperationLengthInput=Coe;exports.generateRandomHexadecimalOperationLengthInputType=Ooe;exports.generateRandomHexadecimalOperationResponseDataType=_oe;exports.generateRandomIntegerOperation=Aoe;exports.generateRandomIntegerOperationError=boe;exports.generateRandomIntegerOperationMaxValueInput=voe;exports.generateRandomIntegerOperationMaxValueInputType=Toe;exports.generateRandomIntegerOperationMinValueInput=moe;exports.generateRandomIntegerOperationMinValueInputType=hoe;exports.generateRandomIntegerOperationResponseDataType=Eoe;exports.generateRandomNumber=cwe;exports.generateRandomNumberAfter=dwe;exports.generateRandomNumberBefore=uwe;exports.generateRandomNumberBetweenRange=pwe;exports.generateRandomText=mwe;exports.generateRandomTextAfter=fwe;exports.generateRandomTextBefore=ywe;exports.generateRandomTextBetweenRange=hwe;exports.generateRandomUUIDv4Operation=ide;exports.generateRandomUUIDv4OperationError=tde;exports.generateRandomUUIDv4OperationResponseDataType=ede;exports.generateShortIdentifierOperation=ade;exports.generateShortIdentifierOperationError=nde;exports.generateShortIdentifierOperationResponseDataType=rde;exports.generateStandaloneIfDefault=ALi;exports.generateUniqueUUID=owe;exports.getAllActionDescriptorsForConditions=Zb;exports.getAllActionDescriptorsForGlobalEvents=Sb;exports.getAllActionDescriptorsForLoops=qb;exports.getAllActionDescriptorsForOperations=Qki;exports.getAllBuiltInEntityIds=V1;exports.getAllBuiltInEntityIdsAsync=N1;exports.getAllGloballyDeclaredFunctionDeclarationsExplanation=Uke;exports.getAllVariablesInScope=zji;exports.getBaseBuiltInEntities=Zn;exports.getBaseBuiltInNameFromIntegrationName=dBi;exports.getBaseEntity=cd;exports.getBaseSchemaBasedOnType=xke;exports.getBuiltInEntityOwner=ku;exports.getCallableEntitiesDerivedFromInternalCalls=IUe;exports.getCallableEntitiesDerivedFromWrites=ny;exports.getCallableEntityReferenceSchema=Rke;exports.getCallableEntityTypeSchema=Ike;exports.getCalledBy=bUe;exports.getCalledByParallelCallers=aUe;exports.getCallerEntityReferenceSchema=Tki;exports.getCallerEntityTypeSchema=mki;exports.getCalls=$1;exports.getCanvasEntitiesDerivedFromInternalCalls=gx;exports.getCanvasEntitiesDerivedFromWrites=ml;exports.getCanvasEntityDerivedFromValueReadingEntity=TA;exports.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=gUe;exports.getCanvasEntityReferenceSchema=Lki;exports.getCanvasEntityTypeSchema=$ki;exports.getChildrenEntityWithValues=Aji;exports.getColumnProperties=mn;exports.getCommonAncestor=Ex;exports.getCommonChildren=yA;exports.getConnectionIdFromDefinitionEntity=DBe;exports.getCurrentIanaTimeZone=lN;exports.getCurrentIanaTimeZoneSafe=sN;exports.getCurrentIanaTimezoneError=kX;exports.getCurrentIanaTimezoneOperation=jX;exports.getCurrentIanaTimezoneResponseDT=GX;exports.getCurrentTimestamp=WPe;exports.getCurrentTimestampError=EQ;exports.getCurrentTimestampOperation=bQ;exports.getCurrentTimestampResponseDT=vQ;exports.getDatabaseEntities=Fji;exports.getDatabaseEntity=Sji;exports.getDate=sVe;exports.getDateDateArg=Gee;exports.getDateDateDT=Bee;exports.getDateError=jee;exports.getDateOperation=Uee;exports.getDateResponseDT=kee;exports.getDayOfYear=yVe;exports.getDayOfYearOperation=Mee;exports.getDaysInMonth=hVe;exports.getDaysInMonthOperation=wee;exports.getDeclaration=Wn;exports.getDeclarationOutputedError=Wji;exports.getDeepestScope=xUe;exports.getDefaultRelationalDatabaseEntityOrFirst=MUe;exports.getDimDateArg=Iee;exports.getDimDateDT=gee;exports.getDimError=Dee;exports.getDimResponseDT=Ree;exports.getDoyDateArg=xee;exports.getDoyDateDT=Nee;exports.getDoyError=Lee;exports.getDoyResponseDT=$ee;exports.getDraggableCallableEntityReferenceSchema=wke;exports.getDraggableCallableEntityTypeSchema=Dke;exports.getDraggableCallerEntityReferenceSchema=Eki;exports.getDraggableCallerEntityTypeSchema=vki;exports.getDraggableExecutableEntityReferenceSchema=Iki;exports.getDraggableExecutableEntityTypeSchema=gki;exports.getDraggablePassThroughCallableEntityReferenceSchema=_1;exports.getDraggablePassThroughCallableEntityTypeSchema=C1;exports.getDraggablePlayableEntityReferenceSchema=_ki;exports.getDraggablePlayableEntityTypeSchema=Cki;exports.getEarliestCommonCallerAncestor=bji;exports.getEarliestSingleCallerAncestorOfValueWriterAndItsValueReaders=Eji;exports.getEntitiesCreatedSinceInitialization=df;exports.getEntitiesToPropagateValuesTo=Tl;exports.getEntityArgumentDeclarations=Ax;exports.getEntityInputMaps=AUe;exports.getEntityOutputMaps=xji;exports.getEntityReferenceSchema=xki;exports.getEntityReturnDeclarations=Vji;exports.getEntityTypeSchema=Nki;exports.getEntityWithLogicScopeReferenceSchema=Dki;exports.getEntityWithLogicScopeTypeSchema=Rki;exports.getEntityWithValueReferenceSchema=hki;exports.getEntityWithValueTypeSchema=yki;exports.getEntryPointEntityReferenceSchema=Gp;exports.getEntryPointEntityTypeSchema=Bp;exports.getEventEntityReferenceSchema=D1;exports.getEventEntityTypeSchema=R1;exports.getEventNameFromDefinition=nBi;exports.getExecutableEntityReferenceSchema=Aki;exports.getExecutableEntityTypeSchema=bki;exports.getExtendedBuiltInEntity=$ji;exports.getExtendedDefinitionEntity=M1;exports.getExternalIntegrationIdFromAction=RBe;exports.getExternalIntegrationNameFromBuiltInBaseName=YO;exports.getFilesConnectionInputDataTypeTransfer=Fbe;exports.getFilesConnectionInputTransfer=Sbe;exports.getFilesFilesFilterInputDataTypeTransfer=qbe;exports.getFilesFilesFilterInputTransfer=Zbe;exports.getFilesFoldersFilterInputDataTypeTransfer=Hbe;exports.getFilesFoldersFilterInputTransfer=Wbe;exports.getFilesMimeTypesInputDataTypeTransfer=zbe;exports.getFilesMimeTypesInputTransfer=Jbe;exports.getFilesPageSizeInputDataTypeTransfer=Qbe;exports.getFilesPageSizeInputTransfer=eAe;exports.getFilesPageTokenInputDataTypeTransfer=tAe;exports.getFilesPageTokenInputTransfer=iAe;exports.getFilesResponseDataTypeTransfer=gAe;exports.getFilesResponseEntityTransfer=AAe;exports.getFilesResponseNextPageTokenPropertyDataTypeTransfer=EAe;exports.getFilesResponseNextPageTokenPropertyTransfer=bAe;exports.getFilesResponseResultsPropertyDataTypeTransfer=TAe;exports.getFilesResponseResultsPropertyTransfer=vAe;exports.getFilesResultsEntityIdPropertyDataTypeTransfer=nAe;exports.getFilesResultsEntityIdPropertyTransfer=aAe;exports.getFilesResultsEntityMimeTypePropertyDataTypeTransfer=uAe;exports.getFilesResultsEntityMimeTypePropertyTransfer=pAe;exports.getFilesResultsEntityModifiedTimePropertyDataTypeTransfer=yAe;exports.getFilesResultsEntityModifiedTimePropertyTransfer=hAe;exports.getFilesResultsEntityNamePropertyDataTypeTransfer=oAe;exports.getFilesResultsEntityNamePropertyTransfer=dAe;exports.getFilesResultsEntityParentsPropertyDataTypeTransfer=sAe;exports.getFilesResultsEntityParentsPropertyTransfer=lAe;exports.getFilesResultsEntityTransfer=mAe;exports.getFilesResultsEntityWebViewLinkPropertyDataTypeTransfer=cAe;exports.getFilesResultsEntityWebViewLinkPropertyTransfer=fAe;exports.getFilesTrashedInputDataTypeTransfer=Ybe;exports.getFilesTrashedInputTransfer=Xbe;exports.getFirst=Txe;exports.getFirstBaseEntityWithOwnBase=OUe;exports.getFirstNonLoopScopeOwner=tn;exports.getFirstParentExecutableEntity=DUe;exports.getGenerationTargetSchemaBasedOnType=$ke;exports.getHTTPAPINameFromProjectId=hBe;exports.getHeadIfPartOfDetachedBranch=PUe;exports.getHighestScope=NUe;exports.getHour=lVe;exports.getHourDateArg=Fee;exports.getHourDateDT=Kee;exports.getHourError=qee;exports.getHourOperation=Zee;exports.getHourResponseDT=See;exports.getImplementedBuiltInEntity=Lji;exports.getIndexItem=mxe;exports.getIntegrationIdFromDefinitionEntity=IBe;exports.getIntegrationIdFromEntity=uBi;exports.getIsInteractive=lf;exports.getIsInteractiveOrTrue=Mji;exports.getIsoWdDateArg=Wee;exports.getIsoWdDateDT=Hee;exports.getIsoWdError=Jee;exports.getIsoWdResponseDT=zee;exports.getIsoWeekday=pVe;exports.getIsoWeekdayOperation=Yee;exports.getLast=vxe;exports.getLinkedEntitiesFromArgumentDeclaration=wji;exports.getListFirstN=Ixe;exports.getListLastN=Rxe;exports.getListLength=Axe;exports.getLiteralValueNameFromDataType=cc;exports.getLowestFunctionDeclarationOrActionDescriptorImplementation=Dc;exports.getLowestPersistedEntityImplementation=Rx;exports.getMillisecond=uVe;exports.getMillisecondOperation=Tte;exports.getMinute=oVe;exports.getMinuteDateArg=nte;exports.getMinuteDateDT=rte;exports.getMinuteError=ste;exports.getMinuteOperation=lte;exports.getMinuteResponseDT=ate;exports.getMonth=aVe;exports.getMonthDateArg=Cee;exports.getMonthDateDT=Oee;exports.getMonthError=Pee;exports.getMonthOperation=Vee;exports.getMonthResponseDT=_ee;exports.getMsDateArg=yte;exports.getMsDateDT=fte;exports.getMsError=mte;exports.getMsResponseDT=hte;exports.getOnlyRelevantErrorsForPublication=iji;exports.getParentCallableEntity=qm;exports.getParentCallerEntity=oUe;exports.getParentCanvasEntities=wo;exports.getParentCanvasEntity=Ai;exports.getParentCanvasEntityFromTransfer=py;exports.getParentEntryPoint=Sm;exports.getParentExecutableEntity=vx;exports.getParentPassthroughCallableEntity=lUe;exports.getPassThroughCallableEntityReferenceSchema=O1;exports.getPassThroughCallableEntityTypeSchema=w1;exports.getPeristedEntities=Kji;exports.getPlayableEntityReferenceSchema=Oki;exports.getPlayableEntityTypeSchema=wki;exports.getProject=WUi;exports.getPrototypeByType=Sh;exports.getQuarter=fVe;exports.getQuarterDateArg=Qee;exports.getQuarterDateDT=Xee;exports.getQuarterError=tte;exports.getQuarterOperation=ite;exports.getQuarterResponseDT=ete;exports.getRandomBytes=ef;exports.getRecordOrderForTraversal=aji;exports.getRecordOrderForTraversalAsync=lji;exports.getRecusriveParentsIds=Cx;exports.getReferenceEntityId=re;exports.getReferencedEntitiesStateOrErrors=Kb;exports.getReferencedEntityStateOrErrors=sx;exports.getReferencedIds=fd;exports.getRelatedCallableElementsOnTheRight=EA;exports.getRelatedCanvasElementsOnTheLeft=kp;exports.getRelatedCanvasElementsOnTheLeftFromTransfer=_ji;exports.getRelatedCanvasElementsOnTheRight=bl;exports.getRelatedCanvasElementsOnTheRightAsync=vA;exports.getRelationalDBInstanceNameFromEntityId=a1;exports.getRootEntryPointScopeOwner=vd;exports.getRootExternalIntegrationFromAlias=oBi;exports.getScopeOwner=un;exports.getSecond=dVe;exports.getSecondDateArg=dte;exports.getSecondDateDT=ote;exports.getSecondError=pte;exports.getSecondOperation=cte;exports.getSecondResponseDT=ute;exports.getStateClassFromType=qji;exports.getStepNameFromDefinition=rBi;exports.getTerminationReferenceSchema=Vki;exports.getTerminationTypeSchema=Pki;exports.getTimezoneOffset=WVe;exports.getTimezoneOffsetOperation=tQ;exports.getTopLevelFunctionDeclarationOrActionDescriptor=pC;exports.getTopLevelParentEntityId=BUe;exports.getTouchedCanvasEntitiesFromChangeSet=Hji;exports.getTzOffsetAtArg=XX;exports.getTzOffsetAtDT=JX;exports.getTzOffsetError=eQ;exports.getTzOffsetResponseDT=QX;exports.getTzOffsetTimezoneArg=YX;exports.getTzOffsetTimezoneDT=A_;exports.getUsedArgFromDeclaration=Pji;exports.getUsedReturnFromDeclaration=Nji;exports.getValueReadingEntityReferenceSchema=gke;exports.getValueReadingEntityTypeSchema=Ake;exports.getValueWritingEntityReferenceSchema=fki;exports.getValueWritingEntityTypeSchema=cki;exports.getVariableFromInputMapping=uUe;exports.getVariableFromReturnVariablePointer=fUe;exports.getVariableReferenceSchema=af;exports.getVariableTypeSchema=nf;exports.getVariablesFromArgumentDeclarations=mA;exports.getVariablesFromInputMaps=pUe;exports.getVariablesFromOutputMapping=yUe;exports.getVariablesFromOutputMaps=hUe;exports.getVariablesFromReturnDeclarations=cUe;exports.getVariablesInSameOrHigherScope=JN;exports.getWeekOfYear=cVe;exports.getWeekOfYearOperation=gte;exports.getWoyDateArg=Ete;exports.getWoyDateDT=vte;exports.getWoyError=Ate;exports.getWoyResponseDT=bte;exports.getWrites=L1;exports.getYear=nVe;exports.getYearDateArg=vee;exports.getYearDateDT=Tee;exports.getYearError=bee;exports.getYearOperation=Aee;exports.getYearResponseDT=Eee;exports.globalEventValidation=cLi;exports.gmailEmailsAfterInputDataTypeTransfer=VEe;exports.gmailEmailsAfterInputTransfer=NEe;exports.gmailEmailsAttachmentEntityParentRef=abe;exports.gmailEmailsAttachmentEntityTransfer=Abe;exports.gmailEmailsAttachmentFilenameProp=mbe;exports.gmailEmailsAttachmentFilenamePropDT=hbe;exports.gmailEmailsAttachmentFilenamePropDTParentRef=lbe;exports.gmailEmailsAttachmentIdProp=ybe;exports.gmailEmailsAttachmentIdPropDT=fbe;exports.gmailEmailsAttachmentIdPropDTParentRef=sbe;exports.gmailEmailsAttachmentMimeTypeProp=vbe;exports.gmailEmailsAttachmentMimeTypePropDT=Tbe;exports.gmailEmailsAttachmentMimeTypePropDTParentRef=obe;exports.gmailEmailsAttachmentPropParentRef=FT;exports.gmailEmailsAttachmentSizeProp=bbe;exports.gmailEmailsAttachmentSizePropDT=Ebe;exports.gmailEmailsAttachmentSizePropDTParentRef=dbe;exports.gmailEmailsAttachmentsListDataTypeTransfer=gbe;exports.gmailEmailsAttachmentsModeInputDataTypeTransfer=qEe;exports.gmailEmailsAttachmentsModeInputTransfer=ZEe;exports.gmailEmailsAttachmentsProp=Ibe;exports.gmailEmailsAutoPaginateInputDataTypeTransfer=UEe;exports.gmailEmailsAutoPaginateInputTransfer=KEe;exports.gmailEmailsBeforeInputDataTypeTransfer=xEe;exports.gmailEmailsBeforeInputTransfer=$Ee;exports.gmailEmailsBuiltInActionDescriptorTransfer=Vbe;exports.gmailEmailsConnectionInputDataTypeTransfer=OEe;exports.gmailEmailsConnectionInputTransfer=CEe;exports.gmailEmailsEmailAttachmentsPropDTParentRef=ube;exports.gmailEmailsEmailBccPropDTParentRef=khi;exports.gmailEmailsEmailBodyHtmlPropDTParentRef=qhi;exports.gmailEmailsEmailBodyTextPropDTParentRef=Shi;exports.gmailEmailsEmailCcPropDTParentRef=Ghi;exports.gmailEmailsEmailDateIsoPropDTParentRef=Lhi;exports.gmailEmailsEmailEntityTransfer=Rbe;exports.gmailEmailsEmailFromPropDTParentRef=Mhi;exports.gmailEmailsEmailIdPropDTParentRef=Vhi;exports.gmailEmailsEmailInternalDateMsPropDTParentRef=$hi;exports.gmailEmailsEmailLabelIdsPropDTParentRef=xhi;exports.gmailEmailsEmailMessageIdPropDTParentRef=Khi;exports.gmailEmailsEmailPropParentRef=ST;exports.gmailEmailsEmailRawJsonPropDTParentRef=Zhi;exports.gmailEmailsEmailReplyToPropDTParentRef=jhi;exports.gmailEmailsEmailSnippetPropDTParentRef=Fhi;exports.gmailEmailsEmailSubjectPropDTParentRef=Uhi;exports.gmailEmailsEmailThreadIdPropDTParentRef=Nhi;exports.gmailEmailsEmailToPropDTParentRef=Bhi;exports.gmailEmailsIncludeBodyInputDataTypeTransfer=FEe;exports.gmailEmailsIncludeBodyInputTransfer=SEe;exports.gmailEmailsIncludeHeadersInputDataTypeTransfer=HEe;exports.gmailEmailsIncludeHeadersInputTransfer=WEe;exports.gmailEmailsIncludeSpamTrashInputDataTypeTransfer=zEe;exports.gmailEmailsIncludeSpamTrashInputTransfer=JEe;exports.gmailEmailsLabelIdsInputDataTypeTransfer=LEe;exports.gmailEmailsLabelIdsInputTransfer=MEe;exports.gmailEmailsMaxMessagesInputDataTypeTransfer=QEe;exports.gmailEmailsMaxMessagesInputTransfer=ebe;exports.gmailEmailsMaxPagesInputDataTypeTransfer=YEe;exports.gmailEmailsMaxPagesInputTransfer=XEe;exports.gmailEmailsOutputDataTypeParentRef=tbe;exports.gmailEmailsPageSizeInputDataTypeTransfer=BEe;exports.gmailEmailsPageSizeInputTransfer=GEe;exports.gmailEmailsPageTokenInputDataTypeTransfer=kEe;exports.gmailEmailsPageTokenInputTransfer=jEe;exports.gmailEmailsQInputDataTypeTransfer=_Ee;exports.gmailEmailsQInputTransfer=PEe;exports.gmailEmailsResponseDataTypeTransfer=Pbe;exports.gmailEmailsResponseEmailsProp=wbe;exports.gmailEmailsResponseEmailsPropDT=Dbe;exports.gmailEmailsResponseEmailsPropDTParentRef=nbe;exports.gmailEmailsResponseEmailsPropParentRef=rbe;exports.gmailEmailsResponseEntityParentRef=ibe;exports.gmailEmailsResponseEntityTransfer=_be;exports.gmailEmailsResponseNextPageTokenProp=Cbe;exports.gmailEmailsResponseNextPageTokenPropDT=Obe;exports.gmailEmailsResponseNextPageTokenPropDTParentRef=cbe;exports.gmailEmailsResponseNextPageTokenPropParentRef=pbe;exports.googleAuthExternalConnectionBuiltInBaseEntity=Sc;exports.googleAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=Fc;exports.googleAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=Ehe;exports.googleAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=vhe;exports.googleAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=bhe;exports.googleAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=Kc;exports.googleAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=lyi;exports.googleAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=mhe;exports.googleAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=hhe;exports.googleAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=The;exports.googleAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=yhe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntity=UT;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=_he;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=Ohe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=whe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=Che;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=Dhe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=dyi;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=Ihe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=ghe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=Rhe;exports.googleDriveAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=Ahe;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntity=dP;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=f0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=p0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=u0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=c0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=d0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=Tyi;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=l0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=s0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=o0e;exports.googleGeminiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=a0e;exports.googleMailAuthExternalConnectionBuiltInBaseEntity=aI;exports.googleMailAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=Ghe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=Mhe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=Lhe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=Bhe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=$he;exports.googleMailAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=pyi;exports.googleMailAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=Nhe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=Vhe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=xhe;exports.googleMailAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=Phe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntity=Whe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=Hhe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=qhe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=She;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=Zhe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=Fhe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=fyi;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=Uhe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=jhe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=Khe;exports.googleSheetAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=khe;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntity=n0e;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=r0e;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=t0e;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=e0e;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=i0e;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=Qhe;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=hyi;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=Yhe;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=Jhe;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=Xhe;exports.googleSlidesAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=zhe;exports.groupCallsBasedOnParallelizableExecution=Iji;exports.handleAfterEntityImplementationSideEffects=Wje;exports.handleBeforeEntityImplementationSideEffects=Hje;exports.handleLiteralValueChange=gLi;exports.handleLiteralValueDelete=IPe;exports.handleMetadataChange=$r;exports.handleValueAsTypeChange=ILi;exports.handleValueAsTypeDelete=wPe;exports.hash=yMe;exports.hashAlgDefault=Qde;exports.hashPasswordPBKDF2=vMe;exports.hexToken=nxe;exports.hmac=r1;exports.httpRequestBodyArgument=Xg;exports.httpRequestBodyArgumentRef=Fle;exports.httpRequestBodyDataType=Sle;exports.httpRequestHeadersArgument=Yg;exports.httpRequestHeadersArgumentRef=Ule;exports.httpRequestHeadersDataType=Kle;exports.httpRequestMethodArgument=zg;exports.httpRequestMethodArgumentRef=kle;exports.httpRequestMethodDataType=jle;exports.httpRequestMethodDataTypeRef=Ble;exports.httpRequestOperation=BT;exports.httpRequestOperationErrorValueDescriptor=K_;exports.httpRequestOperationErrorValueDescriptorDatatype=doe;exports.httpRequestOperationErrorValueDescriptorRef=ooe;exports.httpRequestOperationOutputDataType=foe;exports.httpRequestOperationOutputDataTypeEntity=poe;exports.httpRequestOperationOutputDataTypeEntityParentRef=uoe;exports.httpRequestOperationOutputDataTypeParentRef=coe;exports.httpRequestOperationRefFive=ioe;exports.httpRequestOperationRefFour=toe;exports.httpRequestOperationRefNine=loe;exports.httpRequestOperationRefSix=roe;exports.httpRequestOperationRefThree=eoe;exports.httpRequestOperationRefTwo=Qle;exports.httpRequestQueryParamsArgument=k_;exports.httpRequestQueryParamsArgumentRef=Lle;exports.httpRequestQueryParamsDataType=Mle;exports.httpRequestVariableURLArgument=Jg;exports.httpRequestVariableURLArgumentRef=xle;exports.httpRequestVariableURLDataType=$le;exports.httpRequestVariableURLDataTypeRef=Vle;exports.httpResponseBodyOutputProperty=U_;exports.httpResponseBodyOutputPropertyParentRef=soe;exports.httpResponseBodyReturnDataType=Xle;exports.httpResponseBodyReturnDataTypeRef=Jle;exports.httpResponseBodyReturnReturnRef=Yle;exports.httpResponseCodeDataType=Zle;exports.httpResponseCodeOutputProperty=j_;exports.httpResponseCodeOutputPropertyParentRef=noe;exports.httpResponseCodeReturnRef=qle;exports.httpResponseHeadersDataType=zle;exports.httpResponseHeadersDataTypeRef=Hle;exports.httpResponseHeadersOutputProperty=Qg;exports.httpResponseHeadersOutputPropertyParentRef=aoe;exports.httpResponseHeadersReturnRef=Wle;exports.httpStatusCodeValueValidation=yKe;exports.humanizeDiff=UVe;exports.humanizeDiffError=XY;exports.humanizeDiffFirstArgument=zY;exports.humanizeDiffFirstDataType=b_;exports.humanizeDiffOperation=QY;exports.humanizeDiffResponseDataType=YY;exports.humanizeDiffSecondArgument=JY;exports.humanizeDiffSecondDataType=WY;exports.humanizeDiffWithoutSuffixArgument=HY;exports.humanizeDiffWithoutSuffixArgumentDefaultValue=ZY;exports.humanizeDiffWithoutSuffixDataType=qY;exports.humanizeDiffWithoutSuffixDataTypeParentRef=SY;exports.hydrateOrDiscardLiteralValue=pPe;exports.implement=x1;exports.inferArgumentDeclarationDataType=n4e;exports.inferBreakStatementDataType=u4e;exports.inferContinueStatementDataType=p4e;exports.inferDataType=Do;exports.inferFunctionCallDataType=f4e;exports.inferInputMapDataType=WN;exports.inferInternalCallDataType=y4e;exports.inferLoopDataType=m4e;exports.inferOperationDataType=h4e;exports.inferOutputMapDataType=zN;exports.inferPropertyDataType=l4e;exports.inferReturnStatementDataType=d4e;exports.inferSearchDataType=c4e;exports.inferValueDescriptorDataType=o4e;exports.inferVariableDeclarationDataType=s4e;exports.inferVariableInstanceDataType=a4e;exports.initBaseProjectEntity=j1;exports.initBaseProjectEntityAsync=U1;exports.initProject=IKe;exports.initProjectAsync=HUi;exports.initProjectFromFetchResult=gKe;exports.initProjectFromFetchResultAsync=FUi;exports.inputMapValidation=l4i;exports.inputOrOutputShouldBePartOfFinalVariableObjectValue=pA;exports.installedProjectValidation=a4i;exports.internalCallValidation=s4i;exports.isAfter=_Ve;exports.isAfterUnitArgDefaultValue=ure;exports.isBefore=CVe;exports.isBeforeUnitArgDefaultValue=vre;exports.isBetween=xVe;exports.isBetweenUnitArgDefaultValue=_re;exports.isLeapYearFn=LVe;exports.isPromise=wm;exports.isSame=PVe;exports.isSameOrAfter=NVe;exports.isSameOrAfterUnitArgDefaultValue=Jre;exports.isSameOrBefore=VVe;exports.isSameOrBeforeUnitArgDefaultValue=nne;exports.isSameUnitArgDefaultValue=Kre;exports.isUUID=Mx;exports.isValid=$Ve;exports.iterateOverListActionDescriptorListArgumentDeclaration=pIe;exports.iterateOverListActionDescriptorListArgumentDeclarationDataType=dIe;exports.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=oIe;exports.iterateOverListActionDescriptorListArgumentDeclarationParentRef=uIe;exports.iterateOverListLoopActionDescriptor=Hc;exports.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=B0i;exports.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=cIe;exports.iterateOverListLoopBodyActionDescriptor=HT;exports.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=gIe;exports.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=AIe;exports.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=yI;exports.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=hIe;exports.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=yIe;exports.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=mIe;exports.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=bIe;exports.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=vIe;exports.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=TIe;exports.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=EIe;exports.iterateOverListLoopBodyDataType=IIe;exports.iterateOverListLoopDataType=fIe;exports.iterateOverObjectKeysActionDataType=wIe;exports.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=DIe;exports.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=RIe;exports.iterateOverObjectKeysLoopActionDescriptor=bh;exports.iterateOverObjectKeysLoopBodyActionDescriptor=BP;exports.iterateOverObjectKeysLoopBodyAnyDynamicArgument=PIe;exports.iterateOverObjectKeysLoopBodyCurrentValue=MP;exports.iterateOverObjectKeysLoopBodyCurrentValueDataType=OIe;exports.iterateOverObjectKeysLoopBodyDataType=VIe;exports.iterateOverObjectKeysLoopBodyIterationNumber=_Ie;exports.iterateOverObjectKeysLoopBodyIterationNumberDataType=CIe;exports.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=$Ie;exports.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=xIe;exports.iterateOverObjectValuesLoopActionDataType=LIe;exports.iterateOverObjectValuesLoopActionDescriptor=Ah;exports.iterateOverObjectValuesLoopBodyActionDescriptor=jP;exports.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=jIe;exports.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=kIe;exports.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=kP;exports.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=GIe;exports.iterateOverObjectValuesLoopBodyCurrentValueDataType=MIe;exports.iterateOverObjectValuesLoopBodyIterationNumberDataType=BIe;exports.iterateOverObjectValuesLoopBodyReturnDataType=UIe;exports.iterateOverStringActionDescriptorStringArgumentDeclaration=iIe;exports.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=tIe;exports.iterateOverStringLoopActionDescriptor=ZT;exports.iterateOverStringLoopBodyActionDescriptor=fI;exports.iterateOverStringLoopBodyAnyDynamicArgument=sIe;exports.iterateOverStringLoopBodyCurrentValueArgument=$P;exports.iterateOverStringLoopBodyCurrentValueDataType=aIe;exports.iterateOverStringLoopBodyIterationNumberArgument=xP;exports.iterateOverStringLoopBodyIterationNumberDataType=nIe;exports.iterateOverStringLoopBodyOutputDataType=lIe;exports.iterateOverStringLoopResultsDataType=rIe;exports.itersDefault=Yde;exports.jiraAuthExternalConnectionBuiltInBaseEntity=ome;exports.jiraAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=lme;exports.jiraAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=ame;exports.jiraAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=nme;exports.jiraAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=sme;exports.jiraAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=rme;exports.jiraAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=Oyi;exports.jiraAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=tme;exports.jiraAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=eme;exports.jiraAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=ime;exports.jiraAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=Q0e;exports.joinListWithLastSeparator=wt;exports.joinLists=axe;exports.joinStringsOperation=Xm;exports.joinStringsOperationDynamicStringArgument=A3;exports.joinStringsOperationDynamicStringDataType=b3;exports.joinStringsOperationError=I3;exports.joinStringsOperationFirstStringArgument=zA;exports.joinStringsOperationFirstStringDataType=v3;exports.joinStringsOperationResponseDataType=g3;exports.joinStringsOperationSecondStringArgument=JA;exports.joinStringsOperationSecondStringDataType=E3;exports.joinStringsOperationSeparatorStringArgument=T3;exports.joinStringsOperationSeparatorStringDataType=m3;exports.joinStringsOperationSeparatorStringDataTypeDefaultValue=h3;exports.jsonParseError=epe;exports.jsonParseInputStringDT=Yue;exports.jsonParseOperation=tpe;exports.jsonParseResponseDT=Xue;exports.jsonParseValue=Que;exports.jsonStringifyError=ope;exports.jsonStringifyOperation=dpe;exports.jsonStringifyResponseDT=npe;exports.jsonStringifySpace=lpe;exports.jsonStringifySpaceDT=rpe;exports.jsonStringifySpaceDefault=spe;exports.jsonStringifyValue=ape;exports.jsonStringifyValueDT=ipe;exports.jwtBuildHmacAlgArg=Ope;exports.jwtBuildHmacAlgDT=tP;exports.jwtBuildHmacAlgDefault=wpe;exports.jwtBuildHmacAudienceArg=$pe;exports.jwtBuildHmacAudienceDT=bpe;exports.jwtBuildHmacAudienceStringDT=vpe;exports.jwtBuildHmacExpiresArg=Ppe;exports.jwtBuildHmacExpiresDT=fpe;exports.jwtBuildHmacHeaderArg=Mpe;exports.jwtBuildHmacHeaderDT=gpe;exports.jwtBuildHmacIatDefault=Cpe;exports.jwtBuildHmacIncludeIatArg=_pe;exports.jwtBuildHmacIncludeIatDT=cpe;exports.jwtBuildHmacIssuerArg=Npe;exports.jwtBuildHmacIssuerDT=hpe;exports.jwtBuildHmacJwtidArg=Lpe;exports.jwtBuildHmacJwtidDT=Ape;exports.jwtBuildHmacNotBeforeArg=Vpe;exports.jwtBuildHmacNotBeforeDT=ype;exports.jwtBuildHmacOpError=jpe;exports.jwtBuildHmacOperation=Upe;exports.jwtBuildHmacPayloadArg=Rpe;exports.jwtBuildHmacPayloadDT=Sa;exports.jwtBuildHmacResponseDT=kpe;exports.jwtBuildHmacSecretArg=Dpe;exports.jwtBuildHmacSecretDT=ppe;exports.jwtBuildHmacSecretEncDT=Ipe;exports.jwtBuildHmacSecretEncDefault=Bpe;exports.jwtBuildHmacSecretEncodingArg=Gpe;exports.jwtBuildHmacSubjectArg=xpe;exports.jwtBuildHmacSubjectDT=mpe;exports.jwtDecodeOpError=Oce;exports.jwtDecodeOperation=Cce;exports.jwtDecodeOutEncArg=wce;exports.jwtDecodeOutEncDT=fce;exports.jwtDecodeOutEncDefault=Dce;exports.jwtDecodeResponseDT=Ice;exports.jwtDecodeResponseDTEntity=gce;exports.jwtDecodeResponseDTEntityHeaderProp=mce;exports.jwtDecodeResponseDTEntityHeaderPropDT=hce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntity=cce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityAlgProp=ace;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityAlgPropDT=nce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityKidProp=uce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityKidPropDT=dce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityTypProp=oce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityTypPropDT=lce;exports.jwtDecodeResponseDTEntityHeaderPropDTEntityTypPropDTLiteral=sce;exports.jwtDecodeResponseDTEntityPayloadProp=Tce;exports.jwtDecodeResponseDTEntityPayloadPropDT=yce;exports.jwtDecodeResponseDTEntityPayloadPropDTEntity=pce;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityAudProp=zpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityAudPropDT=Wpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityAudPropDTOrString=Zpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityAudPropDTOrStringList=Hpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityExpProp=Ype;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityExpPropDT=Jpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityIatProp=tce;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityIatPropDT=ece;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityIssProp=Fpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityIssPropDT=Kpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityJtiProp=rce;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityJtiPropDT=ice;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityNbfProp=Qpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntityNbfPropDT=Xpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntitySubProp=qpe;exports.jwtDecodeResponseDTEntityPayloadPropDTEntitySubPropDT=Spe;exports.jwtDecodeResponseDTEntityReasonProp=Ece;exports.jwtDecodeResponseDTEntityReasonPropDT=vce;exports.jwtDecodeResponseDTEntityValidProp=Ace;exports.jwtDecodeResponseDTEntityValidPropDT=bce;exports.jwtDecodeTokenArg=Rce;exports.jwtDecodeTokenDT=rP;exports.jwtVerifyHmacAlgArg=kce;exports.jwtVerifyHmacAlgDT=nP;exports.jwtVerifyHmacAlgDefault=Gce;exports.jwtVerifyHmacAudienceArg=Uce;exports.jwtVerifyHmacAudienceDT=Vce;exports.jwtVerifyHmacIssuerArg=jce;exports.jwtVerifyHmacIssuerDT=Pce;exports.jwtVerifyHmacMaxAgeArg=Kce;exports.jwtVerifyHmacMaxAgeDT=Nce;exports.jwtVerifyHmacOpError=Zce;exports.jwtVerifyHmacOperation=Hce;exports.jwtVerifyHmacResponseDT=Lce;exports.jwtVerifyHmacSecretArg=Bce;exports.jwtVerifyHmacSecretDT=_ce;exports.jwtVerifyHmacSecretEncDT=$ce;exports.jwtVerifyHmacSecretEncodingArg=qce;exports.jwtVerifyHmacSkewArg=Fce;exports.jwtVerifyHmacSkewDT=xce;exports.jwtVerifyHmacTokenArg=Mce;exports.jwtVerifyHmacTokenDT=Gd;exports.keyValuePrototype=qi;exports.lengthDefault=Xde;exports.listAddAtIndex=pxe;exports.listAddAtIndexOperation=S8;exports.listAddAtIndexOperationError=F8;exports.listAddAtIndexOperationIndexArg=j8;exports.listAddAtIndexOperationIndexDT=B8;exports.listAddAtIndexOperationListArg=k8;exports.listAddAtIndexOperationListDT=yg;exports.listAddAtIndexOperationResponseDT=K8;exports.listAddAtIndexOperationValueArg=U8;exports.listAddAtIndexOperationValueDT=G8;exports.listAppendOperation=fg;exports.listAppendOperationDynamicArgs=L8;exports.listAppendOperationDynamicArgsDT=$8;exports.listAppendOperationElementToAppendArgument=d_;exports.listAppendOperationElementToAppendDataType=x8;exports.listAppendOperationListArgument=o_;exports.listAppendOperationListDataType=N8;exports.listAppendOperationResponseDataType=M8;exports.listChunkOperation=pJ;exports.listChunkOperationError=uJ;exports.listChunkOperationListArg=lJ;exports.listChunkOperationListDT=E_;exports.listChunkOperationResponseDT=dJ;exports.listChunkOperationSizeArg=oJ;exports.listChunkOperationSizeDT=nJ;exports.listChunkOperationSizeDefaultValue=sJ;exports.listChunkOperationSizeDefaultValueParentRef=aJ;exports.listConcatOperation=az;exports.listConcatOperationError=nz;exports.listConcatOperationListAArg=tz;exports.listConcatOperationListADT=T_;exports.listConcatOperationListBArg=iz;exports.listConcatOperationListBDT=ez;exports.listConcatOperationResponseDT=rz;exports.listContains=Mxe;exports.listContainsAll=Bxe;exports.listContainsAllOperation=sY;exports.listContainsAllOperationListArg=rY;exports.listContainsAllOperationListDT=JJ;exports.listContainsAllOperationListDTOrBooleanDataType=HJ;exports.listContainsAllOperationListDTOrDateDataType=qJ;exports.listContainsAllOperationListDTOrNullDataType=ZJ;exports.listContainsAllOperationListDTOrNumberDataType=WJ;exports.listContainsAllOperationListDTOrStringDataType=zJ;exports.listContainsAllOperationNeedleArg=nY;exports.listContainsAllOperationNeedleDT=iY;exports.listContainsAllOperationNeedleDTOrBooleanDataType=QJ;exports.listContainsAllOperationNeedleDTOrDateDataType=YJ;exports.listContainsAllOperationNeedleDTOrNullDataType=XJ;exports.listContainsAllOperationNeedleDTOrNumberDataType=eY;exports.listContainsAllOperationNeedleDTOrStringDataType=tY;exports.listContainsAllOperationResultVoidDT=aY;exports.listContainsAny=Gxe;exports.listContainsAnyOperation=IY;exports.listContainsAnyOperationListArg=bY;exports.listContainsAnyOperationListDT=fY;exports.listContainsAnyOperationListDTOrBooleanDataType=uY;exports.listContainsAnyOperationListDTOrDateDataType=oY;exports.listContainsAnyOperationListDTOrNullDataType=dY;exports.listContainsAnyOperationListDTOrNumberDataType=pY;exports.listContainsAnyOperationListDTOrStringDataType=cY;exports.listContainsAnyOperationNeedleArg=AY;exports.listContainsAnyOperationNeedleDT=EY;exports.listContainsAnyOperationNeedleDTOrBooleanDataType=mY;exports.listContainsAnyOperationNeedleDTOrDateDataType=yY;exports.listContainsAnyOperationNeedleDTOrNullDataType=hY;exports.listContainsAnyOperationNeedleDTOrNumberDataType=TY;exports.listContainsAnyOperationNeedleDTOrStringDataType=vY;exports.listContainsAnyOperationResultVoidDT=gY;exports.listContainsOperation=FJ;exports.listContainsOperationListArg=jJ;exports.listContainsOperationListDT=xJ;exports.listContainsOperationListDTOrBooleanDataType=PJ;exports.listContainsOperationListDTOrDateDataType=CJ;exports.listContainsOperationListDTOrNullDataType=_J;exports.listContainsOperationListDTOrNumberDataType=VJ;exports.listContainsOperationListDTOrStringDataType=NJ;exports.listContainsOperationNeedleArg=UJ;exports.listContainsOperationNeedleDT=kJ;exports.listContainsOperationNeedleDTOrBooleanDataType=MJ;exports.listContainsOperationNeedleDTOrDateDataType=$J;exports.listContainsOperationNeedleDTOrNullDataType=LJ;exports.listContainsOperationNeedleDTOrNumberDataType=BJ;exports.listContainsOperationNeedleDTOrStringDataType=GJ;exports.listContainsOperationResultVoidDT=KJ;exports.listDeleteAtIndex=gxe;exports.listDeleteAtIndexOperation=qW;exports.listDeleteAtIndexOperationCountArg=KW;exports.listDeleteAtIndexOperationCountDT=BW;exports.listDeleteAtIndexOperationCountDefaultValue=kW;exports.listDeleteAtIndexOperationCountDefaultValueParentRef=GW;exports.listDeleteAtIndexOperationError=SW;exports.listDeleteAtIndexOperationIndexArg=UW;exports.listDeleteAtIndexOperationIndexDT=MW;exports.listDeleteAtIndexOperationListArg=jW;exports.listDeleteAtIndexOperationListDT=Eg;exports.listDeleteAtIndexOperationResponseDT=FW;exports.listDeleteFirstNItemsOperation=r9;exports.listDeleteFirstNItemsOperationCountArg=e9;exports.listDeleteFirstNItemsOperationCountDT=J8;exports.listDeleteFirstNItemsOperationCountDefaultValue=X8;exports.listDeleteFirstNItemsOperationCountDefaultValueParentRef=Y8;exports.listDeleteFirstNItemsOperationError=i9;exports.listDeleteFirstNItemsOperationListArg=Q8;exports.listDeleteFirstNItemsOperationListDT=u_;exports.listDeleteFirstNItemsOperationResponseDT=t9;exports.listDeleteLastNItemsOperation=p9;exports.listDeleteLastNItemsOperationCountArg=o9;exports.listDeleteLastNItemsOperationCountDT=n9;exports.listDeleteLastNItemsOperationCountDefaultValue=s9;exports.listDeleteLastNItemsOperationCountDefaultValueParentRef=a9;exports.listDeleteLastNItemsOperationError=u9;exports.listDeleteLastNItemsOperationListArg=l9;exports.listDeleteLastNItemsOperationListDT=p_;exports.listDeleteLastNItemsOperationResponseDT=d9;exports.listFlattenOperation=rJ;exports.listFlattenOperationError=iJ;exports.listFlattenOperationListArg=eJ;exports.listFlattenOperationListDT=Qz;exports.listFlattenOperationResponseDT=tJ;exports.listGetFirstNItemsOperation=sW;exports.listGetFirstNItemsOperationCountArg=rW;exports.listGetFirstNItemsOperationCountDT=Q9;exports.listGetFirstNItemsOperationCountDefaultValue=tW;exports.listGetFirstNItemsOperationCountDefaultValueParentRef=eW;exports.listGetFirstNItemsOperationError=aW;exports.listGetFirstNItemsOperationListArg=iW;exports.listGetFirstNItemsOperationListDT=c_;exports.listGetFirstNItemsOperationResponseDT=nW;exports.listGetFirstOperation=TW;exports.listGetFirstOperationError=mW;exports.listGetFirstOperationListArg=yW;exports.listGetFirstOperationListDT=fW;exports.listGetFirstOperationResponseDT=hW;exports.listGetIndexItemOperation=cW;exports.listGetIndexItemOperationError=pW;exports.listGetIndexItemOperationIndexArg=dW;exports.listGetIndexItemOperationIndexDT=lW;exports.listGetIndexItemOperationListArg=oW;exports.listGetIndexItemOperationListDT=f_;exports.listGetIndexItemOperationResponseDT=uW;exports.listGetIndexOf=wxe;exports.listGetIndexOfOperation=wW;exports.listGetIndexOfOperationError=DW;exports.listGetIndexOfOperationListArg=IW;exports.listGetIndexOfOperationListDT=y_;exports.listGetIndexOfOperationListDTOrDate=vW;exports.listGetIndexOfOperationListDTOrNumber=EW;exports.listGetIndexOfOperationListDTOrString=bW;exports.listGetIndexOfOperationResponseDT=gW;exports.listGetIndexOfOperationSearchArg=RW;exports.listGetIndexOfOperationSearchDT=AW;exports.listGetLastIndexOf=Oxe;exports.listGetLastIndexOfOperation=LW;exports.listGetLastIndexOfOperationError=$W;exports.listGetLastIndexOfOperationListArg=NW;exports.listGetLastIndexOfOperationListDT=h_;exports.listGetLastIndexOfOperationListDTOrDate=OW;exports.listGetLastIndexOfOperationListDTOrNumber=CW;exports.listGetLastIndexOfOperationListDTOrString=_W;exports.listGetLastIndexOfOperationResponseDT=VW;exports.listGetLastIndexOfOperationSearchArg=xW;exports.listGetLastIndexOfOperationSearchDT=PW;exports.listGetLastNItemsOperation=QW;exports.listGetLastNItemsOperationCountArg=JW;exports.listGetLastNItemsOperationCountDT=ZW;exports.listGetLastNItemsOperationCountDefaultValue=WW;exports.listGetLastNItemsOperationCountDefaultValueParentRef=HW;exports.listGetLastNItemsOperationError=XW;exports.listGetLastNItemsOperationListArg=zW;exports.listGetLastNItemsOperationListDT=m_;exports.listGetLastNItemsOperationResponseDT=YW;exports.listGetLastOperation=s_;exports.listGetLastOperationInputListArgument=P8;exports.listGetLastOperationInputListDataType=_8;exports.listGetLastOperationResponseDataType=V8;exports.listGetLengthOperation=z8;exports.listGetLengthOperationError=W8;exports.listGetLengthOperationListArg=Z8;exports.listGetLengthOperationListDT=q8;exports.listGetLengthOperationResponseDT=H8;exports.listJoinListOperation=n_;exports.listJoinListOperationFirstListArgument=d8;exports.listJoinListOperationFirstListDataType=o8;exports.listJoinListOperationResponseDataType=y8;exports.listJoinListOperationSecondListArgument=p8;exports.listJoinListOperationSecondListDataType=u8;exports.listJoinListOperationSeparatorArgument=f8;exports.listJoinListOperationSeparatorDataType=c8;exports.listPadEndOperation=Xz;exports.listPadEndOperationError=Yz;exports.listPadEndOperationListArg=Hz;exports.listPadEndOperationListDT=gg;exports.listPadEndOperationPadValueArg=zz;exports.listPadEndOperationPadValueDT=Zz;exports.listPadEndOperationResponseDT=Jz;exports.listPadEndOperationTargetLengthArg=Wz;exports.listPadEndOperationTargetLengthDT=qz;exports.listPadStartOperation=Sz;exports.listPadStartOperationError=Fz;exports.listPadStartOperationListArg=kz;exports.listPadStartOperationListDT=Ag;exports.listPadStartOperationPadValueArg=Uz;exports.listPadStartOperationPadValueDT=Gz;exports.listPadStartOperationResponseDT=Kz;exports.listPadStartOperationTargetLengthArg=jz;exports.listPadStartOperationTargetLengthDT=Bz;exports.listPrependOperation=wz;exports.listPrependOperationError=Dz;exports.listPrependOperationListArg=gz;exports.listPrependOperationListDT=v_;exports.listPrependOperationResponseDT=Rz;exports.listPrependOperationValueArg=Iz;exports.listPrependOperationValueDT=Az;exports.listRepeatOperation=wJ;exports.listRepeatOperationCountArg=IJ;exports.listRepeatOperationCountDT=AJ;exports.listRepeatOperationError=DJ;exports.listRepeatOperationListArg=gJ;exports.listRepeatOperationListDT=bJ;exports.listRepeatOperationResponseDT=RJ;exports.listReplaceAll=hxe;exports.listReplaceAllOperation=g9;exports.listReplaceAllOperationError=A9;exports.listReplaceAllOperationListArg=T9;exports.listReplaceAllOperationListDT=hg;exports.listReplaceAllOperationListDTOrDate=c9;exports.listReplaceAllOperationListDTOrNumber=f9;exports.listReplaceAllOperationListDTOrString=y9;exports.listReplaceAllOperationReplaceArg=E9;exports.listReplaceAllOperationReplaceDT=m9;exports.listReplaceAllOperationResponseDT=b9;exports.listReplaceAllOperationSearchArg=v9;exports.listReplaceAllOperationSearchDT=h9;exports.listReplaceAtIndex=cxe;exports.listReplaceAtIndexOperation=P9;exports.listReplaceAtIndexOperationError=_9;exports.listReplaceAtIndexOperationIndexArg=w9;exports.listReplaceAtIndexOperationIndexDT=I9;exports.listReplaceAtIndexOperationListArg=D9;exports.listReplaceAtIndexOperationListDT=mg;exports.listReplaceAtIndexOperationResponseDT=C9;exports.listReplaceAtIndexOperationValueArg=O9;exports.listReplaceAtIndexOperationValueDT=R9;exports.listReplaceFirstNItems=fxe;exports.listReplaceFirstNItemsOperation=U9;exports.listReplaceFirstNItemsOperationError=j9;exports.listReplaceFirstNItemsOperationListArg=M9;exports.listReplaceFirstNItemsOperationListDT=Tg;exports.listReplaceFirstNItemsOperationListDTOrDate=V9;exports.listReplaceFirstNItemsOperationListDTOrNumber=N9;exports.listReplaceFirstNItemsOperationListDTOrString=x9;exports.listReplaceFirstNItemsOperationReplaceArg=G9;exports.listReplaceFirstNItemsOperationReplaceDT=L9;exports.listReplaceFirstNItemsOperationResponseDT=k9;exports.listReplaceFirstNItemsOperationSearchArg=B9;exports.listReplaceFirstNItemsOperationSearchDT=$9;exports.listReplaceLastNItems=yxe;exports.listReplaceLastNItemsOperation=X9;exports.listReplaceLastNItemsOperationError=Y9;exports.listReplaceLastNItemsOperationListArg=H9;exports.listReplaceLastNItemsOperationListDT=vg;exports.listReplaceLastNItemsOperationListDTOrDate=K9;exports.listReplaceLastNItemsOperationListDTOrNumber=F9;exports.listReplaceLastNItemsOperationListDTOrString=S9;exports.listReplaceLastNItemsOperationReplaceArg=z9;exports.listReplaceLastNItemsOperationReplaceDT=Z9;exports.listReplaceLastNItemsOperationResponseDT=J9;exports.listReplaceLastNItemsOperationSearchArg=W9;exports.listReplaceLastNItemsOperationSearchDT=q9;exports.listReverseOperation=uz;exports.listReverseOperationError=dz;exports.listReverseOperationListArg=lz;exports.listReverseOperationListDT=sz;exports.listReverseOperationResponseDT=oz;exports.listShuffleOperation=Vz;exports.listShuffleOperationError=Pz;exports.listShuffleOperationListArg=Cz;exports.listShuffleOperationListDT=Oz;exports.listShuffleOperationResponseDT=_z;exports.listSliceOperation=bz;exports.listSliceOperationEndArg=Tz;exports.listSliceOperationEndDT=cz;exports.listSliceOperationError=Ez;exports.listSliceOperationListArg=hz;exports.listSliceOperationListDT=bg;exports.listSliceOperationResponseDT=vz;exports.listSliceOperationStartArg=mz;exports.listSliceOperationStartDT=pz;exports.listSliceOperationStartDefaultValue=yz;exports.listSliceOperationStartDefaultValueParentRef=fz;exports.listSortOperation=EJ;exports.listSortOperationError=vJ;exports.listSortOperationListArg=mJ;exports.listSortOperationListDT=hJ;exports.listSortOperationListDTOrListOfDatesDataType=cJ;exports.listSortOperationListDTOrListOfNumbersDataType=fJ;exports.listSortOperationListDTOrListOfStringsDataType=yJ;exports.listSortOperationResponseDT=TJ;exports.listSplitOperation=a_;exports.listSplitOperationFirstPartProperty=g8;exports.listSplitOperationFirstPartPropertyDataType=A8;exports.listSplitOperationInputListArgument=T8;exports.listSplitOperationInputListArgumentParentRef=m8;exports.listSplitOperationInputListDataType=h8;exports.listSplitOperationResponseDataType=O8;exports.listSplitOperationResponseDataTypeParentRef=w8;exports.listSplitOperationResponseEntity=D8;exports.listSplitOperationSecondPartProperty=R8;exports.listSplitOperationSecondPartPropertyDataType=I8;exports.listSplitOperationSplitIndexArgument=b8;exports.listSplitOperationSplitIndexArgumentParentRef=E8;exports.listSplitOperationSplitIndexDataType=v8;exports.listUniqueOperation=Mz;exports.listUniqueOperationError=Lz;exports.listUniqueOperationListArg=xz;exports.listUniqueOperationListDT=Nz;exports.listUniqueOperationResponseDT=$z;exports.literalValueValidation=h4i;exports.loopValidation=yLi;exports.lowercaseFirstLetter=Tc;exports.makeAllChangeSetEntitiesDeletable=Z$i;exports.makeAllChangeSetEntitiesEditable=q$i;exports.makeAllChangeSetEntitiesEditableAndDeletable=H$i;exports.makeAllChangeSetEntitiesNonDeletable=z$i;exports.makeAllChangeSetEntitiesNonEditable=W$i;exports.makeAllChangeSetEntitiesNonEditableAndNonDeletable=J$i;exports.manualFlowActionDescriptorDeclarationArgumentDeclaration=NP;exports.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=Jge;exports.manualFlowLoopActionDescriptor=dI;exports.manualFlowLoopBodyActionDescriptor=uI;exports.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=Xge;exports.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Yge;exports.manualFlowLoopBodyDataType=Qge;exports.manualFlowLoopDataType=zge;exports.mapActionDescriptorToTypeItRepresents=jji;exports.mapRange=hLe;exports.mapRecord=bx;exports.maxOf=GVe;exports.maxOfDatesArg=Lie;exports.maxOfDatesDT=O_;exports.maxOfError=Bie;exports.maxOfOperation=Gie;exports.maxOfResponseDT=Mie;exports.median=TLe;exports.mergeArraysOfStringsWithoutDuplicates=JMi;exports.mergeDefinitionEntities=HN;exports.mergeEntityErrorsList=C$i;exports.mergeListOfEntities=Gji;exports.mergeObjects=K2e;exports.mergeProperties=jb;exports.messagesActionRef=tl;exports.messagesEntityParentDTRef=XTe;exports.messagesEntityTransfer=QTe;exports.messagesIntegrationAutoPaginateInputDTParentRef=EP;exports.messagesIntegrationAutoPaginateInputDataTypeTransfer=FTe;exports.messagesIntegrationAutoPaginateInputTransfer=STe;exports.messagesIntegrationBuiltInActionDescriptorTransfer=ove;exports.messagesIntegrationChannelInputDTParentRef=DTe;exports.messagesIntegrationChannelInputDataTypeTransfer=wTe;exports.messagesIntegrationChannelInputTransfer=OTe;exports.messagesIntegrationConnectionInputDTParentRef=gTe;exports.messagesIntegrationConnectionInputDataTypeTransfer=ITe;exports.messagesIntegrationConnectionInputTransfer=RTe;exports.messagesIntegrationIncludeAllMetadataInputDTParentRef=vP;exports.messagesIntegrationIncludeAllMetadataInputDataTypeTransfer=UTe;exports.messagesIntegrationIncludeAllMetadataInputTransfer=KTe;exports.messagesIntegrationInclusiveInputDTParentRef=TP;exports.messagesIntegrationInclusiveInputDataTypeTransfer=kTe;exports.messagesIntegrationInclusiveInputTransfer=jTe;exports.messagesIntegrationLatestInputDTParentRef=MTe;exports.messagesIntegrationLatestInputDataTypeTransfer=BTe;exports.messagesIntegrationLatestInputTransfer=GTe;exports.messagesIntegrationOldestInputDTParentRef=xTe;exports.messagesIntegrationOldestInputDataTypeTransfer=$Te;exports.messagesIntegrationOldestInputTransfer=LTe;exports.messagesIntegrationOnlyThreadRootsInputDTParentRef=bP;exports.messagesIntegrationOnlyThreadRootsInputDataTypeTransfer=WTe;exports.messagesIntegrationOnlyThreadRootsInputTransfer=zTe;exports.messagesIntegrationPageSizeInputDTParentRef=mP;exports.messagesIntegrationPageSizeInputDataTypeTransfer=CTe;exports.messagesIntegrationPageSizeInputTransfer=_Te;exports.messagesIntegrationPageTokenInputDTParentRef=PTe;exports.messagesIntegrationPageTokenInputDataTypeTransfer=VTe;exports.messagesIntegrationPageTokenInputTransfer=NTe;exports.messagesIntegrationResponseDataTypeTransfer=lve;exports.messagesIntegrationTextContainsInputDTParentRef=qTe;exports.messagesIntegrationTextContainsInputDataTypeTransfer=ZTe;exports.messagesIntegrationTextContainsInputTransfer=HTe;exports.messagesResponseDTParentRef=JTe;exports.messagesResponseEntityParentRef=YTe;exports.messagesResponseEntityTransfer=sve;exports.messagesResponseMessagesProp=ive;exports.messagesResponseMessagesPropDT=tve;exports.messagesResponseMessagesPropDTParentRef=eve;exports.messagesResponseNextPageTokenProp=ave;exports.messagesResponseNextPageTokenPropDT=nve;exports.messagesResponseNextPageTokenPropDTParentRef=rve;exports.messagesResponsePropsParentRef=AP;exports.methodDefaultValue=Gle;exports.microsoftAuthExternalConnectionBuiltInBaseEntity=x0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=N0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=P0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=_0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=V0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=C0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=Ayi;exports.microsoftAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=w0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=D0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=O0e;exports.microsoftAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=R0e;exports.minOf=BVe;exports.minOfDatesArg=Vie;exports.minOfDatesDT=w_;exports.minOfError=xie;exports.minOfOperation=$ie;exports.minOfResponseDT=Nie;exports.mockClientProject=JV;exports.modifyEditableAndDeletableDownstreamEntitiesFromGiven=G1;exports.nestedObjectKeyValueEquals=U2e;exports.nextWeekday=FVe;exports.nextWeekdayBaseDateArg=yX;exports.nextWeekdayBaseDateDT=Ig;exports.nextWeekdayError=TX;exports.nextWeekdayOperation=vX;exports.nextWeekdayResponseDT=mX;exports.nextWeekdayWeekdayArg=hX;exports.nextWeekdayWeekdayDT=fX;exports.noSpacesOrDashesValueValidation=Jje;exports.noSpacesValueValidation=hx;exports.nthRoot=vLe;exports.nullPrototype=ba;exports.numberAbsoluteOperand=Kj;exports.numberAbsoluteOperandDataType=Uj;exports.numberAbsoluteOperation=qj;exports.numberAbsoluteOperationError=Sj;exports.numberAbsoluteResponseDataType=Fj;exports.numberAcosOperation=jF;exports.numberAcosOperationError=kF;exports.numberAcosResponseDT=GF;exports.numberAcosValue=BF;exports.numberAcosValueDT=$C;exports.numberAdditionDynamicSummand=vC;exports.numberAdditionDynamicSummandDataType=Jk;exports.numberAdditionFirstSummand=TC;exports.numberAdditionFirstSummandDataType=Hk;exports.numberAdditionOperation=NA;exports.numberAdditionOperationError=Xk;exports.numberAdditionResponseDataType=Yk;exports.numberAdditionSecondSummand=zk;exports.numberAdditionSecondSummandDataType=Wk;exports.numberAsinOperation=LF;exports.numberAsinOperationError=$F;exports.numberAsinResponseDT=xF;exports.numberAsinValue=NF;exports.numberAsinValueDT=xC;exports.numberAtan2Operation=YF;exports.numberAtan2OperationError=JF;exports.numberAtan2ResponseDT=zF;exports.numberAtan2X=WF;exports.numberAtan2XDT=HF;exports.numberAtan2Y=ZF;exports.numberAtan2YDT=ZA;exports.numberAtanOperation=qF;exports.numberAtanOperationError=SF;exports.numberAtanResponseDT=FF;exports.numberAtanValue=KF;exports.numberAtanValueDT=LC;exports.numberAverageDynamicValue=aK;exports.numberAverageDynamicValueDT=nK;exports.numberAverageFirstValue=tK;exports.numberAverageFirstValueDT=kA;exports.numberAverageOperation=oK;exports.numberAverageOperationError=lK;exports.numberAverageResponseDT=sK;exports.numberAverageSecondValue=rK;exports.numberAverageSecondValueDT=iK;exports.numberCeilOperation=AU;exports.numberCeilOperationError=bU;exports.numberCeilResponseDataType=EU;exports.numberCeilValue=vU;exports.numberCeilValueDataType=TU;exports.numberClampMax=GU;exports.numberClampMaxDT=LU;exports.numberClampMin=BU;exports.numberClampMinDT=$U;exports.numberClampOperation=UU;exports.numberClampOperationError=jU;exports.numberClampResponseDT=kU;exports.numberClampValue=MU;exports.numberClampValueDT=BA;exports.numberCosOperation=EF;exports.numberCosOperationError=vF;exports.numberCosResponseDT=TF;exports.numberCosValue=mF;exports.numberCosValueDT=VC;exports.numberCubeRootOperation=SK;exports.numberCubeRootOperationError=FK;exports.numberCubeRootResponseDT=KK;exports.numberCubeRootValue=UK;exports.numberCubeRootValueDT=jK;exports.numberDivisionDividend=Cj;exports.numberDivisionDividendDataType=RC;exports.numberDivisionDivisor=Pj;exports.numberDivisionDivisorDataType=_j;exports.numberDivisionOperation=xj;exports.numberDivisionOperationError=Nj;exports.numberDivisionResponseDataType=Vj;exports.numberExpOperation=iF;exports.numberExpOperationError=tF;exports.numberExpResponseDT=eF;exports.numberExpValue=QK;exports.numberExpValueDT=XK;exports.numberExponentiationBase=mj;exports.numberExponentiationBaseDataType=bC;exports.numberExponentiationExponent=vj;exports.numberExponentiationExponentDataType=Tj;exports.numberExponentiationOperation=Aj;exports.numberExponentiationOperationError=bj;exports.numberExponentiationResponseDataType=Ej;exports.numberFloorOperation=OU;exports.numberFloorOperationError=wU;exports.numberFloorResponseDataType=DU;exports.numberFloorValue=RU;exports.numberFloorValueDataType=IU;exports.numberLessThanOperation=o3;exports.numberLessThanOperationLeftHandArgument=t3;exports.numberLessThanOperationLeftHandArgumentDataType=QS;exports.numberLessThanOperationLeftHandArgumentDataTypeParentRef=XS;exports.numberLessThanOperationLeftHandArgumentParentRef=e3;exports.numberLessThanOperationResultVoidDataType=l3;exports.numberLessThanOperationResultVoidDataTypeParentRef=s3;exports.numberLessThanOperationRightHandArgument=a3;exports.numberLessThanOperationRightHandArgumentDataType=r3;exports.numberLessThanOperationRightHandArgumentDataTypeParentRef=i3;exports.numberLessThanOperationRightHandArgumentParentRef=n3;exports.numberLessThanOrEqualOperation=jS;exports.numberLessThanOrEqualOperationLeftHandArgument=xS;exports.numberLessThanOrEqualOperationLeftHandArgumentDataType=VS;exports.numberLessThanOrEqualOperationLeftHandArgumentDataTypeParentRef=PS;exports.numberLessThanOrEqualOperationLeftHandArgumentParentRef=NS;exports.numberLessThanOrEqualOperationResultVoidDataType=kS;exports.numberLessThanOrEqualOperationResultVoidDataTypeParentRef=GS;exports.numberLessThanOrEqualOperationRightHandArgument=BS;exports.numberLessThanOrEqualOperationRightHandArgumentDataType=LS;exports.numberLessThanOrEqualOperationRightHandArgumentDataTypeParentRef=$S;exports.numberLessThanOrEqualOperationRightHandArgumentParentRef=MS;exports.numberLog10Operation=yF;exports.numberLog10OperationError=fF;exports.numberLog10ResponseDT=cF;exports.numberLog10Value=pF;exports.numberLog10ValueDT=uF;exports.numberLogNaturalOperation=oF;exports.numberLogNaturalOperationError=lF;exports.numberLogNaturalResponseDT=sF;exports.numberLogNaturalValue=aF;exports.numberLogNaturalValueDT=nF;exports.numberMapRangeInMax=zU;exports.numberMapRangeInMaxDT=SU;exports.numberMapRangeInMin=WU;exports.numberMapRangeInMinDT=FU;exports.numberMapRangeOperation=eK;exports.numberMapRangeOperationError=QU;exports.numberMapRangeOutMax=YU;exports.numberMapRangeOutMaxDT=ZU;exports.numberMapRangeOutMin=JU;exports.numberMapRangeOutMinDT=qU;exports.numberMapRangeResponseDT=XU;exports.numberMapRangeValue=HU;exports.numberMapRangeValueDT=KU;exports.numberMaxOfDynamicValue=_K;exports.numberMaxOfDynamicValueDT=CK;exports.numberMaxOfFirstValue=DK;exports.numberMaxOfFirstValueDT=qA;exports.numberMaxOfOperation=NK;exports.numberMaxOfOperationError=VK;exports.numberMaxOfResponseDT=PK;exports.numberMaxOfSecondValue=OK;exports.numberMaxOfSecondValueDT=wK;exports.numberMedianDynamicValue=fK;exports.numberMedianDynamicValueDT=cK;exports.numberMedianFirstValue=dK;exports.numberMedianFirstValueDT=UA;exports.numberMedianOperation=mK;exports.numberMedianOperationError=hK;exports.numberMedianResponseDT=yK;exports.numberMedianSecondValue=pK;exports.numberMedianSecondValueDT=uK;exports.numberMinOfDynamicValue=AK;exports.numberMinOfDynamicValueDT=bK;exports.numberMinOfFirstValue=TK;exports.numberMinOfFirstValueDT=FA;exports.numberMinOfOperation=RK;exports.numberMinOfOperationError=IK;exports.numberMinOfResponseDT=gK;exports.numberMinOfSecondValue=EK;exports.numberMinOfSecondValueDT=vK;exports.numberMoreThanOperation=YS;exports.numberMoreThanOperationLeftHandArgument=SS;exports.numberMoreThanOperationLeftHandArgumentDataType=KS;exports.numberMoreThanOperationLeftHandArgumentDataTypeParentRef=US;exports.numberMoreThanOperationLeftHandArgumentParentRef=FS;exports.numberMoreThanOperationResultVoidDataType=JS;exports.numberMoreThanOperationResultVoidDataTypeParentRef=zS;exports.numberMoreThanOperationRightHandArgument=WS;exports.numberMoreThanOperationRightHandArgumentDataType=ZS;exports.numberMoreThanOperationRightHandArgumentDataTypeParentRef=qS;exports.numberMoreThanOperationRightHandArgumentParentRef=HS;exports.numberMoreThanOrEqualOperation=Jm;exports.numberMoreThanOrEqualOperationLeftHandArgument=IS;exports.numberMoreThanOrEqualOperationLeftHandArgumentDataType=AS;exports.numberMoreThanOrEqualOperationLeftHandArgumentDataTypeParentRef=bS;exports.numberMoreThanOrEqualOperationLeftHandArgumentParentRef=gS;exports.numberMoreThanOrEqualOperationResultVoidDataType=_S;exports.numberMoreThanOrEqualOperationResultVoidDataTypeParentRef=CS;exports.numberMoreThanOrEqualOperationRightHandArgument=OS;exports.numberMoreThanOrEqualOperationRightHandArgumentDataType=DS;exports.numberMoreThanOrEqualOperationRightHandArgumentDataTypeParentRef=RS;exports.numberMoreThanOrEqualOperationRightHandArgumentParentRef=wS;exports.numberMultiplicationDynamicFactor=cj;exports.numberMultiplicationDynamicFactorDataType=pj;exports.numberMultiplicationFirstFactor=oj;exports.numberMultiplicationFirstFactorDataType=LA;exports.numberMultiplicationOperation=hj;exports.numberMultiplicationOperationError=yj;exports.numberMultiplicationResponseDataType=fj;exports.numberMultiplicationSecondFactor=uj;exports.numberMultiplicationSecondFactorDataType=dj;exports.numberNegateOperand=Mj;exports.numberNegateOperandDataType=Lj;exports.numberNegateOperation=kj;exports.numberNegateOperationError=Gj;exports.numberNegateResponseDataType=Bj;exports.numberNthRootN=HK;exports.numberNthRootNDT=ZK;exports.numberNthRootOperation=JK;exports.numberNthRootOperationError=zK;exports.numberNthRootResponseDT=WK;exports.numberNthRootValue=qK;exports.numberNthRootValueDT=PC;exports.numberPercentOfOperation=fS;exports.numberPercentOfOperationError=cS;exports.numberPercentOfPercent=oS;exports.numberPercentOfPercentDT=HA;exports.numberPercentOfResponseDT=pS;exports.numberPercentOfValue=uS;exports.numberPercentOfValueDT=dS;exports.numberPercentageChangeNew=mS;exports.numberPercentageChangeNewDT=hS;exports.numberPercentageChangeOld=yS;exports.numberPercentageChangeOldDT=WA;exports.numberPercentageChangeOperation=ES;exports.numberPercentageChangeOperationError=vS;exports.numberPercentageChangeResponseDT=TS;exports.numberPrototype=we;exports.numberRemainderDividend=gj;exports.numberRemainderDividendDataType=gC;exports.numberRemainderDivisor=Rj;exports.numberRemainderDivisorDataType=Ij;exports.numberRemainderOperation=Oj;exports.numberRemainderOperationError=wj;exports.numberRemainderResponseDataType=Dj;exports.numberRoundOperation=hU;exports.numberRoundOperationError=yU;exports.numberRoundResponseDataType=fU;exports.numberRoundToDecimalsDecimals=eU;exports.numberRoundToDecimalsDecimalsDataType=Qj;exports.numberRoundToDecimalsOperation=rU;exports.numberRoundToDecimalsOperationError=iU;exports.numberRoundToDecimalsResponseDataType=tU;exports.numberRoundToDecimalsValue=Xj;exports.numberRoundToDecimalsValueDataType=wC;exports.numberRoundValue=cU;exports.numberRoundValueDataType=pU;exports.numberSignOperand=Wj;exports.numberSignOperandDataType=Hj;exports.numberSignOperation=Yj;exports.numberSignOperationError=Jj;exports.numberSignResponseDataType=zj;exports.numberSinOperation=DF;exports.numberSinOperationError=RF;exports.numberSinResponseDT=IF;exports.numberSinValue=gF;exports.numberSinValueDT=AF;exports.numberSnapToStepOperation=dU;exports.numberSnapToStepOperationError=oU;exports.numberSnapToStepResponseDataType=lU;exports.numberSnapToStepStep=sU;exports.numberSnapToStepStepDataType=aU;exports.numberSnapToStepValue=nU;exports.numberSnapToStepValueDataType=CC;exports.numberSquareRootOperation=GK;exports.numberSquareRootOperationError=BK;exports.numberSquareRootResponseDT=MK;exports.numberSquareRootValue=LK;exports.numberSquareRootValueDT=$K;exports.numberSubtractionDynamicSubtrahend=nj;exports.numberSubtractionDynamicSubtrahendDataType=rj;exports.numberSubtractionMinuend=ej;exports.numberSubtractionMinuendDataType=Qk;exports.numberSubtractionOperation=lj;exports.numberSubtractionOperationError=sj;exports.numberSubtractionResponseDataType=aj;exports.numberSubtractionSubtrahend=ij;exports.numberSubtractionSubtrahendDataType=tj;exports.numberTanOperation=PF;exports.numberTanOperationError=_F;exports.numberTanResponseDT=CF;exports.numberTanValue=OF;exports.numberTanValueDT=NC;exports.numberToDegreesOperation=lS;exports.numberToDegreesOperationError=sS;exports.numberToDegreesRadians=nS;exports.numberToDegreesRadiansDT=GC;exports.numberToDegreesResponseDT=aS;exports.numberToRadiansDegrees=QF;exports.numberToRadiansDegreesDT=BC;exports.numberToRadiansOperation=iS;exports.numberToRadiansOperationError=tS;exports.numberToRadiansResponseDT=eS;exports.numberTruncOperation=xU;exports.numberTruncOperationError=NU;exports.numberTruncResponseDataType=VU;exports.numberTruncValue=PU;exports.numberTruncValueDataType=_U;exports.numberValueAutogenerationSchema=J4e;exports.objectDeleteKeyOperation=sae;exports.objectDeleteKeyOperationError=aae;exports.objectDeleteKeyOperationKeyArg=rae;exports.objectDeleteKeyOperationKeyDT=iae;exports.objectDeleteKeyOperationObjArg=tae;exports.objectDeleteKeyOperationObjDT=x_;exports.objectDeleteKeyOperationResponseDT=nae;exports.objectDeleteNestedKeyOperation=mae;exports.objectDeleteNestedKeyOperationError=hae;exports.objectDeleteNestedKeyOperationKeyArg=fae;exports.objectDeleteNestedKeyOperationKeyDT=cae;exports.objectDeleteNestedKeyOperationKeyDTOrBaseList=uae;exports.objectDeleteNestedKeyOperationKeyDTOrListOfNumbers=dae;exports.objectDeleteNestedKeyOperationKeyDTOrListOfStrings=oae;exports.objectDeleteNestedKeyOperationKeyDTOrString=pae;exports.objectDeleteNestedKeyOperationObjArg=lae;exports.objectDeleteNestedKeyOperationObjDT=$c;exports.objectDeleteNestedKeyOperationResponseDT=yae;exports.objectEntries=q2e;exports.objectEntriesOperation=_le;exports.objectEntriesOperationError=Cle;exports.objectEntriesOperationObjArg=wle;exports.objectEntriesOperationObjDT=Dle;exports.objectEntriesOperationResultDT=Ole;exports.objectHasKey=G2e;exports.objectHasKeyOperation=mse;exports.objectHasKeyOperationError=hse;exports.objectHasKeyOperationKeyArg=fse;exports.objectHasKeyOperationKeyDT=pse;exports.objectHasKeyOperationObjArg=cse;exports.objectHasKeyOperationObjDT=L_;exports.objectHasKeyOperationResultVoidDT=yse;exports.objectHasNestedKey=j2e;exports.objectHasNestedKeyOperation=wse;exports.objectHasNestedKeyOperationError=Dse;exports.objectHasNestedKeyOperationKeyArg=Ise;exports.objectHasNestedKeyOperationKeyDT=Ase;exports.objectHasNestedKeyOperationKeyDTOrBaseList=Ese;exports.objectHasNestedKeyOperationKeyDTOrListOfNumbers=Tse;exports.objectHasNestedKeyOperationKeyDTOrListOfStrings=vse;exports.objectHasNestedKeyOperationKeyDTOrString=bse;exports.objectHasNestedKeyOperationObjArg=gse;exports.objectHasNestedKeyOperationObjDT=Mc;exports.objectHasNestedKeyOperationResultVoidDT=Rse;exports.objectIsInstanceOfTypeOperation=Nse;exports.objectIsInstanceOfTypeOperationAArg=Cse;exports.objectIsInstanceOfTypeOperationADT=M_;exports.objectIsInstanceOfTypeOperationBArg=_se;exports.objectIsInstanceOfTypeOperationBDT=Ose;exports.objectIsInstanceOfTypeOperationError=Vse;exports.objectIsInstanceOfTypeOperationResultVoidDT=Pse;exports.objectKeyValueEquals=k2e;exports.objectKeyValueEqualsOperation=qse;exports.objectKeyValueEqualsOperationError=Sse;exports.objectKeyValueEqualsOperationExpectedValueArg=Kse;exports.objectKeyValueEqualsOperationExpectedValueDT=Use;exports.objectKeyValueEqualsOperationExpectedValueDTOrBooleanDataType=Gse;exports.objectKeyValueEqualsOperationExpectedValueDTOrDateDataType=Mse;exports.objectKeyValueEqualsOperationExpectedValueDTOrNullDataType=Bse;exports.objectKeyValueEqualsOperationExpectedValueDTOrNumberDataType=kse;exports.objectKeyValueEqualsOperationExpectedValueDTOrStringDataType=jse;exports.objectKeyValueEqualsOperationKeyArg=Lse;exports.objectKeyValueEqualsOperationKeyDT=xse;exports.objectKeyValueEqualsOperationObjArg=$se;exports.objectKeyValueEqualsOperationObjDT=B_;exports.objectKeyValueEqualsOperationResultBooleanDT=Fse;exports.objectKeys=F2e;exports.objectKeysOperation=Rle;exports.objectKeysOperationError=Ile;exports.objectKeysOperationObjArg=Ale;exports.objectKeysOperationObjDT=ble;exports.objectKeysOperationResultDT=gle;exports.objectMergeOperation=yle;exports.objectMergeOperationError=fle;exports.objectMergeOperationLeftArg=ule;exports.objectMergeOperationLeftDT=G_;exports.objectMergeOperationResultDT=cle;exports.objectMergeOperationRightArg=ple;exports.objectMergeOperationRightDT=dle;exports.objectNestedKeyValueEqualsOperation=ole;exports.objectNestedKeyValueEqualsOperationError=lle;exports.objectNestedKeyValueEqualsOperationExpectedValueArg=ale;exports.objectNestedKeyValueEqualsOperationExpectedValueDT=nle;exports.objectNestedKeyValueEqualsOperationExpectedValueDTOrBooleanDataType=tle;exports.objectNestedKeyValueEqualsOperationExpectedValueDTOrDateDataType=Qse;exports.objectNestedKeyValueEqualsOperationExpectedValueDTOrNullDataType=ele;exports.objectNestedKeyValueEqualsOperationExpectedValueDTOrNumberDataType=ile;exports.objectNestedKeyValueEqualsOperationExpectedValueDTOrStringDataType=rle;exports.objectNestedKeyValueEqualsOperationKeyArg=Xse;exports.objectNestedKeyValueEqualsOperationKeyDT=Jse;exports.objectNestedKeyValueEqualsOperationKeyDTOrBaseList=Wse;exports.objectNestedKeyValueEqualsOperationKeyDTOrListOfNumbers=Zse;exports.objectNestedKeyValueEqualsOperationKeyDTOrListOfStrings=Hse;exports.objectNestedKeyValueEqualsOperationKeyDTOrString=zse;exports.objectNestedKeyValueEqualsOperationObjArg=Yse;exports.objectNestedKeyValueEqualsOperationObjDT=Bc;exports.objectNestedKeyValueEqualsOperationResultBooleanDT=sle;exports.objectReadKeyOperation=gae;exports.objectReadKeyOperationError=Aae;exports.objectReadKeyOperationKeyArg=Eae;exports.objectReadKeyOperationKeyDT=vae;exports.objectReadKeyOperationObjArg=Tae;exports.objectReadKeyOperationObjDT=$_;exports.objectReadKeyOperationResponseDT=bae;exports.objectReadNestedKeyOperation=jae;exports.objectReadNestedKeyOperationError=kae;exports.objectReadNestedKeyOperationKeyArg=Bae;exports.objectReadNestedKeyOperationKeyDT=Mae;exports.objectReadNestedKeyOperationKeyDTOrBaseList=$ae;exports.objectReadNestedKeyOperationKeyDTOrListOfNumbers=xae;exports.objectReadNestedKeyOperationKeyDTOrListOfStrings=Nae;exports.objectReadNestedKeyOperationKeyDTOrString=Lae;exports.objectReadNestedKeyOperationObjArg=Vae;exports.objectReadNestedKeyOperationObjDT=Lc;exports.objectReadNestedKeyOperationResponseDT=Gae;exports.objectValues=S2e;exports.objectValuesOperation=Ele;exports.objectValuesOperationError=vle;exports.objectValuesOperationObjArg=mle;exports.objectValuesOperationObjDT=hle;exports.objectValuesOperationResultDT=Tle;exports.objectWriteKeyOperation=Pae;exports.objectWriteKeyOperationError=_ae;exports.objectWriteKeyOperationKeyArg=Dae;exports.objectWriteKeyOperationKeyDT=Rae;exports.objectWriteKeyOperationObjArg=Iae;exports.objectWriteKeyOperationObjDT=Wg;exports.objectWriteKeyOperationResponseDT=Cae;exports.objectWriteKeyOperationValueArg=Oae;exports.objectWriteKeyOperationValueDT=wae;exports.objectWriteNestedKeyOperation=Xae;exports.objectWriteNestedKeyOperationError=Yae;exports.objectWriteNestedKeyOperationKeyArg=Hae;exports.objectWriteNestedKeyOperationKeyDT=Zae;exports.objectWriteNestedKeyOperationKeyDTOrBaseList=Sae;exports.objectWriteNestedKeyOperationKeyDTOrListOfNumbers=Fae;exports.objectWriteNestedKeyOperationKeyDTOrListOfStrings=Kae;exports.objectWriteNestedKeyOperationKeyDTOrString=qae;exports.objectWriteNestedKeyOperationObjArg=Uae;exports.objectWriteNestedKeyOperationObjDT=Tp;exports.objectWriteNestedKeyOperationResponseDT=Jae;exports.objectWriteNestedKeyOperationValueArg=zae;exports.objectWriteNestedKeyOperationValueDT=Wae;exports.objectWriteSafeNestedKeyRecursivelyOperation=use;exports.objectWriteSafeNestedKeyRecursivelyOperationError=dse;exports.objectWriteSafeNestedKeyRecursivelyOperationKeyArg=ase;exports.objectWriteSafeNestedKeyRecursivelyOperationKeyDT=nse;exports.objectWriteSafeNestedKeyRecursivelyOperationKeyDTOrBaseList=ise;exports.objectWriteSafeNestedKeyRecursivelyOperationKeyDTOrListOfNumbers=tse;exports.objectWriteSafeNestedKeyRecursivelyOperationKeyDTOrListOfStrings=ese;exports.objectWriteSafeNestedKeyRecursivelyOperationKeyDTOrString=rse;exports.objectWriteSafeNestedKeyRecursivelyOperationObjArg=Qae;exports.objectWriteSafeNestedKeyRecursivelyOperationObjDT=vp;exports.objectWriteSafeNestedKeyRecursivelyOperationResponseDT=ose;exports.objectWriteSafeNestedKeyRecursivelyOperationValueArg=lse;exports.objectWriteSafeNestedKeyRecursivelyOperationValueDT=sse;exports.openaiAuthExternalConnectionBuiltInBaseEntity=vme;exports.openaiAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=Tme;exports.openaiAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=hme;exports.openaiAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=yme;exports.openaiAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=mme;exports.openaiAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=fme;exports.openaiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=_yi;exports.openaiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=pme;exports.openaiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=ume;exports.openaiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=cme;exports.openaiAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=dme;exports.operationValidation=uLi;exports.orCondition=nV;exports.orConditionRef=rmi;exports.orConditionResultVoidDataType=$De;exports.orConditionResultVoidDataTypeParentRef=xDe;exports.orderEntitiesForTraversal=nji;exports.orderEntitiesForTraversalAsync=sji;exports.outEncDefault=iue;exports.outputMapValidation=c4i;exports.padEndList=$xe;exports.padStartList=xxe;exports.parallelExecutionOperation=Ao;exports.parallelExecutionOperationListOfFunctionsArgument=__;exports.parallelExecutionOperationListOfFunctionsArgumentDatatype=Ine;exports.parallelExecutionOperationListOfFunctionsBlueprint=gne;exports.parallelExecutionOperationListOfFunctionsBlueprintDataType=Ane;exports.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=bne;exports.parallelExecutionOperationListOfFunctionsBlueprintDynamicInputParentRef=Ene;exports.parallelExecutionOperationListOfFunctionsBlueprintParentRef=C_;exports.parallelExecutionOperationResponseDataType=Rne;exports.parseDate=JPe;exports.parseDateError=NQ;exports.parseDateInputArg=PQ;exports.parseDateInputDT=g_;exports.parseDateOperation=xQ;exports.parseDateResponseDT=VQ;exports.passwordHashPBKDF2HashAlgArg=bde;exports.passwordHashPBKDF2HashAlgDT=J_;exports.passwordHashPBKDF2HashAlgDefault=Ede;exports.passwordHashPBKDF2IterationsArg=Tde;exports.passwordHashPBKDF2ItersDT=cde;exports.passwordHashPBKDF2LengthArg=vde;exports.passwordHashPBKDF2LengthDT=fde;exports.passwordHashPBKDF2OpError=Dde;exports.passwordHashPBKDF2Operation=wde;exports.passwordHashPBKDF2PasswordArg=mde;exports.passwordHashPBKDF2PwdDT=nh;exports.passwordHashPBKDF2ResponseDT=Rde;exports.passwordHashPBKDF2SaltArg=Ade;exports.passwordHashPBKDF2SaltDT=yde;exports.passwordHashPBKDF2SaltEncDT=hde;exports.passwordHashPBKDF2SaltEncDefault=gde;exports.passwordHashPBKDF2SaltEncodingArg=Ide;exports.passwordVerifyPBKDF2EnvDT=Ode;exports.passwordVerifyPBKDF2EnvelopeArg=Pde;exports.passwordVerifyPBKDF2OpError=Vde;exports.passwordVerifyPBKDF2Operation=Nde;exports.passwordVerifyPBKDF2PasswordArg=_de;exports.passwordVerifyPBKDF2PwdDT=rI;exports.passwordVerifyPBKDF2ResponseDT=Cde;exports.percentageChange=ELe;exports.persistedBuiltInBaseEntity=dn;exports.persistedBuiltInBaseEntityBaseColumnProperty=QRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyBooleanDataTypeOption=BRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyBooleanDataTypeOptionParentRef=MRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyDataType=YRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyDateDataTypeOption=kRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyDateDataTypeOptionParentRef=GRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyEnumDataTypeOption=URe;exports.persistedBuiltInBaseEntityBaseColumnPropertyEnumDataTypeOptionParentRef=jRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyForeignKeyDataTypeOption=FRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyForeignKeyDataTypeOptionParentRef=KRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyNumberDataTypeOption=qRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyNumberDataTypeOptionParentRef=SRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyParentRef=XRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyRef=JRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyStringDataTypeOption=HRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyStringDataTypeOptionParentRef=ZRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyUUIDDataTypeOption=zRe;exports.persistedBuiltInBaseEntityBaseColumnPropertyUUIDDataTypeOptionParentRef=WRe;exports.persistedBuiltInBaseEntityDatabaseProperty=Ih;exports.persistedBuiltInBaseEntityDatabasePropertyDataType=DRe;exports.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=X0i;exports.persistedBuiltInBaseEntityDatabasePropertyParentRef=wRe;exports.persistedBuiltInBaseEntityDatabasePropertyRef=RRe;exports.persistedBuiltInBaseEntityPrimaryKeyProperty=Rh;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=$Re;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=CRe;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=ORe;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=LRe;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=xRe;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=PRe;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=_Re;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=NRe;exports.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=VRe;exports.prependToList=bxe;exports.prevWeekdayBaseDateArg=bX;exports.prevWeekdayBaseDateDT=Rg;exports.prevWeekdayError=IX;exports.prevWeekdayResponseDT=gX;exports.prevWeekdayWeekdayArg=AX;exports.prevWeekdayWeekdayDT=EX;exports.previousWeekday=SVe;exports.previousWeekdayOperation=RX;exports.printEntity=oC;exports.projectPublicationCompletedEventDataType=HDe;exports.projectPublicationCompletedEventDataTypeParentRef=ZDe;exports.projectPublicationCompletedGlobalEvent=CI;exports.propagateNewInputOrOutputMapValueAsTypeToParentVariable=Bm;exports.propagateNewInputOrOutputMapValueToParentVariable=Mm;exports.propagateNewStaticPropertyValueAsTypeToVariables=Ec;exports.propagateNewStaticPropertyValueToVariables=vc;exports.propertyShouldBePartOfFinalVariableObjectValue=YN;exports.propertyToZodSchema=rwe;exports.propertyValidation=sUi;exports.pwdEncDefault=eue;exports.randomAlphanumeric=uN;exports.randomBase62=dN;exports.randomBase64=ixe;exports.randomFloat=zI;exports.randomHex=oN;exports.randomInt=exe;exports.randomUUIDv4=vu;exports.randomUint32=txe;exports.readObjectKey=V2e;exports.readObjectNestedKey=$2e;exports.readValueFromWritter=xh;exports.rebaseStack=$O;exports.recursivelyMakeAllEditableAndDeletableFromGiven=X$i;exports.recursivelyMakeAllNonEditableAndNonDeletableFromGiven=Y$i;exports.relationalDatabaseBuiltInBaseEntity=An;exports.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=YP;exports.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=oRe;exports.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=lRe;exports.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=dRe;exports.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=sRe;exports.relationalDatabaseBuiltInBaseEntityDefaultProperty=JP;exports.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=aRe;exports.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=rRe;exports.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=nRe;exports.relationalDatabaseBuiltInBaseEntityIdentifierProperty=gI;exports.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=W1e;exports.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=Z1e;exports.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=H1e;exports.relationalDatabaseBuiltInBaseEntityMinSizeProperty=DI;exports.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=iRe;exports.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=eRe;exports.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=tRe;exports.relationalDatabaseBuiltInBaseEntityPasswordProperty=RI;exports.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=X1e;exports.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=Y0i;exports.relationalDatabaseBuiltInBaseEntityPasswordPropertyDefaultValueParentRef=Q1e;exports.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=Y1e;exports.relationalDatabaseBuiltInBaseEntityRef=gh;exports.relationalDatabaseBuiltInBaseEntityUsernameProperty=II;exports.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=J1e;exports.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=J0i;exports.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=z1e;exports.removeDisabledReasons=XMi;exports.repeatList=Lxe;exports.repliesActionRef=il;exports.repliesAutoPaginateInputDTParentRef=DP;exports.repliesChannelInputDTParentRef=cve;exports.repliesConnectionInputDTParentRef=dve;exports.repliesIncludeAllMetadataInputDTParentRef=RP;exports.repliesIncludeParentInputDTParentRef=wP;exports.repliesInclusiveInputDTParentRef=IP;exports.repliesIntegrationAutoPaginateInputDataTypeTransfer=xve;exports.repliesIntegrationAutoPaginateInputTransfer=$ve;exports.repliesIntegrationBuiltInActionDescriptorTransfer=zve;exports.repliesIntegrationChannelInputDataTypeTransfer=fve;exports.repliesIntegrationChannelInputTransfer=yve;exports.repliesIntegrationConnectionInputDataTypeTransfer=uve;exports.repliesIntegrationConnectionInputTransfer=pve;exports.repliesIntegrationIncludeAllMetadataInputDataTypeTransfer=Vve;exports.repliesIntegrationIncludeAllMetadataInputTransfer=Nve;exports.repliesIntegrationIncludeParentInputDataTypeTransfer=Lve;exports.repliesIntegrationIncludeParentInputTransfer=Mve;exports.repliesIntegrationInclusiveInputDataTypeTransfer=_ve;exports.repliesIntegrationInclusiveInputTransfer=Pve;exports.repliesIntegrationLatestInputDataTypeTransfer=Ove;exports.repliesIntegrationLatestInputTransfer=Cve;exports.repliesIntegrationOldestInputDataTypeTransfer=Rve;exports.repliesIntegrationOldestInputTransfer=Dve;exports.repliesIntegrationPageSizeInputDataTypeTransfer=vve;exports.repliesIntegrationPageSizeInputTransfer=Eve;exports.repliesIntegrationPageTokenInputDataTypeTransfer=Ave;exports.repliesIntegrationPageTokenInputTransfer=gve;exports.repliesIntegrationResponseDataTypeTransfer=Wve;exports.repliesIntegrationThreadTsInputDataTypeTransfer=mve;exports.repliesIntegrationThreadTsInputTransfer=Tve;exports.repliesLatestInputDTParentRef=wve;exports.repliesMessagesEntityParentDTRef=kve;exports.repliesMessagesEntityTransfer=jve;exports.repliesOldestInputDTParentRef=Ive;exports.repliesPageSizeInputDTParentRef=gP;exports.repliesPageTokenInputDTParentRef=bve;exports.repliesResponseDTParentRef=Bve;exports.repliesResponseEntityParentRef=Gve;exports.repliesResponseEntityTransfer=Hve;exports.repliesResponseMessagesProp=Fve;exports.repliesResponseMessagesPropDT=Kve;exports.repliesResponseMessagesPropDTParentRef=Uve;exports.repliesResponseNextPageTokenProp=Zve;exports.repliesResponseNextPageTokenPropDT=qve;exports.repliesResponseNextPageTokenPropDTParentRef=Sve;exports.repliesResponsePropsParentRef=OP;exports.repliesThreadTsInputDTParentRef=hve;exports.resolveActionDescriptorName=SUe;exports.resolveAllParallelAncestorConditionCallersForEntity=sUe;exports.resolveArgumentDeclarationValue=mPe;exports.resolveBaseEntityName=jUe;exports.resolveBuiltInBaseEntityDataTypeLabel=UUe;exports.resolveCardSubheader=kMi;exports.resolveClonedEntityProject=Pr;exports.resolveConditionOperatorLabel=zb;exports.resolveDataType=y1;exports.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=yx;exports.resolveDataTypeLabel=wy;exports.resolveDatatypeIconName=GMi;exports.resolveDefinitionEntityDataTypeLabel=eUi;exports.resolveDefinitionEntitySubheader=DN;exports.resolveEarliestSingleCallerAncestor=iUe;exports.resolveEntityCodeName=k1;exports.resolveEntityDataTypeLabel=Qji;exports.resolveEntityName=le;exports.resolveEntitySubheader=jMi;exports.resolveFirstCallsSecond=Rji;exports.resolveFirstWritesSecond=Dji;exports.resolveFunctionDeclarationCardSubheader=wN;exports.resolveInputMapNextStandaloneValue=dv;exports.resolveInputMapNextValue=tA;exports.resolveInputMapNextValueAsPropertyOfAnObject=LO;exports.resolveInputMapStandaloneValue=Lm;exports.resolveInputMapValue=vPe;exports.resolveInputMapValueAsPropertyOfAnObject=MO;exports.resolveMethodCardSubheader=lBe;exports.resolveNextValue=bo;exports.resolveOutputMapValue=TPe;exports.resolvePassThroughCallableValue=cPe;exports.resolvePersistedDefinitionEntityDatabaseEntity=LUe;exports.resolvePrimaryKeyProperty=$Ue;exports.resolvePrimitiveEntityForSearchLiteralValueType=eC;exports.resolvePrimitiveEntityName=FUe;exports.resolvePropertyValue=EPe;exports.resolvePublicationStepStatusFromType=lBi;exports.resolveResourceNameFromType=sBi;exports.resolveSQLMigrationsDiffs=Xje;exports.resolveSearchName=KUe;exports.resolveTerminationEntityValue=aN;exports.resolveValue=Ou;exports.resolveValueDescriptorValue=bPe;exports.resolveVarDeclarationAggregateObjectValue=yPe;exports.resolveVarDeclarationNextAggregateObjectValue=fPe;exports.resolveVarDeclarationNextValue=ov;exports.resolveVarDeclarationValue=rN;exports.resolveVarInstanceNextValue=nN;exports.resolveVarInstanceValue=hPe;exports.resolveVariableScope=o4i;exports.resultVoidDT=Xre;exports.returnStatementValidation=pLi;exports.reverseList=oxe;exports.roundTo=OVe;exports.roundToDateArg=ere;exports.roundToDateDT=kg;exports.roundToDecimals=cLe;exports.roundToError=nre;exports.roundToOperation=are;exports.roundToResponseDT=rre;exports.roundToUnitArg=ire;exports.roundToUnitArgDefaultValue=tre;exports.roundToUnitDT=Qie;exports.saltEncDefault=tue;exports.searchStatementErrorGlobalValueDescriptor=uV;exports.searchStatementErrorGlobalValueDescriptorDataType=YDe;exports.searchStatementErrorGlobalValueDescriptorRef=JDe;exports.searchStatementState=i4i;exports.searchStatementUtils=n4i;exports.searchValidation=fBi;exports.secretEncDefault=Sce;exports.sendEmailActionRef=Phi;exports.sendEmailBodyInput=hEe;exports.sendEmailBodyInputDTParentRef=cEe;exports.sendEmailBodyInputDataType=yEe;exports.sendEmailBodyInputParentRef=fEe;exports.sendEmailConnectionInput=Qve;exports.sendEmailConnectionInputDTParentRef=Jve;exports.sendEmailConnectionInputDataType=Xve;exports.sendEmailConnectionInputParentRef=Yve;exports.sendEmailFromInput=rEe;exports.sendEmailFromInputDTParentRef=eEe;exports.sendEmailFromInputDataType=iEe;exports.sendEmailFromInputParentRef=tEe;exports.sendEmailIdProp=EEe;exports.sendEmailIdPropDT=vEe;exports.sendEmailIdPropDTParentRef=TEe;exports.sendEmailIntegrationBuiltInActionDescriptorTransfer=wEe;exports.sendEmailResponseDTParentRef=REe;exports.sendEmailResponseDataType=DEe;exports.sendEmailResponseEntity=IEe;exports.sendEmailResponseEntityParentRef=mEe;exports.sendEmailResponsePropsParentRef=CP;exports.sendEmailSubjectInput=pEe;exports.sendEmailSubjectInputDTParentRef=oEe;exports.sendEmailSubjectInputDataType=uEe;exports.sendEmailSubjectInputParentRef=dEe;exports.sendEmailThreadIdProp=gEe;exports.sendEmailThreadIdPropDT=AEe;exports.sendEmailThreadIdPropDTParentRef=bEe;exports.sendEmailToInput=lEe;exports.sendEmailToInputDTParentRef=nEe;exports.sendEmailToInputDataType=sEe;exports.sendEmailToInputParentRef=aEe;exports.sendMessageChannelInput=Ime;exports.sendMessageChannelInputDT=gme;exports.sendMessageConnectionInput=Ame;exports.sendMessageConnectionInputDT=bme;exports.sendMessageIntegrationBuiltInActionDescriptorTransfer=Nme;exports.sendMessageReplyBroadcastInput=_me;exports.sendMessageReplyBroadcastInputDT=Cme;exports.sendMessageResponseDataType=Vme;exports.sendMessageResponseEntity=Pme;exports.sendMessageTextInput=Dme;exports.sendMessageTextInputDT=Rme;exports.sendMessageThreadTsInput=Ome;exports.sendMessageThreadTsInputDT=wme;exports.sequentialExecutionOperation=hu;exports.sequentialExecutionOperationListOfFunctionsArgument=V_;exports.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Bne;exports.sequentialExecutionOperationListOfFunctionsBlueprint=Mne;exports.sequentialExecutionOperationListOfFunctionsBlueprintDataType=Lne;exports.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=$ne;exports.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInputParentRef=xne;exports.sequentialExecutionOperationListOfFunctionsBlueprintParentRef=P_;exports.sequentialExecutionOperationResponseDataType=Gne;exports.setDate=vVe;exports.setDateDateArg=Kte;exports.setDateDateDT=Vg;exports.setDateDayArg=Fte;exports.setDateDayDT=Ute;exports.setDateError=qte;exports.setDateOperation=Zte;exports.setDateResponseDT=Ste;exports.setHour=EVe;exports.setHourDateArg=eie;exports.setHourDateDT=xg;exports.setHourError=rie;exports.setHourHourArg=tie;exports.setHourHourDT=Qte;exports.setHourOperation=nie;exports.setHourResponseDT=iie;exports.setIsoWdDateArg=Wte;exports.setIsoWdDateDT=Ng;exports.setIsoWdError=Yte;exports.setIsoWdResponseDT=Jte;exports.setIsoWdValueArg=zte;exports.setIsoWdValueDT=Hte;exports.setIsoWeekday=IVe;exports.setIsoWeekdayOperation=Xte;exports.setMillisecond=gVe;exports.setMillisecondOperation=mie;exports.setMinute=bVe;exports.setMinuteDateArg=sie;exports.setMinuteDateDT=$g;exports.setMinuteError=die;exports.setMinuteMinuteArg=lie;exports.setMinuteMinuteDT=aie;exports.setMinuteOperation=uie;exports.setMinuteResponseDT=oie;exports.setMonth=TVe;exports.setMonthDateArg=Mte;exports.setMonthDateDT=Pg;exports.setMonthError=kte;exports.setMonthMonthArg=Bte;exports.setMonthMonthDT=Lte;exports.setMonthOperation=jte;exports.setMonthResponseDT=Gte;exports.setMsDateArg=cie;exports.setMsDateDT=Lg;exports.setMsError=hie;exports.setMsResponseDT=yie;exports.setMsValueArg=fie;exports.setMsValueDT=pie;exports.setQuarter=RVe;exports.setQuarterDateArg=Pte;exports.setQuarterDateDT=_g;exports.setQuarterError=xte;exports.setQuarterOperation=$te;exports.setQuarterResponseDT=Nte;exports.setQuarterValueArg=Vte;exports.setQuarterValueDT=_te;exports.setSecond=AVe;exports.setSecondDateArg=vie;exports.setSecondDateDT=Mg;exports.setSecondError=Aie;exports.setSecondOperation=gie;exports.setSecondResponseDT=bie;exports.setSecondSecArg=Eie;exports.setSecondSecDT=Tie;exports.setUTCOffset=zVe;exports.setUTCOffsetOperation=uQ;exports.setUtcOffsetDateArg=aQ;exports.setUtcOffsetDateDT=wg;exports.setUtcOffsetError=dQ;exports.setUtcOffsetKeepLocalTimeArg=lQ;exports.setUtcOffsetKeepLocalTimeDT=rQ;exports.setUtcOffsetKeepLocalTimeDefault=nQ;exports.setUtcOffsetOffsetArg=sQ;exports.setUtcOffsetOffsetDT=iQ;exports.setUtcOffsetResponseDT=oQ;exports.setYear=mVe;exports.setYearDateArg=Rte;exports.setYearDateDT=Cg;exports.setYearError=Ote;exports.setYearOperation=Cte;exports.setYearResponseDT=wte;exports.setYearYearArg=Dte;exports.setYearYearDT=Ite;exports.shortId=rxe;exports.shuffleList=Vxe;exports.slackAuthExternalConnectionBuiltInBaseEntity=mh;exports.slackAuthExternalConnectionBuiltInBaseEntityConnectionIdProperty=K0e;exports.slackAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataType=j0e;exports.slackAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyDataTypeParentRef=k0e;exports.slackAuthExternalConnectionBuiltInBaseEntityConnectionIdPropertyParentRef=U0e;exports.slackAuthExternalConnectionBuiltInBaseEntityIntegrationProperty=G0e;exports.slackAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDataTypeRef=Iyi;exports.slackAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValue=M0e;exports.slackAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyDefaultValueParentRef=L0e;exports.slackAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyParentRef=B0e;exports.slackAuthExternalConnectionBuiltInBaseEntityIntegrationPropertyRef=$0e;exports.slackChannelEntityParentRef=dTe;exports.slackChannelEntityTransfer=fTe;exports.slackChannelIdProp=cTe;exports.slackChannelIdPropDT=pTe;exports.slackChannelsActionRef=Kd;exports.slackChannelsAutoPaginateInputDTParentRef=yP;exports.slackChannelsAutoPaginateInputDataTypeTransfer=iTe;exports.slackChannelsAutoPaginateInputTransfer=rTe;exports.slackChannelsConnectionInputDTParentRef=$me;exports.slackChannelsConnectionInputDataTypeTransfer=Mme;exports.slackChannelsConnectionInputParentRef=Lme;exports.slackChannelsConnectionInputTransfer=Bme;exports.slackChannelsExcludeArchivedInputDTParentRef=uP;exports.slackChannelsExcludeArchivedInputDataTypeTransfer=Kme;exports.slackChannelsExcludeArchivedInputTransfer=Fme;exports.slackChannelsJoinPublicChannelsInputDTParentRef=fP;exports.slackChannelsJoinPublicChannelsInputDataTypeTransfer=eTe;exports.slackChannelsJoinPublicChannelsInputTransfer=tTe;exports.slackChannelsNameContainsInputDTParentRef=nTe;exports.slackChannelsNameContainsInputDataTypeTransfer=aTe;exports.slackChannelsNameContainsInputTransfer=sTe;exports.slackChannelsOnlyJoinedInputDTParentRef=cP;exports.slackChannelsOnlyJoinedInputDataTypeTransfer=zme;exports.slackChannelsOnlyJoinedInputTransfer=Jme;exports.slackChannelsPageSizeInputDTParentRef=pP;exports.slackChannelsPageSizeInputDataTypeTransfer=Sme;exports.slackChannelsPageSizeInputTransfer=qme;exports.slackChannelsPageTokenInputDTParentRef=Zme;exports.slackChannelsPageTokenInputDataTypeTransfer=Hme;exports.slackChannelsPageTokenInputTransfer=Wme;exports.slackChannelsResponseChannelsProp=hTe;exports.slackChannelsResponseChannelsPropDT=yTe;exports.slackChannelsResponseDTParentRef=lTe;exports.slackChannelsResponseDataTypeTransfer=bTe;exports.slackChannelsResponseEntityParentRef=oTe;exports.slackChannelsResponseEntityTransfer=ETe;exports.slackChannelsResponseNextPageTokenProp=vTe;exports.slackChannelsResponseNextPageTokenPropDT=TTe;exports.slackChannelsResponseNextPageTokenPropDTParentRef=mTe;exports.slackChannelsResponsePropsParentRef=hP;exports.slackChannelsTeamIdInputDTParentRef=Yme;exports.slackChannelsTeamIdInputDataTypeTransfer=Xme;exports.slackChannelsTeamIdInputTransfer=Qme;exports.slackChannelsTypesInputDTParentRef=Gme;exports.slackChannelsTypesInputDataTypeTransfer=kme;exports.slackChannelsTypesInputParentRef=jme;exports.slackChannelsTypesInputTransfer=Ume;exports.sliceList=Dxe;exports.smartFetchBase64PropertyDataTypeTransfer=FAe;exports.smartFetchBase64PropertyTransfer=SAe;exports.smartFetchIsBinaryPropertyDataTypeTransfer=LAe;exports.smartFetchIsBinaryPropertyTransfer=MAe;exports.smartFetchJsonPropertyDataTypeTransfer=qAe;exports.smartFetchJsonPropertyTransfer=ZAe;exports.smartFetchKindPropertyDataTypeTransfer=VAe;exports.smartFetchKindPropertyTransfer=NAe;exports.smartFetchMimeTypePropertyDataTypeTransfer=xAe;exports.smartFetchMimeTypePropertyTransfer=$Ae;exports.smartFetchRawJsonPropertyDataTypeTransfer=HAe;exports.smartFetchRawJsonPropertyTransfer=WAe;exports.smartFetchSizeBytesPropertyDataTypeTransfer=kAe;exports.smartFetchSizeBytesPropertyTransfer=jAe;exports.smartFetchTextPropertyDataTypeTransfer=UAe;exports.smartFetchTextPropertyTransfer=KAe;exports.smartFetchTitlePropertyDataTypeTransfer=BAe;exports.smartFetchTitlePropertyTransfer=GAe;exports.snapToStep=fLe;exports.sortCallsBasedOnExecutionDependencies=dUe;exports.sortChildrenEntitiesBasedOnExecutionDependencies=gji;exports.sortList=Pxe;exports.splitList=lxe;exports.splitStringAtAllSeparatorsOperation=W3;exports.splitStringAtAllSeparatorsOperationError=H3;exports.splitStringAtAllSeparatorsOperationResponseDataType=Z3;exports.splitStringAtAllSeparatorsOperationSeparatorArgument=q3;exports.splitStringAtAllSeparatorsOperationSeparatorDataType=S3;exports.splitStringAtAllSeparatorsOperationSeparatorDataTypeParentRef=F3;exports.splitStringAtAllSeparatorsOperationStringArgument=K3;exports.splitStringAtAllSeparatorsOperationStringDataType=U3;exports.splitStringAtFirstSeparatorOperation=pq;exports.splitStringAtFirstSeparatorOperationError=uq;exports.splitStringAtFirstSeparatorOperationFirstSeparatorArgument=X3;exports.splitStringAtFirstSeparatorOperationFirstSeparatorDataType=Y3;exports.splitStringAtFirstSeparatorOperationResponseDataType=dq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntity=oq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntityFirstPartProperty=sq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntityFirstPartPropertyDataType=nq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntityFirstPartPropertyDataTypeParentRef=rq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntityFirstPartPropertyParentRef=aq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntityParentRef=lq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntitySecondPartProperty=iq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntitySecondPartPropertyDataType=eq;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntitySecondPartPropertyDataTypeParentRef=Q3;exports.splitStringAtFirstSeparatorOperationResponseDataTypeEntitySecondPartPropertyParentRef=tq;exports.splitStringAtFirstSeparatorOperationStringArgument=J3;exports.splitStringAtFirstSeparatorOperationStringDataType=z3;exports.splitStringAtIndexOperation=j3;exports.splitStringAtIndexOperationError=k3;exports.splitStringAtIndexOperationIndexArgument=O3;exports.splitStringAtIndexOperationIndexDataType=w3;exports.splitStringAtIndexOperationResponseDataType=G3;exports.splitStringAtIndexOperationResponseDataTypeEntity=B3;exports.splitStringAtIndexOperationResponseDataTypeEntityFirstPartProperty=L3;exports.splitStringAtIndexOperationResponseDataTypeEntityFirstPartPropertyDataType=x3;exports.splitStringAtIndexOperationResponseDataTypeEntityFirstPartPropertyDataTypeParentRef=N3;exports.splitStringAtIndexOperationResponseDataTypeEntityFirstPartPropertyParentRef=$3;exports.splitStringAtIndexOperationResponseDataTypeEntityParentRef=M3;exports.splitStringAtIndexOperationResponseDataTypeEntitySecondPartProperty=V3;exports.splitStringAtIndexOperationResponseDataTypeEntitySecondPartPropertyDataType=_3;exports.splitStringAtIndexOperationResponseDataTypeEntitySecondPartPropertyDataTypeParentRef=C3;exports.splitStringAtIndexOperationResponseDataTypeEntitySecondPartPropertyParentRef=P3;exports.splitStringAtIndexOperationStringArgument=D3;exports.splitStringAtIndexOperationStringDataType=R3;exports.splitStringAtLastSeparatorOperation=Cq;exports.splitStringAtLastSeparatorOperationError=Oq;exports.splitStringAtLastSeparatorOperationFirstSeparatorArgument=hq;exports.splitStringAtLastSeparatorOperationFirstSeparatorDataType=yq;exports.splitStringAtLastSeparatorOperationResponseDataType=wq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntity=Dq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntityFirstPartProperty=Iq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntityFirstPartPropertyDataType=Aq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntityFirstPartPropertyDataTypeParentRef=bq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntityFirstPartPropertyParentRef=gq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntityParentRef=Rq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntitySecondPartProperty=Eq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntitySecondPartPropertyDataType=Tq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntitySecondPartPropertyDataTypeParentRef=mq;exports.splitStringAtLastSeparatorOperationResponseDataTypeEntitySecondPartPropertyParentRef=vq;exports.splitStringAtLastSeparatorOperationStringArgument=fq;exports.splitStringAtLastSeparatorOperationStringDataType=cq;exports.sqlRowTransformerBuiltInBaseEntity=DDe;exports.sqlRowTransformerBuiltInBaseEntityDefinitionProperty=bDe;exports.sqlRowTransformerBuiltInBaseEntityDefinitionPropertyDataType=vDe;exports.sqlRowTransformerBuiltInBaseEntityDefinitionPropertyDataTypeRef=Q0i;exports.sqlRowTransformerBuiltInBaseEntityDefinitionPropertyParentRef=EDe;exports.sqlRowTransformerBuiltInBaseEntityDefinitionPropertyRef=TDe;exports.sqlRowTransformerBuiltInBaseEntityTimeProperty=RDe;exports.sqlRowTransformerBuiltInBaseEntityTimePropertyDataType=gDe;exports.sqlRowTransformerBuiltInBaseEntityTimePropertyParentRef=IDe;exports.sqlRowTransformerBuiltInBaseEntityTimePropertyRef=ADe;exports.startOf=DVe;exports.startOfDateArg=jie;exports.startOfDateDT=Bg;exports.startOfError=Sie;exports.startOfOperation=qie;exports.startOfResponseDT=Fie;exports.startOfUnitArg=Kie;exports.startOfUnitArgDefaultValue=Uie;exports.startOfUnitDT=kie;exports.stringAddAtIndexOperation=Mq;exports.stringAddAtIndexOperationCharArg=xq;exports.stringAddAtIndexOperationCharDT=Pq;exports.stringAddAtIndexOperationError=Lq;exports.stringAddAtIndexOperationIndexArg=Nq;exports.stringAddAtIndexOperationIndexDT=_q;exports.stringAddAtIndexOperationResponseDT=$q;exports.stringAddAtIndexOperationStringArg=Vq;exports.stringAddAtIndexOperationStringDT=YA;exports.stringAppendOperation=JZ;exports.stringAppendOperationDynamicArgs=HZ;exports.stringAppendOperationDynamicArgsDT=ZZ;exports.stringAppendOperationError=zZ;exports.stringAppendOperationResponseDT=WZ;exports.stringAppendOperationStringArg=SZ;exports.stringAppendOperationStringDT=ZC;exports.stringAppendOperationValueArg=qZ;exports.stringAppendOperationValueDT=FZ;exports.stringContainsOperation=s8;exports.stringContainsOperationAArg=r8;exports.stringContainsOperationADT=r_;exports.stringContainsOperationBArg=n8;exports.stringContainsOperationBDT=i8;exports.stringContainsOperationResultVoidDT=a8;exports.stringCountOccurrencesOperation=i7;exports.stringCountOccurrencesOperationError=t7;exports.stringCountOccurrencesOperationResponseDT=e7;exports.stringCountOccurrencesOperationStringArg=XH;exports.stringCountOccurrencesOperationStringDT=zC;exports.stringCountOccurrencesOperationSubstringArg=QH;exports.stringCountOccurrencesOperationSubstringDT=YH;exports.stringDeleteAtIndexOperation=d6;exports.stringDeleteAtIndexOperationCountArg=s6;exports.stringDeleteAtIndexOperationCountDT=i6;exports.stringDeleteAtIndexOperationCountDefaultValue=a6;exports.stringDeleteAtIndexOperationError=o6;exports.stringDeleteAtIndexOperationIndexArg=n6;exports.stringDeleteAtIndexOperationIndexDT=t6;exports.stringDeleteAtIndexOperationResponseDT=l6;exports.stringDeleteAtIndexOperationStringArg=r6;exports.stringDeleteAtIndexOperationStringDT=XA;exports.stringDeleteFirstNCharsOperation=qq;exports.stringDeleteFirstNCharsOperationCountArg=jq;exports.stringDeleteFirstNCharsOperationCountArgDefaultValue=kq;exports.stringDeleteFirstNCharsOperationCountArgDefaultValueParentRef=Gq;exports.stringDeleteFirstNCharsOperationCountDT=Bq;exports.stringDeleteFirstNCharsOperationError=Sq;exports.stringDeleteFirstNCharsOperationResponseDT=Fq;exports.stringDeleteFirstNCharsOperationStringArg=Kq;exports.stringDeleteFirstNCharsOperationStringDT=Uq;exports.stringDeleteLastNCharsOperation=e6;exports.stringDeleteLastNCharsOperationCountArg=zq;exports.stringDeleteLastNCharsOperationCountArgDefaultValue=Wq;exports.stringDeleteLastNCharsOperationCountArgDefaultValueParentRef=Hq;exports.stringDeleteLastNCharsOperationCountDT=Zq;exports.stringDeleteLastNCharsOperationError=Qq;exports.stringDeleteLastNCharsOperationResponseDT=Xq;exports.stringDeleteLastNCharsOperationStringArg=Yq;exports.stringDeleteLastNCharsOperationStringDT=Jq;exports.stringEndsWithOperation=F7;exports.stringEndsWithOperationAArg=j7;exports.stringEndsWithOperationADT=t_;exports.stringEndsWithOperationBArg=U7;exports.stringEndsWithOperationBDT=k7;exports.stringEndsWithOperationResultVoidDT=K7;exports.stringEnsurePrefixOperation=N7;exports.stringEnsurePrefixOperationError=V7;exports.stringEnsurePrefixOperationPrefixArg=_7;exports.stringEnsurePrefixOperationPrefixDT=O7;exports.stringEnsurePrefixOperationResponseDT=P7;exports.stringEnsurePrefixOperationStringArg=C7;exports.stringEnsurePrefixOperationStringDT=QC;exports.stringEnsureSuffixOperation=G7;exports.stringEnsureSuffixOperationError=B7;exports.stringEnsureSuffixOperationResponseDT=M7;exports.stringEnsureSuffixOperationStringArg=$7;exports.stringEnsureSuffixOperationStringDT=e_;exports.stringEnsureSuffixOperationSuffixArg=L7;exports.stringEnsureSuffixOperationSuffixDT=x7;exports.stringGetFirstNCharsOperation=$Z;exports.stringGetFirstNCharsOperationCountArg=VZ;exports.stringGetFirstNCharsOperationCountArgDefaultValue=PZ;exports.stringGetFirstNCharsOperationCountArgDefaultValueParentRef=_Z;exports.stringGetFirstNCharsOperationCountDT=OZ;exports.stringGetFirstNCharsOperationError=xZ;exports.stringGetFirstNCharsOperationResponseDT=NZ;exports.stringGetFirstNCharsOperationStringArg=CZ;exports.stringGetFirstNCharsOperationStringDT=SC;exports.stringGetIndexItemOperation=wZ;exports.stringGetIndexItemOperationError=DZ;exports.stringGetIndexItemOperationIndexArg=IZ;exports.stringGetIndexItemOperationIndexDT=AZ;exports.stringGetIndexItemOperationResponseDT=RZ;exports.stringGetIndexItemOperationStringArg=gZ;exports.stringGetIndexItemOperationStringDT=FC;exports.stringGetIndexOfOperation=bZ;exports.stringGetIndexOfOperationError=EZ;exports.stringGetIndexOfOperationResponseDT=vZ;exports.stringGetIndexOfOperationSearchArg=TZ;exports.stringGetIndexOfOperationSearchDT=hZ;exports.stringGetIndexOfOperationStringArg=mZ;exports.stringGetIndexOfOperationStringDT=KC;exports.stringGetLastIndexOfOperation=yZ;exports.stringGetLastIndexOfOperationError=fZ;exports.stringGetLastIndexOfOperationResponseDT=cZ;exports.stringGetLastIndexOfOperationSearchArg=pZ;exports.stringGetLastIndexOfOperationSearchDT=dZ;exports.stringGetLastIndexOfOperationStringArg=uZ;exports.stringGetLastIndexOfOperationStringDT=UC;exports.stringGetLastNCharsOperation=KZ;exports.stringGetLastNCharsOperationCountArg=kZ;exports.stringGetLastNCharsOperationCountArgDefaultValue=GZ;exports.stringGetLastNCharsOperationCountArgDefaultValueParentRef=BZ;exports.stringGetLastNCharsOperationCountDT=LZ;exports.stringGetLastNCharsOperationError=UZ;exports.stringGetLastNCharsOperationResponseDT=jZ;exports.stringGetLastNCharsOperationStringArg=MZ;exports.stringGetLastNCharsOperationStringDT=qC;exports.stringGetLengthOperation=y3;exports.stringGetLengthOperationError=f3;exports.stringGetLengthOperationResponseDT=c3;exports.stringGetLengthOperationStringArg=p3;exports.stringGetLengthOperationStringDT=u3;exports.stringMatchAllRegexOperation=NH;exports.stringMatchAllRegexOperationError=VH;exports.stringMatchAllRegexOperationFlagsArg=_H;exports.stringMatchAllRegexOperationFlagsDT=wH;exports.stringMatchAllRegexOperationPatternArg=CH;exports.stringMatchAllRegexOperationPatternDT=DH;exports.stringMatchAllRegexOperationResponseDT=PH;exports.stringMatchAllRegexOperationStringArg=OH;exports.stringMatchAllRegexOperationStringDT=dg;exports.stringMatchRegexOperation=RH;exports.stringMatchRegexOperationError=IH;exports.stringMatchRegexOperationFlagsArg=AH;exports.stringMatchRegexOperationFlagsDT=vH;exports.stringMatchRegexOperationPatternArg=bH;exports.stringMatchRegexOperationPatternDT=TH;exports.stringMatchRegexOperationResponseDT=gH;exports.stringMatchRegexOperationStringArg=EH;exports.stringMatchRegexOperationStringDT=og;exports.stringMatchesRegexOperation=J7;exports.stringMatchesRegexOperationFlagsArg=W7;exports.stringMatchesRegexOperationFlagsDT=q7;exports.stringMatchesRegexOperationPatternArg=H7;exports.stringMatchesRegexOperationPatternDT=S7;exports.stringMatchesRegexOperationResultVoidDT=z7;exports.stringMatchesRegexOperationSrcArg=Z7;exports.stringMatchesRegexOperationSrcDT=pg;exports.stringNormalizeUnicodeOperation=y7;exports.stringNormalizeUnicodeOperationError=f7;exports.stringNormalizeUnicodeOperationFormArg=p7;exports.stringNormalizeUnicodeOperationFormArgDefaultValue=u7;exports.stringNormalizeUnicodeOperationFormDT=o7;exports.stringNormalizeUnicodeOperationResponseDT=c7;exports.stringNormalizeUnicodeOperationStringArg=d7;exports.stringNormalizeUnicodeOperationStringDT=JC;exports.stringPadEndOperation=mH;exports.stringPadEndOperationError=hH;exports.stringPadEndOperationLengthArg=cH;exports.stringPadEndOperationLengthDT=dH;exports.stringPadEndOperationPadStringArg=fH;exports.stringPadEndOperationPadStringDT=uH;exports.stringPadEndOperationResponseDT=yH;exports.stringPadEndOperationStringArg=pH;exports.stringPadEndOperationStringDT=lg;exports.stringPadStartOperation=oH;exports.stringPadStartOperationError=lH;exports.stringPadStartOperationLengthArg=nH;exports.stringPadStartOperationLengthDT=tH;exports.stringPadStartOperationPadStringArg=aH;exports.stringPadStartOperationPadStringDT=iH;exports.stringPadStartOperationResponseDT=sH;exports.stringPadStartOperationStringArg=rH;exports.stringPadStartOperationStringDT=sg;exports.stringPrependOperation=i5;exports.stringPrependOperationError=t5;exports.stringPrependOperationResponseDT=e5;exports.stringPrependOperationStringArg=XZ;exports.stringPrependOperationStringDT=HC;exports.stringPrependOperationValueArg=QZ;exports.stringPrependOperationValueDT=YZ;exports.stringPrototype=ue;exports.stringRemoveDiacriticsOperation=l7;exports.stringRemoveDiacriticsOperationError=s7;exports.stringRemoveDiacriticsOperationResponseDT=a7;exports.stringRemoveDiacriticsOperationStringArg=n7;exports.stringRemoveDiacriticsOperationStringDT=r7;exports.stringRemovePrefixOperation=b7;exports.stringRemovePrefixOperationError=E7;exports.stringRemovePrefixOperationPrefixArg=T7;exports.stringRemovePrefixOperationPrefixDT=h7;exports.stringRemovePrefixOperationResponseDT=v7;exports.stringRemovePrefixOperationStringArg=m7;exports.stringRemovePrefixOperationStringDT=YC;exports.stringRemoveSuffixOperation=w7;exports.stringRemoveSuffixOperationError=D7;exports.stringRemoveSuffixOperationResponseDT=R7;exports.stringRemoveSuffixOperationStringArg=g7;exports.stringRemoveSuffixOperationStringDT=XC;exports.stringRemoveSuffixOperationSuffixArg=I7;exports.stringRemoveSuffixOperationSuffixDT=A7;exports.stringRepeatOperation=eH;exports.stringRepeatOperationCountArg=Y5;exports.stringRepeatOperationCountDT=z5;exports.stringRepeatOperationError=Q5;exports.stringRepeatOperationResponseDT=X5;exports.stringRepeatOperationStringArg=J5;exports.stringRepeatOperationStringDT=WC;exports.stringReplaceAllMatchesOperation=Z6;exports.stringReplaceAllMatchesOperationError=q6;exports.stringReplaceAllMatchesOperationReplaceArg=F6;exports.stringReplaceAllMatchesOperationReplaceDT=j6;exports.stringReplaceAllMatchesOperationResponseDT=S6;exports.stringReplaceAllMatchesOperationSearchArg=K6;exports.stringReplaceAllMatchesOperationSearchDT=k6;exports.stringReplaceAllMatchesOperationStringArg=U6;exports.stringReplaceAllMatchesOperationStringDT=tg;exports.stringReplaceAtIndexOperation=G6;exports.stringReplaceAtIndexOperationCharArg=L6;exports.stringReplaceAtIndexOperationCharDT=P6;exports.stringReplaceAtIndexOperationCountArg=$6;exports.stringReplaceAtIndexOperationCountDT=_6;exports.stringReplaceAtIndexOperationCountDefaultValue=V6;exports.stringReplaceAtIndexOperationError=B6;exports.stringReplaceAtIndexOperationIndexArg=x6;exports.stringReplaceAtIndexOperationIndexDT=C6;exports.stringReplaceAtIndexOperationResponseDT=M6;exports.stringReplaceAtIndexOperationStringArg=N6;exports.stringReplaceAtIndexOperationStringDT=Qm;exports.stringReplaceFirstMatchOperation=eZ;exports.stringReplaceFirstMatchOperationError=Q6;exports.stringReplaceFirstMatchOperationReplaceArg=Y6;exports.stringReplaceFirstMatchOperationReplaceDT=W6;exports.stringReplaceFirstMatchOperationResponseDT=X6;exports.stringReplaceFirstMatchOperationSearchArg=J6;exports.stringReplaceFirstMatchOperationSearchDT=H6;exports.stringReplaceFirstMatchOperationStringArg=z6;exports.stringReplaceFirstMatchOperationStringDT=ig;exports.stringReplaceFirstNCharsOperation=v6;exports.stringReplaceFirstNCharsOperationCountArg=y6;exports.stringReplaceFirstNCharsOperationCountDT=u6;exports.stringReplaceFirstNCharsOperationCountDefaultValue=c6;exports.stringReplaceFirstNCharsOperationError=T6;exports.stringReplaceFirstNCharsOperationReplaceArg=h6;exports.stringReplaceFirstNCharsOperationReplaceDT=p6;exports.stringReplaceFirstNCharsOperationResponseDT=m6;exports.stringReplaceFirstNCharsOperationStringArg=f6;exports.stringReplaceFirstNCharsOperationStringDT=QA;exports.stringReplaceLastMatchOperation=oZ;exports.stringReplaceLastMatchOperationError=lZ;exports.stringReplaceLastMatchOperationReplaceArg=aZ;exports.stringReplaceLastMatchOperationReplaceDT=iZ;exports.stringReplaceLastMatchOperationResponseDT=sZ;exports.stringReplaceLastMatchOperationSearchArg=nZ;exports.stringReplaceLastMatchOperationSearchDT=tZ;exports.stringReplaceLastMatchOperationStringArg=rZ;exports.stringReplaceLastMatchOperationStringDT=rg;exports.stringReplaceLastNCharsOperation=O6;exports.stringReplaceLastNCharsOperationCountArg=I6;exports.stringReplaceLastNCharsOperationCountDT=E6;exports.stringReplaceLastNCharsOperationCountDefaultValue=A6;exports.stringReplaceLastNCharsOperationError=w6;exports.stringReplaceLastNCharsOperationReplaceArg=R6;exports.stringReplaceLastNCharsOperationReplaceDT=b6;exports.stringReplaceLastNCharsOperationResponseDT=D6;exports.stringReplaceLastNCharsOperationStringArg=g6;exports.stringReplaceLastNCharsOperationStringDT=eg;exports.stringReplaceRegexOperation=JH;exports.stringReplaceRegexOperationError=zH;exports.stringReplaceRegexOperationFlagsArg=HH;exports.stringReplaceRegexOperationFlagsDT=FH;exports.stringReplaceRegexOperationPatternArg=qH;exports.stringReplaceRegexOperationPatternDT=UH;exports.stringReplaceRegexOperationReplacementArg=ZH;exports.stringReplaceRegexOperationReplacementDT=KH;exports.stringReplaceRegexOperationResponseDT=WH;exports.stringReplaceRegexOperationStringArg=SH;exports.stringReplaceRegexOperationStringDT=sT;exports.stringReverseOperation=l5;exports.stringReverseOperationError=s5;exports.stringReverseOperationResponseDT=a5;exports.stringReverseOperationStringArg=n5;exports.stringReverseOperationStringDT=r5;exports.stringSearchRegexOperation=jH;exports.stringSearchRegexOperationError=kH;exports.stringSearchRegexOperationFlagsArg=BH;exports.stringSearchRegexOperationFlagsDT=$H;exports.stringSearchRegexOperationPatternArg=MH;exports.stringSearchRegexOperationPatternDT=xH;exports.stringSearchRegexOperationResponseDT=GH;exports.stringSearchRegexOperationStringArg=LH;exports.stringSearchRegexOperationStringDT=ug;exports.stringSliceOperation=j5;exports.stringSliceOperationEndArg=B5;exports.stringSliceOperationEndDT=$5;exports.stringSliceOperationError=k5;exports.stringSliceOperationResponseDT=G5;exports.stringSliceOperationStartArg=M5;exports.stringSliceOperationStartDT=x5;exports.stringSliceOperationStringArg=L5;exports.stringSliceOperationStringDT=ng;exports.stringStartsWithOperation=t8;exports.stringStartsWithOperationAArg=X7;exports.stringStartsWithOperationADT=i_;exports.stringStartsWithOperationBArg=Q7;exports.stringStartsWithOperationBDT=Y7;exports.stringStartsWithOperationResultVoidDT=e8;exports.stringSubstringOperation=W5;exports.stringSubstringOperationEndArg=q5;exports.stringSubstringOperationEndDT=K5;exports.stringSubstringOperationError=H5;exports.stringSubstringOperationResponseDT=Z5;exports.stringSubstringOperationStartArg=S5;exports.stringSubstringOperationStartDT=U5;exports.stringSubstringOperationStringArg=F5;exports.stringSubstringOperationStringDT=ag;exports.stringToLowerCaseOperation=c5;exports.stringToLowerCaseOperationError=p5;exports.stringToLowerCaseOperationResponseDT=u5;exports.stringToLowerCaseOperationStringArg=d5;exports.stringToLowerCaseOperationStringDT=o5;exports.stringToUpperCaseOperation=T5;exports.stringToUpperCaseOperationError=m5;exports.stringToUpperCaseOperationResponseDT=h5;exports.stringToUpperCaseOperationStringArg=y5;exports.stringToUpperCaseOperationStringDT=f5;exports.stringTrimEndOperation=g5;exports.stringTrimEndOperationError=A5;exports.stringTrimEndOperationResponseDT=b5;exports.stringTrimEndOperationStringArg=E5;exports.stringTrimEndOperationStringDT=v5;exports.stringTrimOperation=N5;exports.stringTrimOperationError=V5;exports.stringTrimOperationResponseDT=P5;exports.stringTrimOperationStringArg=_5;exports.stringTrimOperationStringDT=C5;exports.stringTrimStartOperation=O5;exports.stringTrimStartOperationError=w5;exports.stringTrimStartOperationResponseDT=D5;exports.stringTrimStartOperationStringArg=R5;exports.stringTrimStartOperationStringDT=I5;exports.stringValueAutogenerationSchema=z4e;exports.subtractFromDate=QPe;exports.subtractFromDateAmountArg=zQ;exports.subtractFromDateAmountDT=ZQ;exports.subtractFromDateDateArg=WQ;exports.subtractFromDateDateDT=vT;exports.subtractFromDateError=QQ;exports.subtractFromDateOperation=eee;exports.subtractFromDateResponseDT=XQ;exports.subtractFromDateUnitArg=YQ;exports.subtractFromDateUnitArgDefaultValue=JQ;exports.subtractFromDateUnitDT=HQ;exports.suggestNewIdForEntity=cC;exports.syncSearchEntityOutput=iC;exports.toBytes=qr;exports.toCamelCase=Ji;exports.toEditorContext=LMi;exports.toEntityState=Sn;exports.toISOOrThrow=YPe;exports.toISOString=rVe;exports.toISOStringOperation=mee;exports.toIsoError=hee;exports.toIsoInputArg=fee;exports.toIsoInputBaseDT=cee;exports.toIsoInputDateDT=uee;exports.toIsoInputDateDTParentRef=dee;exports.toIsoInputStringDT=D_;exports.toIsoInputStringDTParentRef=pee;exports.toIsoResponseDT=yee;exports.toKebabCase=kUe;exports.toLowerCaseKebabCase=gA;exports.toNow=jVe;exports.toNowDateArgument=jY;exports.toNowDateDataType=kY;exports.toNowError=KY;exports.toNowOperation=FY;exports.toNowResponseDataType=UY;exports.toNowWithoutSuffixArgument=GY;exports.toNowWithoutSuffixArgumentDefaultValue=BY;exports.toNowWithoutSuffixDataType=MY;exports.toNowWithoutSuffixDataTypeParentRef=LY;exports.toPascalCase=wc;exports.toProjectLogicContext=RLi;exports.toPublicationRunContext=MMi;exports.toSentenceCase=_x;exports.toSnakeCase=Xji;exports.toUTC=ZVe;exports.toUnix=tVe;exports.toUnixDateArg=tee;exports.toUnixDateDT=I_;exports.toUnixError=ree;exports.toUnixOperation=nee;exports.toUnixResponseDT=iee;exports.toUtcDateArg=VX;exports.toUtcDateDT=wX;exports.toUtcError=LX;exports.toUtcKeepLocalArg=xX;exports.toUtcKeepLocalDT=CX;exports.toUtcKeepLocalDefault=PX;exports.toUtcOperation=MX;exports.toUtcResponseDT=$X;exports.toUtcTimezoneArg=NX;exports.toUtcTimezoneDT=OX;exports.toUtcTimezoneDefault=_X;exports.transitionProjectVersion=NO;exports.translateLogicErrorCode=FMi;exports.translateLogicErrorCodeShort=SMi;exports.translateLogicErrorCodeShortWithEntityName=qMi;exports.translateLogicErrorCodeWithEntityName=ZMi;exports.traverseChangeSet=xO;exports.unfreezeDownstreamEntitiesFromGiven=Yji;exports.uniqueList=Cxe;exports.untypedDataPrototype=ht;exports.upSqlRowTransformerEntityMethod=hDe;exports.upSqlRowTransformerEntityMethodNewShapeDataType=dDe;exports.upSqlRowTransformerEntityMethodNewShapeDataTypeParentRef=oDe;exports.upSqlRowTransformerEntityMethodParentRef=yDe;exports.upSqlRowTransformerEntityMethodRootDataType=fDe;exports.upSqlRowTransformerEntityMethodRootDataTypeParentRef=cDe;exports.upSqlRowTransformerEntityMethodVoidDataType=pDe;exports.upSqlRowTransformerEntityMethodVoidDataTypeParentRef=uDe;exports.updateErrorsList=Lt;exports.updatePersistedEntityMethod=IRe;exports.updatePersistedEntityMethodParentRef=bRe;exports.updatePersistedEntityMethodVoidDataType=gRe;exports.updatePersistedEntityMethodVoidDataTypeParentRef=ARe;exports.uploadFileConnectionInputDataTypeTransfer=XAe;exports.uploadFileConnectionInputTransfer=QAe;exports.uploadFileContentInputDataTypeTransfer=ege;exports.uploadFileContentInputTransfer=tge;exports.uploadFileDescriptionInputDataTypeTransfer=dge;exports.uploadFileDescriptionInputTransfer=uge;exports.uploadFileFieldsInputDataTypeTransfer=gge;exports.uploadFileFieldsInputTransfer=Ige;exports.uploadFileFolderIdInputDataTypeTransfer=lge;exports.uploadFileFolderIdInputTransfer=oge;exports.uploadFileImportMimeTypeInputDataTypeTransfer=Dge;exports.uploadFileImportMimeTypeInputTransfer=wge;exports.uploadFileIntegrationBuiltInActionDescriptorTransfer=Zge;exports.uploadFileIsBase64InputDataTypeTransfer=cge;exports.uploadFileIsBase64InputTransfer=fge;exports.uploadFileMaxBytesInputDataTypeTransfer=yge;exports.uploadFileMaxBytesInputTransfer=hge;exports.uploadFileMimeTypeInputDataTypeTransfer=age;exports.uploadFileMimeTypeInputTransfer=sge;exports.uploadFileNameInputDataTypeTransfer=ige;exports.uploadFileNameInputTransfer=rge;exports.uploadFileRecordEntityIdPropertyDataTypeTransfer=Oge;exports.uploadFileRecordEntityIdPropertyTransfer=Cge;exports.uploadFileRecordEntityMimeTypePropertyDataTypeTransfer=Vge;exports.uploadFileRecordEntityMimeTypePropertyTransfer=Nge;exports.uploadFileRecordEntityModifiedTimePropertyDataTypeTransfer=kge;exports.uploadFileRecordEntityModifiedTimePropertyTransfer=jge;exports.uploadFileRecordEntityNamePropertyDataTypeTransfer=_ge;exports.uploadFileRecordEntityNamePropertyTransfer=Pge;exports.uploadFileRecordEntityParentsPropertyDataTypeTransfer=Bge;exports.uploadFileRecordEntityParentsPropertyTransfer=Gge;exports.uploadFileRecordEntitySizePropertyDataTypeTransfer=xge;exports.uploadFileRecordEntitySizePropertyTransfer=$ge;exports.uploadFileRecordEntityTransfer=Uge;exports.uploadFileRecordEntityWebViewLinkPropertyDataTypeTransfer=Lge;exports.uploadFileRecordEntityWebViewLinkPropertyTransfer=Mge;exports.uploadFileRemoveFromRootInputDataTypeTransfer=bge;exports.uploadFileRemoveFromRootInputTransfer=Age;exports.uploadFileResponseDataTypeTransfer=qge;exports.uploadFileResponseEntityTransfer=Sge;exports.uploadFileResponseRecordPropertyDataTypeTransfer=Kge;exports.uploadFileResponseRecordPropertyTransfer=Fge;exports.uploadFileSupportsAllDrivesInputDataTypeTransfer=Tge;exports.uploadFileSupportsAllDrivesInputTransfer=vge;exports.urlDefaultValue=Nle;exports.uuidPrototype=Il;exports.uuidValueValidation=jUi;exports.validateArgumentDeclarationName=$x;exports.validateCallableEntityShouldCallReturnStatement=ra;exports.validateCalledByErrorIdInAction=Yki;exports.validateCalledByIdInAction=Jki;exports.validateCallers=jke;exports.validateConditionEntityDeclaration=eji;exports.validateDataOperation=Yy;exports.validateDataOperationDataToValidateArgument=Fne;exports.validateDataOperationDataToValidateArgumentParentRef=Kne;exports.validateDataOperationDataToValidateArgumentRef=jne;exports.validateDataOperationDataToValidateDataType=Une;exports.validateDataOperationDataType=eae;exports.validateDataOperationDataTypeEntity=Xne;exports.validateDataOperationDataTypeEntityOutputEntityProperty=N_;exports.validateDataOperationDataTypeEntityOutputEntityPropertyParentRef=Jne;exports.validateDataOperationDataTypeEntityParentRef=Yne;exports.validateDataOperationDataTypeParentRef=Qne;exports.validateDataOperationEntityToMatchTypeArgument=Hne;exports.validateDataOperationEntityToMatchTypeArgumentParentRef=Zne;exports.validateDataOperationEntityToMatchTypeArgumentRef=Sne;exports.validateDataOperationEntityToMatchTypeDataType=qne;exports.validateDataOperationError=zne;exports.validateDataOperationErrorParentRef=Wne;exports.validateDefinitionEntityName=Px;exports.validateEntityName=xv;exports.validateEntryCaller=kke;exports.validateEntryPointsTermination=Nv;exports.validateErrorCaller=Gke;exports.validateFunctionCallDeclaration=Kke;exports.validateFunctionDeclarationName=Vx;exports.validateGeneratedEntityParentIsNotBuiltInEntity=qki;exports.validateGeneration=Fki;exports.validateGenerationTarget=Nr;exports.validateGenerationUpdate=Ski;exports.validateLoopEntityDeclaration=tji;exports.validateMissingValue=Ds;exports.validateName=tUi;exports.validateOperationEntityDeclaration=Fke;exports.validatePropertyName=xx;exports.validateReachability=ia;exports.validateReadsValueInActionPayload=Xki;exports.validateReferenceObject=P1;exports.validateReferenceToOne=aC;exports.validateReferences=vn;exports.validateSuccessCaller=Bke;exports.validateValueReaderGenerationUpdate=sf;exports.validateValueWritter=dx;exports.validateVariableDeclarationName=Nx;exports.validateVariableInternalCallUse=Vv;exports.valueAutogenerationCurrentDateAndTimeSchema=G4e;exports.valueAutogenerationGenericSchema=h1;exports.valueAutogenerationOptions=X4e;exports.valueAutogenerationOptionsSchema=M4e;exports.valueAutogenerationRandomBooleanSchema=W4e;exports.valueAutogenerationRandomDateBetweenSchema=H4e;exports.valueAutogenerationRandomDateFromSchema=q4e;exports.valueAutogenerationRandomDateSchema=v1;exports.valueAutogenerationRandomDateUntilSchema=Z4e;exports.valueAutogenerationRandomNumberBetweenSchema=U4e;exports.valueAutogenerationRandomNumberFromSchema=k4e;exports.valueAutogenerationRandomNumberSchema=m1;exports.valueAutogenerationRandomNumberUntilSchema=j4e;exports.valueAutogenerationRandomSchema=gv;exports.valueAutogenerationRandomTextBetweenSchema=S4e;exports.valueAutogenerationRandomTextFromSchema=K4e;exports.valueAutogenerationRandomTextSchema=T1;exports.valueAutogenerationRandomTextUntilSchema=F4e;exports.valueAutogenerationRangeValueTypesSchema=Fm;exports.valueAutogenerationUniqueSchema=B4e;exports.valueDT=one;exports.valueDescriptorValidation=E4i;exports.variableDeclarationValidation=pBi;exports.variableInstanceValidation=cBi;exports.verifyJwtHmac=IMe;exports.verifyPasswordPBKDF2=EMe;exports.voidPrototype=ja;exports.waitOperation=is;exports.waitOperationMillisecondsNumberArgument=Jy;exports.waitOperationMillisecondsNumberArgumentRef=Dne;exports.waitOperationMillisecondsNumberDataType=wne;exports.waitOperationOperationError=_ne;exports.waitOperationOperationErrorParentRef=Cne;exports.waitOperationOutputDataType=Vne;exports.waitOperationOutputDataTypeParentRef=Pne;exports.waitOperationRef=One;exports.writeObjectKey=N2e;exports.writeObjectNestedKey=L2e;exports.writeSafeObjectNestedKeyRecursively=M2e;