@itwin/core-backend 5.0.0-dev.117 → 5.0.0-dev.119

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.
Files changed (169) hide show
  1. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  2. package/lib/cjs/BackendHubAccess.js +1 -1
  3. package/lib/cjs/BackendHubAccess.js.map +1 -1
  4. package/lib/cjs/Category.d.ts +4 -4
  5. package/lib/cjs/Category.js +4 -4
  6. package/lib/cjs/Category.js.map +1 -1
  7. package/lib/cjs/ClassRegistry.d.ts +1 -1
  8. package/lib/cjs/ClassRegistry.js +1 -1
  9. package/lib/cjs/ClassRegistry.js.map +1 -1
  10. package/lib/cjs/CodeSpecs.d.ts +1 -1
  11. package/lib/cjs/CodeSpecs.js +1 -1
  12. package/lib/cjs/CodeSpecs.js.map +1 -1
  13. package/lib/cjs/DisplayStyle.d.ts +4 -4
  14. package/lib/cjs/DisplayStyle.js +3 -3
  15. package/lib/cjs/DisplayStyle.js.map +1 -1
  16. package/lib/cjs/ECDb.d.ts +4 -4
  17. package/lib/cjs/ECDb.d.ts.map +1 -1
  18. package/lib/cjs/ECDb.js +4 -4
  19. package/lib/cjs/ECDb.js.map +1 -1
  20. package/lib/cjs/ECSqlStatement.d.ts +6 -6
  21. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  22. package/lib/cjs/ECSqlStatement.js +4 -4
  23. package/lib/cjs/ECSqlStatement.js.map +1 -1
  24. package/lib/cjs/Element.d.ts +51 -51
  25. package/lib/cjs/Element.js +51 -51
  26. package/lib/cjs/Element.js.map +1 -1
  27. package/lib/cjs/ElementAspect.d.ts +8 -8
  28. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  29. package/lib/cjs/ElementAspect.js +8 -8
  30. package/lib/cjs/ElementAspect.js.map +1 -1
  31. package/lib/cjs/Entity.d.ts +3 -3
  32. package/lib/cjs/Entity.js +2 -2
  33. package/lib/cjs/Entity.js.map +1 -1
  34. package/lib/cjs/IModelDb.d.ts +17 -17
  35. package/lib/cjs/IModelDb.d.ts.map +1 -1
  36. package/lib/cjs/IModelDb.js +18 -17
  37. package/lib/cjs/IModelDb.js.map +1 -1
  38. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  39. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  40. package/lib/cjs/IModelElementCloneContext.js +1 -1
  41. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  42. package/lib/cjs/IModelHost.d.ts +2 -2
  43. package/lib/cjs/IModelHost.js +2 -2
  44. package/lib/cjs/IModelHost.js.map +1 -1
  45. package/lib/cjs/Material.d.ts +1 -1
  46. package/lib/cjs/Material.js +1 -1
  47. package/lib/cjs/Material.js.map +1 -1
  48. package/lib/cjs/Model.d.ts +22 -22
  49. package/lib/cjs/Model.js +22 -22
  50. package/lib/cjs/Model.js.map +1 -1
  51. package/lib/cjs/SQLiteDb.d.ts +1 -1
  52. package/lib/cjs/SQLiteDb.js +1 -1
  53. package/lib/cjs/SQLiteDb.js.map +1 -1
  54. package/lib/cjs/SqliteStatement.d.ts +1 -1
  55. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  56. package/lib/cjs/SqliteStatement.js +1 -1
  57. package/lib/cjs/SqliteStatement.js.map +1 -1
  58. package/lib/cjs/TextAnnotationElement.d.ts +2 -2
  59. package/lib/cjs/TextAnnotationElement.js +2 -2
  60. package/lib/cjs/TextAnnotationElement.js.map +1 -1
  61. package/lib/cjs/Texture.d.ts +1 -1
  62. package/lib/cjs/Texture.js +1 -1
  63. package/lib/cjs/Texture.js.map +1 -1
  64. package/lib/cjs/TxnManager.d.ts +4 -4
  65. package/lib/cjs/TxnManager.js +1 -1
  66. package/lib/cjs/TxnManager.js.map +1 -1
  67. package/lib/cjs/ViewDefinition.d.ts +14 -14
  68. package/lib/cjs/ViewDefinition.js +14 -14
  69. package/lib/cjs/ViewDefinition.js.map +1 -1
  70. package/lib/cjs/core-backend.d.ts.map +1 -1
  71. package/lib/cjs/core-backend.js +20 -0
  72. package/lib/cjs/core-backend.js.map +1 -1
  73. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  74. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  75. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  76. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  77. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  78. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  79. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  80. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  81. package/lib/esm/BackendHubAccess.d.ts +1 -1
  82. package/lib/esm/BackendHubAccess.js +1 -1
  83. package/lib/esm/BackendHubAccess.js.map +1 -1
  84. package/lib/esm/Category.d.ts +4 -4
  85. package/lib/esm/Category.js +4 -4
  86. package/lib/esm/Category.js.map +1 -1
  87. package/lib/esm/ClassRegistry.d.ts +1 -1
  88. package/lib/esm/ClassRegistry.js +1 -1
  89. package/lib/esm/ClassRegistry.js.map +1 -1
  90. package/lib/esm/CodeSpecs.d.ts +1 -1
  91. package/lib/esm/CodeSpecs.js +1 -1
  92. package/lib/esm/CodeSpecs.js.map +1 -1
  93. package/lib/esm/DisplayStyle.d.ts +4 -4
  94. package/lib/esm/DisplayStyle.js +3 -3
  95. package/lib/esm/DisplayStyle.js.map +1 -1
  96. package/lib/esm/ECDb.d.ts +4 -4
  97. package/lib/esm/ECDb.d.ts.map +1 -1
  98. package/lib/esm/ECDb.js +4 -4
  99. package/lib/esm/ECDb.js.map +1 -1
  100. package/lib/esm/ECSqlStatement.d.ts +6 -6
  101. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  102. package/lib/esm/ECSqlStatement.js +4 -4
  103. package/lib/esm/ECSqlStatement.js.map +1 -1
  104. package/lib/esm/Element.d.ts +51 -51
  105. package/lib/esm/Element.js +51 -51
  106. package/lib/esm/Element.js.map +1 -1
  107. package/lib/esm/ElementAspect.d.ts +8 -8
  108. package/lib/esm/ElementAspect.d.ts.map +1 -1
  109. package/lib/esm/ElementAspect.js +8 -8
  110. package/lib/esm/ElementAspect.js.map +1 -1
  111. package/lib/esm/Entity.d.ts +3 -3
  112. package/lib/esm/Entity.js +2 -2
  113. package/lib/esm/Entity.js.map +1 -1
  114. package/lib/esm/IModelDb.d.ts +17 -17
  115. package/lib/esm/IModelDb.d.ts.map +1 -1
  116. package/lib/esm/IModelDb.js +18 -17
  117. package/lib/esm/IModelDb.js.map +1 -1
  118. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  119. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  120. package/lib/esm/IModelElementCloneContext.js +1 -1
  121. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  122. package/lib/esm/IModelHost.d.ts +2 -2
  123. package/lib/esm/IModelHost.js +2 -2
  124. package/lib/esm/IModelHost.js.map +1 -1
  125. package/lib/esm/Material.d.ts +1 -1
  126. package/lib/esm/Material.js +1 -1
  127. package/lib/esm/Material.js.map +1 -1
  128. package/lib/esm/Model.d.ts +22 -22
  129. package/lib/esm/Model.js +22 -22
  130. package/lib/esm/Model.js.map +1 -1
  131. package/lib/esm/SQLiteDb.d.ts +1 -1
  132. package/lib/esm/SQLiteDb.js +1 -1
  133. package/lib/esm/SQLiteDb.js.map +1 -1
  134. package/lib/esm/SqliteStatement.d.ts +1 -1
  135. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  136. package/lib/esm/SqliteStatement.js +1 -1
  137. package/lib/esm/SqliteStatement.js.map +1 -1
  138. package/lib/esm/TextAnnotationElement.d.ts +2 -2
  139. package/lib/esm/TextAnnotationElement.js +2 -2
  140. package/lib/esm/TextAnnotationElement.js.map +1 -1
  141. package/lib/esm/Texture.d.ts +1 -1
  142. package/lib/esm/Texture.js +1 -1
  143. package/lib/esm/Texture.js.map +1 -1
  144. package/lib/esm/TxnManager.d.ts +4 -4
  145. package/lib/esm/TxnManager.js +1 -1
  146. package/lib/esm/TxnManager.js.map +1 -1
  147. package/lib/esm/ViewDefinition.d.ts +14 -14
  148. package/lib/esm/ViewDefinition.js +14 -14
  149. package/lib/esm/ViewDefinition.js.map +1 -1
  150. package/lib/esm/core-backend.d.ts.map +1 -1
  151. package/lib/esm/core-backend.js +20 -0
  152. package/lib/esm/core-backend.js.map +1 -1
  153. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  154. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  155. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  156. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  157. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  158. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  159. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  160. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  161. package/lib/esm/test/TestUtils.d.ts +1 -1
  162. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  163. package/lib/esm/test/TestUtils.js +1 -1
  164. package/lib/esm/test/TestUtils.js.map +1 -1
  165. package/lib/esm/test/imodel/IModel.test.js +28 -1
  166. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  167. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  168. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  169. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqG;AACrG,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAM1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM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7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,wCAYC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AATD,sCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n /**\n * ModelSelector custom HandledProps includes 'models'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"models\", source: \"Class\" },\n ];\n\n /**\n * ModelSelector deserializes 'models'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\n const elProps = super.deserialize(props) as ModelSelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n /**\n * CategorySelector custom HandledProps includes 'categories'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categories\", source: \"Class\" },\n ];\n\n /**\n * CategorySelector deserializes 'categories'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\n const elProps = super.deserialize(props) as CategorySelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n /**\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categorySelector\", source: \"Class\" },\n { propertyName: \"displayStyle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\n const elProps = super.deserialize(props) as ViewDefinitionProps;\n const instance = props.row;\n if (instance.isPrivate !== undefined)\n elProps.isPrivate = instance.isPrivate;\n elProps.categorySelectorId = instance.categorySelector.id;\n elProps.displayStyleId = instance.displayStyle.id;\n return elProps;\n }\n\n /**\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.categorySelector.id = props.categorySelectorId;\n inst.displayStyle.id = props.displayStyleId;\n return inst;\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n /**\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"eyePoint\", source: \"Class\" },\n { propertyName: \"focusDistance\", source: \"Class\" },\n { propertyName: \"lensAngle\", source: \"Class\" },\n { propertyName: \"yaw\", source: \"Class\" },\n { propertyName: \"roll\", source: \"Class\" },\n { propertyName: \"pitch\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"isCameraOn\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\n const instance = props.row;\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\n // ViewDefinition3dProps\n elProps.cameraOn = instance.isCameraOn as boolean;\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\n return elProps;\n }\n\n /**\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\n const row = super.serialize(props, _iModel);\n row.isCameraOn = props.cameraOn;\n row.eyePoint = props.camera.eye;\n row.focusDistance = props.camera.focusDist;\n row.lensAngle = props.camera.lens;\n if (props.angles) {\n row.yaw = props.angles.yaw;\n row.roll = props.angles.roll;\n row.pitch = props.angles.pitch;\n }\n return row;\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n /**\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"modelSelector\", source: \"Class\" },\n ];\n\n /**\n * SpatialViewDefinition deserializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\n const instance = props.row;\n elProps.modelSelectorId = instance.modelSelector.id;\n return elProps;\n }\n\n /**\n * SpatialViewDefinition serializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.modelSelector.id = props.modelSelectorId;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n /**\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"baseModel\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"rotationAngle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\n const instance = props.row;\n elProps.baseModelId = instance.baseModel.id;\n elProps.origin = [ instance.origin.x, instance.origin.y ];\n elProps.delta = [ instance.extents.x, instance.extents.y ];\n elProps.angle = instance.rotationAngle;\n return elProps;\n }\n\n /**\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.baseModel.id = props.baseModelId;\n inst.origin = props.origin;\n inst.extents = props.delta;\n inst.rotationAngle = props.angle;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type?: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\n super(props, iModel);\n this.type = props.type;\n this.description = props.description;\n }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle?: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw?: number;\n public pitch?: number;\n public roll?: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled?: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.enabled = props.enabled;\n }\n}\n"]}
1
+ {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqG;AACrG,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAM1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAE1E,mFAAmF;IAC5E,MAAM,CAAe;IAE5B,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;OAIG;IACO,MAAM,CAAmB,mBAAmB,GAA4B;QAChF,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;KAC5C,CAAC;IAEF;;;;OAIG;IACI,MAAM,CAAU,WAAW,CAAC,KAA4B;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAuB,CAAC;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC;QAC3B,4DAA4D;QAC5D,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,2FAA2F,EAAE,CAAC,SAAS,EAAE,EAAE;YAC7J,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;YACjC,MAA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,CAAC;QACzF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAXD,sDAWC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAkB;IAC7C,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACpE,IAAI,CAAiB;IAC5B,YAAmB,KAA0B,EAAE,MAAgB;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,wCAYC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AATD,sCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public @preview\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n /**\n * ModelSelector custom HandledProps includes 'models'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"models\", source: \"Class\" },\n ];\n\n /**\n * ModelSelector deserializes 'models'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\n const elProps = super.deserialize(props) as ModelSelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public @preview\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n /**\n * CategorySelector custom HandledProps includes 'categories'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categories\", source: \"Class\" },\n ];\n\n /**\n * CategorySelector deserializes 'categories'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\n const elProps = super.deserialize(props) as CategorySelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public @preview\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n /**\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categorySelector\", source: \"Class\" },\n { propertyName: \"displayStyle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\n const elProps = super.deserialize(props) as ViewDefinitionProps;\n const instance = props.row;\n if (instance.isPrivate !== undefined)\n elProps.isPrivate = instance.isPrivate;\n elProps.categorySelectorId = instance.categorySelector.id;\n elProps.displayStyleId = instance.displayStyle.id;\n return elProps;\n }\n\n /**\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.categorySelector.id = props.categorySelectorId;\n inst.displayStyle.id = props.displayStyleId;\n return inst;\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public @preview\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n /**\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"eyePoint\", source: \"Class\" },\n { propertyName: \"focusDistance\", source: \"Class\" },\n { propertyName: \"lensAngle\", source: \"Class\" },\n { propertyName: \"yaw\", source: \"Class\" },\n { propertyName: \"roll\", source: \"Class\" },\n { propertyName: \"pitch\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"isCameraOn\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\n const instance = props.row;\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\n // ViewDefinition3dProps\n elProps.cameraOn = instance.isCameraOn as boolean;\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\n return elProps;\n }\n\n /**\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\n const row = super.serialize(props, _iModel);\n row.isCameraOn = props.cameraOn;\n row.eyePoint = props.camera.eye;\n row.focusDistance = props.camera.focusDist;\n row.lensAngle = props.camera.lens;\n if (props.angles) {\n row.yaw = props.angles.yaw;\n row.roll = props.angles.roll;\n row.pitch = props.angles.pitch;\n }\n return row;\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public @preview\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n /**\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"modelSelector\", source: \"Class\" },\n ];\n\n /**\n * SpatialViewDefinition deserializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\n const instance = props.row;\n elProps.modelSelectorId = instance.modelSelector.id;\n return elProps;\n }\n\n /**\n * SpatialViewDefinition serializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.modelSelector.id = props.modelSelectorId;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public @preview\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public @preview\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n /**\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"baseModel\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"rotationAngle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\n const instance = props.row;\n elProps.baseModelId = instance.baseModel.id;\n elProps.origin = [ instance.origin.x, instance.origin.y ];\n elProps.delta = [ instance.extents.x, instance.extents.y ];\n elProps.angle = instance.rotationAngle;\n return elProps;\n }\n\n /**\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.baseModel.id = props.baseModelId;\n inst.origin = props.origin;\n inst.extents = props.delta;\n inst.rotationAngle = props.angle;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public @preview\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public @preview\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public @preview\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type?: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\n super(props, iModel);\n this.type = props.type;\n this.description = props.description;\n }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public @preview\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle?: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public @preview\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw?: number;\n public pitch?: number;\n public roll?: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public @preview\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public @preview\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled?: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.enabled = props.enabled;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,C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Ac,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC,cAAc,0BAA0B,CAAC;AA2BzC;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG"}
@@ -96,6 +96,26 @@ __exportStar(require("./workspace/WorkspaceEditor"), exports);
96
96
  __exportStar(require("./SqliteChangesetReader"), exports);
97
97
  __exportStar(require("./ChangesetECAdaptor"), exports);
98
98
  __exportStar(require("./internal/cross-package"), exports);
99
+ const globalSymbolCoreBackend = Symbol.for("itwin.core.backend.globals");
100
+ if (globalThis[globalSymbolCoreBackend]) {
101
+ // Get the stack trace from when the module was first loaded
102
+ const firstLoadStack = globalThis[globalSymbolCoreBackend].stack;
103
+ const error = new Error("Multiple @itwin/core-backend imports detected! This may happen if:\n" +
104
+ "- You have multiple versions of the package installed\n" +
105
+ "- Your bundling configuration is incorrect\n" +
106
+ "- You're importing from both ESM and CommonJS versions");
107
+ /* eslint-disable no-console */
108
+ console.error("Duplicate @itwin/core-backend import:", error);
109
+ console.error("First import occurred at:", firstLoadStack);
110
+ console.error("Current import occurred at:", error.stack);
111
+ /* eslint-enable no-console */
112
+ throw error;
113
+ }
114
+ else {
115
+ globalThis[globalSymbolCoreBackend] = {
116
+ stack: new Error().stack,
117
+ };
118
+ }
99
119
  /** @docs-package-description
100
120
  * The core-backend package always runs on the computer with a local Briefcase.
101
121
  *
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACnC,8CAA4B;AAC5B,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,mDAAiC;AACjC,0DAAwC;AACxC,0DAAwC;AACxC,6CAA2B;AAC3B,kDAAgC;AAChC,8DAA4C;AAC5C,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,gDAA8B;AAC9B,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAmC;AACnC,+CAA6B;AAC7B,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,oDAAkC;AAClC,0DAAwC;AACxC,+DAKgC;AAJ9B,8HAAA,sBAAsB,OAAA;AACtB,oIAAA,4BAA4B,OAAA;AAI9B,2DAAyC;AACzC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,mDAAiC;AACjC,8CAA4B;AAC5B,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,8DAA4C;AAC5C,0DAAwC;AACxC,uDAAqC;AAErC,2DAAyC;AAEzC;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./BackendHubAccess\";\nexport * from \"./BackendLoggerCategory\";\nexport * from \"./BisCoreSchema\";\nexport * from \"./BlobContainerService\";\nexport * from \"./BriefcaseManager\";\nexport * from \"./CatalogDb\";\nexport * from \"./Category\";\nexport * from \"./ChangedElementsDb\";\nexport * from \"./ChangeSummaryManager\";\nexport * from \"./ChannelControl\";\nexport * from \"./CheckpointManager\";\nexport * from \"./ClassRegistry\";\nexport * from \"./CloudSqlite\";\nexport * from \"./CodeService\";\nexport * from \"./CodeSpecs\";\nexport * from \"./DevTools\";\nexport * from \"./DisplayStyle\";\nexport * from \"./domains/FunctionalElements\";\nexport * from \"./domains/FunctionalSchema\";\nexport * from \"./domains/GenericElements\";\nexport * from \"./domains/GenericSchema\";\nexport * from \"./ECDb\";\nexport * from \"./ECSchemaXmlContext\";\nexport * from \"./ECSqlStatement\";\nexport * from \"./Element\";\nexport * from \"./ElementAspect\";\nexport * from \"./ElementGraphics\";\nexport * from \"./ElementTreeWalker\";\nexport * from \"./Entity\";\nexport * from \"./EntityReferences\";\nexport * from \"./ExportGraphics\";\nexport * from \"./ExternalSource\";\nexport * from \"./FontFile\";\nexport * from \"./GeoCoordConfig\";\nexport * from \"./GeographicCRSServices\";\nexport * from \"./ImageSourceConversion\";\nexport * from \"./IModelDb\";\nexport * from \"./IModelDbFonts\";\nexport * from \"./IModelElementCloneContext\";\nexport * from \"./IModelHost\";\nexport * from \"./IModelJsFs\";\nexport * from \"./SchemaSync\";\nexport * from \"./IpcHost\";\nexport * from \"./LineStyle\";\nexport * from \"./LocalhostIpcHost\";\nexport * from \"./LocalHub\";\nexport * from \"./LockControl\";\nexport * from \"./Material\";\nexport * from \"./Model\";\nexport * from \"./NativeAppStorage\";\nexport * from \"./NativeHost\";\nexport * from \"./NavigationRelationship\";\nexport * from \"./PropertyStore\";\nexport * from \"./Relationship\";\nexport * from \"./rpc/tracing\";\nexport * from \"./Schema\";\nexport * from \"./SchemaUtils\";\nexport * from \"./SheetIndex\";\nexport * from \"./SQLiteDb\";\nexport * from \"./SqliteStatement\";\nexport * from \"./TextAnnotationElement\";\nexport {\n computeGraphemeOffsets,\n computeLayoutTextBlockResult,\n ComputeGraphemeOffsetsArgs,\n LayoutTextBlockArgs,\n} from \"./TextAnnotationLayout\";\nexport * from \"./TextAnnotationGeometry\";\nexport * from \"./Texture\";\nexport * from \"./TileStorage\";\nexport * from \"./TxnManager\";\nexport * from \"./ViewDefinition\";\nexport * from \"./ViewStore\";\nexport * from \"./workspace/Settings\";\nexport * from \"./workspace/SettingsSchemas\";\nexport * from \"./workspace/Workspace\";\nexport * from \"./workspace/WorkspaceEditor\";\nexport * from \"./SqliteChangesetReader\";\nexport * from \"./ChangesetECAdaptor\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-backend package always runs on the computer with a local Briefcase.\n *\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\n */\n\n/**\n * @docs-group-description BlobContainers\n * Classes for working with cloud-based blob containers.\n */\n\n/**\n * @docs-group-description Codes\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ECDb\n * Classes for working with ECDb.\n */\n\n/**\n * @docs-group-description ECSQL\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\n */\n\n/**\n * @docs-group-description ElementAspects\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ElementGeometry\n * Classes for defining the symbology and geometry of geometric elements\n */\n\n/**\n * @docs-group-description Elements\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ExportGraphics\n * APIs for producing low-level graphics primitives from element geometry.\n */\n\n/**\n * @docs-group-description HubAccess\n * APIs for working with IModelHub\n */\n\n/**\n * @docs-group-description Images\n * APIs for encoding and decoding images\n */\n\n/**\n * @docs-group-description IModelHost\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\n * See [the learning article]($docs/learning/backend/IModelHost.md).\n */\n\n/**\n * @docs-group-description iModels\n * Classes for working with [iModels]($docs/learning/iModels.md).\n * See [the learning article]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n\n/**\n * @docs-group-description Models\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description NativeApp\n * Classes for working with Mobile/Desktop Application.\n */\n\n/**\n * @docs-group-description Portability\n */\n\n/**\n * @docs-group-description Relationships\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\n */\n\n/**\n * @docs-group-description RpcInterface\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n\n/**\n * @docs-group-description Schema\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n */\n\n/**\n * @docs-group-description SQLite\n * Classes for working directly with SQLite\n */\n\n/**\n * @docs-group-description SQLiteDb\n * Classes for working with SQLiteDb.\n */\n\n/**\n * @docs-group-description TileStorage\n * Class for working with cloud storage using iTwin/object-storage cloud providers\n */\n\n/**\n * @docs-group-description ViewDefinitions\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\n */\n\n/**\n * @docs-group-description Workspace\n * APIs for loading and using Settings and Workspace resources\n */\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACnC,8CAA4B;AAC5B,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,mDAAiC;AACjC,0DAAwC;AACxC,0DAAwC;AACxC,6CAA2B;AAC3B,kDAAgC;AAChC,8DAA4C;AAC5C,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,gDAA8B;AAC9B,6CAA2B;AAC3B,0CAAwB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GG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./BackendHubAccess\";\nexport * from \"./BackendLoggerCategory\";\nexport * from \"./BisCoreSchema\";\nexport * from \"./BlobContainerService\";\nexport * from \"./BriefcaseManager\";\nexport * from \"./CatalogDb\";\nexport * from \"./Category\";\nexport * from \"./ChangedElementsDb\";\nexport * from \"./ChangeSummaryManager\";\nexport * from \"./ChannelControl\";\nexport * from \"./CheckpointManager\";\nexport * from \"./ClassRegistry\";\nexport * from \"./CloudSqlite\";\nexport * from \"./CodeService\";\nexport * from \"./CodeSpecs\";\nexport * from \"./DevTools\";\nexport * from \"./DisplayStyle\";\nexport * from \"./domains/FunctionalElements\";\nexport * from \"./domains/FunctionalSchema\";\nexport * from \"./domains/GenericElements\";\nexport * from \"./domains/GenericSchema\";\nexport * from \"./ECDb\";\nexport * from \"./ECSchemaXmlContext\";\nexport * from \"./ECSqlStatement\";\nexport * from \"./Element\";\nexport * from \"./ElementAspect\";\nexport * from \"./ElementGraphics\";\nexport * from \"./ElementTreeWalker\";\nexport * from \"./Entity\";\nexport * from \"./EntityReferences\";\nexport * from \"./ExportGraphics\";\nexport * from \"./ExternalSource\";\nexport * from \"./FontFile\";\nexport * from \"./GeoCoordConfig\";\nexport * from \"./GeographicCRSServices\";\nexport * from \"./ImageSourceConversion\";\nexport * from \"./IModelDb\";\nexport * from \"./IModelDbFonts\";\nexport * from \"./IModelElementCloneContext\";\nexport * from \"./IModelHost\";\nexport * from \"./IModelJsFs\";\nexport * from \"./SchemaSync\";\nexport * from \"./IpcHost\";\nexport * from \"./LineStyle\";\nexport * from \"./LocalhostIpcHost\";\nexport * from \"./LocalHub\";\nexport * from \"./LockControl\";\nexport * from \"./Material\";\nexport * from \"./Model\";\nexport * from \"./NativeAppStorage\";\nexport * from \"./NativeHost\";\nexport * from \"./NavigationRelationship\";\nexport * from \"./PropertyStore\";\nexport * from \"./Relationship\";\nexport * from \"./rpc/tracing\";\nexport * from \"./Schema\";\nexport * from \"./SchemaUtils\";\nexport * from \"./SheetIndex\";\nexport * from \"./SQLiteDb\";\nexport * from \"./SqliteStatement\";\nexport * from \"./TextAnnotationElement\";\nexport {\n computeGraphemeOffsets,\n computeLayoutTextBlockResult,\n ComputeGraphemeOffsetsArgs,\n LayoutTextBlockArgs,\n} from \"./TextAnnotationLayout\";\nexport * from \"./TextAnnotationGeometry\";\nexport * from \"./Texture\";\nexport * from \"./TileStorage\";\nexport * from \"./TxnManager\";\nexport * from \"./ViewDefinition\";\nexport * from \"./ViewStore\";\nexport * from \"./workspace/Settings\";\nexport * from \"./workspace/SettingsSchemas\";\nexport * from \"./workspace/Workspace\";\nexport * from \"./workspace/WorkspaceEditor\";\nexport * from \"./SqliteChangesetReader\";\nexport * from \"./ChangesetECAdaptor\";\n\nexport * from \"./internal/cross-package\";\n\nconst globalSymbolCoreBackend = Symbol.for(\"itwin.core.backend.globals\");\nif ((globalThis as any)[globalSymbolCoreBackend]) {\n // Get the stack trace from when the module was first loaded\n const firstLoadStack = (globalThis as any)[globalSymbolCoreBackend].stack;\n\n const error = new Error(\n \"Multiple @itwin/core-backend imports detected! This may happen if:\\n\" +\n \"- You have multiple versions of the package installed\\n\" +\n \"- Your bundling configuration is incorrect\\n\" +\n \"- You're importing from both ESM and CommonJS versions\"\n );\n\n /* eslint-disable no-console */\n console.error(\"Duplicate @itwin/core-backend import:\", error);\n console.error(\"First import occurred at:\", firstLoadStack);\n console.error(\"Current import occurred at:\", error.stack);\n /* eslint-enable no-console */\n\n throw error;\n} else {\n (globalThis as any)[globalSymbolCoreBackend] = {\n stack: new Error().stack,\n };\n}\n\n/** @docs-package-description\n * The core-backend package always runs on the computer with a local Briefcase.\n *\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\n */\n\n/**\n * @docs-group-description BlobContainers\n * Classes for working with cloud-based blob containers.\n */\n\n/**\n * @docs-group-description Codes\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ECDb\n * Classes for working with ECDb.\n */\n\n/**\n * @docs-group-description ECSQL\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\n */\n\n/**\n * @docs-group-description ElementAspects\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ElementGeometry\n * Classes for defining the symbology and geometry of geometric elements\n */\n\n/**\n * @docs-group-description Elements\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ExportGraphics\n * APIs for producing low-level graphics primitives from element geometry.\n */\n\n/**\n * @docs-group-description HubAccess\n * APIs for working with IModelHub\n */\n\n/**\n * @docs-group-description Images\n * APIs for encoding and decoding images\n */\n\n/**\n * @docs-group-description IModelHost\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\n * See [the learning article]($docs/learning/backend/IModelHost.md).\n */\n\n/**\n * @docs-group-description iModels\n * Classes for working with [iModels]($docs/learning/iModels.md).\n * See [the learning article]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n\n/**\n * @docs-group-description Models\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description NativeApp\n * Classes for working with Mobile/Desktop Application.\n */\n\n/**\n * @docs-group-description Portability\n */\n\n/**\n * @docs-group-description Relationships\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\n */\n\n/**\n * @docs-group-description RpcInterface\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n\n/**\n * @docs-group-description Schema\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n */\n\n/**\n * @docs-group-description SQLite\n * Classes for working directly with SQLite\n */\n\n/**\n * @docs-group-description SQLiteDb\n * Classes for working with SQLiteDb.\n */\n\n/**\n * @docs-group-description TileStorage\n * Class for working with cloud storage using iTwin/object-storage cloud providers\n */\n\n/**\n * @docs-group-description ViewDefinitions\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\n */\n\n/**\n * @docs-group-description Workspace\n * APIs for loading and using Settings and Workspace resources\n */\n"]}
@@ -36,7 +36,7 @@ export declare class IModelReadRpcImpl extends RpcInterface implements IModelRea
36
36
  getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]>;
