graphdb-workbench 3.1.0-plugins1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/dist/12396.57f64bf7792ded4df148.bundle.js +2 -0
  2. package/dist/12396.57f64bf7792ded4df148.bundle.js.map +1 -0
  3. package/dist/15535.0a0251ba8c0b8b0b6cb6.bundle.js +2 -0
  4. package/dist/15535.0a0251ba8c0b8b0b6cb6.bundle.js.map +1 -0
  5. package/dist/16162.d15f619029495fed0ebc.bundle.js +2 -0
  6. package/dist/16162.d15f619029495fed0ebc.bundle.js.map +1 -0
  7. package/dist/20287.13f1a4df41ad3296ab89.bundle.js +2 -0
  8. package/dist/20287.13f1a4df41ad3296ab89.bundle.js.map +1 -0
  9. package/dist/21136.adcc7971979bb3309fb7.bundle.js +2 -0
  10. package/dist/21136.adcc7971979bb3309fb7.bundle.js.map +1 -0
  11. package/dist/21142.fa7d154aab4e4196ee15.bundle.js +2 -0
  12. package/dist/21142.fa7d154aab4e4196ee15.bundle.js.map +1 -0
  13. package/dist/21170.6a2e80c18e5aed5ec9be.bundle.js +2 -0
  14. package/dist/21170.6a2e80c18e5aed5ec9be.bundle.js.map +1 -0
  15. package/dist/21195.a6350a0800bde37d7389.bundle.js +2 -0
  16. package/dist/21195.a6350a0800bde37d7389.bundle.js.map +1 -0
  17. package/dist/25747.7a1ce8b2a54302f76b8f.bundle.js +2 -0
  18. package/dist/25747.7a1ce8b2a54302f76b8f.bundle.js.map +1 -0
  19. package/dist/27580.b71e95a28c3236448d85.bundle.js +2 -0
  20. package/dist/27580.b71e95a28c3236448d85.bundle.js.map +1 -0
  21. package/dist/31636.b0a799a7e9bf7b696c34.bundle.js +2 -0
  22. package/dist/31636.b0a799a7e9bf7b696c34.bundle.js.map +1 -0
  23. package/dist/32489.122d2fd323715b577189.bundle.js +2 -0
  24. package/dist/32489.122d2fd323715b577189.bundle.js.map +1 -0
  25. package/dist/34495.b5ed397332326a82fd84.bundle.js +2 -0
  26. package/dist/34495.b5ed397332326a82fd84.bundle.js.map +1 -0
  27. package/dist/38360.b15a558bfdc163b18398.bundle.js +2 -0
  28. package/dist/38360.b15a558bfdc163b18398.bundle.js.map +1 -0
  29. package/dist/38644.f5f755c7f868cfc5effc.bundle.js +2 -0
  30. package/dist/38644.f5f755c7f868cfc5effc.bundle.js.map +1 -0
  31. package/dist/38843.d7163009549d1f943a67.bundle.js +2 -0
  32. package/dist/38843.d7163009549d1f943a67.bundle.js.map +1 -0
  33. package/dist/39518.29d190e9d568dd15290c.bundle.js +2 -0
  34. package/dist/{39518.2605c04e1ba20af1e766.bundle.js.map → 39518.29d190e9d568dd15290c.bundle.js.map} +1 -1
  35. package/dist/39539.0bfad98c902596627e0c.bundle.js +2 -0
  36. package/dist/39539.0bfad98c902596627e0c.bundle.js.map +1 -0
  37. package/dist/{39874.ff5df6ccfc5d259d1240.bundle.js → 39874.ff510b958fcdbda4db58.bundle.js} +2 -2
  38. package/dist/39874.ff510b958fcdbda4db58.bundle.js.map +1 -0
  39. package/dist/41453.17a934b7470fd3500438.bundle.js +2 -0
  40. package/dist/41453.17a934b7470fd3500438.bundle.js.map +1 -0
  41. package/dist/42129.eb3c9840a263b0286076.bundle.js +2 -0
  42. package/dist/42129.eb3c9840a263b0286076.bundle.js.map +1 -0
  43. package/dist/44444.acf9527ea60a79fca57b.bundle.js +2 -0
  44. package/dist/44444.acf9527ea60a79fca57b.bundle.js.map +1 -0
  45. package/dist/55862.f96ae9585367b909cd91.bundle.js +2 -0
  46. package/dist/55862.f96ae9585367b909cd91.bundle.js.map +1 -0
  47. package/dist/58306.3d83e88616c1b0379c08.bundle.js +2 -0
  48. package/dist/58306.3d83e88616c1b0379c08.bundle.js.map +1 -0
  49. package/dist/67888.d4776e4b949a918c8576.bundle.js +2 -0
  50. package/dist/67888.d4776e4b949a918c8576.bundle.js.map +1 -0
  51. package/dist/72379.1731e737a91d189d6863.bundle.js +2 -0
  52. package/dist/72379.1731e737a91d189d6863.bundle.js.map +1 -0
  53. package/dist/73667.1cd2d5550d194fddb0ab.bundle.js +2 -0
  54. package/dist/73667.1cd2d5550d194fddb0ab.bundle.js.map +1 -0
  55. package/dist/73793.7b2e0da4c9137686c453.bundle.js +2 -0
  56. package/dist/73793.7b2e0da4c9137686c453.bundle.js.map +1 -0
  57. package/dist/75282.576fc3518f443c2a051d.bundle.js +2 -0
  58. package/dist/75282.576fc3518f443c2a051d.bundle.js.map +1 -0
  59. package/dist/75849.cddbdec32788ebfc4e52.bundle.js +2 -0
  60. package/dist/75849.cddbdec32788ebfc4e52.bundle.js.map +1 -0
  61. package/dist/78250.6cdf5272a8757c6ad08f.bundle.js +2 -0
  62. package/dist/78250.6cdf5272a8757c6ad08f.bundle.js.map +1 -0
  63. package/dist/79329.60e3d03195b6f5170a93.bundle.js +2 -0
  64. package/dist/79329.60e3d03195b6f5170a93.bundle.js.map +1 -0
  65. package/dist/{82926.eb6e5cdaa7f6f0a8d160.bundle.js → 82926.9807edeb09281b4bef7a.bundle.js} +2 -2
  66. package/dist/{82926.eb6e5cdaa7f6f0a8d160.bundle.js.map → 82926.9807edeb09281b4bef7a.bundle.js.map} +1 -1
  67. package/dist/9062.fe7bedf8616d6bb62120.bundle.js +2 -0
  68. package/dist/9062.fe7bedf8616d6bb62120.bundle.js.map +1 -0
  69. package/dist/99448.259dc03b85ced908b67f.bundle.js +2 -0
  70. package/dist/99448.259dc03b85ced908b67f.bundle.js.map +1 -0
  71. package/dist/api/interceptor/auth/unauthorized-interceptor.d.ts +5 -0
  72. package/dist/api/models/plugin-registry/plugin-registry.d.ts +5 -0
  73. package/dist/api/ontotext-workbench-api.d.ts +0 -2
  74. package/dist/api/ontotext-workbench-api.js +1 -1
  75. package/dist/api/ontotext-workbench-api.js.map +1 -1
  76. package/dist/api/services/utils/routing-utils.d.ts +0 -6
  77. package/dist/api/services/window/window.service.d.ts +0 -2
  78. package/dist/index.html +8 -8
  79. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  80. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  81. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  82. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  83. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  84. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  85. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  86. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  87. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  88. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  89. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  90. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  91. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  92. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  93. package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
  94. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  95. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  96. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  97. package/dist/js/angular/security/templates/user.html +2 -2
  98. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  99. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  100. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  101. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  102. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  103. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  104. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
  105. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  106. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  107. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  108. package/dist/legacyWorkbench.fac3f92836d2be7e94fd.js +3 -0
  109. package/dist/{legacyWorkbench.396c3ad569fdb055b184.js.map → legacyWorkbench.fac3f92836d2be7e94fd.js.map} +1 -1
  110. package/dist/{main.efd2ba99bb5c64dcd211.js → main.fa0b99f721588e894d1d.js} +3 -3
  111. package/dist/main.fa0b99f721588e894d1d.js.map +1 -0
  112. package/dist/pages/aclmanagement.html +2 -2
  113. package/dist/pages/autocomplete.html +1 -1
  114. package/dist/pages/choose-repository-type.html +1 -1
  115. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  116. package/dist/pages/create-index.html +1 -1
  117. package/dist/pages/dependencies.html +1 -1
  118. package/dist/pages/domainRangeInfo.html +2 -2
  119. package/dist/pages/edit.html +1 -1
  120. package/dist/pages/explore.html +1 -1
  121. package/dist/pages/export.html +1 -1
  122. package/dist/pages/find.html +1 -1
  123. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  124. package/dist/pages/graphs-visualizations.html +7 -7
  125. package/dist/pages/guides.html +1 -1
  126. package/dist/pages/import.html +2 -2
  127. package/dist/pages/jdbc-create.html +1 -1
  128. package/dist/pages/login.html +1 -1
  129. package/dist/pages/monitor/backup-and-restore.html +1 -1
  130. package/dist/pages/monitor/queries.html +1 -1
  131. package/dist/pages/monitor/resources.html +1 -1
  132. package/dist/pages/namespaces.html +2 -2
  133. package/dist/pages/plugins.html +1 -1
  134. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  135. package/dist/pages/rdfrank.html +2 -2
  136. package/dist/pages/repositories.html +1 -1
  137. package/dist/pages/repository.html +1 -1
  138. package/dist/pages/similarity-indexes.html +1 -1
  139. package/dist/pages/sparql-editor.html +1 -1
  140. package/dist/pages/sparql-template-create.html +1 -1
  141. package/dist/pages/ux-test1.html +2 -2
  142. package/dist/pages/webapi.html +2 -2
  143. package/dist/res/swagger5/index.html +11 -11
  144. package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
  145. package/dist/shared-components/cjs/onto-layout.cjs.entry.js.map +1 -1
  146. package/dist/shared-components/cjs/onto-layout.entry.cjs.js.map +1 -1
  147. package/dist/shared-components/collection/components/onto-layout/onto-layout.js +1 -1
  148. package/dist/shared-components/collection/components/onto-layout/onto-layout.js.map +1 -1
  149. package/dist/shared-components/collection/models/plugin/plugin-registry.js.map +1 -1
  150. package/dist/shared-components/esm/onto-layout.entry.js +1 -1
  151. package/dist/shared-components/esm/onto-layout.entry.js.map +1 -1
  152. package/dist/shared-components/shared-components/onto-layout.entry.esm.js.map +1 -1
  153. package/dist/shared-components/shared-components/{p-41ce23b3.entry.js → p-504c7e8e.entry.js} +1 -1
  154. package/dist/shared-components/shared-components/p-504c7e8e.entry.js.map +1 -0
  155. package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
  156. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/services/utils/routing-utils.d.ts +0 -6
  157. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/services/window/window.service.d.ts +0 -2
  158. package/dist/shared-components/types/models/plugin/plugin-registry.d.ts +2 -2
  159. package/package.json +1 -3
  160. package/dist/12396.5583bf0708a92ff0e683.bundle.js +0 -2
  161. package/dist/12396.5583bf0708a92ff0e683.bundle.js.map +0 -1
  162. package/dist/15535.be611e4b93264c1d24e8.bundle.js +0 -2
  163. package/dist/15535.be611e4b93264c1d24e8.bundle.js.map +0 -1
  164. package/dist/16162.d174e462d078895c1896.bundle.js +0 -2
  165. package/dist/16162.d174e462d078895c1896.bundle.js.map +0 -1
  166. package/dist/20287.09c57798d8e85984d5a3.bundle.js +0 -2
  167. package/dist/20287.09c57798d8e85984d5a3.bundle.js.map +0 -1
  168. package/dist/21136.55652782e1ad6e7e8fd3.bundle.js +0 -2
  169. package/dist/21136.55652782e1ad6e7e8fd3.bundle.js.map +0 -1
  170. package/dist/21142.71b4556e696319905885.bundle.js +0 -2
  171. package/dist/21142.71b4556e696319905885.bundle.js.map +0 -1
  172. package/dist/21170.f496748eb5930ce64a71.bundle.js +0 -2
  173. package/dist/21170.f496748eb5930ce64a71.bundle.js.map +0 -1
  174. package/dist/21195.cebee32f37e2b84e5a62.bundle.js +0 -2
  175. package/dist/21195.cebee32f37e2b84e5a62.bundle.js.map +0 -1
  176. package/dist/25747.c0d4b2b740ad31088095.bundle.js +0 -2
  177. package/dist/25747.c0d4b2b740ad31088095.bundle.js.map +0 -1
  178. package/dist/27580.d4a4a6121bba7b503ef7.bundle.js +0 -2
  179. package/dist/27580.d4a4a6121bba7b503ef7.bundle.js.map +0 -1
  180. package/dist/31636.3a2363f0362edf12812b.bundle.js +0 -2
  181. package/dist/31636.3a2363f0362edf12812b.bundle.js.map +0 -1
  182. package/dist/32489.b29a602924b6adeb19db.bundle.js +0 -2
  183. package/dist/32489.b29a602924b6adeb19db.bundle.js.map +0 -1
  184. package/dist/34495.2865eac2251c70cfe1fb.bundle.js +0 -2
  185. package/dist/34495.2865eac2251c70cfe1fb.bundle.js.map +0 -1
  186. package/dist/38360.6a3ab93f70c6bd1cb6fc.bundle.js +0 -2
  187. package/dist/38360.6a3ab93f70c6bd1cb6fc.bundle.js.map +0 -1
  188. package/dist/38644.4908c19613deb1a7bd17.bundle.js +0 -2
  189. package/dist/38644.4908c19613deb1a7bd17.bundle.js.map +0 -1
  190. package/dist/38843.71a4e2af27ca0e134064.bundle.js +0 -2
  191. package/dist/38843.71a4e2af27ca0e134064.bundle.js.map +0 -1
  192. package/dist/39518.2605c04e1ba20af1e766.bundle.js +0 -2
  193. package/dist/39539.9c20ba448ed347994d6f.bundle.js +0 -2
  194. package/dist/39539.9c20ba448ed347994d6f.bundle.js.map +0 -1
  195. package/dist/39874.ff5df6ccfc5d259d1240.bundle.js.map +0 -1
  196. package/dist/41453.6dca834f576930cb7daf.bundle.js +0 -2
  197. package/dist/41453.6dca834f576930cb7daf.bundle.js.map +0 -1
  198. package/dist/42129.114af0f72f3c4e004362.bundle.js +0 -2
  199. package/dist/42129.114af0f72f3c4e004362.bundle.js.map +0 -1
  200. package/dist/44444.6d6c183b8860926309cf.bundle.js +0 -2
  201. package/dist/44444.6d6c183b8860926309cf.bundle.js.map +0 -1
  202. package/dist/55862.36b699a56e4ab6279a4f.bundle.js +0 -2
  203. package/dist/55862.36b699a56e4ab6279a4f.bundle.js.map +0 -1
  204. package/dist/58306.595da068a2e0da617617.bundle.js +0 -2
  205. package/dist/58306.595da068a2e0da617617.bundle.js.map +0 -1
  206. package/dist/67888.ab6c39a55ee809c3ae8f.bundle.js +0 -2
  207. package/dist/67888.ab6c39a55ee809c3ae8f.bundle.js.map +0 -1
  208. package/dist/72379.c57365211e08b3bc6262.bundle.js +0 -2
  209. package/dist/72379.c57365211e08b3bc6262.bundle.js.map +0 -1
  210. package/dist/73667.0bfec02355b09d7ce4ab.bundle.js +0 -2
  211. package/dist/73667.0bfec02355b09d7ce4ab.bundle.js.map +0 -1
  212. package/dist/73793.af234af46241a49cb9dd.bundle.js +0 -2
  213. package/dist/73793.af234af46241a49cb9dd.bundle.js.map +0 -1
  214. package/dist/75282.250017012e14de4ea44c.bundle.js +0 -2
  215. package/dist/75282.250017012e14de4ea44c.bundle.js.map +0 -1
  216. package/dist/75849.792b3f20173c7836455a.bundle.js +0 -2
  217. package/dist/75849.792b3f20173c7836455a.bundle.js.map +0 -1
  218. package/dist/78250.ff5259a959fee01ec205.bundle.js +0 -2
  219. package/dist/78250.ff5259a959fee01ec205.bundle.js.map +0 -1
  220. package/dist/79329.cb5661017d457ff28f48.bundle.js +0 -2
  221. package/dist/79329.cb5661017d457ff28f48.bundle.js.map +0 -1
  222. package/dist/9062.9e15930c2d766483e7f3.bundle.js +0 -2
  223. package/dist/9062.9e15930c2d766483e7f3.bundle.js.map +0 -1
  224. package/dist/99448.bf1feaa3382f8d429277.bundle.js +0 -2
  225. package/dist/99448.bf1feaa3382f8d429277.bundle.js.map +0 -1
  226. package/dist/api/models/plugins/index.d.ts +0 -7
  227. package/dist/api/models/plugins/plugin-definition-list.d.ts +0 -5
  228. package/dist/api/models/plugins/plugin-definition.d.ts +0 -7
  229. package/dist/api/models/plugins/plugin-module.d.ts +0 -7
  230. package/dist/api/models/plugins/plugin-registry.d.ts +0 -9
  231. package/dist/api/models/plugins/plugins-manifest-response.d.ts +0 -6
  232. package/dist/api/models/plugins/plugins-manifest.d.ts +0 -7
  233. package/dist/api/services/plugins/index.d.ts +0 -2
  234. package/dist/api/services/plugins/mapper/plugins-manifest.mapper.d.ts +0 -12
  235. package/dist/api/services/plugins/plugins-rest.service.d.ts +0 -23
  236. package/dist/api/services/plugins/plugins.service.d.ts +0 -29
  237. package/dist/api/services/plugins/test/plugins.service.spec.d.ts +0 -1
  238. package/dist/legacyWorkbench.396c3ad569fdb055b184.js +0 -3
  239. package/dist/main.efd2ba99bb5c64dcd211.js.map +0 -1
  240. package/dist/plugins/guides/core-steps-plugin.js +0 -1
  241. package/dist/plugins/plugins-manifest.json +0 -16
  242. package/dist/plugins/tools/alert-tool-plugin.js +0 -1
  243. package/dist/plugins/tools/console-tool-plugin.js +0 -1
  244. package/dist/shared-components/shared-components/p-41ce23b3.entry.js.map +0 -1
  245. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/extension-point.d.ts +0 -4
  246. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/index.d.ts +0 -7
  247. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/plugin-definition-list.d.ts +0 -5
  248. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/plugin-definition.d.ts +0 -7
  249. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/plugin-module.d.ts +0 -7
  250. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/plugin-registry.d.ts +0 -9
  251. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/plugins-manifest-response.d.ts +0 -6
  252. package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/models/plugins/plugins-manifest.d.ts +0 -7
  253. /package/dist/api/models/{plugins → plugin-registry}/extension-point.d.ts +0 -0
  254. /package/dist/{legacyWorkbench.396c3ad569fdb055b184.js.LICENSE.txt → legacyWorkbench.fac3f92836d2be7e94fd.js.LICENSE.txt} +0 -0
  255. /package/dist/{main.efd2ba99bb5c64dcd211.js.LICENSE.txt → main.fa0b99f721588e894d1d.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"79329.60e3d03195b6f5170a93.bundle.js","mappings":"uJAOA,QANW,8wxB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/modal/agent-settings-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/agent-settings-modal.css?v=3.1.0\" rel=\"stylesheet\"/> <link href=\"css/lib/ng-tags-input/ng-tags-input.min.css?v=3.1.0\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" ng-click=\"close()\"></button> <h4 class=\"modal-title\">{{( operation === AGENT_OPERATION.EDIT ? 'ttyg.agent.create_agent_modal.title.edit ' : operation === AGENT_OPERATION.CLONE ? 'ttyg.agent.create_agent_modal.title.clone' : 'ttyg.agent.create_agent_modal.title.create') | translate}}</h4> </div> <div class=\"modal-body\"> <form novalidate name=\"agentSettingsForm\" id=\"agentSettingsForm\" class=\"agent-settings-form\" guide-selector=\"agent-form\"> <div class=\"form-group agent-name-label\"> <label for=\"name\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.agent_name.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.agent_name.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"name\" name=\"name\" ng-model=\"agentFormModel.name\" required autocomplete=\"off\" guide-selector=\"agent-name\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.agent_name.placeholder' | translate}}\"> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.name.\\$touched && agentSettingsForm.name.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div> <button class=\"external-config-btn\" ng-click=\"openExternalIntegrationConfig()\" ng-if=\"operation !== AGENT_OPERATION.CREATE\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.external_config.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <i class=\"fa-regular fa-plug-circle-plus\"></i> {{'ttyg.agent.create_agent_modal.form.external_config.label' | translate}} </button> </div> <div class=\"form-group repository-id\"> <label for=\"repositoryId\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.repository.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.repository.label' | translate}}</label> <select class=\"form-control\" id=\"repositoryId\" name=\"repositoryId\" ng-model=\"agentFormModel.repositoryId\" required ng-change=\"onRepositoryChange()\" guide-selector=\"repository-id\" ng-options=\"repository.value as repository.label for repository in activeRepositoryList\"> </select> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.repositoryId.\\$touched && agentSettingsForm.repositoryId.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-row clearfix\"> <div class=\"form-group llm-model\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\"> <label for=\"model\">{{'ttyg.agent.create_agent_modal.form.model.label' | translate}}</label> <help-info-popover help-info=\"helpInfoForModel\"></help-info-popover> <input type=\"text\" class=\"form-control\" id=\"model\" name=\"model\" ng-model=\"agentFormModel.model\" guide-selector=\"model\" required autocomplete=\"off\"> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.model.\\$touched && agentSettingsForm.model.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div ng-if=\"showContextSize\" class=\"form-group context-size col-md-3\"> <div class=\"context-size-wrapper\"> <label for=\"contextSize\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.context_size.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.context_size.label' | translate}}</span> </label> <button type=\"button\" class=\"btn btn-link btn-sm reset-context-size-btn\" ng-click=\"onRestoreDefaultContextSize()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.context_size.restore_default_btn.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> <div class=\"input-with-unit\"> <input type=\"number\" id=\"contextSize\" name=\"contextSize\" class=\"form-control\" min=\"1\" ng-model=\"agentFormModel.contextSize\" required autocomplete=\"off\"> <span class=\"token-unit-label\"> {{'ttyg.agent.create_agent_modal.form.context_size.field_addon' | translate}} </span> </div> </div> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.contextSize.\\$touched && agentSettingsForm.contextSize.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group temperature\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\" guide-selector=\"temperature-control\"> <label for=\"temperature\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.temperature.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.temperature.label' | translate}}</span> <i class=\"fa fa-triangle-exclamation text-warning high-temperature-warning\" ng-if=\"showHighTemperatureWarning\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.temperature.high_temperature_warning' | translate}}\" popover-trigger=\"mouseenter\"></i> </label> <input type=\"text\" id=\"temperature\" name=\"temperature\" readonly=\"readonly\" class=\"form-control\" ng-class=\"{'has-warning': showHighTemperatureWarning}\" ng-model=\"agentFormModel.temperature.value\"> <input id=\"temperatureSlider\" name=\"temperature\" type=\"range\" guide-selector=\"temperature-control-input\" min=\"{{agentFormModel.temperature.minValue}}\" max=\"{{agentFormModel.temperature.maxValue}}\" step=\"{{agentFormModel.temperature.step}}\" ng-change=\"onTemperatureChange()\" ng-model=\"agentFormModel.temperature.value\"/> </div> <div class=\"form-group top-p\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\" guide-selector=\"top-p-control\"> <label for=\"topP\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.top_p.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.top_p.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"topP\" name=\"topP\" readonly=\"readonly\" ng-model=\"agentFormModel.topP.value\"> <input id=\"topPSlider\" name=\"topP\" type=\"range\" min=\"{{agentFormModel.topP.minValue}}\" guide-selector=\"top-p-control-input\" max=\"{{agentFormModel.topP.maxValue}}\" step=\"{{agentFormModel.topP.step}}\" ng-model=\"agentFormModel.topP.value\"/> </div> </div> <div class=\"form-group extraction-methods-group\"> <label for=\"extractionMethods\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.extraction_method.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.extraction_method.label' | translate}}</label> <div id=\"extractionMethods\" name=\"extractionMethods\" ng-model=\"agentFormModel.assistantExtractionMethods.extractionMethods\" required class=\"accordion extraction-methods\" ng-class=\"{'has-error': agentSettingsForm.extractionMethods.\\$touched && agentSettingsForm.extractionMethods.\\$invalid}\"> <div ng-repeat=\"extractionMethod in agentFormModel.assistantExtractionMethods.extractionMethods\" class=\"extraction-method\"> <div id=\"{{extractionMethod.method + '_method_heading'}}\" class=\"extraction-method-heading\" ng-class=\"{'selected': extractionMethod.selected}\" guide-selector=\"query-method-{{extractionMethod.method}}\"> <div class=\"mr-0 extraction-method-toggle\"> <input type=\"checkbox\" id=\"{{extractionMethod.method + '_checkbox'}}\" guide-selector=\"query-method-{{extractionMethod.method}}-input\" name=\"{{extractionMethod.method}}\" class=\"switch\" ng-click=\"toggleExtractionMethod(extractionMethod, \\$event)\" ng-model=\"extractionMethod.selected\"/> <label for=\"{{extractionMethod.method + '_checkbox'}}\"></label> </div> <a class=\"btn btn-link panel-toggle-link\" aria-expanded=\"false\" aria-controls=\"{{extractionMethod.method + '_method_content'}}\" ng-click=\"onExtractionMethodPanelToggle(extractionMethod)\"> <span class=\"mr-1\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.' + extractionMethod.method + '.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.' + extractionMethod.method + '.label' | translate}}</span> <i class=\"fa fa-chevron-down toggle-icon\" ng-class=\"{'expanded': extractionMethod.expanded}\"> </i> </a> </div> <div id=\"{{extractionMethod.method + '_method_content'}}\" class=\"show extraction-method-content\" aria-labelledby=\"{{extractionMethod.method + '_method_heading'}}\" data-parent=\"#extractionMethods\"> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.SPARQL\" class=\"extraction-method-options\" ng-class=\"{'has-error': extractionMethod.selected && !extractionMethod.sparqlOption}\"> <div class=\"sparql-option ontology-graph-option\" guide-selector=\"sparql-ontology-graph-option\"> <label class=\"radio-inline\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.ontology_graph.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <input type=\"radio\" name=\"sparqlOption\" ng-required=\"extractionMethod.selected\" guide-selector=\"sparql-ontology-graph-option-input\" ng-model=\"extractionMethod.sparqlOption\" value=\"ontologyGraph\"> {{'ttyg.agent.create_agent_modal.form.ontology_graph.label' | translate}} </label> <div class=\"panel\" ng-show=\"extractionMethod.sparqlOption === 'ontologyGraph'\"> <div class=\"form-group\"> <input type=\"text\" class=\"form-control\" id=\"ontologyGraph\" guide-selector=\"sparql-ontology-graph-input\" name=\"ontologyGraph\" ng-required=\"extractionMethod.selected && extractionMethod.sparqlOption === 'ontologyGraph'\" ng-model=\"extractionMethod.ontologyGraph\"> </div> </div> </div> <div class=\"sparql-option sparql-query-option\" guide-selector=\"sparql-query-option\"> <label class=\"radio-inline\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.construct_query.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <input type=\"radio\" name=\"sparqlOption\" ng-required=\"extractionMethod.selected\" guide-selector=\"sparql-query-option-input\" ng-model=\"extractionMethod.sparqlOption\" value=\"sparqlQuery\"> {{'ttyg.agent.create_agent_modal.form.construct_query.label' | translate}} </label> <div class=\"panel\" ng-show=\"extractionMethod.sparqlOption === 'sparqlQuery'\"> <div class=\"form-group\"> <textarea type=\"text\" class=\"form-control\" id=\"sparqlQuery\" guide-selector=\"sparql-query-input\" name=\"sparqlQuery\" rows=\"10\" ng-required=\"extractionMethod.selected && extractionMethod.sparqlOption === 'sparqlQuery'\" ng-minlength=\"extractionMethod.sparqlQuery.minLength\" ng-maxlength=\"extractionMethod.sparqlQuery.maxLength\" ng-model=\"extractionMethod.sparqlQuery.value\">\n </textarea> </div> </div> </div> <div class=\"alert alert-danger sparql-method-option-required-error mb-0\" ng-if=\"extractionMethod.selected && !extractionMethod.sparqlOption\"> {{'ttyg.agent.create_agent_modal.form.sparql_search.required_option' | translate}} </div> <div class=\"add-missing-namespaces-option mt-1\" guide-selector=\"add-missing-namespaces-option\"> <input id=\"addMissingNamespaces\" name=\"addMissingNamespaces\" type=\"checkbox\" guide-selector=\"add-missing-namespaces-input\" ng-model=\"extractionMethod.addMissingNamespaces\"> <label for=\"addMissingNamespaces\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.add_missing_namespaces.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{ 'ttyg.agent.create_agent_modal.form.add_missing_namespaces.label' | translate }}</label> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.FTS_SEARCH\" ng-class=\"{'has-error': agentSettingsForm.\\$error.FTSDisabled || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"checkIfFTSEnabled()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.fts_search.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"!ftsEnabled && agentFormModel.repositoryId\" class=\"fts-disabled-message\" ng-bind-html=\"getFTSDisabledHelpMessage()\"> </div> <div class=\"form-group max-triples\" ng-show=\"ftsEnabled && agentFormModel.repositoryId\"> <label for=\"{{extractionMethods.FTS_SEARCH + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.label' | translate}} </label> <input type=\"number\" class=\"form-control\" guide-selector=\"max-triples-per-call-input\" id=\"{{extractionMethods.FTS_SEARCH + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.SIMILARITY\" ng-class=\"{'has-error': agentSettingsForm.\\$error.missingIndex || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"updateSimilaritySearchPanel()\" ng-disabled=\"disabled\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.similarity_index.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"agentFormModel.repositoryId && !similarityIndexes.length\" class=\"no-similarity-index-message\"> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_1' | translate}} <a href=\"\" ng-click=\"goToCreateSimilarityView(\\$event)\"> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_2' | translate}} </a> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_3' | translate}}. </div> <div ng-show=\"similarityIndexes.length\"> <div class=\"form-group similarity-index\"> <label for=\"similarityIndex\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_index.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.similarity_index.label' | translate}}</label> <span ng-if=\"extractionMethodLoaderFlags.similarity_search\" onto-loader-fancy size=\"16\"></span> <select class=\"form-control\" id=\"similarityIndex\" name=\"similarityIndex\" guide-selector=\"similarity-index-select\" ng-required=\"extractionMethod.selected\" ng-if=\"!extractionMethodLoaderFlags.similarity_search\" ng-model=\"extractionMethod.similarityIndex\" ng-options=\"similarityIndex.value as similarityIndex.label for similarityIndex in similarityIndexes\"> </select> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.similarityIndex.\\$touched && extractionMethod.similarityIndex.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group similarity-index-threshold\"> <label for=\"similarityIndexThreshold\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_threshold.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.similarity_threshold.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"similarityIndexThreshold\" name=\"similarityIndexThreshold\" readonly=\"readonly\" ng-model=\"extractionMethod.similarityIndexThreshold.value\"> <input id=\"similarityIndexThresholdSlider\" name=\"similarityIndexThreshold\" type=\"range\" ng-required=\"extractionMethod.selected\" min=\"{{extractionMethod.similarityIndexThreshold.minValue}}\" max=\"{{extractionMethod.similarityIndexThreshold.maxValue}}\" step=\"0.1\" ng-model=\"extractionMethod.similarityIndexThreshold.value\"/> </div> <div class=\"form-group similarity-max-triples\"> <label for=\"{{extractionMethods.SIMILARITY + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.label' | translate}}</label> <input type=\"number\" class=\"form-control\" id=\"{{extractionMethods.SIMILARITY + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.RETRIEVAL\" ng-class=\"{'has-error': agentSettingsForm.\\$error.missingConnector || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"updateRetrievalConnectorPanel()\" ng-disabled=\"disabled\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"agentFormModel.repositoryId && !retrievalConnectors.length\" class=\"no-retrieval-connector-message\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_1' | translate}} <a href=\"\" ng-click=\"goToConnectorsView(\\$event)\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_2' | translate}} </a> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_3' | translate}}. </div> <div ng-show=\"retrievalConnectors.length\"> <div class=\"form-group retrieval-connector\"> <label for=\"retrievalConnectorInstance\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.connector_id.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.connector_id.label' | translate}}</label> <span ng-if=\"extractionMethodLoaderFlags.retrieval_search\" onto-loader-fancy size=\"16\"></span> <select class=\"form-control\" id=\"retrievalConnectorInstance\" name=\"retrievalConnectorInstance\" ng-required=\"extractionMethod.selected\" ng-if=\"!extractionMethodLoaderFlags.retrieval_search\" ng-model=\"extractionMethod.retrievalConnectorInstance\" ng-options=\"retrievalConnector.value as retrievalConnector.label for retrievalConnector in retrievalConnectors\"> </select> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.retrievalConnectorInstance.\\$touched && extractionMethod.retrievalConnectorInstance.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group query-template\"> <label for=\"queryTemplate\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.query_template.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.query_template.label' | translate}}</label> <textarea type=\"text\" class=\"form-control\" id=\"queryTemplate\" name=\"queryTemplate\" rows=\"10\" ng-required=\"extractionMethod.selected\" ng-minlength=\"extractionMethod.queryTemplate.minLength\" ng-maxlength=\"extractionMethod.queryTemplate.maxLength\" ng-model=\"extractionMethod.queryTemplate.value\">\n </textarea> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.name.\\$touched && extractionMethod.name.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group retrieval-connector-max-triples\"> <label for=\"{{extractionMethods.RETRIEVAL + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.label' | translate}}</label> <input type=\"number\" class=\"form-control\" id=\"{{extractionMethods.RETRIEVAL + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> </div> </div> </div> </div> <div class=\"alert alert-danger extraction-method-required-error\" ng-if=\"agentSettingsForm.extractionMethods.\\$touched && agentSettingsForm.extractionMethods.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.extraction_method.required' | translate}} </div> </div> <div id=\"additionalExtractionMethods\" class=\"form-group additional-extraction-methods\"> <label uib-popover=\"{{'ttyg.agent.create_agent_modal.form.additional_query_methods.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.additional_query_methods.label' | translate}} </label> <div ng-repeat=\"extractionMethod in agentFormModel.additionalExtractionMethods.additionalExtractionMethods\" class=\"additional-extraction-method\"> <div ng-if=\"ExtractionMethodTemplates[extractionMethod.method]\"> <div ng-include=\"'js/angular/ttyg/templates/' + ExtractionMethodTemplates[extractionMethod.method] + '.html'\"></div> </div> </div> </div> <div class=\"form-group user-instructions\"> <div class=\"toolbar\"> <label for=\"userInstruction\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.user_instruction.label' | translate}}</label> <div class=\"actions\"> <copy-to-clipboard tooltip-text=\"ttyg.agent.create_agent_modal.form.user_instruction.btn.copy_instruction.tooltip\" text-to-copy=\"{{agentFormModel.instructions.userInstruction}}\"></copy-to-clipboard> <button class=\"btn btn-link btn-sm create-chat-btn\" ng-click=\"onRestoreDefaultUserInstructions()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.btn.restore_default.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> </div> </div> <textarea type=\"text\" class=\"form-control\" id=\"userInstruction\" name=\"userInstruction\" rows=\"5\" guide-selector=\"user-instructions\" ng-model=\"agentFormModel.instructions.userInstruction\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.placeholder' | translate}}\">\n </textarea> </div> <div class=\"text-xs-center\"> <button type=\"button\" ng-click=\"showAdvancedSettings = !showAdvancedSettings\" class=\"btn btn-link btn-sm toggle-advanced-settings\"> <span ng-hide=\"showAdvancedSettings\">{{'ttyg.agent.create_agent_modal.advanced_settings.show' | translate}}<em class=\"icon-caret-down\"></em></span> <span ng-show=\"showAdvancedSettings\">{{'ttyg.agent.create_agent_modal.advanced_settings.hide' | translate}}<em class=\"icon-caret-up\"></em></span> </button> </div> <div ng-show=\"showAdvancedSettings\" class=\"advanced-settings\"> <div class=\"form-group system-instructions\"> <div class=\"toolbar\"> <label for=\"systemInstruction\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.system_instruction.label' | translate}}</span> <i class=\"fa fa-triangle-exclamation text-warning overriding-system-instructions-warning\" ng-if=\"showSystemInstructionWarning\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body' | translate}}\" popover-trigger=\"mouseenter\"></i> </label> <div class=\"actions\"> <copy-to-clipboard tooltip-text=\"ttyg.agent.create_agent_modal.form.system_instruction.btn.copy_instruction.tooltip\" text-to-copy=\"{{agentFormModel.instructions.systemInstruction}}\"></copy-to-clipboard> <button class=\"btn btn-link btn-sm create-chat-btn\" ng-click=\"onRestoreDefaultSystemInstructions()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.btn.restore_default.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> </div> </div> <textarea type=\"text\" class=\"form-control\" id=\"systemInstruction\" name=\"systemInstruction\" rows=\"5\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.placeholder' | translate}}\" ng-class=\"{'has-warning': showSystemInstructionWarning}\" ng-model=\"agentFormModel.instructions.systemInstruction\" ng-change=\"onSystemInstructionChange()\">\n </textarea> </div> </div> </form> </div> <div class=\"modal-footer\"> <button type=\"button\" ng-click=\"onExplainAgentSettings()\" class=\"btn explain-agent-settings-btn\"> {{'ttyg.agent.create_agent_modal.btn.explain_settings.label' | translate}} </button> <div> <button type=\"button\" ng-click=\"cancel()\" class=\"btn cancel-btn\"> {{'ttyg.agent.create_agent_modal.btn.cancel.label' | translate}} </button> <button type=\"button\" ng-click=\"ok()\" ng-disabled=\"agentSettingsForm.\\$invalid || savingAgent\" guide-selector=\"save-agent-settings\" class=\"btn btn-primary save-agent-settings-btn\"> <span>{{(operation === AGENT_OPERATION.EDIT ? 'ttyg.agent.create_agent_modal.btn.save.label' : operation === AGENT_OPERATION.CLONE ? 'ttyg.agent.create_agent_modal.btn.save.label' : 'ttyg.agent.create_agent_modal.btn.create.label') | translate}}</span> <span class=\"saving-agent-loader\" ng-if=\"savingAgent\" onto-loader-fancy hide-message=\"true\" size=\"15\"></span> </button> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=82926;export const __webpack_ids__=[82926];export const __webpack_modules__={82926:()=>{function t(){return{link:function(t,e,o){t.$watch("file.status",function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.1.0-plugins1">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",t),t.$inject=[]}};
2
- //# sourceMappingURL=82926.eb6e5cdaa7f6f0a8d160.bundle.js.map
1
+ export const __webpack_id__=82926;export const __webpack_ids__=[82926];export const __webpack_modules__={82926:()=>{function t(){return{link:function(t,e,o){t.$watch("file.status",function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.1.0">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",t),t.$inject=[]}};
2
+ //# sourceMappingURL=82926.9807edeb09281b4bef7a.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"82926.eb6e5cdaa7f6f0a8d160.bundle.js","mappings":"oHASA,SAASA,IACL,MAAO,CACHC,KAAM,SAAUC,EAAOC,EAASC,GAC5BF,EAAMG,OAAO,cAAe,WACE,cAAtBH,EAAMI,KAAKC,QAAgD,cAAtBL,EAAMI,KAAKC,SAC3CC,EAAEL,GAASM,IAAI,UAAUC,OAAS,GACnCF,EAAEL,GAASQ,OAAO,kBAAoBP,EAAKQ,KAAO,aAAeR,EAAKQ,KAAO,kHAGzF,EACJ,EAER,CAnBAC,QACKC,OAAO,gEAHI,IAIXC,UAAU,0BAA2Bf,GAE1CA,EAAwBgB,QAAU,E","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js"],"sourcesContent":["const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.1.0-plugins1\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n"],"names":["ImportProgressIndicator","link","scope","element","attr","$watch","file","status","$","has","length","append","size","angular","module","directive","$inject"],"sourceRoot":""}
1
+ {"version":3,"file":"82926.9807edeb09281b4bef7a.bundle.js","mappings":"oHASA,SAASA,IACL,MAAO,CACHC,KAAM,SAAUC,EAAOC,EAASC,GAC5BF,EAAMG,OAAO,cAAe,WACE,cAAtBH,EAAMI,KAAKC,QAAgD,cAAtBL,EAAMI,KAAKC,SAC3CC,EAAEL,GAASM,IAAI,UAAUC,OAAS,GACnCF,EAAEL,GAASQ,OAAO,kBAAoBP,EAAKQ,KAAO,aAAeR,EAAKQ,KAAO,yGAGzF,EACJ,EAER,CAnBAC,QACKC,OAAO,gEAHI,IAIXC,UAAU,0BAA2Bf,GAE1CA,EAAwBgB,QAAU,E","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js"],"sourcesContent":["const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.1.0\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n"],"names":["ImportProgressIndicator","link","scope","element","attr","$watch","file","status","$","has","length","append","size","angular","module","directive","$inject"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=9062;export const __webpack_ids__=[9062];export const __webpack_modules__={9062:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});const a='<link href="css/ttyg/agent-list.css?v=3.1.0" rel="stylesheet"/> <div class="agent-list-component"> <div class="agents-filter-dropdown btn-group" uib-dropdown> <button type="button" uib-dropdown-toggle class="btn btn-outline-primary dropdown-toggle"> <i class="fa-kit fa-gdb-repo-graphdb mr-1"></i> <span class="selected-filter">{{selectedAgentsFilter.label}}</span> <i class="fa fa-filter" gdb-tooltip="{{\'ttyg.agent.btn.filter.tooltip\' | translate}}"></i> </button> <ul class="dropdown-menu" role="menu"> <li ng-repeat="filterModel in agentListFilterModel"> <button type="button" class="dropdown-item" ng-click="onAgentsFilterChange(filterModel)" data-value="{{filterModel.label}}"> {{filterModel.label}} </button> </li> </ul> </div> <div class="agent-list"> <div ng-if="!agentList.agents.length" class="alert alert-warning"> {{\'ttyg.agent.messages.no_agents\' | translate}} </div> <div ng-repeat="agent in agentList.filterableAgents"> <div ng-if="!deletingAgent || deletingAgent.agentId !== agent.id" class="agent-item" ng-class="{\'selected\': agent.id === selectedAgent.id}"> <div class="agent-info" ng-attr-gdb-tooltip="{{!agent.isCompatible ? (\'ttyg.agent.incompatible_agent\' | translate) : undefined}}"> <div class="agent-name" ng-class="{\'incompatible-agent\': !agent.isCompatible}"> <i ng-if="!agent.isCompatible" class="fa fa-triangle-exclamation text-warning"> </i> {{agent.name}} </div> <div class="btn-group"> <button class="btn btn-link secondary btn-sm open-agent-actions-btn" data-toggle="dropdown" aria-expanded="false" ng-if="true" ng-click="openAgentActionMenu()" ng-disabled="false"> <i class="fa fa-ellipsis"></i> </button> <div class="dropdown-menu dropdown-menu-right agent-actions-menu"> <button ng-if="agent.isCompatible" class="dropdown-item edit-agent-btn" type="button" ng-click="onEditAgent(agent)"> <i class="fa fa-gear"></i> <span>{{\'ttyg.agent.btn.edit_agent.label\' | translate}}</span> </button> <button ng-if="agent.isCompatible" class="dropdown-item ext-integration-agent-btn" type="button" ng-click="onExternalIntegration(agent)"> <i class="fa-regular fa-plug-circle-plus"></i> <span>{{\'ttyg.agent.btn.external_integration\' | translate}}</span> </button> <button ng-if="agent.isCompatible" class="dropdown-item clone-agent-btn" type="button" ng-click="onCloneAgent(agent)"> <i class="fa fa-clone"></i> <span>{{\'ttyg.agent.btn.clone_agent.label\' | translate}}</span> </button> <div ng-if="agent.isCompatible" class="dropdown-divider"></div> <button class="dropdown-item delete-agent-btn" type="button" ng-click="onDeleteAgent(agent)"> <i class="fa fa-trash-can"></i> <span>{{\'ttyg.agent.btn.delete_agent.label\' | translate}}</span> </button> </div> </div> </div> <div class="repository-model-group"> <div class="related-repository"> <i ng-if="!agent.isRepositoryDeleted" class="fa-kit fa-gdb-repo-graphdb"></i> <i ng-if="agent.isRepositoryDeleted" class="fa fa-triangle-exclamation text-warning agent-with-deleted-repository" gdb-tooltip="{{\'ttyg.agent.deleted_repository\' | translate}}"> </i> {{agent.repositoryId}} </div> <div class="model-name">{{agent.model}}</div> </div> </div> <div class="deleting-agent-loader" ng-if="deletingAgent.agentId === agent.id && deletingAgent.inProgress" onto-loader-fancy message="{{\'ttyg.agent.deleting_agent\' | translate}}" size="25"></div> </div> </div> </div> '}};
2
+ //# sourceMappingURL=9062.fe7bedf8616d6bb62120.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"9062.fe7bedf8616d6bb62120.bundle.js","mappings":"oJAGA,QAFW,2xG","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/agent-list.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/agent-list.css?v=3.1.0\" rel=\"stylesheet\"/> <div class=\"agent-list-component\"> <div class=\"agents-filter-dropdown btn-group\" uib-dropdown> <button type=\"button\" uib-dropdown-toggle class=\"btn btn-outline-primary dropdown-toggle\"> <i class=\"fa-kit fa-gdb-repo-graphdb mr-1\"></i> <span class=\"selected-filter\">{{selectedAgentsFilter.label}}</span> <i class=\"fa fa-filter\" gdb-tooltip=\"{{'ttyg.agent.btn.filter.tooltip' | translate}}\"></i> </button> <ul class=\"dropdown-menu\" role=\"menu\"> <li ng-repeat=\"filterModel in agentListFilterModel\"> <button type=\"button\" class=\"dropdown-item\" ng-click=\"onAgentsFilterChange(filterModel)\" data-value=\"{{filterModel.label}}\"> {{filterModel.label}} </button> </li> </ul> </div> <div class=\"agent-list\"> <div ng-if=\"!agentList.agents.length\" class=\"alert alert-warning\"> {{'ttyg.agent.messages.no_agents' | translate}} </div> <div ng-repeat=\"agent in agentList.filterableAgents\"> <div ng-if=\"!deletingAgent || deletingAgent.agentId !== agent.id\" class=\"agent-item\" ng-class=\"{'selected': agent.id === selectedAgent.id}\"> <div class=\"agent-info\" ng-attr-gdb-tooltip=\"{{!agent.isCompatible ? ('ttyg.agent.incompatible_agent' | translate) : undefined}}\"> <div class=\"agent-name\" ng-class=\"{'incompatible-agent': !agent.isCompatible}\"> <i ng-if=\"!agent.isCompatible\" class=\"fa fa-triangle-exclamation text-warning\"> </i> {{agent.name}} </div> <div class=\"btn-group\"> <button class=\"btn btn-link secondary btn-sm open-agent-actions-btn\" data-toggle=\"dropdown\" aria-expanded=\"false\" ng-if=\"true\" ng-click=\"openAgentActionMenu()\" ng-disabled=\"false\"> <i class=\"fa fa-ellipsis\"></i> </button> <div class=\"dropdown-menu dropdown-menu-right agent-actions-menu\"> <button ng-if=\"agent.isCompatible\" class=\"dropdown-item edit-agent-btn\" type=\"button\" ng-click=\"onEditAgent(agent)\"> <i class=\"fa fa-gear\"></i> <span>{{'ttyg.agent.btn.edit_agent.label' | translate}}</span> </button> <button ng-if=\"agent.isCompatible\" class=\"dropdown-item ext-integration-agent-btn\" type=\"button\" ng-click=\"onExternalIntegration(agent)\"> <i class=\"fa-regular fa-plug-circle-plus\"></i> <span>{{'ttyg.agent.btn.external_integration' | translate}}</span> </button> <button ng-if=\"agent.isCompatible\" class=\"dropdown-item clone-agent-btn\" type=\"button\" ng-click=\"onCloneAgent(agent)\"> <i class=\"fa fa-clone\"></i> <span>{{'ttyg.agent.btn.clone_agent.label' | translate}}</span> </button> <div ng-if=\"agent.isCompatible\" class=\"dropdown-divider\"></div> <button class=\"dropdown-item delete-agent-btn\" type=\"button\" ng-click=\"onDeleteAgent(agent)\"> <i class=\"fa fa-trash-can\"></i> <span>{{'ttyg.agent.btn.delete_agent.label' | translate}}</span> </button> </div> </div> </div> <div class=\"repository-model-group\"> <div class=\"related-repository\"> <i ng-if=\"!agent.isRepositoryDeleted\" class=\"fa-kit fa-gdb-repo-graphdb\"></i> <i ng-if=\"agent.isRepositoryDeleted\" class=\"fa fa-triangle-exclamation text-warning agent-with-deleted-repository\" gdb-tooltip=\"{{'ttyg.agent.deleted_repository' | translate}}\"> </i> {{agent.repositoryId}} </div> <div class=\"model-name\">{{agent.model}}</div> </div> </div> <div class=\"deleting-agent-loader\" ng-if=\"deletingAgent.agentId === agent.id && deletingAgent.inProgress\" onto-loader-fancy message=\"{{'ttyg.agent.deleting_agent' | translate}}\" size=\"25\"></div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=99448;export const __webpack_ids__=[99448];export const __webpack_modules__={64088:(e,t,n)=>{n.d(t,{A:()=>r});var a=a||{};a.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var a=0;a<t.children.length;a++)e(t.children[a]);if(1===t.children.length){var r=1.2*t.size;n&&(r=.1*t.children[0].size),t.children.push({name:"placeholder",size:r})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var a=t[n];"placeholder"===a.data.name?t.splice(n,1):a.children&&e(a.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var a=n.x-n.children[0].x;n.children[0].x+=a,r(n.children[0],a)}}function r(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,r(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,a=0;a<e.length;a++){var r=e[a];r.x-=t,r.y-=n}}};const r=a},88141:(e,t,n)=>{n.d(t,{A:()=>i}),n(62979);const a={selectAll:n(93462).selectAll};var r=r||{};r.Export={getCSSRules:function(e){const t=$('link[href="'+e+'"]')[0].sheet.rules;let n="";return _.each(t,function(e){n+=e.cssText}),n},generateBase64ImageSource:function(e){e||(e="svg");const t=a.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}};const i=r},99448:(e,t,n)=>{n.r(t);var a=n(75468),r=n(64088),i=n(19935),s=n(93462),c=n(88141);function l(e,t,n,l,o,d,h,u,f,p,g,v,x){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(h,m,y){!function(h){let m=!1;var y,A,S=s.pack().size([780,780]),C=s.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(s.interpolateHcl),R=s.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function E(){return R.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function P(){return"true"===g.get(v.CLASS_HIERARCHY_HIDE_PREFIXES)}function w(){var e=c.A.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=3.1.0");s.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),s.selectAll("g").style("opacity",1);var t=c.A.Export.generateBase64ImageSource("#classChart svg");s.select(this).attrs({href:t,download:"class-hierarchy-"+d.getActiveRepository()+".svg"})}h.hidePrefixes=P();var H,I,T=E();if(!h.classHierarchyData.classCount&&d.getActiveRepository()&&!d.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=g.get(`classHierarchy-selectedGraph-${d.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success(function(t,n,a){e.loader=!1,207===n&&u.warning(x.instant("graphexplore.update.diagram"),x.instant("graphexplore.repository.data.changed")),h.classHierarchyData=t,s.select("#download-svg").on("mouseover",w)}).error(function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(x.instant("graphexplore.error.request.failed",{name:p,error:getError(t)}))})}var L,D,k,N,b,F,z,O={};function U(n,c,d,u){D&&D(),k&&k(),s.selectAll("#main-group").remove(),T=E(),r.A.SingleChild.addPlaceholders(n,!0),(A=s.hierarchy(n)).sum(function(e){return e.size}),L=d||A,S(A);var g,v=A.descendants();L.isInFocusTransitive=!0,r.A.SingleChild.removePlaceholders(v),r.A.SingleChild.centerNodes(v),r.A.SingleChild.makePositionsRelativeToZero(v),y||(y=(0,a.A)().attr("class","d3-tip").customPosition(function(e,t){return{top:"inherit",bottom:l.innerHeight-t.clientY+"px",right:l.innerWidth-t.clientX+"px"}}).html(function(e){return e.data.name}),R.call(y));var x=T.selectAll("circle").data(v).enter().append("g");c.doFade&&x.each(function(e){i.A.Transition.fadeIn(s.select(this),550)});var P,w=[],N=x.append("circle").attr("class",function(e){return e.data.role}).attr("guide-selector",function(e){return"class-"+e.data.name}).style("fill",function(e){return e.children?C(e.depth):"#E0D0D0"}).each(function(e){if(e.circle=s.select(this),e.data.name!==p){var t=e.data.name;w.push({name:t}),O[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",function(t){c.noPrefixes||e.textHidden?y.show(e,t):y.hide(e)}),e.circle.on("mouseout",y.hide)}}).on("gdb-focus",(e,t)=>I(t)).on("gdb-zoom",(e,t)=>Z(t));function b(e){s.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),P=e}function $(){h.showClassInfoPanel=!1}w&&(w=_.uniqBy(w,"name"),h.flattenedClassNames=w);var F=i.A.Click.delayDblClick();s.selectAll(".parent, .topLevelParent, .child, .root").call(F),I=function(e){Z(e),e.data.name===p?($(),s.selectAll(".selected").classed("selected",!1)):(b(e),m||(h.selectedClass=P,h.showClassInfoPanel=!0),h.$on("sidePanelClosed",function(t){s.selectAll(".selected").classed("selected",e.selected=!1)}))},F.on("click",function(e,t){t.data.id&&l.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),y.hide(),I(t)}),F.on("dblclick",function(t,a){a!==n&&(y.hide(),b(a),e.$broadcast("goToDomainRangeGraphView",P,L),t.stopPropagation())});var z=0;R.on("wheel",function(e){y.hide(),e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-z>100){z=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var a=e.target.__data__;if(a||(a=L),"in"===n){if(a!==L){for(;a.parent&&!a.parent.isInFocusTransitive;)a=a.parent;a.depth<L.depth&&(a=L)}if(a===L&&a.children){for(var r=a.children[0],i=1;i<a.children.length;i++)a.children[i].sortingRank>r.sortingRank&&(r=a.children[i]);r.children&&(a=r)}else a.children||(a=a.parent);Z(a,!0)}else"out"===n&&(a=L.parent)&&Z(a,!0);L.data.name===p&&l.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),Y()}});var U=T.selectAll("text").data(v).enter().append("text").attr("class",function(e){return e.children&&e.children.length?"label":"label child-label"}).each(function(e){e.textSel=s.select(this)});c.noPrefixes?(U.each(function(e){var t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))}),U.style("font-size",function(e){return i.A.Text.calcFontSize(e.noPrefixName,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)})):U.style("font-size",function(e){return i.A.Text.calcFontSize(e.data.name,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)}),U.style("display",function(e){return e.parent&&e.parent.data===L.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")}),c.doFade&&!c.keepPrevState&&U.each(function(e){i.A.Transition.fadeIn(s.select(this),550)}),H=function(){function e(e){e&&N.each(function(t){+e===t.data.id&&I(t)})}var n=t.hash();l.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var B=T.selectAll("circle, text");function V(e,t){var n=800/e[2];g=e,B.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"}),N.attr("r",function(e){return e.r*n}),t&&U.each(function(e){e.data.fullName!==L.data.topLevelParentUri&&L.data.topLevelParentUri!==p||(e.textSel.style("display","none"),L.children&&L.children.length?_.each(L.children,function(e){e.textSel.style("display","inline")}):L.textSel.style("display","inline"),L.parent&&_.each(L.parent.children,function(e){e.data.name!==L.data.name&&e.textSel.style("display","inline")}))}),U.style("font-size",function(e){return c.noPrefixes?i.A.Text.calcFontSize(e.noPrefixName,e.r*n):i.A.Text.calcFontSize(e.data.name,e.r*n)}).text(function(e){return c.noPrefixes?i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)})}function M(e){var t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function Z(e,t){if(o(function(){h.showExternalElements=e.data.name===p}),L!==e&&(e.data.id&&l.history.replaceState({id:e.data.id},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),e.children||(e=e.parent,L!==e))){if(t&&($(),s.selectAll(".selected").classed("selected",!1)),L.parent)for(var n=L;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=!!n.children,n=n.parent;2*(L=e).r/(2*L.r+20)<.3||h.currentSliderValue>h.currentBrowserLimit?(V([L.x,L.y,M(L.r)]),U.each(function(e){W.call(this,e)})):s.transition().duration(f).tween("zoom",function(e){var t=s.interpolateZoom(g,[L.x,L.y,M(L.r)]);return function(e){V(t(e))}}).selectAll("text").each(W)}}V([L.x,L.y,M(L.r)],u),D=h.$on("rootFocus",function(){l.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),I(A)}),k=h.$on("classSearch",function(e){I(e)})}function Y(){const t=h.classHierarchyData.classCount;let n=g.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,g.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",Y),window.addEventListener("beforeunload",function e(){window.removeEventListener("resize",Y),window.removeEventListener("beforeunload",e)}),h.$watch("classHierarchyData",function(){N&&N(),b&&b(),F&&F(),z&&z();var e=P();if(h.classHierarchyData.classCount){Y();var t=_.cloneDeep(h.classHierarchyData);var n,a,r=s.hierarchy(t).descendants().sort(function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0});function d(e,t){const r={keepPrevState:!0,noPrefixes:P()};a=r.noPrefixes,U(n||e,r,L,!0),o(()=>{g.set(v.CLASS_HIERARCHY_SWITCH_PREFIXES,t),H(),m=!1},70)}function u(e,r,i){if(!e)return;g.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:p,children:[]};const s=new Set;for(let t=1;t<=e;t++)s.add(r[t].data.id),r[t].parent===r[0]&&n.children.push(r[t].data);(function e(t){if(!t.children)return;const n=[];for(const e of t.children)s.has(e.id)&&n.push($.extend({},e));t.children=n;for(const n of t.children)e(n)})(n),i?(a=angular.isUndefined(a)?P():a,U(n,{noPrefixes:a})):d(t)}var i,c=g.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(c)u(c,r);else{var l={doFade:!0,keepPrevState:!0,noPrefixes:P()};U(t,l),H()}N=h.$watch("hidePrefixes",function(n){angular.isUndefined(n)||e?e=void 0:o(function(){m=!0,function(e){angular.isUndefined(e)||g.set(v.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),d(t,!0)},50)},!0),b=h.$watch("currentSliderValue",function(e){u(e,r,!0)},!0),z=h.$on("onEnterKeypressSearchAction",function(e){i&&I(i)}),F=h.$on("searchedClass",function(e,t){(i=O[t.name])&&I(i)})}},!0)}(h)}}}n(32150),angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]}};
2
+ //# sourceMappingURL=99448.259dc03b85ced908b67f.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"99448.259dc03b85ced908b67f.bundle.js","mappings":"0IAAA,IAAIA,EAAgBA,GAAiB,CAAC,EAEtCA,EAAcC,YA4EH,CACHC,gBAxEJ,SAASA,EAAgBC,EAAMC,GAC3B,GAAID,EAAKE,SAAU,CACf,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAKE,SAASE,OAAQD,IAEtCJ,EADYC,EAAKE,SAASC,IAI9B,GAA6B,IAAzBH,EAAKE,SAASE,OAAc,CAC5B,IAAIC,EAA8B,IAAZL,EAAKM,KACvBL,IACAI,EAA0C,GAAxBL,EAAKE,SAAS,GAAGI,MAEvCN,EAAKE,SAASK,KAAK,CACfC,KAAM,cAAeF,KAAMD,G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AAS,gBAAiB,uBAC1BC,UAAU,oBAAqB7N,GAEpCA,EAAwB8N,QAAU,CAAC,aAAc,YAAa,uBAAwB,UAAW,WAAY,gBAAiB,kBAAmB,SAAU,gBAAiB,gBAAiB,sBAAuB,SAAU,a","sources":["webpack://root-config/./packages/legacy-workbench/src/js/lib/common/circle-packing.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/common/svg-export.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/rdf-class-hierarchy.directive.js"],"sourcesContent":["var CirclePacking = CirclePacking || {};\n\nCirclePacking.SingleChild = function () {\n /*\n Functions that enable single child circles to display properly, see\n http://stackoverflow.com/questions/22307486/d3-js-packed-circle-layout-how-to-adjust-child-radius\n */\n function addPlaceholders(node, first) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n var child = node.children[i];\n addPlaceholders(child);\n }\n\n if (node.children.length === 1) {\n var placeholderSize = node.size * 1.2;\n if (first) {\n placeholderSize = node.children[0].size * 0.1;\n }\n node.children.push({\n name: 'placeholder', size: placeholderSize,\n // children: []\n });\n }\n }\n }\n\n function removePlaceholders(nodes) {\n for (var i = nodes.length - 1; i >= 0; i--) {\n var node = nodes[i];\n\n if (node.data.name === 'placeholder') {\n nodes.splice(i, 1);\n } else {\n if (node.children) {\n removePlaceholders(node.children);\n }\n }\n }\n }\n\n function centerNodes(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.children) {\n if (node.children.length === 1) {\n var offset = node.x - node.children[0].x;\n node.children[0].x += offset;\n reposition(node.children[0], offset);\n }\n }\n }\n\n function reposition(node, offset) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].x += offset;\n reposition(node.children[i], offset);\n }\n }\n }\n }\n\n function makePositionsRelativeToZero(nodes) {\n //use this to have vis centered at 0,0,0 (easier for positioning)\n var offsetX = nodes[0].x;\n var offsetY = nodes[0].y;\n\n for (var i = 0; i < nodes.length; i++) {\n\n var node = nodes[i];\n\n node.x -= offsetX;\n node.y -= offsetY;\n }\n }\n\n return {\n addPlaceholders: addPlaceholders,\n removePlaceholders: removePlaceholders,\n centerNodes: centerNodes,\n makePositionsRelativeToZero: makePositionsRelativeToZero\n }\n}();\n\nexport default CirclePacking;\n","import 'lib/d3.patch.js'\nimport {selectAll} from 'd3';\n\nconst d3 = {selectAll};\nvar SVG = SVG || {};\n\nSVG.Export = function () {\n function getCSSRules(cssSourceFilePath) {\n const cssRules = $('link[href=\"' + cssSourceFilePath + '\"]')[0].sheet.rules;\n let cssStr = \"\";\n _.each(cssRules, function (value) {\n cssStr += value.cssText;\n });\n return cssStr;\n }\n\n function generateBase64ImageSource(svgSelectorClass) {\n if (!svgSelectorClass) {\n svgSelectorClass = \"svg\";\n }\n // add needed xml namespace\n const exportSvg = d3.selectAll(svgSelectorClass)\n .attr(\"version\", \"1.1\")\n .attr(\"xmlns\", \"http://www.w3.org/2000/svg\")\n .node().parentNode.innerHTML;\n\n // convert selected html to base64\n return \"data:image/svg+xml;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(exportSvg)));\n }\n\n return {\n getCSSRules: getCSSRules,\n generateBase64ImageSource: generateBase64ImageSource\n };\n}();\n\nexport default SVG;\n","import d3tip from 'lib/d3-tip/d3-tip-patch';\nimport CirclePacking from 'lib/common/circle-packing';\nimport D3 from 'lib/common/d3-utils';\nimport * as d3 from 'd3';\nimport SVG from 'lib/common/svg-export';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.graphexplore.directives.class', [\n 'graphdb.framework.graphexplore.controllers.class',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .constant(\"ZOOM_DURATION\", 500)\n .constant(\"ROOT_OBJ_NAME\", \"RDF Class Hierarchy\")\n .directive('rdfClassHierarchy', classHierarchyDirective);\n\nclassHierarchyDirective.$inject = ['$rootScope', '$location', 'GraphDataRestService', '$window', '$timeout', '$repositories', '$licenseService', 'toastr', 'ZOOM_DURATION', 'ROOT_OBJ_NAME', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction classHierarchyDirective($rootScope, $location, GraphDataRestService, $window, $timeout, $repositories, $licenseService, toastr, ZOOM_DURATION, ROOT_OBJ_NAME, LocalStorageAdapter, LSKeys, $translate) {\n return {\n restrict: 'AE',\n template: '<div id=\"classChart\"></div>',\n scope: {\n classHierarchyData: '=',\n flattenedClassNames: '=',\n selectedClass: '=',\n currentSliderValue: '=',\n showClassInfoPanel: '=',\n showExternalElements: '=',\n hidePrefixes: '=',\n currentBrowserLimit: '='\n },\n link: linkFunc\n };\n\n function linkFunc(scope, element, attrs) {\n renderCirclePacking(scope, element);\n }\n\n function renderCirclePacking(scope, element) {\n /**\n * A boolean flag that determines whether the opening of the side info panel\n * should be suppressed when focusing on the chart while a class is selected.\n */\n let suppressPanelOpen = false;\n\n var width = 800,\n height = 800,\n diameter = height,\n margin = 20,\n tip,\n rootHierarchy;\n\n var packLayout = d3.pack()\n .size([diameter - margin, diameter - margin]);\n\n var color = d3.scaleLinear()\n .domain([0, 4])\n .range([\"hsl(19, 70%, 90%)\", \"hsl(19, 70%, 50%)\"])\n .interpolate(d3.interpolateHcl);\n\n var svg = d3.select(\"#classChart\")\n .insert(\"svg:svg\", \"h2\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n function appendMainGroup() {\n return svg.append(\"svg:g\")\n .attrs({\n id: \"main-group\",\n transform: \"translate(\" + width / 2 + \",\" + height / 2 + \")\"\n });\n }\n\n function savePrefixesState(hidePrefixes) {\n if (!angular.isUndefined(hidePrefixes)) {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES, hidePrefixes);\n }\n }\n\n function getPrefixesState() {\n return LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES) === \"true\";\n }\n\n /*\n * Prepares SVG document image export by adding xml namespaces and\n * additional style information\n */\n function prepareForSVGImageExport() {\n // get css rules for the diagram\n var cssRules = SVG.Export.getCSSRules(\"css/rdf-class-hierarchy-labels.css?v=3.1.0\");\n // inline css rules in a defs tag\n d3.selectAll(\"#main-group\")\n .append(\"defs\");\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // switch opacity to visible\n d3.selectAll(\"g\")\n .style(\"opacity\", 1);\n\n // convert selected html to base64\n var imgSrc = SVG.Export.generateBase64ImageSource(\"#classChart svg\");\n\n // set the binary image and a name for the downloadable file on the export button\n d3.select(this).attrs({\n href: imgSrc,\n download: \"class-hierarchy-\" + $repositories.getActiveRepository() + \".svg\"\n });\n }\n\n scope.hidePrefixes = getPrefixesState();\n\n var g = appendMainGroup();\n\n if (!scope.classHierarchyData.classCount && $repositories.getActiveRepository() && !$repositories.isSystemRepository()) {\n $rootScope.loader = true;\n $rootScope.hierarchyError = false;\n const selGraphFromCache = LocalStorageAdapter.get(`classHierarchy-selectedGraph-${$repositories.getActiveRepository()}`);\n GraphDataRestService.getClassHierarchyData(selGraphFromCache !== null ? selGraphFromCache.contextID.uri : \"\")\n .success(function (response, status, headers) {\n $rootScope.loader = false;\n if (status === 207) {\n toastr.warning($translate.instant('graphexplore.update.diagram'), $translate.instant('graphexplore.repository.data.changed'));\n }\n scope.classHierarchyData = response;\n\n d3.select(\"#download-svg\")\n .on(\"mouseover\", prepareForSVGImageExport);\n\n }).error(function (response) {\n $rootScope.loader = false;\n $rootScope.hierarchyError = getError(response);\n toastr.error($translate.instant('graphexplore.error.request.failed', {name: ROOT_OBJ_NAME, error: getError(response)}));\n });\n }\n\n\n var autoZoomToPreviousState,\n doFocus;\n\n var focus,\n rootFocusEvent,\n classSearchEvent,\n flattenedClassData = {};\n\n function drawDiagram(root, config, newFocus, switchPrefixes) {\n if (rootFocusEvent) rootFocusEvent();\n if (classSearchEvent) classSearchEvent();\n // remove old group tag containing the diagram\n d3.selectAll(\"#main-group\").remove();\n\n // append new empty group tag in order to rerender new diagram\n g = appendMainGroup();\n\n // fix for single child classes\n CirclePacking.SingleChild.addPlaceholders(root, true);\n\n rootHierarchy = d3.hierarchy(root);\n rootHierarchy.sum(function (d) {\n return d.size;\n })\n focus = newFocus ? newFocus : rootHierarchy;\n\n packLayout(rootHierarchy)\n\n var nodes = rootHierarchy.descendants(),\n view;\n\n focus.isInFocusTransitive = true;\n\n // fixes for single child classes\n CirclePacking.SingleChild.removePlaceholders(nodes);\n CirclePacking.SingleChild.centerNodes(nodes);\n CirclePacking.SingleChild.makePositionsRelativeToZero(nodes);\n\n if (!tip) {\n tip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function (d, event) {\n return {\n top: 'inherit',\n bottom: ($window.innerHeight - event.clientY) + 'px',\n right: ($window.innerWidth - event.clientX) + 'px'\n };\n })\n .html(function (d) {\n return d.data.name;\n });\n svg.call(tip);\n }\n\n var circleGroup = g.selectAll(\"circle\")\n .data(nodes)\n .enter().append(\"g\");\n\n if (config.doFade) {\n circleGroup.each(function (d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n var flattenedClassNames = [];\n\n var circle = circleGroup\n .append(\"circle\")\n .attr(\"class\", function (d) {\n return d.data.role;\n })\n .attr(\"guide-selector\", function (d) {\n return \"class-\" + d.data.name;\n })\n .style(\"fill\", function (d) {\n //return colors[d.depth % 6];\n return d.children ? color(d.depth) : \"#E0D0D0\";\n })\n .each(function (d) {\n d.circle = d3.select(this);\n if (d.data.name !== ROOT_OBJ_NAME) {\n var key = d.data.name;\n flattenedClassNames.push({name: key});\n flattenedClassData[[key]] = d;\n\n d.circle.classed(\"rdf-class\", true);\n d.circle.on('mouseover', function (event) {\n if (config.noPrefixes) {\n tip.show(d, event);\n } else if (!d.textHidden) {\n tip.hide(d);\n } else {\n tip.show(d, event);\n }\n });\n d.circle.on('mouseout', tip.hide);\n }\n })\n // custom event used when user is following a guide\n .on(\"gdb-focus\", (event, d) => doFocus(d))\n .on(\"gdb-zoom\", (event, d) => zoom(d));\n\n\n if (flattenedClassNames) {\n flattenedClassNames = _.uniqBy(flattenedClassNames, 'name');\n scope.flattenedClassNames = flattenedClassNames;\n }\n\n var selectedClass;\n\n function getCurrentClassDataAndMarkSelected(obj) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n obj.circle.classed(\"selected\", obj.selected = true);\n selectedClass = obj;\n }\n\n function showClassInfoPanel() {\n scope.selectedClass = selectedClass;\n scope.showClassInfoPanel = true;\n }\n\n function closeClassInfoPanel() {\n scope.showClassInfoPanel = false;\n }\n\n function goToDomainRangeGraphView() {\n $rootScope.$broadcast('goToDomainRangeGraphView', selectedClass, focus);\n }\n\n var clickCancel = D3.Click.delayDblClick();\n d3.selectAll(\".parent, .topLevelParent, .child, .root\")\n .call(clickCancel);\n\n doFocus = function (obj) {\n zoom(obj);\n\n if (obj.data.name === ROOT_OBJ_NAME) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n } else {\n getCurrentClassDataAndMarkSelected(obj);\n if (!suppressPanelOpen) {\n showClassInfoPanel();\n }\n\n // FIXME: is it ok to bind this event handler every time and not just once?\n scope.$on('sidePanelClosed', function (event) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n });\n }\n\n\n //do not stop event propagation here\n };\n\n clickCancel.on(\"click\", function (event, obj) {\n // add clicked class to browser history\n if (obj.data.id) {\n $window.history.pushState({id: obj.data.id}, \"classHierarchyPage\" + obj.data.id, \"hierarchy#\" + obj.data.id);\n }\n\n //hide current d3-tip tooltip\n tip.hide();\n\n doFocus(obj);\n });\n\n clickCancel.on(\"dblclick\", function (event, obj) {\n if (obj === root) {\n return;\n }\n // hide current d3-tip tooltip in order not to appear in the next view\n tip.hide();\n getCurrentClassDataAndMarkSelected(obj);\n goToDomainRangeGraphView();\n\n event.stopPropagation();\n });\n\n var lastTimeWheel = 0;\n svg.on('wheel', function (event) {\n // hide current d3-tip tooltip\n tip.hide();\n\n event.preventDefault();\n event.stopPropagation();\n\n // at least 100ms must have passed since last time we updated\n var now = new Date().getTime();\n if (now - lastTimeWheel > 100) {\n lastTimeWheel = now;\n } else {\n return;\n }\n\n var direction = '';\n if (event.deltaY <= -1) {\n direction = 'in';\n } else if (event.deltaY >= 1) {\n direction = 'out';\n }\n\n var obj = event.target.__data__;\n\n if (!obj) {\n // scroll outside the big circle\n obj = focus;\n }\n\n if (direction === 'in') {\n // determine object to zoom to\n\n if (obj !== focus) {\n // consider the object on which the scroll event occurred\n // and find the furthest parent that has no focused children\n while (obj.parent && !obj.parent.isInFocusTransitive) {\n obj = obj.parent;\n }\n if (obj.depth < focus.depth) {\n // however if that parent is of lower depth than the focus we ignore it\n obj = focus;\n }\n }\n\n if (obj === focus && obj.children) {\n // if object is in focus and it has children we zoom to its biggest child\n // TODO: sort children on backend\n var newobj = obj.children[0];\n for (var i = 1; i < obj.children.length; i++) {\n if (obj.children[i].sortingRank > newobj.sortingRank) {\n newobj = obj.children[i];\n }\n }\n if (newobj.children) {\n // Use the child only if it has children\n obj = newobj;\n }\n } else if (!obj.children) {\n // If node has no children use its parent instead\n obj = obj.parent;\n }\n\n zoom(obj, true);\n } else if (direction === 'out') {\n // zooming out simply goes one parent up\n obj = focus.parent;\n if (obj) {\n zoom(obj, true);\n }\n }\n\n if (focus.data.name === ROOT_OBJ_NAME) {\n $window.history.replaceState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n }\n\n // redraw slider on zoom out\n sendSliderData();\n });\n\n var text = g.selectAll(\"text\")\n .data(nodes)\n .enter().append(\"text\")\n .attr(\"class\", function (d) {\n return d.children && d.children.length ? \"label\" : \"label child-label\";\n })\n .each(function (d) {\n d.textSel = d3.select(this);\n });\n\n function trimPrefixes(d) {\n var idx = d.data.name.indexOf(\":\");\n var absUriIdx = d.data.name.indexOf(\"http://\");\n if (absUriIdx > -1) {\n // if we have no prefix available ignore\n d.noPrefixName = d.data.name;\n } else if (idx > -1) {\n d.noPrefixName = d.data.name.substring(idx + 1);\n }\n }\n\n if (config.noPrefixes) {\n text.each(trimPrefixes);\n text\n .style(\"font-size\", function (d) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r);\n })\n .text(function (d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r / 3);\n });\n } else {\n text\n .style(\"font-size\", function (d) {\n return D3.Text.calcFontSize(d.data.name, d.r);\n })\n .text(function (d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r / 3);\n })\n }\n\n // TODO: make this use the full version (same as zoom)\n text.style(\"display\", function (d) {\n if (d.parent && d.parent.data === focus.data) {\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n return null;\n } else {\n d.textHidden = true;\n return \"none\";\n }\n });\n\n if (config.doFade && !config.keepPrevState) {\n text.each(function (d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n autoZoomToPreviousState = function () {\n function focusOnCurrentClass(focusHistoryId) {\n if (focusHistoryId) {\n circle.each(function (d) {\n if (+focusHistoryId === d.data.id) {\n doFocus(d);\n }\n });\n }\n }\n\n var focusHistoryId = $location.hash();\n\n $window.onpopstate = function (event) {\n if (event.state) {\n var focusHistoryId = event.state.id;\n focusOnCurrentClass(focusHistoryId);\n }\n };\n\n focusOnCurrentClass(focusHistoryId);\n };\n\n var node = g.selectAll(\"circle, text\");\n\n function zoomTo(v, switchPrefixes) {\n var k = diameter / v[2];\n view = v;\n\n node.attr(\"transform\", function (d) {\n return \"translate(\" + (d.x - v[0]) * k + \",\" + (d.y - v[1]) * k + \")\";\n });\n\n circle.attr(\"r\", function (d) {\n return d.r * k;\n });\n\n function switchPrefixesInPlace(d) {\n // if uris match with the topLevelParentUri of the focused element\n // or your focus is a top level parent hide its label and if it is not\n // a child element show all of its child labels. If it is a child element\n // only show its label.\n if (d.data.fullName === focus.data.topLevelParentUri || focus.data.topLevelParentUri === ROOT_OBJ_NAME) {\n d.textSel.style(\"display\", \"none\");\n if (focus.children && focus.children.length) {\n _.each(focus.children, function (c) {\n c.textSel.style(\"display\", \"inline\");\n });\n } else {\n focus.textSel.style(\"display\", \"inline\");\n }\n\n // in order to show prefixes of siblings check if the focused\n // element has a parent and show all of its children except\n // for the name of the focused element because you need to see\n // its children\n if (focus.parent) {\n _.each(focus.parent.children, function (c) {\n if (c.data.name !== focus.data.name) {\n c.textSel.style(\"display\", \"inline\");\n }\n });\n }\n }\n }\n\n if (switchPrefixes) {\n text.each(switchPrefixesInPlace);\n }\n\n text\n .style(\"font-size\", function (d) {\n if (config.noPrefixes) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r * k);\n }\n return D3.Text.calcFontSize(d.data.name, d.r * k);\n })\n .text(function (d) {\n if (config.noPrefixes) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r * k / 3);\n }\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r * k / 3);\n });\n }\n\n\n function adjustRadius(r) {\n var newr = r * 2 + margin;\n if (r * 2 / newr < 0.3) {\n // for very small circles we need to adjust\n newr = r * 2 + 2;\n }\n return newr;\n }\n\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)], switchPrefixes);\n\n function textUpdate(d) {\n if (d.isInFocusTransitive || !(d.parent && d.parent.isInFocusTransitive)) {\n // hide labels of classes that are in focus (including children) OR whose parents aren't in focus\n d.textHidden = true;\n this.style.display = \"none\";\n } else {\n // show all other labels\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n this.style.display = \"\";\n }\n }\n\n function zoom(d, shouldClosePanel) {\n // use empty timeout to force the following code to be executed on the next $digest cycle\n // in order to avoid '$digest in progress' error\n $timeout(function () {\n scope.showExternalElements = (d.data.name === ROOT_OBJ_NAME);\n });\n\n if (focus === d) {\n // Node is already zoomed to\n // Important to return before we modify the history, otherwise we choke the browser\n return;\n }\n\n if (d.data.id) {\n $window.history.replaceState({id: d.data.id}, \"classHierarchyPage\" + d.data.id, \"hierarchy#\" + d.data.id);\n }\n\n if (!d.children) {\n // No children - zoom to parent instead\n d = d.parent;\n if (focus === d) {\n // Parent is already zoomed to\n return;\n }\n }\n\n if (shouldClosePanel) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n }\n\n if (focus.parent) {\n var p = focus;\n while (p) {\n p.isInFocusTransitive = false;\n p = p.parent;\n }\n }\n\n var p = d;\n while (p) {\n p.isInFocusTransitive = !!p.children;\n p = p.parent;\n }\n\n focus = d;\n\n var isVerySmallCircle = focus.r * 2 / (focus.r * 2 + margin) < 0.3;\n\n if (isVerySmallCircle || scope.currentSliderValue > scope.currentBrowserLimit) {\n // no fancy animation for slower browsers if above the limit or if zooming to a very small circle\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)]);\n\n text.each(function (d) {\n textUpdate.call(this, d)\n });\n } else {\n // the fancy version for faster browsers\n var transition = d3.transition()\n .duration(ZOOM_DURATION)\n .tween(\"zoom\", function (d) {\n var i = d3.interpolateZoom(view, [focus.x, focus.y, adjustRadius(focus.r)]);\n return function (t) {\n zoomTo(i(t));\n };\n });\n\n transition.selectAll(\"text\")\n // Experimental: hide texts to be hidden on \"start\", show texts to be shown on \"end\"\n .each(textUpdate)\n }\n }\n\n rootFocusEvent = scope.$on('rootFocus', function () {\n $window.history.pushState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n doFocus(rootHierarchy);\n });\n\n classSearchEvent = scope.$on('classSearch', function (selectedClass) {\n doFocus(selectedClass);\n });\n }\n\n function sendSliderData() {\n const currentClassCount = scope.classHierarchyData.classCount;\n let currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n\n if (!currentSliderValue || currentSliderValue > currentClassCount) {\n currentSliderValue = currentClassCount;\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n }\n\n $rootScope.$broadcast(\"classCount\", currentClassCount, currentSliderValue);\n }\n\n window.addEventListener('resize', sendSliderData);\n\n window.addEventListener('beforeunload', removeResizeListener);\n\n function removeResizeListener() {\n window.removeEventListener('resize', sendSliderData);\n window.removeEventListener('beforeunload', removeResizeListener);\n }\n\n var prefixesWatch,\n currentClassCountWatch,\n searchedClassBroadcast,\n onEnterClassSearchBroadcast;\n\n scope.$watch('classHierarchyData', function () {\n // when data changes unregister watchers by calling them\n if (prefixesWatch) prefixesWatch();\n if (currentClassCountWatch) currentClassCountWatch();\n if (searchedClassBroadcast) searchedClassBroadcast();\n if (onEnterClassSearchBroadcast) onEnterClassSearchBroadcast();\n\n // get initial state of prefixes (hidden or not) when changing repositories\n // in order to avoid triggering an unwanted prefixes watch\n var initialPrefixesState = getPrefixesState();\n\n if (scope.classHierarchyData.classCount) {\n sendSliderData();\n\n var rootData = _.cloneDeep(scope.classHierarchyData);\n\n var root = d3.hierarchy(rootData);\n\n function sortRoot(root) {\n // add all classes to a flat array, add parent information\n // and sort according to instancesCount DESC, depth ASC\n\n return root.descendants()\n .sort(function (a, b) {\n if (a.data.sortingRank > b.data.sortingRank) {\n return -1;\n } else if (a.data.sortingRank < b.data.sortingRank) {\n return 1;\n } else if (a.data.depth > b.data.depth) {\n return 1;\n } else if (a.data.depth < b.data.depth) {\n return -1;\n } else {\n return 0;\n }\n });\n }\n\n var sortedChildren = sortRoot(root);\n\n // we start with an empty new rootData\n var filteredRootData;\n var noPrefixesGlobal;\n\n\n function restoreDiagramState(currentRootData, switchPrefixes) {\n const prefixesConfig = {\n keepPrevState: true,\n noPrefixes: getPrefixesState()\n };\n\n // get noPrefixes flag from drawDiagram configuration params\n noPrefixesGlobal = prefixesConfig.noPrefixes;\n\n if (filteredRootData) {\n drawDiagram(filteredRootData, prefixesConfig, focus, true);\n } else {\n drawDiagram(currentRootData, prefixesConfig, focus, true);\n }\n\n $timeout(() => {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_SWITCH_PREFIXES, switchPrefixes);\n autoZoomToPreviousState();\n // Need to set this to false to enable the info panel to work when selecting a class.\n // The panel opening will be suppressed only when the prefixes are toggled.\n suppressPanelOpen = false;\n }, 70);\n }\n\n function redrawFilteredDiagram(currentSliderValue, sortedChildrenArray, useSlider) {\n if (!currentSliderValue) {\n return;\n }\n\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n\n filteredRootData = {\n name: ROOT_OBJ_NAME,\n children: []\n };\n\n // walk through the given count of (sortedChildrenArray) classes\n // - record the id of each class we've seen\n // - add the rootData level classes to the new rootData\n const addedIds = new Set();\n for (let k = 1; k <= currentSliderValue; k++) {\n addedIds.add(sortedChildrenArray[k].data.id);\n if (sortedChildrenArray[k].parent === sortedChildrenArray[0]) { // i.e. the parent is the \"class hierarchy\"\n filteredRootData.children.push(sortedChildrenArray[k].data);\n }\n }\n\n // walk through all the classes in the new rootData and only keep those that have an \"added id\"\n // we create separate copies of the arrays in order not to contaminate the original data\n // we also copy each class's object ($.extend ...) for the same reason\n function fixChildren(node) {\n if (!node.children) {\n return;\n }\n const newChildren = [];\n for (const child of node.children) {\n if (addedIds.has(child.id)) {\n newChildren.push($.extend({}, child));\n }\n }\n node.children = newChildren;\n for (const child of node.children) {\n fixChildren(child);\n }\n }\n\n fixChildren(filteredRootData);\n\n if (useSlider) {\n // redraw diagram when slider value changes and persist current state\n // in local storage\n noPrefixesGlobal = angular.isUndefined(noPrefixesGlobal) ? getPrefixesState() : noPrefixesGlobal;\n const redrawConfig = {\n noPrefixes: noPrefixesGlobal\n };\n drawDiagram(filteredRootData, redrawConfig);\n } else {\n // if the user returns to the diagram with back browser button\n // read the saved state (show/hide prefixes, current slider value)\n // from local storage and render the diagram according to the saved metrics\n restoreDiagramState(rootData);\n }\n }\n\n var currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n if (currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren);\n } else {\n var basicConfig = {\n doFade: true,\n keepPrevState: true,\n noPrefixes: getPrefixesState()\n };\n drawDiagram(rootData, basicConfig);\n autoZoomToPreviousState();\n }\n\n prefixesWatch = scope.$watch('hidePrefixes', function (hidePrefixes) {\n if (angular.isUndefined(hidePrefixes) || initialPrefixesState) {\n initialPrefixesState = undefined;\n return;\n }\n // if digest overflows a possible fix might be wrapping this in $timeout\n $timeout(function () {\n suppressPanelOpen = true;\n savePrefixesState(hidePrefixes);\n restoreDiagramState(rootData, true);\n }, 50);\n }, true);\n\n currentClassCountWatch = scope.$watch('currentSliderValue', function (currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren, true);\n }, true);\n\n // we handle this event for the cases where we already have searched for a given class and\n // hit enter again on the already selected class in order again react and zoom to it again\n // if we are not at the moment\n var currentSearchedClass;\n onEnterClassSearchBroadcast = scope.$on('onEnterKeypressSearchAction', function (event) {\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n\n searchedClassBroadcast = scope.$on('searchedClass', function (event, searchedClass) {\n currentSearchedClass = flattenedClassData[searchedClass.name];\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n }\n }, true);\n }\n}\n"],"names":["CirclePacking","SingleChild","addPlaceholders","node","first","children","i","length","placeholderSize","size","push","name","removePlaceholders","nodes","data","splice","centerNodes","offset","x","reposition","makePositionsRelativeToZero","offsetX","offsetY","y","d3","selectAll","SVG","Export","getCSSRules","cssSourceFilePath","cssRules","$","sheet","rules","cssStr","_","each","value","cssText","generateBase64ImageSource","svgSelectorClass","exportSvg","attr","parentNode","innerHTML","btoa","unescape","encodeURIComponent","classHierarchyDirective","$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate","restrict","template","scope","classHierarchyData","flattenedClassNames","selectedClass","currentSliderValue","showClassInfoPanel","showExternalElements","hidePrefixes","currentBrowserLimit","link","element","attrs","suppressPanelOpen","tip","rootHierarchy","packLayout","diameter","color","domain","range","interpolate","svg","insert","on","appendMainGroup","append","id","transform","getPrefixesState","get","CLASS_HIERARCHY_HIDE_PREFIXES","prepareForSVGImageExport","style","imgSrc","this","href","download","getActiveRepository","autoZoomToPreviousState","doFocus","g","classCount","isSystemRepository","loader","hierarchyError","selGraphFromCache","getClassHierarchyData","contextID","uri","success","response","status","headers","warning","instant","error","getError","focus","rootFocusEvent","classSearchEvent","prefixesWatch","currentClassCountWatch","searchedClassBroadcast","onEnterClassSearchBroadcast","flattenedClassData","drawDiagram","root","config","newFocus","switchPrefixes","remove","sum","d","view","descendants","isInFocusTransitive","d3tip","customPosition","event","top","bottom","innerHeight","clientY","right","innerWidth","clientX","html","call","circleGroup","enter","doFade","D3","Transition","fadeIn","circle","role","depth","key","classed","noPrefixes","textHidden","show","hide","zoom","getCurrentClassDataAndMarkSelected","obj","selected","closeClassInfoPanel","uniqBy","clickCancel","Click","delayDblClick","$on","history","pushState","$broadcast","stopPropagation","lastTimeWheel","preventDefault","now","Date","getTime","direction","deltaY","target","__data__","parent","newobj","sortingRank","replaceState","sendSliderData","text","textSel","idx","indexOf","noPrefixName","substring","Text","calcFontSize","r","getTextWithElipsisIfNeeded","textContent","keepPrevState","focusOnCurrentClass","focusHistoryId","hash","onpopstate","state","zoomTo","v","k","fullName","topLevelParentUri","c","adjustRadius","newr","textUpdate","display","shouldClosePanel","p","duration","tween","t","currentClassCount","CLASS_HIERARCHY_CURRENT_SLIDER_VALUE","set","window","addEventListener","removeResizeListener","removeEventListener","$watch","initialPrefixesState","rootData","cloneDeep","filteredRootData","noPrefixesGlobal","sortedChildren","sort","a","b","restoreDiagramState","currentRootData","prefixesConfig","CLASS_HIERARCHY_SWITCH_PREFIXES","redrawFilteredDiagram","sortedChildrenArray","useSlider","addedIds","Set","add","fixChildren","newChildren","child","has","extend","angular","isUndefined","currentSearchedClass","basicConfig","undefined","savePrefixesState","searchedClass","renderCirclePacking","module","constant","directive","$inject"],"sourceRoot":""}
@@ -0,0 +1,5 @@
1
+ import { HttpInterceptor } from '../../models/interceptor/http-interceptor';
2
+ export declare class UnauthorizedInterceptor extends HttpInterceptor<Response> {
3
+ process(data: Response): Promise<Response>;
4
+ shouldProcess(data: Response): boolean;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { RouteModel } from '../routing/external-route-item-model';
2
+ import { ExtensionPoint } from './extension-point';
3
+ export interface PluginRegistry {
4
+ get(extensionPoint: ExtensionPoint.ROUTE): RouteModel;
5
+ }
@@ -13,7 +13,6 @@ export * from './models/toastr';
13
13
  export * from './models/rdf-search';
14
14
  export * from './models/single-spa';
15
15
  export * from './models/app-lifecycle';
16
- export * from './models/plugins';
17
16
  export * from './providers';
18
17
  export * from './services/context';
19
18
  export * from './services/language';
@@ -34,7 +33,6 @@ export * from './services/rdf-search';
34
33
  export * from './services/navigation';
35
34
  export * from './services/app-lifecycle';
36
35
  export * from './services/window';
37
- export * from './services/plugins';
38
36
  export * from './services/utils';
39
37
  export { HTTP_REQUEST_DONE_EVENT } from './services/http/http.service';
40
38
  export { COOKIE_CONSENT_CHANGED_EVENT } from './services/cookie/cookie.service';
@@ -1 +1 @@
1
- class e{static deepEqual(t,s){if(t===s)return!0;if(null==t||null==s)return!1;if("object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;if(Array.isArray(t)&&Array.isArray(s)){if(t.length!==s.length)return!1;for(let r=0;r<t.length;r++)if(!e.deepEqual(t[r],s[r]))return!1;return!0}if(!Array.isArray(t)&&!Array.isArray(s)){const r=Object.keys(t),i=Object.keys(s);if(r.length!==i.length)return!1;for(const i of r)if(!(i in s)||!e.deepEqual(t[i],s[i]))return!1;return!0}return!1}return!1}static deepCopy(t){if("object"!=typeof t||null==t||"function"==typeof t)return t;if(Array.isArray(t))return t.map(t=>e.deepCopy(t));const s=Object.create(Object.getPrototypeOf(t));for(const r of Object.keys(t))s[r]=e.deepCopy(t[r]);return s}static hasCopyMethod(e){return"object"==typeof e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"copy")&&"function"==typeof e.copy}}class t{copy(){return e.deepCopy(this)}}class s extends t{constructor(e=[]){super(),this.items=e}getItems(){return this.items}sort(e){this.items.sort(e)}filter(e){return this.items.filter(e)}find(e){return this.items.find(e)}isEmpty(){return 0===this.items.length}addToStart(e){this.items.unshift(e)}addItems(e){this.items.push(...e)}remove(e){const t=this.items.indexOf(e);-1!==t&&this.items.splice(t,1)}}class r extends s{constructor(e){super(e)}add(e){this.items.push(e)}addAll(e){this.items.push(...e)}unsubscribeAll(){this.items.forEach(e=>e()),this.items=[]}}class i extends t{constructor(e){super(),this.id=e?.id||"",this.title=e?.title||"",this.type=e?.type,this.sesameType=e?.sesameType,this.uri=e?.uri||"",this.externalUrl=e?.externalUrl||"",this.location=e?.location||"",this.state=e?.state,this.local=e?.local,this.readable=e?.readable,this.writable=e?.writable,this.unsupported=e?.unsupported,this.isNew=e?.isNew}toRepositoryReference(){return{id:this.id,location:this.location}}}const n=(e,t)=>{const s=e.location.localeCompare(t.location);return 0!==s?s:e.id.localeCompare(t.id)};class o extends s{constructor(e){super(e)}findRepository(e,t){return super.find(s=>s.id===e&&s.location===t)}sortByLocationAndId(){super.sort(n)}filterByRepository(e){return super.filter(this.createIdLocationFilter(e))}createIdLocationFilter(e){return t=>e.some(e=>e.id!==t.id||e.location!==t.location)}}class a extends t{constructor(e){super(),this.inferred=e?.inferred||0,this.total=e?.total||0,this.explicit=e?.explicit||0}}let u=function(e){return e.INACTIVE="INACTIVE",e.STARTING="STARTING",e.RUNNING="RUNNING",e.RESTARTING="RESTARTING",e.STOPPING="STOPPING",e}({}),c=function(e){return e.GRAPH_DB="graphdb",e.ONTOP="ontop",e.FEDEX="fedex",e.SYSTEM="system",e}({});class l{constructor(e){this.setNamespaces(e)}setNamespaces(e){this.namespaces=e}getByPrefix(e){return this.namespaces[e]||""}}class h extends t{constructor(e){super(),this.uri=e?.uri||"",this.label=e?.label||"",this.username=e?.username||"",this.password=e?.password||"",this.authType=e?.authType,this.locationType=e?.locationType,this.active=e?.active,this.local=e?.local,this.system=e?.system,this.errorMsg=e?.errorMsg||"",this.defaultRepository=e?.defaultRepository||""}}let p=function(e){return e.GDB="GDB",e.ONTOPIC="ONTOPIC",e.SPARQL="SPARQL",e}({});class g{constructor(e,t){this.NAME=e,this.payload=t}}const d={NAVIGATION_END:"navigationEnd",NAVIGATION_START:"navigationStart",LOGOUT:"logout",APP_DATA_LOADED:"applicationDataLoaded"};class E extends g{constructor(e,t){super(d.NAVIGATION_END,{oldUrl:e,newUrl:t})}}class S{}class A extends g{constructor(e,t,s){super(d.NAVIGATION_START,{oldUrl:e,newUrl:t,cancelNavigation:s})}}class R extends g{constructor(){super(d.LOGOUT)}}let T=function(e){return e.NONE="NONE",e.BASIC="BASIC",e.SIGNATURE="SIGNATURE",e}({});class C{static MAPPER_INSTANCES=new Map;static get(e){const t=e.name;if(!C.MAPPER_INSTANCES.has(t)){const s=new e;C.MAPPER_INSTANCES.set(t,s)}return C.MAPPER_INSTANCES.get(t)}}class y{static SERVICE_INSTANCES=new Map;static get(e){if(!y.SERVICE_INSTANCES.has(e.name)){const t=new e;y.implementsLifecycleHooks(t)&&t.onCreated?.(),y.SERVICE_INSTANCES.set(e.name,t)}return this.SERVICE_INSTANCES.get(e.name)}static implementsLifecycleHooks(e){return"object"==typeof e&&"function"==typeof e.onCreated}static getAllBySuperType(e){return Array.from(y.SERVICE_INSTANCES.values()).filter(t=>t instanceof e)}}class I extends s{constructor(e){super(e)}hasAuthority(e){return this.items.includes(e)}}class f{}class _ extends f{mapToModel(e){return new I(e)}}class O extends t{constructor(e){super(),this.external=e?.external??!1,this.username=e?.username??"",this.password=e?.password??"",this.authorities=C.get(_).mapToModel(e?.authorities),this.appSettings=e?.appSettings??{}}}class m extends t{constructor(e){super(),this.appSettings=e.appSettings,this.authorities=C.get(_).mapToModel(e.authorities),this.enabled=e.enabled}}class P extends f{mapToModel(e){return new m(e)}}class N extends t{constructor(e){super(),this.authImplementation=e.authImplementation,this.enabled=e.enabled,this.passwordLoginEnabled=e.passwordLoginEnabled,this.freeAccess=C.get(P).mapToModel(e.freeAccess),this.overrideAuth=C.get(P).mapToModel(e.overrideAuth),this.openIdEnabled=e.openIdEnabled,this.userLoggedIn=e.userLoggedIn,this.freeAccessActive=e.freeAccessActive,this.hasExternalAuthUser=e.hasExternalAuthUser}}let b=function(e){return e.ROLE_ADMIN="ROLE_ADMIN",e.ROLE_USER="ROLE_USER",e.ROLE_MONITORING="ROLE_MONITORING",e.ROLE_REPO_MANAGER="ROLE_REPO_MANAGER",e.ROLE_CLUSTER="ROLE_CLUSTER",e.IS_AUTHENTICATED_FULLY="IS_AUTHENTICATED_FULLY",e}({});class L extends t{pages={};isRestricted(e){return this.pages[e]??!1}setPageRestriction(e,t=!0){return this.pages[e]=t,this}}class x extends t{constructor(e){super(),this.openIdKeys=e.openIdKeys,this.openIdTokenUrl=e.openIdTokenUrl,this.openIdKeysUri=e.openIdKeysUri,this.openIdEndSessionUrl=e.openIdEndSessionUrl,this.supportsOfflineAccess=e.supportsOfflineAccess}}let U=function(e){return e.READ="READ",e.WRITE="WRITE",e}({});class v extends f{mapToModel(e){return new w(e)}}class D extends t{constructor(e){super(),this.expiryDate=e.expiryDate,this.latestPublicationDate=e.latestPublicationDate,this.licensee=e.licensee||"",this.maxCpuCores=e.maxCpuCores,this.product=e.product||"",this.productType=e.productType||"",this.licenseCapabilities=C.get(v).mapToModel(e.licenseCapabilities),this.version=e.version||"",this.installationId=e.installationId||"",this.valid=e.valid,this.typeOfUse=e.typeOfUse||"",this.message=e.message||"",this.present=e.present||!1,this.usageRestriction=e.usageRestriction||""}get expiryDate(){return this._expiryDate}set expiryDate(e){this._expiryDate=e}get latestPublicationDate(){return this._latestPublicationDate}set latestPublicationDate(e){this._latestPublicationDate=e}get licensee(){return this._licensee}set licensee(e){this._licensee=e}get maxCpuCores(){return this._maxCpuCores}set maxCpuCores(e){this._maxCpuCores=e}get product(){return this._product}set product(e){this._product=e}get productType(){return this._productType}set productType(e){this._productType=e}get licenseCapabilities(){return this._licenseCapabilities}set licenseCapabilities(e){this._licenseCapabilities=e}get version(){return this._version}set version(e){this._version=e}get installationId(){return this._installationId}set installationId(e){this._installationId=e}get valid(){return this._valid}set valid(e){this._valid=e}get typeOfUse(){return this._typeOfUse}set typeOfUse(e){this._typeOfUse=e}get message(){return this._message}set message(e){this._message=e}get present(){return this._present}set present(e){this._present=e}get usageRestriction(){return this._usageRestriction}set usageRestriction(e){this._usageRestriction=e}}let M=function(e){return e.LUCENE_CONNECTOR="Lucene connector",e.SOLR_CONNECTOR="Solr connector",e.ELASTICSEARCH_CONNECTOR="Elasticsearch connector",e.OPENSEARCH_CONNECTOR="OpenSearch connector",e.KAFKA_CONNECTOR="Kafka connector",e.CLUSTER="Cluster",e}({});class w extends s{constructor(e){super(e)}}class G{constructor(e){this.workbench=e.Workbench||"",this.productType=e.productType||"",this.productVersion=e.productVersion||"",this.sesame=e.sesame||"",this.connectors=e.connectors||""}}class V{constructor(e){this.value=e}getValue(){return this.value}getValueOrDefault(e){return this.value||e}getAsJson(){if(null===this.value)return null;try{return JSON.parse(this.value)}catch(e){return console.error("Error parsing JSON",e),null}}}class B{static GLOBAL_NAMESPACE="ontotext.gdb"}class Y{constructor(e){this.languages=e}getLanguageCodes(){return this.languages?.map(e=>e.key)}}class k extends f{mapToModel(e){return new Y(e)}}class H extends t{constructor(e){super(),this.defaultLanguage=e.defaultLanguage,this.availableLanguages=C.get(k).mapToModel(e.availableLanguages)}}class ${constructor(e){this.policyAccepted=e?.policyAccepted,this.statistic=e?.statistic,this.thirdParty=e?.thirdParty,this.updatedAt=e?.updatedAt}}let K=function(e){return e.INFORMATION="INFORMATION",e.WARNING="WARNING",e.CRITICAL="CRITICAL",e}({});const F={[K.INFORMATION]:0,[K.WARNING]:1,[K.CRITICAL]:2};class q extends t{constructor(e){super(),this.id=`${e.group}-${e.status}-${e.totalOperations}`,this.group=e.group,this.totalOperations=e.totalOperations,this.status=e.status}}class W extends t{constructor(e){super(),this.status=e.status||K.INFORMATION,this.allRunningOperations=e.allRunningOperations}toOperationsGroupSummary(){const e=new Map;return this.allRunningOperations.getItems().forEach(t=>{e.has(t.group)||e.set(t.group,new q({group:t.group,totalOperations:0,status:K.INFORMATION}));const s=e.get(t.group);s.totalOperations+=t.count,F[t.status]>F[s.status]&&(s.status=t.status)}),Array.from(e.values())}}class j extends s{constructor(e){super(e)}}let Q=function(e){return e.UPDATES="updates",e.QUERIES="queries",e.IMPORT="imports",e.BACKUP_AND_RESTORE="backupAndRestore",e.CLUSTER_HEALTH="clusterHealth",e}({}),z=function(e){return e.QUERY="QUERY",e.BACKUP="BACKUP",e.CLUSTER="CLUSTER",e.IMPORT="IMPORT",e}({});const X=[Q.QUERIES,Q.UPDATES,Q.IMPORT],J={[Q.UPDATES]:"monitor/queries",[Q.QUERIES]:"monitor/queries",[Q.BACKUP_AND_RESTORE]:"monitor/backup-and-restore",[Q.IMPORT]:"import",[Q.CLUSTER_HEALTH]:"cluster"},Z={[Q.QUERIES]:z.QUERY,[Q.UPDATES]:z.QUERY,[Q.BACKUP_AND_RESTORE]:z.BACKUP,[Q.IMPORT]:z.IMPORT,[Q.CLUSTER_HEALTH]:z.CLUSTER};class ee extends t{constructor(e){super(),this.id=`${e.status}-${e.type}-${e.value}`,this.value=e.value,this.status=e.status,this.type=e.type,this.count=this.getCount(e),this.group=Z[e.type],this.href=J[e.type],this.labelKey=this.getLabelKey(e)}getCount(e){return X.includes(e.type)?parseInt(e.value,10):0}getLabelKey(e){return X.includes(e.type)?e.type:e.value}}class te extends s{constructor(e){super(e)}}let se=function(e){return e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e}({});class re{constructor(e){this.timeout=e?.timeout||5e3,this.onClick=e?.onClick,this.removeOnClick=e?.removeOnClick||!1}}class ie extends re{constructor(e){super(),this.timeout=e.timeout,this.position=e.position}static getDefaultConfig(){return this.instance||(this.instance=new ie({timeout:5e3,position:se.BOTTOM_RIGHT})),this.instance}}let ne=function(e){return e.ERROR="error",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e}({});class oe{static uuid(){const e=16;let t=(new Date).getTime(),s=1e3*(performance?.now()??0);return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let i=Math.random()*e;return t>0?(i=(t+i)%e|0,t=Math.floor(t/e)):(i=(s+i)%e|0,s=Math.floor(s/e)),("x"===r?i:3&i|8).toString(e)})}static hashCode(e){let t=0;for(let s=0,r=e.length;s<r;s++)t=(t<<5)-t+e.charCodeAt(s),t|=0;return t}}class ae{constructor(e,t,s){this.id=oe.uuid(),this.type=e,this.message=t,this.config=s}}const ue="create-toast-event";class ce extends s{constructor(e){super(e)}}class le extends s{constructor(e){super(e)}}class he extends t{constructor(e){super(),this.setRadio(e.isRadio),this.setButtons(new le(e.buttons))}getButtons(){return this.buttons}setButtons(e){this.buttons=e}isRadio(){return this.radio}setRadio(e){this.radio=e}selectButton(e){return this.isRadio()&&!e.selected&&(this.deselectAll(),e.selected=!0,e.callback()),this.copy()}deselectAll(){this.buttons.getItems().forEach(e=>e.selected=!1)}}class pe extends t{constructor(e){super(),this.id=e.id,this.label=e.label,this.selected=e.selected,this.callback=e.callback}}class ge extends s{constructor(e){super(e)}}class de extends t{constructor(e){super(),this.setSuggestions(e.suggestionList)}getSuggestions(){return this._suggestions}setSuggestions(e){this._suggestions=e}hoverFirstSuggestion(){return this.hoverSuggestion(this.getSuggestions().getItems()[0])}hoverSuggestion(e){return e&&(this.clearHoveredState(),e.setHovered(!0)),this.copy()}selectSuggestion(e){return e&&(this.clearSelectedState(),e.setSelected(!0)),this.copy()}getHoveredSuggestion(){return this.getSuggestions().getItems().find(e=>e.isHovered())}hoverPreviousSuggestion(){const e=this.getSuggestions().getItems().findIndex(e=>e.isHovered());return e>0&&(this.clearHoveredState(),this.getSuggestions().getItems()[e-1].setHovered(!0)),this.copy()}hoverNextSuggestion(){const e=this.getSuggestions().getItems().findIndex(e=>e.isHovered());return e<this.getSuggestions().getItems().length-1&&(this.clearHoveredState(),this.getSuggestions().getItems()[e+1].setHovered(!0)),this.copy()}clearSuggestions(){return this.setSuggestions(new ge),this.copy()}getByValue(e){return this.getSuggestions().getItems().find(t=>t.getValue()===e)}clearSelectedState(){this.getSuggestions().getItems().forEach(e=>e.setSelected(!1))}clearHoveredState(){this.getSuggestions().getItems().forEach(e=>e.setHovered(!1))}}class Ee extends t{overrideToVisual=!1;constructor(e){super(),this.setId(e.id),this.setType(e.type),this.setValue(e.value),this.setDescription(e.description)}getId(){return this._id}setId(e){this._id=e}getType(){return this._type}setType(e){this._type=e}getValue(){return this._value}setValue(e){this._value=e}getDescription(){return this._description}setDescription(e){this._description=e}isHovered(){return this._hovered}setHovered(e){this._hovered=e}isSelected(){return this._selected}setSelected(e){this._selected=e}getOverrideToVisual(){return this.overrideToVisual}setOverrideToVisual(e){this.overrideToVisual=e}}let Se=function(e){return e.URI="uri",e.PREFIX="prefix",e}({});class Ae{constructor(e,t){this.setSuggestion(e),this.setContext(t)}getSuggestion(){return this.suggestion}getContext(){return this.context}setContext(e){this.context=e}setSuggestion(e){this.suggestion=e}}let Re=function(e){return e.DATA_LOADED="DATA_LOADED",e}({});class Te extends t{constructor(e){super(),this._pluginDefinitions=e}getPluginDefinitions(){return this._pluginDefinitions}}let Ce=function(e){return e.ROUTE="route",e.MAIN_MENU="main.menu",e}({});class ye extends s{constructor(e){super(e)}}class Ie{callbackFunctions=[];beforeChangeValidationPromises=[];afterValueChangeCallbackFunctions=[];setValue(t){e.deepEqual(this.value,t)||(this.value=this.getCopy(t),this.callbackFunctions.forEach(e=>e(this.getValue())),this.afterValueChangeCallbackFunctions.forEach(e=>e(this.getValue())))}getValue(){return this.getCopy(this.value)}subscribe(e,t,s){return this.callbackFunctions.push(e),t&&this.beforeChangeValidationPromises.push(t),s&&this.afterValueChangeCallbackFunctions.push(s),()=>{this.callbackFunctions=this.callbackFunctions.filter(t=>t!==e),this.beforeChangeValidationPromises=this.beforeChangeValidationPromises.filter(e=>e!==t),this.afterValueChangeCallbackFunctions=this.afterValueChangeCallbackFunctions.filter(e=>e!==s)}}async canUpdate(e){if(0===this.beforeChangeValidationPromises.length)return!0;const t=this.beforeChangeValidationPromises.map(t=>t(e));try{return(await Promise.all(t)).every(e=>e)}catch{return!1}}getCopy(t){if(null!=t)return e.hasCopyMethod(t)?t.copy():e.deepCopy(t)}}class fe{subscribers=[];unsubFns=new r;subscribeToService(e){const t=this.subscribers.map(t=>e.subscribeAll(t.callback,t.beforeChangeValidationPromise,t.afterChangeCallback));return this.unsubFns.addAll(t),()=>t.forEach(e=>e())}subscribeToAllRegisteredContexts(e,t,s){const r=y.getAllBySuperType(_e).filter(e=>e.canSubscribeAll);for(const i of r)this.unsubFns.add(i.subscribeAll(e,t,s));const i={callback:e,beforeChangeValidationPromise:t,afterChangeCallback:s};this.subscribers.push(i);let n=!1;return()=>{if(n)return;n=!0,this.unsubFns.unsubscribeAll();const e=this.subscribers.indexOf(i);e>=0&&this.subscribers.splice(e,1)}}}class _e{context=new Map;_canSubscribeAll=!1;onCreated(){this._canSubscribeAll=!0,y.get(fe).subscribeToService(this)}updateContextProperty(e,t){this.getOrCreateValueContext(e).setValue(t)}validatePropertyChange(e,t){return this.getOrCreateValueContext(e).canUpdate(t)}getContextPropertyValue(e){const t=this.context.get(e);return t?t.getValue():void 0}subscribe(e,t,s,r){return t&&t(this.getContextPropertyValue(e)),r&&r(this.getContextPropertyValue(e)),this.getOrCreateValueContext(e).subscribe(t,s,r)}subscribeAll(e,t,s){const i=new r;for(const r of this.getContextFields())i.add(this.subscribe(r,e,t,s));return()=>i.unsubscribeAll()}getContextFields(){return Object.values(this).filter(e=>"string"==typeof e)}getOrCreateValueContext(e){let t=this.context.get(e);return t||(t=new Ie,this.context.set(e,t)),t}canHandle(e){for(const t in this)if(this[t]===e)return!0;return!1}get canSubscribeAll(){return this._canSubscribeAll}}class Oe{priority=0}class me{getStorage(){return localStorage}get(e){const t=this.getStorage().getItem(this.getPrefixedKey(e));return new V(t)}storeValue(e,t){this.getStorage().setItem(this.getPrefixedKey(e),t)}remove(e){this.getStorage().removeItem(this.getPrefixedKey(e))}getPrefixedKey(e){const t=`${B.GLOBAL_NAMESPACE}.${this.NAMESPACE}.`,s=`${this.NAMESPACE}.`;return e.startsWith(t)?e:e.startsWith(s)?`${B.GLOBAL_NAMESPACE}.${e}`:`${t}${e}`}}class Pe{handleStorageChange(e){const t=e.key?.substring(B.GLOBAL_NAMESPACE.length+1);let s="",r="";t&&(s=t.substring(0,t.indexOf(".")),r=t.substring(s.length+1));const i=this.resolveHandler(s,r);i&&i.updateContextProperty(r,e.newValue)}resolveHandler(e,t){if(!e)return void console.warn("Namespace is required to resolve a context property change handler.");const s=y.getAllBySuperType(_e).find(e=>e.canHandle(t));if(s)return s;console.warn(`No context property change handler found for namespace: ${e} and property: ${t}`)}}class Ne extends me{jwtKey="jwt";authenticatedKey="authenticated";NAMESPACE="auth";set(e,t){this.storeValue(e,t)}getAuthToken(){return this.get(this.jwtKey)}setAuthenticated(e){this.storeValue(this.authenticatedKey,e?.toString()||"")}isAuthenticated(){return"true"===this.get(this.authenticatedKey).getValue()}}class be extends me{NAMESPACE="repository";SELECTED_REPOSITORY="selectedRepository";set(e,t){t?this.storeValue(e,t):this.remove(e)}setRepositoryReference(e){this.set(this.SELECTED_REPOSITORY,this.serializeRepositoryReference(e))}getRepositoryReference(){return this.deserializeRepositoryReference(this.get(this.SELECTED_REPOSITORY).getValueOrDefault('{"id": "", "location": ""}'))}removeRepositoryReference(){this.remove(this.SELECTED_REPOSITORY)}serializeRepositoryReference(e){return JSON.stringify(e)}deserializeRepositoryReference(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){console.error("Error parsing repository reference",e)}}}class Le extends _e{RESTRICTED_PAGES="restrictedPages";SECURITY_CONFIG="securityConfig";AUTHENTICATED_USER="authenticatedUser";AUTH_TOKEN="jwt";OPEN_ID_CONFIG="openIdConfig";getRestrictedPages(){return this.getContextPropertyValue(this.RESTRICTED_PAGES)||new L}updateRestrictedPages(e){this.updateContextProperty(this.RESTRICTED_PAGES,e)}onRestrictedPagesChanged(e){return this.subscribe(this.RESTRICTED_PAGES,e)}onAuthTokenChanged(e){return this.subscribe(this.AUTH_TOKEN,e)}updateAuthToken(e){this.updateContextProperty(this.AUTH_TOKEN,e)}getAuthToken(){return this.getContextPropertyValue(this.AUTH_TOKEN)}updateSecurityConfig(e){this.updateContextProperty(this.SECURITY_CONFIG,e)}onSecurityConfigChanged(e){return this.subscribe(this.SECURITY_CONFIG,e)}getSecurityConfig(){return this.getContextPropertyValue(this.SECURITY_CONFIG)}updateAuthenticatedUser(e){this.updateContextProperty(this.AUTHENTICATED_USER,e)}onAuthenticatedUserChanged(e){return this.subscribe(this.AUTHENTICATED_USER,e)}getAuthenticatedUser(){return this.getContextPropertyValue(this.AUTHENTICATED_USER)}updateOpenIdConfig(e){return this.updateContextProperty(this.OPEN_ID_CONFIG,e)}getOpenIdConfig(){return this.getContextPropertyValue(this.OPEN_ID_CONFIG)}}const xe=new s([new class extends Oe{authStorage=y.get(Ne);repositoryStorageService=y.get(be);securityContextService=y.get(Le);process(e){e.headers=e.headers||{},e.headers["X-Requested-With"]="XMLHttpRequest";const t=this.authStorage.getAuthToken().getValue();if(t&&(e.headers.Authorization=t),!e.headers["X-GraphDB-Repository"]){const t=this.repositoryStorageService.getRepositoryReference();t?.id&&(e.headers["X-GraphDB-Repository"]=t.id),t?.location&&(e.headers["X-GraphDB-Repository-Location"]=t.location)}return Promise.resolve(e)}shouldProcess(e){const t=this.securityContextService.getOpenIdConfig();if(!t)return!0;const s=t?.openIdKeysUri,r=t?.openIdTokenUrl;return!s||!r||![t?.openIdKeysUri,t?.openIdTokenUrl].some(t=>t&&e.url.indexOf(t)>-1)}}]),Ue=new s([]);class ve{preProcessors=new s;postProcessors=new s;constructor(){this.registerRequestInterceptors(xe),this.registerResponseInterceptors(Ue)}async preProcess(e){let t=e;for(const e of this.preProcessors.getItems())e.shouldProcess(t)&&(t=await e.process(t));return t}async postProcess(e){let t=e;for(const e of this.postProcessors.getItems())e.shouldProcess(t)&&(t=await e.process(t));return t}registerRequestInterceptors(e){this.preProcessors.addItems(e.getItems()),this.sortInterceptors(this.preProcessors)}registerResponseInterceptors(e){this.postProcessors.addItems(e.getItems()),this.sortInterceptors(this.postProcessors)}sortInterceptors(e){e.sort((e,t)=>t.priority-e.priority)}}class De{constructor(e){this.url=e.url,this.method=e.method,this.headers={...e.headers},this.body=e.body}}class Me{emit(e){const t=new CustomEvent(e.NAME,{detail:e.payload});return this.getHostElement().dispatchEvent(t),t}subscribe(e,t){const s=e=>{e instanceof CustomEvent&&t(e.detail)};return this.getHostElement().addEventListener(e,s),()=>this.getHostElement().removeEventListener(e,s)}getHostElement(){return document.body}}const we=["application/json","application/sparql-results+json"],Ge="http-request-done-event";class Ve{interceptorService=y.get(ve);eventEmitter=new Me;get(e,t,s){return this.request(e,"GET",{params:t,headers:s}).then(e=>e)}post(e,t,s){return this.request(e,"POST",{body:t,headers:s})}put(e,t,s){return this.request(e,"PUT",{body:t,headers:s})}delete(e,t){return this.request(e,"DELETE",{headers:t})}patch(e,t,s){return this.request(e,"PATCH",{body:t,headers:s})}encodeURIComponentStrict(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16)})}request(e,t,s={}){const r=this.buildQueryParams(s.params),i=`${e}${r?`?${r}`:""}`,n={"Content-Type":"application/json",Accept:"application/json, text/plain, */*",...s.headers};return this.interceptorService.preProcess(new De({url:i,method:t,headers:n,body:s.body})).then(e=>fetch(e.url,{method:e.method,headers:e.headers,body:e.body?JSON.stringify(e.body):null})).then(e=>this.interceptorService.postProcess(e)).then(e=>e.ok?this.hasValidJson(e)?e.json():Promise.resolve():Promise.reject(e)).finally(()=>this.eventEmitter.emit({NAME:Ge,payload:void 0}))}hasValidJson(e){const t=e.headers.get("Content-Type");return!!t&&we.some(e=>t.includes(e))}buildQueryParams(e={}){return new URLSearchParams(e).toString()}}class Be extends Ve{I18N_ENDPOINT="assets/i18n";getLanguage(e){return this.get(`${this.I18N_ENDPOINT}/${e}.json`)}getLanguageConfiguration(){return this.get(`${this.I18N_ENDPOINT}/language-config.json`)}}class Ye extends f{mapToModel(e){return new H(e)}}class ke extends me{NAMESPACE="i18n";set(e,t){this.storeValue(e,t)}}class He extends _e{LANGUAGE_CONFIG="languageConfig";SELECTED_LANGUAGE="selectedLanguage";LANGUAGE_BUNDLE="languageBundle";DEFAULT_BUNDLE="defaultBundle";updateSelectedLanguage(e){this.validatePropertyChange(this.SELECTED_LANGUAGE,e).then(t=>{if(t){const t=e||y.get($e).getDefaultLanguage();y.get(ke).set(this.SELECTED_LANGUAGE,t),this.updateContextProperty(this.SELECTED_LANGUAGE,e)}})}onSelectedLanguageChanged(e,t){return this.subscribe(this.SELECTED_LANGUAGE,e,t)}updateLanguageBundle(e){this.updateContextProperty(this.LANGUAGE_BUNDLE,e)}onLanguageBundleChanged(e){return this.subscribe(this.LANGUAGE_BUNDLE,e)}updateDefaultBundle(e){this.updateContextProperty(this.DEFAULT_BUNDLE,e)}getDefaultBundle(){return this.getContextPropertyValue(this.DEFAULT_BUNDLE)}getLanguageConfig(){return this.getContextPropertyValue(this.LANGUAGE_CONFIG)}setLanguageConfig(e){this.updateContextProperty(this.LANGUAGE_CONFIG,e)}getSelectedLanguage(){return this.getContextPropertyValue(this.SELECTED_LANGUAGE)}}class $e{languageRestService=y.get(Be);languageContextService=y.get(He);getSupportedLanguages(){const e=this.languageContextService.getLanguageConfig();return e?e.availableLanguages.getLanguageCodes():["en","fr"]}getLanguage(e){return this.languageRestService.getLanguage(e)}getLanguageConfiguration(){return this.languageRestService.getLanguageConfiguration().then(e=>C.get(Ye).mapToModel(e))}getDefaultLanguage(){const e=this.languageContextService.getLanguageConfig();return e?e.defaultLanguage:"en"}}class Ke extends Ve{static REPOSITORIES_ENDPOINT="rest/repositories";getRepositories(){return this.get(`${Ke.REPOSITORIES_ENDPOINT}/all`)}getRepositorySizeInfo(e){return this.get(`${Ke.REPOSITORIES_ENDPOINT}/${e.id}/size?location=${encodeURIComponent(e.location)}`)}}class Fe extends f{mapToModel(e){return new i(e)}}class qe extends f{constructor(){super(),this.repositoryMapper=C.get(Fe)}mapToModel(e){if(!e||"object"!=typeof e)return new o;const t=[];return Object.entries(e).forEach(([,e])=>{Array.isArray(e)&&e.forEach(e=>{const s=this.repositoryMapper.mapToModel(e);t.push(s)})}),new o(t)}}class We extends f{mapToModel(e){return new a(e)}}class je{GRAPHQL_REPO_AUTHORITY="GRAPHQL";constructor(){this.repositoryRestService=y.get(Ke),this.repositoryListMapper=C.get(qe),this.repositorySizeInfoMapper=C.get(We)}getRepositories(){return this.repositoryRestService.getRepositories().then(e=>this.repositoryListMapper.mapToModel(e))}getRepositorySizeInfo(e){return this.repositoryRestService.getRepositorySizeInfo(e).then(this.repositorySizeInfoMapper.mapToModel)}isSystemRepository(e){return"SYSTEM"===e.id}getCurrentGqlRepoAuthority(e,t){return`${this.getCurrentRepoAuthority(e,t)}:${this.GRAPHQL_REPO_AUTHORITY}`}getOverallGqlRepoAuthority(e){return`${this.getOverallRepoAuthority(e)}:${this.GRAPHQL_REPO_AUTHORITY}`}getLocationSpecificId(e){return e.location?`${e.id}@${e.location}`:e.id}getCurrentRepoAuthority(e,t){return`${e}_REPO_${t}`}getOverallRepoAuthority(e){return`${e}_REPO_*`}}class Qe extends _e{SELECTED_REPOSITORY="selectedRepository";REPOSITORY_LIST="repositoryList";updateSelectedRepository(e){const t=y.get(be),s=this.findRepository(e);this.validatePropertyChange(this.SELECTED_REPOSITORY,s).then(r=>{r&&(s?t.setRepositoryReference(s.toRepositoryReference()):e||t.removeRepositoryReference(),this.updateContextProperty(this.SELECTED_REPOSITORY,s))})}getSelectedRepository(){return this.getContextPropertyValue(this.SELECTED_REPOSITORY)}onSelectedRepositoryChanged(e,t){return this.subscribe(this.SELECTED_REPOSITORY,e,t)}updateRepositoryList(e){return this.updateContextProperty(this.REPOSITORY_LIST,e)}getRepositoryList(){return this.getContextPropertyValue(this.REPOSITORY_LIST)||new o([])}onRepositoryListChanged(e){return this.subscribe(this.REPOSITORY_LIST,e)}findRepository(e){if(e)return this.getRepositoryList().findRepository(e.id,e.location)}}class ze extends Ve{getActiveRepositoryLocation(){return this.get("rest/locations/active")}}class Xe extends f{mapToModel(e){return new h(e)}}class Je{constructor(){this.locationRestService=y.get(ze),this.repositoryLocationMapper=C.get(Xe)}getActiveRepositoryLocation(){return this.locationRestService.getActiveRepositoryLocation().then(this.repositoryLocationMapper.mapToModel)}}class Ze extends _e{ACTIVE_REPOSITORY_LOCATION="activeRepositoryLocation";IS_LOADING="isLoading";updateActiveRepositoryLocation(e){this.updateContextProperty(this.ACTIVE_REPOSITORY_LOCATION,e)}onActiveLocationChanged(e){return this.subscribe(this.ACTIVE_REPOSITORY_LOCATION,e)}updateIsLoading(e){this.updateContextProperty(this.IS_LOADING,e)}onIsLoadingChanged(e){return this.subscribe(this.IS_LOADING,e)}}class et extends Ve{getLicense(){return this.get("rest/graphdb-settings/license")}}class tt extends f{mapToModel(e){return new D(e)}}class st extends _e{GRAPHDB_LICENSE="graphDbLicense";updateGraphdbLicense(e){this.updateContextProperty(this.GRAPHDB_LICENSE,e)}onLicenseChanged(e){return this.subscribe(this.GRAPHDB_LICENSE,e)}getLicense(){return this.getContextPropertyValue(this.GRAPHDB_LICENSE)}}class rt{licenseRestService=y.get(et);licenseMapper=y.get(tt);trackableProductTypes=["free","sandbox"];trackableTypesOfUse=["evaluation","this is an evaluation license"];getLicense(){return this.licenseRestService.getLicense().then(e=>this.licenseMapper.mapToModel(e))}isTrackableLicense(){const e=y.get(st).getLicense(),t=e?.typeOfUse?.toLowerCase()||"",s=e?.productType?.toLowerCase()||"";return!e?.present||this.trackableProductTypes.includes(s)||this.trackableTypesOfUse.includes(t)}}class it extends _e{PRODUCT_INFO="productInfo";updateProductInfo(e){this.updateContextProperty(this.PRODUCT_INFO,e)}onProductInfoChanged(e){return this.subscribe(this.PRODUCT_INFO,e)}}class nt extends f{mapToModel(e){return new G(e)}}class ot extends Ve{VERSION_URL="rest/info/version";getProductInfoLocal(){return this.get(`${this.VERSION_URL}?local=1`)}}class at{productInfoMapper=y.get(nt);productInfoService=y.get(ot);getProductInfoLocal(){return this.productInfoService.getProductInfoLocal().then(e=>this.productInfoMapper.mapToModel(e))}}class ut extends f{mapToModel(e){return new N(e)}}class ct{constructor(e){this.notify=e}}class lt{eventSubscribers=new Map;emit(t){const s=this.eventSubscribers.get(t.NAME);s&&s.forEach(s=>{s.notify(e.deepCopy(t.payload))})}subscribe(e,t){const s=new ct(t),r=this.eventSubscribers.get(e);return r?r.push(s):this.eventSubscribers.set(e,[s]),()=>this.unsubscribe(e,s)}unsubscribe(e,t){const s=this.eventSubscribers.get(e);if(s){const r=s.indexOf(t);-1!==r&&s.splice(r,1),0===s.length&&this.eventSubscribers.delete(e)}}}class ht{constructor(e,t){this.setRegex(e),this.setRouteParams(t)}getRegex(){return this.regex}setRegex(e){return this.regex=e,this}getRouteParams(){return this.routeParams}setRouteParams(e){return this.routeParams=e,this}}class pt{constructor(e){this._url=e.url,this._module=e.module,this._path=e.path,this._chunk=e.chunk,this._controller=e.controller,this._templateUrl=e.templateUrl,this._title=e.title,this._reloadOnSearch=e.reloadOnSearch,this._helpInfo=e.helpInfo,this._documentationUrl=e.documentationUrl,this._allowAuthorities=e.allowAuthorities}get url(){return this._url}set url(e){this._url=e}get module(){return this._module}set module(e){this._module=e}get path(){return this._path}set path(e){this._path=e}get chunk(){return this._chunk}set chunk(e){this._chunk=e}get controller(){return this._controller}set controller(e){this._controller=e}get templateUrl(){return this._templateUrl}set templateUrl(e){this._templateUrl=e}get title(){return this._title}set title(e){this._title=e}get reloadOnSearch(){return this._reloadOnSearch}set reloadOnSearch(e){this._reloadOnSearch=e}get helpInfo(){return this._helpInfo}set helpInfo(e){this._helpInfo=e}get documentationUrl(){return this._documentationUrl}set documentationUrl(e){this._documentationUrl=e}get allowAuthorities(){return this._allowAuthorities}set allowAuthorities(e){this._allowAuthorities=e}}class gt{static getWindow(){return window}static getPluginRegistry(){return gt.getWindow().PluginRegistry}}function dt(e){return t=>{t&&t.preventDefault(),Et(e)}}function Et(e){gt.getWindow().singleSpa.navigateToUrl(e)}function St(e){gt.getWindow().open(e,"_blank")}function At(){return"/"===Rt()}function Rt(){return gt.getWindow().location.pathname.substring(Ct().length-1)}function Tt(){return`${gt.getWindow().location.origin}${Ct()}`}function Ct(){return document.querySelector("base")?.getAttribute("href")??"/"}function yt(){return Rt().substring(1)}class It{routeConfig=gt.getWindow().PluginRegistry.get(Ce.ROUTE);getActiveRoute(e=Rt()){const t=this.routeConfig.find(t=>this.routeToRegex(t.url).getRegex().test(e));return t?new pt(t):void 0}routeToRegex(e){const t=[],r=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(e,s,r,i){const n="?"===i||"*?"===i,o="*"===i||"*?"===i;return t.push(r),s=s||"",(n?"(?:"+s:s+"(?:")+(o?"(.+?)":"([^/]+)")+(n?"?)?":")")}).replace(/([/$*])/g,"\\$1");return new ht(new RegExp("^"+r+"(?:[?#]|$)"),new s(t))}}class ft{repositoryService=y.get(je);securityContextService=y.get(Le);login(){return"Authentication.login from the API"}logout(){y.get(lt).emit(new R)}isAuthenticated(){const e=this.getSecurityConfig();return!(!e?.enabled||!e?.userLoggedIn)}hasFreeAccess(){const e=this.getSecurityConfig();return e?.enabled&&e?.freeAccessActive}hasRole(e){const t=this.getSecurityConfig(),s=this.getAuthenticatedUser();return!e||!t?.enabled||!!(Object.keys(s||{}).length>0)&&(b.IS_AUTHENTICATED_FULLY===e||s?.authorities.hasAuthority(e))}isSecurityEnabled(){return!!this.getSecurityConfig()?.enabled}canReadRepo(e){if(!e||""===e.id)return!1;const t=this.getSecurityConfig(),s=this.getAuthenticatedUser();return!t?.enabled||!!s&&(!!this.isAdminOrRepoManager()||!this.repositoryService.isSystemRepository(e)&&this.hasBaseRights(U.READ,e))}canReadGqlRepo(e){return!(!e||""===e.id)&&this.hasGraphqlAuthority(U.READ,e)}canWriteGqlRepo(e){return!(!e||""===e.id)&&this.hasGraphqlAuthority(U.WRITE,e)}hasGqlRights(e){return this.canReadGqlRepo(e)||this.canWriteGqlRepo(e)}hasAuthority(){if(this.hasRole(b.ROLE_ADMIN))return!0;const e=y.get(It).getActiveRoute();if(!e)return!1;if(!e.allowAuthorities)return!0;if(!y.get(be).getRepositoryReference()?.id)return!0;const t=this.getAuthenticatedUser();return!t||!e.allowAuthorities.length||this.resolveAuthorities(e.allowAuthorities).some(e=>t.authorities.hasAuthority(e))}resolveAuthorities(e){if(!e)return[];const t=y.get(be).getRepositoryReference();return t?.id?[...e.map(e=>e.replace("{repoId}",t.id)),...e.map(e=>e.replace("{repoId}","*"))]:e}hasGraphqlAuthority(e,t){const s=this.securityContextService.getAuthenticatedUser();if(!s)return!1;const r=this.repositoryService.getLocationSpecificId(t),i=this.repositoryService.getCurrentGqlRepoAuthority(e,r),n=this.repositoryService.getOverallGqlRepoAuthority(e);return s.authorities.hasAuthority(i)||s.authorities.hasAuthority(n)}isAdminOrRepoManager(){return this.hasRole(b.ROLE_ADMIN)||this.hasRole(b.ROLE_REPO_MANAGER)}getSecurityConfig(){return y.get(Le).getSecurityConfig()}getAuthenticatedUser(){return y.get(Le).getAuthenticatedUser()}hasBaseRights(e,t){const s=this.repositoryService.getLocationSpecificId(t),r=this.repositoryService.getCurrentRepoAuthority(e,s),i=this.repositoryService.getOverallRepoAuthority(e),n=this.getAuthenticatedUser();return!(!n?.authorities.hasAuthority(r)&&!n?.authorities.hasAuthority(i))}}class _t extends f{mapToModel(e){return new O(e)}}class Ot extends Ve{SECURITY_ENDPOINT="rest/security";updateUserData(e){return this.patch(`${this.SECURITY_ENDPOINT}/users/${this.encodeURIComponentStrict(e.username)}`,{appSettings:e.appSettings})}getSecurityConfig(){return this.get(`${this.SECURITY_ENDPOINT}/all`)}getAuthenticatedUser(){return this.get(`${this.SECURITY_ENDPOINT}/authenticated-user`)}}class mt{securityRestService=y.get(Ot);securityContextService=y.get(Le);updateUserData(e){return this.securityRestService.updateUserData(e).then(()=>this.securityContextService.updateAuthenticatedUser(e))}getSecurityConfig(){return this.securityRestService.getSecurityConfig().then(e=>C.get(ut).mapToModel(e))}getAuthenticatedUser(){return this.securityRestService.getAuthenticatedUser().then(e=>C.get(_t).mapToModel(e))}}class Pt extends f{mapToModel(e){return new x(e)}}const Nt="cookie-consent-changed-event";class bt{eventEmitter=new Me;acceptCookiePolicy(){const e=this.setAcceptedCookiePolicy();return y.get(mt).updateUserData(e).then(()=>{this.eventEmitter.emit({NAME:Nt,payload:e.appSettings.COOKIE_CONSENT})})}setAcceptedCookiePolicy(){const e=y.get(Le).getAuthenticatedUser()||new O({});let t;return t=e.appSettings?.COOKIE_CONSENT?new $(e.appSettings.COOKIE_CONSENT):new $({thirdParty:!0,statistic:!0}),t.policyAccepted=!0,t.updatedAt=Date.now(),e.appSettings.COOKIE_CONSENT=t,e}}class Lt extends Ve{MONITORING_ENDPOINT="rest/monitor";getOperations(e){return this.get(`${this.MONITORING_ENDPOINT}/repository/${e}/operations`)}}const xt={[Q.CLUSTER_HEALTH]:0,[Q.BACKUP_AND_RESTORE]:1,[Q.IMPORT]:2,[Q.QUERIES]:3,[Q.UPDATES]:4};class Ut extends f{mapToModel(e){return new j(e.map(e=>new ee(e)).sort((e,t)=>xt[e.type]-xt[t.type]))}}class vt extends f{mapToModel(e){return new W({status:e.status,allRunningOperations:C.get(Ut).mapToModel(e.allRunningOperations||[])})}}class Dt{getOperations(e){return y.get(Lt).getOperations(e).then(e=>C.get(vt).mapToModel(e))}}class Mt extends f{mapToModel(e){return new te(e)}}class wt{eventEmitter=new Me;error(e,t){this.createToastElement(e,ne.ERROR,t)}info(e,t){this.createToastElement(e,ne.INFO,t)}success(e,t){this.createToastElement(e,ne.SUCCESS,t)}warning(e,t){this.createToastElement(e,ne.WARNING,t)}createToastElement(e,t,s){this.eventEmitter.emit({NAME:ue,payload:new ae(t,e,s)})}}class Gt extends Ve{autocompleteRestPrefix="rest/autocomplete";search(e){return this.get(`${this.autocompleteRestPrefix}/query?q=${e}`)}enabled(){return this.get(`${this.autocompleteRestPrefix}/enabled`)}}class Vt extends f{mapToModel(e){return new ge(e.map(e=>new Ee({...e,id:oe.hashCode(`${e.type}-${e.value}-${e.description}`)})))}}class Bt extends f{mapToModel(e){return new de({...e,suggestionList:C.get(Vt).mapToModel(e.suggestions)})}}class Yt{search(e){return y.get(Gt).search(e).then(e=>C.get(Bt).mapToModel(e))}isAutocompleteEnabled(){return y.get(Gt).enabled()}}class kt extends me{ENABLED_KEY="enabled";NAMESPACE="autocomplete";set(e,t){this.storeValue(e,t)}isEnabled(){return"true"===this.get(this.ENABLED_KEY).value}setEnabled(e){this.set(this.ENABLED_KEY,e.toString())}}class Ht extends _e{AUTOCOMPLETE_ENABLED="isAutocompleteEnabled";updateAutocompleteEnabled(e){this.updateContextProperty(this.AUTOCOMPLETE_ENABLED,e),y.get(kt).setEnabled(e)}onAutocompleteEnabledChanged(e){return this.subscribe(this.AUTOCOMPLETE_ENABLED,e)}}class $t extends f{mapToModel(e){const t=e?.results.bindings||[];return new l(t.reduce((e,t)=>(e[t.prefix.value]=t.namespace.value,e),{}))}}class Kt extends Ve{REPOSITORIES_ENDPOINT="repositories";getNamespaces(e){return this.get(`${this.REPOSITORIES_ENDPOINT}/${e}/namespaces`)}}class Ft{namespaceMapper=C.get($t);namespacesRestService=y.get(Kt);getNamespaces(e){return this.namespacesRestService.getNamespaces(e).then(e=>this.namespaceMapper.mapToModel(e))}}class qt extends _e{NAMESPACES="namespaces";updateNamespaces(e){this.updateContextProperty(this.NAMESPACES,e)}onNamespacesChanged(e){return this.subscribe(this.NAMESPACES,e)}}class Wt extends me{SELECTED_VIEW_KEY="selectedView";INPUT_KEY="input";LAST_SELECTED_KEY="lastSelected";NAMESPACE="resourceSearch";LEGACY_LAST_SELECTED_KEY="ls.rdf-search.resource-description";LEGACY_INPUT_KEY="ls.rdf-search.search-input";LEGACY_SELECTED_VIEW_KEY="ls.rdf-search.search-type";set(e,t){this.storeValue(e,t)}setSelectedView(e){this.set(this.SELECTED_VIEW_KEY,e),localStorage.setItem(this.LEGACY_SELECTED_VIEW_KEY,e)}getSelectedView(){return this.get(this.SELECTED_VIEW_KEY).getValue()||""}setInputValue(e){this.set(this.INPUT_KEY,e),localStorage.setItem(this.LEGACY_INPUT_KEY,e)}getInputValue(){return this.get(this.INPUT_KEY).getValue()||""}setLastSelected(e){this.set(this.LAST_SELECTED_KEY,e.getValue()),localStorage.setItem(this.LEGACY_LAST_SELECTED_KEY,e.getDescription()||"")}getLastSelectedValue(){return this.get(this.LAST_SELECTED_KEY).getValue()||""}clearStoredSearch(){this.remove(this.INPUT_KEY),this.remove(this.LAST_SELECTED_KEY),localStorage.removeItem(this.LEGACY_INPUT_KEY),localStorage.removeItem(this.LEGACY_LAST_SELECTED_KEY)}}class jt extends _e{PREVIOUS_ROUTE="previousRoute";updatePreviousRoute(e){this.updateContextProperty(this.PREVIOUS_ROUTE,e)}getPreviousRoute(){let e=this.getContextPropertyValue(this.PREVIOUS_ROUTE);return e?.endsWith("#")&&(e=e.slice(0,-1)),e}}class Qt extends _e{APPLICATION_DATA_STATE="applicationDataLoaded";updateApplicationDataState(e){this.updateContextProperty(this.APPLICATION_DATA_STATE,e)}onApplicationDataStateChanged(e){return this.subscribe(this.APPLICATION_DATA_STATE,e)}}class zt extends Ve{getPluginsManifest(){return this.get("plugins/plugins-manifest.json")}async loadPlugins(e){return await Promise.all(e.getPluginDefinitions().getItems().map(async e=>{try{const t=e.entry.startsWith("http")?e.entry:`${Tt()}${e.entry}`;return await import(t)}catch(t){console.error(`Failed to load plugin ${e.name}:`,t)}}))}}class Xt extends f{mapToModel(e){const t=new ye(e.plugins);return new Te(t)}}class Jt{constructor(){this.pluginsRestService=y.get(zt),this.pluginsManifestMapper=new Xt}async getPluginsManifest(){return await this.pluginsRestService.getPluginsManifest().then(e=>this.pluginsManifestMapper.mapToModel(e))}async loadPlugins(){let e;try{e=await this.getPluginsManifest()}catch(e){console.warn("Failed to load plugins manifest. Continue with the built-in plugins only.",e)}e&&(await this.pluginsRestService.loadPlugins(e)).filter(e=>void 0!==e).forEach(e=>{e.register(gt.getPluginRegistry())})}}class Zt{static isDevMode(){return gt.getWindow().wbDevMode}}class es{static ABS_URI_REGEX=/^<?(http|urn).*>?/;static GRAPHS_VISUALIZATIONS_URL="graphs-visualizations";static RESOURCE_URL="resource";static BASE_DOCUMENTATION_URL="https://graphdb.ontotext.com/documentation/";static LATEST_UNOFFICIAL_VERSION="master";static shortenIri(e){const t=document.createElement("a");t.href=e;let s=t.hostname;return es.containsIPV4(t.hostname)||(s=t.hostname.split(".")[0]),s+":"+t.port}static containsIPV4(e){const t=e.split(".");for(let e=0,s=0;e<t.length;e++)if(parseInt(t[e],10)>=0&&parseInt(t[e],10)<=255?s++:s=0,4===s)return!0;return!1}static createAutocompleteRedirect(e,t){return`${e}?uri=${encodeURIComponent(t)}`}static removeAngleBrackets(e){return e?.startsWith("<")&&e?.endsWith(">")?e.substring(1,e.length-1):e}static isValidUri(e){let t=!1;if(this.hasValidProtocol(e))if(e.indexOf("http")>=0){const s=e.indexOf("//");t=s>4&&e.substring(s+2).length>0}else e.indexOf("urn")>=0&&(t=e.substring(4).length>0);return t}static resolveDocumentationUrl(e,t){if(!e||!t)throw new Error("Product version and endpoint path are required for documentation URL resolution.");const s=e.includes("-"),r=Zt.isDevMode()||s?this.LATEST_UNOFFICIAL_VERSION:e;return`${this.BASE_DOCUMENTATION_URL}${r}/${t}`}static hasAngleBrackets(e){return e.startsWith("<")&&e.endsWith(">")}static hasNoAngleBrackets(e){return!e.startsWith("<")&&!e.endsWith(">")}static hasValidProtocol(e){return this.ABS_URI_REGEX.test(e)&&(this.hasNoAngleBrackets(e)||this.hasAngleBrackets(e))}}class ts{fibo1=0;fibo2=1;next(){const e=this.fibo2;return this.fibo2=this.fibo1+this.fibo2,this.fibo1=e,e}reset=()=>{this.fibo1=0,this.fibo2=1}}export{Qt as ApplicationLifecycleContextService,O as AuthenticatedUser,_t as AuthenticatedUserMapper,ft as AuthenticationService,Ne as AuthenticationStorageService,T as AuthenticationType,b as Authority,I as AuthorityList,Ht as AutocompleteContextService,de as AutocompleteSearchResult,Yt as AutocompleteService,kt as AutocompleteStorageService,Y as AvailableLanguagesList,Zt as BuildUtil,Nt as COOKIE_CONSENT_CHANGED_EVENT,ue as CREATE_TOAST_EVENT,M as Capability,w as CapabilityList,_e as ContextService,fe as ContextSubscriptionManager,$ as CookieConsent,bt as CookieService,g as Event,Me as EventEmitter,d as EventName,lt as EventService,Ce as ExtensionPoint,ts as FibonacciGenerator,Ge as HTTP_REQUEST_DONE_EVENT,H as LanguageConfig,He as LanguageContextService,Be as LanguageRestService,$e as LanguageService,ke as LanguageStorageService,D as License,st as LicenseContextService,rt as LicenseService,Re as LifecycleState,me as LocalStorageService,Pe as LocalStorageSubscriptionHandlerService,R as Logout,C as MapperProvider,t as Model,s as ModelList,Lt as MonitoringRestService,Dt as MonitoringService,l as NamespaceMap,qt as NamespacesContextService,Ft as NamespacesService,jt as NavigationContextService,E as NavigationEnd,S as NavigationEndPayload,A as NavigationStart,e as ObjectUtil,wt as OntoToastrService,x as OpenIdConfig,Pt as OpenidConfigMapper,ee as Operation,z as OperationGroup,q as OperationGroupSummary,te as OperationGroupSummaryList,Mt as OperationGroupSummaryListMapper,j as OperationList,K as OperationStatus,W as OperationStatusSummary,vt as OperationSummaryMapper,Q as OperationType,ye as PluginDefinitionList,Te as PluginsManifest,zt as PluginsRestService,Jt as PluginsService,G as ProductInfo,it as ProductInfoContextService,at as ProductInfoService,i as Repository,Qe as RepositoryContextService,o as RepositoryList,qe as RepositoryListMapper,h as RepositoryLocation,Ze as RepositoryLocationContextService,Je as RepositoryLocationService,p as RepositoryLocationType,Ke as RepositoryRestService,je as RepositoryService,a as RepositorySizeInfo,u as RepositoryState,be as RepositoryStorageService,c as RepositoryType,Wt as ResourceSearchStorageService,L as RestrictedPages,U as Rights,F as STATUS_ORDER,pe as SearchButton,he as SearchButtonConfig,le as SearchButtonList,N as SecurityConfig,ut as SecurityConfigMapper,Le as SecurityContextService,mt as SecurityService,y as ServiceProvider,V as StorageData,B as StorageKey,r as SubscriptionList,Ee as Suggestion,ge as SuggestionList,Vt as SuggestionListMapper,Ae as SuggestionSelectedPayload,Se as SuggestionType,ae as ToastMessage,ce as ToastMessageList,ne as ToastType,ie as ToastrConfig,se as ToastrPosition,es as UriUtil,gt as WindowService,Ct as getContextName,yt as getCurrentRoute,Tt as getOrigin,Rt as getPathName,At as isHomePage,Et as navigate,dt as navigateTo,St as openInNewTab};
1
+ class e{static deepEqual(t,s){if(t===s)return!0;if(null==t||null==s)return!1;if("object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;if(Array.isArray(t)&&Array.isArray(s)){if(t.length!==s.length)return!1;for(let r=0;r<t.length;r++)if(!e.deepEqual(t[r],s[r]))return!1;return!0}if(!Array.isArray(t)&&!Array.isArray(s)){const r=Object.keys(t),i=Object.keys(s);if(r.length!==i.length)return!1;for(const i of r)if(!(i in s)||!e.deepEqual(t[i],s[i]))return!1;return!0}return!1}return!1}static deepCopy(t){if("object"!=typeof t||null==t||"function"==typeof t)return t;if(Array.isArray(t))return t.map(t=>e.deepCopy(t));const s=Object.create(Object.getPrototypeOf(t));for(const r of Object.keys(t))s[r]=e.deepCopy(t[r]);return s}static hasCopyMethod(e){return"object"==typeof e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"copy")&&"function"==typeof e.copy}}class t{copy(){return e.deepCopy(this)}}class s extends t{constructor(e=[]){super(),this.items=e}getItems(){return this.items}sort(e){this.items.sort(e)}filter(e){return this.items.filter(e)}find(e){return this.items.find(e)}isEmpty(){return 0===this.items.length}addToStart(e){this.items.unshift(e)}addItems(e){this.items.push(...e)}remove(e){const t=this.items.indexOf(e);-1!==t&&this.items.splice(t,1)}}class r extends s{constructor(e){super(e)}add(e){this.items.push(e)}addAll(e){this.items.push(...e)}unsubscribeAll(){this.items.forEach(e=>e()),this.items=[]}}class i extends t{constructor(e){super(),this.id=e?.id||"",this.title=e?.title||"",this.type=e?.type,this.sesameType=e?.sesameType,this.uri=e?.uri||"",this.externalUrl=e?.externalUrl||"",this.location=e?.location||"",this.state=e?.state,this.local=e?.local,this.readable=e?.readable,this.writable=e?.writable,this.unsupported=e?.unsupported,this.isNew=e?.isNew}toRepositoryReference(){return{id:this.id,location:this.location}}}const n=(e,t)=>{const s=e.location.localeCompare(t.location);return 0!==s?s:e.id.localeCompare(t.id)};class o extends s{constructor(e){super(e)}findRepository(e,t){return super.find(s=>s.id===e&&s.location===t)}sortByLocationAndId(){super.sort(n)}filterByRepository(e){return super.filter(this.createIdLocationFilter(e))}createIdLocationFilter(e){return t=>e.some(e=>e.id!==t.id||e.location!==t.location)}}class a extends t{constructor(e){super(),this.inferred=e?.inferred||0,this.total=e?.total||0,this.explicit=e?.explicit||0}}let u=function(e){return e.INACTIVE="INACTIVE",e.STARTING="STARTING",e.RUNNING="RUNNING",e.RESTARTING="RESTARTING",e.STOPPING="STOPPING",e}({}),c=function(e){return e.GRAPH_DB="graphdb",e.ONTOP="ontop",e.FEDEX="fedex",e.SYSTEM="system",e}({});class h{constructor(e){this.setNamespaces(e)}setNamespaces(e){this.namespaces=e}getByPrefix(e){return this.namespaces[e]||""}}class l extends t{constructor(e){super(),this.uri=e?.uri||"",this.label=e?.label||"",this.username=e?.username||"",this.password=e?.password||"",this.authType=e?.authType,this.locationType=e?.locationType,this.active=e?.active,this.local=e?.local,this.system=e?.system,this.errorMsg=e?.errorMsg||"",this.defaultRepository=e?.defaultRepository||""}}let p=function(e){return e.GDB="GDB",e.ONTOPIC="ONTOPIC",e.SPARQL="SPARQL",e}({});class g{constructor(e,t){this.NAME=e,this.payload=t}}const d={NAVIGATION_END:"navigationEnd",NAVIGATION_START:"navigationStart",LOGOUT:"logout",APP_DATA_LOADED:"applicationDataLoaded"};class E extends g{constructor(e,t){super(d.NAVIGATION_END,{oldUrl:e,newUrl:t})}}class S{}class A extends g{constructor(e,t,s){super(d.NAVIGATION_START,{oldUrl:e,newUrl:t,cancelNavigation:s})}}class R extends g{constructor(){super(d.LOGOUT)}}let T=function(e){return e.NONE="NONE",e.BASIC="BASIC",e.SIGNATURE="SIGNATURE",e}({});class C{static MAPPER_INSTANCES=new Map;static get(e){const t=e.name;if(!C.MAPPER_INSTANCES.has(t)){const s=new e;C.MAPPER_INSTANCES.set(t,s)}return C.MAPPER_INSTANCES.get(t)}}class I{static SERVICE_INSTANCES=new Map;static get(e){if(!I.SERVICE_INSTANCES.has(e.name)){const t=new e;I.implementsLifecycleHooks(t)&&t.onCreated?.(),I.SERVICE_INSTANCES.set(e.name,t)}return this.SERVICE_INSTANCES.get(e.name)}static implementsLifecycleHooks(e){return"object"==typeof e&&"function"==typeof e.onCreated}static getAllBySuperType(e){return Array.from(I.SERVICE_INSTANCES.values()).filter(t=>t instanceof e)}}class y extends s{constructor(e){super(e)}hasAuthority(e){return this.items.includes(e)}}class _{}class f extends _{mapToModel(e){return new y(e)}}class O extends t{constructor(e){super(),this.external=e?.external??!1,this.username=e?.username??"",this.password=e?.password??"",this.authorities=C.get(f).mapToModel(e?.authorities),this.appSettings=e?.appSettings??{}}}class m extends t{constructor(e){super(),this.appSettings=e.appSettings,this.authorities=C.get(f).mapToModel(e.authorities),this.enabled=e.enabled}}class N extends _{mapToModel(e){return new m(e)}}class P extends t{constructor(e){super(),this.authImplementation=e.authImplementation,this.enabled=e.enabled,this.passwordLoginEnabled=e.passwordLoginEnabled,this.freeAccess=C.get(N).mapToModel(e.freeAccess),this.overrideAuth=C.get(N).mapToModel(e.overrideAuth),this.openIdEnabled=e.openIdEnabled,this.userLoggedIn=e.userLoggedIn,this.freeAccessActive=e.freeAccessActive,this.hasExternalAuthUser=e.hasExternalAuthUser}}let b=function(e){return e.ROLE_ADMIN="ROLE_ADMIN",e.ROLE_USER="ROLE_USER",e.ROLE_MONITORING="ROLE_MONITORING",e.ROLE_REPO_MANAGER="ROLE_REPO_MANAGER",e.ROLE_CLUSTER="ROLE_CLUSTER",e.IS_AUTHENTICATED_FULLY="IS_AUTHENTICATED_FULLY",e}({});class L extends t{pages={};isRestricted(e){return this.pages[e]??!1}setPageRestriction(e,t=!0){return this.pages[e]=t,this}}class x extends t{constructor(e){super(),this.openIdKeys=e.openIdKeys,this.openIdTokenUrl=e.openIdTokenUrl,this.openIdKeysUri=e.openIdKeysUri,this.openIdEndSessionUrl=e.openIdEndSessionUrl,this.supportsOfflineAccess=e.supportsOfflineAccess}}let U=function(e){return e.READ="READ",e.WRITE="WRITE",e}({});class v extends _{mapToModel(e){return new w(e)}}class D extends t{constructor(e){super(),this.expiryDate=e.expiryDate,this.latestPublicationDate=e.latestPublicationDate,this.licensee=e.licensee||"",this.maxCpuCores=e.maxCpuCores,this.product=e.product||"",this.productType=e.productType||"",this.licenseCapabilities=C.get(v).mapToModel(e.licenseCapabilities),this.version=e.version||"",this.installationId=e.installationId||"",this.valid=e.valid,this.typeOfUse=e.typeOfUse||"",this.message=e.message||"",this.present=e.present||!1,this.usageRestriction=e.usageRestriction||""}get expiryDate(){return this._expiryDate}set expiryDate(e){this._expiryDate=e}get latestPublicationDate(){return this._latestPublicationDate}set latestPublicationDate(e){this._latestPublicationDate=e}get licensee(){return this._licensee}set licensee(e){this._licensee=e}get maxCpuCores(){return this._maxCpuCores}set maxCpuCores(e){this._maxCpuCores=e}get product(){return this._product}set product(e){this._product=e}get productType(){return this._productType}set productType(e){this._productType=e}get licenseCapabilities(){return this._licenseCapabilities}set licenseCapabilities(e){this._licenseCapabilities=e}get version(){return this._version}set version(e){this._version=e}get installationId(){return this._installationId}set installationId(e){this._installationId=e}get valid(){return this._valid}set valid(e){this._valid=e}get typeOfUse(){return this._typeOfUse}set typeOfUse(e){this._typeOfUse=e}get message(){return this._message}set message(e){this._message=e}get present(){return this._present}set present(e){this._present=e}get usageRestriction(){return this._usageRestriction}set usageRestriction(e){this._usageRestriction=e}}let M=function(e){return e.LUCENE_CONNECTOR="Lucene connector",e.SOLR_CONNECTOR="Solr connector",e.ELASTICSEARCH_CONNECTOR="Elasticsearch connector",e.OPENSEARCH_CONNECTOR="OpenSearch connector",e.KAFKA_CONNECTOR="Kafka connector",e.CLUSTER="Cluster",e}({});class w extends s{constructor(e){super(e)}}class G{constructor(e){this.workbench=e.Workbench||"",this.productType=e.productType||"",this.productVersion=e.productVersion||"",this.sesame=e.sesame||"",this.connectors=e.connectors||""}}class V{constructor(e){this.value=e}getValue(){return this.value}getValueOrDefault(e){return this.value||e}getAsJson(){if(null===this.value)return null;try{return JSON.parse(this.value)}catch(e){return console.error("Error parsing JSON",e),null}}}class B{static GLOBAL_NAMESPACE="ontotext.gdb"}class Y{constructor(e){this.languages=e}getLanguageCodes(){return this.languages?.map(e=>e.key)}}class k extends _{mapToModel(e){return new Y(e)}}class H extends t{constructor(e){super(),this.defaultLanguage=e.defaultLanguage,this.availableLanguages=C.get(k).mapToModel(e.availableLanguages)}}class K{constructor(e){this.policyAccepted=e?.policyAccepted,this.statistic=e?.statistic,this.thirdParty=e?.thirdParty,this.updatedAt=e?.updatedAt}}let $=function(e){return e.INFORMATION="INFORMATION",e.WARNING="WARNING",e.CRITICAL="CRITICAL",e}({});const F={[$.INFORMATION]:0,[$.WARNING]:1,[$.CRITICAL]:2};class q extends t{constructor(e){super(),this.id=`${e.group}-${e.status}-${e.totalOperations}`,this.group=e.group,this.totalOperations=e.totalOperations,this.status=e.status}}class W extends t{constructor(e){super(),this.status=e.status||$.INFORMATION,this.allRunningOperations=e.allRunningOperations}toOperationsGroupSummary(){const e=new Map;return this.allRunningOperations.getItems().forEach(t=>{e.has(t.group)||e.set(t.group,new q({group:t.group,totalOperations:0,status:$.INFORMATION}));const s=e.get(t.group);s.totalOperations+=t.count,F[t.status]>F[s.status]&&(s.status=t.status)}),Array.from(e.values())}}class j extends s{constructor(e){super(e)}}let Q=function(e){return e.UPDATES="updates",e.QUERIES="queries",e.IMPORT="imports",e.BACKUP_AND_RESTORE="backupAndRestore",e.CLUSTER_HEALTH="clusterHealth",e}({}),z=function(e){return e.QUERY="QUERY",e.BACKUP="BACKUP",e.CLUSTER="CLUSTER",e.IMPORT="IMPORT",e}({});const X=[Q.QUERIES,Q.UPDATES,Q.IMPORT],J={[Q.UPDATES]:"monitor/queries",[Q.QUERIES]:"monitor/queries",[Q.BACKUP_AND_RESTORE]:"monitor/backup-and-restore",[Q.IMPORT]:"import",[Q.CLUSTER_HEALTH]:"cluster"},Z={[Q.QUERIES]:z.QUERY,[Q.UPDATES]:z.QUERY,[Q.BACKUP_AND_RESTORE]:z.BACKUP,[Q.IMPORT]:z.IMPORT,[Q.CLUSTER_HEALTH]:z.CLUSTER};class ee extends t{constructor(e){super(),this.id=`${e.status}-${e.type}-${e.value}`,this.value=e.value,this.status=e.status,this.type=e.type,this.count=this.getCount(e),this.group=Z[e.type],this.href=J[e.type],this.labelKey=this.getLabelKey(e)}getCount(e){return X.includes(e.type)?parseInt(e.value,10):0}getLabelKey(e){return X.includes(e.type)?e.type:e.value}}class te extends s{constructor(e){super(e)}}let se=function(e){return e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e}({});class re{constructor(e){this.timeout=e?.timeout||5e3,this.onClick=e?.onClick,this.removeOnClick=e?.removeOnClick||!1}}class ie extends re{constructor(e){super(),this.timeout=e.timeout,this.position=e.position}static getDefaultConfig(){return this.instance||(this.instance=new ie({timeout:5e3,position:se.BOTTOM_RIGHT})),this.instance}}let ne=function(e){return e.ERROR="error",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e}({});class oe{static uuid(){const e=16;let t=(new Date).getTime(),s=1e3*(performance?.now()??0);return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let i=Math.random()*e;return t>0?(i=(t+i)%e|0,t=Math.floor(t/e)):(i=(s+i)%e|0,s=Math.floor(s/e)),("x"===r?i:3&i|8).toString(e)})}static hashCode(e){let t=0;for(let s=0,r=e.length;s<r;s++)t=(t<<5)-t+e.charCodeAt(s),t|=0;return t}}class ae{constructor(e,t,s){this.id=oe.uuid(),this.type=e,this.message=t,this.config=s}}const ue="create-toast-event";class ce extends s{constructor(e){super(e)}}class he extends s{constructor(e){super(e)}}class le extends t{constructor(e){super(),this.setRadio(e.isRadio),this.setButtons(new he(e.buttons))}getButtons(){return this.buttons}setButtons(e){this.buttons=e}isRadio(){return this.radio}setRadio(e){this.radio=e}selectButton(e){return this.isRadio()&&!e.selected&&(this.deselectAll(),e.selected=!0,e.callback()),this.copy()}deselectAll(){this.buttons.getItems().forEach(e=>e.selected=!1)}}class pe extends t{constructor(e){super(),this.id=e.id,this.label=e.label,this.selected=e.selected,this.callback=e.callback}}class ge extends s{constructor(e){super(e)}}class de extends t{constructor(e){super(),this.setSuggestions(e.suggestionList)}getSuggestions(){return this._suggestions}setSuggestions(e){this._suggestions=e}hoverFirstSuggestion(){return this.hoverSuggestion(this.getSuggestions().getItems()[0])}hoverSuggestion(e){return e&&(this.clearHoveredState(),e.setHovered(!0)),this.copy()}selectSuggestion(e){return e&&(this.clearSelectedState(),e.setSelected(!0)),this.copy()}getHoveredSuggestion(){return this.getSuggestions().getItems().find(e=>e.isHovered())}hoverPreviousSuggestion(){const e=this.getSuggestions().getItems().findIndex(e=>e.isHovered());return e>0&&(this.clearHoveredState(),this.getSuggestions().getItems()[e-1].setHovered(!0)),this.copy()}hoverNextSuggestion(){const e=this.getSuggestions().getItems().findIndex(e=>e.isHovered());return e<this.getSuggestions().getItems().length-1&&(this.clearHoveredState(),this.getSuggestions().getItems()[e+1].setHovered(!0)),this.copy()}clearSuggestions(){return this.setSuggestions(new ge),this.copy()}getByValue(e){return this.getSuggestions().getItems().find(t=>t.getValue()===e)}clearSelectedState(){this.getSuggestions().getItems().forEach(e=>e.setSelected(!1))}clearHoveredState(){this.getSuggestions().getItems().forEach(e=>e.setHovered(!1))}}class Ee extends t{overrideToVisual=!1;constructor(e){super(),this.setId(e.id),this.setType(e.type),this.setValue(e.value),this.setDescription(e.description)}getId(){return this._id}setId(e){this._id=e}getType(){return this._type}setType(e){this._type=e}getValue(){return this._value}setValue(e){this._value=e}getDescription(){return this._description}setDescription(e){this._description=e}isHovered(){return this._hovered}setHovered(e){this._hovered=e}isSelected(){return this._selected}setSelected(e){this._selected=e}getOverrideToVisual(){return this.overrideToVisual}setOverrideToVisual(e){this.overrideToVisual=e}}let Se=function(e){return e.URI="uri",e.PREFIX="prefix",e}({});class Ae{constructor(e,t){this.setSuggestion(e),this.setContext(t)}getSuggestion(){return this.suggestion}getContext(){return this.context}setContext(e){this.context=e}setSuggestion(e){this.suggestion=e}}let Re=function(e){return e.DATA_LOADED="DATA_LOADED",e}({});class Te{callbackFunctions=[];beforeChangeValidationPromises=[];afterValueChangeCallbackFunctions=[];setValue(t){e.deepEqual(this.value,t)||(this.value=this.getCopy(t),this.callbackFunctions.forEach(e=>e(this.getValue())),this.afterValueChangeCallbackFunctions.forEach(e=>e(this.getValue())))}getValue(){return this.getCopy(this.value)}subscribe(e,t,s){return this.callbackFunctions.push(e),t&&this.beforeChangeValidationPromises.push(t),s&&this.afterValueChangeCallbackFunctions.push(s),()=>{this.callbackFunctions=this.callbackFunctions.filter(t=>t!==e),this.beforeChangeValidationPromises=this.beforeChangeValidationPromises.filter(e=>e!==t),this.afterValueChangeCallbackFunctions=this.afterValueChangeCallbackFunctions.filter(e=>e!==s)}}async canUpdate(e){if(0===this.beforeChangeValidationPromises.length)return!0;const t=this.beforeChangeValidationPromises.map(t=>t(e));try{return(await Promise.all(t)).every(e=>e)}catch{return!1}}getCopy(t){if(null!=t)return e.hasCopyMethod(t)?t.copy():e.deepCopy(t)}}class Ce{subscribers=[];unsubFns=new r;subscribeToService(e){const t=this.subscribers.map(t=>e.subscribeAll(t.callback,t.beforeChangeValidationPromise,t.afterChangeCallback));return this.unsubFns.addAll(t),()=>t.forEach(e=>e())}subscribeToAllRegisteredContexts(e,t,s){const r=I.getAllBySuperType(Ie).filter(e=>e.canSubscribeAll);for(const i of r)this.unsubFns.add(i.subscribeAll(e,t,s));const i={callback:e,beforeChangeValidationPromise:t,afterChangeCallback:s};this.subscribers.push(i);let o=!1;return()=>{if(o)return;o=!0,this.unsubFns.unsubscribeAll();const e=this.subscribers.indexOf(i);e>=0&&this.subscribers.splice(e,1)}}}class Ie{context=new Map;_canSubscribeAll=!1;onCreated(){this._canSubscribeAll=!0,I.get(Ce).subscribeToService(this)}updateContextProperty(e,t){this.getOrCreateValueContext(e).setValue(t)}validatePropertyChange(e,t){return this.getOrCreateValueContext(e).canUpdate(t)}getContextPropertyValue(e){const t=this.context.get(e);return t?t.getValue():void 0}subscribe(e,t,s,r){return t&&t(this.getContextPropertyValue(e)),r&&r(this.getContextPropertyValue(e)),this.getOrCreateValueContext(e).subscribe(t,s,r)}subscribeAll(e,t,s){const i=new r;for(const r of this.getContextFields())i.add(this.subscribe(r,e,t,s));return()=>i.unsubscribeAll()}getContextFields(){return Object.values(this).filter(e=>"string"==typeof e)}getOrCreateValueContext(e){let t=this.context.get(e);return t||(t=new Te,this.context.set(e,t)),t}canHandle(e){for(const t in this)if(this[t]===e)return!0;return!1}get canSubscribeAll(){return this._canSubscribeAll}}class ye{priority=0}class _e{getStorage(){return localStorage}get(e){const t=this.getStorage().getItem(this.getPrefixedKey(e));return new V(t)}storeValue(e,t){this.getStorage().setItem(this.getPrefixedKey(e),t)}remove(e){this.getStorage().removeItem(this.getPrefixedKey(e))}getPrefixedKey(e){const t=`${B.GLOBAL_NAMESPACE}.${this.NAMESPACE}.`,s=`${this.NAMESPACE}.`;return e.startsWith(t)?e:e.startsWith(s)?`${B.GLOBAL_NAMESPACE}.${e}`:`${t}${e}`}}class fe{handleStorageChange(e){const t=e.key?.substring(B.GLOBAL_NAMESPACE.length+1);let s="",r="";t&&(s=t.substring(0,t.indexOf(".")),r=t.substring(s.length+1));const i=this.resolveHandler(s,r);i&&i.updateContextProperty(r,e.newValue)}resolveHandler(e,t){if(!e)return void console.warn("Namespace is required to resolve a context property change handler.");const s=I.getAllBySuperType(Ie).find(e=>e.canHandle(t));if(s)return s;console.warn(`No context property change handler found for namespace: ${e} and property: ${t}`)}}class Oe extends _e{jwtKey="jwt";authenticatedKey="authenticated";NAMESPACE="auth";set(e,t){this.storeValue(e,t)}getAuthToken(){return this.get(this.jwtKey)}setAuthenticated(e){this.storeValue(this.authenticatedKey,e?.toString()||"")}isAuthenticated(){return"true"===this.get(this.authenticatedKey).getValue()}}class me extends _e{NAMESPACE="repository";SELECTED_REPOSITORY="selectedRepository";set(e,t){t?this.storeValue(e,t):this.remove(e)}setRepositoryReference(e){this.set(this.SELECTED_REPOSITORY,this.serializeRepositoryReference(e))}getRepositoryReference(){return this.deserializeRepositoryReference(this.get(this.SELECTED_REPOSITORY).getValueOrDefault('{"id": "", "location": ""}'))}removeRepositoryReference(){this.remove(this.SELECTED_REPOSITORY)}serializeRepositoryReference(e){return JSON.stringify(e)}deserializeRepositoryReference(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){console.error("Error parsing repository reference",e)}}}class Ne extends Ie{RESTRICTED_PAGES="restrictedPages";SECURITY_CONFIG="securityConfig";AUTHENTICATED_USER="authenticatedUser";AUTH_TOKEN="jwt";OPEN_ID_CONFIG="openIdConfig";getRestrictedPages(){return this.getContextPropertyValue(this.RESTRICTED_PAGES)||new L}updateRestrictedPages(e){this.updateContextProperty(this.RESTRICTED_PAGES,e)}onRestrictedPagesChanged(e){return this.subscribe(this.RESTRICTED_PAGES,e)}onAuthTokenChanged(e){return this.subscribe(this.AUTH_TOKEN,e)}updateAuthToken(e){this.updateContextProperty(this.AUTH_TOKEN,e)}getAuthToken(){return this.getContextPropertyValue(this.AUTH_TOKEN)}updateSecurityConfig(e){this.updateContextProperty(this.SECURITY_CONFIG,e)}onSecurityConfigChanged(e){return this.subscribe(this.SECURITY_CONFIG,e)}getSecurityConfig(){return this.getContextPropertyValue(this.SECURITY_CONFIG)}updateAuthenticatedUser(e){this.updateContextProperty(this.AUTHENTICATED_USER,e)}onAuthenticatedUserChanged(e){return this.subscribe(this.AUTHENTICATED_USER,e)}getAuthenticatedUser(){return this.getContextPropertyValue(this.AUTHENTICATED_USER)}updateOpenIdConfig(e){return this.updateContextProperty(this.OPEN_ID_CONFIG,e)}getOpenIdConfig(){return this.getContextPropertyValue(this.OPEN_ID_CONFIG)}}class Pe{static getWindow(){return window}}function be(e){return t=>{t&&t.preventDefault(),Le(e)}}function Le(e){Pe.getWindow().singleSpa.navigateToUrl(e)}function xe(e){Pe.getWindow().open(e,"_blank")}function Ue(){return"/"===ve()}function ve(){return Pe.getWindow().location.pathname.substring(De().length-1)}function De(){return document.querySelector("base")?.getAttribute("href")??"/"}function Me(){return ve().substring(1)}const we=new s([new class extends ye{authStorage=I.get(Oe);repositoryStorageService=I.get(me);securityContextService=I.get(Ne);process(e){e.headers=e.headers||{},e.headers["X-Requested-With"]="XMLHttpRequest";const t=this.authStorage.getAuthToken().getValue();if(t&&(e.headers.Authorization=t),!e.headers["X-GraphDB-Repository"]){const t=this.repositoryStorageService.getRepositoryReference();t?.id&&(e.headers["X-GraphDB-Repository"]=t.id),t?.location&&(e.headers["X-GraphDB-Repository-Location"]=t.location)}return Promise.resolve(e)}shouldProcess(e){const t=this.securityContextService.getOpenIdConfig();if(!t)return!0;const s=t?.openIdKeysUri,r=t?.openIdTokenUrl;return!s||!r||![t?.openIdKeysUri,t?.openIdTokenUrl].some(t=>t&&e.url.indexOf(t)>-1)}}]),Ge=new s([new class extends ye{process(e){return localStorage.getItem("ontotext.gdb.auth.jwt")&&(localStorage.removeItem("ontotext.gdb.auth.jwt"),Le("login"),Pe.getWindow().location.reload()),Promise.reject(e)}shouldProcess(e){return 401===e.status}}]);class Ve{preProcessors=new s;postProcessors=new s;constructor(){this.registerRequestInterceptors(we),this.registerResponseInterceptors(Ge)}async preProcess(e){let t=e;for(const e of this.preProcessors.getItems())e.shouldProcess(t)&&(t=await e.process(t));return t}async postProcess(e){let t=e;for(const e of this.postProcessors.getItems())e.shouldProcess(t)&&(t=await e.process(t));return t}registerRequestInterceptors(e){this.preProcessors.addItems(e.getItems()),this.sortInterceptors(this.preProcessors)}registerResponseInterceptors(e){this.postProcessors.addItems(e.getItems()),this.sortInterceptors(this.postProcessors)}sortInterceptors(e){e.sort((e,t)=>t.priority-e.priority)}}class Be{constructor(e){this.url=e.url,this.method=e.method,this.headers={...e.headers},this.body=e.body}}class Ye{emit(e){const t=new CustomEvent(e.NAME,{detail:e.payload});return this.getHostElement().dispatchEvent(t),t}subscribe(e,t){const s=e=>{e instanceof CustomEvent&&t(e.detail)};return this.getHostElement().addEventListener(e,s),()=>this.getHostElement().removeEventListener(e,s)}getHostElement(){return document.body}}const ke=["application/json","application/sparql-results+json"],He="http-request-done-event";class Ke{interceptorService=I.get(Ve);eventEmitter=new Ye;get(e,t,s){return this.request(e,"GET",{params:t,headers:s}).then(e=>e)}post(e,t,s){return this.request(e,"POST",{body:t,headers:s})}put(e,t,s){return this.request(e,"PUT",{body:t,headers:s})}delete(e,t){return this.request(e,"DELETE",{headers:t})}patch(e,t,s){return this.request(e,"PATCH",{body:t,headers:s})}encodeURIComponentStrict(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16)})}request(e,t,s={}){const r=this.buildQueryParams(s.params),i=`${e}${r?`?${r}`:""}`,o={"Content-Type":"application/json",Accept:"application/json, text/plain, */*",...s.headers};return this.interceptorService.preProcess(new Be({url:i,method:t,headers:o,body:s.body})).then(e=>fetch(e.url,{method:e.method,headers:e.headers,body:e.body?JSON.stringify(e.body):null})).then(e=>this.interceptorService.postProcess(e)).then(e=>e.ok?this.hasValidJson(e)?e.json():Promise.resolve():Promise.reject(e)).finally(()=>this.eventEmitter.emit({NAME:He,payload:void 0}))}hasValidJson(e){const t=e.headers.get("Content-Type");return!!t&&ke.some(e=>t.includes(e))}buildQueryParams(e={}){return new URLSearchParams(e).toString()}}class $e extends Ke{I18N_ENDPOINT="assets/i18n";getLanguage(e){return this.get(`${this.I18N_ENDPOINT}/${e}.json`)}getLanguageConfiguration(){return this.get(`${this.I18N_ENDPOINT}/language-config.json`)}}class Fe extends _{mapToModel(e){return new H(e)}}class qe extends _e{NAMESPACE="i18n";set(e,t){this.storeValue(e,t)}}class We extends Ie{LANGUAGE_CONFIG="languageConfig";SELECTED_LANGUAGE="selectedLanguage";LANGUAGE_BUNDLE="languageBundle";DEFAULT_BUNDLE="defaultBundle";updateSelectedLanguage(e){this.validatePropertyChange(this.SELECTED_LANGUAGE,e).then(t=>{if(t){const t=e||I.get(je).getDefaultLanguage();I.get(qe).set(this.SELECTED_LANGUAGE,t),this.updateContextProperty(this.SELECTED_LANGUAGE,e)}})}onSelectedLanguageChanged(e,t){return this.subscribe(this.SELECTED_LANGUAGE,e,t)}updateLanguageBundle(e){this.updateContextProperty(this.LANGUAGE_BUNDLE,e)}onLanguageBundleChanged(e){return this.subscribe(this.LANGUAGE_BUNDLE,e)}updateDefaultBundle(e){this.updateContextProperty(this.DEFAULT_BUNDLE,e)}getDefaultBundle(){return this.getContextPropertyValue(this.DEFAULT_BUNDLE)}getLanguageConfig(){return this.getContextPropertyValue(this.LANGUAGE_CONFIG)}setLanguageConfig(e){this.updateContextProperty(this.LANGUAGE_CONFIG,e)}getSelectedLanguage(){return this.getContextPropertyValue(this.SELECTED_LANGUAGE)}}class je{languageRestService=I.get($e);languageContextService=I.get(We);getSupportedLanguages(){const e=this.languageContextService.getLanguageConfig();return e?e.availableLanguages.getLanguageCodes():["en","fr"]}getLanguage(e){return this.languageRestService.getLanguage(e)}getLanguageConfiguration(){return this.languageRestService.getLanguageConfiguration().then(e=>C.get(Fe).mapToModel(e))}getDefaultLanguage(){const e=this.languageContextService.getLanguageConfig();return e?e.defaultLanguage:"en"}}class Qe extends Ke{static REPOSITORIES_ENDPOINT="rest/repositories";getRepositories(){return this.get(`${Qe.REPOSITORIES_ENDPOINT}/all`)}getRepositorySizeInfo(e){return this.get(`${Qe.REPOSITORIES_ENDPOINT}/${e.id}/size?location=${encodeURIComponent(e.location)}`)}}class ze extends _{mapToModel(e){return new i(e)}}class Xe extends _{constructor(){super(),this.repositoryMapper=C.get(ze)}mapToModel(e){if(!e||"object"!=typeof e)return new o;const t=[];return Object.entries(e).forEach(([,e])=>{Array.isArray(e)&&e.forEach(e=>{const s=this.repositoryMapper.mapToModel(e);t.push(s)})}),new o(t)}}class Je extends _{mapToModel(e){return new a(e)}}class Ze{GRAPHQL_REPO_AUTHORITY="GRAPHQL";constructor(){this.repositoryRestService=I.get(Qe),this.repositoryListMapper=C.get(Xe),this.repositorySizeInfoMapper=C.get(Je)}getRepositories(){return this.repositoryRestService.getRepositories().then(e=>this.repositoryListMapper.mapToModel(e))}getRepositorySizeInfo(e){return this.repositoryRestService.getRepositorySizeInfo(e).then(this.repositorySizeInfoMapper.mapToModel)}isSystemRepository(e){return"SYSTEM"===e.id}getCurrentGqlRepoAuthority(e,t){return`${this.getCurrentRepoAuthority(e,t)}:${this.GRAPHQL_REPO_AUTHORITY}`}getOverallGqlRepoAuthority(e){return`${this.getOverallRepoAuthority(e)}:${this.GRAPHQL_REPO_AUTHORITY}`}getLocationSpecificId(e){return e.location?`${e.id}@${e.location}`:e.id}getCurrentRepoAuthority(e,t){return`${e}_REPO_${t}`}getOverallRepoAuthority(e){return`${e}_REPO_*`}}class et extends Ie{SELECTED_REPOSITORY="selectedRepository";REPOSITORY_LIST="repositoryList";updateSelectedRepository(e){const t=I.get(me),s=this.findRepository(e);this.validatePropertyChange(this.SELECTED_REPOSITORY,s).then(r=>{r&&(s?t.setRepositoryReference(s.toRepositoryReference()):e||t.removeRepositoryReference(),this.updateContextProperty(this.SELECTED_REPOSITORY,s))})}getSelectedRepository(){return this.getContextPropertyValue(this.SELECTED_REPOSITORY)}onSelectedRepositoryChanged(e,t){return this.subscribe(this.SELECTED_REPOSITORY,e,t)}updateRepositoryList(e){return this.updateContextProperty(this.REPOSITORY_LIST,e)}getRepositoryList(){return this.getContextPropertyValue(this.REPOSITORY_LIST)||new o([])}onRepositoryListChanged(e){return this.subscribe(this.REPOSITORY_LIST,e)}findRepository(e){if(e)return this.getRepositoryList().findRepository(e.id,e.location)}}class tt extends Ke{getActiveRepositoryLocation(){return this.get("rest/locations/active")}}class st extends _{mapToModel(e){return new l(e)}}class rt{constructor(){this.locationRestService=I.get(tt),this.repositoryLocationMapper=C.get(st)}getActiveRepositoryLocation(){return this.locationRestService.getActiveRepositoryLocation().then(this.repositoryLocationMapper.mapToModel)}}class it extends Ie{ACTIVE_REPOSITORY_LOCATION="activeRepositoryLocation";IS_LOADING="isLoading";updateActiveRepositoryLocation(e){this.updateContextProperty(this.ACTIVE_REPOSITORY_LOCATION,e)}onActiveLocationChanged(e){return this.subscribe(this.ACTIVE_REPOSITORY_LOCATION,e)}updateIsLoading(e){this.updateContextProperty(this.IS_LOADING,e)}onIsLoadingChanged(e){return this.subscribe(this.IS_LOADING,e)}}class nt extends Ke{getLicense(){return this.get("rest/graphdb-settings/license")}}class ot extends _{mapToModel(e){return new D(e)}}class at extends Ie{GRAPHDB_LICENSE="graphDbLicense";updateGraphdbLicense(e){this.updateContextProperty(this.GRAPHDB_LICENSE,e)}onLicenseChanged(e){return this.subscribe(this.GRAPHDB_LICENSE,e)}getLicense(){return this.getContextPropertyValue(this.GRAPHDB_LICENSE)}}class ut{licenseRestService=I.get(nt);licenseMapper=I.get(ot);trackableProductTypes=["free","sandbox"];trackableTypesOfUse=["evaluation","this is an evaluation license"];getLicense(){return this.licenseRestService.getLicense().then(e=>this.licenseMapper.mapToModel(e))}isTrackableLicense(){const e=I.get(at).getLicense(),t=e?.typeOfUse?.toLowerCase()||"",s=e?.productType?.toLowerCase()||"";return!e?.present||this.trackableProductTypes.includes(s)||this.trackableTypesOfUse.includes(t)}}class ct extends Ie{PRODUCT_INFO="productInfo";updateProductInfo(e){this.updateContextProperty(this.PRODUCT_INFO,e)}onProductInfoChanged(e){return this.subscribe(this.PRODUCT_INFO,e)}}class ht extends _{mapToModel(e){return new G(e)}}class lt extends Ke{VERSION_URL="rest/info/version";getProductInfoLocal(){return this.get(`${this.VERSION_URL}?local=1`)}}class pt{productInfoMapper=I.get(ht);productInfoService=I.get(lt);getProductInfoLocal(){return this.productInfoService.getProductInfoLocal().then(e=>this.productInfoMapper.mapToModel(e))}}class gt extends _{mapToModel(e){return new P(e)}}class dt{constructor(e){this.notify=e}}class Et{eventSubscribers=new Map;emit(t){const s=this.eventSubscribers.get(t.NAME);s&&s.forEach(s=>{s.notify(e.deepCopy(t.payload))})}subscribe(e,t){const s=new dt(t),r=this.eventSubscribers.get(e);return r?r.push(s):this.eventSubscribers.set(e,[s]),()=>this.unsubscribe(e,s)}unsubscribe(e,t){const s=this.eventSubscribers.get(e);if(s){const r=s.indexOf(t);-1!==r&&s.splice(r,1),0===s.length&&this.eventSubscribers.delete(e)}}}class St{constructor(e,t){this.setRegex(e),this.setRouteParams(t)}getRegex(){return this.regex}setRegex(e){return this.regex=e,this}getRouteParams(){return this.routeParams}setRouteParams(e){return this.routeParams=e,this}}class At{constructor(e){this._url=e.url,this._module=e.module,this._path=e.path,this._chunk=e.chunk,this._controller=e.controller,this._templateUrl=e.templateUrl,this._title=e.title,this._reloadOnSearch=e.reloadOnSearch,this._helpInfo=e.helpInfo,this._documentationUrl=e.documentationUrl,this._allowAuthorities=e.allowAuthorities}get url(){return this._url}set url(e){this._url=e}get module(){return this._module}set module(e){this._module=e}get path(){return this._path}set path(e){this._path=e}get chunk(){return this._chunk}set chunk(e){this._chunk=e}get controller(){return this._controller}set controller(e){this._controller=e}get templateUrl(){return this._templateUrl}set templateUrl(e){this._templateUrl=e}get title(){return this._title}set title(e){this._title=e}get reloadOnSearch(){return this._reloadOnSearch}set reloadOnSearch(e){this._reloadOnSearch=e}get helpInfo(){return this._helpInfo}set helpInfo(e){this._helpInfo=e}get documentationUrl(){return this._documentationUrl}set documentationUrl(e){this._documentationUrl=e}get allowAuthorities(){return this._allowAuthorities}set allowAuthorities(e){this._allowAuthorities=e}}let Rt=function(e){return e.ROUTE="route",e.MAIN_MENU="main.menu",e}({});class Tt{routeConfig=Pe.getWindow().PluginRegistry.get(Rt.ROUTE);getActiveRoute(e=ve()){const t=this.routeConfig.find(t=>this.routeToRegex(t.url).getRegex().test(e));return t?new At(t):void 0}routeToRegex(e){const t=[],r=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(e,s,r,i){const o="?"===i||"*?"===i,n="*"===i||"*?"===i;return t.push(r),s=s||"",(o?"(?:"+s:s+"(?:")+(n?"(.+?)":"([^/]+)")+(o?"?)?":")")}).replace(/([/$*])/g,"\\$1");return new St(new RegExp("^"+r+"(?:[?#]|$)"),new s(t))}}class Ct{repositoryService=I.get(Ze);securityContextService=I.get(Ne);login(){return"Authentication.login from the API"}logout(){I.get(Et).emit(new R)}isAuthenticated(){const e=this.getSecurityConfig();return!(!e?.enabled||!e?.userLoggedIn)}hasFreeAccess(){const e=this.getSecurityConfig();return e?.enabled&&e?.freeAccessActive}hasRole(e){const t=this.getSecurityConfig(),s=this.getAuthenticatedUser();return!e||!t?.enabled||!!(Object.keys(s||{}).length>0)&&(b.IS_AUTHENTICATED_FULLY===e||s?.authorities.hasAuthority(e))}isSecurityEnabled(){return!!this.getSecurityConfig()?.enabled}canReadRepo(e){if(!e||""===e.id)return!1;const t=this.getSecurityConfig(),s=this.getAuthenticatedUser();return!t?.enabled||!!s&&(!!this.isAdminOrRepoManager()||!this.repositoryService.isSystemRepository(e)&&this.hasBaseRights(U.READ,e))}canReadGqlRepo(e){return!(!e||""===e.id)&&this.hasGraphqlAuthority(U.READ,e)}canWriteGqlRepo(e){return!(!e||""===e.id)&&this.hasGraphqlAuthority(U.WRITE,e)}hasGqlRights(e){return this.canReadGqlRepo(e)||this.canWriteGqlRepo(e)}hasAuthority(){if(this.hasRole(b.ROLE_ADMIN))return!0;const e=I.get(Tt).getActiveRoute();if(!e)return!1;if(!e.allowAuthorities)return!0;if(!I.get(me).getRepositoryReference()?.id)return!0;const t=this.getAuthenticatedUser();return!t||!e.allowAuthorities.length||this.resolveAuthorities(e.allowAuthorities).some(e=>t.authorities.hasAuthority(e))}resolveAuthorities(e){if(!e)return[];const t=I.get(me).getRepositoryReference();return t?.id?[...e.map(e=>e.replace("{repoId}",t.id)),...e.map(e=>e.replace("{repoId}","*"))]:e}hasGraphqlAuthority(e,t){const s=this.securityContextService.getAuthenticatedUser();if(!s)return!1;const r=this.repositoryService.getLocationSpecificId(t),i=this.repositoryService.getCurrentGqlRepoAuthority(e,r),o=this.repositoryService.getOverallGqlRepoAuthority(e);return s.authorities.hasAuthority(i)||s.authorities.hasAuthority(o)}isAdminOrRepoManager(){return this.hasRole(b.ROLE_ADMIN)||this.hasRole(b.ROLE_REPO_MANAGER)}getSecurityConfig(){return I.get(Ne).getSecurityConfig()}getAuthenticatedUser(){return I.get(Ne).getAuthenticatedUser()}hasBaseRights(e,t){const s=this.repositoryService.getLocationSpecificId(t),r=this.repositoryService.getCurrentRepoAuthority(e,s),i=this.repositoryService.getOverallRepoAuthority(e),o=this.getAuthenticatedUser();return!(!o?.authorities.hasAuthority(r)&&!o?.authorities.hasAuthority(i))}}class It extends _{mapToModel(e){return new O(e)}}class yt extends Ke{SECURITY_ENDPOINT="rest/security";updateUserData(e){return this.patch(`${this.SECURITY_ENDPOINT}/users/${this.encodeURIComponentStrict(e.username)}`,{appSettings:e.appSettings})}getSecurityConfig(){return this.get(`${this.SECURITY_ENDPOINT}/all`)}getAuthenticatedUser(){return this.get(`${this.SECURITY_ENDPOINT}/authenticated-user`)}}class _t{securityRestService=I.get(yt);securityContextService=I.get(Ne);updateUserData(e){return this.securityRestService.updateUserData(e).then(()=>this.securityContextService.updateAuthenticatedUser(e))}getSecurityConfig(){return this.securityRestService.getSecurityConfig().then(e=>C.get(gt).mapToModel(e))}getAuthenticatedUser(){return this.securityRestService.getAuthenticatedUser().then(e=>C.get(It).mapToModel(e))}}class ft extends _{mapToModel(e){return new x(e)}}const Ot="cookie-consent-changed-event";class mt{eventEmitter=new Ye;acceptCookiePolicy(){const e=this.setAcceptedCookiePolicy();return I.get(_t).updateUserData(e).then(()=>{this.eventEmitter.emit({NAME:Ot,payload:e.appSettings.COOKIE_CONSENT})})}setAcceptedCookiePolicy(){const e=I.get(Ne).getAuthenticatedUser()||new O({});let t;return t=e.appSettings?.COOKIE_CONSENT?new K(e.appSettings.COOKIE_CONSENT):new K({thirdParty:!0,statistic:!0}),t.policyAccepted=!0,t.updatedAt=Date.now(),e.appSettings.COOKIE_CONSENT=t,e}}class Nt extends Ke{MONITORING_ENDPOINT="rest/monitor";getOperations(e){return this.get(`${this.MONITORING_ENDPOINT}/repository/${e}/operations`)}}const Pt={[Q.CLUSTER_HEALTH]:0,[Q.BACKUP_AND_RESTORE]:1,[Q.IMPORT]:2,[Q.QUERIES]:3,[Q.UPDATES]:4};class bt extends _{mapToModel(e){return new j(e.map(e=>new ee(e)).sort((e,t)=>Pt[e.type]-Pt[t.type]))}}class Lt extends _{mapToModel(e){return new W({status:e.status,allRunningOperations:C.get(bt).mapToModel(e.allRunningOperations||[])})}}class xt{getOperations(e){return I.get(Nt).getOperations(e).then(e=>C.get(Lt).mapToModel(e))}}class Ut extends _{mapToModel(e){return new te(e)}}class vt{eventEmitter=new Ye;error(e,t){this.createToastElement(e,ne.ERROR,t)}info(e,t){this.createToastElement(e,ne.INFO,t)}success(e,t){this.createToastElement(e,ne.SUCCESS,t)}warning(e,t){this.createToastElement(e,ne.WARNING,t)}createToastElement(e,t,s){this.eventEmitter.emit({NAME:ue,payload:new ae(t,e,s)})}}class Dt extends Ke{autocompleteRestPrefix="rest/autocomplete";search(e){return this.get(`${this.autocompleteRestPrefix}/query?q=${e}`)}enabled(){return this.get(`${this.autocompleteRestPrefix}/enabled`)}}class Mt extends _{mapToModel(e){return new ge(e.map(e=>new Ee({...e,id:oe.hashCode(`${e.type}-${e.value}-${e.description}`)})))}}class wt extends _{mapToModel(e){return new de({...e,suggestionList:C.get(Mt).mapToModel(e.suggestions)})}}class Gt{search(e){return I.get(Dt).search(e).then(e=>C.get(wt).mapToModel(e))}isAutocompleteEnabled(){return I.get(Dt).enabled()}}class Vt extends _e{ENABLED_KEY="enabled";NAMESPACE="autocomplete";set(e,t){this.storeValue(e,t)}isEnabled(){return"true"===this.get(this.ENABLED_KEY).value}setEnabled(e){this.set(this.ENABLED_KEY,e.toString())}}class Bt extends Ie{AUTOCOMPLETE_ENABLED="isAutocompleteEnabled";updateAutocompleteEnabled(e){this.updateContextProperty(this.AUTOCOMPLETE_ENABLED,e),I.get(Vt).setEnabled(e)}onAutocompleteEnabledChanged(e){return this.subscribe(this.AUTOCOMPLETE_ENABLED,e)}}class Yt extends _{mapToModel(e){const t=e?.results.bindings||[];return new h(t.reduce((e,t)=>(e[t.prefix.value]=t.namespace.value,e),{}))}}class kt extends Ke{REPOSITORIES_ENDPOINT="repositories";getNamespaces(e){return this.get(`${this.REPOSITORIES_ENDPOINT}/${e}/namespaces`)}}class Ht{namespaceMapper=C.get(Yt);namespacesRestService=I.get(kt);getNamespaces(e){return this.namespacesRestService.getNamespaces(e).then(e=>this.namespaceMapper.mapToModel(e))}}class Kt extends Ie{NAMESPACES="namespaces";updateNamespaces(e){this.updateContextProperty(this.NAMESPACES,e)}onNamespacesChanged(e){return this.subscribe(this.NAMESPACES,e)}}class $t extends _e{SELECTED_VIEW_KEY="selectedView";INPUT_KEY="input";LAST_SELECTED_KEY="lastSelected";NAMESPACE="resourceSearch";LEGACY_LAST_SELECTED_KEY="ls.rdf-search.resource-description";LEGACY_INPUT_KEY="ls.rdf-search.search-input";LEGACY_SELECTED_VIEW_KEY="ls.rdf-search.search-type";set(e,t){this.storeValue(e,t)}setSelectedView(e){this.set(this.SELECTED_VIEW_KEY,e),localStorage.setItem(this.LEGACY_SELECTED_VIEW_KEY,e)}getSelectedView(){return this.get(this.SELECTED_VIEW_KEY).getValue()||""}setInputValue(e){this.set(this.INPUT_KEY,e),localStorage.setItem(this.LEGACY_INPUT_KEY,e)}getInputValue(){return this.get(this.INPUT_KEY).getValue()||""}setLastSelected(e){this.set(this.LAST_SELECTED_KEY,e.getValue()),localStorage.setItem(this.LEGACY_LAST_SELECTED_KEY,e.getDescription()||"")}getLastSelectedValue(){return this.get(this.LAST_SELECTED_KEY).getValue()||""}clearStoredSearch(){this.remove(this.INPUT_KEY),this.remove(this.LAST_SELECTED_KEY),localStorage.removeItem(this.LEGACY_INPUT_KEY),localStorage.removeItem(this.LEGACY_LAST_SELECTED_KEY)}}class Ft extends Ie{PREVIOUS_ROUTE="previousRoute";updatePreviousRoute(e){this.updateContextProperty(this.PREVIOUS_ROUTE,e)}getPreviousRoute(){let e=this.getContextPropertyValue(this.PREVIOUS_ROUTE);return e?.endsWith("#")&&(e=e.slice(0,-1)),e}}class qt extends Ie{APPLICATION_DATA_STATE="applicationDataLoaded";updateApplicationDataState(e){this.updateContextProperty(this.APPLICATION_DATA_STATE,e)}onApplicationDataStateChanged(e){return this.subscribe(this.APPLICATION_DATA_STATE,e)}}class Wt{static isDevMode(){return Pe.getWindow().wbDevMode}}class jt{static ABS_URI_REGEX=/^<?(http|urn).*>?/;static GRAPHS_VISUALIZATIONS_URL="graphs-visualizations";static RESOURCE_URL="resource";static BASE_DOCUMENTATION_URL="https://graphdb.ontotext.com/documentation/";static LATEST_UNOFFICIAL_VERSION="master";static shortenIri(e){const t=document.createElement("a");t.href=e;let s=t.hostname;return jt.containsIPV4(t.hostname)||(s=t.hostname.split(".")[0]),s+":"+t.port}static containsIPV4(e){const t=e.split(".");for(let e=0,s=0;e<t.length;e++)if(parseInt(t[e],10)>=0&&parseInt(t[e],10)<=255?s++:s=0,4===s)return!0;return!1}static createAutocompleteRedirect(e,t){return`${e}?uri=${encodeURIComponent(t)}`}static removeAngleBrackets(e){return e?.startsWith("<")&&e?.endsWith(">")?e.substring(1,e.length-1):e}static isValidUri(e){let t=!1;if(this.hasValidProtocol(e))if(e.indexOf("http")>=0){const s=e.indexOf("//");t=s>4&&e.substring(s+2).length>0}else e.indexOf("urn")>=0&&(t=e.substring(4).length>0);return t}static resolveDocumentationUrl(e,t){if(!e||!t)throw new Error("Product version and endpoint path are required for documentation URL resolution.");const s=e.includes("-"),r=Wt.isDevMode()||s?this.LATEST_UNOFFICIAL_VERSION:e;return`${this.BASE_DOCUMENTATION_URL}${r}/${t}`}static hasAngleBrackets(e){return e.startsWith("<")&&e.endsWith(">")}static hasNoAngleBrackets(e){return!e.startsWith("<")&&!e.endsWith(">")}static hasValidProtocol(e){return this.ABS_URI_REGEX.test(e)&&(this.hasNoAngleBrackets(e)||this.hasAngleBrackets(e))}}class Qt{fibo1=0;fibo2=1;next(){const e=this.fibo2;return this.fibo2=this.fibo1+this.fibo2,this.fibo1=e,e}reset=()=>{this.fibo1=0,this.fibo2=1}}export{qt as ApplicationLifecycleContextService,O as AuthenticatedUser,It as AuthenticatedUserMapper,Ct as AuthenticationService,Oe as AuthenticationStorageService,T as AuthenticationType,b as Authority,y as AuthorityList,Bt as AutocompleteContextService,de as AutocompleteSearchResult,Gt as AutocompleteService,Vt as AutocompleteStorageService,Y as AvailableLanguagesList,Wt as BuildUtil,Ot as COOKIE_CONSENT_CHANGED_EVENT,ue as CREATE_TOAST_EVENT,M as Capability,w as CapabilityList,Ie as ContextService,Ce as ContextSubscriptionManager,K as CookieConsent,mt as CookieService,g as Event,Ye as EventEmitter,d as EventName,Et as EventService,Qt as FibonacciGenerator,He as HTTP_REQUEST_DONE_EVENT,H as LanguageConfig,We as LanguageContextService,$e as LanguageRestService,je as LanguageService,qe as LanguageStorageService,D as License,at as LicenseContextService,ut as LicenseService,Re as LifecycleState,_e as LocalStorageService,fe as LocalStorageSubscriptionHandlerService,R as Logout,C as MapperProvider,t as Model,s as ModelList,Nt as MonitoringRestService,xt as MonitoringService,h as NamespaceMap,Kt as NamespacesContextService,Ht as NamespacesService,Ft as NavigationContextService,E as NavigationEnd,S as NavigationEndPayload,A as NavigationStart,e as ObjectUtil,vt as OntoToastrService,x as OpenIdConfig,ft as OpenidConfigMapper,ee as Operation,z as OperationGroup,q as OperationGroupSummary,te as OperationGroupSummaryList,Ut as OperationGroupSummaryListMapper,j as OperationList,$ as OperationStatus,W as OperationStatusSummary,Lt as OperationSummaryMapper,Q as OperationType,G as ProductInfo,ct as ProductInfoContextService,pt as ProductInfoService,i as Repository,et as RepositoryContextService,o as RepositoryList,Xe as RepositoryListMapper,l as RepositoryLocation,it as RepositoryLocationContextService,rt as RepositoryLocationService,p as RepositoryLocationType,Qe as RepositoryRestService,Ze as RepositoryService,a as RepositorySizeInfo,u as RepositoryState,me as RepositoryStorageService,c as RepositoryType,$t as ResourceSearchStorageService,L as RestrictedPages,U as Rights,F as STATUS_ORDER,pe as SearchButton,le as SearchButtonConfig,he as SearchButtonList,P as SecurityConfig,gt as SecurityConfigMapper,Ne as SecurityContextService,_t as SecurityService,I as ServiceProvider,V as StorageData,B as StorageKey,r as SubscriptionList,Ee as Suggestion,ge as SuggestionList,Mt as SuggestionListMapper,Ae as SuggestionSelectedPayload,Se as SuggestionType,ae as ToastMessage,ce as ToastMessageList,ne as ToastType,ie as ToastrConfig,se as ToastrPosition,jt as UriUtil,Pe as WindowService,De as getContextName,Me as getCurrentRoute,ve as getPathName,Ue as isHomePage,Le as navigate,be as navigateTo,xe as openInNewTab};