graphdb-workbench 2.8.8 → 2.8.9-RC1

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 (233) hide show
  1. package/dist/{10.5ddeb0c3a1fe59eae189.bundle.js → 10.d8d48ce0ca42085e7864.bundle.js} +1 -1
  2. package/dist/100.bf4a4f519b81c43fafc1.bundle.js +1 -0
  3. package/dist/{100.39911dc242bc083427b5.bundle.js → 101.444ee8c4ad450a80c227.bundle.js} +1 -1
  4. package/dist/{101.3c81e5463ac7bd87920b.bundle.js → 102.ec42287cf6022b9eb02f.bundle.js} +1 -1
  5. package/dist/{102.fe653ba57ff2b81cdf07.bundle.js → 103.82c4dfa967a6f2407f11.bundle.js} +1 -1
  6. package/dist/{103.663db6e061c3509a1f78.bundle.js → 104.cb138bb3b878e001e32f.bundle.js} +1 -1
  7. package/dist/{104.5bde157512536df59792.bundle.js → 105.8c2014a729e3e29b78ae.bundle.js} +1 -1
  8. package/dist/{105.af4d75298548559a6b91.bundle.js → 106.4aa823fde540a06e4083.bundle.js} +1 -1
  9. package/dist/{106.1c526cd8378b98858e06.bundle.js → 107.09c059b73119d06600c0.bundle.js} +1 -1
  10. package/dist/{107.4bf934d8a7d093ea4cd6.bundle.js → 108.3c5b6b3268b21218a7a5.bundle.js} +1 -1
  11. package/dist/{108.8ea1a51acbd345907740.bundle.js → 109.57128c0d6212e0a46ad3.bundle.js} +1 -1
  12. package/dist/{109.a71df4aa4e00b47f5616.bundle.js → 110.af42819ef3cf70e39b25.bundle.js} +1 -1
  13. package/dist/{110.94d5a65ffa5d8891406f.bundle.js → 111.f548b124aab10b4b1c9e.bundle.js} +1 -1
  14. package/dist/{111.a8212d3445aa614f99d9.bundle.js → 112.f754348fe5d0086f677e.bundle.js} +1 -1
  15. package/dist/{112.393b01f7630bb30617c9.bundle.js → 113.d7c1a18d18713eece29a.bundle.js} +1 -1
  16. package/dist/{113.cbdf7d68d2471ced1ef4.bundle.js → 114.f719039be05fc7b214c5.bundle.js} +1 -1
  17. package/dist/{114.85465110c4fbd79849c7.bundle.js → 115.8dab67853260483ced85.bundle.js} +1 -1
  18. package/dist/{115.a6c405de2fe018cc6033.bundle.js → 116.ed2bb3fba38737cd21a2.bundle.js} +1 -1
  19. package/dist/{116.227e24944ca1c987460c.bundle.js → 117.8dc1a253f70f4727c027.bundle.js} +1 -1
  20. package/dist/{117.125beedc641ab53f511f.bundle.js → 118.d197d3c97039ee68643d.bundle.js} +1 -1
  21. package/dist/{118.a6e09ae6273a9e7714ff.bundle.js → 119.ee1dd79fb171af44577c.bundle.js} +1 -1
  22. package/dist/{12.8078044ba9dc5aefb919.bundle.js → 12.ed4bc07d06db664a8a2c.bundle.js} +1 -1
  23. package/dist/{119.f672e5bd50a1a9476dcc.bundle.js → 120.e25b821b13d853a321b5.bundle.js} +1 -1
  24. package/dist/{120.8725206e84a9f2b1fc44.bundle.js → 121.45b40da06cc7a71ae79f.bundle.js} +1 -1
  25. package/dist/{121.787215b44b2f8f4d2850.bundle.js → 122.4e50eaaadaf3dd57b2b2.bundle.js} +1 -1
  26. package/dist/{122.39e92001e2f86ed551f4.bundle.js → 123.2cc29edc9b32fcc35a5c.bundle.js} +1 -1
  27. package/dist/{123.30b2e28436b10116e05a.bundle.js → 124.5bf5f52df172c58b05d0.bundle.js} +1 -1
  28. package/dist/{124.ff59b5de798cc188f089.bundle.js → 125.53a564a1540cfbe90d0a.bundle.js} +1 -1
  29. package/dist/{125.04369aedfa25c24c03cf.bundle.js → 126.dc613e6d7c178aa1f71d.bundle.js} +1 -1
  30. package/dist/{126.20cf9bbd99138d8275e9.bundle.js → 127.aef2e7fa7136b5fb20dc.bundle.js} +1 -1
  31. package/dist/{127.fa70afe0caa6a82a487d.bundle.js → 128.c47682ae8c6f4827775e.bundle.js} +1 -1
  32. package/dist/{128.d6242296779b40ceee78.bundle.js → 129.79a97fa0c54c52a26f86.bundle.js} +1 -1
  33. package/dist/{13.e28878c924d54fd6affc.bundle.js → 13.49bf149227b1a2f915a6.bundle.js} +1 -1
  34. package/dist/{136.7045cfc939cc42c457de.bundle.js → 136.3b7b30e23a57edaccaad.bundle.js} +1 -1
  35. package/dist/{140.20b791dd9206aec902c3.bundle.js → 140.0824cff78d35896e19a1.bundle.js} +1 -1
  36. package/dist/{146.725d89d31b4a9b742d3f.bundle.js → 146.a0a2b0a47fa6363c2be0.bundle.js} +1 -1
  37. package/dist/{15.7ee3e6ec073366903f69.bundle.js → 15.2eabfe524e0689eb26e9.bundle.js} +1 -1
  38. package/dist/{16.cfcb97f2798c0f998b6d.bundle.js → 16.0ead6802df331f763762.bundle.js} +1 -1
  39. package/dist/{160.09bb953d13e3d63eed4f.bundle.js → 160.9df03bd5ab91e27a7e3c.bundle.js} +1 -1
  40. package/dist/{17.330b4db61f4286346e1d.bundle.js → 17.bcc91ddb954e2e1ee5a2.bundle.js} +1 -1
  41. package/dist/{18.131accbaf7a1f9d61001.bundle.js → 18.a4b27592c1b39f2b754b.bundle.js} +1 -1
  42. package/dist/186.d2a7c6668b2f2198549a.bundle.js +1 -1
  43. package/dist/{19.417d4a0cb5047abff48e.bundle.js → 19.33b6dc6ba1cea3b94465.bundle.js} +1 -1
  44. package/dist/{192.2d6358f31811ab3464ba.bundle.js → 192.a238bb9bb9a833ef304b.bundle.js} +1 -1
  45. package/dist/{198.f34180ba04b8f2d651ab.bundle.js → 198.568088e342b26f534c8f.bundle.js} +1 -1
  46. package/dist/{2.6684bcc4e367bcb9e628.bundle.js → 2.3837bd63288e2a826720.bundle.js} +1 -1
  47. package/dist/{20.ee5088425c87c66ae8d0.bundle.js → 20.204efddc3b65e3417f98.bundle.js} +1 -1
  48. package/dist/{200.7ff10cae741e1382bcb3.bundle.js → 200.6eee537413665b02c23f.bundle.js} +1 -1
  49. package/dist/{206.750777aab552b2c97c68.bundle.js → 206.7f16c0fcd5d65d82f869.bundle.js} +1 -1
  50. package/dist/{21.7ad047ae5bb8c0a68163.bundle.js → 21.bf90c5dbc6751926b09f.bundle.js} +1 -1
  51. package/dist/{217.76f3e1cda60f9abe1701.bundle.js → 217.57a8407776a632ad45ff.bundle.js} +1 -1
  52. package/dist/{226.a3b6f063cd117f6809e5.bundle.js → 226.914d0a244a06d6eff230.bundle.js} +1 -1
  53. package/dist/23.b57e6b08f36eaa6cfa1c.bundle.js +3 -0
  54. package/dist/{234.a223a40490dbaf451cd7.bundle.js → 234.d92bb857de797a88568d.bundle.js} +1 -1
  55. package/dist/{235.2d41cfd545adcebf23d1.bundle.js → 235.1182f064fb17ad3f55d1.bundle.js} +1 -1
  56. package/dist/{24.0fee5a7050aa01c43593.bundle.js → 24.77404fb1a29f7448cfa9.bundle.js} +1 -1
  57. package/dist/{25.42411835319827f4bfc1.bundle.js → 25.fd2151cfa79bb46e568e.bundle.js} +1 -1
  58. package/dist/{250.f20ba52ca6ed81d5d179.bundle.js → 250.ad498a8076662df1ed87.bundle.js} +1 -1
  59. package/dist/{26.68da73b9eb0e20ef6a04.bundle.js → 26.b4cf5132c870052d06f3.bundle.js} +1 -1
  60. package/dist/{261.bb146605dd28d704aa16.bundle.js → 261.01d68aa8402ef6ac3a38.bundle.js} +1 -1
  61. package/dist/{266.929c96d6372d56668ae0.bundle.js → 266.6b132ba2f789d8526651.bundle.js} +1 -1
  62. package/dist/{27.9170cfa5bc0b60e51d82.bundle.js → 27.af756f3e9a79334cb6f9.bundle.js} +1 -1
  63. package/dist/{271.f51d241774a8df3f20c7.bundle.js → 271.57cac2aa90c6b4409f51.bundle.js} +1 -1
  64. package/dist/{273.235fcf7e993aace5557d.bundle.js → 273.532af8c0707be80576a4.bundle.js} +1 -1
  65. package/dist/{274.4489e0c0b2b5457a3513.bundle.js → 274.9e29d76ce7a1be779fe2.bundle.js} +1 -1
  66. package/dist/{28.decaa67e47ac79ba59a3.bundle.js → 28.f64cabb9e00e2f08ed6a.bundle.js} +1 -1
  67. package/dist/{288.b263f48bcaa5db590821.bundle.js → 288.942d138e6c489a3ff6df.bundle.js} +1 -1
  68. package/dist/{29.8b089f6adfabb19d8073.bundle.js → 29.073b9b1176718648e438.bundle.js} +1 -1
  69. package/dist/{293.88a6655ca50918b1edc4.bundle.js → 293.35cf89ffdbbcab6c39de.bundle.js} +1 -1
  70. package/dist/{3.31747e6f9dde0db936ea.bundle.js → 3.f26cefadb24ee2836b8a.bundle.js} +1 -1
  71. package/dist/{30.9345c96cc253adab0ae0.bundle.js → 30.3530af7acf6dd4af07b4.bundle.js} +1 -1
  72. package/dist/{302.2a26c6c4f78a037c6d3e.bundle.js → 302.9e008d753a24f66797ac.bundle.js} +1 -1
  73. package/dist/{307.d188e735148ef48fbe80.bundle.js → 307.99dec37cee341acf70d6.bundle.js} +1 -1
  74. package/dist/{31.614dbf7498a1552e355c.bundle.js → 31.19f116ce71f83ce6c3df.bundle.js} +1 -1
  75. package/dist/{319.53ee0f1a2a998747c6bd.bundle.js → 319.6ee5e4d0efbb256ad040.bundle.js} +1 -1
  76. package/dist/{32.a52b26adcd7755172626.bundle.js → 32.3649b0fc7e7136790d43.bundle.js} +1 -1
  77. package/dist/{320.80795d19cc7aa6ccaa28.bundle.js → 320.5cb0f10abd3ca266298e.bundle.js} +1 -1
  78. package/dist/{328.e966458d8c8ceca910de.bundle.js → 328.b769a2c7965fcc07d289.bundle.js} +1 -1
  79. package/dist/{33.db577a77e1237b4997ef.bundle.js → 33.d4864cfbed6bb7c30c95.bundle.js} +1 -1
  80. package/dist/{330.38fcfd70d382ec90607d.bundle.js → 330.f66ff693ab2f86440650.bundle.js} +1 -1
  81. package/dist/{34.12bd97ec9f0f5411ede8.bundle.js → 34.4a17e8b0f3f203963d5e.bundle.js} +1 -1
  82. package/dist/342.cead059cad2a860fb1db.bundle.js +1 -0
  83. package/dist/348.b09b5350639beca8034e.bundle.js +1 -1
  84. package/dist/{35.e22a1a214303b341a46d.bundle.js → 35.2920265e8348ab78e718.bundle.js} +1 -1
  85. package/dist/354.474aa50f195477e48af9.bundle.js +1 -1
  86. package/dist/357.603fceaaeb0992019407.bundle.js +1 -1
  87. package/dist/358.5398b6635b1fc42b581a.bundle.js +1 -1
  88. package/dist/359.a2f8d884c46015ae98ed.bundle.js +1 -1
  89. package/dist/{36.1092cd7bf5d220bb9063.bundle.js → 36.99a2c4a2393ff13ec514.bundle.js} +1 -1
  90. package/dist/360.40b2c9f3610b0f8dea80.bundle.js +1 -1
  91. package/dist/361.91ac80c8c5586b0546a5.bundle.js +1 -1
  92. package/dist/37.d519cb3af9d6205f0015.bundle.js +1 -0
  93. package/dist/{38.fb2659cad2c86b5ec58d.bundle.js → 38.23f902df4ed8fbfc7fcf.bundle.js} +1 -1
  94. package/dist/{39.96fb293a7ae3ef7a5ad9.bundle.js → 39.171886987f5ef7d17208.bundle.js} +1 -1
  95. package/dist/391.45bf699afe7aba531cd9.bundle.js +1 -1
  96. package/dist/{40.159ef797572a6c14eab5.bundle.js → 40.0937e585f9f5a7eaab82.bundle.js} +1 -1
  97. package/dist/403.61a61ce1c12385533859.bundle.js +1 -1
  98. package/dist/404.b53dc0ad0aaedcf3f809.bundle.js +1 -1
  99. package/dist/405.eb8906e00f241da08275.bundle.js +1 -1
  100. package/dist/406.48298a2b9c49b99170f8.bundle.js +1 -1
  101. package/dist/407.56a20539c08f5d616640.bundle.js +1 -1
  102. package/dist/409.72d548b44e2f1c414a24.bundle.js +1 -1
  103. package/dist/{41.8a09e7ba27f7614de053.bundle.js → 41.3b2afebd8ef778234327.bundle.js} +1 -1
  104. package/dist/410.df9406357dc52e98d0c4.bundle.js +1 -1
  105. package/dist/411.3a8907f7c02b1e9581e2.bundle.js +1 -1
  106. package/dist/412.5feece7f4c5164d2eadb.bundle.js +1 -1
  107. package/dist/42.51a2b146401e3d3c44fd.bundle.js +1 -0
  108. package/dist/43.c3b8fc48a5d69126ff55.bundle.js +1 -0
  109. package/dist/{44.582668c8e60673ee9a89.bundle.js → 44.0b6f6369f9c157f2243c.bundle.js} +1 -1
  110. package/dist/46.5baa02d0ce0f4e4bec79.bundle.js +1 -0
  111. package/dist/{47.a0af564fb81592c87a50.bundle.js → 47.c7898dbc38a6a6e9321b.bundle.js} +1 -1
  112. package/dist/{48.067da85ef40da92d258a.bundle.js → 48.4a5b02907ad2d1a2792f.bundle.js} +1 -1
  113. package/dist/{49.ca18c72cba3d68131fdb.bundle.js → 49.143329d875c1714aec89.bundle.js} +1 -1
  114. package/dist/{50.271eee82fbebc9d53f38.bundle.js → 50.385486fe0efbefd5dfa9.bundle.js} +1 -1
  115. package/dist/{51.4ac9662be57037924446.bundle.js → 51.9f3c96f8a93b54423852.bundle.js} +1 -1
  116. package/dist/{52.1470d5ed8b99f64d5ce2.bundle.js → 52.ff20925f8f7656382d7b.bundle.js} +1 -1
  117. package/dist/{53.f13a957ecbd28e1125c7.bundle.js → 53.e286cd8cfb636fcec996.bundle.js} +1 -1
  118. package/dist/{54.c875b7240154b221bebb.bundle.js → 54.326b8c0143c463fc8e2d.bundle.js} +1 -1
  119. package/dist/55.4009a0d60dea722c108d.bundle.js +1 -0
  120. package/dist/{55.49f77e42bc983dcbfacc.bundle.js → 56.a581f6f1ded6a4d3d08b.bundle.js} +1 -1
  121. package/dist/{56.5a4901fea60239d0b3e0.bundle.js → 57.aa39c7d23ece602d952f.bundle.js} +1 -1
  122. package/dist/{57.1bb4040e33a9a35f5b9f.bundle.js → 58.fad69b0e6153a06c83b7.bundle.js} +1 -1
  123. package/dist/{58.394c32af3b117b179610.bundle.js → 59.84e7285984168a313d36.bundle.js} +1 -1
  124. package/dist/{6.f8af74652bcab7953736.bundle.js → 6.73f6adae3ab11729ebf2.bundle.js} +1 -1
  125. package/dist/{59.e50dc5ce41dd02cf3b3d.bundle.js → 60.ad49b739e4b8f2cdbce7.bundle.js} +1 -1
  126. package/dist/{60.95c6753d580f3a716b22.bundle.js → 61.ee14d8cda3708fe9c287.bundle.js} +1 -1
  127. package/dist/62.092aacacd064526783c0.bundle.js +1 -0
  128. package/dist/{62.48b219154c6345908a80.bundle.js → 63.9537a1fd0366d5518114.bundle.js} +1 -1
  129. package/dist/64.1dd28ef2f60fe1ba23a5.bundle.js +1 -0
  130. package/dist/{64.04c60a42b228c234e2ad.bundle.js → 65.4c0218d3ba1faae1f6ad.bundle.js} +1 -1
  131. package/dist/{65.bb26ca0693ef27c414a7.bundle.js → 66.2a2d9bf0e595ca627c78.bundle.js} +1 -1
  132. package/dist/{66.f19c0287fadf05c84858.bundle.js → 67.a4e87ab3032de83a0d71.bundle.js} +1 -1
  133. package/dist/{67.6b37a09a02d11c37bcaa.bundle.js → 68.66efe1b03756e3052e35.bundle.js} +1 -1
  134. package/dist/{68.9ebaf6d51e22177c8ba2.bundle.js → 69.fd10e482a3491294f900.bundle.js} +1 -1
  135. package/dist/{7.e59eae3aa5e9e0ea5a0e.bundle.js → 7.c7a405d7dc99c9ebee48.bundle.js} +1 -1
  136. package/dist/70.38ae428de620fbf7602d.bundle.js +1 -0
  137. package/dist/{69.f3be67c2243892d32055.bundle.js → 71.e18795e8eaed8f747ce5.bundle.js} +1 -1
  138. package/dist/{70.415393ee813d58975172.bundle.js → 72.a53c1a358c3335c3eaa1.bundle.js} +1 -1
  139. package/dist/{71.e89efd706a10aea2074e.bundle.js → 73.d442bfb6f448e72c5bce.bundle.js} +1 -1
  140. package/dist/74.05569d4f46a43d6d56e4.bundle.js +1 -0
  141. package/dist/{73.53bbbd74f7de2913152b.bundle.js → 75.e226c0d22ed7ff1b57ee.bundle.js} +1 -1
  142. package/dist/{74.184ffc6fc6053f5c645d.bundle.js → 76.afa96077de497c981882.bundle.js} +1 -1
  143. package/dist/{75.441343592edbcf27a029.bundle.js → 77.9fa02265d836024fdf79.bundle.js} +1 -1
  144. package/dist/{76.055e216b311e1817484e.bundle.js → 78.9f81b2060ae650976ae7.bundle.js} +1 -1
  145. package/dist/{77.c75c1df7b8e2c4855b17.bundle.js → 79.3fc17aa270c5a6477e9c.bundle.js} +1 -1
  146. package/dist/{8.28f2c0d888f5e99cfbc9.bundle.js → 8.18ec3a5b3f95a7965e71.bundle.js} +1 -1
  147. package/dist/{78.bd5758f93518290f477f.bundle.js → 80.7de02802c242d6cf125c.bundle.js} +1 -1
  148. package/dist/{79.1d57915d970df0a37229.bundle.js → 81.66b9a961188d712b1d48.bundle.js} +1 -1
  149. package/dist/{80.c83c5d743d89a63e7437.bundle.js → 82.8c402a2cedd2441c3f3c.bundle.js} +1 -1
  150. package/dist/{81.d04604229fe4fdd02601.bundle.js → 83.15cd8f06607b23e5e901.bundle.js} +1 -1
  151. package/dist/{82.a8e009ab0c08b859d2ce.bundle.js → 84.825f8eaa43e71f73f25d.bundle.js} +1 -1
  152. package/dist/{83.80c0e99346b0e55b33a5.bundle.js → 85.00ce4d8f4433d87bf54e.bundle.js} +1 -1
  153. package/dist/{84.891be8b57abdab473123.bundle.js → 86.ffeb1acd50a34948e089.bundle.js} +1 -1
  154. package/dist/{86.33c18744f8b1ae858a66.bundle.js → 87.9ac37a1a4a11ef7dfbac.bundle.js} +1 -1
  155. package/dist/{87.a623d6e7d303f6f34851.bundle.js → 88.5b052707f2cd26eb7890.bundle.js} +1 -1
  156. package/dist/{88.11dcfbd80b70ce8140af.bundle.js → 89.76461444a1cb2b2e1114.bundle.js} +1 -1
  157. package/dist/{9.4b42fc29ab253cd7ad0d.bundle.js → 9.d57134d0b4eb2e6f4ee6.bundle.js} +1 -1
  158. package/dist/{89.2c22dfa2ddf7c65e8f07.bundle.js → 90.7934551daab93be805ba.bundle.js} +1 -1
  159. package/dist/{90.d64c9e9798606a8a2488.bundle.js → 91.de9fe730d2b00227b9d4.bundle.js} +1 -1
  160. package/dist/{91.53d392a817902243fd14.bundle.js → 92.f4a3984a912edbb06838.bundle.js} +1 -1
  161. package/dist/{92.4c7f6ae785e5c2726adf.bundle.js → 93.e22a88d63bd4fc5f616c.bundle.js} +1 -1
  162. package/dist/{93.44989fd952e4ee29a14d.bundle.js → 94.f731de3062bce3990e2f.bundle.js} +1 -1
  163. package/dist/{94.8f5fc9e6922907cdf8d0.bundle.js → 95.5fdf43bda2882304ace9.bundle.js} +1 -1
  164. package/dist/{95.7a98715e44233a65f0b6.bundle.js → 96.21c753d787869238e5ed.bundle.js} +1 -1
  165. package/dist/{96.b2a0154600564a0bf2c8.bundle.js → 97.13cd4feb8916c17b8b20.bundle.js} +1 -1
  166. package/dist/{97.19320ba399d9b0bc4a3d.bundle.js → 98.6379c1708e09a721cc36.bundle.js} +1 -1
  167. package/dist/{98.53c28cc4683594868437.bundle.js → 99.bfe2ea3e30bb6b0e9045.bundle.js} +1 -1
  168. package/dist/{bundle.8b5133c2bd45c3446e7b.bundle.js → bundle.f1f997c1b702d546a4e1.bundle.js} +5 -5
  169. package/dist/css/autocomplete.css +5 -0
  170. package/dist/css/rdf-class-hierarchy.css +1 -1
  171. package/dist/index.html +3 -3
  172. package/dist/js/angular/autocomplete/templates/modal/add-label.html +5 -2
  173. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  174. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  175. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  176. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  177. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  178. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  179. package/dist/js/angular/security/templates/user.html +1 -1
  180. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  181. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  182. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  183. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  184. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  185. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  186. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +1 -1
  187. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  188. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  189. package/dist/license-checker.json +2 -2
  190. package/dist/pages/aclmanagement.html +2 -2
  191. package/dist/pages/autocomplete.html +1 -1
  192. package/dist/pages/choose-repository-type.html +1 -1
  193. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  194. package/dist/pages/create-index.html +1 -1
  195. package/dist/pages/dependencies.html +1 -1
  196. package/dist/pages/domainRangeInfo.html +2 -2
  197. package/dist/pages/edit.html +1 -1
  198. package/dist/pages/explore.html +1 -1
  199. package/dist/pages/export.html +1 -1
  200. package/dist/pages/find.html +1 -1
  201. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  202. package/dist/pages/graphs-visualizations.html +7 -7
  203. package/dist/pages/guides.html +1 -1
  204. package/dist/pages/import.html +2 -2
  205. package/dist/pages/jdbc-create.html +1 -1
  206. package/dist/pages/monitor/backup-and-restore.html +1 -1
  207. package/dist/pages/monitor/queries.html +1 -1
  208. package/dist/pages/monitor/resources.html +1 -1
  209. package/dist/pages/namespaces.html +2 -2
  210. package/dist/pages/plugins.html +1 -1
  211. package/dist/pages/rdfClassHierarchyInfo.html +8 -10
  212. package/dist/pages/rdfrank.html +2 -2
  213. package/dist/pages/repositories.html +1 -1
  214. package/dist/pages/repository.html +1 -1
  215. package/dist/pages/similarity-indexes.html +1 -1
  216. package/dist/pages/sparql-editor.html +1 -1
  217. package/dist/pages/sparql-template-create.html +1 -1
  218. package/dist/pages/ux-test1.html +2 -2
  219. package/dist/pages/webapi.html +2 -2
  220. package/dist/res/swagger5/index.html +12 -12
  221. package/package.json +1 -1
  222. package/dist/129.e20705a1f5be2410d666.bundle.js +0 -1
  223. package/dist/23.56301f1a97cc94310f2d.bundle.js +0 -3
  224. package/dist/342.ca94acdc8de22e22241a.bundle.js +0 -1
  225. package/dist/37.fbd78997b9e6a3530e15.bundle.js +0 -1
  226. package/dist/42.68cf9fea9586d95c7ef2.bundle.js +0 -1
  227. package/dist/43.53bafbaf1332f99c7e74.bundle.js +0 -1
  228. package/dist/46.eb3af10b1fccbfa2f5bf.bundle.js +0 -1
  229. package/dist/61.f553a4c10a25b9af3cd7.bundle.js +0 -1
  230. package/dist/63.9c60525f7eed7756e83e.bundle.js +0 -1
  231. package/dist/72.6f58ccfef39ec2ee9614.bundle.js +0 -1
  232. package/dist/85.945ee0e14f628a4fa4a1.bundle.js +0 -1
  233. package/dist/99.bc85d568135caa51630f.bundle.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[15,47,65,78,236,244,256,257,258,259,262,326],{102:function(e,i){function t(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},155:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityQueryType",(function(){return r}));const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}},297:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexError",(function(){return r}));class r extends Error{}},298:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexInfo",(function(){return y}));var r=t(95),n=t(155),s=t(90);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},299:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityViewMode",(function(){return r}));const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},322:function(e,i,t){"use strict";t.r(i);t(102),t(13),t(22);var r=t(99),n=t(19),s=t(90),a=t(97),y=t(299),l=t(155),o=t(92),d=t(297),u=t(130),c=t(298);function I(e,i,t,I,m,S,p,h,T,x,g,Q,E,A,f,v){e.productInfo=h,e.SimilarityQueryType=l.SimilarityQueryType,e.SimilarityIndexType=o.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===g.get(Q.HIDE_SIMILARITY_HELP),e.savingIndex=!1;let R=!1,L=void 0,w=void 0,C=void 0,M=y.SimilarityViewMode.CREATE;e.changeSimilarityIndexType=(i,t=l.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[o.SimilarityIndexType.PREDICATION]:e.samples=w[o.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{P(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),D(e.similarityIndexInfo,t).then(e=>K(e,t)).then(e=>J(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=V();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,e.savingIndex=!0,D(e.similarityIndexInfo).then(K).then(J).then($).then(z).then(e=>_(e.getSimilarityIndex())).then(()=>U()).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.could.not.get.indexes.error"))}).finally(()=>{e.savingIndex=!1})},e.viewQuery=()=>{D(e.similarityIndexInfo).then($).then(N).then(O).catch(e=>i.error(getError(e)))},e.preview=()=>{D(e.similarityIndexInfo).then(J).then(K).then(()=>{const i=V();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){R?(e.saveOrUpdateExecuted=!0,e.savingIndex=!0,D(e.similarityIndexInfo).then(k).then(K).then(J).then(W).then(X).then(b).then(e=>T.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg")).then(()=>{p.url("similarity")}).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.change.query.error"))}).finally(()=>{e.savingIndex=!1})):p.url("similarity")},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?V().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===M,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===M,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===M,e.setDirty=()=>{R=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=V();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=g.get(Q.HIDE_SIMILARITY_HELP)),1!==i?(g.set(Q.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(g.set(Q.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?E.instant("similarity.query.edition.msg"):E.instant("similarity.index.creation.msg");return E.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return l.SimilarityQueryType.DATA===i?e.hasSelectQueryError():l.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():l.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;l.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):l.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):l.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:E.instant(`similarity.query.type.${i}.name`)};return t?E.instant("similarity.error.query.empty",s):n?E.instant("similarity.error.query.invalid",s):r?E.instant("similarity.error.query.invalid_type",s):""};const D=(e,i)=>V().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),N=e=>m.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),O=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},P=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],l.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,l.SimilarityQueryType.ANALOGICAL)),w)if(o.SimilarityIndexType.PREDICATION===t){const e=w[o.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,l.SimilarityQueryType.DATA)}else{const e=w[o.SimilarityIndexType.TEXT].literals;i.setQuery(e,l.SimilarityQueryType.DATA)}},Y=()=>{const t=new c.SimilarityIndexInfo;t.setName(H()),t.setType(G()),t.setSelectedQueryType(e.isEditViewMode()?l.SimilarityQueryType.SEARCH:l.SimilarityQueryType.DATA);const n=p.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),P(t);const s=p.search().searchQuery;s&&t.setQuery(s,l.SimilarityQueryType.SEARCH);const a=p.search().selectQuery;a&&t.setQuery(a,l.SimilarityQueryType.DATA);const y=p.search().analogicalQuery;if(y&&t.setQuery(y,l.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(p.search().stopList),t.setAnalyzer(p.search().analyzer);const e=j(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?m.getIndexes().then(i=>{const n=Object(r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=j(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch((function(e){const t=getError(e);i.error(t,E.instant("similarity.could.not.get.indexes.error"))})):Promise.resolve(t)},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.PROTECTED},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>"repositories/"+A.getActiveRepository(),_=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=o.SimilarityIndexType.TEXT_LITERAL),R=!1,m.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(E.instant("similarity.create.index.successfully")),t)).catch((function(e){const t=getError(e);return i.error(t,E.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))}))},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return m.saveSearchQuery(JSON.stringify(t)).then(()=>(R=!1,i))},U=()=>{setTimeout(()=>p.url("similarity"),100)},V=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),H=()=>{const i=p.search().name||"";return e.isCloneViewMode()?`${E.instant("similarity.copy_of.prefix")}_${i}`:i},G=()=>{const e=p.search().type;return void 0===e||e.startsWith("text")?o.SimilarityIndexType.TEXT:e},j=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},$=e=>Promise.all([k(e).then(F).then(W).then(X).then(J).then(K)]).then(()=>e),z=e=>m.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),k=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),F=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),W=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),X=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),J=(e,i)=>V().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),K=(e,i)=>V().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),Z=(e,i,t,r)=>{v.openSimpleModal({title:e,message:i,warning:!0}).result.then((function(){angular.isFunction(t)&&t()}),(function(){angular.isFunction(r)&&r()}))},ee=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},ie=e=>{R&&(e.returnValue=!0)},te=()=>{window.removeEventListener("beforeunload",ie),re.forEach(e=>e())},re=[];re.push(f.subscribe("repositoryWillChangeEvent",i=>new Promise((function(t){if(e.isCreateViewMode()||e.isCloneViewMode())return void t(i);const r=()=>{R=!1,U(),t(i)};if(R){const e=()=>{i.cancel=!0,t(i)},n=E.instant("common.confirm"),s=E.instant("similarity.warning.unsaved.changes");Z(n,s,r,e)}else r()})))),re.push(e.$on("$locationChangeStart",(e,i)=>{if(R){e.preventDefault();const t=E.instant("common.confirm"),r=E.instant("similarity.warning.unsaved.changes");Z(t,r,()=>{te();const e=p.absUrl().length-p.url().length,t=i.substring(e);p.path(t)})}else te()})),re.push(e.$on("$destroy",te)),window.addEventListener("beforeunload",ie),M=(()=>{if(void 0===p.search().name)return y.SimilarityViewMode.CREATE;const e=p.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const ne=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){i&&(e.loadingControllerResources=!0,Promise.all([m.getSearchQueries(),m.getSamples(),A.getPrefixes(i.id)]).then(([i,t,r])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=i?i.data:[],w=t?t.data:[],C=r,Y().then(i=>{e.similarityIndexInfo=i;let t=l.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=l.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{re.push(e.$on("repositoryIsSet",ee)),ne(),e.loadingControllerResources=!1}))}))}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",I),I.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},90:function(e,i,t){"use strict";t.r(i),t.d(i,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},92:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},94:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},95:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndex",(function(){return s}));var r=t(92),n=t(94);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},97:function(e,i,t){"use strict";t.r(i),t.d(i,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},99:function(e,i,t){"use strict";t.r(i),t.d(i,"mapIndexesResponseToSimilarityIndex",(function(){return n}));var r=t(95);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[15,47,66,80,236,244,256,257,258,259,262,326],{102:function(e,i){function t(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},155:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityQueryType",(function(){return r}));const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}},297:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexError",(function(){return r}));class r extends Error{}},298:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexInfo",(function(){return y}));var r=t(95),n=t(155),s=t(90);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},299:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityViewMode",(function(){return r}));const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},322:function(e,i,t){"use strict";t.r(i);t(102),t(13),t(22);var r=t(99),n=t(19),s=t(90),a=t(97),y=t(299),l=t(155),o=t(92),d=t(297),u=t(131),c=t(298);function I(e,i,t,I,m,S,p,h,T,x,g,Q,E,A,f,v){e.productInfo=h,e.SimilarityQueryType=l.SimilarityQueryType,e.SimilarityIndexType=o.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===g.get(Q.HIDE_SIMILARITY_HELP),e.savingIndex=!1;let R=!1,L=void 0,w=void 0,C=void 0,M=y.SimilarityViewMode.CREATE;e.changeSimilarityIndexType=(i,t=l.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[o.SimilarityIndexType.PREDICATION]:e.samples=w[o.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{P(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),D(e.similarityIndexInfo,t).then(e=>K(e,t)).then(e=>J(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=V();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,e.savingIndex=!0,D(e.similarityIndexInfo).then(K).then(J).then($).then(z).then(e=>_(e.getSimilarityIndex())).then(()=>U()).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.could.not.get.indexes.error"))}).finally(()=>{e.savingIndex=!1})},e.viewQuery=()=>{D(e.similarityIndexInfo).then($).then(N).then(O).catch(e=>i.error(getError(e)))},e.preview=()=>{D(e.similarityIndexInfo).then(J).then(K).then(()=>{const i=V();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){R?(e.saveOrUpdateExecuted=!0,e.savingIndex=!0,D(e.similarityIndexInfo).then(k).then(K).then(J).then(W).then(X).then(b).then(e=>T.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg")).then(()=>{p.url("similarity")}).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.change.query.error"))}).finally(()=>{e.savingIndex=!1})):p.url("similarity")},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?V().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===M,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===M,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===M,e.setDirty=()=>{R=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=V();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=g.get(Q.HIDE_SIMILARITY_HELP)),1!==i?(g.set(Q.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(g.set(Q.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?E.instant("similarity.query.edition.msg"):E.instant("similarity.index.creation.msg");return E.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return l.SimilarityQueryType.DATA===i?e.hasSelectQueryError():l.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():l.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;l.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):l.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):l.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:E.instant(`similarity.query.type.${i}.name`)};return t?E.instant("similarity.error.query.empty",s):n?E.instant("similarity.error.query.invalid",s):r?E.instant("similarity.error.query.invalid_type",s):""};const D=(e,i)=>V().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),N=e=>m.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),O=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},P=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],l.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,l.SimilarityQueryType.ANALOGICAL)),w)if(o.SimilarityIndexType.PREDICATION===t){const e=w[o.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,l.SimilarityQueryType.DATA)}else{const e=w[o.SimilarityIndexType.TEXT].literals;i.setQuery(e,l.SimilarityQueryType.DATA)}},Y=()=>{const t=new c.SimilarityIndexInfo;t.setName(H()),t.setType(G()),t.setSelectedQueryType(e.isEditViewMode()?l.SimilarityQueryType.SEARCH:l.SimilarityQueryType.DATA);const n=p.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),P(t);const s=p.search().searchQuery;s&&t.setQuery(s,l.SimilarityQueryType.SEARCH);const a=p.search().selectQuery;a&&t.setQuery(a,l.SimilarityQueryType.DATA);const y=p.search().analogicalQuery;if(y&&t.setQuery(y,l.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(p.search().stopList),t.setAnalyzer(p.search().analyzer);const e=j(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?m.getIndexes().then(i=>{const n=Object(r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=j(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch((function(e){const t=getError(e);i.error(t,E.instant("similarity.could.not.get.indexes.error"))})):Promise.resolve(t)},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.READ},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>"repositories/"+A.getActiveRepository(),_=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=o.SimilarityIndexType.TEXT_LITERAL),R=!1,m.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(E.instant("similarity.create.index.successfully")),t)).catch((function(e){const t=getError(e);return i.error(t,E.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))}))},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return m.saveSearchQuery(JSON.stringify(t)).then(()=>(R=!1,i))},U=()=>{setTimeout(()=>p.url("similarity"),100)},V=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),H=()=>{const i=p.search().name||"";return e.isCloneViewMode()?`${E.instant("similarity.copy_of.prefix")}_${i}`:i},G=()=>{const e=p.search().type;return void 0===e||e.startsWith("text")?o.SimilarityIndexType.TEXT:e},j=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},$=e=>Promise.all([k(e).then(F).then(W).then(X).then(J).then(K)]).then(()=>e),z=e=>m.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),k=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),F=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),W=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),X=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),J=(e,i)=>V().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),K=(e,i)=>V().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),Z=(e,i,t,r)=>{v.openSimpleModal({title:e,message:i,warning:!0}).result.then((function(){angular.isFunction(t)&&t()}),(function(){angular.isFunction(r)&&r()}))},ee=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},ie=e=>{R&&(e.returnValue=!0)},te=()=>{window.removeEventListener("beforeunload",ie),re.forEach(e=>e())},re=[];re.push(f.subscribe("repositoryWillChangeEvent",i=>new Promise((function(t){if(e.isCreateViewMode()||e.isCloneViewMode())return void t(i);const r=()=>{R=!1,U(),t(i)};if(R){const e=()=>{i.cancel=!0,t(i)},n=E.instant("common.confirm"),s=E.instant("similarity.warning.unsaved.changes");Z(n,s,r,e)}else r()})))),re.push(e.$on("$locationChangeStart",(e,i)=>{if(R){e.preventDefault();const t=E.instant("common.confirm"),r=E.instant("similarity.warning.unsaved.changes");Z(t,r,()=>{te();const e=p.absUrl().length-p.url().length,t=i.substring(e);p.path(t)})}else te()})),re.push(e.$on("$destroy",te)),window.addEventListener("beforeunload",ie),M=(()=>{if(void 0===p.search().name)return y.SimilarityViewMode.CREATE;const e=p.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const ne=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){i&&(e.loadingControllerResources=!0,Promise.all([m.getSearchQueries(),m.getSamples(),A.getPrefixes(i.id)]).then(([i,t,r])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=i?i.data:[],w=t?t.data:[],C=r,Y().then(i=>{e.similarityIndexInfo=i;let t=l.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=l.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{re.push(e.$on("repositoryIsSet",ee)),ne(),e.loadingControllerResources=!1}))}))}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",I),I.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},90:function(e,i,t){"use strict";t.r(i),t.d(i,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},92:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},94:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},95:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndex",(function(){return s}));var r=t(92),n=t(94);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},97:function(e,i,t){"use strict";t.r(i),t.d(i,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},99:function(e,i,t){"use strict";t.r(i),t.d(i,"mapIndexesResponseToSimilarityIndex",(function(){return n}));var r=t(95);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[16,87,133,134,136,138,139,293],{109:function(e,t,r){"use strict";r.r(t),r.d(t,"UPDATE_CLUSTER",(function(){return n})),r.d(t,"DELETE_CLUSTER",(function(){return o})),r.d(t,"CLICK_IN_VIEW",(function(){return s})),r.d(t,"NODE_SELECTED",(function(){return a})),r.d(t,"CREATE_CLUSTER",(function(){return i})),r.d(t,"MODEL_UPDATED",(function(){return l}));const n="updateCluster",o="deleteCluster",s="clickInView",a="nodeSelected",i="createCluster",l="modelUpdated"},114:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",r),r.$inject=["$http"];function r(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/httpConfig",t)},updateClusterConfiguration:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const r=$.param({force:t});return e.delete("rest/cluster/config?"+r)},replaceNodesInCluster:function(t){return e.patch("rest/cluster/httpConfig",t)},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")},addCusterTag:function(t){return e.post("rest/cluster/config/tag",t)},deleteClusterTag:function(t){return e({method:"DELETE",url:"rest/cluster/config/tag",data:{tag:t},headers:{"Content-type":"application/json;charset=utf-8"}})},disableSecondaryMode:function(){return e.delete("rest/cluster/config/secondary-mode")},enableSecondaryMode:function(t){return e.post("rest/cluster/config/secondary-mode",t)}}}},218:function(e,t,r){"use strict";r.r(t);r(50);function n(e,t,r,n,o){return{addLocationHttp:function(e){let r;return n.addLocation(e).catch(e=>{const r=getError(e.data,e.status);return t.error(r,o.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return r=t.find(t=>t.endpoint===e.uri),r})},getLocationsWithRpcAddresses:s,createNewLocation:function(e){return{uri:e,authType:"signature",username:"",password:"",active:!1,clusterMode:!0,isLocal:!1}},isInCluster:function(e,t){return e.some(e=>t.rpcAddress===e.address)}};function s(){return n.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const r=getError(e.data,e.status);t.error(r,o.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return n.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]},219:function(e,t){function r(e){let t,r=!1;function n(){return r}function o(t){r=t,e.emit("showClusterConfigurationPanel",n())}function s(){return t}return{updateClusterViewD3Container:function(r){t=r,e.emit("clusterViewD3ContainerChanged",s())},getClusterViewD3Container:s,onClusterViewD3ContainerUpdated:function(t){return e.subscribe("clusterViewD3ContainerChanged",()=>t(s()))},getShowClusterConfigurationPanel:n,setShowClusterConfigurationPanel:o,showClusterConfigurationPanel:function(){o(!0)},hideClusterConfigurationPanel:function(){o(!1)},onShowClusterConfigurationPanel:function(t){return e.subscribe("showClusterConfigurationPanel",()=>t(n()))}}}angular.module("graphdb.framework.clustermanagement.services.cluster-view-context-service",[]).factory("ClusterViewContextService",r),r.$inject=["EventEmitterService"]},220:function(e,t,r){"use strict";r.r(t);r(114);function n(e,t,r,n,o,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=_.cloneDeep(a.clusterConfiguration),e.loader=!1,e.configFields=[{id:"election-minimum-timeout",name:"electionMinTimeout",label:"cluster_management.cluster_configuration_properties.election_min_timeout",tooltip:"cluster_management.cluster_configuration_properties.election_min_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"election-range-timeout",name:"electionRangeTimeout",label:"cluster_management.cluster_configuration_properties.election_range_timeout",tooltip:"cluster_management.cluster_configuration_properties.election_range_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"heartbeat-interval",name:"heartbeatInterval",label:"cluster_management.cluster_configuration_properties.heartbeat_interval",tooltip:"cluster_management.cluster_configuration_properties.heartbeat_interval_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"message-size",name:"messageSizeKB",label:"cluster_management.cluster_configuration_properties.message_size_kb",tooltip:"cluster_management.cluster_configuration_properties.message_size_kb_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"verification-timeout",name:"verificationTimeout",label:"cluster_management.cluster_configuration_properties.verification_timeout",tooltip:"cluster_management.cluster_configuration_properties.verification_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"transaction-log-max-size",name:"transactionLogMaximumSizeGB",label:"cluster_management.cluster_configuration_properties.transaction_log_maximum_size_gb",tooltip:"cluster_management.cluster_configuration_properties.transaction_log_maximum_size_gb_tooltip",pattern:"-?[1-9][0-9]*(\\.[0-9]+)?",errorMsg:"cluster_management.cluster_page.errors.small_transaction_log_max_size"},{id:"batch-update-interval",name:"batchUpdateInterval",label:"cluster_management.cluster_configuration_properties.batch_update_interval",tooltip:"cluster_management.cluster_configuration_properties.batch_update_interval_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"}],e.updateClusterConfiguration=()=>(e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),n.updateClusterConfiguration(e.clusterConfiguration).then(()=>{o.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(e){i(e.data,e.status)})).finally(()=>e.setLoader(!1))),e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=(t,n)=>{r.cancel(e.loaderTimeout),t?e.loaderTimeout=r(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.ok=()=>{e.isClusterConfigurationValid()?e.updateClusterConfiguration():o.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")},e.onClick=e=>{e.stopPropagation()};const i=(t,r)=>{delete e.preconditionErrors,o.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===r||"string"==typeof t?e.errors.push(t):412===r?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===r&&e.errors.push(...t)}}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster",[]).controller("EditClusterCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"]},221:function(e,t){function r(e,t){e.forceDelete=!1,e.ok=()=>{t.close(e.forceDelete)},e.cancel=()=>{t.dismiss("cancel")},e.onClick=e=>{e.stopPropagation()}}angular.module("graphdb.framework.clustermanagement.controllers.delete-cluster",[]).controller("DeleteClusterCtrl",r),r.$inject=["$scope","$uibModalInstance"]},222:function(e,t,r){"use strict";r.r(t);r(223);var n=r(18);function o(e,t,r,o,s,a){const i=[];e.isValid=s.isValid(),e.ok=()=>{const e=s.getClusterView();e.hasCluster()?t.close(Object(n.cloneDeep)(e.getUpdateActions())):t.close(Object(n.cloneDeep)(e.getUpdateActions().clusterConfiguration))},e.cancel=()=>{e.isChanged?a.openSimpleModal({title:r.instant("common.warning"),message:r.instant("page.leave.pristine.warning"),warning:!0}).result.then(()=>{t.dismiss("cancel")}):t.dismiss("cancel")};const l=()=>{i.forEach(e=>e())};i.push(s.onClusterValidityChanged(t=>{e.isValid=t})),i.push(s.onClusterViewChanged(()=>{if(!e.hasCluster&&0===s.getAttached().length){const e=s.getLocalNode();s.addLocation(e)}e.isChanged=s.isChanged()})),e.$on("$destroy",()=>{l(),s.setClusterView(void 0)}),s.setClusterView(o.clusterModel),e.hasCluster=o.clusterModel.hasCluster}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster-nodes-modal",["graphdb.framework.clustermanagement.services.cluster-context"]).controller("EditClusterNodesModalController",o),o.$inject=["$scope","$uibModalInstance","$translate","data","ClusterContextService","ModalService"]},317:function(e,t,r){"use strict";r.r(t);r(114),r(218),r(219),r(220),r(221),r(222);var n=r(18),o=r(98),s=r(109);function a(e,t,r,a,i,l,c,u,d,g,m,p,f,_,C,h,v,w){let S;const b=[];e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=o.NodeState,e.leaderChanged=!1,e.currentLeader=null,e.showClusterConfigurationPanel=!1,e.clusterConfigurationPanelSize=void 0,e.onopen=()=>angular.noop(),e.onclose=()=>{w.hideClusterConfigurationPanel()},e.isAdmin=()=>u.isAuthenticated()&&u.isAdmin(),e.openClusterConfigurationPanel=()=>{e.showClusterConfigurationPanel=!0,w.showClusterConfigurationPanel()},e.setLoader=(t,r)=>{p.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=p(()=>{e.loader=t},50)):e.loader=!1},e.getLoaderMessage=()=>e.loaderMessage||C.instant("common.loading"),e.showUpdateClusterGroupDialog=()=>{e.setLoader(!0),k().then(()=>(e.setLoader(!1),l.open({templateUrl:"js/angular/clustermanagement/templates/modal/edit-cluster-nodes-modal.html",controller:"EditClusterNodesModalController",size:"lg",backdrop:"static",keyboard:!1,resolve:{data:()=>({clusterModel:e.clusterModel})}}).result)).then(e=>{e.addNodes||e.removeNodes?E(e):$(e)}).catch(()=>{e.setLoader(!1),y(!0)}).finally(()=>{k()})},e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=()=>f.getClusterStatus().then(t=>{const r=t.data.slice(),n=r.find(e=>e.nodeState===o.NodeState.LEADER);M(e.currentLeader,n)&&(e.currentLeader=n,e.leaderChanged=!0),e.currentNode=r.find(t=>e.currentNode&&t.address===e.currentNode.address);const s=L(n,r);e.clusterModel.hasCluster=!0,e.clusterModel.nodes=r,e.clusterModel.links=s}).catch(t=>{if(404===t.status)return e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null,Promise.reject(t)}),e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>k());const $=t=>(e.setLoader(!0,C.instant("cluster_management.cluster_page.creating_cluster_loader")),f.createCluster(t).then(()=>{a.success(C.instant("cluster_management.cluster_page.notifications.create_success"))}).catch(e=>{D(e.data,e.status)}).finally(()=>{e.setLoader(!1)})),E=t=>{const r=C.instant("cluster_management.cluster_page.updating_cluster_loader");e.setLoader(!0,r);const n={addNodes:t.addNodes,removeNodes:t.removeNodes};f.replaceNodesInCluster(n).then(()=>{const e=C.instant("cluster_management.cluster_page.notifications.update_success");T(e)}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.update_failed");D(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),y(!0)})},L=(e,t)=>{const r=[];return e&&Object.keys(e.syncStatus).forEach(n=>{const s=e.syncStatus[n];if(s!==o.LinkState.NO_CONNECTION&&(r.push({id:`${e.address}-${n}`,source:e.address,target:n,status:s}),s===o.LinkState.OUT_OF_SYNC)){const e=t.find(e=>e.address===n);let s;if(e.recoveryStatus.state===o.RecoveryState.RECEIVING_SNAPSHOT&&(s=e.recoveryStatus.affectedNodes[0]),e&&s){const n=t.find(e=>e.endpoint===s);r.push({id:`${e.address}-${n.address}`,source:n.address,target:e.address,status:o.LinkState.RECEIVING_SNAPSHOT})}}}),r},N=t=>{e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},y=t=>{S||(S=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{S=null,e.$broadcast(s.MODEL_UPDATED)}))},M=(e,t)=>!t||(!e||e.address!==t.address),k=()=>h.getLocationsWithRpcAddresses().then(t=>{const r=t.find(e=>e.isLocal);r&&(r.endpoint=e.currentNode.endpoint,r.rpcAddress=e.currentNode.address),e.clusterModel.locations=t}),T=t=>{a.success(t),e.getClusterConfiguration()},D=(e,t,r)=>{let o=e.message||e;400===t&&Array.isArray(e)?o=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412!==t||Object(n.isString)(e)||(o=Object.keys(e).reduce((t,r)=>t+`<div>${r} - ${e[r]}</div>`,"")),a.error(o,r,{allowHtml:!0})},A=()=>{e.clusterConfigurationPanelSize=.25*window.innerWidth+"px"},P=()=>{b.push(w.onShowClusterConfigurationPanel(t=>{A(),e.showClusterConfigurationPanel=t})),b.push(e.$on(s.UPDATE_CLUSTER,(e,t)=>{y(t.force)})),b.push(e.$on(s.DELETE_CLUSTER,(t,r)=>{(t=>{const r=C.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,r),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");a.success(e)}else{const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),r=Object.keys(t.data).reduce((e,r)=>e+`<div>${r} - ${t.data[r]}</div>`,"");a.warning(r,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=C.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete");D(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),y(!0),v.$broadcast("reloadLocations")})})(r.force)})),b.push(e.$on(s.CLICK_IN_VIEW,(t,r)=>{!function(t){const r=document.getElementById("nodeTooltip");e.selectedNode&&r!==t&&!r.contains(t)&&N(null)}(r)})),b.push(e.$on(s.NODE_SELECTED,(e,t)=>{N(t)})),b.push(e.$on(s.CREATE_CLUSTER,()=>{e.showUpdateClusterGroupDialog()}))};e.$on("$destroy",(function(){b.forEach(e=>e())}));P(),A(),e.showClusterConfigurationPanel=w.getShowClusterConfigurationPanel(),(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=g((function(){y()}),1e3);e.$on("$destroy",(function(){g.cancel(t)}))})}angular.module("graphdb.framework.clustermanagement.controllers.cluster-management",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","graphdb.framework.clustermanagement.services.cluster-view-context-service","graphdb.framework.clustermanagement.services.remote-locations","graphdb.framework.clustermanagement.controllers.edit-cluster","graphdb.framework.clustermanagement.controllers.delete-cluster","graphdb.framework.clustermanagement.controllers.edit-cluster-nodes-modal","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",a),a.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$jwtAuth","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope","ClusterViewContextService"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[16,88,133,134,136,138,139,293],{111:function(e,t,r){"use strict";r.r(t),r.d(t,"UPDATE_CLUSTER",(function(){return n})),r.d(t,"DELETE_CLUSTER",(function(){return o})),r.d(t,"CLICK_IN_VIEW",(function(){return s})),r.d(t,"NODE_SELECTED",(function(){return a})),r.d(t,"CREATE_CLUSTER",(function(){return i})),r.d(t,"MODEL_UPDATED",(function(){return l}));const n="updateCluster",o="deleteCluster",s="clickInView",a="nodeSelected",i="createCluster",l="modelUpdated"},116:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",r),r.$inject=["$http"];function r(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/httpConfig",t)},updateClusterConfiguration:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const r=$.param({force:t});return e.delete("rest/cluster/config?"+r)},replaceNodesInCluster:function(t){return e.patch("rest/cluster/httpConfig",t)},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")},addCusterTag:function(t){return e.post("rest/cluster/config/tag",t)},deleteClusterTag:function(t){return e({method:"DELETE",url:"rest/cluster/config/tag",data:{tag:t},headers:{"Content-type":"application/json;charset=utf-8"}})},disableSecondaryMode:function(){return e.delete("rest/cluster/config/secondary-mode")},enableSecondaryMode:function(t){return e.post("rest/cluster/config/secondary-mode",t)}}}},218:function(e,t,r){"use strict";r.r(t);r(50);function n(e,t,r,n,o){return{addLocationHttp:function(e){let r;return n.addLocation(e).catch(e=>{const r=getError(e.data,e.status);return t.error(r,o.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return r=t.find(t=>t.endpoint===e.uri),r})},getLocationsWithRpcAddresses:s,createNewLocation:function(e){return{uri:e,authType:"signature",username:"",password:"",active:!1,clusterMode:!0,isLocal:!1}},isInCluster:function(e,t){return e.some(e=>t.rpcAddress===e.address)}};function s(){return n.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const r=getError(e.data,e.status);t.error(r,o.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return n.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]},219:function(e,t){function r(e){let t,r=!1;function n(){return r}function o(t){r=t,e.emit("showClusterConfigurationPanel",n())}function s(){return t}return{updateClusterViewD3Container:function(r){t=r,e.emit("clusterViewD3ContainerChanged",s())},getClusterViewD3Container:s,onClusterViewD3ContainerUpdated:function(t){return e.subscribe("clusterViewD3ContainerChanged",()=>t(s()))},getShowClusterConfigurationPanel:n,setShowClusterConfigurationPanel:o,showClusterConfigurationPanel:function(){o(!0)},hideClusterConfigurationPanel:function(){o(!1)},onShowClusterConfigurationPanel:function(t){return e.subscribe("showClusterConfigurationPanel",()=>t(n()))}}}angular.module("graphdb.framework.clustermanagement.services.cluster-view-context-service",[]).factory("ClusterViewContextService",r),r.$inject=["EventEmitterService"]},220:function(e,t,r){"use strict";r.r(t);r(116);function n(e,t,r,n,o,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=_.cloneDeep(a.clusterConfiguration),e.loader=!1,e.configFields=[{id:"election-minimum-timeout",name:"electionMinTimeout",label:"cluster_management.cluster_configuration_properties.election_min_timeout",tooltip:"cluster_management.cluster_configuration_properties.election_min_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"election-range-timeout",name:"electionRangeTimeout",label:"cluster_management.cluster_configuration_properties.election_range_timeout",tooltip:"cluster_management.cluster_configuration_properties.election_range_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"heartbeat-interval",name:"heartbeatInterval",label:"cluster_management.cluster_configuration_properties.heartbeat_interval",tooltip:"cluster_management.cluster_configuration_properties.heartbeat_interval_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"message-size",name:"messageSizeKB",label:"cluster_management.cluster_configuration_properties.message_size_kb",tooltip:"cluster_management.cluster_configuration_properties.message_size_kb_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"verification-timeout",name:"verificationTimeout",label:"cluster_management.cluster_configuration_properties.verification_timeout",tooltip:"cluster_management.cluster_configuration_properties.verification_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"transaction-log-max-size",name:"transactionLogMaximumSizeGB",label:"cluster_management.cluster_configuration_properties.transaction_log_maximum_size_gb",tooltip:"cluster_management.cluster_configuration_properties.transaction_log_maximum_size_gb_tooltip",pattern:"-?[1-9][0-9]*(\\.[0-9]+)?",errorMsg:"cluster_management.cluster_page.errors.small_transaction_log_max_size"},{id:"batch-update-interval",name:"batchUpdateInterval",label:"cluster_management.cluster_configuration_properties.batch_update_interval",tooltip:"cluster_management.cluster_configuration_properties.batch_update_interval_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"}],e.updateClusterConfiguration=()=>(e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),n.updateClusterConfiguration(e.clusterConfiguration).then(()=>{o.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(e){i(e.data,e.status)})).finally(()=>e.setLoader(!1))),e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=(t,n)=>{r.cancel(e.loaderTimeout),t?e.loaderTimeout=r(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.ok=()=>{e.isClusterConfigurationValid()?e.updateClusterConfiguration():o.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")},e.onClick=e=>{e.stopPropagation()};const i=(t,r)=>{delete e.preconditionErrors,o.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===r||"string"==typeof t?e.errors.push(t):412===r?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===r&&e.errors.push(...t)}}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster",[]).controller("EditClusterCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"]},221:function(e,t){function r(e,t){e.forceDelete=!1,e.ok=()=>{t.close(e.forceDelete)},e.cancel=()=>{t.dismiss("cancel")},e.onClick=e=>{e.stopPropagation()}}angular.module("graphdb.framework.clustermanagement.controllers.delete-cluster",[]).controller("DeleteClusterCtrl",r),r.$inject=["$scope","$uibModalInstance"]},222:function(e,t,r){"use strict";r.r(t);r(223);var n=r(18);function o(e,t,r,o,s,a){const i=[];e.isValid=s.isValid(),e.ok=()=>{const e=s.getClusterView();e.hasCluster()?t.close(Object(n.cloneDeep)(e.getUpdateActions())):t.close(Object(n.cloneDeep)(e.getUpdateActions().clusterConfiguration))},e.cancel=()=>{e.isChanged?a.openSimpleModal({title:r.instant("common.warning"),message:r.instant("page.leave.pristine.warning"),warning:!0}).result.then(()=>{t.dismiss("cancel")}):t.dismiss("cancel")};const l=()=>{i.forEach(e=>e())};i.push(s.onClusterValidityChanged(t=>{e.isValid=t})),i.push(s.onClusterViewChanged(()=>{if(!e.hasCluster&&0===s.getAttached().length){const e=s.getLocalNode();s.addLocation(e)}e.isChanged=s.isChanged()})),e.$on("$destroy",()=>{l(),s.setClusterView(void 0)}),s.setClusterView(o.clusterModel),e.hasCluster=o.clusterModel.hasCluster}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster-nodes-modal",["graphdb.framework.clustermanagement.services.cluster-context"]).controller("EditClusterNodesModalController",o),o.$inject=["$scope","$uibModalInstance","$translate","data","ClusterContextService","ModalService"]},317:function(e,t,r){"use strict";r.r(t);r(116),r(218),r(219),r(220),r(221),r(222);var n=r(18),o=r(98),s=r(111);function a(e,t,r,a,i,l,c,u,d,g,m,p,f,_,C,h,v,w){let S;const b=[];e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=o.NodeState,e.leaderChanged=!1,e.currentLeader=null,e.showClusterConfigurationPanel=!1,e.clusterConfigurationPanelSize=void 0,e.onopen=()=>angular.noop(),e.onclose=()=>{w.hideClusterConfigurationPanel()},e.isAdmin=()=>u.isAuthenticated()&&u.isAdmin(),e.openClusterConfigurationPanel=()=>{e.showClusterConfigurationPanel=!0,w.showClusterConfigurationPanel()},e.setLoader=(t,r)=>{p.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=p(()=>{e.loader=t},50)):e.loader=!1},e.getLoaderMessage=()=>e.loaderMessage||C.instant("common.loading"),e.showUpdateClusterGroupDialog=()=>{e.setLoader(!0),k().then(()=>(e.setLoader(!1),l.open({templateUrl:"js/angular/clustermanagement/templates/modal/edit-cluster-nodes-modal.html",controller:"EditClusterNodesModalController",size:"lg",backdrop:"static",keyboard:!1,resolve:{data:()=>({clusterModel:e.clusterModel})}}).result)).then(e=>{e.addNodes||e.removeNodes?E(e):$(e)}).catch(()=>{e.setLoader(!1),y(!0)}).finally(()=>{k()})},e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=()=>f.getClusterStatus().then(t=>{const r=t.data.slice(),n=r.find(e=>e.nodeState===o.NodeState.LEADER);M(e.currentLeader,n)&&(e.currentLeader=n,e.leaderChanged=!0),e.currentNode=r.find(t=>e.currentNode&&t.address===e.currentNode.address);const s=L(n,r);e.clusterModel.hasCluster=!0,e.clusterModel.nodes=r,e.clusterModel.links=s}).catch(t=>{if(404===t.status)return e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null,Promise.reject(t)}),e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>k());const $=t=>(e.setLoader(!0,C.instant("cluster_management.cluster_page.creating_cluster_loader")),f.createCluster(t).then(()=>{a.success(C.instant("cluster_management.cluster_page.notifications.create_success"))}).catch(e=>{D(e.data,e.status)}).finally(()=>{e.setLoader(!1)})),E=t=>{const r=C.instant("cluster_management.cluster_page.updating_cluster_loader");e.setLoader(!0,r);const n={addNodes:t.addNodes,removeNodes:t.removeNodes};f.replaceNodesInCluster(n).then(()=>{const e=C.instant("cluster_management.cluster_page.notifications.update_success");T(e)}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.update_failed");D(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),y(!0)})},L=(e,t)=>{const r=[];return e&&Object.keys(e.syncStatus).forEach(n=>{const s=e.syncStatus[n];if(s!==o.LinkState.NO_CONNECTION&&(r.push({id:`${e.address}-${n}`,source:e.address,target:n,status:s}),s===o.LinkState.OUT_OF_SYNC)){const e=t.find(e=>e.address===n);let s;if(e.recoveryStatus.state===o.RecoveryState.RECEIVING_SNAPSHOT&&(s=e.recoveryStatus.affectedNodes[0]),e&&s){const n=t.find(e=>e.endpoint===s);r.push({id:`${e.address}-${n.address}`,source:n.address,target:e.address,status:o.LinkState.RECEIVING_SNAPSHOT})}}}),r},N=t=>{e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},y=t=>{S||(S=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{S=null,e.$broadcast(s.MODEL_UPDATED)}))},M=(e,t)=>!t||(!e||e.address!==t.address),k=()=>h.getLocationsWithRpcAddresses().then(t=>{const r=t.find(e=>e.isLocal);r&&(r.endpoint=e.currentNode.endpoint,r.rpcAddress=e.currentNode.address),e.clusterModel.locations=t}),T=t=>{a.success(t),e.getClusterConfiguration()},D=(e,t,r)=>{let o=e.message||e;400===t&&Array.isArray(e)?o=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412!==t||Object(n.isString)(e)||(o=Object.keys(e).reduce((t,r)=>t+`<div>${r} - ${e[r]}</div>`,"")),a.error(o,r,{allowHtml:!0})},A=()=>{e.clusterConfigurationPanelSize=.25*window.innerWidth+"px"},P=()=>{b.push(w.onShowClusterConfigurationPanel(t=>{A(),e.showClusterConfigurationPanel=t})),b.push(e.$on(s.UPDATE_CLUSTER,(e,t)=>{y(t.force)})),b.push(e.$on(s.DELETE_CLUSTER,(t,r)=>{(t=>{const r=C.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,r),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");a.success(e)}else{const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),r=Object.keys(t.data).reduce((e,r)=>e+`<div>${r} - ${t.data[r]}</div>`,"");a.warning(r,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=C.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete");D(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),y(!0),v.$broadcast("reloadLocations")})})(r.force)})),b.push(e.$on(s.CLICK_IN_VIEW,(t,r)=>{!function(t){const r=document.getElementById("nodeTooltip");e.selectedNode&&r!==t&&!r.contains(t)&&N(null)}(r)})),b.push(e.$on(s.NODE_SELECTED,(e,t)=>{N(t)})),b.push(e.$on(s.CREATE_CLUSTER,()=>{e.showUpdateClusterGroupDialog()}))};e.$on("$destroy",(function(){b.forEach(e=>e())}));P(),A(),e.showClusterConfigurationPanel=w.getShowClusterConfigurationPanel(),(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=g((function(){y()}),1e3);e.$on("$destroy",(function(){g.cancel(t)}))})}angular.module("graphdb.framework.clustermanagement.controllers.cluster-management",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","graphdb.framework.clustermanagement.services.cluster-view-context-service","graphdb.framework.clustermanagement.services.remote-locations","graphdb.framework.clustermanagement.controllers.edit-cluster","graphdb.framework.clustermanagement.controllers.delete-cluster","graphdb.framework.clustermanagement.controllers.edit-cluster-nodes-modal","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",a),a.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$jwtAuth","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope","ClusterViewContextService"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[160],{253:function(e,r,t){"use strict";t.r(r);t(13);function n(e,r,t,n,s,a,o,i,c,l,u,p,d,h,g,f,m){e.classHierarchyData={},e.instancesObj={},e.instancesQueryObj={},e.instancesObj.items=[],e.instancesNotFiltered=[],e.isWarningShowed=!1,e.onopen=e.onclose=()=>angular.noop(),e.currentBrowserLimit=2e3,d.firefox?e.currentBrowserLimit=50:(d.safari||d.msie||d.msedge)&&(e.currentBrowserLimit=400);const C={};let y=0,S=0;r.key="",C.get=function(r,t,n){return c.initLazyList(r,t,n,y,e.instancesObj.items)};let w=allGraphs;const b=function(){if(e.getActiveRepository())return f.resolveGraphs(n.getActiveRepository()).success((function(r){e.graphsInRepo=r.results.bindings.length>1002?r.results.bindings.slice(0,1002):r.results.bindings,R()})).error((function(r){e.repositoryError=getError(r),o.error(getError(r),m.instant("graphexplore.error.getting.graphs"))}))},R=function(){const r=h.get("classHierarchy-selectedGraph-"+n.getActiveRepository());null!==r&&e.graphsInRepo.some(e=>e.contextID.uri===r.contextID.uri)?w=r:h.set("classHierarchy-selectedGraph-"+n.getActiveRepository(),w)},v=function(){return e.instancesObj.items.length<1e3?m.instant("graphexplore.search.class.instances"):m.instant("graphexplore.search.first.class.instances")};r.$watch((function(){return r.key}),(function(){y=0,_.each(e.instancesObj.items,(function(e){r.key>e&&y++})),S++})),C.revision=function(){return S},e.adapterContainer={adapter:{remain:!0}};const E=[];E.push(e.$on("goToDomainRangeGraphView",(function(e,r){I(r)}))),E.push(e.$on("classCount",x)),E.push(e.$on("repositoryIsSet",(function(){if(!s.isLicenseValid())return;if(D===n.getActiveRepository())return;D=n.getActiveRepository();if(e.repositoryError=null,!D)return;w=allGraphs,b().then(O)}))),E.push(r.$on("$translateChangeSuccess",()=>{e.instancesSearchPlaceholder=v()}));function x(r,t,n){e.classCountSlider.options&&e.classCountSlider.options.ceil!==t&&(e.classCountSlider={});var s;e.classCountSlider.value||(e.showExternalElements=!0,e.classCountSlider={value:t,options:{floor:1,ceil:t,vertical:!0,showSelectionBar:!0,onChange:function(){u(L,100,!0)}}},null===h.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE)&&t>e.currentBrowserLimit&&(s=e.currentBrowserLimit,d.chrome?o.warning(m.instant("graphexplore.disabling.animations",{classLimit:s}),m.instant("graphexplore.reducing.visual.effects")):o.warning(m.instant("graphexplore.browser.performance",{browser:d.name,classLimit:s}),m.instant("graphexplore.reducing.visual.effects"))));const a=h.get(g.CLASS_HIERARCHY_SWITCH_PREFIXES);null!=a&&"true"!==a&&(e.showExternalElements=!0),n?e.classCountSlider.value=n:t>=1500&&(e.classCountSlider.value=1500,o.warning(m.instant("graphexplore.class.count.slider",{count:1500}),m.instant("graphexplore.reducing.class.count"))),t>=25&&!window.ActiveXObject&&"ActiveXObject"in window&&!e.isWarningShowed&&(e.classCountSlider.value=25,e.isWarningShowed=!0,o.warning(m.instant("graphexplore.class.count.browser",{count:25}),m.instant("graphexplore.reducing.class.count"))),u((function(){e.$broadcast("reCalcViewDimensions");const r=document.getElementById("rzslider");let t=0;r.addEventListener("wheel",(function(r){r.preventDefault(),r.stopPropagation();const n=(new Date).getTime();if(!(n-t>100))return;t=n;let s=e.classCountSlider.value;const a=e.classCountSlider.options.step||1;r.deltaY<=-1?s+=a:r.deltaY>=1&&(s-=a),s=Math.max(e.classCountSlider.options.floor,Math.min(e.classCountSlider.options.ceil,s)),s!==e.classCountSlider.value&&e.$apply((function(){e.classCountSlider.value=s,u(L,100,!0)}))}))}),200),L()}function L(){e.currentSliderValue=e.classCountSlider.value}function I(e){const r=e.data.fullName,n=e.data.name;i.checkDomainRangeData(r).success((function(e,s){204===s?o.warning(m.instant("graphexplore.no.domain.range",{name:n})):(h.set(g.CLASS_HIERARCHY_LAST_SELECTED_CLASS,t.hash()),t.hash("").path("domain-range-graph").search("uri",r).search("name",n))})).error((function(){o.error(m.instant("graphexplore.error.request.failed",{name:n}))}))}function A(){t.replace().hash("1"),e.instancesObj.items=[],e.showExternalElements=!1,e.showClassInfoPanel=!1,h.clearClassHieararchyState(),e.hidePrefixes="true"===h.get(g.CLASS_HIERARCHY_HIDE_PREFIXES),e.currentSliderValue=void 0,e.classHierarchyData={},r.$broadcast("angucomplete-alt:clearInput")}function H(){e.hasClassHierarchy()&&u((function(){$("#toolbar").removeClass("ng-hide")}),0)}E.push(e.$on("$destroy",()=>{E.forEach(e=>e())})),e.datasource=C,e.goToDomainRangeGraphView=I,e.toggleClassInfoSidePanel=function(){e.showClassInfoPanel=!e.showClassInfoPanel,r.$broadcast("sidePanelClosed")},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return n.getActiveRepository()},e.isSystemRepository=function(){return n.isSystemRepository()},e.confirmReloadClassHierarchy=function(){p.openSimpleModal({title:m.instant("confirm.operation"),message:m.instant("graphexplore.calculating.hierarchy"),warning:!0}).result.then((function(){A(),e.loader=!0,e.hierarchyError=!1,i.reloadClassHierarchy(w.contextID.uri).success((function(r){e.loader=!1,e.classHierarchyData=r,H(),x()})).error((function(r){e.loader=!1,e.hierarchyError=getError(r),o.error(getError(r),m.instant("graphexplore.error.rdf.class.request"))}))}))},e.focusOnRoot=function(){e.$broadcast("rootFocus")},e.copyToClipboard=function(e){p.openCopyToClipboardModal(e)},e.searchedClassCallback=function(e){if(e){const t={name:e.title};r.$broadcast("searchedClass",t)}},e.instancesQueryObj.query="",e.instancesFilterFunc=function(r){return r.resolvedUri.toLowerCase().indexOf(e.instancesQueryObj.query.toLowerCase())>=0},b(),e.$watch("instancesObj.items",(function(){e.instancesObj.items.length>0&&u((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedClass",(function(){e.showClassInfoPanel&&function(r){const t=r.data.fullName;let n=r.data.name;if(n===t){const e=n.lastIndexOf("#");n=n.substring(e+1)}e.encodedUri=encodeURIComponent(t);const s=encodeURIComponent("prefix onto:<http://www.ontotext.com/>\nselect ?s {\n ?s a <"+t+"> .\n}");e.viewInstancesUri="sparql?name="+n+"&infer=true&sameAs=false&query="+s+"&execute=true",i.getRdfsLabelAndComment(t).success((function(r){e.rdfsLabel=r.label,e.rdfsComment=r.comment,e.expanded=!1})).error((function(){o.error("Error getting rdfs:label and rdfs:comment")})),e.instancesQueryObj.query="",e.instancesLoader=!0,i.getClassInstances(t).success((function(r){e.instancesObj.items=[],_.each(r,(function(r,t){const n={};n.type=r.startsWith("<<")&&r.endsWith(">>")?"triple":"uri",n.absUri=encodeURIComponent(r),n.absUriNonEncoded=r,n.resolvedUri=t,e.instancesObj.items.push(n)})),e.instancesLoader=!1,e.instancesSearchPlaceholder=v(),e.instancesNotFiltered=e.instancesObj.items})).error((function(){o.error(m.instant("graphexplore.error.instances.request"))}))}(e.selectedClass)})),$(document).ready((function(){$(".prefix-toggle").click((function(){$(".tooltip").hide()}))}));let D=n.getActiveRepository();function O(){A(),!e.isSystemRepository()&&e.isLicenseValid()&&(e.hierarchyError=!1,e.loader=!0,i.getClassHierarchyData(w.contextID.uri).success((function(r,t){e.showExternalElements=!0,e.loader=!1,e.classHierarchyData=r,207===t&&o.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),H()})).error((function(r){e.loader=!1,e.hierarchyError=getError(r),o.error(getError(r),m.instant("graphexplore.error.rdf.class.request"))})))}e.hasClassHierarchy=function(){return e.classHierarchyData.classCount&&e.getActiveRepositoryNoError()&&!e.isSystemRepository()},e.isLicenseValid=function(){return s.isLicenseValid()},e.chosenGraph=function(e){w=e,O(),h.set("classHierarchy-selectedGraph-"+n.getActiveRepository(),w)},e.getSelGraphValue=function(){return w.contextID.value},e.isAllGraphsSelected=function(){return"all.graphs.label"===e.getSelGraphValue()}}angular.module("graphdb.framework.graphexplore.controllers.class",["pageslide-directive","ngAnimate","ui.scroll.jqlite","ui.scroll","angucomplete-alt","rzSlider","toastr","graphdb.framework.utils.localstorageadapter"]).controller("RdfClassHierarchyCtlr",n),n.$inject=["$scope","$rootScope","$location","$repositories","$licenseService","$window","toastr","GraphDataRestService","UiScrollService","RdfsLabelCommentService","$timeout","ModalService","bowser","LocalStorageAdapter","LSKeys","RDF4JRepositoriesRestService","$translate"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[160],{253:function(e,r,t){"use strict";t.r(r);t(13);function n(e,r,t,n,s,a,o,i,c,l,u,p,d,h,g,f,m){e.classHierarchyData={},e.instancesObj={},e.instancesQueryObj={},e.instancesObj.items=[],e.instancesNotFiltered=[],e.isWarningShowed=!1,e.onopen=e.onclose=()=>angular.noop(),e.currentBrowserLimit=2e3,d.firefox?e.currentBrowserLimit=50:(d.safari||d.msie||d.msedge)&&(e.currentBrowserLimit=400);const C={};let y=0,S=0;r.key="",C.get=function(r,t,n){return c.initLazyList(r,t,n,y,e.instancesObj.items)};let w=allGraphs;const b=function(){if(e.getActiveRepository())return f.resolveGraphs(n.getActiveRepository()).success((function(r){e.graphsInRepo=r.results.bindings.length>1002?r.results.bindings.slice(0,1002):r.results.bindings,R()})).error((function(r){e.repositoryError=getError(r),o.error(getError(r),m.instant("graphexplore.error.getting.graphs"))}))},R=function(){const r=h.get("classHierarchy-selectedGraph-"+n.getActiveRepository());null!==r&&e.graphsInRepo.some(e=>e.contextID.uri===r.contextID.uri)?w=r:h.set("classHierarchy-selectedGraph-"+n.getActiveRepository(),w)},v=function(){return e.instancesObj.items.length<1e3?m.instant("graphexplore.search.class.instances"):m.instant("graphexplore.search.first.class.instances")};r.$watch((function(){return r.key}),(function(){y=0,_.each(e.instancesObj.items,(function(e){r.key>e&&y++})),S++})),C.revision=function(){return S},e.adapterContainer={adapter:{remain:!0}};const E=[];E.push(e.$on("goToDomainRangeGraphView",(function(e,r){I(r)}))),E.push(e.$on("classCount",x)),E.push(e.$on("repositoryIsSet",(function(){if(!s.isLicenseValid())return;if(D===n.getActiveRepository())return;D=n.getActiveRepository();if(e.repositoryError=null,!D)return;w=allGraphs,b().then(O)}))),E.push(r.$on("$translateChangeSuccess",()=>{e.instancesSearchPlaceholder=v()}));function x(r,t,n){e.classCountSlider.options&&e.classCountSlider.options.ceil!==t&&(e.classCountSlider={});var s;e.classCountSlider.value||(e.showExternalElements=!0,e.classCountSlider={value:t,options:{floor:1,ceil:t,vertical:!0,showSelectionBar:!0,onChange:function(){u(L,100,!0)}}},null===h.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE)&&t>e.currentBrowserLimit&&(s=e.currentBrowserLimit,d.chrome?o.warning(m.instant("graphexplore.disabling.animations",{classLimit:s}),m.instant("graphexplore.reducing.visual.effects")):o.warning(m.instant("graphexplore.browser.performance",{browser:d.name,classLimit:s}),m.instant("graphexplore.reducing.visual.effects"))));const a=h.get(g.CLASS_HIERARCHY_SWITCH_PREFIXES);null!=a&&"true"!==a&&(e.showExternalElements=!0),n?e.classCountSlider.value=n:t>=1500&&(e.classCountSlider.value=1500,o.warning(m.instant("graphexplore.class.count.slider",{count:1500}),m.instant("graphexplore.reducing.class.count"))),t>=25&&!window.ActiveXObject&&"ActiveXObject"in window&&!e.isWarningShowed&&(e.classCountSlider.value=25,e.isWarningShowed=!0,o.warning(m.instant("graphexplore.class.count.browser",{count:25}),m.instant("graphexplore.reducing.class.count"))),u((function(){e.$broadcast("reCalcViewDimensions");const r=document.getElementById("rzslider");let t=0;r.addEventListener("wheel",(function(r){r.preventDefault(),r.stopPropagation();const n=(new Date).getTime();if(!(n-t>100))return;t=n;let s=e.classCountSlider.value;const a=e.classCountSlider.options.step||1;r.deltaY<=-1?s+=a:r.deltaY>=1&&(s-=a),s=Math.max(e.classCountSlider.options.floor,Math.min(e.classCountSlider.options.ceil,s)),s!==e.classCountSlider.value&&e.$apply((function(){e.classCountSlider.value=s,u(L,100,!0)}))}))}),200),L()}function L(){e.currentSliderValue=e.classCountSlider.value}function I(e){const r=e.data.fullName,n=e.data.name;i.checkDomainRangeData(r).success((function(e,s){204===s?o.warning(m.instant("graphexplore.no.domain.range",{name:n})):(h.set(g.CLASS_HIERARCHY_LAST_SELECTED_CLASS,t.hash()),t.hash("").path("domain-range-graph").search("uri",r).search("name",n))})).error((function(){o.error(m.instant("graphexplore.error.request.failed",{name:n}))}))}function A(){t.replace().hash("1"),e.instancesObj.items=[],e.showExternalElements=!1,e.showClassInfoPanel=!1,h.clearClassHieararchyState(),e.hidePrefixes="true"===h.get(g.CLASS_HIERARCHY_HIDE_PREFIXES),e.currentSliderValue=void 0,e.classHierarchyData={},r.$broadcast("angucomplete-alt:clearInput")}function H(){e.hasClassHierarchy()&&u((function(){$("#toolbar").removeClass("ng-hide")}),0)}E.push(e.$on("$destroy",()=>{E.forEach(e=>e())})),e.datasource=C,e.goToDomainRangeGraphView=I,e.toggleClassInfoSidePanel=function(){e.showClassInfoPanel=!e.showClassInfoPanel,r.$broadcast("sidePanelClosed")},e.toggleHidePrefixes=function(){e.hidePrefixes=!e.hidePrefixes},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return n.getActiveRepository()},e.isSystemRepository=function(){return n.isSystemRepository()},e.confirmReloadClassHierarchy=function(){p.openSimpleModal({title:m.instant("confirm.operation"),message:m.instant("graphexplore.calculating.hierarchy"),warning:!0}).result.then((function(){A(),e.loader=!0,e.hierarchyError=!1,i.reloadClassHierarchy(w.contextID.uri).success((function(r){e.loader=!1,e.classHierarchyData=r,H(),x()})).error((function(r){e.loader=!1,e.hierarchyError=getError(r),o.error(getError(r),m.instant("graphexplore.error.rdf.class.request"))}))}))},e.focusOnRoot=function(){e.$broadcast("rootFocus")},e.copyToClipboard=function(e){p.openCopyToClipboardModal(e)},e.searchedClassCallback=function(e){if(e){const t={name:e.title};r.$broadcast("searchedClass",t)}},e.instancesQueryObj.query="",e.instancesFilterFunc=function(r){return r.resolvedUri.toLowerCase().indexOf(e.instancesQueryObj.query.toLowerCase())>=0},b(),e.$watch("instancesObj.items",(function(){e.instancesObj.items.length>0&&u((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedClass",(function(){e.showClassInfoPanel&&function(r){const t=r.data.fullName;let n=r.data.name;if(n===t){const e=n.lastIndexOf("#");n=n.substring(e+1)}e.encodedUri=encodeURIComponent(t);const s=encodeURIComponent("prefix onto:<http://www.ontotext.com/>\nselect ?s {\n ?s a <"+t+"> .\n}");e.viewInstancesUri="sparql?name="+n+"&infer=true&sameAs=false&query="+s+"&execute=true",i.getRdfsLabelAndComment(t).success((function(r){e.rdfsLabel=r.label,e.rdfsComment=r.comment,e.expanded=!1})).error((function(){o.error("Error getting rdfs:label and rdfs:comment")})),e.instancesQueryObj.query="",e.instancesLoader=!0,i.getClassInstances(t).success((function(r){e.instancesObj.items=[],_.each(r,(function(r,t){const n={};n.type=r.startsWith("<<")&&r.endsWith(">>")?"triple":"uri",n.absUri=encodeURIComponent(r),n.absUriNonEncoded=r,n.resolvedUri=t,e.instancesObj.items.push(n)})),e.instancesLoader=!1,e.instancesSearchPlaceholder=v(),e.instancesNotFiltered=e.instancesObj.items})).error((function(){o.error(m.instant("graphexplore.error.instances.request"))}))}(e.selectedClass)})),$(document).ready((function(){$(".prefix-toggle").click((function(){$(".tooltip").hide()}))}));let D=n.getActiveRepository();function O(){A(),!e.isSystemRepository()&&e.isLicenseValid()&&(e.hierarchyError=!1,e.loader=!0,i.getClassHierarchyData(w.contextID.uri).success((function(r,t){e.showExternalElements=!0,e.loader=!1,e.classHierarchyData=r,207===t&&o.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),H()})).error((function(r){e.loader=!1,e.hierarchyError=getError(r),o.error(getError(r),m.instant("graphexplore.error.rdf.class.request"))})))}e.hasClassHierarchy=function(){return e.classHierarchyData.classCount&&e.getActiveRepositoryNoError()&&!e.isSystemRepository()},e.isLicenseValid=function(){return s.isLicenseValid()},e.chosenGraph=function(e){w=e,O(),h.set("classHierarchy-selectedGraph-"+n.getActiveRepository(),w)},e.getSelGraphValue=function(){return w.contextID.value},e.isAllGraphsSelected=function(){return"all.graphs.label"===e.getSelGraphValue()}}angular.module("graphdb.framework.graphexplore.controllers.class",["pageslide-directive","ngAnimate","ui.scroll.jqlite","ui.scroll","angucomplete-alt","rzSlider","toastr","graphdb.framework.utils.localstorageadapter"]).controller("RdfClassHierarchyCtlr",n),n.$inject=["$scope","$rootScope","$location","$repositories","$licenseService","$window","toastr","GraphDataRestService","UiScrollService","RdfsLabelCommentService","$timeout","ModalService","bowser","LocalStorageAdapter","LSKeys","RDF4JRepositoriesRestService","$translate"]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[17,59,80,106,120,121,254,272,307],{121:function(e,t,r){"use strict";r.r(t),r.d(t,"TtygRestServiceFakeBackend",(function(){return a}));var n=r(18),s=r(89);class a{constructor(){this.conversations=[...o]}getConversations(){return new Promise(e=>{setTimeout(()=>e({data:Object(n.cloneDeep)(this.conversations)}),2e3)})}getConversation(e){return new Promise(t=>{setTimeout(()=>t({data:Object(n.cloneDeep)(this.conversations.find(t=>t.id===e))}),2e3)})}renameConversation(e,t){const r=this.conversations.find(t=>t.id===e);return r&&(r.name=t.name),Promise.resolve({data:Object(n.cloneDeep)(r)})}exportConversation(e){return console.log("Exporting conversation with id: ",e),Promise.resolve()}askQuestion(e){const t={id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe",conversationId:e.conversationId,agentId:null,message:""+e.question,role:s.CHAT_MESSAGE_ROLE.USER,timestamp:Math.floor(Date.now()/1e3)},r=this.conversations.find(t=>t.id===e.conversationId),n={id:e.conversationId,name:r?r.name:"Han Solo is a character in the Star Wars...",timestamp:Math.floor(Date.now()/1e3),messages:[{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe_"+Date.now(),conversationId:e.conversationId,role:s.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:'Certainly! Here\'s a random example that incorporates code, JSON, and a SPARQL query:\n\n### Code (Python)\n\n```python\ndef greet(name):\n return f"Hello, {name}!"\n\nprint(greet("World"))\n```\n\n### JSON\n\n```json\n{\n "greeting": "Hello",\n "target": "World",\n "language": "English"\n}\n```\n\n### SPARQL Query\n\n```sparql\nSELECT ?person ?name\nWHERE {\n ?person a ex:Person .\n ?person ex:hasName ?name .\n}\nLIMIT 10\n```\n\nThis example demonstrates a simple Python function for greeting, a JSON object representing a greeting structure, and a SPARQL query to retrieve names of persons from a dataset.',timestamp:Math.floor(Date.now()/1e3),name:null},{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNeс_"+Date.now(),conversationId:e.conversationId,role:s.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:`Reply to '${e.question}' It seems there was an error with the query. Let me rectify this and try again.`,timestamp:Math.floor(Date.now()/1e3),name:null}]};return r&&(r.messages.push(t),r.messages.push(...n.messages)),new Promise(e=>setTimeout(()=>e({data:n}),2e3))}continueChatRun(e){alert("continueChatRun() not implemented")}deleteConversation(e){return this.conversations=this.conversations.filter(t=>t.id!==e),new Promise(e=>setTimeout(()=>e(),2e3))}createConversation(e){const t={id:"thread_"+this.conversations.length,name:"Thread "+this.conversations.length,timestamp:Math.floor(Date.now()/1e3),messages:[]};this.conversations.unshift(t);const r=Object(n.cloneDeep)(e);return r.conversationId=t.id,this.askQuestion(r)}getAgents(){return new Promise(e=>setTimeout(()=>e({data:[...i]}),2e3))}getAgent(e){return Promise.resolve({data:Object(n.cloneDeep)(i.find(t=>t.id===e))})}createAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(i.push(e),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}editAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(i=i.map(t=>t.id===e.id?e:t),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}deleteAgent(e){return i=i.filter(t=>t.id!==e),Promise.resolve()}getAgentDefaultValues(){return Promise.resolve({data:l})}explainAgentSettings(){return Promise.resolve({data:{}})}simulateHttpError(){return Promise.reject({status:500,message:"Internal Server Error"})}explainResponse(e){return Promise.resolve({data:{conversationId:e.conversationId,answerId:e.answerId,queryMethods:[{name:"sparql_query",rawQuery:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:Character' uses an undefined prefix"},{name:"retrieval_search",rawQuery:'{"queries":[{"query":"pilots that work with Luke Skywalker","filter":{"document_id":"https://swapi.co/resource/human/1"},"top_k":3}]}',query:'{\n "queries" : [ {\n "query" : "pilots that work with Luke Skywalker",\n "filter" : {\n "document_id" : "https://swapi.co/resource/human/1"\n },\n "top_k" : 3\n } ]\n}',queryType:"json",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null},{name:"sparql_query",rawQuery:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",query:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:height' uses an undefined prefix"},{name:"sparql_query",rawQuery:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:null},{name:"fts_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"similarity_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null},{name:"sparql_query",rawQuery:"SELECT ?name ?height WHERE { ?character voc:name ?name ; voc:height ?height . FILTER (?name = 'Luke Skywalker' || ?name = 'Leia Organa') }",query:"SELECT ?name ?height WHERE { ?character voc:name ?name ; voc:height ?height . FILTER (?name = 'Luke Skywalker' || ?name = 'Leia Organa') }",queryType:"sparql",errorOutput:"Error: java.lang.IllegalArgumentException: The following IRIs are not used in the data stored in GraphDB: https://swapi.co/vocabulary/name"},{name:"sparql_query",rawQuery:"SELECT ?character ?height WHERE { ?character voc:height ?height . FILTER (?character = <https://swapi.co/resource/human/1> || ?character = <https://swapi.co/resource/human/5>) }",query:"SELEdCT ?character ?height WHERE { ?character voc:height ?height . FILTER (?character = <https://swapi.co/resource/human/1> || ?character = <https://swapi.co/resource/human/5>) }",queryType:"sparql",errorOutput:null}]}})}}const o=[{id:"thread_jdQBvbkaU6JPoO48oFbC54dA",name:"Very long chat name which does not fit in the sidebar",timestamp:1725235200,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dB",name:"Test chat 2",timestamp:1725238800,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dC",name:"Test chat 3",timestamp:1725242400,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oFbC54dD",name:"Test chat 4",timestamp:1697331600,messages:[]}];let i=[{id:"asst_gAPcrHQQ9ZIxD5eXWH2BNFfo",name:"agent-1",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"\n\n",userInstruction:""},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc5",name:"agent-2",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_Cr0RxobrY07WpOvvyQilEWMI",name:"Databricks-general-unbiased",model:"gpt-4o-2024-08-06",temperature:1,topP:1,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"You are helpful assistant in discovering information regarding diagnostic biomarkers.",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null},{id:"asst_5GxNYTdaOh7Tl6lLl6Pya2aH",name:"Databricks-biomarkers",model:"gpt-3.5-turbo-0125",temperature:1,topP:1,seed:null,repositoryId:"biomarkers",instructions:{systemInstruction:"You're a helpful assistant in discovering new diagnostic biomarkers for given diseases. I'll submit a set of publication abstracts discussing given disease and your task is to find in the abstracts any potential new biomarkers which are not yet listed in the appropriate databases. Each abstract is preceded by identifier - its PubMed id called for short PMID. \n\nReturn the set of biomarkers listed one per row, each marker followed by the | and PMID of the respective abstract if was mentioned in.\n\nExample: \nInput: 36418457\t[Amyotrophic lateral sclerosis (ALS) is a genetically and phenotypically heterogeneous disease results in the loss of motor neurons. Mounting information points to involvement of other systems including cognitive impairment. However, neither the valid biomarker for diagnosis nor effective therapeutic intervention is available for ALS. The present study is aimed at identifying potentially genetic biomarker that improves the diagnosis and treatment of ALS patients based on the data of the Gene Expression Omnibus. We retrieved datasets and conducted a weighted gene co-expression network analysis (WGCNA) to identify ALS-related co-expression genes. Functional enrichment analysis was performed to determine the features and pathways of the main modules. We then constructed an ALS-related model using the least absolute shrinkage and selection operator (LASSO) regression analysis and verified the model by the receiver operating characteristic (ROC) curve. Besides we screened the non-preserved gene modules in FTD and ALS-mimic disorders to distinct ALS-related genes from disorders with overlapping genes and features. Altogether, 4198 common genes between datasets with the most variation were analyzed and 16 distinct modules were identified through WGCNA. Blue module had the most correlation with ALS and functionally enriched in pathways of neurodegeneration-multiple diseases', 'amyotrophic lateral sclerosis', and 'endocytosis' KEGG terms. Further, some of other modules related to ALS were enriched in 'autophagy' and 'amyotrophic lateral sclerosis'. The 30 top of hub genes were recruited to a LASSO regression model and 5 genes (BCLAF1, GNA13, ARL6IP5, ARGLU1, and YPEL5) were identified as potentially diagnostic ALS biomarkers with validating of the ROC curve and AUC value.]\n\nYour response: BCLAF1|36418457\nGNA13|36418457\nARL6IP5|36418457\nARGLU1|36418457\nYPEL5|36418457",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc555",name:"agent with long name long long long long long long long long long long long long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzcр555",name:"Long_agent_with_long_name_long_long_long_long_long_long_long_long_long_long_long_long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc55д5",name:"agent with long name long long long long long long long long long long long long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzcя555",name:"Long_agent_with_long_name_long_long_long_long_long_long_long_long_long_long_long_long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null}];const l={id:"id",name:"Quadro",model:"gpt-4o",temperature:.7,topP:1,seed:0,repositoryId:"test-repository",instructions:{systemInstruction:"You are a helpful, knowledgeable, and friendly assistant. Your goal is to provide clear and accurate information while being polite, respectful, and professional.",userInstruction:"If you need to write a SPARQL query, use only the classes and properties provided in the schema and don't invent or guess any. Always try to return human-readable names or labels and not only the IRIs. If SPARQL fails to provide the necessary information you can try another tool too."},assistantExtractionMethods:[{method:"sparql_search",ontologyGraph:"http://example.com",sparqlQuery:"CONSTRUCT {?s ?p ?o} WHERE {GRAPH <http://example.org/ontology> {?s ?p ?o .}}"},{method:"fts_search",maxNumberOfTriplesPerCall:0},{method:"similarity_search",similarityIndex:"similarity-index",similarityIndexThreshold:.6,maxNumberOfTriplesPerCall:0},{method:"retrieval_search",retrievalConnectorInstance:"retrieval-connector",queryTemplate:'{"query": "string"}',maxNumberOfTriplesPerCall:0}],additionalExtractionMethods:[{method:"iri_discovery_search"}]}},126:function(e,t,r){"use strict";r.r(t),r.d(t,"SYSTEM_REPO",(function(){return n})),r.d(t,"READ_REPO",(function(){return s})),r.d(t,"READ_REPO_PREFIX",(function(){return a})),r.d(t,"WRITE_REPO",(function(){return o})),r.d(t,"WRITE_REPO_PREFIX",(function(){return i}));const n="SYSTEM",s="READ_REPO",a="READ_REPO_",o="WRITE_REPO",i="WRITE_REPO_"},143:function(e,t,r){"use strict";r.r(t);var n=r(121);angular.module("graphdb.framework.rest.ttyg.service",[]).factory("TTYGRestService",s),s.$inject=["$http"];function s(e){new n.TtygRestServiceFakeBackend;return{getConversation:t=>e.get("rest/chat/conversations/"+t),renameConversation:(t,r)=>e.put("rest/chat/conversations/"+t,r),exportConversation:t=>e.get("rest/chat/conversations/export/"+t,{responseType:"blob"}),askQuestion:t=>e.post("rest/chat/conversations",t),continueChatRun:t=>e.post("rest/chat/conversations/continue",t),getConversations:()=>e.get("rest/chat/conversations"),deleteConversation:t=>e.delete("rest/chat/conversations/"+t),createConversation:(t={})=>e.post("rest/chat/conversations",t),getAgents:()=>e.get("rest/chat/agents"),getAgent:t=>e.get("rest/chat/agents/"+t),createAgent:t=>e.post("rest/chat/agents",t),editAgent:t=>e.put("rest/chat/agents",t),deleteAgent:t=>e.delete("rest/chat/agents/"+t),explainResponse:(t={})=>e.post("rest/chat/conversations/explain",t),getAgentDefaultValues:()=>e.get("rest/chat/agents/default"),explainAgentSettings:t=>e.post("rest/chat/agents/explain",t)}}},198:function(e,t,r){"use strict";r.r(t),r.d(t,"parseAuthorities",(function(){return a})),r.d(t,"createUniqueKey",(function(){return o}));var n=r(6),s=r(126);const a=e=>{let t=n.UserType.USER;const r={[s.READ_REPO]:{},[s.WRITE_REPO]:{}},a={},o=[];for(let i=0;i<e.length;i++){const l=e[i];if(l===n.UserRole.ROLE_ADMIN)t=n.UserType.ADMIN;else if(l===n.UserRole.ROLE_REPO_MANAGER)t!==n.UserType.ADMIN&&(t=n.UserType.REPO_MANAGER);else if(l===n.UserRole.ROLE_USER)t=n.UserType.USER;else if(0===l.indexOf("READ_REPO_")||0===l.indexOf("WRITE_REPO_")){const e=l.indexOf("_",l.indexOf("_")+1),t=l.substr(0,e),n=l.substr(e+1);r[t][n]=!0,a[n]=a[n]||{},t===s.READ_REPO?a[n].read=!0:t===s.WRITE_REPO&&(a[n].write=!0)}else 0===l.indexOf("CUSTOM_")&&o.push(l.substr("CUSTOM_".length))}return{userType:t,userTypeDescription:n.UserUtils.getUserRoleName(t),grantedAuthorities:r,repositories:a,customRoles:o}},o=function(e){return e.location?`${e.id}@${e.location}`:e.id}},239:function(e,t,r){"use strict";r.r(t);r(143);function n(e){return{updateUserData:t=>e.updateUserData(t)}}angular.module("graphdb.framework.core.services.security-service",["graphdb.framework.rest.security.service"]).factory("SecurityService",n),n.$inject=["SecurityRestService"]},296:function(e,t,r){"use strict";r.r(t),r.d(t,"UpdateUserPayload",(function(){return n}));class n{constructor(e){this._username=e.username,this._password=e.password,this._appSettings=e.appSettings}get username(){return this._username}set username(e){this._username=e}get password(){return this._password}set password(e){this._password=e}get appSettings(){return this._appSettings}set appSettings(e){this._appSettings=e}}},321:function(e,t,r){"use strict";r.r(t);r(239);var n=r(126),s=r(6),a=r(198),o=r(296),i=r(30);function l(e,t,r,l,c,u,d,h,m,p,g,y,f,w,E,v){let S;angular.extend(this,d("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"})),e.themes=g.getThemes(),e.mode="settings",e.showWorkbenchSettings=!0,e.workbenchSettings=y.getWorkbenchSettings(),e.selectedThemeMode=e.workbenchSettings.mode,e.saveButtonText=p.instant("common.save.btn"),e.pageTitle=p.instant("view.settings.title"),e.passwordPlaceholder=p.instant("security.new.password"),e.grantedAuthorities={[n.READ_REPO]:{},[n.WRITE_REPO]:{}},e.loader=!1,e.selectedTheme=g.getTheme(),e.noPassword=!1,e.showCookiePolicyLink=!1,e.hasEditRestrictions=function(){return!0},e.isUser=function(){return e.userType===s.UserType.USER},e.goBack=function(){const t=l((function(){r.history.back()}),100);e.$on("$destroy",(function(){l.cancel(t)}))},e.getPrincipal=function(){return c.getPrincipal().then(t=>{e.currentUserData=_.cloneDeep(t),e.redirectAdmin(),R(e)})},e.updateCurrentUserData=function(){f.when(c.getPrincipal()).then(t=>_.assign(t,e.userData))},e.redirectAdmin=function(){e.currentUserData||u.redirectToLogin()},e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?m.openSimpleModal({title:p.instant("security.save.admin.settings"),message:p.instant("security.admin.pass.unset"),warning:!0}).result.then((function(){e.updateUser()})):e.updateUser()},e.updateUserHttp=function(){e.loader=!0;const r=new o.UpdateUserPayload({username:e.user.username,password:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings});h.updateUserData(r).then(()=>{t.success(p.instant("security.user.updated",{name:e.user.username})),e.updateCurrentUserData(),g.toggleThemeMode(e.selectedThemeMode),y.saveWorkbenchSettings(e.workbenchSettings),T()}).catch(e=>{const r=getError(e);t.error(r,p.instant("common.error"))}).finally(()=>{e.loader=!1})},e.updateUser=function(){if(!e.validateForm())return!1;e.updateUserHttp()},e.validateForm=function(){return e.validatePassword()},e.setThemeMode=function(){e.selectedThemeMode=e.workbenchSettings.mode},e.setTheme=t=>{e.selectedTheme=t,e.workbenchSettings.theme=t.name,g.applyTheme(t.name)},e.showCookiePolicy=e=>{e.preventDefault(),w.open({templateUrl:"js/angular/core/templates/cookie-policy/cookie-policy.html",controller:i.CookiePolicyModalController,backdrop:"static",keyboard:!1,windowClass:"cookie-policy-modal"}).result.then(e=>{e&&r.location.reload()})};const T=()=>{S=l((function(){e.loader=!1,r.history.back()}),2e3)},R=function(t){t.userData=_.cloneDeep(t.currentUserData),t.user={username:t.userData.username},t.user.password="",t.user.confirmpassword="",t.user.external=t.userData.external,t.user.appSettings=t.userData.appSettings,void 0===t.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA&&(t.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA=!0);const r=Object(a.parseAuthorities)(t.userData.authorities);e.userType=r.userType,e.grantedAuthorities=r.grantedAuthorities,e.customRoles=r.customRoles};e.$on("$destroy",(function(){const e=y.getWorkbenchSettings();g.toggleThemeMode(e.mode),g.applyTheme(e.theme),l.cancel(S)}));e.workbenchSettings||(e.workbenchSettings={theme:"light"}),e.getPrincipal(),e.setThemeMode(),E.checkLicenseStatus().then(()=>{e.showCookiePolicyLink=v.isTrackingAllowed()})}angular.module("graphdb.framework.security.controllers.user-settings",["graphdb.framework.core.services.security-service"]).controller("UserSettingsController",l),l.$inject=["$scope","toastr","$window","$timeout","$jwtAuth","$rootScope","$controller","SecurityService","ModalService","$translate","ThemeService","WorkbenchSettingsStorageService","$q","$uibModal","$licenseService","TrackingService"]},89:function(e,t,r){"use strict";r.r(t),r.d(t,"ChatMessageModel",(function(){return n})),r.d(t,"CHAT_MESSAGE_ROLE",(function(){return s}));class n{constructor(e){this._id=e.id,this._role=e.role,this._message=e.message,this._timestamp=1e3*e.timestamp}get id(){return this._id}set id(e){this._id=e}get role(){return this._role}set role(e){this._role=e}get message(){return this._message}set message(e){this._message=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}}const s={USER:"user",ASSISTANT:"assistant"}}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[17,60,82,107,121,122,254,272,307],{122:function(e,t,r){"use strict";r.r(t),r.d(t,"TtygRestServiceFakeBackend",(function(){return a}));var n=r(18),s=r(89);class a{constructor(){this.conversations=[...o]}getConversations(){return new Promise(e=>{setTimeout(()=>e({data:Object(n.cloneDeep)(this.conversations)}),2e3)})}getConversation(e){return new Promise(t=>{setTimeout(()=>t({data:Object(n.cloneDeep)(this.conversations.find(t=>t.id===e))}),2e3)})}renameConversation(e,t){const r=this.conversations.find(t=>t.id===e);return r&&(r.name=t.name),Promise.resolve({data:Object(n.cloneDeep)(r)})}exportConversation(e){return console.log("Exporting conversation with id: ",e),Promise.resolve()}askQuestion(e){const t={id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe",conversationId:e.conversationId,agentId:null,message:""+e.question,role:s.CHAT_MESSAGE_ROLE.USER,timestamp:Math.floor(Date.now()/1e3)},r=this.conversations.find(t=>t.id===e.conversationId),n={id:e.conversationId,name:r?r.name:"Han Solo is a character in the Star Wars...",timestamp:Math.floor(Date.now()/1e3),messages:[{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe_"+Date.now(),conversationId:e.conversationId,role:s.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:'Certainly! Here\'s a random example that incorporates code, JSON, and a SPARQL query:\n\n### Code (Python)\n\n```python\ndef greet(name):\n return f"Hello, {name}!"\n\nprint(greet("World"))\n```\n\n### JSON\n\n```json\n{\n "greeting": "Hello",\n "target": "World",\n "language": "English"\n}\n```\n\n### SPARQL Query\n\n```sparql\nSELECT ?person ?name\nWHERE {\n ?person a ex:Person .\n ?person ex:hasName ?name .\n}\nLIMIT 10\n```\n\nThis example demonstrates a simple Python function for greeting, a JSON object representing a greeting structure, and a SPARQL query to retrieve names of persons from a dataset.',timestamp:Math.floor(Date.now()/1e3),name:null},{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNeс_"+Date.now(),conversationId:e.conversationId,role:s.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:`Reply to '${e.question}' It seems there was an error with the query. Let me rectify this and try again.`,timestamp:Math.floor(Date.now()/1e3),name:null}]};return r&&(r.messages.push(t),r.messages.push(...n.messages)),new Promise(e=>setTimeout(()=>e({data:n}),2e3))}continueChatRun(e){alert("continueChatRun() not implemented")}deleteConversation(e){return this.conversations=this.conversations.filter(t=>t.id!==e),new Promise(e=>setTimeout(()=>e(),2e3))}createConversation(e){const t={id:"thread_"+this.conversations.length,name:"Thread "+this.conversations.length,timestamp:Math.floor(Date.now()/1e3),messages:[]};this.conversations.unshift(t);const r=Object(n.cloneDeep)(e);return r.conversationId=t.id,this.askQuestion(r)}getAgents(){return new Promise(e=>setTimeout(()=>e({data:[...i]}),2e3))}getAgent(e){return Promise.resolve({data:Object(n.cloneDeep)(i.find(t=>t.id===e))})}createAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(i.push(e),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}editAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(i=i.map(t=>t.id===e.id?e:t),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}deleteAgent(e){return i=i.filter(t=>t.id!==e),Promise.resolve()}getAgentDefaultValues(){return Promise.resolve({data:l})}explainAgentSettings(){return Promise.resolve({data:{}})}simulateHttpError(){return Promise.reject({status:500,message:"Internal Server Error"})}explainResponse(e){return Promise.resolve({data:{conversationId:e.conversationId,answerId:e.answerId,queryMethods:[{name:"sparql_query",rawQuery:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:Character' uses an undefined prefix"},{name:"retrieval_search",rawQuery:'{"queries":[{"query":"pilots that work with Luke Skywalker","filter":{"document_id":"https://swapi.co/resource/human/1"},"top_k":3}]}',query:'{\n "queries" : [ {\n "query" : "pilots that work with Luke Skywalker",\n "filter" : {\n "document_id" : "https://swapi.co/resource/human/1"\n },\n "top_k" : 3\n } ]\n}',queryType:"json",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null},{name:"sparql_query",rawQuery:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",query:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:height' uses an undefined prefix"},{name:"sparql_query",rawQuery:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:null},{name:"fts_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"similarity_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null},{name:"sparql_query",rawQuery:"SELECT ?name ?height WHERE { ?character voc:name ?name ; voc:height ?height . FILTER (?name = 'Luke Skywalker' || ?name = 'Leia Organa') }",query:"SELECT ?name ?height WHERE { ?character voc:name ?name ; voc:height ?height . FILTER (?name = 'Luke Skywalker' || ?name = 'Leia Organa') }",queryType:"sparql",errorOutput:"Error: java.lang.IllegalArgumentException: The following IRIs are not used in the data stored in GraphDB: https://swapi.co/vocabulary/name"},{name:"sparql_query",rawQuery:"SELECT ?character ?height WHERE { ?character voc:height ?height . FILTER (?character = <https://swapi.co/resource/human/1> || ?character = <https://swapi.co/resource/human/5>) }",query:"SELEdCT ?character ?height WHERE { ?character voc:height ?height . FILTER (?character = <https://swapi.co/resource/human/1> || ?character = <https://swapi.co/resource/human/5>) }",queryType:"sparql",errorOutput:null}]}})}}const o=[{id:"thread_jdQBvbkaU6JPoO48oFbC54dA",name:"Very long chat name which does not fit in the sidebar",timestamp:1725235200,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dB",name:"Test chat 2",timestamp:1725238800,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dC",name:"Test chat 3",timestamp:1725242400,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oFbC54dD",name:"Test chat 4",timestamp:1697331600,messages:[]}];let i=[{id:"asst_gAPcrHQQ9ZIxD5eXWH2BNFfo",name:"agent-1",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"\n\n",userInstruction:""},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc5",name:"agent-2",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_Cr0RxobrY07WpOvvyQilEWMI",name:"Databricks-general-unbiased",model:"gpt-4o-2024-08-06",temperature:1,topP:1,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"You are helpful assistant in discovering information regarding diagnostic biomarkers.",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null},{id:"asst_5GxNYTdaOh7Tl6lLl6Pya2aH",name:"Databricks-biomarkers",model:"gpt-3.5-turbo-0125",temperature:1,topP:1,seed:null,repositoryId:"biomarkers",instructions:{systemInstruction:"You're a helpful assistant in discovering new diagnostic biomarkers for given diseases. I'll submit a set of publication abstracts discussing given disease and your task is to find in the abstracts any potential new biomarkers which are not yet listed in the appropriate databases. Each abstract is preceded by identifier - its PubMed id called for short PMID. \n\nReturn the set of biomarkers listed one per row, each marker followed by the | and PMID of the respective abstract if was mentioned in.\n\nExample: \nInput: 36418457\t[Amyotrophic lateral sclerosis (ALS) is a genetically and phenotypically heterogeneous disease results in the loss of motor neurons. Mounting information points to involvement of other systems including cognitive impairment. However, neither the valid biomarker for diagnosis nor effective therapeutic intervention is available for ALS. The present study is aimed at identifying potentially genetic biomarker that improves the diagnosis and treatment of ALS patients based on the data of the Gene Expression Omnibus. We retrieved datasets and conducted a weighted gene co-expression network analysis (WGCNA) to identify ALS-related co-expression genes. Functional enrichment analysis was performed to determine the features and pathways of the main modules. We then constructed an ALS-related model using the least absolute shrinkage and selection operator (LASSO) regression analysis and verified the model by the receiver operating characteristic (ROC) curve. Besides we screened the non-preserved gene modules in FTD and ALS-mimic disorders to distinct ALS-related genes from disorders with overlapping genes and features. Altogether, 4198 common genes between datasets with the most variation were analyzed and 16 distinct modules were identified through WGCNA. Blue module had the most correlation with ALS and functionally enriched in pathways of neurodegeneration-multiple diseases', 'amyotrophic lateral sclerosis', and 'endocytosis' KEGG terms. Further, some of other modules related to ALS were enriched in 'autophagy' and 'amyotrophic lateral sclerosis'. The 30 top of hub genes were recruited to a LASSO regression model and 5 genes (BCLAF1, GNA13, ARL6IP5, ARGLU1, and YPEL5) were identified as potentially diagnostic ALS biomarkers with validating of the ROC curve and AUC value.]\n\nYour response: BCLAF1|36418457\nGNA13|36418457\nARL6IP5|36418457\nARGLU1|36418457\nYPEL5|36418457",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc555",name:"agent with long name long long long long long long long long long long long long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzcр555",name:"Long_agent_with_long_name_long_long_long_long_long_long_long_long_long_long_long_long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc55д5",name:"agent with long name long long long long long long long long long long long long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzcя555",name:"Long_agent_with_long_name_long_long_long_long_long_long_long_long_long_long_long_long",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null}];const l={id:"id",name:"Quadro",model:"gpt-4o",temperature:.7,topP:1,seed:0,repositoryId:"test-repository",instructions:{systemInstruction:"You are a helpful, knowledgeable, and friendly assistant. Your goal is to provide clear and accurate information while being polite, respectful, and professional.",userInstruction:"If you need to write a SPARQL query, use only the classes and properties provided in the schema and don't invent or guess any. Always try to return human-readable names or labels and not only the IRIs. If SPARQL fails to provide the necessary information you can try another tool too."},assistantExtractionMethods:[{method:"sparql_search",ontologyGraph:"http://example.com",sparqlQuery:"CONSTRUCT {?s ?p ?o} WHERE {GRAPH <http://example.org/ontology> {?s ?p ?o .}}"},{method:"fts_search",maxNumberOfTriplesPerCall:0},{method:"similarity_search",similarityIndex:"similarity-index",similarityIndexThreshold:.6,maxNumberOfTriplesPerCall:0},{method:"retrieval_search",retrievalConnectorInstance:"retrieval-connector",queryTemplate:'{"query": "string"}',maxNumberOfTriplesPerCall:0}],additionalExtractionMethods:[{method:"iri_discovery_search"}]}},127:function(e,t,r){"use strict";r.r(t),r.d(t,"SYSTEM_REPO",(function(){return n})),r.d(t,"READ_REPO",(function(){return s})),r.d(t,"READ_REPO_PREFIX",(function(){return a})),r.d(t,"WRITE_REPO",(function(){return o})),r.d(t,"WRITE_REPO_PREFIX",(function(){return i}));const n="SYSTEM",s="READ_REPO",a="READ_REPO_",o="WRITE_REPO",i="WRITE_REPO_"},143:function(e,t,r){"use strict";r.r(t);var n=r(122);angular.module("graphdb.framework.rest.ttyg.service",[]).factory("TTYGRestService",s),s.$inject=["$http"];function s(e){new n.TtygRestServiceFakeBackend;return{getConversation:t=>e.get("rest/chat/conversations/"+t),renameConversation:(t,r)=>e.put("rest/chat/conversations/"+t,r),exportConversation:t=>e.get("rest/chat/conversations/export/"+t,{responseType:"blob"}),askQuestion:t=>e.post("rest/chat/conversations",t),continueChatRun:t=>e.post("rest/chat/conversations/continue",t),getConversations:()=>e.get("rest/chat/conversations"),deleteConversation:t=>e.delete("rest/chat/conversations/"+t),createConversation:(t={})=>e.post("rest/chat/conversations",t),getAgents:()=>e.get("rest/chat/agents"),getAgent:t=>e.get("rest/chat/agents/"+t),createAgent:t=>e.post("rest/chat/agents",t),editAgent:t=>e.put("rest/chat/agents",t),deleteAgent:t=>e.delete("rest/chat/agents/"+t),explainResponse:(t={})=>e.post("rest/chat/conversations/explain",t),getAgentDefaultValues:()=>e.get("rest/chat/agents/default"),explainAgentSettings:t=>e.post("rest/chat/agents/explain",t)}}},198:function(e,t,r){"use strict";r.r(t),r.d(t,"parseAuthorities",(function(){return a})),r.d(t,"createUniqueKey",(function(){return o}));var n=r(6),s=r(127);const a=e=>{let t=n.UserType.USER;const r={[s.READ_REPO]:{},[s.WRITE_REPO]:{}},a={},o=[];for(let i=0;i<e.length;i++){const l=e[i];if(l===n.UserRole.ROLE_ADMIN)t=n.UserType.ADMIN;else if(l===n.UserRole.ROLE_REPO_MANAGER)t!==n.UserType.ADMIN&&(t=n.UserType.REPO_MANAGER);else if(l===n.UserRole.ROLE_USER)t=n.UserType.USER;else if(0===l.indexOf("READ_REPO_")||0===l.indexOf("WRITE_REPO_")){const e=l.indexOf("_",l.indexOf("_")+1),t=l.substr(0,e),n=l.substr(e+1);r[t][n]=!0,a[n]=a[n]||{},t===s.READ_REPO?a[n].read=!0:t===s.WRITE_REPO&&(a[n].write=!0)}else 0===l.indexOf("CUSTOM_")&&o.push(l.substr("CUSTOM_".length))}return{userType:t,userTypeDescription:n.UserUtils.getUserRoleName(t),grantedAuthorities:r,repositories:a,customRoles:o}},o=function(e){return e.location?`${e.id}@${e.location}`:e.id}},239:function(e,t,r){"use strict";r.r(t);r(143);function n(e){return{updateUserData:t=>e.updateUserData(t)}}angular.module("graphdb.framework.core.services.security-service",["graphdb.framework.rest.security.service"]).factory("SecurityService",n),n.$inject=["SecurityRestService"]},296:function(e,t,r){"use strict";r.r(t),r.d(t,"UpdateUserPayload",(function(){return n}));class n{constructor(e){this._username=e.username,this._password=e.password,this._appSettings=e.appSettings}get username(){return this._username}set username(e){this._username=e}get password(){return this._password}set password(e){this._password=e}get appSettings(){return this._appSettings}set appSettings(e){this._appSettings=e}}},321:function(e,t,r){"use strict";r.r(t);r(239);var n=r(127),s=r(6),a=r(198),o=r(296),i=r(30);function l(e,t,r,l,c,u,d,h,m,p,g,y,f,w,E,v){let S;angular.extend(this,d("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"})),e.themes=g.getThemes(),e.mode="settings",e.showWorkbenchSettings=!0,e.workbenchSettings=y.getWorkbenchSettings(),e.selectedThemeMode=e.workbenchSettings.mode,e.saveButtonText=p.instant("common.save.btn"),e.pageTitle=p.instant("view.settings.title"),e.passwordPlaceholder=p.instant("security.new.password"),e.grantedAuthorities={[n.READ_REPO]:{},[n.WRITE_REPO]:{}},e.loader=!1,e.selectedTheme=g.getTheme(),e.noPassword=!1,e.showCookiePolicyLink=!1,e.hasEditRestrictions=function(){return!0},e.isUser=function(){return e.userType===s.UserType.USER},e.goBack=function(){const t=l((function(){r.history.back()}),100);e.$on("$destroy",(function(){l.cancel(t)}))},e.getPrincipal=function(){return c.getPrincipal().then(t=>{e.currentUserData=_.cloneDeep(t),e.redirectAdmin(),R(e)})},e.updateCurrentUserData=function(){f.when(c.getPrincipal()).then(t=>_.assign(t,e.userData))},e.redirectAdmin=function(){e.currentUserData||u.redirectToLogin()},e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?m.openSimpleModal({title:p.instant("security.save.admin.settings"),message:p.instant("security.admin.pass.unset"),warning:!0}).result.then((function(){e.updateUser()})):e.updateUser()},e.updateUserHttp=function(){e.loader=!0;const r=new o.UpdateUserPayload({username:e.user.username,password:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings});h.updateUserData(r).then(()=>{t.success(p.instant("security.user.updated",{name:e.user.username})),e.updateCurrentUserData(),g.toggleThemeMode(e.selectedThemeMode),y.saveWorkbenchSettings(e.workbenchSettings),T()}).catch(e=>{const r=getError(e);t.error(r,p.instant("common.error"))}).finally(()=>{e.loader=!1})},e.updateUser=function(){if(!e.validateForm())return!1;e.updateUserHttp()},e.validateForm=function(){return e.validatePassword()},e.setThemeMode=function(){e.selectedThemeMode=e.workbenchSettings.mode},e.setTheme=t=>{e.selectedTheme=t,e.workbenchSettings.theme=t.name,g.applyTheme(t.name)},e.showCookiePolicy=e=>{e.preventDefault(),w.open({templateUrl:"js/angular/core/templates/cookie-policy/cookie-policy.html",controller:i.CookiePolicyModalController,backdrop:"static",keyboard:!1,windowClass:"cookie-policy-modal"}).result.then(e=>{e&&r.location.reload()})};const T=()=>{S=l((function(){e.loader=!1,r.history.back()}),2e3)},R=function(t){t.userData=_.cloneDeep(t.currentUserData),t.user={username:t.userData.username},t.user.password="",t.user.confirmpassword="",t.user.external=t.userData.external,t.user.appSettings=t.userData.appSettings,void 0===t.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA&&(t.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA=!0);const r=Object(a.parseAuthorities)(t.userData.authorities);e.userType=r.userType,e.grantedAuthorities=r.grantedAuthorities,e.customRoles=r.customRoles};e.$on("$destroy",(function(){const e=y.getWorkbenchSettings();g.toggleThemeMode(e.mode),g.applyTheme(e.theme),l.cancel(S)}));e.workbenchSettings||(e.workbenchSettings={theme:"light"}),e.getPrincipal(),e.setThemeMode(),E.checkLicenseStatus().then(()=>{e.showCookiePolicyLink=v.isTrackingAllowed()})}angular.module("graphdb.framework.security.controllers.user-settings",["graphdb.framework.core.services.security-service"]).controller("UserSettingsController",l),l.$inject=["$scope","toastr","$window","$timeout","$jwtAuth","$rootScope","$controller","SecurityService","ModalService","$translate","ThemeService","WorkbenchSettingsStorageService","$q","$uibModal","$licenseService","TrackingService"]},89:function(e,t,r){"use strict";r.r(t),r.d(t,"ChatMessageModel",(function(){return n})),r.d(t,"CHAT_MESSAGE_ROLE",(function(){return s}));class n{constructor(e){this._id=e.id,this._role=e.role,this._message=e.message,this._timestamp=1e3*e.timestamp}get id(){return this._id}set id(e){this._id=e}get role(){return this._role}set role(e){this._role=e}get message(){return this._message}set message(e){this._message=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}}const s={USER:"user",ASSISTANT:"assistant"}}}]);
@@ -1,2 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[18,140,296,325],{128:function(e,t,n){"use strict";function o(e,t,n,o,r){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,t){return e[t.name]=t.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=r.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,r){n.set(o.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:r}))},e.cancel=function(){t.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),t.close({currentMode:e.currentMode,link:e.link})};!function(){const t=n.get(o.JSONLD_EXPORT_SETTINGS);t&&(e.currentMode=e.JSONLDModes.find(e=>e.name===t.jsonldFormName),e.link=t.jsonldLink)}()}n.r(t),n.d(t,"ExportSettingsCtrl",(function(){return o})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",o),o.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]},144:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",translateKey:"download.as.json",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",translateKey:"download.as.jsonld",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",translateKey:"download.as.ndjsonld",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",translateKey:"download.as.rdfxml",type:"application/rdf+xml",extension:".rdf"},{name:"N3",translateKey:"download.as.n3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",translateKey:"download.as.ntriples",type:"text/plain",extension:".nt"},{name:"N-Quads",translateKey:"download.as.nquads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",translateKey:"download.as.turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",translateKey:"download.as.turtlestar",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",translateKey:"download.as.trix",type:"application/trix",extension:".trix"},{name:"TriG",translateKey:"download.as.trig",type:"application/x-trig",extension:".trig"},{name:"TriG*",translateKey:"download.as.trigstar",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",translateKey:"download.as.binaryrdf",type:"application/x-binary-rdf",extension:".brf"}])},247:function(e,t){angular.module("graphdb.framework.rest.export.service",[]).factory("ExportRestService",n),n.$inject=["$http","$repositories","$translate"];function n(e,t,n){return{getExportedStatementsAsJSONLD:function(t,n,o,r,a){const i=`repositories/${n.id}/statements?infer=false`,s={location:n.location},l={accept:a.accept};Array.isArray(t)?s.context=t.map(e=>decodeURIComponent(e)):t&&(s.context=decodeURIComponent(o[t.value].exportUri));r&&(s.authToken=r);a.link&&""!==a.link&&(l.link=a.link);return e({url:i,method:"GET",params:s,headers:l,responseType:"blob"}).then((function(e){const t=e.data;let n=e.headers()["content-disposition"].split("filename=")[1];return n=n.substring(0,n.length),{data:t,filename:n}}))}}}},318:function(e,t,n){"use strict";n.r(t);n(9),n(41),n(42),n(144),n(247);var o=n(549),r=n(0),a=n(18),i=n(128);angular.module("graphdb.framework.impex.export.controllers",["ngCookies","ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.workbench.utils.filetypes","graphdb.framework.rest.export.service"]).controller("ExportCtrl",["$scope","$http","$location","$timeout","ModalService","filterFilter","$repositories","toastr","ExportRestService","RDF4JRepositoriesRestService","FileTypes","$translate","AuthTokenService","$uibModal",function(e,t,n,s,l,p,c,d,u,g,f,h,m,x){e.getActiveRepository=function(){return c.getActiveRepository()},e.exportFormats=f,e.deleting={},e.showExportDDTooltip=!0,e.page=1,e.pageSize=10,e.pageSizeOptions=[10,20,50,100],e.displayGraphs=[],e.exportFilter="",e.export=!0,e.exportMultipleGraphs=!1,e.repoExportFormat={name:"TriG",type:"application/x-trig",extension:".trig"},e.selectedGraphs={exportGraphs:{}},e.$watch((function(){return c.getActiveRepository()}),(function(){e.exportFilter="",e.getGraphs(),e.selectedAll=!1,s((function(){e.changePageSize(10)}),100)})),e.isShacl=function(e){return"http%3A%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph"===e},e.getGraphs=function(){e.getActiveRepository()?(e.loader=!0,g.getGraphs(e.getActiveRepository()).success((function(t){t.results.bindings.unshift({contextID:{type:"default",value:"import.default.graph"}}),e.graphsByValue={},Object.keys(t.results.bindings).forEach((function(n){const o=t.results.bindings[n];"bnode"===o.contextID.type?o.contextID.value="_:"+o.contextID.value:"default"===o.contextID.type?(o.contextID.uri=encodeURIComponent("http://www.openrdf.org/schema/sesame#nil"),o.contextID.clearUri="DEFAULT",o.contextID.exportUri="null",o.contextID.longName="default graph"):(o.contextID.uri=encodeURIComponent(o.contextID.value),o.contextID.clearUri="GRAPH <"+o.contextID.value+">",o.contextID.exportUri=encodeURIComponent("<"+o.contextID.value+">"),o.contextID.longName="named graph "+o.contextID.value),e.graphsByValue[o.contextID.value]=o.contextID})),e.graphs=t.results.bindings,e.filteredGraphs=Object(a.cloneDeep)(e.graphs),e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page),e.loader=!1,e.selectedGraphs.exportGraphs={},e.matchedElements=e.graphs})).error((function(t,n){const o=getError(t,n);"There is no active location!"===o&&(c.setRepository(""),d.error(o,h.instant("common.error"))),e.loader=!1}))):e.loader=!1},e.onGraphSearch=function(){e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.graphs,(function(t){-1!==t.contextID.value.indexOf(e.exportFilter)&&e.matchedElements.push(t)}))},e.downloadExport=function(e,t){let n=e+"&Accept="+encodeURIComponent(t.type);const o=m.getAuthToken();o&&(n=n+"&authToken="+encodeURIComponent(o));let r=window.open(n);s((function(){"about:blank"!==r.document.location.href&&(r.close(),d.error("Could not export graph. Check GraphDB logs for detailed reason."))}),100)},e.openExportDDTooltip=function(){e.showExportDDTooltip&&(s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),0),s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),3e3),e.showExportDDTooltip=!1)},e.exportRepo=function(t,n){"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){e.startDownload(t,n)})):e.startDownload(t,n)},e.openJSONLDExportSettings=function(t,n){x.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:i.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(r){const a="framed"===r.currentMode.name?"frame":"context",i=r.link?`<${r.link}>; rel="http://www.w3.org/ns/json-ld#${a}"`:"";!function(e,t,n,r,a,i){const s={accept:e.type+";profile="+i.link,link:n};u.getExportedStatementsAsJSONLD(t,r,a,m.getAuthToken(),s).then((function({data:e,filename:t}){Object(o.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?d.error(e.statusText,h.instant("common.error")):d.error(t,h.instant("common.error"))})}))}(t,n,i,c.getActiveRepositoryObject(),e.graphsByValue,r.currentMode)}))},e.startDownload=function(t,n){let o;const r=c.getActiveRepositoryObject();o=n?`repositories/${r.id}/statements?infer=false&context=${e.graphsByValue[n.value].exportUri}&location=${encodeURIComponent(r.location)}`:`repositories/${r.id}/statements?infer=false&location=${encodeURIComponent(r.location)}`,e.downloadExport(o,t)},e.hasMultipleSelected=function(){if(_.isEmpty(e.selectedGraphs.exportGraphs))return!_.isEmpty(e.selectedGraphs.exportGraphs);for(const t in e.selectedGraphs.exportGraphs)if(!0===e.selectedGraphs.exportGraphs[t])return!0;return!1},e.openJSONLDExportSettingsForSelectedGraphs=function(t){const n=Object.keys(e.selectedGraphs.exportGraphs).filter(t=>e.selectedGraphs.exportGraphs[t]).map(t=>e.graphsByValue[t].exportUri);n?e.openJSONLDExportSettings(t,n):l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.exportSelectedGraphs=function(t){let n="";for(const t in e.selectedGraphs.exportGraphs)e.selectedGraphs.exportGraphs[t]&&(n+="context="+e.graphsByValue[t].exportUri+"&");if(n){const o=function(){n=n.substring(0,n.length-1);const o="repositories/"+e.getActiveRepository()+"/statements?infer=false&"+n;e.downloadExport(o,t)};"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){o()})):o()}else l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.$watch("exportFilter",(function(){if(e.filteredGraphs=p(e.graphs,e.exportFilter),e.getActiveRepository()&&angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span").length){const t=angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span")[0].innerHTML.trim();let n;"All"===t&&(n=e.filteredGraphs.length),e.filteredGraphs&&e.filteredGraphs.length>e.pageSize&&"All"!==t&&(n=e.pageSize),e.changePageSize(n),e.changePagination()}})),e.changePagination=function(){e.selectedAll=!1,angular.isDefined(e.filteredGraphs)&&(e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(t){$(".ot-graph-page-size").removeClass("active"),e.page=1,t&&(e.pageSize=t,e.changePagination()),e.filteredGraphs&&""!==e.exportFilter&&(e.displayGraphs=e.filteredGraphs)},e.checkAll=function(){e.selectedAll=e.selectedAll||!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=e.selectedAll)}))},e.deselectAll=function(){e.selectedAll=!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=!1)}))},e.dropRepository=function(){e.canWriteActiveRepo()&&(e.deleting["*"]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.msg"),message:h.instant("export.warning.clear.repo.msg",{repo:c.getActiveRepository()}),warning:!0}).result.then((function(){s((function(){g.addStatements(c.getActiveRepository(),"update=CLEAR ALL").then((function(){e.deleting["*"]=!1,d.success(h.instant("export.cleared.repo",{repo:c.getActiveRepository()})),e.getGraphs()}),(function(t){e.deleting["*"]=!1;const n=t.data;"string"==typeof n&&n.indexOf("Clearing all statements in the repository is incompatible with collecting history")>-1?d.error(h.instant("export.clearing.statements.warning")):d.error(h.instant("export.cleared.repo.failed.msg",{repo:c.getActiveRepository()}),t)}))}),100)})))},e.dropContext=function(t){e.canWriteActiveRepo()&&(angular.isDefined(t)?function(t){const n=t.contextID.longName;e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.clear.graph.warning",{longName:n}),warning:!0}).result.then((function(){s((function(){const o="update=CLEAR "+t.contextID.clearUri;g.addStatements(c.getActiveRepository(),o).then((function(){e.deleting[t]=!1,d.success(h.instant("export.cleared.graph",{longName:n})),e.getGraphs(),e.exportFilter="",e.filteredGraphs.length=0,e.updateResults(),e.changePageSize(e.pageSize)}),(function(o){e.deleting[t]=!1,d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(o,o.status))}))}),100)}),(function(){e.deleting[t]=!1}))}(t):function(t){const n=[];angular.forEach(e.selectedGraphs.exportGraphs,(function(e,t){e&&n.push(t)})),n.length>0&&(e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.warning.clear.graph.msg"),warning:!0}).result.then((function(){s((function(){let t=0;angular.forEach(n,(function(o){const r="update=CLEAR "+e.graphsByValue[o].clearUri;g.addStatements(c.getActiveRepository(),r).then((function(){e.loader=!0,e.selectedGraphs.exportGraphs[o]=!1,delete e.selectedGraphs.exportGraphs[o],t++,n.length===t&&(e.selectedAll=!1,e.exportFilter="",e.filteredGraphs.length=0,e.getGraphs(),e.updateResults(),e.changePageSize(e.pageSize),d.success(h.instant("export.cleared.graph.msg")),e.loader=!1)}),(function(t){const n=e.graphsByValue[o].longName;d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(t,t.status)),e.selectedAll=!1}))}))}),100)}),(function(){e.deleting[t]=!1})))}(t))}}])},548:function(e,t){(function(t){e.exports=t}).call(this,{})},549:function(e,t,n){var o,r=r||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=e.webkitRequestFileSystem,a=e.requestFileSystem||r||e.mozRequestFileSystem,i=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},s=0,l=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},p=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){i(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},d=function(t,i){t=c(t);var d,u,g,f=this,h=t.type,m=!1,x=function(){p(f,"writestart progress write writeend".split(" "))},y=function(){(!m&&d||(d=n().createObjectURL(t)),u)?u.location.href=d:null==e.open(d,"_blank")&&"undefined"!=typeof safari&&(e.location.href=d);f.readyState=f.DONE,x(),l(d)},w=function(e){return function(){if(f.readyState!==f.DONE)return e.apply(this,arguments)}},S={create:!0,exclusive:!1};if(f.readyState=f.INIT,i||(i="download"),o)return d=n().createObjectURL(t),o.href=d,o.download=i,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),x(),l(d),f.readyState=f.DONE}));e.chrome&&h&&"application/octet-stream"!==h&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,"application/octet-stream"),m=!0),r&&"download"!==i&&(i+=".download"),("application/octet-stream"===h||r)&&(u=e),a?(s+=t.size,a(e.TEMPORARY,s,w((function(e){e.root.getDirectory("saved",S,w((function(e){var n=function(){e.getFile(i,S,w((function(e){e.createWriter(w((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),f.readyState=f.DONE,p(f,"writeend",t),l(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=f["on"+e]})),n.write(t),f.abort=function(){n.abort(),f.readyState=f.DONE},f.readyState=f.WRITING})),y)})),y)};e.getFile(i,{create:!1},w((function(e){e.remove(),n()})),w((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(c(e),t)}:(u.abort=function(){this.readyState=this.DONE,p(this,"abort")},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t){return new d(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[18,140,296,325],{129:function(e,t,n){"use strict";function o(e,t,n,o,r){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,t){return e[t.name]=t.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=r.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,r){n.set(o.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:r}))},e.cancel=function(){t.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),t.close({currentMode:e.currentMode,link:e.link})};!function(){const t=n.get(o.JSONLD_EXPORT_SETTINGS);t&&(e.currentMode=e.JSONLDModes.find(e=>e.name===t.jsonldFormName),e.link=t.jsonldLink)}()}n.r(t),n.d(t,"ExportSettingsCtrl",(function(){return o})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",o),o.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]},144:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",translateKey:"download.as.json",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",translateKey:"download.as.jsonld",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",translateKey:"download.as.ndjsonld",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",translateKey:"download.as.rdfxml",type:"application/rdf+xml",extension:".rdf"},{name:"N3",translateKey:"download.as.n3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",translateKey:"download.as.ntriples",type:"text/plain",extension:".nt"},{name:"N-Quads",translateKey:"download.as.nquads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",translateKey:"download.as.turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",translateKey:"download.as.turtlestar",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",translateKey:"download.as.trix",type:"application/trix",extension:".trix"},{name:"TriG",translateKey:"download.as.trig",type:"application/x-trig",extension:".trig"},{name:"TriG*",translateKey:"download.as.trigstar",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",translateKey:"download.as.binaryrdf",type:"application/x-binary-rdf",extension:".brf"}])},247:function(e,t){angular.module("graphdb.framework.rest.export.service",[]).factory("ExportRestService",n),n.$inject=["$http","$repositories","$translate"];function n(e,t,n){return{getExportedStatementsAsJSONLD:function(t,n,o,r,a){const i=`repositories/${n.id}/statements?infer=false`,s={location:n.location},l={accept:a.accept};Array.isArray(t)?s.context=t.map(e=>decodeURIComponent(e)):t&&(s.context=decodeURIComponent(o[t.value].exportUri));r&&(s.authToken=r);a.link&&""!==a.link&&(l.link=a.link);return e({url:i,method:"GET",params:s,headers:l,responseType:"blob"}).then((function(e){const t=e.data;let n=e.headers()["content-disposition"].split("filename=")[1];return n=n.substring(0,n.length),{data:t,filename:n}}))}}}},318:function(e,t,n){"use strict";n.r(t);n(9),n(41),n(42),n(144),n(247);var o=n(549),r=n(0),a=n(18),i=n(129);angular.module("graphdb.framework.impex.export.controllers",["ngCookies","ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.workbench.utils.filetypes","graphdb.framework.rest.export.service"]).controller("ExportCtrl",["$scope","$http","$location","$timeout","ModalService","filterFilter","$repositories","toastr","ExportRestService","RDF4JRepositoriesRestService","FileTypes","$translate","AuthTokenService","$uibModal",function(e,t,n,s,l,p,c,d,u,g,f,h,m,x){e.getActiveRepository=function(){return c.getActiveRepository()},e.exportFormats=f,e.deleting={},e.showExportDDTooltip=!0,e.page=1,e.pageSize=10,e.pageSizeOptions=[10,20,50,100],e.displayGraphs=[],e.exportFilter="",e.export=!0,e.exportMultipleGraphs=!1,e.repoExportFormat={name:"TriG",type:"application/x-trig",extension:".trig"},e.selectedGraphs={exportGraphs:{}},e.$watch((function(){return c.getActiveRepository()}),(function(){e.exportFilter="",e.getGraphs(),e.selectedAll=!1,s((function(){e.changePageSize(10)}),100)})),e.isShacl=function(e){return"http%3A%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph"===e},e.getGraphs=function(){e.getActiveRepository()?(e.loader=!0,g.getGraphs(e.getActiveRepository()).success((function(t){t.results.bindings.unshift({contextID:{type:"default",value:"import.default.graph"}}),e.graphsByValue={},Object.keys(t.results.bindings).forEach((function(n){const o=t.results.bindings[n];"bnode"===o.contextID.type?o.contextID.value="_:"+o.contextID.value:"default"===o.contextID.type?(o.contextID.uri=encodeURIComponent("http://www.openrdf.org/schema/sesame#nil"),o.contextID.clearUri="DEFAULT",o.contextID.exportUri="null",o.contextID.longName="default graph"):(o.contextID.uri=encodeURIComponent(o.contextID.value),o.contextID.clearUri="GRAPH <"+o.contextID.value+">",o.contextID.exportUri=encodeURIComponent("<"+o.contextID.value+">"),o.contextID.longName="named graph "+o.contextID.value),e.graphsByValue[o.contextID.value]=o.contextID})),e.graphs=t.results.bindings,e.filteredGraphs=Object(a.cloneDeep)(e.graphs),e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page),e.loader=!1,e.selectedGraphs.exportGraphs={},e.matchedElements=e.graphs})).error((function(t,n){const o=getError(t,n);"There is no active location!"===o&&(c.setRepository(""),d.error(o,h.instant("common.error"))),e.loader=!1}))):e.loader=!1},e.onGraphSearch=function(){e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.graphs,(function(t){-1!==t.contextID.value.indexOf(e.exportFilter)&&e.matchedElements.push(t)}))},e.downloadExport=function(e,t){let n=e+"&Accept="+encodeURIComponent(t.type);const o=m.getAuthToken();o&&(n=n+"&authToken="+encodeURIComponent(o));let r=window.open(n);s((function(){"about:blank"!==r.document.location.href&&(r.close(),d.error("Could not export graph. Check GraphDB logs for detailed reason."))}),100)},e.openExportDDTooltip=function(){e.showExportDDTooltip&&(s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),0),s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),3e3),e.showExportDDTooltip=!1)},e.exportRepo=function(t,n){"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){e.startDownload(t,n)})):e.startDownload(t,n)},e.openJSONLDExportSettings=function(t,n){x.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:i.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(r){const a="framed"===r.currentMode.name?"frame":"context",i=r.link?`<${r.link}>; rel="http://www.w3.org/ns/json-ld#${a}"`:"";!function(e,t,n,r,a,i){const s={accept:e.type+";profile="+i.link,link:n};u.getExportedStatementsAsJSONLD(t,r,a,m.getAuthToken(),s).then((function({data:e,filename:t}){Object(o.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?d.error(e.statusText,h.instant("common.error")):d.error(t,h.instant("common.error"))})}))}(t,n,i,c.getActiveRepositoryObject(),e.graphsByValue,r.currentMode)}))},e.startDownload=function(t,n){let o;const r=c.getActiveRepositoryObject();o=n?`repositories/${r.id}/statements?infer=false&context=${e.graphsByValue[n.value].exportUri}&location=${encodeURIComponent(r.location)}`:`repositories/${r.id}/statements?infer=false&location=${encodeURIComponent(r.location)}`,e.downloadExport(o,t)},e.hasMultipleSelected=function(){if(_.isEmpty(e.selectedGraphs.exportGraphs))return!_.isEmpty(e.selectedGraphs.exportGraphs);for(const t in e.selectedGraphs.exportGraphs)if(!0===e.selectedGraphs.exportGraphs[t])return!0;return!1},e.openJSONLDExportSettingsForSelectedGraphs=function(t){const n=Object.keys(e.selectedGraphs.exportGraphs).filter(t=>e.selectedGraphs.exportGraphs[t]).map(t=>e.graphsByValue[t].exportUri);n?e.openJSONLDExportSettings(t,n):l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.exportSelectedGraphs=function(t){let n="";for(const t in e.selectedGraphs.exportGraphs)e.selectedGraphs.exportGraphs[t]&&(n+="context="+e.graphsByValue[t].exportUri+"&");if(n){const o=function(){n=n.substring(0,n.length-1);const o="repositories/"+e.getActiveRepository()+"/statements?infer=false&"+n;e.downloadExport(o,t)};"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){o()})):o()}else l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.$watch("exportFilter",(function(){if(e.filteredGraphs=p(e.graphs,e.exportFilter),e.getActiveRepository()&&angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span").length){const t=angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span")[0].innerHTML.trim();let n;"All"===t&&(n=e.filteredGraphs.length),e.filteredGraphs&&e.filteredGraphs.length>e.pageSize&&"All"!==t&&(n=e.pageSize),e.changePageSize(n),e.changePagination()}})),e.changePagination=function(){e.selectedAll=!1,angular.isDefined(e.filteredGraphs)&&(e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(t){$(".ot-graph-page-size").removeClass("active"),e.page=1,t&&(e.pageSize=t,e.changePagination()),e.filteredGraphs&&""!==e.exportFilter&&(e.displayGraphs=e.filteredGraphs)},e.checkAll=function(){e.selectedAll=e.selectedAll||!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=e.selectedAll)}))},e.deselectAll=function(){e.selectedAll=!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=!1)}))},e.dropRepository=function(){e.canWriteActiveRepo()&&(e.deleting["*"]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.msg"),message:h.instant("export.warning.clear.repo.msg",{repo:c.getActiveRepository()}),warning:!0}).result.then((function(){s((function(){g.addStatements(c.getActiveRepository(),"update=CLEAR ALL").then((function(){e.deleting["*"]=!1,d.success(h.instant("export.cleared.repo",{repo:c.getActiveRepository()})),e.getGraphs()}),(function(t){e.deleting["*"]=!1;const n=t.data;"string"==typeof n&&n.indexOf("Clearing all statements in the repository is incompatible with collecting history")>-1?d.error(h.instant("export.clearing.statements.warning")):d.error(h.instant("export.cleared.repo.failed.msg",{repo:c.getActiveRepository()}),t)}))}),100)})))},e.dropContext=function(t){e.canWriteActiveRepo()&&(angular.isDefined(t)?function(t){const n=t.contextID.longName;e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.clear.graph.warning",{longName:n}),warning:!0}).result.then((function(){s((function(){const o="update=CLEAR "+t.contextID.clearUri;g.addStatements(c.getActiveRepository(),o).then((function(){e.deleting[t]=!1,d.success(h.instant("export.cleared.graph",{longName:n})),e.getGraphs(),e.exportFilter="",e.filteredGraphs.length=0,e.updateResults(),e.changePageSize(e.pageSize)}),(function(o){e.deleting[t]=!1,d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(o,o.status))}))}),100)}),(function(){e.deleting[t]=!1}))}(t):function(t){const n=[];angular.forEach(e.selectedGraphs.exportGraphs,(function(e,t){e&&n.push(t)})),n.length>0&&(e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.warning.clear.graph.msg"),warning:!0}).result.then((function(){s((function(){let t=0;angular.forEach(n,(function(o){const r="update=CLEAR "+e.graphsByValue[o].clearUri;g.addStatements(c.getActiveRepository(),r).then((function(){e.loader=!0,e.selectedGraphs.exportGraphs[o]=!1,delete e.selectedGraphs.exportGraphs[o],t++,n.length===t&&(e.selectedAll=!1,e.exportFilter="",e.filteredGraphs.length=0,e.getGraphs(),e.updateResults(),e.changePageSize(e.pageSize),d.success(h.instant("export.cleared.graph.msg")),e.loader=!1)}),(function(t){const n=e.graphsByValue[o].longName;d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(t,t.status)),e.selectedAll=!1}))}))}),100)}),(function(){e.deleting[t]=!1})))}(t))}}])},548:function(e,t){(function(t){e.exports=t}).call(this,{})},549:function(e,t,n){var o,r=r||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=e.webkitRequestFileSystem,a=e.requestFileSystem||r||e.mozRequestFileSystem,i=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},s=0,l=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},p=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){i(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},d=function(t,i){t=c(t);var d,u,g,f=this,h=t.type,m=!1,x=function(){p(f,"writestart progress write writeend".split(" "))},y=function(){(!m&&d||(d=n().createObjectURL(t)),u)?u.location.href=d:null==e.open(d,"_blank")&&"undefined"!=typeof safari&&(e.location.href=d);f.readyState=f.DONE,x(),l(d)},w=function(e){return function(){if(f.readyState!==f.DONE)return e.apply(this,arguments)}},S={create:!0,exclusive:!1};if(f.readyState=f.INIT,i||(i="download"),o)return d=n().createObjectURL(t),o.href=d,o.download=i,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),x(),l(d),f.readyState=f.DONE}));e.chrome&&h&&"application/octet-stream"!==h&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,"application/octet-stream"),m=!0),r&&"download"!==i&&(i+=".download"),("application/octet-stream"===h||r)&&(u=e),a?(s+=t.size,a(e.TEMPORARY,s,w((function(e){e.root.getDirectory("saved",S,w((function(e){var n=function(){e.getFile(i,S,w((function(e){e.createWriter(w((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),f.readyState=f.DONE,p(f,"writeend",t),l(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=f["on"+e]})),n.write(t),f.abort=function(){n.abort(),f.readyState=f.DONE},f.readyState=f.WRITING})),y)})),y)};e.getFile(i,{create:!1},w((function(e){e.remove(),n()})),w((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(c(e),t)}:(u.abort=function(){this.readyState=this.DONE,p(this,"abort")},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t){return new d(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
2
2
  /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=r:null!==n(553)&&null!=n(548)&&(void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o))},553:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[186],{279:function(t,e){function o(){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=2.8.8">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[186],{279:function(t,e){function o(){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=2.8.9-RC1">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[19,183,187],{153:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return i}));var r=s(91),o=s(18);class i{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new i,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(o.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(o.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===r.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},180:function(e,t){function s(e,t,s,r,o){e.message=o,e.close=()=>{t.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{console.error("Could not copy text: ",e)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]},280:function(e,t,s){"use strict";s.r(t);s(180);var r=s(91),o=s(101);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:t=>{t.ImportResourceStatus=r.ImportResourceStatus,t.toTitleCase=e=>o.toTitleCase(e),t.showMessage=t=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return t?t.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},281:function(e,t){function s(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:s=>{const r=[];s.popoverTemplate="resourceStatusInfoTemplate.html",s.popoverIsOpen=!1,s.context=s.resource.importResource.context,s.replaceGraphs=s.resource.importResource.replaceGraphs,s.baseUrl=decodeURIComponent(s.resource.importResource.baseURI),s.forceSerial=s.resource.importResource.forceSerial,s.importedOn=s.resource.importResource.importedOn,s.parserSettings=s.resource.importResource.parserSettings,s.open=()=>{s.closeAllDialogs(),s.popoverIsOpen=!0},s.closeAllDialogs=()=>{e.$broadcast("closePopovers")},s.close=()=>{s.popoverIsOpen=!1};const o=e=>{"Escape"===e.key&&s.$apply(()=>{s.close()})};r.push(s.$on("closePopovers",s.close)),t.on("keydown",o),s.$on("$destroy",()=>{t.off("keydown",o),r.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",s),s.$inject=["$rootScope","$document"]},282:function(e,t,s){"use strict";s.r(t),s.d(t,"INDENT",(function(){return c})),s.d(t,"serverImportResourceTypeToIconMapping",(function(){return a})),s.d(t,"userImportResourceTypeToIconMapping",(function(){return n})),s.d(t,"ImportResourceTreeService",(function(){return u}));var r=s(113),o=s(153),i=s(91);const c=30,a=new Map;a.set(r.ImportResourceType.DIRECTORY,"icon-folder"),a.set(r.ImportResourceType.FILE,"icon-file");const n=new Map;n.set(r.ImportResourceType.DIRECTORY,"icon-folder"),n.set(r.ImportResourceType.FILE,"icon-upload"),n.set(r.ImportResourceType.URL,"icon-link"),n.set(r.ImportResourceType.TEXT,"icon-sparql");class u{static toImportResourceTree(e,t){const s=new o.ImportResourceTreeElement;return e.forEach(e=>{u.addResourceToTree(s,e,t)}),s}static mergeResourceTree(e,t,s){e.getRoot().toList().forEach(e=>{t.find(t=>t.name===e.importResource.name)||e.remove()}),t.forEach(t=>{const r=e.getResourceByName(t.name);r?r.importResource=t:u.addResourceToTree(e,t,s)})}static addResourceToTree(e,t,s){const r=u.getPath(t);let i;i=t.isDirectory()?r:r.slice(0,r.length-1);const c=u.getOrCreateParent(e,i);if(t.isFile()){const e=new o.ImportResourceTreeElement;return e.parent=c,e.importResource=t,e.path=r.join("/"),e.name=r[r.length-1],c.addResource(e),u.setIcon(e,s),e}return c.importResource=t,c.path=r.join("/"),u.setIcon(c,s),c}static setIcon(e,t){e.iconClass=t?n.get(e.importResource.type):a.get(e.importResource.type)}static getOrCreateParent(e,t){let s=e;return t.forEach(e=>{const t=s.getOrCreateDirectory(e);t.parent=s,s=t}),s}static getPath(e){if(e.isURL())return[e.name];const t=/[/\\]/;return t.test(e.name)?e.name.split(t):[e.name]}static calculateElementIndent(e){e.indent=8+u.getParentsCount(e)*c+"px",e.directories.forEach(e=>u.calculateElementIndent(e)),e.files.forEach(e=>u.calculateElementIndent(e))}static setupAfterTreeInitProperties(e){e.isRoot()||(e.isImportable=u.isImportable(e.importResource),e.hasOngoingImport=u.hasOngoingImport(e.importResource),e.canResetStatus=u.canResetStatus(e.importResource),e.hasStatusInfo="DONE"===e.importResource.status||"ERROR"===e.importResource.status,e.isEditable=e.importResource.isText(),u.setupShortenedMessage(e),u.setupShortenedContext(e),u.setupShortenedName(e),u.setupImportedAndModifiedComparableProperties(e)),e.directories.forEach(e=>u.setupAfterTreeInitProperties(e)),e.files.forEach(e=>u.setupAfterTreeInitProperties(e))}static setupShortenedMessage(e){const t=e.importResource?e.importResource.message:"";t&&t.length>150&&(e.shortenedMessage=t.substring(0,150)+"...")}static setupShortenedContext(e){const t=e.importResource?e.importResource.context:"";t.length>63&&(e.shortenedContext=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupShortenedName(e){const t=e.name||"";t.length>123&&(e.shortenedName=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupImportedAndModifiedComparableProperties(e){const t=e.importResource;if(t){if(0===t.importedOn||0===t.modifiedOn||t.importedOn===t.modifiedOn)return;e.isImportedBiggerThanModified=t.importedOn>t.modifiedOn,e.isModifiedBiggerThanImported=!e.isImportedBiggerThanModified}}static isImportable(e){return e.status!==i.ImportResourceStatus.IMPORTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.PENDING&&e.status!==i.ImportResourceStatus.INTERRUPTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.UPLOADED&&e.status!==i.ImportResourceStatus.UPLOAD_ERROR}static hasOngoingImport(e){return e.status===i.ImportResourceStatus.IMPORTING||e.status===i.ImportResourceStatus.UPLOADING||e.status===i.ImportResourceStatus.PENDING||e.status===i.ImportResourceStatus.INTERRUPTING}static canResetStatus(e){return e.status===i.ImportResourceStatus.DONE||e.status===i.ImportResourceStatus.ERROR}static getParentsCount(e){let t=0;if(void 0===e.parent)return t;let s=e.parent;for(;s;)s=s.parent,t++;return t-1}}},319:function(e,t,s){"use strict";s.r(t);var r=s(91),o=(s(280),s(281),s(179)),i=s(153),c=s(117),a=s(282),n=s(31);const u={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},l={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function p(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(s,p,m)=>{s.resources=new i.ImportResourceTreeElement,s.displayResources=[],s.TYPE_FILTER_OPTIONS=u,s.filterByType=u.ALL,s.filterByFileName="",s.STATUS_OPTIONS=l,s.selectedByStatus=void 0,s.areAllDisplayedImportResourcesSelected=!1,s.areAllDisplayedImportResourcesPartialSelected=!1,s.ImportResourceStatus=r.ImportResourceStatus,s.canRemoveResource=angular.isDefined(m.onRemove),s.canResetSelectedResources=!1,s.SORTING_TYPES=o.SortingType,s.sortAsc=!angular.isDefined(m.asc)||s.asc,s.sortedBy=s.sortBy,s.showLoader=t.getShowLoader(),s.hasSelection=!1,s.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),R()},s.selectResourceWithStatus=e=>{s.selectedByStatus=e,s.resources.setSelection(!1),l.ALL===s.selectedByStatus?s.resources.setSelection(!0):l.IMPORTED===s.selectedByStatus?s.resources.selectAllWithStatus([r.ImportResourceStatus.DONE]):l.NOT_IMPORTED===s.selectedByStatus&&s.resources.selectAllWithStatus([r.ImportResourceStatus.IMPORTING,r.ImportResourceStatus.NONE,r.ImportResourceStatus.ERROR,r.ImportResourceStatus.PENDING,r.ImportResourceStatus.INTERRUPTING]),h(),d()},s.filterByTypeChanged=e=>{s.filterByType=e,h()},s.filterByFileNameChanged=e=>{s.filterByFileName=e,D(h,100)},s.onResetStatus=()=>{const e=s.resources.getAllSelected().map(e=>e.path);e.length>0&&s.onReset({resources:e})},s.resetStatus=e=>{s.onReset({resources:[e.path]})},s.onRemoveResources=()=>{const e=s.resources.getAllSelected();e&&e.length>0&&s.onRemove({resources:e})},s.removeResource=e=>{s.onRemove({resources:[e]})},s.importAll=e=>{const t=s.resources.getAllSelectedForImport();t.length>0&&s.onImportAll({selectedResources:t,withoutChangingSettings:e})},s.stopImport=e=>{s.onStopImport({resource:e})},s.sort=e=>{s.sortedBy===e?s.sortAsc=!s.sortAsc:s.sortAsc=!0,s.sortedBy=e,h()},s.editResource=e=>{s.onEditResource({resource:e})};const d=()=>{s.canResetSelectedResources=s.resources.getSelectedImportedResources()},h=()=>{s.resources.getRoot().updateSelectionState(),g(),s.displayResources=s.resources.toList().filter(A).filter(O),R(),I()},R=()=>{const e=s.resources.getAllSelectedFilesNames();s.hasSelection=e.length>0,t.updateSelectedFilesNames(e)},I=()=>{const e=s.displayResources.some(e=>!e.selected),t=s.displayResources.some(e=>e.selected);s.areAllDisplayedImportResourcesSelected=t&&!e,s.areAllDisplayedImportResourcesPartialSelected=t&&e},g=()=>{o.SortingType.NAME===s.sortedBy?s.resources.sort(f(s.sortAsc)):o.SortingType.SIZE===s.sortedBy?s.resources.sort(S(s.sortAsc)):o.SortingType.MODIFIED===s.sortedBy?s.resources.sort(T(s.sortAsc)):o.SortingType.IMPORTED===s.sortedBy?s.resources.sort(E(s.sortAsc)):o.SortingType.CONTEXT===s.sortedBy&&s.resources.sort(y(s.sortAsc))},f=e=>(t,s)=>e?t.importResource.name.localeCompare(s.importResource.name):s.importResource.name.localeCompare(t.importResource.name),S=e=>(t,s)=>{const r=Object(n.convertToBytes)(t.importResource.size),o=Object(n.convertToBytes)(s.importResource.size);return e?r-o:o-r},T=e=>(t,s)=>{const r=t.importResource.modifiedOn||Number.MAX_VALUE,o=s.importResource.modifiedOn||Number.MAX_VALUE;return e?r-o:o-r},E=e=>(t,s)=>{const r=t.importResource.importedOn||Number.MAX_VALUE,o=s.importResource.importedOn||Number.MAX_VALUE;return e?r-o:o-r},y=e=>(t,s)=>e?t.importResource.context.localeCompare(s.importResource.context):s.importResource.context.localeCompare(t.importResource.context),A=e=>u.ALL===s.filterByType||(s.filterByType===u.FILE?e.isFile():s.filterByType===u.DIRECTORY&&e.isDirectory()),O=e=>!s.filterByFileName||(s.filterByType===u.DIRECTORY?e.hasTextInDirectoriesName(s.filterByFileName):s.filterByType===u.FILE?e.hasTextInFilesName(s.filterByFileName):e.hasTextInResourcesName(s.filterByFileName));let N;const D=(t,s)=>{N&&e.cancel(N),N=e(t,s)},C=[];C.push(t.onResourcesUpdated((e=[])=>{const r=c.TABS.USER===t.getActiveTabId();s.resources.isEmpty()?(s.resources=a.ImportResourceTreeService.toImportResourceTree(e,r),r&&(s.sortedBy=o.SortingType.MODIFIED)):a.ImportResourceTreeService.mergeResourceTree(s.resources,e,r),a.ImportResourceTreeService.calculateElementIndent(s.resources),a.ImportResourceTreeService.setupAfterTreeInitProperties(s.resources),h(),d()})),C.push(t.onShowLoaderUpdated(e=>s.showLoader=e)),C.push(t.onActiveTabIdUpdated(()=>s.resources=new i.ImportResourceTreeElement));s.$on("$destroy",()=>{C.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",p),p.$inject=["$timeout","ImportContextService"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[19,183,187],{153:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return i}));var r=s(91),o=s(18);class i{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new i,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(o.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(o.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===r.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},180:function(e,t){function s(e,t,s,r,o){e.message=o,e.close=()=>{t.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{console.error("Could not copy text: ",e)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]},280:function(e,t,s){"use strict";s.r(t);s(180);var r=s(91),o=s(101);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:t=>{t.ImportResourceStatus=r.ImportResourceStatus,t.toTitleCase=e=>o.toTitleCase(e),t.showMessage=t=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return t?t.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},281:function(e,t){function s(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:s=>{const r=[];s.popoverTemplate="resourceStatusInfoTemplate.html",s.popoverIsOpen=!1,s.context=s.resource.importResource.context,s.replaceGraphs=s.resource.importResource.replaceGraphs,s.baseUrl=decodeURIComponent(s.resource.importResource.baseURI),s.forceSerial=s.resource.importResource.forceSerial,s.importedOn=s.resource.importResource.importedOn,s.parserSettings=s.resource.importResource.parserSettings,s.open=()=>{s.closeAllDialogs(),s.popoverIsOpen=!0},s.closeAllDialogs=()=>{e.$broadcast("closePopovers")},s.close=()=>{s.popoverIsOpen=!1};const o=e=>{"Escape"===e.key&&s.$apply(()=>{s.close()})};r.push(s.$on("closePopovers",s.close)),t.on("keydown",o),s.$on("$destroy",()=>{t.off("keydown",o),r.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",s),s.$inject=["$rootScope","$document"]},282:function(e,t,s){"use strict";s.r(t),s.d(t,"INDENT",(function(){return c})),s.d(t,"serverImportResourceTypeToIconMapping",(function(){return a})),s.d(t,"userImportResourceTypeToIconMapping",(function(){return n})),s.d(t,"ImportResourceTreeService",(function(){return u}));var r=s(115),o=s(153),i=s(91);const c=30,a=new Map;a.set(r.ImportResourceType.DIRECTORY,"icon-folder"),a.set(r.ImportResourceType.FILE,"icon-file");const n=new Map;n.set(r.ImportResourceType.DIRECTORY,"icon-folder"),n.set(r.ImportResourceType.FILE,"icon-upload"),n.set(r.ImportResourceType.URL,"icon-link"),n.set(r.ImportResourceType.TEXT,"icon-sparql");class u{static toImportResourceTree(e,t){const s=new o.ImportResourceTreeElement;return e.forEach(e=>{u.addResourceToTree(s,e,t)}),s}static mergeResourceTree(e,t,s){e.getRoot().toList().forEach(e=>{t.find(t=>t.name===e.importResource.name)||e.remove()}),t.forEach(t=>{const r=e.getResourceByName(t.name);r?r.importResource=t:u.addResourceToTree(e,t,s)})}static addResourceToTree(e,t,s){const r=u.getPath(t);let i;i=t.isDirectory()?r:r.slice(0,r.length-1);const c=u.getOrCreateParent(e,i);if(t.isFile()){const e=new o.ImportResourceTreeElement;return e.parent=c,e.importResource=t,e.path=r.join("/"),e.name=r[r.length-1],c.addResource(e),u.setIcon(e,s),e}return c.importResource=t,c.path=r.join("/"),u.setIcon(c,s),c}static setIcon(e,t){e.iconClass=t?n.get(e.importResource.type):a.get(e.importResource.type)}static getOrCreateParent(e,t){let s=e;return t.forEach(e=>{const t=s.getOrCreateDirectory(e);t.parent=s,s=t}),s}static getPath(e){if(e.isURL())return[e.name];const t=/[/\\]/;return t.test(e.name)?e.name.split(t):[e.name]}static calculateElementIndent(e){e.indent=8+u.getParentsCount(e)*c+"px",e.directories.forEach(e=>u.calculateElementIndent(e)),e.files.forEach(e=>u.calculateElementIndent(e))}static setupAfterTreeInitProperties(e){e.isRoot()||(e.isImportable=u.isImportable(e.importResource),e.hasOngoingImport=u.hasOngoingImport(e.importResource),e.canResetStatus=u.canResetStatus(e.importResource),e.hasStatusInfo="DONE"===e.importResource.status||"ERROR"===e.importResource.status,e.isEditable=e.importResource.isText(),u.setupShortenedMessage(e),u.setupShortenedContext(e),u.setupShortenedName(e),u.setupImportedAndModifiedComparableProperties(e)),e.directories.forEach(e=>u.setupAfterTreeInitProperties(e)),e.files.forEach(e=>u.setupAfterTreeInitProperties(e))}static setupShortenedMessage(e){const t=e.importResource?e.importResource.message:"";t&&t.length>150&&(e.shortenedMessage=t.substring(0,150)+"...")}static setupShortenedContext(e){const t=e.importResource?e.importResource.context:"";t.length>63&&(e.shortenedContext=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupShortenedName(e){const t=e.name||"";t.length>123&&(e.shortenedName=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupImportedAndModifiedComparableProperties(e){const t=e.importResource;if(t){if(0===t.importedOn||0===t.modifiedOn||t.importedOn===t.modifiedOn)return;e.isImportedBiggerThanModified=t.importedOn>t.modifiedOn,e.isModifiedBiggerThanImported=!e.isImportedBiggerThanModified}}static isImportable(e){return e.status!==i.ImportResourceStatus.IMPORTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.PENDING&&e.status!==i.ImportResourceStatus.INTERRUPTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.UPLOADED&&e.status!==i.ImportResourceStatus.UPLOAD_ERROR}static hasOngoingImport(e){return e.status===i.ImportResourceStatus.IMPORTING||e.status===i.ImportResourceStatus.UPLOADING||e.status===i.ImportResourceStatus.PENDING||e.status===i.ImportResourceStatus.INTERRUPTING}static canResetStatus(e){return e.status===i.ImportResourceStatus.DONE||e.status===i.ImportResourceStatus.ERROR}static getParentsCount(e){let t=0;if(void 0===e.parent)return t;let s=e.parent;for(;s;)s=s.parent,t++;return t-1}}},319:function(e,t,s){"use strict";s.r(t);var r=s(91),o=(s(280),s(281),s(179)),i=s(153),c=s(119),a=s(282),n=s(31);const u={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},l={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function p(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(s,p,m)=>{s.resources=new i.ImportResourceTreeElement,s.displayResources=[],s.TYPE_FILTER_OPTIONS=u,s.filterByType=u.ALL,s.filterByFileName="",s.STATUS_OPTIONS=l,s.selectedByStatus=void 0,s.areAllDisplayedImportResourcesSelected=!1,s.areAllDisplayedImportResourcesPartialSelected=!1,s.ImportResourceStatus=r.ImportResourceStatus,s.canRemoveResource=angular.isDefined(m.onRemove),s.canResetSelectedResources=!1,s.SORTING_TYPES=o.SortingType,s.sortAsc=!angular.isDefined(m.asc)||s.asc,s.sortedBy=s.sortBy,s.showLoader=t.getShowLoader(),s.hasSelection=!1,s.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),R()},s.selectResourceWithStatus=e=>{s.selectedByStatus=e,s.resources.setSelection(!1),l.ALL===s.selectedByStatus?s.resources.setSelection(!0):l.IMPORTED===s.selectedByStatus?s.resources.selectAllWithStatus([r.ImportResourceStatus.DONE]):l.NOT_IMPORTED===s.selectedByStatus&&s.resources.selectAllWithStatus([r.ImportResourceStatus.IMPORTING,r.ImportResourceStatus.NONE,r.ImportResourceStatus.ERROR,r.ImportResourceStatus.PENDING,r.ImportResourceStatus.INTERRUPTING]),h(),d()},s.filterByTypeChanged=e=>{s.filterByType=e,h()},s.filterByFileNameChanged=e=>{s.filterByFileName=e,D(h,100)},s.onResetStatus=()=>{const e=s.resources.getAllSelected().map(e=>e.path);e.length>0&&s.onReset({resources:e})},s.resetStatus=e=>{s.onReset({resources:[e.path]})},s.onRemoveResources=()=>{const e=s.resources.getAllSelected();e&&e.length>0&&s.onRemove({resources:e})},s.removeResource=e=>{s.onRemove({resources:[e]})},s.importAll=e=>{const t=s.resources.getAllSelectedForImport();t.length>0&&s.onImportAll({selectedResources:t,withoutChangingSettings:e})},s.stopImport=e=>{s.onStopImport({resource:e})},s.sort=e=>{s.sortedBy===e?s.sortAsc=!s.sortAsc:s.sortAsc=!0,s.sortedBy=e,h()},s.editResource=e=>{s.onEditResource({resource:e})};const d=()=>{s.canResetSelectedResources=s.resources.getSelectedImportedResources()},h=()=>{s.resources.getRoot().updateSelectionState(),g(),s.displayResources=s.resources.toList().filter(A).filter(O),R(),I()},R=()=>{const e=s.resources.getAllSelectedFilesNames();s.hasSelection=e.length>0,t.updateSelectedFilesNames(e)},I=()=>{const e=s.displayResources.some(e=>!e.selected),t=s.displayResources.some(e=>e.selected);s.areAllDisplayedImportResourcesSelected=t&&!e,s.areAllDisplayedImportResourcesPartialSelected=t&&e},g=()=>{o.SortingType.NAME===s.sortedBy?s.resources.sort(f(s.sortAsc)):o.SortingType.SIZE===s.sortedBy?s.resources.sort(S(s.sortAsc)):o.SortingType.MODIFIED===s.sortedBy?s.resources.sort(T(s.sortAsc)):o.SortingType.IMPORTED===s.sortedBy?s.resources.sort(E(s.sortAsc)):o.SortingType.CONTEXT===s.sortedBy&&s.resources.sort(y(s.sortAsc))},f=e=>(t,s)=>e?t.importResource.name.localeCompare(s.importResource.name):s.importResource.name.localeCompare(t.importResource.name),S=e=>(t,s)=>{const r=Object(n.convertToBytes)(t.importResource.size),o=Object(n.convertToBytes)(s.importResource.size);return e?r-o:o-r},T=e=>(t,s)=>{const r=t.importResource.modifiedOn||Number.MAX_VALUE,o=s.importResource.modifiedOn||Number.MAX_VALUE;return e?r-o:o-r},E=e=>(t,s)=>{const r=t.importResource.importedOn||Number.MAX_VALUE,o=s.importResource.importedOn||Number.MAX_VALUE;return e?r-o:o-r},y=e=>(t,s)=>e?t.importResource.context.localeCompare(s.importResource.context):s.importResource.context.localeCompare(t.importResource.context),A=e=>u.ALL===s.filterByType||(s.filterByType===u.FILE?e.isFile():s.filterByType===u.DIRECTORY&&e.isDirectory()),O=e=>!s.filterByFileName||(s.filterByType===u.DIRECTORY?e.hasTextInDirectoriesName(s.filterByFileName):s.filterByType===u.FILE?e.hasTextInFilesName(s.filterByFileName):e.hasTextInResourcesName(s.filterByFileName));let N;const D=(t,s)=>{N&&e.cancel(N),N=e(t,s)},C=[];C.push(t.onResourcesUpdated((e=[])=>{const r=c.TABS.USER===t.getActiveTabId();s.resources.isEmpty()?(s.resources=a.ImportResourceTreeService.toImportResourceTree(e,r),r&&(s.sortedBy=o.SortingType.MODIFIED)):a.ImportResourceTreeService.mergeResourceTree(s.resources,e,r),a.ImportResourceTreeService.calculateElementIndent(s.resources),a.ImportResourceTreeService.setupAfterTreeInitProperties(s.resources),h(),d()})),C.push(t.onShowLoaderUpdated(e=>s.showLoader=e)),C.push(t.onActiveTabIdUpdated(()=>s.resources=new i.ImportResourceTreeElement));s.$on("$destroy",()=>{C.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",p),p.$inject=["$timeout","ImportContextService"]}}]);