37
37
  getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]>;
38
38
  /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.
39
- * @deprecated in 3.x - Use queryViewThumbnail instead
39
+ * @deprecated in 3.x - might be removed in next major version. Use queryViewThumbnail instead
40
40
  */
41
41
  getViewThumbnail(tokenProps: IModelRpcProps, viewId: string): Promise<Uint8Array>;
42
42
  getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String>;
@@ -259,7 +259,7 @@ class IModelReadRpcImpl extends core_common_1.RpcInterface {
259
259
  return (el === undefined) ? [] : el.getToolTipMessage();
260
260
  }
261
261
  /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.
262
- * @deprecated in 3.x - Use queryViewThumbnail instead
262
+ * @deprecated in 3.x - might be removed in next major version. Use queryViewThumbnail instead
263
263
  */
264
264
  async getViewThumbnail(tokenProps, viewId) {
265
265
  const iModelDb = await getIModelForRpc(tokenProps);
@@ -1 +1 @@
1
- {"version":3,"file":"IModelReadRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAC7B,oDAU4B;AAE5B,oEAAiE;AACjE,0CAA8C;AAC9C,wDAAqD;AACrD,0EAAuE;AACvE,wDAA+D;AAG/D,wDAAqD;AACrD,4CAA0C;AAC1C,4DAAyD;AACzD,+DAA4D;AAC5D,iDAAgD;AAQhD,MAAM,wBAAyB,SAAQ,iCAAuC;IAC3D,UAAU,CAAS;IAC5B,MAAM,CAAC,SAAS,CAA4B;IAE7C,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAA4B;QACtD,IAAI,CAAC,IAAI,CAAC,SAAS;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,wBAAwB,EAAE,CAAC;QAElD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;QACE,MAAM,OAAO,GAAG,KAAK,EAAE,KAA4B,EAAE,EAAE;YACrD,MAAM,EAAE,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;YACzF,MAAM,WAAW,GAAG,IAAI,mDAAwB,CAAC,EAAE,CAAC,CAAC;YACrD,OAAO,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC,CAAC;QAEF,MAAM,SAAS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AM,EAAE,GAAG,MAAM,eAAe,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/F,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAQ,CAAC;QAErE,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,OAAO,IAAI,KAAK,UAAU;YAC5B,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,gBAAgB,EAAE,+BAA+B,UAAU,GAAG,CAAC,CAAC;QAErG,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AArSD,8CAqSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\n\nimport {\n AccessToken, assert, BeDuration, BentleyStatus, CompressedId64Set, GuidString, Id64, Id64String, IModelStatus, Logger,\n} from \"@itwin/core-bentley\";\nimport {\n Code, CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse,\n ElementLoadOptions, ElementLoadProps, ElementMeshRequestProps, ElementProps, EntityMetaData, EntityQueryParams, FontMapProps,\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps, GeometryContainmentResponseProps,\n GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ImageSourceFormat, IModel, IModelConnectionProps,\n IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelError, IModelReadRpcInterface, IModelRpcOpenProps, IModelRpcProps,\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\n ModelExtentsProps, ModelProps, NoContentError, RpcInterface, RpcManager, RpcPendingResponse, SnapRequestProps, SnapResponseProps,\n SubCategoryResultRow, SyncMode, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps,\n ViewStoreRpc,\n} from \"@itwin/core-common\";\nimport { Range3dProps } from \"@itwin/core-geometry\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { SpatialCategory } from \"../Category\";\nimport { ConcurrentQuery } from \"../ConcurrentQuery\";\nimport { CustomViewState3dCreator } from \"../CustomViewState3dCreator\";\nimport { generateGeometrySummaries } from \"../GeometrySummary\";\nimport { IModelDb } from \"../IModelDb\";\nimport { DictionaryModel } from \"../Model\";\nimport { PromiseMemoizer } from \"../PromiseMemoizer\";\nimport { RpcTrace } from \"../rpc/tracing\";\nimport { ViewStateHydrator } from \"../ViewStateHydrator\";\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\nimport { _nativeDb } from \"../internal/Symbols\";\n\ninterface ViewStateRequestProps {\n accessToken: AccessToken;\n tokenProps: IModelRpcProps;\n options: CustomViewState3dCreatorOptions;\n}\n\nclass ViewStateRequestMemoizer extends PromiseMemoizer<CustomViewState3dProps> {\n private readonly _timeoutMs: number;\n private static _instance?: ViewStateRequestMemoizer;\n\n public static async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n if (!this._instance)\n this._instance = new ViewStateRequestMemoizer();\n\n return this._instance.perform(props);\n }\n\n private constructor() {\n const memoize = async (props: ViewStateRequestProps) => {\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\n const viewCreator = new CustomViewState3dCreator(db);\n return viewCreator.getCustomViewState3dData(props.options);\n };\n\n const stringify = (props: ViewStateRequestProps) => {\n const token = props.tokenProps;\n const modelIds = props.options.modelIds;\n return `${token.key}-${token.iTwinId}-${token.iModelId}-${token.changeset?.id}:${modelIds}`;\n };\n\n super(memoize, stringify);\n this._timeoutMs = 20 * 1000;\n }\n\n private async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n const memo = this.memoize(props);\n\n // Rejections must be caught so that the memoization entry is deleted.\n await BeDuration.race(this._timeoutMs, memo.promise).catch(() => undefined);\n\n if (memo.isPending)\n throw new RpcPendingResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n\n this.deleteMemoized(props);\n\n if (memo.isFulfilled) {\n assert(undefined !== memo.result);\n return memo.result;\n }\n\n assert(memo.isRejected);\n throw memo.error;\n }\n}\n\nfunction currentActivity() {\n return RpcTrace.expectCurrentActivity;\n}\n\nasync function getIModelForRpc(tokenProps: IModelRpcProps): Promise<IModelDb> {\n return RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\n}\n\n/** The backend implementation of IModelReadRpcInterface.\n * @internal\n */\nexport class IModelReadRpcImpl extends RpcInterface implements IModelReadRpcInterface {\n\n public static register() { RpcManager.registerImpl(IModelReadRpcInterface, IModelReadRpcImpl); }\n\n public async getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps> {\n return RpcBriefcaseUtility.openWithTimeout(currentActivity(), tokenProps, SyncMode.FixedVersion);\n }\n\n public async getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> {\n const accessToken = currentActivity().accessToken;\n return ViewStateRequestMemoizer.perform({ accessToken, tokenProps, options });\n }\n\n public async hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const viewHydrater = new ViewStateHydrator(iModelDb);\n return viewHydrater.getHydrateResponseProps(options);\n }\n\n public async queryAllUsedSpatialSubCategories(tokenProps: IModelRpcProps): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.queryAllUsedSpatialSubCategories();\n }\n\n public async querySubCategories(tokenProps: IModelRpcProps, compressedCategoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const decompressedIds = CompressedId64Set.decompressArray(compressedCategoryIds);\n return iModelDb.querySubCategories(decompressedIds);\n }\n\n public async queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeQueryRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeBlobRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryModelRanges(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<Range3dProps[]> {\n const results = await this.queryModelExtents(tokenProps, modelIds);\n if (results.length === 1 && results[0].status !== IModelStatus.Success)\n throw new IModelError(results[0].status, \"error querying model range\");\n\n return results.filter((x) => x.status === IModelStatus.Success).map((x) => x.extents);\n }\n\n public async queryModelExtents(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<ModelExtentsProps[]> {\n const iModel = await getIModelForRpc(tokenProps);\n return iModel.models.queryExtents(modelIds);\n }\n\n public async getModelProps(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<ModelProps[]> {\n const modelIds = new Set(modelIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const modelJsonArray: ModelProps[] = [];\n for (const id of modelIds) {\n try {\n const modelProps = iModelDb.models.getModelProps(id);\n modelJsonArray.push(modelProps);\n } catch (error) {\n if (modelIds.size === 1)\n throw error; // if they're asking for more than one model, don't throw on error.\n }\n }\n return modelJsonArray;\n }\n\n public async queryModelProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ModelProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n return this.getModelProps(tokenProps, [...ids]);\n }\n\n public async getElementProps(tokenProps: IModelRpcProps, elementIdsList: Id64String[]): Promise<ElementProps[]> {\n const elementIds = new Set(elementIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const elementProps: ElementProps[] = [];\n for (const id of elementIds) {\n try {\n elementProps.push(iModelDb.elements.getElementProps({ id }));\n } catch (error) {\n if (elementIds.size === 1)\n throw error; // if they're asking for more than one element, don't throw on error.\n }\n }\n return elementProps;\n }\n\n public async loadElementProps(tokenProps: IModelRpcProps, identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined> {\n const props: ElementLoadProps = options ? { ...options } : {};\n if (typeof identifier === \"string\") {\n if (Id64.isId64(identifier))\n props.id = identifier;\n else\n props.federationGuid = identifier;\n } else {\n props.code = Code.fromJSON(identifier);\n }\n\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.elements.tryGetElementProps(props);\n }\n\n public async getGeometrySummary(tokenProps: IModelRpcProps, request: GeometrySummaryRequestProps): Promise<string> {\n const iModel = await getIModelForRpc(tokenProps);\n return generateGeometrySummaries(request, iModel);\n }\n\n public async queryElementProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ElementProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n const res = this.getElementProps(tokenProps, [...ids]);\n return res;\n }\n\n public async queryEntityIds(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<Id64String[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const res = iModelDb.queryEntityIds(params);\n return [...res];\n }\n\n public async getClassHierarchy(tokenProps: IModelRpcProps, classFullName: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const classArray: string[] = [];\n while (true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const classMetaData: EntityMetaData = iModelDb.getMetaData(classFullName);\n classArray.push(classFullName);\n if (!classMetaData.baseClasses || classMetaData.baseClasses.length === 0)\n break;\n\n classFullName = classMetaData.baseClasses[0];\n }\n return classArray;\n }\n\n public async getAllCodeSpecs(tokenProps: IModelRpcProps): Promise<any[]> {\n const codeSpecs: any[] = [];\n const iModelDb = await getIModelForRpc(tokenProps);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iModelDb.withPreparedStatement(\"SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec\", (statement) => {\n for (const row of statement)\n codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });\n });\n return codeSpecs;\n }\n\n public async getViewStateData(tokenProps: IModelRpcProps, viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.views.getViewStateProps(viewDefinitionId, options);\n }\n\n public async readFontJson(tokenProps: IModelRpcProps): Promise<FontMapProps> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb[_nativeDb].readFontMap();\n }\n\n public async requestSnap(tokenProps: IModelRpcProps, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.requestSnap(sessionId, props);\n }\n\n public async cancelSnap(tokenProps: IModelRpcProps, sessionId: string): Promise<void> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.cancelSnap(sessionId);\n }\n\n public async getGeometryContainment(tokenProps: IModelRpcProps, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeometryContainment(props);\n }\n\n public async getMassProperties(tokenProps: IModelRpcProps, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getMassProperties(props);\n }\n\n public async getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n\n const getSingleCandidateMassProperties = async (candidate: string) => {\n try {\n const massPropResults: MassPropertiesResponseProps[] = [];\n\n for (const op of props.operations) {\n const massProperties = await iModelDb.getMassProperties({ operation: op, candidates: [candidate] });\n massPropResults.push(massProperties);\n }\n\n let singleCandidateResult: MassPropertiesPerCandidateResponseProps = { status: BentleyStatus.ERROR, candidate }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n if (massPropResults.some((r) => r.status !== BentleyStatus.ERROR)) {\n singleCandidateResult.status = BentleyStatus.SUCCESS;\n for (const r of massPropResults.filter((mpr) => mpr.status !== BentleyStatus.ERROR)) {\n singleCandidateResult = { ...singleCandidateResult, ...r };\n }\n }\n\n return singleCandidateResult;\n } catch {\n return { status: BentleyStatus.ERROR, candidate };\n }\n };\n\n const promises: Promise<MassPropertiesPerCandidateResponseProps>[] = []; // eslint-disable-line @typescript-eslint/no-deprecated\n\n for (const candidate of CompressedId64Set.iterable(props.candidates)) {\n promises.push(getSingleCandidateMassProperties(candidate));\n }\n\n return Promise.all(promises);\n }\n\n public async getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const el = iModelDb.elements.getElement(id);\n return (el === undefined) ? [] : el.getToolTipMessage();\n }\n\n /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.\n * @deprecated in 3.x - Use queryViewThumbnail instead\n */\n public async getViewThumbnail(tokenProps: IModelRpcProps, viewId: string): Promise<Uint8Array> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const thumbnail = iModelDb.views.getThumbnail(viewId);\n if (undefined === thumbnail || 0 === thumbnail.image.length)\n throw new NoContentError();\n\n const val = new Uint8Array(thumbnail.image.length + 16); // allocate a new buffer 16 bytes larger than the image size\n new Uint32Array(val.buffer, 0, 4).set([thumbnail.image.length, thumbnail.format === \"jpeg\" ? ImageSourceFormat.Jpeg : ImageSourceFormat.Png, thumbnail.width, thumbnail.height]); // Put the metadata in the first 16 bytes.\n val.set(thumbnail.image, 16); // put the image data at offset 16 after metadata\n return val;\n }\n\n public async getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const spec = { namespace: \"dgn_View\", name: \"DefaultView\" };\n const blob = iModelDb.queryFilePropertyBlob(spec);\n if (undefined === blob || 8 !== blob.length)\n return Id64.invalid;\n\n const view = new Uint32Array(blob.buffer);\n return Id64.fromUint32Pair(view[0], view[1]);\n }\n public async getSpatialCategoryId(tokenProps: IModelRpcProps, categoryName: string): Promise<Id64String | undefined> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const dictionary: DictionaryModel = iModelDb.models.getModel<DictionaryModel>(IModel.dictionaryId);\n return SpatialCategory.queryCategoryIdByName(iModelDb, dictionary.id, categoryName);\n }\n\n public async getIModelCoordinatesFromGeoCoordinates(tokenProps: IModelRpcProps, props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getIModelCoordinatesFromGeoCoordinates(props);\n }\n\n public async getGeoCoordinatesFromIModelCoordinates(tokenProps: IModelRpcProps, props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeoCoordinatesFromIModelCoordinates(props);\n }\n\n public async queryTextureData(tokenProps: IModelRpcProps, textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> {\n const db = await getIModelForRpc(tokenProps);\n return db.queryTextureData(textureLoadProps);\n }\n\n public async generateElementMeshes(tokenProps: IModelRpcProps, props: ElementMeshRequestProps): Promise<Uint8Array> {\n const db = await getIModelForRpc(tokenProps);\n return db[_nativeDb].generateElementMeshes(props);\n }\n\n /** @internal */\n public async callViewStore(tokenProps: IModelRpcProps, version: string, forWrite: boolean, methodName: string, ...args: any[]): Promise<any> {\n if (!RpcInterface.isVersionCompatible(ViewStoreRpc.version, version))\n throw new Error(\"ViewStoreRpc version mismatch\");\n\n const db = await getIModelForRpc(tokenProps);\n const viewStore = await db.views.accessViewStore({ accessLevel: forWrite ? \"write\" : \"read\" });\n const access = viewStore[forWrite ? \"writeLocker\" : \"reader\"] as any;\n\n const func = access[methodName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Illegal ViewStore RPC call \"${methodName}\"`);\n\n return func.call(access, ...args);\n }\n}\n"]}
1
+ {"version":3,"file":"IModelReadRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAC7B,oDAU4B;AAE5B,oEAAiE;AACjE,0CAA8C;AAC9C,wDAAqD;AACrD,0EAAuE;AACvE,wDAA+D;AAG/D,wDAAqD;AACrD,4CAA0C;AAC1C,4DAAyD;AACzD,+DAA4D;AAC5D,iDAAgD;AAQhD,MAAM,wBAAyB,SAAQ,iCAAuC;IAC3D,UAAU,CAAS;IAC5B,MAAM,CAAC,SAAS,CAA4B;IAE7C,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAA4B;QACtD,IAAI,CAAC,IAAI,CAAC,SAAS;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,wBAAwB,EAAE,CAAC;QAElD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;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OAAO,EAAE,CAAC,mBAAS,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,gBAAgB;IACT,KAAK,CAAC,aAAa,CAAC,UAA0B,EAAE,OAAe,EAAE,QAAiB,EAAE,UAAkB,EAAE,GAAG,IAAW;QAC3H,IAAI,CAAC,0BAAY,CAAC,mBAAmB,CAAC,0BAAY,CAAC,OAAO,EAAE,OAAO,CAAC;YAClE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAEnD,MAAM,EAAE,GAAG,MAAM,eAAe,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/F,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAQ,CAAC;QAErE,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,OAAO,IAAI,KAAK,UAAU;YAC5B,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,gBAAgB,EAAE,+BAA+B,UAAU,GAAG,CAAC,CAAC;QAErG,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AArSD,8CAqSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\n\nimport {\n AccessToken, assert, BeDuration, BentleyStatus, CompressedId64Set, GuidString, Id64, Id64String, IModelStatus, Logger,\n} from \"@itwin/core-bentley\";\nimport {\n Code, CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse,\n ElementLoadOptions, ElementLoadProps, ElementMeshRequestProps, ElementProps, EntityMetaData, EntityQueryParams, FontMapProps,\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps, GeometryContainmentResponseProps,\n GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ImageSourceFormat, IModel, IModelConnectionProps,\n IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelError, IModelReadRpcInterface, IModelRpcOpenProps, IModelRpcProps,\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\n ModelExtentsProps, ModelProps, NoContentError, RpcInterface, RpcManager, RpcPendingResponse, SnapRequestProps, SnapResponseProps,\n SubCategoryResultRow, SyncMode, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps,\n ViewStoreRpc,\n} from \"@itwin/core-common\";\nimport { Range3dProps } from \"@itwin/core-geometry\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { SpatialCategory } from \"../Category\";\nimport { ConcurrentQuery } from \"../ConcurrentQuery\";\nimport { CustomViewState3dCreator } from \"../CustomViewState3dCreator\";\nimport { generateGeometrySummaries } from \"../GeometrySummary\";\nimport { IModelDb } from \"../IModelDb\";\nimport { DictionaryModel } from \"../Model\";\nimport { PromiseMemoizer } from \"../PromiseMemoizer\";\nimport { RpcTrace } from \"../rpc/tracing\";\nimport { ViewStateHydrator } from \"../ViewStateHydrator\";\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\nimport { _nativeDb } from \"../internal/Symbols\";\n\ninterface ViewStateRequestProps {\n accessToken: AccessToken;\n tokenProps: IModelRpcProps;\n options: CustomViewState3dCreatorOptions;\n}\n\nclass ViewStateRequestMemoizer extends PromiseMemoizer<CustomViewState3dProps> {\n private readonly _timeoutMs: number;\n private static _instance?: ViewStateRequestMemoizer;\n\n public static async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n if (!this._instance)\n this._instance = new ViewStateRequestMemoizer();\n\n return this._instance.perform(props);\n }\n\n private constructor() {\n const memoize = async (props: ViewStateRequestProps) => {\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\n const viewCreator = new CustomViewState3dCreator(db);\n return viewCreator.getCustomViewState3dData(props.options);\n };\n\n const stringify = (props: ViewStateRequestProps) => {\n const token = props.tokenProps;\n const modelIds = props.options.modelIds;\n return `${token.key}-${token.iTwinId}-${token.iModelId}-${token.changeset?.id}:${modelIds}`;\n };\n\n super(memoize, stringify);\n this._timeoutMs = 20 * 1000;\n }\n\n private async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n const memo = this.memoize(props);\n\n // Rejections must be caught so that the memoization entry is deleted.\n await BeDuration.race(this._timeoutMs, memo.promise).catch(() => undefined);\n\n if (memo.isPending)\n throw new RpcPendingResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n\n this.deleteMemoized(props);\n\n if (memo.isFulfilled) {\n assert(undefined !== memo.result);\n return memo.result;\n }\n\n assert(memo.isRejected);\n throw memo.error;\n }\n}\n\nfunction currentActivity() {\n return RpcTrace.expectCurrentActivity;\n}\n\nasync function getIModelForRpc(tokenProps: IModelRpcProps): Promise<IModelDb> {\n return RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\n}\n\n/** The backend implementation of IModelReadRpcInterface.\n * @internal\n */\nexport class IModelReadRpcImpl extends RpcInterface implements IModelReadRpcInterface {\n\n public static register() { RpcManager.registerImpl(IModelReadRpcInterface, IModelReadRpcImpl); }\n\n public async getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps> {\n return RpcBriefcaseUtility.openWithTimeout(currentActivity(), tokenProps, SyncMode.FixedVersion);\n }\n\n public async getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> {\n const accessToken = currentActivity().accessToken;\n return ViewStateRequestMemoizer.perform({ accessToken, tokenProps, options });\n }\n\n public async hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const viewHydrater = new ViewStateHydrator(iModelDb);\n return viewHydrater.getHydrateResponseProps(options);\n }\n\n public async queryAllUsedSpatialSubCategories(tokenProps: IModelRpcProps): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.queryAllUsedSpatialSubCategories();\n }\n\n public async querySubCategories(tokenProps: IModelRpcProps, compressedCategoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const decompressedIds = CompressedId64Set.decompressArray(compressedCategoryIds);\n return iModelDb.querySubCategories(decompressedIds);\n }\n\n public async queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeQueryRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeBlobRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryModelRanges(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<Range3dProps[]> {\n const results = await this.queryModelExtents(tokenProps, modelIds);\n if (results.length === 1 && results[0].status !== IModelStatus.Success)\n throw new IModelError(results[0].status, \"error querying model range\");\n\n return results.filter((x) => x.status === IModelStatus.Success).map((x) => x.extents);\n }\n\n public async queryModelExtents(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<ModelExtentsProps[]> {\n const iModel = await getIModelForRpc(tokenProps);\n return iModel.models.queryExtents(modelIds);\n }\n\n public async getModelProps(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<ModelProps[]> {\n const modelIds = new Set(modelIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const modelJsonArray: ModelProps[] = [];\n for (const id of modelIds) {\n try {\n const modelProps = iModelDb.models.getModelProps(id);\n modelJsonArray.push(modelProps);\n } catch (error) {\n if (modelIds.size === 1)\n throw error; // if they're asking for more than one model, don't throw on error.\n }\n }\n return modelJsonArray;\n }\n\n public async queryModelProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ModelProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n return this.getModelProps(tokenProps, [...ids]);\n }\n\n public async getElementProps(tokenProps: IModelRpcProps, elementIdsList: Id64String[]): Promise<ElementProps[]> {\n const elementIds = new Set(elementIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const elementProps: ElementProps[] = [];\n for (const id of elementIds) {\n try {\n elementProps.push(iModelDb.elements.getElementProps({ id }));\n } catch (error) {\n if (elementIds.size === 1)\n throw error; // if they're asking for more than one element, don't throw on error.\n }\n }\n return elementProps;\n }\n\n public async loadElementProps(tokenProps: IModelRpcProps, identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined> {\n const props: ElementLoadProps = options ? { ...options } : {};\n if (typeof identifier === \"string\") {\n if (Id64.isId64(identifier))\n props.id = identifier;\n else\n props.federationGuid = identifier;\n } else {\n props.code = Code.fromJSON(identifier);\n }\n\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.elements.tryGetElementProps(props);\n }\n\n public async getGeometrySummary(tokenProps: IModelRpcProps, request: GeometrySummaryRequestProps): Promise<string> {\n const iModel = await getIModelForRpc(tokenProps);\n return generateGeometrySummaries(request, iModel);\n }\n\n public async queryElementProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ElementProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n const res = this.getElementProps(tokenProps, [...ids]);\n return res;\n }\n\n public async queryEntityIds(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<Id64String[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const res = iModelDb.queryEntityIds(params);\n return [...res];\n }\n\n public async getClassHierarchy(tokenProps: IModelRpcProps, classFullName: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const classArray: string[] = [];\n while (true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const classMetaData: EntityMetaData = iModelDb.getMetaData(classFullName);\n classArray.push(classFullName);\n if (!classMetaData.baseClasses || classMetaData.baseClasses.length === 0)\n break;\n\n classFullName = classMetaData.baseClasses[0];\n }\n return classArray;\n }\n\n public async getAllCodeSpecs(tokenProps: IModelRpcProps): Promise<any[]> {\n const codeSpecs: any[] = [];\n const iModelDb = await getIModelForRpc(tokenProps);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iModelDb.withPreparedStatement(\"SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec\", (statement) => {\n for (const row of statement)\n codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });\n });\n return codeSpecs;\n }\n\n public async getViewStateData(tokenProps: IModelRpcProps, viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.views.getViewStateProps(viewDefinitionId, options);\n }\n\n public async readFontJson(tokenProps: IModelRpcProps): Promise<FontMapProps> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb[_nativeDb].readFontMap();\n }\n\n public async requestSnap(tokenProps: IModelRpcProps, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.requestSnap(sessionId, props);\n }\n\n public async cancelSnap(tokenProps: IModelRpcProps, sessionId: string): Promise<void> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.cancelSnap(sessionId);\n }\n\n public async getGeometryContainment(tokenProps: IModelRpcProps, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeometryContainment(props);\n }\n\n public async getMassProperties(tokenProps: IModelRpcProps, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getMassProperties(props);\n }\n\n public async getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n\n const getSingleCandidateMassProperties = async (candidate: string) => {\n try {\n const massPropResults: MassPropertiesResponseProps[] = [];\n\n for (const op of props.operations) {\n const massProperties = await iModelDb.getMassProperties({ operation: op, candidates: [candidate] });\n massPropResults.push(massProperties);\n }\n\n let singleCandidateResult: MassPropertiesPerCandidateResponseProps = { status: BentleyStatus.ERROR, candidate }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n if (massPropResults.some((r) => r.status !== BentleyStatus.ERROR)) {\n singleCandidateResult.status = BentleyStatus.SUCCESS;\n for (const r of massPropResults.filter((mpr) => mpr.status !== BentleyStatus.ERROR)) {\n singleCandidateResult = { ...singleCandidateResult, ...r };\n }\n }\n\n return singleCandidateResult;\n } catch {\n return { status: BentleyStatus.ERROR, candidate };\n }\n };\n\n const promises: Promise<MassPropertiesPerCandidateResponseProps>[] = []; // eslint-disable-line @typescript-eslint/no-deprecated\n\n for (const candidate of CompressedId64Set.iterable(props.candidates)) {\n promises.push(getSingleCandidateMassProperties(candidate));\n }\n\n return Promise.all(promises);\n }\n\n public async getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const el = iModelDb.elements.getElement(id);\n return (el === undefined) ? [] : el.getToolTipMessage();\n }\n\n /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.\n * @deprecated in 3.x - might be removed in next major version. Use queryViewThumbnail instead\n */\n public async getViewThumbnail(tokenProps: IModelRpcProps, viewId: string): Promise<Uint8Array> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const thumbnail = iModelDb.views.getThumbnail(viewId);\n if (undefined === thumbnail || 0 === thumbnail.image.length)\n throw new NoContentError();\n\n const val = new Uint8Array(thumbnail.image.length + 16); // allocate a new buffer 16 bytes larger than the image size\n new Uint32Array(val.buffer, 0, 4).set([thumbnail.image.length, thumbnail.format === \"jpeg\" ? ImageSourceFormat.Jpeg : ImageSourceFormat.Png, thumbnail.width, thumbnail.height]); // Put the metadata in the first 16 bytes.\n val.set(thumbnail.image, 16); // put the image data at offset 16 after metadata\n return val;\n }\n\n public async getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const spec = { namespace: \"dgn_View\", name: \"DefaultView\" };\n const blob = iModelDb.queryFilePropertyBlob(spec);\n if (undefined === blob || 8 !== blob.length)\n return Id64.invalid;\n\n const view = new Uint32Array(blob.buffer);\n return Id64.fromUint32Pair(view[0], view[1]);\n }\n public async getSpatialCategoryId(tokenProps: IModelRpcProps, categoryName: string): Promise<Id64String | undefined> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const dictionary: DictionaryModel = iModelDb.models.getModel<DictionaryModel>(IModel.dictionaryId);\n return SpatialCategory.queryCategoryIdByName(iModelDb, dictionary.id, categoryName);\n }\n\n public async getIModelCoordinatesFromGeoCoordinates(tokenProps: IModelRpcProps, props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getIModelCoordinatesFromGeoCoordinates(props);\n }\n\n public async getGeoCoordinatesFromIModelCoordinates(tokenProps: IModelRpcProps, props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeoCoordinatesFromIModelCoordinates(props);\n }\n\n public async queryTextureData(tokenProps: IModelRpcProps, textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> {\n const db = await getIModelForRpc(tokenProps);\n return db.queryTextureData(textureLoadProps);\n }\n\n public async generateElementMeshes(tokenProps: IModelRpcProps, props: ElementMeshRequestProps): Promise<Uint8Array> {\n const db = await getIModelForRpc(tokenProps);\n return db[_nativeDb].generateElementMeshes(props);\n }\n\n /** @internal */\n public async callViewStore(tokenProps: IModelRpcProps, version: string, forWrite: boolean, methodName: string, ...args: any[]): Promise<any> {\n if (!RpcInterface.isVersionCompatible(ViewStoreRpc.version, version))\n throw new Error(\"ViewStoreRpc version mismatch\");\n\n const db = await getIModelForRpc(tokenProps);\n const viewStore = await db.views.accessViewStore({ accessLevel: forWrite ? \"write\" : \"read\" });\n const access = viewStore[forWrite ? \"writeLocker\" : \"reader\"] as any;\n\n const func = access[methodName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Illegal ViewStore RPC call \"${methodName}\"`);\n\n return func.call(access, ...args);\n }\n}\n"]}