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.
- package/dist/{10.5ddeb0c3a1fe59eae189.bundle.js → 10.d8d48ce0ca42085e7864.bundle.js} +1 -1
- package/dist/100.bf4a4f519b81c43fafc1.bundle.js +1 -0
- package/dist/{100.39911dc242bc083427b5.bundle.js → 101.444ee8c4ad450a80c227.bundle.js} +1 -1
- package/dist/{101.3c81e5463ac7bd87920b.bundle.js → 102.ec42287cf6022b9eb02f.bundle.js} +1 -1
- package/dist/{102.fe653ba57ff2b81cdf07.bundle.js → 103.82c4dfa967a6f2407f11.bundle.js} +1 -1
- package/dist/{103.663db6e061c3509a1f78.bundle.js → 104.cb138bb3b878e001e32f.bundle.js} +1 -1
- package/dist/{104.5bde157512536df59792.bundle.js → 105.8c2014a729e3e29b78ae.bundle.js} +1 -1
- package/dist/{105.af4d75298548559a6b91.bundle.js → 106.4aa823fde540a06e4083.bundle.js} +1 -1
- package/dist/{106.1c526cd8378b98858e06.bundle.js → 107.09c059b73119d06600c0.bundle.js} +1 -1
- package/dist/{107.4bf934d8a7d093ea4cd6.bundle.js → 108.3c5b6b3268b21218a7a5.bundle.js} +1 -1
- package/dist/{108.8ea1a51acbd345907740.bundle.js → 109.57128c0d6212e0a46ad3.bundle.js} +1 -1
- package/dist/{109.a71df4aa4e00b47f5616.bundle.js → 110.af42819ef3cf70e39b25.bundle.js} +1 -1
- package/dist/{110.94d5a65ffa5d8891406f.bundle.js → 111.f548b124aab10b4b1c9e.bundle.js} +1 -1
- package/dist/{111.a8212d3445aa614f99d9.bundle.js → 112.f754348fe5d0086f677e.bundle.js} +1 -1
- package/dist/{112.393b01f7630bb30617c9.bundle.js → 113.d7c1a18d18713eece29a.bundle.js} +1 -1
- package/dist/{113.cbdf7d68d2471ced1ef4.bundle.js → 114.f719039be05fc7b214c5.bundle.js} +1 -1
- package/dist/{114.85465110c4fbd79849c7.bundle.js → 115.8dab67853260483ced85.bundle.js} +1 -1
- package/dist/{115.a6c405de2fe018cc6033.bundle.js → 116.ed2bb3fba38737cd21a2.bundle.js} +1 -1
- package/dist/{116.227e24944ca1c987460c.bundle.js → 117.8dc1a253f70f4727c027.bundle.js} +1 -1
- package/dist/{117.125beedc641ab53f511f.bundle.js → 118.d197d3c97039ee68643d.bundle.js} +1 -1
- package/dist/{118.a6e09ae6273a9e7714ff.bundle.js → 119.ee1dd79fb171af44577c.bundle.js} +1 -1
- package/dist/{12.8078044ba9dc5aefb919.bundle.js → 12.ed4bc07d06db664a8a2c.bundle.js} +1 -1
- package/dist/{119.f672e5bd50a1a9476dcc.bundle.js → 120.e25b821b13d853a321b5.bundle.js} +1 -1
- package/dist/{120.8725206e84a9f2b1fc44.bundle.js → 121.45b40da06cc7a71ae79f.bundle.js} +1 -1
- package/dist/{121.787215b44b2f8f4d2850.bundle.js → 122.4e50eaaadaf3dd57b2b2.bundle.js} +1 -1
- package/dist/{122.39e92001e2f86ed551f4.bundle.js → 123.2cc29edc9b32fcc35a5c.bundle.js} +1 -1
- package/dist/{123.30b2e28436b10116e05a.bundle.js → 124.5bf5f52df172c58b05d0.bundle.js} +1 -1
- package/dist/{124.ff59b5de798cc188f089.bundle.js → 125.53a564a1540cfbe90d0a.bundle.js} +1 -1
- package/dist/{125.04369aedfa25c24c03cf.bundle.js → 126.dc613e6d7c178aa1f71d.bundle.js} +1 -1
- package/dist/{126.20cf9bbd99138d8275e9.bundle.js → 127.aef2e7fa7136b5fb20dc.bundle.js} +1 -1
- package/dist/{127.fa70afe0caa6a82a487d.bundle.js → 128.c47682ae8c6f4827775e.bundle.js} +1 -1
- package/dist/{128.d6242296779b40ceee78.bundle.js → 129.79a97fa0c54c52a26f86.bundle.js} +1 -1
- package/dist/{13.e28878c924d54fd6affc.bundle.js → 13.49bf149227b1a2f915a6.bundle.js} +1 -1
- package/dist/{136.7045cfc939cc42c457de.bundle.js → 136.3b7b30e23a57edaccaad.bundle.js} +1 -1
- package/dist/{140.20b791dd9206aec902c3.bundle.js → 140.0824cff78d35896e19a1.bundle.js} +1 -1
- package/dist/{146.725d89d31b4a9b742d3f.bundle.js → 146.a0a2b0a47fa6363c2be0.bundle.js} +1 -1
- package/dist/{15.7ee3e6ec073366903f69.bundle.js → 15.2eabfe524e0689eb26e9.bundle.js} +1 -1
- package/dist/{16.cfcb97f2798c0f998b6d.bundle.js → 16.0ead6802df331f763762.bundle.js} +1 -1
- package/dist/{160.09bb953d13e3d63eed4f.bundle.js → 160.9df03bd5ab91e27a7e3c.bundle.js} +1 -1
- package/dist/{17.330b4db61f4286346e1d.bundle.js → 17.bcc91ddb954e2e1ee5a2.bundle.js} +1 -1
- package/dist/{18.131accbaf7a1f9d61001.bundle.js → 18.a4b27592c1b39f2b754b.bundle.js} +1 -1
- package/dist/186.d2a7c6668b2f2198549a.bundle.js +1 -1
- package/dist/{19.417d4a0cb5047abff48e.bundle.js → 19.33b6dc6ba1cea3b94465.bundle.js} +1 -1
- package/dist/{192.2d6358f31811ab3464ba.bundle.js → 192.a238bb9bb9a833ef304b.bundle.js} +1 -1
- package/dist/{198.f34180ba04b8f2d651ab.bundle.js → 198.568088e342b26f534c8f.bundle.js} +1 -1
- package/dist/{2.6684bcc4e367bcb9e628.bundle.js → 2.3837bd63288e2a826720.bundle.js} +1 -1
- package/dist/{20.ee5088425c87c66ae8d0.bundle.js → 20.204efddc3b65e3417f98.bundle.js} +1 -1
- package/dist/{200.7ff10cae741e1382bcb3.bundle.js → 200.6eee537413665b02c23f.bundle.js} +1 -1
- package/dist/{206.750777aab552b2c97c68.bundle.js → 206.7f16c0fcd5d65d82f869.bundle.js} +1 -1
- package/dist/{21.7ad047ae5bb8c0a68163.bundle.js → 21.bf90c5dbc6751926b09f.bundle.js} +1 -1
- package/dist/{217.76f3e1cda60f9abe1701.bundle.js → 217.57a8407776a632ad45ff.bundle.js} +1 -1
- package/dist/{226.a3b6f063cd117f6809e5.bundle.js → 226.914d0a244a06d6eff230.bundle.js} +1 -1
- package/dist/23.b57e6b08f36eaa6cfa1c.bundle.js +3 -0
- package/dist/{234.a223a40490dbaf451cd7.bundle.js → 234.d92bb857de797a88568d.bundle.js} +1 -1
- package/dist/{235.2d41cfd545adcebf23d1.bundle.js → 235.1182f064fb17ad3f55d1.bundle.js} +1 -1
- package/dist/{24.0fee5a7050aa01c43593.bundle.js → 24.77404fb1a29f7448cfa9.bundle.js} +1 -1
- package/dist/{25.42411835319827f4bfc1.bundle.js → 25.fd2151cfa79bb46e568e.bundle.js} +1 -1
- package/dist/{250.f20ba52ca6ed81d5d179.bundle.js → 250.ad498a8076662df1ed87.bundle.js} +1 -1
- package/dist/{26.68da73b9eb0e20ef6a04.bundle.js → 26.b4cf5132c870052d06f3.bundle.js} +1 -1
- package/dist/{261.bb146605dd28d704aa16.bundle.js → 261.01d68aa8402ef6ac3a38.bundle.js} +1 -1
- package/dist/{266.929c96d6372d56668ae0.bundle.js → 266.6b132ba2f789d8526651.bundle.js} +1 -1
- package/dist/{27.9170cfa5bc0b60e51d82.bundle.js → 27.af756f3e9a79334cb6f9.bundle.js} +1 -1
- package/dist/{271.f51d241774a8df3f20c7.bundle.js → 271.57cac2aa90c6b4409f51.bundle.js} +1 -1
- package/dist/{273.235fcf7e993aace5557d.bundle.js → 273.532af8c0707be80576a4.bundle.js} +1 -1
- package/dist/{274.4489e0c0b2b5457a3513.bundle.js → 274.9e29d76ce7a1be779fe2.bundle.js} +1 -1
- package/dist/{28.decaa67e47ac79ba59a3.bundle.js → 28.f64cabb9e00e2f08ed6a.bundle.js} +1 -1
- package/dist/{288.b263f48bcaa5db590821.bundle.js → 288.942d138e6c489a3ff6df.bundle.js} +1 -1
- package/dist/{29.8b089f6adfabb19d8073.bundle.js → 29.073b9b1176718648e438.bundle.js} +1 -1
- package/dist/{293.88a6655ca50918b1edc4.bundle.js → 293.35cf89ffdbbcab6c39de.bundle.js} +1 -1
- package/dist/{3.31747e6f9dde0db936ea.bundle.js → 3.f26cefadb24ee2836b8a.bundle.js} +1 -1
- package/dist/{30.9345c96cc253adab0ae0.bundle.js → 30.3530af7acf6dd4af07b4.bundle.js} +1 -1
- package/dist/{302.2a26c6c4f78a037c6d3e.bundle.js → 302.9e008d753a24f66797ac.bundle.js} +1 -1
- package/dist/{307.d188e735148ef48fbe80.bundle.js → 307.99dec37cee341acf70d6.bundle.js} +1 -1
- package/dist/{31.614dbf7498a1552e355c.bundle.js → 31.19f116ce71f83ce6c3df.bundle.js} +1 -1
- package/dist/{319.53ee0f1a2a998747c6bd.bundle.js → 319.6ee5e4d0efbb256ad040.bundle.js} +1 -1
- package/dist/{32.a52b26adcd7755172626.bundle.js → 32.3649b0fc7e7136790d43.bundle.js} +1 -1
- package/dist/{320.80795d19cc7aa6ccaa28.bundle.js → 320.5cb0f10abd3ca266298e.bundle.js} +1 -1
- package/dist/{328.e966458d8c8ceca910de.bundle.js → 328.b769a2c7965fcc07d289.bundle.js} +1 -1
- package/dist/{33.db577a77e1237b4997ef.bundle.js → 33.d4864cfbed6bb7c30c95.bundle.js} +1 -1
- package/dist/{330.38fcfd70d382ec90607d.bundle.js → 330.f66ff693ab2f86440650.bundle.js} +1 -1
- package/dist/{34.12bd97ec9f0f5411ede8.bundle.js → 34.4a17e8b0f3f203963d5e.bundle.js} +1 -1
- package/dist/342.cead059cad2a860fb1db.bundle.js +1 -0
- package/dist/348.b09b5350639beca8034e.bundle.js +1 -1
- package/dist/{35.e22a1a214303b341a46d.bundle.js → 35.2920265e8348ab78e718.bundle.js} +1 -1
- package/dist/354.474aa50f195477e48af9.bundle.js +1 -1
- package/dist/357.603fceaaeb0992019407.bundle.js +1 -1
- package/dist/358.5398b6635b1fc42b581a.bundle.js +1 -1
- package/dist/359.a2f8d884c46015ae98ed.bundle.js +1 -1
- package/dist/{36.1092cd7bf5d220bb9063.bundle.js → 36.99a2c4a2393ff13ec514.bundle.js} +1 -1
- package/dist/360.40b2c9f3610b0f8dea80.bundle.js +1 -1
- package/dist/361.91ac80c8c5586b0546a5.bundle.js +1 -1
- package/dist/37.d519cb3af9d6205f0015.bundle.js +1 -0
- package/dist/{38.fb2659cad2c86b5ec58d.bundle.js → 38.23f902df4ed8fbfc7fcf.bundle.js} +1 -1
- package/dist/{39.96fb293a7ae3ef7a5ad9.bundle.js → 39.171886987f5ef7d17208.bundle.js} +1 -1
- package/dist/391.45bf699afe7aba531cd9.bundle.js +1 -1
- package/dist/{40.159ef797572a6c14eab5.bundle.js → 40.0937e585f9f5a7eaab82.bundle.js} +1 -1
- package/dist/403.61a61ce1c12385533859.bundle.js +1 -1
- package/dist/404.b53dc0ad0aaedcf3f809.bundle.js +1 -1
- package/dist/405.eb8906e00f241da08275.bundle.js +1 -1
- package/dist/406.48298a2b9c49b99170f8.bundle.js +1 -1
- package/dist/407.56a20539c08f5d616640.bundle.js +1 -1
- package/dist/409.72d548b44e2f1c414a24.bundle.js +1 -1
- package/dist/{41.8a09e7ba27f7614de053.bundle.js → 41.3b2afebd8ef778234327.bundle.js} +1 -1
- package/dist/410.df9406357dc52e98d0c4.bundle.js +1 -1
- package/dist/411.3a8907f7c02b1e9581e2.bundle.js +1 -1
- package/dist/412.5feece7f4c5164d2eadb.bundle.js +1 -1
- package/dist/42.51a2b146401e3d3c44fd.bundle.js +1 -0
- package/dist/43.c3b8fc48a5d69126ff55.bundle.js +1 -0
- package/dist/{44.582668c8e60673ee9a89.bundle.js → 44.0b6f6369f9c157f2243c.bundle.js} +1 -1
- package/dist/46.5baa02d0ce0f4e4bec79.bundle.js +1 -0
- package/dist/{47.a0af564fb81592c87a50.bundle.js → 47.c7898dbc38a6a6e9321b.bundle.js} +1 -1
- package/dist/{48.067da85ef40da92d258a.bundle.js → 48.4a5b02907ad2d1a2792f.bundle.js} +1 -1
- package/dist/{49.ca18c72cba3d68131fdb.bundle.js → 49.143329d875c1714aec89.bundle.js} +1 -1
- package/dist/{50.271eee82fbebc9d53f38.bundle.js → 50.385486fe0efbefd5dfa9.bundle.js} +1 -1
- package/dist/{51.4ac9662be57037924446.bundle.js → 51.9f3c96f8a93b54423852.bundle.js} +1 -1
- package/dist/{52.1470d5ed8b99f64d5ce2.bundle.js → 52.ff20925f8f7656382d7b.bundle.js} +1 -1
- package/dist/{53.f13a957ecbd28e1125c7.bundle.js → 53.e286cd8cfb636fcec996.bundle.js} +1 -1
- package/dist/{54.c875b7240154b221bebb.bundle.js → 54.326b8c0143c463fc8e2d.bundle.js} +1 -1
- package/dist/55.4009a0d60dea722c108d.bundle.js +1 -0
- package/dist/{55.49f77e42bc983dcbfacc.bundle.js → 56.a581f6f1ded6a4d3d08b.bundle.js} +1 -1
- package/dist/{56.5a4901fea60239d0b3e0.bundle.js → 57.aa39c7d23ece602d952f.bundle.js} +1 -1
- package/dist/{57.1bb4040e33a9a35f5b9f.bundle.js → 58.fad69b0e6153a06c83b7.bundle.js} +1 -1
- package/dist/{58.394c32af3b117b179610.bundle.js → 59.84e7285984168a313d36.bundle.js} +1 -1
- package/dist/{6.f8af74652bcab7953736.bundle.js → 6.73f6adae3ab11729ebf2.bundle.js} +1 -1
- package/dist/{59.e50dc5ce41dd02cf3b3d.bundle.js → 60.ad49b739e4b8f2cdbce7.bundle.js} +1 -1
- package/dist/{60.95c6753d580f3a716b22.bundle.js → 61.ee14d8cda3708fe9c287.bundle.js} +1 -1
- package/dist/62.092aacacd064526783c0.bundle.js +1 -0
- package/dist/{62.48b219154c6345908a80.bundle.js → 63.9537a1fd0366d5518114.bundle.js} +1 -1
- package/dist/64.1dd28ef2f60fe1ba23a5.bundle.js +1 -0
- package/dist/{64.04c60a42b228c234e2ad.bundle.js → 65.4c0218d3ba1faae1f6ad.bundle.js} +1 -1
- package/dist/{65.bb26ca0693ef27c414a7.bundle.js → 66.2a2d9bf0e595ca627c78.bundle.js} +1 -1
- package/dist/{66.f19c0287fadf05c84858.bundle.js → 67.a4e87ab3032de83a0d71.bundle.js} +1 -1
- package/dist/{67.6b37a09a02d11c37bcaa.bundle.js → 68.66efe1b03756e3052e35.bundle.js} +1 -1
- package/dist/{68.9ebaf6d51e22177c8ba2.bundle.js → 69.fd10e482a3491294f900.bundle.js} +1 -1
- package/dist/{7.e59eae3aa5e9e0ea5a0e.bundle.js → 7.c7a405d7dc99c9ebee48.bundle.js} +1 -1
- package/dist/70.38ae428de620fbf7602d.bundle.js +1 -0
- package/dist/{69.f3be67c2243892d32055.bundle.js → 71.e18795e8eaed8f747ce5.bundle.js} +1 -1
- package/dist/{70.415393ee813d58975172.bundle.js → 72.a53c1a358c3335c3eaa1.bundle.js} +1 -1
- package/dist/{71.e89efd706a10aea2074e.bundle.js → 73.d442bfb6f448e72c5bce.bundle.js} +1 -1
- package/dist/74.05569d4f46a43d6d56e4.bundle.js +1 -0
- package/dist/{73.53bbbd74f7de2913152b.bundle.js → 75.e226c0d22ed7ff1b57ee.bundle.js} +1 -1
- package/dist/{74.184ffc6fc6053f5c645d.bundle.js → 76.afa96077de497c981882.bundle.js} +1 -1
- package/dist/{75.441343592edbcf27a029.bundle.js → 77.9fa02265d836024fdf79.bundle.js} +1 -1
- package/dist/{76.055e216b311e1817484e.bundle.js → 78.9f81b2060ae650976ae7.bundle.js} +1 -1
- package/dist/{77.c75c1df7b8e2c4855b17.bundle.js → 79.3fc17aa270c5a6477e9c.bundle.js} +1 -1
- package/dist/{8.28f2c0d888f5e99cfbc9.bundle.js → 8.18ec3a5b3f95a7965e71.bundle.js} +1 -1
- package/dist/{78.bd5758f93518290f477f.bundle.js → 80.7de02802c242d6cf125c.bundle.js} +1 -1
- package/dist/{79.1d57915d970df0a37229.bundle.js → 81.66b9a961188d712b1d48.bundle.js} +1 -1
- package/dist/{80.c83c5d743d89a63e7437.bundle.js → 82.8c402a2cedd2441c3f3c.bundle.js} +1 -1
- package/dist/{81.d04604229fe4fdd02601.bundle.js → 83.15cd8f06607b23e5e901.bundle.js} +1 -1
- package/dist/{82.a8e009ab0c08b859d2ce.bundle.js → 84.825f8eaa43e71f73f25d.bundle.js} +1 -1
- package/dist/{83.80c0e99346b0e55b33a5.bundle.js → 85.00ce4d8f4433d87bf54e.bundle.js} +1 -1
- package/dist/{84.891be8b57abdab473123.bundle.js → 86.ffeb1acd50a34948e089.bundle.js} +1 -1
- package/dist/{86.33c18744f8b1ae858a66.bundle.js → 87.9ac37a1a4a11ef7dfbac.bundle.js} +1 -1
- package/dist/{87.a623d6e7d303f6f34851.bundle.js → 88.5b052707f2cd26eb7890.bundle.js} +1 -1
- package/dist/{88.11dcfbd80b70ce8140af.bundle.js → 89.76461444a1cb2b2e1114.bundle.js} +1 -1
- package/dist/{9.4b42fc29ab253cd7ad0d.bundle.js → 9.d57134d0b4eb2e6f4ee6.bundle.js} +1 -1
- package/dist/{89.2c22dfa2ddf7c65e8f07.bundle.js → 90.7934551daab93be805ba.bundle.js} +1 -1
- package/dist/{90.d64c9e9798606a8a2488.bundle.js → 91.de9fe730d2b00227b9d4.bundle.js} +1 -1
- package/dist/{91.53d392a817902243fd14.bundle.js → 92.f4a3984a912edbb06838.bundle.js} +1 -1
- package/dist/{92.4c7f6ae785e5c2726adf.bundle.js → 93.e22a88d63bd4fc5f616c.bundle.js} +1 -1
- package/dist/{93.44989fd952e4ee29a14d.bundle.js → 94.f731de3062bce3990e2f.bundle.js} +1 -1
- package/dist/{94.8f5fc9e6922907cdf8d0.bundle.js → 95.5fdf43bda2882304ace9.bundle.js} +1 -1
- package/dist/{95.7a98715e44233a65f0b6.bundle.js → 96.21c753d787869238e5ed.bundle.js} +1 -1
- package/dist/{96.b2a0154600564a0bf2c8.bundle.js → 97.13cd4feb8916c17b8b20.bundle.js} +1 -1
- package/dist/{97.19320ba399d9b0bc4a3d.bundle.js → 98.6379c1708e09a721cc36.bundle.js} +1 -1
- package/dist/{98.53c28cc4683594868437.bundle.js → 99.bfe2ea3e30bb6b0e9045.bundle.js} +1 -1
- package/dist/{bundle.8b5133c2bd45c3446e7b.bundle.js → bundle.f1f997c1b702d546a4e1.bundle.js} +5 -5
- package/dist/css/autocomplete.css +5 -0
- package/dist/css/rdf-class-hierarchy.css +1 -1
- package/dist/index.html +3 -3
- package/dist/js/angular/autocomplete/templates/modal/add-label.html +5 -2
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/license-checker.json +2 -2
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +8 -10
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +12 -12
- package/package.json +1 -1
- package/dist/129.e20705a1f5be2410d666.bundle.js +0 -1
- package/dist/23.56301f1a97cc94310f2d.bundle.js +0 -3
- package/dist/342.ca94acdc8de22e22241a.bundle.js +0 -1
- package/dist/37.fbd78997b9e6a3530e15.bundle.js +0 -1
- package/dist/42.68cf9fea9586d95c7ef2.bundle.js +0 -1
- package/dist/43.53bafbaf1332f99c7e74.bundle.js +0 -1
- package/dist/46.eb3af10b1fccbfa2f5bf.bundle.js +0 -1
- package/dist/61.f553a4c10a25b9af3cd7.bundle.js +0 -1
- package/dist/63.9c60525f7eed7756e83e.bundle.js +0 -1
- package/dist/72.6f58ccfef39ec2ee9614.bundle.js +0 -1
- package/dist/85.945ee0e14f628a4fa4a1.bundle.js +0 -1
- package/dist/99.bc85d568135caa51630f.bundle.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[25,30,65,78,97,143,198,201,257,258,294,302,316,317,322],{100:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",n),n.$inject=["$http"];function n(e){return{getConnectors:function(t,n){if(t)return e.get("rest/connectors",{headers:{"X-GraphDB-Repository":t,"X-GraphDB-Repository-Location":n}});return e.get("rest/connectors")},initConnector:function(t){return e.get("rest/connectors/options?prefix="+t)},hasConnector:function(t,n,o){if(n)return e.get("rest/connectors/existing?prefix="+t,{headers:{"X-GraphDB-Repository":n,"X-GraphDB-Repository-Location":o}});return e.get("rest/connectors/existing?prefix="+t)},checkConnector:function(t){return e.post("rest/connectors/check",t,{headers:{"Content-Type":"text/plain"}})}}}},103:function(e,t,n){"use strict";n.r(t),n.d(t,"ConnectorTypesListModel",(function(){return o})),n.d(t,"ConnectorTypeModel",(function(){return i})),n.d(t,"ConnectorListModel",(function(){return s})),n.d(t,"ConnectorModel",(function(){return a})),n.d(t,"ConnectorSettingsModel",(function(){return r}));class o{constructor(e={}){this._connectors=e.connectors||[]}getConnectorByName(e){return this._connectors.find(t=>t.name===e)}get connectors(){return this._connectors}set connectors(e){this._connectors=e}}class i{constructor(e){this._name=e.name,this._prefix=e.prefix}get name(){return this._name}set name(e){this._name=e}get prefix(){return this._prefix}set prefix(e){this._prefix=e}}class s{constructor(e=[]){this._connectors=e.connectors}get connectors(){return this._connectors}set connectors(e){this._connectors=e}}class a{constructor(e){this._name=e.name,this._settings=new r(e)}get settings(){return this._settings}set settings(e){this._settings=e}get name(){return this._name}set name(e){this._name=e}}class r{constructor(e){this._settings=e.values||{}}get settings(){return this._settings}set settings(e){this._settings=e}}},104:function(e,t){angular.module("graphdb.framework.rest.similarity.service",[]).factory("SimilarityRestService",n),n.$inject=["$http","$repositories"];function n(e){return{getIndexes:function(t,n){if(t)return e.get("rest/similarity",{headers:{"X-GraphDB-Repository":t,"X-GraphDB-Repository-Location":n}});return e.get("rest/similarity")},getSearchQueries:function(){return e.get("rest/similarity/config")},rebuildIndex:function(e){return t("PUT",e.name,e.options,e.selectQuery,e.searchQuery,e.analogicalQuery,e.stopList,e.infer,e.sameAs,e.type)},deleteIndex:function(t){return e.delete("rest/similarity?name="+t.name)},createIndex:t,getSamples:function(){return e.get("rest/similarity/samples")},getQuery:function(t){return e.get("rest/similarity/query",{params:{name:t.indexName,options:t.indexOptions,stopList:t.indexStopList,selectQuery:t.query,infer:t.queryInference,sameAs:t.querySameAs,type:t.viewType,analyzer:t.indexAnalyzer}})},saveSearchQuery:function(t){return e({method:"put",url:"rest/similarity/search-query",data:t})}};function t(t,n,o,i,s,a,r,c,l,d,g){return e({method:t,url:"rest/similarity",noCancelOnRouteChange:!0,data:{name:n,options:o,selectQuery:i,stopList:r,infer:c,sameAs:l,type:d,analyzer:g,searchQuery:s,analogicalQuery:a}})}}},105:function(e,t,n){"use strict";n.r(t);n(100);var o=n(110),i=n(93);function s(e){const t=(t,n)=>e.getConnectors(t,n).then(e=>Object(o.connectorTypesListMapper)(e.data)),n=(t,n,i)=>e.hasConnector(encodeURIComponent(t),n,i).then(e=>Object(o.connectorsMapper)(e.data));return{getConnectorTypes:t,getConnectorsByType:n,getConnectorPrefixByName:(e,n,o)=>t(n,o).then(t=>{const n=t.getConnectorByName(e);return n?n.prefix:null}),getConnectorsByTypeAsSelectMenuOptions:(e,t,o)=>n(e,t,o).then(e=>e.connectors.map(e=>new i.SelectMenuOptionsModel({value:e.name,label:e.name})))}}angular.module("graphdb.framework.core.services.connectors",["graphdb.framework.rest.connectors.service"]).factory("ConnectorsService",s),s.$inject=["ConnectorsRestService"]},106:function(e,t,n){"use strict";n.r(t);n(104);var o=n(99),i=n(93);function s(e){const t=(t,n)=>e.getIndexes(t,n).then(e=>Object(o.mapIndexesResponseToSimilarityIndex)(e.data));return{getIndexes:t,getIndexesAsMenuModel:(e,n)=>t(e,n).then(e=>e.map(e=>new i.SelectMenuOptionsModel({label:e.name,value:e.name})))}}angular.module("graphdb.framework.core.services.similarity",["graphdb.framework.rest.similarity.service"]).factory("SimilarityService",s),s.$inject=["SimilarityRestService"]},110:function(e,t,n){"use strict";n.r(t),n.d(t,"connectorTypesListMapper",(function(){return i})),n.d(t,"connectorsMapper",(function(){return s}));var o=n(103);const i=e=>{const t=new o.ConnectorTypesListModel;return e?(t.connectors=Object.keys(e).map(t=>new o.ConnectorTypeModel({name:t,prefix:e[t]})),t):t},s=e=>{const t=new o.ConnectorListModel;return e?(t.connectors=e.map(e=>new o.ConnectorModel(e)),t):t}},138:function(e,t){function n(e){return{restrict:"E",scope:{fieldName:"@",source:"=",onSave:"&",onCancel:"&",onClick:"&",onDblclick:"&",isEditing:"="},templateUrl:"js/angular/core/directives/inline-editable-text/templates/inline-editable-text.template.html",link:function(t,n){t.editableModel={};const o=[];let i;t.onKeydown=e=>{"Enter"===e.key?(a(),t.editableModel.text!==t.text&&t.onSave({newText:t.editableModel.text,source:t.source})):"Escape"===e.key&&s()},t.onCancelEditing=()=>{s()},t.onSelect=()=>{i?(a(),t.onDblclick({source:t.source})):i=e((function(){t.onClick({source:t.source}),a()}),250)};const s=()=>{a(),t.onCancel()},a=()=>{e.cancel(i),i=void 0};o.push(t.$watch("isEditing",o=>{o&&(t.editableModel.text=t.source[t.fieldName],e(()=>{const e=n.find("input")[0];e.focus(),e.select()},0))}));t.$on("$destroy",()=>{o.forEach(e=>e()),a()})}}}angular.module("graphdb.framework.core.directives.inline-editable-text",[]).directive("inlineEditableText",n),n.$inject=["$timeout"]},148:function(e,t,n){"use strict";n.r(t);n(106),n(105),n(115),n(21);function o(e,t,n,o,i){e.agentInstructionsExplain=i.agentInstructionsExplain,e.close=()=>{t.dismiss({})},e.onCloseAgentInstructionsExplainModal=()=>{t.dismiss({})};const s=[];e.$on("$destroy",()=>{s.forEach(e=>e())})}angular.module("graphdb.framework.ttyg.controllers.agent-instructions-explain-modal",[]).controller("AgentInstructionsExplainModalController",o),o.$inject=["$scope","$uibModalInstance","ModalService","$translate","dialogModel"]},185:function(e,t,n){"use strict";n.r(t),n.d(t,"status",(function(){return o}));const o={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,CONFLICT:409,INTERNAL_SERVER_ERROR:500,SERVICE_UNAVAILABLE:503}},199:function(e,t,n){"use strict";n.r(t);n(138);var o=n(88),i=n(147),s=n(0);function a(e,t,n,a){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-list.html",link:r=>{r.selectedChat=void 0,r.renamedChat=void 0,r.deletingChat=void 0,r.onSelectChatForRenaming=e=>{r.renamedChat=e},r.onSelectChat=t=>{if(!r.selectedChat||r.selectedChat.id!==t.id){const n=e.getChats().getNonPersistedChat();n&&e.deleteChat(n),e.selectChat(t),r.renamedChat=void 0}},r.onDeleteChat=i=>{const a=n.instant("ttyg.dialog.delete.title"),r=Object(s.decodeHTML)(n.instant("ttyg.dialog.delete.body",{chatName:i.name}));t.openConfirmation(a,r,()=>e.emit(o.TTYGEventName.DELETE_CHAT,i))},r.onRenameChat=(t,n)=>{n.name=t,r.renamedChat=void 0,e.emit(o.TTYGEventName.RENAME_CHAT,n)},r.onExportChat=t=>{e.emit(o.TTYGEventName.CHAT_EXPORT,t)},r.onCancelChatRenaming=()=>{r.renamedChat=void 0},r.getHumanReadableChatGroupTimestamp=e=>Object(i.getHumanReadableTimestamp)(n,a,e);const c=e=>{r.selectedChat=e},l=[];l.push(e.onSelectedChatChanged(c)),l.push(e.onSelectedChatUpdated(c)),l.push(e.onChatsListChanged(e=>{r.chatList=e})),l.push(e.subscribe(o.TTYGEventName.DELETING_CHAT,e=>{r.deletingChat=e})),r.$on("$destroy",()=>{l.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.chat-list",["graphdb.framework.core.directives.inline-editable-text"]).directive("chatList",a),a.$inject=["TTYGContextService","ModalService","$translate","$filter"]},200:function(e,t,n){"use strict";n.r(t);n(210);var o=n(88),i=n(89),s=n(96),a=n(18),r=n(0),c=n(111);function l(e,t,n){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-panel.html",link:(e,l,d)=>{e.chat=void 0,e.selectedAgent=void 0,e.chatItem=void 0,e.askingChatItem=void 0,e.waitingForLastMessage=!1,e.loadingChat=!0,e.ask=()=>{e.chatItem.question.timestamp=Date.now(),e.askingChatItem=Object(a.cloneDeep)(e.chatItem),e.chatItem.chatId?u(e.chatItem):g(),e.chatItem=m(),T(),p()},e.regenerateQuestion=t=>{const n=m();n.setQuestionMessage(t.getQuestionMessage()),n.question.timestamp=Date.now(),e.askingChatItem=n,u(n),T()},e.onKeypressOnInput=t=>{"Enter"!==t.key||t.shiftKey||t.ctrlKey||e.ask()},e.onAskHowDeliveredAnswer=()=>{const n=m();n.setQuestionMessage(t.instant("ttyg.chat_panel.btn.derive_answer.label")),n.question.timestamp=Date.now(),e.askingChatItem=Object(a.cloneDeep)(n),u(n),T()},e.getAgentName=e=>{const o=n.getAgent(e);return o?o.name:Object(r.decodeHTML)(t.instant("ttyg.chat_panel.deleted_agent"))};const g=()=>{e.waitingForLastMessage=!0,n.emit(o.TTYGEventName.CREATE_CHAT,e.chatItem)},u=t=>{e.waitingForLastMessage=!0,n.emit(o.TTYGEventName.ASK_QUESTION,t)},h=()=>{e.chatItem=Object(a.cloneDeep)(e.askingChatItem),e.askingChatItem=void 0,e.waitingForLastMessage=!1},m=()=>{const t=new s.ChatItemModel;return t.question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER}),e.chat&&(t.chatId=e.chat.id),e.selectedAgent&&(t.agentId=e.selectedAgent.id),t},p=()=>{const e=l.find(".question-input");e.length&&e[0].focus()},T=()=>{setTimeout(()=>{const e=l.find(".chat-details")[0];e&&(e.scrollTop=e.scrollHeight)})},E=()=>{e.chat=c.ChatModel.getEmptyChat(),e.loadingChat=!1,e.chatItem=m(),e.askingChatItem=void 0,e.waitingForLastMessage=!1,p()},y=[];y.push(e.$watchCollection("chat.chatHistory.items",T)),y.push(n.onSelectedChatUpdated(t=>{if(e.chat=t,t&&(t.id||!e.askingChatItem)){if(e.loadingChat=!1,e.chatItem=m(),e.askingChatItem=void 0,e.chat){const t=e.chat.chatHistory.getLast();t&&t.agentId&&n.selectAgent(n.getAgent(t.agentId))}p()}})),y.push(n.onLastMessageReceived(()=>{e.waitingForLastMessage=!1})),y.push(n.onSelectedAgentChanged(t=>{e.selectedAgent=t,e.selectedAgent&&e.chatItem&&(e.chatItem.agentId=e.selectedAgent.id)})),y.push(n.onSelectedChatChanged(t=>{t?(e.loadingChat=t&&t.id,e.chatItem=m(),p()):E()})),y.push(n.subscribe(o.TTYGEventName.LOAD_CHAT_FAILURE,()=>{e.loadingChat=!1,e.chatItem=m(),p()})),y.push(n.subscribe(o.TTYGEventName.ASK_QUESTION_FAILURE,h)),y.push(n.subscribe(o.TTYGEventName.CREATE_CHAT_FAILURE,h)),y.push(n.subscribe(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,t=>{e.chat&&t.id===e.chat.id&&E()})),e.$on("$destroy",()=>{y.forEach(e=>e())}),e.chat=c.ChatModel.getEmptyChat(),e.chatItem=m(),p()}}}angular.module("graphdb.framework.ttyg.directives.chat-panel",["graphdb.framework.ttyg.directives.chat-item-detail"]).directive("chatPanel",l),l.$inject=["toastr","$translate","TTYGContextService"]},201:function(e,t,n){"use strict";n.r(t);var o=n(0),i=n(88);function s(e,t,n){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-list.html",scope:{agentList:"=",agentListFilterModel:"="},link:(s,a,r)=>{s.selectedAgent=void 0,s.selectedAgentsFilter=void 0,s.deletingAgent=void 0,s.onEditAgent=t=>{e.emit(i.TTYGEventName.EDIT_AGENT,t)},s.onCloneAgent=t=>{e.emit(i.TTYGEventName.CLONE_AGENT,t)},s.onDeleteAgent=s=>{const a=n.instant("ttyg.agent.delete_agent_modal.title"),r=Object(o.decodeHTML)(n.instant("ttyg.agent.delete_agent_modal.body",{agentName:s.name}));t.openConfirmation(a,r,()=>e.emit(i.TTYGEventName.DELETE_AGENT,s))},s.onAgentsFilterChange=e=>{s.selectedAgentsFilter=e,s.selectedAgentsFilter&&s.agentList.filterByRepository(s.selectedAgentsFilter.key)};const c=()=>{const e=s.agentListFilterModel.find(e=>e.selected);s.selectedAgentsFilter=e||s.agentListFilterModel[0],s.onAgentsFilterChange(s.selectedAgentsFilter)},l=[];l.push(s.$watch("agentListFilterModel",c)),l.push(e.subscribe(i.TTYGEventName.DELETING_AGENT,e=>{s.deletingAgent=e})),l.push(e.onSelectedAgentChanged(e=>{s.selectedAgent=e})),s.$on("$destroy",()=>{l.forEach(e=>e())}),c()}}}angular.module("graphdb.framework.ttyg.directives.agent-list",[]).directive("agentList",s),s.$inject=["TTYGContextService","ModalService","$translate"]},202:function(e,t,n){"use strict";n.r(t);var o=n(93),i=n(88);function s(e,t,n,s){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:n=>{n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=o=>{if(a(o),n.selectedAgent=o,e.selectAgent(o),o.isRepositoryDeleted){const n=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),a=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");s.openConfirmation(n,a,()=>e.emit(i.TTYGEventName.EDIT_AGENT,o))}};const a=e=>{n.agentOptionsList.forEach(t=>{t.selected=t.data.agent===e})},r=e=>{n.agentOptionsList=e.agents.map(e=>new o.SelectMenuOptionsModel({value:e.id,label:e.name,data:{agent:e}}))},c=[];c.push(e.onAgentsListChanged(e=>{r(e)})),c.push(e.subscribe(i.TTYGEventName.AGENT_DELETED,t=>{n.selectedAgent&&n.selectedAgent.id===t.id&&(n.selectedAgent.isDeleted=!0,e.selectAgent(n.selectedAgent))})),c.push(e.onSelectedAgentChanged(e=>{a(e),n.selectedAgent=e})),n.$on("$destroy",()=>{c.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",s),s.$inject=["TTYGContextService","$translate","$sce","ModalService"]},203:function(e,t,n){"use strict";n.r(t);var o=n(88),i=n(14);function s(e,t){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/no-agents-view.html",scope:{},link:n=>{n.canModifyAgent=!1,n.talkToGraphDocumentationLink=i.DocumentationUrlResolver.getDocumentationUrl(t.productShortVersion,"talk-to-graph.html"),n.onCreateAgent=()=>{e.emit(o.TTYGEventName.OPEN_AGENT_SETTINGS)};const s=[];s.push(e.onCanUpdateAgentUpdated(e=>{n.canModifyAgent=e})),n.$on("$destroy",()=>{s.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.no-agents-view",[]).directive("noAgentsView",s),s.$inject=["TTYGContextService","productInfo"]},204:function(e,t){angular.module("graphdb.framework.ttyg.directives.show-tooltip-on-overflow",[]).directive("showTooltipOnOverflow",(function(){return{link:function(e,t){setTimeout((function(){const n=t[0].querySelector(".editable-text-element");n&&(n.scrollWidth>n.clientWidth?t.attr("title",e.chat.name):t.removeAttr("title"))}),0)}}}))},205:function(e,t,n){"use strict";n.r(t);var o=n(0),i=n(116),s=(n(106),n(105),n(115),n(21),n(148),n(10)),a=n(88),r=n(107);function c(e,t,n,c,l,d,g,u,h,m,p,T,E,y){e.AGENT_OPERATION=r.AGENT_OPERATION,e.operation=T.operation,e.savingAgent=!1,e.agentFormModel=T.agentFormModel,e.activeRepositoryInfo=T.activeRepositoryInfo,e.extractionMethodLoaderFlags={[i.ExtractionMethod.SIMILARITY]:!1},e.activeRepositoryList=T.activeRepositoryList,e.extractionMethods=i.ExtractionMethod,e.showAdvancedSettings=!1,e.showHighTemperatureWarning=!1,e.showSystemInstructionWarning=!1,e.similarityIndexes=[],e.retrievalConnectors=[],e.ftsEnabled=!1,e.toggleExtractionMethod=t=>{t.expanded=t.selected,e.agentSettingsForm.extractionMethods.$setTouched(),I(),L[t.method](t)},e.onExtractionMethodPanelToggle=e=>{e.toggleCollapse(),L[e.method](e)},e.getModelHelpMessage=()=>{const e=Object(o.decodeHTML)(p.instant("ttyg.agent.create_agent_modal.form.model.hint"));return u.trustAsHtml(e)},e.getFTSDisabledHelpMessage=()=>{const t=Object(o.decodeHTML)(p.instant("ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message",{repositoryEditPage:"#/repository/edit/"+e.agentFormModel.repositoryId}));return u.trustAsHtml(t)},e.goToCreateSimilarityView=()=>{E.emit(a.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.goToConnectorsView=()=>{E.emit(a.TTYGEventName.GO_TO_CONNECTORS_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.ok=()=>{const t=e.agentFormModel.toPayload();return f[e.operation](t)},e.cancel=()=>{t.dismiss({})},e.close=()=>{t.dismiss({})},e.updateSimilaritySearchPanel=(t=!1)=>{const n=e.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();n.selected&&(t&&(n.similarityIndex=null),R(n))},e.updateRetrievalConnectorPanel=(t=!1)=>{const n=e.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();n.selected&&(t&&(n.retrievalConnectorInstance=null),N(n))},e.checkIfFTSEnabled=()=>{if(!e.agentFormModel.repositoryId)return void e.agentSettingsForm.$setValidity("FTSDisabled",!1);e.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod().selected?(e.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!0,g.getRepositoryModel({id:e.agentFormModel.repositoryId}).then(t=>{e.ftsEnabled=t.getParamValue(s.REPOSITORY_PARAMS.enableFtsIndex)}).catch(e=>{S(e,"ttyg.agent.messages.error_repository_config_loading")}).finally(()=>{e.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!1,e.agentSettingsForm.$setValidity("FTSDisabled",e.ftsEnabled)})):e.agentSettingsForm.$setValidity("FTSDisabled",!0)},e.onRepositoryChange=()=>{G(!0,!0)},e.onRestoreDefaultSystemInstructions=()=>{e.agentFormModel.instructions.systemInstruction=e.agentFormModel.instructions.systemInstructionCopy},e.onRestoreDefaultUserInstructions=()=>{e.agentFormModel.instructions.userInstruction=e.agentFormModel.instructions.userInstructionCopy},e.onTemperatureChange=()=>{e.showHighTemperatureWarning=e.agentFormModel.temperature.value>1},e.onSystemInstructionChange=()=>{""===e.agentFormModel.instructions.systemInstruction||e.showSystemInstructionWarning||(e.showSystemInstructionWarning=!0,n.openModalAlert({title:p.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title"),message:p.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body")}).result.then((function(){}))),""===e.agentFormModel.instructions.systemInstruction&&(e.showSystemInstructionWarning=!1)},e.onExplainAgentSettings=()=>{const t=e.agentFormModel.toPayload();y.explainAgentSettings(t).then(e=>{const t={templateUrl:"js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html",controller:"AgentInstructionsExplainModalController",windowClass:"agent-instructions-explain-modal",backdrop:"static",resolve:{dialogModel:function(){return{agentInstructionsExplain:e}}},size:"lg"};c.open(t).result.then(()=>{})}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))})};const f={[r.AGENT_OPERATION.CREATE]:e=>C(e),[r.AGENT_OPERATION.EDIT]:e=>v(e),[r.AGENT_OPERATION.CLONE]:e=>A(e)},C=n=>(e.savingAgent=!0,y.createAgent(n).then(e=>{t.close(e),h.success(p.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{e.savingAgent=!1})),v=n=>(e.savingAgent=!0,y.editAgent(n).then(e=>{t.close(e),h.success(p.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{e.savingAgent=!1})),A=n=>(e.savingAgent=!0,y.createAgent(n).then(e=>{t.close(e),h.success(p.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{e.savingAgent=!1})),S=(e,t)=>{console.error(e),h.error(p.instant(t))},I=()=>{e.agentSettingsForm.extractionMethods.$setValidity("required",e.agentFormModel.hasExtractionMethodSelected())},_=()=>{const t=e.activeRepositoryList.find(t=>t.value===e.agentFormModel.repositoryId);return{repositoryId:t?t.data.repository.id:void 0,repositoryLocation:t?t.data.repository.location:void 0}},R=t=>{if(t.selected||e.agentSettingsForm.$setValidity("missingIndex",!0),t.expanded){e.extractionMethodLoaderFlags[t.method]=!0;const n=_();l.getIndexesAsMenuModel(n.repositoryId,n.repositoryLocation).then(n=>{e.similarityIndexes=n,e.agentSettingsForm.$setValidity("missingIndex",!t.selected||!(!n||!n.length)),b(e.similarityIndexes,t)}).catch(t=>{e.agentSettingsForm.$setValidity("missingIndex",!1),S(t,"ttyg.agent.messages.error_similarity_indexes_loading")}).finally(()=>{e.extractionMethodLoaderFlags[t.method]=!1})}},b=(e,t)=>{if(0===e.length)return void(t.similarityIndex=null);const n=e.find(e=>e.value===t.similarityIndex);t.similarityIndex=n?n.value:e[0].value},N=t=>{if(t.selected||e.agentSettingsForm.$setValidity("missingConnector",!0),t.expanded){e.extractionMethodLoaderFlags[t.method]=!0;const n=_();d.getConnectorPrefixByName("ChatGPT Retrieval",n.repositoryId,n.repositoryLocation).then(e=>d.getConnectorsByTypeAsSelectMenuOptions(e,n.repositoryId,n.repositoryLocation)).then(n=>{e.retrievalConnectors=n,e.agentSettingsForm.$setValidity("missingConnector",!t.selected||!(!n||!n.length)),M(e.retrievalConnectors,t)}).catch(t=>{e.agentSettingsForm.$setValidity("missingConnector",!1),S(t,"ttyg.agent.messages.error_retrieval_connectors_loading")}).finally(()=>{e.extractionMethodLoaderFlags[t.method]=!1})}},M=(e,t)=>{if(0===e.length)return void(t.retrievalConnectorInstance=null);const n=e.find(e=>e.value===t.retrievalConnectorInstance);t.retrievalConnectorInstance=n?n.value:e[0].value},L={[i.ExtractionMethod.FTS_SEARCH]:t=>{e.checkIfFTSEnabled()},[i.ExtractionMethod.SPARQL]:e=>{},[i.ExtractionMethod.SIMILARITY]:e=>R(e),[i.ExtractionMethod.RETRIEVAL]:e=>N(e)},G=(t=!1,n=!1)=>{e.checkIfFTSEnabled(),e.updateSimilaritySearchPanel(t),e.updateRetrievalConnectorPanel(n)},O=()=>{document.hidden||G()};document.addEventListener("visibilitychange",O),e.$on("$destroy",()=>{document.removeEventListener("visibilitychange",O)});setTimeout(I,0)}angular.module("graphdb.framework.ttyg.controllers.agent-settings-modal",["graphdb.framework.core.services.similarity","graphdb.framework.core.services.connectors","graphdb.framework.rest.repositories.service","graphdb.framework.ttyg.controllers.agent-instructions-explain-modal"]).controller("AgentSettingsModalController",c),c.$inject=["$scope","$uibModalInstance","ModalService","$uibModal","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","toastr","UriUtils","$translate","dialogModel","TTYGContextService","TTYGService"]},206:function(e,t){function n(e,t){const n={agent:{id:void 0},chat:{id:void 0}},o=()=>{let o=e.get(t.TTYG);return o||(o=n),o.agent||(o.agent={}),o.chat||(o.chat={}),o};return{saveAgent:function(n){const i=o();i.agent.id=n?n.id:void 0,e.set(t.TTYG,i)},getAgentId:function(){const e=o();if(e.agent)return e.agent.id},saveChat:function(n){const i=o();i.chat.id=n?n.id:void 0,e.set(t.TTYG,i)},getChatId:function(){const e=o();if(e.chat)return e.chat.id}}}angular.module("graphdb.framework.ttyg.services.ttygstorage",[]).factory("TTYGStorageService",n),n.$inject=["LocalStorageAdapter","LSKeys"]},207:function(e,t,n){"use strict";n.r(t),n.d(t,"AgentSettingsModal",(function(){return o}));class o{constructor(e,t,n,o){this.activeRepositoryInfo=e,this.activeRepositoryList=t,this.agentFormModel=n,this.operation=o}}},314:function(e,t,n){"use strict";n.r(t);n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(115);var o=n(88),i=(n(206),n(107)),s=n(116),a=n(111),r=n(172),c=n(93),l=n(29),d=n(549),g=n(207),u=n(0),h=n(185),m=n(122);function p(e,t,n,p,T,E,y,f,C,v,A,S,I,_,R){const b=[],N={filter_all:y.instant("ttyg.agent.btn.filter.all")};p.helpTemplateUrl="js/angular/ttyg/templates/chatInfo.html",p.isHelpVisible=!1,p.showChats=!0,p.showAgents=!1,p.chats=void 0,p.loadingChats=!1,p.loadingChat=!1,p.initialized=!1,p.agents=void 0,p.selectedAgent=void 0,p.loadingAgents=!1,p.reloadingAgents=!1,p.connectorID=void 0,p.canModifyAgent=!1,p.agentListFilterModel=[],p.activeRepositoryList=[],p.onopen=p.onclose=()=>angular.noop(),p.startNewChat=()=>{_.deselectChat()},p.toggleChatsListSidebar=()=>{p.showChats=!p.showChats},p.toggleAgentsListSidebar=()=>{p.showAgents=!p.showAgents},p.onToggleHelp=()=>{p.isHelpVisible=!p.isHelpVisible},p.onExportSelectedChat=()=>{D(_.getSelectedChat())};const M=()=>{const e=_.getDefaultAgent();return e?Promise.resolve(e):I.getDefaultAgent().then(e=>(_.setDefaultAgent(e),e))};p.onOpenNewAgentSettings=()=>{M().then(e=>{const t=Object(l.repositoryInfoMapper)(C.getActiveRepositoryObject());e.repositoryId=t.id;const n=Object(r.agentFormModelMapper)(new s.AgentModel({}),e,i.AGENT_OPERATION.CREATE);return{templateUrl:"js/angular/ttyg/templates/modal/agent-settings-modal.html",controller:"AgentSettingsModalController",windowClass:"agent-settings-modal",backdrop:"static",resolve:{dialogModel:function(){return new g.AgentSettingsModal(t,p.activeRepositoryList,n,i.AGENT_OPERATION.CREATE)}},size:"lg"}}).then(e=>{f.open(e).result.then(G)}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})},p.onOpenAgentSettings=e=>{let t=e;t||(t=_.getSelectedAgent()),M().then(e=>{const n=Object(r.agentFormModelMapper)(t,e,i.AGENT_OPERATION.EDIT),o=Object(l.repositoryInfoMapper)(C.getActiveRepositoryObject());return{templateUrl:"js/angular/ttyg/templates/modal/agent-settings-modal.html",controller:"AgentSettingsModalController",windowClass:"agent-settings-modal",backdrop:"static",resolve:{dialogModel:function(){return new g.AgentSettingsModal(o,p.activeRepositoryList,n,i.AGENT_OPERATION.EDIT)}},size:"lg"}}).then(e=>{f.open(e).result.then(e=>{const t=_.getSelectedAgent();t&&e.id===t.id&&_.selectAgent(e),G()})}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})},p.onOpenCloneAgentSettings=e=>{M().then(t=>{const n=Object(r.agentFormModelMapper)(e,t,i.AGENT_OPERATION.CLONE);n.name="clone-"+n.name;const o=Object(l.repositoryInfoMapper)(C.getActiveRepositoryObject());return{templateUrl:"js/angular/ttyg/templates/modal/agent-settings-modal.html",controller:"AgentSettingsModalController",windowClass:"agent-settings-modal",backdrop:"static",resolve:{dialogModel:function(){return new g.AgentSettingsModal(o,p.activeRepositoryList,n,i.AGENT_OPERATION.CLONE)}},size:"lg"}}).then(e=>{f.open(e).result.then(e=>{const t=_.getSelectedAgent();t&&e.id===t.id&&_.selectAgent(e),G()})}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})};const L=()=>(p.loadingChats=!0,I.getConversations().then(e=>_.updateChats(e)).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH)),F(new a.ChatsListModel)}).finally(()=>{p.loadingChats=!1})),G=()=>(p.reloadingAgents=!0,I.getAgents().then(e=>_.updateAgents(e)).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{p.reloadingAgents=!1})),O=()=>{_.setCanModifyAgent(e.isRepoManager())},w=(e,t,n)=>{if(e.timestamp=n.timestamp,t.answers=t.answers||[],t.answers.push(...n.messages),_.updateSelectedChat(e),n.continueRunId)_.emit(o.TTYGEventName.CONTINUE_CHAT_RUN,new m.ContinueChatRun(t,n.continueRunId));else{const t=_.getChats();t.updateChatTimestamp(e.id,n.timestamp),t.updateChatName(e.id,n.chatName),e.name=n.name,_.updateChats(t),_.emit(o.TTYGEventName.LAST_MESSAGE_RECEIVED,e)}},x=(e,t,n)=>{e.chatHistory.appendItem(t),w(e,t,n)},F=e=>{e.isEmpty()?p.showChats=!1:(p.showChats=!0,_.getSelectedChat()||R.getChatId()||_.selectChat(p.chats.getFirstChat()))},D=e=>{I.exportConversation(e.id).then((function({data:t,filename:n}){Object(d.saveAs)(t,n),_.emit(o.TTYGEventName.CHAT_EXPORT_SUCCESSFUL,e)})).catch(()=>{_.emit(o.TTYGEventName.CHAT_EXPORT_FAILURE),v.error(y.instant("ttyg.chat.messages.export_failure"))})},Y=()=>{const e=C.getActiveRepository(),t=C.getLocalReadableGraphdbRepositories().map(t=>new s.AgentListFilterModel(t.id,t.id,t.id===e));p.agentListFilterModel=[new s.AgentListFilterModel(i.AGENTS_FILTER_ALL_KEY,N.filter_all),...t]},k=e=>{A.openModalAlert({title:y.instant("ttyg.chat.dialog.chat_is_missing.title"),message:y.instant("ttyg.chat.dialog.chat_is_missing.body")}).result.then((function(){_.deleteChat(e)}))},U=()=>{t.open("/similarity/index/create","_blank")},$=()=>{t.open("/connectors","_blank")},H=e=>{t.open(`/sparql?query=${encodeURIComponent(e)}&execute=true`,"_blank")},j=()=>{const e=R.getChatId(),t=_.getChats();e&&t.getChat(e)&&_.selectChat(_.getChats().getChat(e))};b.push(p.$watch(p.getActiveRepositoryObject,e=>{e&&(p.activeRepositoryList=C.getLocalReadableGraphdbRepositories().map(e=>new c.SelectMenuOptionsModel({value:e.id,label:e.id,data:{repository:e}})),((e=!0)=>(p.loadingAgents=e,I.getAgents().then(e=>_.updateAgents(e)).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{p.loadingAgents=!1})))().then(()=>(p.initialized=!0,Y(),L())).then(j),O())})),b.push(_.onSelectedChatChanged(e=>{e&&e.id?I.getConversation(e.id).then(t=>{_.updateSelectedChat(t),R.saveChat(e)}).catch(t=>{t.status===h.status.NOT_FOUND&&(k(e),_.emit(o.TTYGEventName.LOAD_CHAT_FAILURE,e))}):e&&_.updateSelectedChat(e)})),b.push(_.onChatsListChanged(e=>{p.chats=e,F(e)})),b.push(_.onCanUpdateAgentUpdated(e=>{p.canModifyAgent=e})),b.push(_.subscribe(_.onAgentsListChanged(e=>{p.agents=e}))),b.push(_.subscribe(o.TTYGEventName.CREATE_CHAT,e=>{let t=_.getChats().getNonPersistedChat();t||(t=a.ChatModel.getEmptyChat(),_.addChat(t)),_.selectChat(t),I.createConversation(e).then(t=>{_.emit(o.TTYGEventName.CREATE_CHAT_SUCCESSFUL);const n=_.getSelectedChat();if(n&&!n.id){n.id=t.chatId,e.chatId=t.chatId;const o=_.getChats().getNonPersistedChat();_.replaceChat(n,o),R.saveChat(n),x(n,e,t)}}).catch(e=>{_.emit(o.TTYGEventName.CREATE_CHAT_FAILURE),v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})})),b.push(_.subscribe(o.TTYGEventName.RENAME_CHAT,e=>{I.renameConversation(e).then(()=>{_.emit(o.TTYGEventName.RENAME_CHAT_SUCCESSFUL),_.emit(o.TTYGEventName.LOAD_CHATS)}).catch(()=>{_.emit(o.TTYGEventName.RENAME_CHAT_FAILURE),v.error(y.instant("ttyg.chat.messages.rename_failure"))})})),b.push(_.subscribe(o.TTYGEventName.DELETE_CHAT,e=>{_.emit(o.TTYGEventName.DELETING_CHAT,{chatId:e.id,inProgress:!0}),I.deleteConversation(e.id).then(()=>{_.emit(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,e);const t=_.getChats();t.deleteChat(e),_.updateChats(t)}).catch(()=>{_.emit(o.TTYGEventName.DELETE_CHAT_FAILURE),v.error(y.instant("ttyg.chat.messages.delete_failure"))}).finally(()=>_.emit(o.TTYGEventName.DELETING_CHAT,{chatId:e.id,inProgress:!1}))})),b.push(_.subscribe(o.TTYGEventName.CHAT_EXPORT,D)),b.push(_.subscribe(o.TTYGEventName.ASK_QUESTION,e=>{I.askQuestion(e).then(t=>{const n=_.getSelectedChat();n&&n.id===e.chatId&&x(n,e,t)}).catch(e=>{_.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})})),b.push(_.subscribe(o.TTYGEventName.CONTINUE_CHAT_RUN,e=>{I.continueChatRun(e).then(t=>{const n=e.chatId,o=_.getSelectedChat();if(o&&o.id===n){const e=o.chatHistory.items,n=e[e.length-1];w(o,n,t)}}).catch(e=>{_.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})})),b.push(_.subscribe(o.TTYGEventName.LOAD_CHATS,L)),b.push(_.subscribe(o.TTYGEventName.OPEN_AGENT_SETTINGS,p.onOpenNewAgentSettings)),b.push(_.subscribe(o.TTYGEventName.EDIT_AGENT,p.onOpenAgentSettings)),b.push(_.subscribe(o.TTYGEventName.CLONE_AGENT,p.onOpenCloneAgentSettings)),b.push(_.subscribe(o.TTYGEventName.DELETE_AGENT,e=>{_.emit(o.TTYGEventName.DELETING_AGENT,{agentId:e.id,inProgress:!0}),I.deleteAgent(e.id).then(()=>G()).then(()=>{_.emit(o.TTYGEventName.AGENT_DELETED,e),p.selectedAgent&&p.selectedAgent.id===e.id&&(p.selectedAgent=void 0)}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{_.emit(o.TTYGEventName.DELETING_AGENT,{agentId:e.id,inProgress:!1})})})),b.push(_.subscribe(o.TTYGEventName.AGENT_SELECTED,e=>{p.selectedAgent=e})),b.push(_.subscribe(o.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,e=>{if(e.repositoryId!==C.getActiveRepository()){const t=C.getRepository(e.repositoryId);t&&A.openConfirmationModal({title:y.instant("common.confirm"),message:Object(u.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_similarity.body",{repositoryId:t.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{C.setRepository(t),U()})}else U()})),b.push(_.subscribe(o.TTYGEventName.GO_TO_CONNECTORS_VIEW,e=>{if(e.repositoryId!==C.getActiveRepository()){const t=C.getRepository(e.repositoryId);t&&A.openConfirmationModal({title:y.instant("common.confirm"),message:Object(u.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_connectors.body",{repositoryId:t.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{C.setRepository(t),$()})}else $()})),b.push(_.subscribe(o.TTYGEventName.GO_TO_SPARQL_EDITOR,e=>{if(e.repositoryId!==C.getActiveRepository()){const t=C.getRepository(e.repositoryId);t&&A.openConfirmation(y.instant("common.confirm"),Object(u.decodeHTML)(y.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:e.repositoryId})),()=>{C.setRepository(t),H(e.query)})}else H(e.query)})),b.push(n.$on("$translateChangeSuccess",()=>{N.filter_all=y.instant("ttyg.agent.btn.filter.all"),Y()})),b.push(n.$on("securityInit",O)),p.$on("$destroy",(function(){b.forEach(e=>e()),_.resetContext()}))}angular.module("graphdb.framework.ttyg.controllers.ttyg-view",["toastr","graphdb.framework.utils.localstorageadapter","graphdb.framework.core.services.ttyg-service","graphdb.framework.ttyg.services.ttygcontext","graphdb.framework.ttyg.services.ttygstorage","graphdb.framework.ttyg.directives.chat-list","graphdb.framework.ttyg.directives.chat-panel","graphdb.framework.ttyg.directives.agent-list","graphdb.framework.ttyg.directives.agent-select-menu","graphdb.framework.ttyg.directives.no-agents-view","graphdb.framework.ttyg.directives.show-tooltip-on-overflow","graphdb.framework.ttyg.controllers.agent-settings-modal"]).controller("TTYGViewCtrl",p),p.$inject=["$jwtAuth","$window","$rootScope","$scope","$http","$timeout","$translate","$uibModal","$repositories","toastr","ModalService","LocalStorageAdapter","TTYGService","TTYGContextService","TTYGStorageService"]},548:function(e,t){(function(t){e.exports=t}).call(this,{})},549:function(e,t,n){var o,i=i||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"),i=e.webkitRequestFileSystem,s=e.requestFileSystem||i||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},r=0,c=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},l=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var i=e["on"+t[o]];if("function"==typeof i)try{i.call(e,n||e)}catch(e){a(e)}}},d=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},g=function(t,a){t=d(t);var g,u,h,m=this,p=t.type,T=!1,E=function(){l(m,"writestart progress write writeend".split(" "))},y=function(){(!T&&g||(g=n().createObjectURL(t)),u)?u.location.href=g:null==e.open(g,"_blank")&&"undefined"!=typeof safari&&(e.location.href=g);m.readyState=m.DONE,E(),c(g)},f=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},C={create:!0,exclusive:!1};if(m.readyState=m.INIT,a||(a="download"),o)return g=n().createObjectURL(t),o.href=g,o.download=a,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),E(),c(g),m.readyState=m.DONE}));e.chrome&&p&&"application/octet-stream"!==p&&(h=t.slice||t.webkitSlice,t=h.call(t,0,t.size,"application/octet-stream"),T=!0),i&&"download"!==a&&(a+=".download"),("application/octet-stream"===p||i)&&(u=e),s?(r+=t.size,s(e.TEMPORARY,r,f((function(e){e.root.getDirectory("saved",C,f((function(e){var n=function(){e.getFile(a,C,f((function(e){e.createWriter(f((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),m.readyState=m.DONE,l(m,"writeend",t),c(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]=m["on"+e]})),n.write(t),m.abort=function(){n.abort(),m.readyState=m.DONE},m.readyState=m.WRITING})),y)})),y)};e.getFile(a,{create:!1},f((function(e){e.remove(),n()})),f((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=g.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(d(e),t)}:(u.abort=function(){this.readyState=this.DONE,l(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 g(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[25,30,66,80,98,143,198,201,257,258,294,302,316,317,322],{100:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",n),n.$inject=["$http"];function n(e){return{getConnectors:function(t,n){if(t)return e.get("rest/connectors",{headers:{"X-GraphDB-Repository":t,"X-GraphDB-Repository-Location":n}});return e.get("rest/connectors")},initConnector:function(t){return e.get("rest/connectors/options?prefix="+t)},hasConnector:function(t,n,o){if(n)return e.get("rest/connectors/existing?prefix="+t,{headers:{"X-GraphDB-Repository":n,"X-GraphDB-Repository-Location":o}});return e.get("rest/connectors/existing?prefix="+t)},checkConnector:function(t){return e.post("rest/connectors/check",t,{headers:{"Content-Type":"text/plain"}})}}}},104:function(e,t,n){"use strict";n.r(t),n.d(t,"ConnectorTypesListModel",(function(){return o})),n.d(t,"ConnectorTypeModel",(function(){return i})),n.d(t,"ConnectorListModel",(function(){return s})),n.d(t,"ConnectorModel",(function(){return a})),n.d(t,"ConnectorSettingsModel",(function(){return r}));class o{constructor(e={}){this._connectors=e.connectors||[]}getConnectorByName(e){return this._connectors.find(t=>t.name===e)}get connectors(){return this._connectors}set connectors(e){this._connectors=e}}class i{constructor(e){this._name=e.name,this._prefix=e.prefix}get name(){return this._name}set name(e){this._name=e}get prefix(){return this._prefix}set prefix(e){this._prefix=e}}class s{constructor(e=[]){this._connectors=e.connectors}get connectors(){return this._connectors}set connectors(e){this._connectors=e}}class a{constructor(e){this._name=e.name,this._settings=new r(e)}get settings(){return this._settings}set settings(e){this._settings=e}get name(){return this._name}set name(e){this._name=e}}class r{constructor(e){this._settings=e.values||{}}get settings(){return this._settings}set settings(e){this._settings=e}}},105:function(e,t){angular.module("graphdb.framework.rest.similarity.service",[]).factory("SimilarityRestService",n),n.$inject=["$http","$repositories"];function n(e){return{getIndexes:function(t,n){if(t)return e.get("rest/similarity",{headers:{"X-GraphDB-Repository":t,"X-GraphDB-Repository-Location":n}});return e.get("rest/similarity")},getSearchQueries:function(){return e.get("rest/similarity/config")},rebuildIndex:function(e){return t("PUT",e.name,e.options,e.selectQuery,e.searchQuery,e.analogicalQuery,e.stopList,e.infer,e.sameAs,e.type)},deleteIndex:function(t){return e.delete("rest/similarity?name="+t.name)},createIndex:t,getSamples:function(){return e.get("rest/similarity/samples")},getQuery:function(t){return e.get("rest/similarity/query",{params:{name:t.indexName,options:t.indexOptions,stopList:t.indexStopList,selectQuery:t.query,infer:t.queryInference,sameAs:t.querySameAs,type:t.viewType,analyzer:t.indexAnalyzer}})},saveSearchQuery:function(t){return e({method:"put",url:"rest/similarity/search-query",data:t})}};function t(t,n,o,i,s,a,r,c,l,d,g){return e({method:t,url:"rest/similarity",noCancelOnRouteChange:!0,data:{name:n,options:o,selectQuery:i,stopList:r,infer:c,sameAs:l,type:d,analyzer:g,searchQuery:s,analogicalQuery:a}})}}},106:function(e,t,n){"use strict";n.r(t);n(100);var o=n(112),i=n(93);function s(e){const t=(t,n)=>e.getConnectors(t,n).then(e=>Object(o.connectorTypesListMapper)(e.data)),n=(t,n,i)=>e.hasConnector(encodeURIComponent(t),n,i).then(e=>Object(o.connectorsMapper)(e.data));return{getConnectorTypes:t,getConnectorsByType:n,getConnectorPrefixByName:(e,n,o)=>t(n,o).then(t=>{const n=t.getConnectorByName(e);return n?n.prefix:null}),getConnectorsByTypeAsSelectMenuOptions:(e,t,o)=>n(e,t,o).then(e=>e.connectors.map(e=>new i.SelectMenuOptionsModel({value:e.name,label:e.name})))}}angular.module("graphdb.framework.core.services.connectors",["graphdb.framework.rest.connectors.service"]).factory("ConnectorsService",s),s.$inject=["ConnectorsRestService"]},107:function(e,t,n){"use strict";n.r(t);n(105);var o=n(99),i=n(93);function s(e){const t=(t,n)=>e.getIndexes(t,n).then(e=>Object(o.mapIndexesResponseToSimilarityIndex)(e.data));return{getIndexes:t,getIndexesAsMenuModel:(e,n)=>t(e,n).then(e=>e.map(e=>new i.SelectMenuOptionsModel({label:e.name,value:e.name})))}}angular.module("graphdb.framework.core.services.similarity",["graphdb.framework.rest.similarity.service"]).factory("SimilarityService",s),s.$inject=["SimilarityRestService"]},112:function(e,t,n){"use strict";n.r(t),n.d(t,"connectorTypesListMapper",(function(){return i})),n.d(t,"connectorsMapper",(function(){return s}));var o=n(104);const i=e=>{const t=new o.ConnectorTypesListModel;return e?(t.connectors=Object.keys(e).map(t=>new o.ConnectorTypeModel({name:t,prefix:e[t]})),t):t},s=e=>{const t=new o.ConnectorListModel;return e?(t.connectors=e.map(e=>new o.ConnectorModel(e)),t):t}},138:function(e,t){function n(e){return{restrict:"E",scope:{fieldName:"@",source:"=",onSave:"&",onCancel:"&",onClick:"&",onDblclick:"&",isEditing:"="},templateUrl:"js/angular/core/directives/inline-editable-text/templates/inline-editable-text.template.html",link:function(t,n){t.editableModel={};const o=[];let i;t.onKeydown=e=>{"Enter"===e.key?(a(),t.editableModel.text!==t.text&&t.onSave({newText:t.editableModel.text,source:t.source})):"Escape"===e.key&&s()},t.onCancelEditing=()=>{s()},t.onSelect=()=>{i?(a(),t.onDblclick({source:t.source})):i=e((function(){t.onClick({source:t.source}),a()}),250)};const s=()=>{a(),t.onCancel()},a=()=>{e.cancel(i),i=void 0};o.push(t.$watch("isEditing",o=>{o&&(t.editableModel.text=t.source[t.fieldName],e(()=>{const e=n.find("input")[0];e.focus(),e.select()},0))}));t.$on("$destroy",()=>{o.forEach(e=>e()),a()})}}}angular.module("graphdb.framework.core.directives.inline-editable-text",[]).directive("inlineEditableText",n),n.$inject=["$timeout"]},148:function(e,t,n){"use strict";n.r(t);n(107),n(106),n(117),n(21);function o(e,t,n,o,i){e.agentInstructionsExplain=i.agentInstructionsExplain,e.close=()=>{t.dismiss({})},e.onCloseAgentInstructionsExplainModal=()=>{t.dismiss({})};const s=[];e.$on("$destroy",()=>{s.forEach(e=>e())})}angular.module("graphdb.framework.ttyg.controllers.agent-instructions-explain-modal",[]).controller("AgentInstructionsExplainModalController",o),o.$inject=["$scope","$uibModalInstance","ModalService","$translate","dialogModel"]},185:function(e,t,n){"use strict";n.r(t),n.d(t,"status",(function(){return o}));const o={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,CONFLICT:409,INTERNAL_SERVER_ERROR:500,SERVICE_UNAVAILABLE:503}},199:function(e,t,n){"use strict";n.r(t);n(138);var o=n(88),i=n(147),s=n(0);function a(e,t,n,a){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-list.html",link:r=>{r.selectedChat=void 0,r.renamedChat=void 0,r.deletingChat=void 0,r.onSelectChatForRenaming=e=>{r.renamedChat=e},r.onSelectChat=t=>{if(!r.selectedChat||r.selectedChat.id!==t.id){const n=e.getChats().getNonPersistedChat();n&&e.deleteChat(n),e.selectChat(t),r.renamedChat=void 0}},r.onDeleteChat=i=>{const a=n.instant("ttyg.dialog.delete.title"),r=Object(s.decodeHTML)(n.instant("ttyg.dialog.delete.body",{chatName:i.name}));t.openConfirmation(a,r,()=>e.emit(o.TTYGEventName.DELETE_CHAT,i))},r.onRenameChat=(t,n)=>{n.name=t,r.renamedChat=void 0,e.emit(o.TTYGEventName.RENAME_CHAT,n)},r.onExportChat=t=>{e.emit(o.TTYGEventName.CHAT_EXPORT,t)},r.onCancelChatRenaming=()=>{r.renamedChat=void 0},r.getHumanReadableChatGroupTimestamp=e=>Object(i.getHumanReadableTimestamp)(n,a,e);const c=e=>{r.selectedChat=e},l=[];l.push(e.onSelectedChatChanged(c)),l.push(e.onSelectedChatUpdated(c)),l.push(e.onChatsListChanged(e=>{r.chatList=e})),l.push(e.subscribe(o.TTYGEventName.DELETING_CHAT,e=>{r.deletingChat=e})),r.$on("$destroy",()=>{l.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.chat-list",["graphdb.framework.core.directives.inline-editable-text"]).directive("chatList",a),a.$inject=["TTYGContextService","ModalService","$translate","$filter"]},200:function(e,t,n){"use strict";n.r(t);n(210);var o=n(88),i=n(89),s=n(96),a=n(18),r=n(0),c=n(113);function l(e,t,n){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-panel.html",link:(e,l,d)=>{e.chat=void 0,e.selectedAgent=void 0,e.chatItem=void 0,e.askingChatItem=void 0,e.waitingForLastMessage=!1,e.loadingChat=!0,e.ask=()=>{e.chatItem.question.timestamp=Date.now(),e.askingChatItem=Object(a.cloneDeep)(e.chatItem),e.chatItem.chatId?u(e.chatItem):g(),e.chatItem=m(),T(),p()},e.regenerateQuestion=t=>{const n=m();n.setQuestionMessage(t.getQuestionMessage()),n.question.timestamp=Date.now(),e.askingChatItem=n,u(n),T()},e.onKeypressOnInput=t=>{"Enter"!==t.key||t.shiftKey||t.ctrlKey||e.ask()},e.onAskHowDeliveredAnswer=()=>{const n=m();n.setQuestionMessage(t.instant("ttyg.chat_panel.btn.derive_answer.label")),n.question.timestamp=Date.now(),e.askingChatItem=Object(a.cloneDeep)(n),u(n),T()},e.getAgentName=e=>{const o=n.getAgent(e);return o?o.name:Object(r.decodeHTML)(t.instant("ttyg.chat_panel.deleted_agent"))};const g=()=>{e.waitingForLastMessage=!0,n.emit(o.TTYGEventName.CREATE_CHAT,e.chatItem)},u=t=>{e.waitingForLastMessage=!0,n.emit(o.TTYGEventName.ASK_QUESTION,t)},h=()=>{e.chatItem=Object(a.cloneDeep)(e.askingChatItem),e.askingChatItem=void 0,e.waitingForLastMessage=!1},m=()=>{const t=new s.ChatItemModel;return t.question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER}),e.chat&&(t.chatId=e.chat.id),e.selectedAgent&&(t.agentId=e.selectedAgent.id),t},p=()=>{const e=l.find(".question-input");e.length&&e[0].focus()},T=()=>{setTimeout(()=>{const e=l.find(".chat-details")[0];e&&(e.scrollTop=e.scrollHeight)})},E=()=>{e.chat=c.ChatModel.getEmptyChat(),e.loadingChat=!1,e.chatItem=m(),e.askingChatItem=void 0,e.waitingForLastMessage=!1,p()},y=[];y.push(e.$watchCollection("chat.chatHistory.items",T)),y.push(n.onSelectedChatUpdated(t=>{if(e.chat=t,t&&(t.id||!e.askingChatItem)){if(e.loadingChat=!1,e.chatItem=m(),e.askingChatItem=void 0,e.chat){const t=e.chat.chatHistory.getLast();t&&t.agentId&&n.selectAgent(n.getAgent(t.agentId))}p()}})),y.push(n.onLastMessageReceived(()=>{e.waitingForLastMessage=!1})),y.push(n.onSelectedAgentChanged(t=>{e.selectedAgent=t,e.selectedAgent&&e.chatItem&&(e.chatItem.agentId=e.selectedAgent.id)})),y.push(n.onSelectedChatChanged(t=>{t?(e.loadingChat=t&&t.id,e.chatItem=m(),p()):E()})),y.push(n.subscribe(o.TTYGEventName.LOAD_CHAT_FAILURE,()=>{e.loadingChat=!1,e.chatItem=m(),p()})),y.push(n.subscribe(o.TTYGEventName.ASK_QUESTION_FAILURE,h)),y.push(n.subscribe(o.TTYGEventName.CREATE_CHAT_FAILURE,h)),y.push(n.subscribe(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,t=>{e.chat&&t.id===e.chat.id&&E()})),e.$on("$destroy",()=>{y.forEach(e=>e())}),e.chat=c.ChatModel.getEmptyChat(),e.chatItem=m(),p()}}}angular.module("graphdb.framework.ttyg.directives.chat-panel",["graphdb.framework.ttyg.directives.chat-item-detail"]).directive("chatPanel",l),l.$inject=["toastr","$translate","TTYGContextService"]},201:function(e,t,n){"use strict";n.r(t);var o=n(0),i=n(88);function s(e,t,n){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-list.html",scope:{agentList:"=",agentListFilterModel:"="},link:(s,a,r)=>{s.selectedAgent=void 0,s.selectedAgentsFilter=void 0,s.deletingAgent=void 0,s.onEditAgent=t=>{e.emit(i.TTYGEventName.EDIT_AGENT,t)},s.onCloneAgent=t=>{e.emit(i.TTYGEventName.CLONE_AGENT,t)},s.onDeleteAgent=s=>{const a=n.instant("ttyg.agent.delete_agent_modal.title"),r=Object(o.decodeHTML)(n.instant("ttyg.agent.delete_agent_modal.body",{agentName:s.name}));t.openConfirmation(a,r,()=>e.emit(i.TTYGEventName.DELETE_AGENT,s))},s.onAgentsFilterChange=e=>{s.selectedAgentsFilter=e,s.selectedAgentsFilter&&s.agentList.filterByRepository(s.selectedAgentsFilter.key)};const c=()=>{const e=s.agentListFilterModel.find(e=>e.selected);s.selectedAgentsFilter=e||s.agentListFilterModel[0],s.onAgentsFilterChange(s.selectedAgentsFilter)},l=[];l.push(s.$watch("agentListFilterModel",c)),l.push(e.subscribe(i.TTYGEventName.DELETING_AGENT,e=>{s.deletingAgent=e})),l.push(e.onSelectedAgentChanged(e=>{s.selectedAgent=e})),s.$on("$destroy",()=>{l.forEach(e=>e())}),c()}}}angular.module("graphdb.framework.ttyg.directives.agent-list",[]).directive("agentList",s),s.$inject=["TTYGContextService","ModalService","$translate"]},202:function(e,t,n){"use strict";n.r(t);var o=n(93),i=n(88);function s(e,t,n,s){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:n=>{n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=o=>{if(a(o),n.selectedAgent=o,e.selectAgent(o),o.isRepositoryDeleted){const n=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),a=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");s.openConfirmation(n,a,()=>e.emit(i.TTYGEventName.EDIT_AGENT,o))}};const a=e=>{n.agentOptionsList.forEach(t=>{t.selected=t.data.agent===e})},r=e=>{n.agentOptionsList=e.agents.map(e=>new o.SelectMenuOptionsModel({value:e.id,label:e.name,data:{agent:e}}))},c=[];c.push(e.onAgentsListChanged(e=>{r(e)})),c.push(e.subscribe(i.TTYGEventName.AGENT_DELETED,t=>{n.selectedAgent&&n.selectedAgent.id===t.id&&(n.selectedAgent.isDeleted=!0,e.selectAgent(n.selectedAgent))})),c.push(e.onSelectedAgentChanged(e=>{a(e),n.selectedAgent=e})),n.$on("$destroy",()=>{c.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",s),s.$inject=["TTYGContextService","$translate","$sce","ModalService"]},203:function(e,t,n){"use strict";n.r(t);var o=n(88),i=n(14);function s(e,t){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/no-agents-view.html",scope:{},link:n=>{n.canModifyAgent=!1,n.talkToGraphDocumentationLink=i.DocumentationUrlResolver.getDocumentationUrl(t.productShortVersion,"talk-to-graph.html"),n.onCreateAgent=()=>{e.emit(o.TTYGEventName.OPEN_AGENT_SETTINGS)};const s=[];s.push(e.onCanUpdateAgentUpdated(e=>{n.canModifyAgent=e})),n.$on("$destroy",()=>{s.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.no-agents-view",[]).directive("noAgentsView",s),s.$inject=["TTYGContextService","productInfo"]},204:function(e,t){angular.module("graphdb.framework.ttyg.directives.show-tooltip-on-overflow",[]).directive("showTooltipOnOverflow",(function(){return{link:function(e,t){setTimeout((function(){const n=t[0].querySelector(".editable-text-element");n&&(n.scrollWidth>n.clientWidth?t.attr("title",e.chat.name):t.removeAttr("title"))}),0)}}}))},205:function(e,t,n){"use strict";n.r(t);var o=n(0),i=n(118),s=(n(107),n(106),n(117),n(21),n(148),n(10)),a=n(88),r=n(108);function c(e,t,n,c,l,d,g,u,h,m,p,T,E,y){e.AGENT_OPERATION=r.AGENT_OPERATION,e.operation=T.operation,e.savingAgent=!1,e.agentFormModel=T.agentFormModel,e.activeRepositoryInfo=T.activeRepositoryInfo,e.extractionMethodLoaderFlags={[i.ExtractionMethod.SIMILARITY]:!1},e.activeRepositoryList=T.activeRepositoryList,e.extractionMethods=i.ExtractionMethod,e.showAdvancedSettings=!1,e.showHighTemperatureWarning=!1,e.showSystemInstructionWarning=!1,e.similarityIndexes=[],e.retrievalConnectors=[],e.ftsEnabled=!1,e.toggleExtractionMethod=t=>{t.expanded=t.selected,e.agentSettingsForm.extractionMethods.$setTouched(),I(),L[t.method](t)},e.onExtractionMethodPanelToggle=e=>{e.toggleCollapse(),L[e.method](e)},e.getModelHelpMessage=()=>{const e=Object(o.decodeHTML)(p.instant("ttyg.agent.create_agent_modal.form.model.hint"));return u.trustAsHtml(e)},e.getFTSDisabledHelpMessage=()=>{const t=Object(o.decodeHTML)(p.instant("ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message",{repositoryEditPage:"#/repository/edit/"+e.agentFormModel.repositoryId}));return u.trustAsHtml(t)},e.goToCreateSimilarityView=()=>{E.emit(a.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.goToConnectorsView=()=>{E.emit(a.TTYGEventName.GO_TO_CONNECTORS_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.ok=()=>{const t=e.agentFormModel.toPayload();return f[e.operation](t)},e.cancel=()=>{t.dismiss({})},e.close=()=>{t.dismiss({})},e.updateSimilaritySearchPanel=(t=!1)=>{const n=e.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();n.selected&&(t&&(n.similarityIndex=null),R(n))},e.updateRetrievalConnectorPanel=(t=!1)=>{const n=e.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();n.selected&&(t&&(n.retrievalConnectorInstance=null),N(n))},e.checkIfFTSEnabled=()=>{if(!e.agentFormModel.repositoryId)return void e.agentSettingsForm.$setValidity("FTSDisabled",!1);e.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod().selected?(e.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!0,g.getRepositoryModel({id:e.agentFormModel.repositoryId}).then(t=>{e.ftsEnabled=t.getParamValue(s.REPOSITORY_PARAMS.enableFtsIndex)}).catch(e=>{S(e,"ttyg.agent.messages.error_repository_config_loading")}).finally(()=>{e.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!1,e.agentSettingsForm.$setValidity("FTSDisabled",e.ftsEnabled)})):e.agentSettingsForm.$setValidity("FTSDisabled",!0)},e.onRepositoryChange=()=>{G(!0,!0)},e.onRestoreDefaultSystemInstructions=()=>{e.agentFormModel.instructions.systemInstruction=e.agentFormModel.instructions.systemInstructionCopy},e.onRestoreDefaultUserInstructions=()=>{e.agentFormModel.instructions.userInstruction=e.agentFormModel.instructions.userInstructionCopy},e.onTemperatureChange=()=>{e.showHighTemperatureWarning=e.agentFormModel.temperature.value>1},e.onSystemInstructionChange=()=>{""===e.agentFormModel.instructions.systemInstruction||e.showSystemInstructionWarning||(e.showSystemInstructionWarning=!0,n.openModalAlert({title:p.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title"),message:p.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body")}).result.then((function(){}))),""===e.agentFormModel.instructions.systemInstruction&&(e.showSystemInstructionWarning=!1)},e.onExplainAgentSettings=()=>{const t=e.agentFormModel.toPayload();y.explainAgentSettings(t).then(e=>{const t={templateUrl:"js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html",controller:"AgentInstructionsExplainModalController",windowClass:"agent-instructions-explain-modal",backdrop:"static",resolve:{dialogModel:function(){return{agentInstructionsExplain:e}}},size:"lg"};c.open(t).result.then(()=>{})}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))})};const f={[r.AGENT_OPERATION.CREATE]:e=>C(e),[r.AGENT_OPERATION.EDIT]:e=>v(e),[r.AGENT_OPERATION.CLONE]:e=>A(e)},C=n=>(e.savingAgent=!0,y.createAgent(n).then(e=>{t.close(e),h.success(p.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{e.savingAgent=!1})),v=n=>(e.savingAgent=!0,y.editAgent(n).then(e=>{t.close(e),h.success(p.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{e.savingAgent=!1})),A=n=>(e.savingAgent=!0,y.createAgent(n).then(e=>{t.close(e),h.success(p.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{h.error(getError(e,0,r.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{e.savingAgent=!1})),S=(e,t)=>{console.error(e),h.error(p.instant(t))},I=()=>{e.agentSettingsForm.extractionMethods.$setValidity("required",e.agentFormModel.hasExtractionMethodSelected())},_=()=>{const t=e.activeRepositoryList.find(t=>t.value===e.agentFormModel.repositoryId);return{repositoryId:t?t.data.repository.id:void 0,repositoryLocation:t?t.data.repository.location:void 0}},R=t=>{if(t.selected||e.agentSettingsForm.$setValidity("missingIndex",!0),t.expanded){e.extractionMethodLoaderFlags[t.method]=!0;const n=_();l.getIndexesAsMenuModel(n.repositoryId,n.repositoryLocation).then(n=>{e.similarityIndexes=n,e.agentSettingsForm.$setValidity("missingIndex",!t.selected||!(!n||!n.length)),b(e.similarityIndexes,t)}).catch(t=>{e.agentSettingsForm.$setValidity("missingIndex",!1),S(t,"ttyg.agent.messages.error_similarity_indexes_loading")}).finally(()=>{e.extractionMethodLoaderFlags[t.method]=!1})}},b=(e,t)=>{if(0===e.length)return void(t.similarityIndex=null);const n=e.find(e=>e.value===t.similarityIndex);t.similarityIndex=n?n.value:e[0].value},N=t=>{if(t.selected||e.agentSettingsForm.$setValidity("missingConnector",!0),t.expanded){e.extractionMethodLoaderFlags[t.method]=!0;const n=_();d.getConnectorPrefixByName("ChatGPT Retrieval",n.repositoryId,n.repositoryLocation).then(e=>d.getConnectorsByTypeAsSelectMenuOptions(e,n.repositoryId,n.repositoryLocation)).then(n=>{e.retrievalConnectors=n,e.agentSettingsForm.$setValidity("missingConnector",!t.selected||!(!n||!n.length)),M(e.retrievalConnectors,t)}).catch(t=>{e.agentSettingsForm.$setValidity("missingConnector",!1),S(t,"ttyg.agent.messages.error_retrieval_connectors_loading")}).finally(()=>{e.extractionMethodLoaderFlags[t.method]=!1})}},M=(e,t)=>{if(0===e.length)return void(t.retrievalConnectorInstance=null);const n=e.find(e=>e.value===t.retrievalConnectorInstance);t.retrievalConnectorInstance=n?n.value:e[0].value},L={[i.ExtractionMethod.FTS_SEARCH]:t=>{e.checkIfFTSEnabled()},[i.ExtractionMethod.SPARQL]:e=>{},[i.ExtractionMethod.SIMILARITY]:e=>R(e),[i.ExtractionMethod.RETRIEVAL]:e=>N(e)},G=(t=!1,n=!1)=>{e.checkIfFTSEnabled(),e.updateSimilaritySearchPanel(t),e.updateRetrievalConnectorPanel(n)},O=()=>{document.hidden||G()};document.addEventListener("visibilitychange",O),e.$on("$destroy",()=>{document.removeEventListener("visibilitychange",O)});setTimeout(I,0)}angular.module("graphdb.framework.ttyg.controllers.agent-settings-modal",["graphdb.framework.core.services.similarity","graphdb.framework.core.services.connectors","graphdb.framework.rest.repositories.service","graphdb.framework.ttyg.controllers.agent-instructions-explain-modal"]).controller("AgentSettingsModalController",c),c.$inject=["$scope","$uibModalInstance","ModalService","$uibModal","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","toastr","UriUtils","$translate","dialogModel","TTYGContextService","TTYGService"]},206:function(e,t){function n(e,t){const n={agent:{id:void 0},chat:{id:void 0}},o=()=>{let o=e.get(t.TTYG);return o||(o=n),o.agent||(o.agent={}),o.chat||(o.chat={}),o};return{saveAgent:function(n){const i=o();i.agent.id=n?n.id:void 0,e.set(t.TTYG,i)},getAgentId:function(){const e=o();if(e.agent)return e.agent.id},saveChat:function(n){const i=o();i.chat.id=n?n.id:void 0,e.set(t.TTYG,i)},getChatId:function(){const e=o();if(e.chat)return e.chat.id}}}angular.module("graphdb.framework.ttyg.services.ttygstorage",[]).factory("TTYGStorageService",n),n.$inject=["LocalStorageAdapter","LSKeys"]},207:function(e,t,n){"use strict";n.r(t),n.d(t,"AgentSettingsModal",(function(){return o}));class o{constructor(e,t,n,o){this.activeRepositoryInfo=e,this.activeRepositoryList=t,this.agentFormModel=n,this.operation=o}}},314:function(e,t,n){"use strict";n.r(t);n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(117);var o=n(88),i=(n(206),n(108)),s=n(118),a=n(113),r=n(172),c=n(93),l=n(29),d=n(549),g=n(207),u=n(0),h=n(185),m=n(123);function p(e,t,n,p,T,E,y,f,C,v,A,S,I,_,R){const b=[],N={filter_all:y.instant("ttyg.agent.btn.filter.all")};p.helpTemplateUrl="js/angular/ttyg/templates/chatInfo.html",p.isHelpVisible=!1,p.showChats=!0,p.showAgents=!1,p.chats=void 0,p.loadingChats=!1,p.loadingChat=!1,p.initialized=!1,p.agents=void 0,p.selectedAgent=void 0,p.loadingAgents=!1,p.reloadingAgents=!1,p.connectorID=void 0,p.canModifyAgent=!1,p.agentListFilterModel=[],p.activeRepositoryList=[],p.onopen=p.onclose=()=>angular.noop(),p.startNewChat=()=>{_.deselectChat()},p.toggleChatsListSidebar=()=>{p.showChats=!p.showChats},p.toggleAgentsListSidebar=()=>{p.showAgents=!p.showAgents},p.onToggleHelp=()=>{p.isHelpVisible=!p.isHelpVisible},p.onExportSelectedChat=()=>{D(_.getSelectedChat())};const M=()=>{const e=_.getDefaultAgent();return e?Promise.resolve(e):I.getDefaultAgent().then(e=>(_.setDefaultAgent(e),e))};p.onOpenNewAgentSettings=()=>{M().then(e=>{const t=Object(l.repositoryInfoMapper)(C.getActiveRepositoryObject());e.repositoryId=t.id;const n=Object(r.agentFormModelMapper)(new s.AgentModel({}),e,i.AGENT_OPERATION.CREATE);return{templateUrl:"js/angular/ttyg/templates/modal/agent-settings-modal.html",controller:"AgentSettingsModalController",windowClass:"agent-settings-modal",backdrop:"static",resolve:{dialogModel:function(){return new g.AgentSettingsModal(t,p.activeRepositoryList,n,i.AGENT_OPERATION.CREATE)}},size:"lg"}}).then(e=>{f.open(e).result.then(G)}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})},p.onOpenAgentSettings=e=>{let t=e;t||(t=_.getSelectedAgent()),M().then(e=>{const n=Object(r.agentFormModelMapper)(t,e,i.AGENT_OPERATION.EDIT),o=Object(l.repositoryInfoMapper)(C.getActiveRepositoryObject());return{templateUrl:"js/angular/ttyg/templates/modal/agent-settings-modal.html",controller:"AgentSettingsModalController",windowClass:"agent-settings-modal",backdrop:"static",resolve:{dialogModel:function(){return new g.AgentSettingsModal(o,p.activeRepositoryList,n,i.AGENT_OPERATION.EDIT)}},size:"lg"}}).then(e=>{f.open(e).result.then(e=>{const t=_.getSelectedAgent();t&&e.id===t.id&&_.selectAgent(e),G()})}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})},p.onOpenCloneAgentSettings=e=>{M().then(t=>{const n=Object(r.agentFormModelMapper)(e,t,i.AGENT_OPERATION.CLONE);n.name="clone-"+n.name;const o=Object(l.repositoryInfoMapper)(C.getActiveRepositoryObject());return{templateUrl:"js/angular/ttyg/templates/modal/agent-settings-modal.html",controller:"AgentSettingsModalController",windowClass:"agent-settings-modal",backdrop:"static",resolve:{dialogModel:function(){return new g.AgentSettingsModal(o,p.activeRepositoryList,n,i.AGENT_OPERATION.CLONE)}},size:"lg"}}).then(e=>{f.open(e).result.then(e=>{const t=_.getSelectedAgent();t&&e.id===t.id&&_.selectAgent(e),G()})}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})};const L=()=>(p.loadingChats=!0,I.getConversations().then(e=>_.updateChats(e)).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH)),F(new a.ChatsListModel)}).finally(()=>{p.loadingChats=!1})),G=()=>(p.reloadingAgents=!0,I.getAgents().then(e=>_.updateAgents(e)).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{p.reloadingAgents=!1})),O=()=>{_.setCanModifyAgent(e.isRepoManager())},w=(e,t,n)=>{if(e.timestamp=n.timestamp,t.answers=t.answers||[],t.answers.push(...n.messages),_.updateSelectedChat(e),n.continueRunId)_.emit(o.TTYGEventName.CONTINUE_CHAT_RUN,new m.ContinueChatRun(t,n.continueRunId));else{const t=_.getChats();t.updateChatTimestamp(e.id,n.timestamp),t.updateChatName(e.id,n.chatName),e.name=n.name,_.updateChats(t),_.emit(o.TTYGEventName.LAST_MESSAGE_RECEIVED,e)}},x=(e,t,n)=>{e.chatHistory.appendItem(t),w(e,t,n)},F=e=>{e.isEmpty()?p.showChats=!1:(p.showChats=!0,_.getSelectedChat()||R.getChatId()||_.selectChat(p.chats.getFirstChat()))},D=e=>{I.exportConversation(e.id).then((function({data:t,filename:n}){Object(d.saveAs)(t,n),_.emit(o.TTYGEventName.CHAT_EXPORT_SUCCESSFUL,e)})).catch(()=>{_.emit(o.TTYGEventName.CHAT_EXPORT_FAILURE),v.error(y.instant("ttyg.chat.messages.export_failure"))})},Y=()=>{const e=C.getActiveRepository(),t=C.getLocalReadableGraphdbRepositories().map(t=>new s.AgentListFilterModel(t.id,t.id,t.id===e));p.agentListFilterModel=[new s.AgentListFilterModel(i.AGENTS_FILTER_ALL_KEY,N.filter_all),...t]},k=e=>{A.openModalAlert({title:y.instant("ttyg.chat.dialog.chat_is_missing.title"),message:y.instant("ttyg.chat.dialog.chat_is_missing.body")}).result.then((function(){_.deleteChat(e)}))},U=()=>{t.open("similarity/index/create","_blank")},$=()=>{t.open("connectors","_blank")},H=e=>{t.open(`/sparql?query=${encodeURIComponent(e)}&execute=true`,"_blank")},j=()=>{const e=R.getChatId(),t=_.getChats();e&&t.getChat(e)&&_.selectChat(_.getChats().getChat(e))};b.push(p.$watch(p.getActiveRepositoryObject,e=>{e&&(p.activeRepositoryList=C.getLocalReadableGraphdbRepositories().map(e=>new c.SelectMenuOptionsModel({value:e.id,label:e.id,data:{repository:e}})),((e=!0)=>(p.loadingAgents=e,I.getAgents().then(e=>_.updateAgents(e)).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{p.loadingAgents=!1})))().then(()=>(p.initialized=!0,Y(),L())).then(j),O())})),b.push(_.onSelectedChatChanged(e=>{e&&e.id?I.getConversation(e.id).then(t=>{_.updateSelectedChat(t),R.saveChat(e)}).catch(t=>{t.status===h.status.NOT_FOUND&&(k(e),_.emit(o.TTYGEventName.LOAD_CHAT_FAILURE,e))}):e&&_.updateSelectedChat(e)})),b.push(_.onChatsListChanged(e=>{p.chats=e,F(e)})),b.push(_.onCanUpdateAgentUpdated(e=>{p.canModifyAgent=e})),b.push(_.subscribe(_.onAgentsListChanged(e=>{p.agents=e}))),b.push(_.subscribe(o.TTYGEventName.CREATE_CHAT,e=>{let t=_.getChats().getNonPersistedChat();t||(t=a.ChatModel.getEmptyChat(),_.addChat(t)),_.selectChat(t),I.createConversation(e).then(t=>{_.emit(o.TTYGEventName.CREATE_CHAT_SUCCESSFUL);const n=_.getSelectedChat();if(n&&!n.id){n.id=t.chatId,e.chatId=t.chatId;const o=_.getChats().getNonPersistedChat();_.replaceChat(n,o),R.saveChat(n),x(n,e,t)}}).catch(e=>{_.emit(o.TTYGEventName.CREATE_CHAT_FAILURE),v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})})),b.push(_.subscribe(o.TTYGEventName.RENAME_CHAT,e=>{I.renameConversation(e).then(()=>{_.emit(o.TTYGEventName.RENAME_CHAT_SUCCESSFUL),_.emit(o.TTYGEventName.LOAD_CHATS)}).catch(()=>{_.emit(o.TTYGEventName.RENAME_CHAT_FAILURE),v.error(y.instant("ttyg.chat.messages.rename_failure"))})})),b.push(_.subscribe(o.TTYGEventName.DELETE_CHAT,e=>{_.emit(o.TTYGEventName.DELETING_CHAT,{chatId:e.id,inProgress:!0}),I.deleteConversation(e.id).then(()=>{_.emit(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,e);const t=_.getChats();t.deleteChat(e),_.updateChats(t)}).catch(()=>{_.emit(o.TTYGEventName.DELETE_CHAT_FAILURE),v.error(y.instant("ttyg.chat.messages.delete_failure"))}).finally(()=>_.emit(o.TTYGEventName.DELETING_CHAT,{chatId:e.id,inProgress:!1}))})),b.push(_.subscribe(o.TTYGEventName.CHAT_EXPORT,D)),b.push(_.subscribe(o.TTYGEventName.ASK_QUESTION,e=>{I.askQuestion(e).then(t=>{const n=_.getSelectedChat();n&&n.id===e.chatId&&x(n,e,t)}).catch(e=>{_.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})})),b.push(_.subscribe(o.TTYGEventName.CONTINUE_CHAT_RUN,e=>{I.continueChatRun(e).then(t=>{const n=e.chatId,o=_.getSelectedChat();if(o&&o.id===n){const e=o.chatHistory.items,n=e[e.length-1];w(o,n,t)}}).catch(e=>{_.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))})})),b.push(_.subscribe(o.TTYGEventName.LOAD_CHATS,L)),b.push(_.subscribe(o.TTYGEventName.OPEN_AGENT_SETTINGS,p.onOpenNewAgentSettings)),b.push(_.subscribe(o.TTYGEventName.EDIT_AGENT,p.onOpenAgentSettings)),b.push(_.subscribe(o.TTYGEventName.CLONE_AGENT,p.onOpenCloneAgentSettings)),b.push(_.subscribe(o.TTYGEventName.DELETE_AGENT,e=>{_.emit(o.TTYGEventName.DELETING_AGENT,{agentId:e.id,inProgress:!0}),I.deleteAgent(e.id).then(()=>G()).then(()=>{_.emit(o.TTYGEventName.AGENT_DELETED,e),p.selectedAgent&&p.selectedAgent.id===e.id&&(p.selectedAgent=void 0)}).catch(e=>{v.error(getError(e,0,i.TTYG_ERROR_MSG_LENGTH))}).finally(()=>{_.emit(o.TTYGEventName.DELETING_AGENT,{agentId:e.id,inProgress:!1})})})),b.push(_.subscribe(o.TTYGEventName.AGENT_SELECTED,e=>{p.selectedAgent=e})),b.push(_.subscribe(o.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,e=>{if(e.repositoryId!==C.getActiveRepository()){const t=C.getRepository(e.repositoryId);t&&A.openConfirmationModal({title:y.instant("common.confirm"),message:Object(u.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_similarity.body",{repositoryId:t.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{C.setRepository(t),U()})}else U()})),b.push(_.subscribe(o.TTYGEventName.GO_TO_CONNECTORS_VIEW,e=>{if(e.repositoryId!==C.getActiveRepository()){const t=C.getRepository(e.repositoryId);t&&A.openConfirmationModal({title:y.instant("common.confirm"),message:Object(u.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_connectors.body",{repositoryId:t.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{C.setRepository(t),$()})}else $()})),b.push(_.subscribe(o.TTYGEventName.GO_TO_SPARQL_EDITOR,e=>{if(e.repositoryId!==C.getActiveRepository()){const t=C.getRepository(e.repositoryId);t&&A.openConfirmation(y.instant("common.confirm"),Object(u.decodeHTML)(y.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:e.repositoryId})),()=>{C.setRepository(t),H(e.query)})}else H(e.query)})),b.push(n.$on("$translateChangeSuccess",()=>{N.filter_all=y.instant("ttyg.agent.btn.filter.all"),Y()})),b.push(n.$on("securityInit",O)),p.$on("$destroy",(function(){b.forEach(e=>e()),_.resetContext()}))}angular.module("graphdb.framework.ttyg.controllers.ttyg-view",["toastr","graphdb.framework.utils.localstorageadapter","graphdb.framework.core.services.ttyg-service","graphdb.framework.ttyg.services.ttygcontext","graphdb.framework.ttyg.services.ttygstorage","graphdb.framework.ttyg.directives.chat-list","graphdb.framework.ttyg.directives.chat-panel","graphdb.framework.ttyg.directives.agent-list","graphdb.framework.ttyg.directives.agent-select-menu","graphdb.framework.ttyg.directives.no-agents-view","graphdb.framework.ttyg.directives.show-tooltip-on-overflow","graphdb.framework.ttyg.controllers.agent-settings-modal"]).controller("TTYGViewCtrl",p),p.$inject=["$jwtAuth","$window","$rootScope","$scope","$http","$timeout","$translate","$uibModal","$repositories","toastr","ModalService","LocalStorageAdapter","TTYGService","TTYGContextService","TTYGStorageService"]},548:function(e,t){(function(t){e.exports=t}).call(this,{})},549:function(e,t,n){var o,i=i||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"),i=e.webkitRequestFileSystem,s=e.requestFileSystem||i||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},r=0,c=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},l=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var i=e["on"+t[o]];if("function"==typeof i)try{i.call(e,n||e)}catch(e){a(e)}}},d=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},g=function(t,a){t=d(t);var g,u,h,m=this,p=t.type,T=!1,E=function(){l(m,"writestart progress write writeend".split(" "))},y=function(){(!T&&g||(g=n().createObjectURL(t)),u)?u.location.href=g:null==e.open(g,"_blank")&&"undefined"!=typeof safari&&(e.location.href=g);m.readyState=m.DONE,E(),c(g)},f=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},C={create:!0,exclusive:!1};if(m.readyState=m.INIT,a||(a="download"),o)return g=n().createObjectURL(t),o.href=g,o.download=a,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),E(),c(g),m.readyState=m.DONE}));e.chrome&&p&&"application/octet-stream"!==p&&(h=t.slice||t.webkitSlice,t=h.call(t,0,t.size,"application/octet-stream"),T=!0),i&&"download"!==a&&(a+=".download"),("application/octet-stream"===p||i)&&(u=e),s?(r+=t.size,s(e.TEMPORARY,r,f((function(e){e.root.getDirectory("saved",C,f((function(e){var n=function(){e.getFile(a,C,f((function(e){e.createWriter(f((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),m.readyState=m.DONE,l(m,"writeend",t),c(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]=m["on"+e]})),n.write(t),m.abort=function(){n.abort(),m.readyState=m.DONE},m.readyState=m.WRITING})),y)})),y)};e.getFile(a,{create:!1},f((function(e){e.remove(),n()})),f((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=g.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(d(e),t)}:(u.abort=function(){this.readyState=this.DONE,l(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 g(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=i:null!==n(553)&&null!=n(548)&&(void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o))},553:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},92:function(e,t,n){"use strict";n.r(t),n.d(t,"SimilarityIndexType",(function(){return o}));const o={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>o.TEXT===e,isTextLiteralType:e=>o.TEXT_LITERAL===e,isPredicationType:e=>o.PREDICATION===e}},94:function(e,t,n){"use strict";n.r(t),n.d(t,"SimilarityIndexStatus",(function(){return o}));const o={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>o.CREATING===e,isBuildingStatus:e=>o.BUILDING===e,isBuiltStatus:e=>o.BUILT===e,isRebuildingStatus:e=>o.REBUILDING===e,isOutdatedStatus:e=>o.OUTDATED===e,isInterruptedStatus:e=>o.INTERRUPTED===e,isObsoleteStatus:e=>o.OBSOLETE===e,isFailedStatus:e=>o.FAILED===e}},95:function(e,t,n){"use strict";n.r(t),n.d(t,"SimilarityIndex",(function(){return s}));var o=n(92),i=n(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=o.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return o.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return o.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return o.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return i.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return i.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return i.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return i.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return i.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return i.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return i.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return i.SimilarityIndexStatus.isFailedStatus(this.status)}}},99:function(e,t,n){"use strict";n.r(t),n.d(t,"mapIndexesResponseToSimilarityIndex",(function(){return i}));var o=n(95);const i=e=>e.map(e=>{const t=new o.SimilarityIndex;return t.type=e.type,t.stopList=e.stopList,t.status=e.status,t.selectQuery=e.selectQuery,t.searchQuery=e.searchQuery,t.sameAs=e.sameAs,t.options=e.options,t.name=e.name,t.infer=e.infer,t.analyzer=e.analyzer,t.analogicalQuery=e.analogicalQuery,t})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[250],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[250],{124:function(t,e,i){"use strict";i.r(e),i.d(e,"ContextType",(function(){return n})),i.d(e,"ContextTypes",(function(){return p}));class n{constructor(t,e){this.id=t,this.labelKey=e}static getAllType(){return[p.ALL,p.EXPLICIT,p.IMPLICIT]}static getContextType(t){return this.getAllType().find(e=>e.id===t)}}const p={ALL:new n("all","explore.explicit.implicit"),EXPLICIT:new n("explicit","explore.explicit"),IMPLICIT:new n("implicit","explore.implicit")}}}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[26,77,142,152,154,236,250,251,253,295,325],{123:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return r})),n.d(t,"ContextTypes",(function(){return o}));class r{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[o.ALL,o.EXPLICIT,o.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const o={ALL:new r("all","explore.explicit.implicit"),EXPLICIT:new r("explicit","explore.explicit"),IMPLICIT:new r("implicit","explore.implicit")}},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"}])},145:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return r}));class r{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}},174:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,r,o)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:r},headers:{Accept:o||"application/json"}}),getGraph:(t,n,r)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:r?"<"+r+">":""}}).then(e=>e.data)}}},175:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return i}));var r=n(145),o=n(123);class i{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=o.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new r.ResourceDetails,this.blanks=!0}}},176:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return r}));const r={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},230:function(e,t){function n(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,n,r){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:r.fitTextMin||"inherit",max:r.fitTextMax||"inherit",calcSize:10,lines:1},i=n.parent(),a=n[0],s=a.style,l=window.getComputedStyle(n[0],null),c=n.children().length||o.lines,u="inherit"===o.min?l["font-size"]:o.min,d="inherit"===o.max?l["font-size"]:o.max,p=l["line-height"],g=l.display;let f;function m(){const e=o.calcSize*c/a.offsetWidth/c;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(i[0]).paddingLeft),n=parseFloat(getComputedStyle(i[0]).paddingRight);return(i[0].offsetWidth-(t+n))*e*o.compressor}(e),parseFloat(d)),parseFloat(u))}function h(){f&&e.cancel(f),f=e((function(){a.offsetHeight*a.offsetWidth!=0&&(s.fontSize=o.calcSize+"px",s.lineHeight="1",s.display="inline-block",s.fontSize=m()+"px",s.lineHeight=p,s.display=g)}),o.loadDelay)}t.$watch((function(){return[i[0].offsetWidth,n[0].offsetWidth].join("_")}),(function(){h()})),$(window).on("resize",o.debounce((function(){t.$apply(h)}),o.delay)),t.$on("$destroy",(function(){f&&e.cancel(f),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",n),n.$inject=["$timeout"]},244:function(e,t){function n(){return{transformToTrig:function(e){let t="";const n={};for(let t=0;t<e.length;t++){const r=e[t];if(void 0===r.context?r.context="":r.context=_.trim(r.context),angular.isUndefined(n[r.context])){const e=[];e.push(r),n[r.context]=e}else n[r.context].push(r)}const r=Object.keys(n);for(let e=0;e<r.length;e++){const o=r[e];t+=""===o?"\n{":"\n<"+o+"> {";const i=n[o];for(let e=0;e<i.length;e++){const n=i[e];t+="\n\t<"+n.subject+"> <"+n.predicate+"> ";let r=n.object.value;"uri"===n.object.type?t+="<"+r+"> .":r.toString().includes('"')?("'"===r[0]&&(r='"'+r.slice(1,r.length)),r[r.length-1]&&(r=r.slice(0,-1)+'"'),t+="'''"+r+"'''"+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."):t+='"""'+r+'"""'+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const n=[];if(!_.isEmpty(e.data)){const r=e.data[t],o=Object.keys(r);for(let e=0;e<o.length;e++){const i=o[e],a=r[i];for(let e=0;e<a.length;e++){const r=a[e];for(let e=0;e<r.graphs.length;e++){let o=r.graphs[e];"http://www.ontotext.com/explicit"===o&&(o=""),r.lang&&(r.datatype=""),r.datatype||(r.datatype=""),n.push({subject:t,predicate:i,object:{value:r.value,type:r.type,datatype:r.datatype,lang:r.lang},context:o})}}}}return n},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",n),n.$inject=[]},245:function(e,t,n){"use strict";n.r(t);n(144),n(174);var r=n(549),o=n(0),i=n(175),a=n(123),s=n(176),l=n(90),c=n(19),u=n(645),d=n(128);function p(e,t,n,o,p,g,f,m,h,w,x,v,y,b){let S;e.ContextTypes=a.ContextTypes,e.contextTypes=a.ContextType.getAllType(),e.currentContextTypeId=a.ContextTypes.EXPLICIT.id,e.roles=[s.RoleType.SUBJECT,s.RoleType.PREDICATE,s.RoleType.OBJECT,s.RoleType.CONTEXT,s.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=w,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>p.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,f.getLocalName(e))}),t},e.getLocalName=e=>f.getLocalName(e);e.loadResource=()=>{b.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(v.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=o.context&&(e.resourceInfo.context=o.context),t.search("role",e.resourceInfo.role),t.replace(),T()},e.downloadExport=t=>{b.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),v.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){g.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:d.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,o,i){b.getGraph(e.resourceInfo,t.type,o).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(i.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,o),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,o),e=JSON.stringify(e);break;case"context":e=await u.context(e,o),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,o),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,o),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,v.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===s.RoleType.CONTEXT&&(e.resourceInfo.contextType=a.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{m.openCopyToClipboardModal(e)};const R=()=>{var n;e.resourceInfo||(e.resourceInfo=new i.ResourceInfo,n=e.resourceInfo,o.prefix&&o.localName&&S[o.prefix]?n.uri=S[o.prefix]+o.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=o.context&&(e.resourceInfo.context=o.context),e.resourceInfo.role=t.search().role?t.search().role:s.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},C=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:S,maxPersistentResponseSize:0,render:l.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:c.DISABLE_YASQE_BUTTONS_CONFIGURATION}),T=()=>{b.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||C(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(v.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},$=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===s.RoleType.CONTEXT?a.ContextTypes.ALL:a.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{L.forEach(e=>e())});const L=[];L.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([x.getPrincipal(),p.getPrefixes(p.getActiveRepository())]).then(([t,n])=>{R(),$(t),S=n,e.loadResource()}).catch(e=>{n.error(v.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function g(e,t,n,r,i,a,s,l,c,u,d,p){function g(){l.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(o.decodeHTML)(p.instant("explore.autocomplete.warning.msg"));s.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){s.error(p.instant("explore.error.autocomplete"))}))}function f(){d.getNamespaces(r.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);s.error(n,p.instant("common.error")),e.loader=!1}))}function m(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),r=/^<?[http|urn].*>?$/.test(e)&&(t||n);let o=!1;if(r)if(e.indexOf("http")>=0){const t=e.indexOf("//");o=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(o=e.substring(4).length>0);return r&&o}let h,w;function x(t){function r(t){a((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&m(t)?(r(!1),n.path("resource").search("uri",t)):(r(!0),t&&s.error(p.instant("explore.error.invalid.input")))}e.submit=x,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=c.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));w=n!==w?n:w,w&&$("#resources_finder_value").val(w)}let n;if(e.autocompleteEnabled){const e=t.replace(w,w+";");n=l.getAutocompleteSuggestions(e)}else n=i.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){h=document.getElementById("resources_finder_value").value,e.form.$dirty=!(h&&m(h))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},x(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(g(),f()),e.$on("repositoryIsSet",(function(){g(),f()}))}function f(e,t,n,r,o,i,a,s,l,c,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=l.getDatatypeOptions(),e.activeRepository=function(){return o.getActiveRepository()},e.getClassInstancesDetails=function(){c.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);r.error(n,u.instant("common.error")),e.loader=!1})),s.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){r.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),s.getGraph(e.uriParam).then((function(t){const n=l.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return s.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){i.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return l.transformToTrig(e.statements)}}})},e.save=function(){const o=e.newResource?"POST":"PUT";t({method:o,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:l.transformToTrig(e.statements)}).success((function(){r.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){r.error(getError(e))}))},e.$watch((function(){return o.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const r=t||"";if(-1===r.indexOf(":"))n=!1;else{const t=r.substring(0,r.indexOf(":"));if(""===s.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(r)&&(n=!1);const e=r.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{r.substring(r.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function m(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",g).controller("ExploreCtrl",p).controller("EditResourceCtrl",f).controller("ViewTrigCtrl",m),p.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],g.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],f.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$uibModalInstance","data"]},246:function(e,t,n){"use strict";n.r(t);n(44);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,n,r,o){o.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const n=e.validateRdfUri(t);return o.$setValidity("searchStr",n),n?t:void 0}return o.$setValidity("searchStr",!0),t})),o.$formatters.unshift((function(t){return angular.isUndefined(t)||o.$setValidity("searchStr",e.validateRdfUri),t}))}}}])},333:function(e,t,n){"use strict";n.r(t);n(9),n(40),n(244),n(245),n(246),n(653),n(806),n(230),n(141);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext","graphdb.framework.core.directives.yasgui-component"])},650:function(e,t){},806:function(e,t){
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[26,79,142,152,154,236,250,251,253,295,325],{124:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return r})),n.d(t,"ContextTypes",(function(){return o}));class r{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[o.ALL,o.EXPLICIT,o.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const o={ALL:new r("all","explore.explicit.implicit"),EXPLICIT:new r("explicit","explore.explicit"),IMPLICIT:new r("implicit","explore.implicit")}},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"}])},145:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return r}));class r{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}},174:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,r,o)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:r},headers:{Accept:o||"application/json"}}),getGraph:(t,n,r)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:r?"<"+r+">":""}}).then(e=>e.data)}}},175:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return i}));var r=n(145),o=n(124);class i{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=o.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new r.ResourceDetails,this.blanks=!0}}},176:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return r}));const r={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},230:function(e,t){function n(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,n,r){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:r.fitTextMin||"inherit",max:r.fitTextMax||"inherit",calcSize:10,lines:1},i=n.parent(),a=n[0],s=a.style,l=window.getComputedStyle(n[0],null),c=n.children().length||o.lines,u="inherit"===o.min?l["font-size"]:o.min,d="inherit"===o.max?l["font-size"]:o.max,p=l["line-height"],g=l.display;let f;function m(){const e=o.calcSize*c/a.offsetWidth/c;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(i[0]).paddingLeft),n=parseFloat(getComputedStyle(i[0]).paddingRight);return(i[0].offsetWidth-(t+n))*e*o.compressor}(e),parseFloat(d)),parseFloat(u))}function h(){f&&e.cancel(f),f=e((function(){a.offsetHeight*a.offsetWidth!=0&&(s.fontSize=o.calcSize+"px",s.lineHeight="1",s.display="inline-block",s.fontSize=m()+"px",s.lineHeight=p,s.display=g)}),o.loadDelay)}t.$watch((function(){return[i[0].offsetWidth,n[0].offsetWidth].join("_")}),(function(){h()})),$(window).on("resize",o.debounce((function(){t.$apply(h)}),o.delay)),t.$on("$destroy",(function(){f&&e.cancel(f),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",n),n.$inject=["$timeout"]},244:function(e,t){function n(){return{transformToTrig:function(e){let t="";const n={};for(let t=0;t<e.length;t++){const r=e[t];if(void 0===r.context?r.context="":r.context=_.trim(r.context),angular.isUndefined(n[r.context])){const e=[];e.push(r),n[r.context]=e}else n[r.context].push(r)}const r=Object.keys(n);for(let e=0;e<r.length;e++){const o=r[e];t+=""===o?"\n{":"\n<"+o+"> {";const i=n[o];for(let e=0;e<i.length;e++){const n=i[e];t+="\n\t<"+n.subject+"> <"+n.predicate+"> ";let r=n.object.value;"uri"===n.object.type?t+="<"+r+"> .":r.toString().includes('"')?("'"===r[0]&&(r='"'+r.slice(1,r.length)),r[r.length-1]&&(r=r.slice(0,-1)+'"'),t+="'''"+r+"'''"+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."):t+='"""'+r+'"""'+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const n=[];if(!_.isEmpty(e.data)){const r=e.data[t],o=Object.keys(r);for(let e=0;e<o.length;e++){const i=o[e],a=r[i];for(let e=0;e<a.length;e++){const r=a[e];for(let e=0;e<r.graphs.length;e++){let o=r.graphs[e];"http://www.ontotext.com/explicit"===o&&(o=""),r.lang&&(r.datatype=""),r.datatype||(r.datatype=""),n.push({subject:t,predicate:i,object:{value:r.value,type:r.type,datatype:r.datatype,lang:r.lang},context:o})}}}}return n},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",n),n.$inject=[]},245:function(e,t,n){"use strict";n.r(t);n(144),n(174);var r=n(549),o=n(0),i=n(175),a=n(124),s=n(176),l=n(90),c=n(19),u=n(645),d=n(129);function p(e,t,n,o,p,g,f,m,h,w,x,v,y,b){let S;e.ContextTypes=a.ContextTypes,e.contextTypes=a.ContextType.getAllType(),e.currentContextTypeId=a.ContextTypes.EXPLICIT.id,e.roles=[s.RoleType.SUBJECT,s.RoleType.PREDICATE,s.RoleType.OBJECT,s.RoleType.CONTEXT,s.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=w,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>p.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,f.getLocalName(e))}),t},e.getLocalName=e=>f.getLocalName(e);e.loadResource=()=>{b.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(v.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=o.context&&(e.resourceInfo.context=o.context),t.search("role",e.resourceInfo.role),t.replace(),T()},e.downloadExport=t=>{b.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),v.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){g.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:d.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,o,i){b.getGraph(e.resourceInfo,t.type,o).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(i.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,o),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,o),e=JSON.stringify(e);break;case"context":e=await u.context(e,o),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,o),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,o),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,v.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===s.RoleType.CONTEXT&&(e.resourceInfo.contextType=a.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{m.openCopyToClipboardModal(e)};const R=()=>{var n;e.resourceInfo||(e.resourceInfo=new i.ResourceInfo,n=e.resourceInfo,o.prefix&&o.localName&&S[o.prefix]?n.uri=S[o.prefix]+o.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=o.context&&(e.resourceInfo.context=o.context),e.resourceInfo.role=t.search().role?t.search().role:s.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},C=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:S,maxPersistentResponseSize:0,render:l.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:c.DISABLE_YASQE_BUTTONS_CONFIGURATION}),T=()=>{b.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||C(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(v.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},$=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===s.RoleType.CONTEXT?a.ContextTypes.ALL:a.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{L.forEach(e=>e())});const L=[];L.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([x.getPrincipal(),p.getPrefixes(p.getActiveRepository())]).then(([t,n])=>{R(),$(t),S=n,e.loadResource()}).catch(e=>{n.error(v.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function g(e,t,n,r,i,a,s,l,c,u,d,p){function g(){l.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(o.decodeHTML)(p.instant("explore.autocomplete.warning.msg"));s.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){s.error(p.instant("explore.error.autocomplete"))}))}function f(){d.getNamespaces(r.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);s.error(n,p.instant("common.error")),e.loader=!1}))}function m(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),r=/^<?[http|urn].*>?$/.test(e)&&(t||n);let o=!1;if(r)if(e.indexOf("http")>=0){const t=e.indexOf("//");o=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(o=e.substring(4).length>0);return r&&o}let h,w;function x(t){function r(t){a((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&m(t)?(r(!1),n.path("resource").search("uri",t)):(r(!0),t&&s.error(p.instant("explore.error.invalid.input")))}e.submit=x,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=c.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));w=n!==w?n:w,w&&$("#resources_finder_value").val(w)}let n;if(e.autocompleteEnabled){const e=t.replace(w,w+";");n=l.getAutocompleteSuggestions(e)}else n=i.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){h=document.getElementById("resources_finder_value").value,e.form.$dirty=!(h&&m(h))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},x(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(g(),f()),e.$on("repositoryIsSet",(function(){g(),f()}))}function f(e,t,n,r,o,i,a,s,l,c,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=l.getDatatypeOptions(),e.activeRepository=function(){return o.getActiveRepository()},e.getClassInstancesDetails=function(){c.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);r.error(n,u.instant("common.error")),e.loader=!1})),s.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){r.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),s.getGraph(e.uriParam).then((function(t){const n=l.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return s.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){i.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return l.transformToTrig(e.statements)}}})},e.save=function(){const o=e.newResource?"POST":"PUT";t({method:o,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:l.transformToTrig(e.statements)}).success((function(){r.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){r.error(getError(e))}))},e.$watch((function(){return o.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const r=t||"";if(-1===r.indexOf(":"))n=!1;else{const t=r.substring(0,r.indexOf(":"));if(""===s.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(r)&&(n=!1);const e=r.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{r.substring(r.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function m(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",g).controller("ExploreCtrl",p).controller("EditResourceCtrl",f).controller("ViewTrigCtrl",m),p.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],g.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],f.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$uibModalInstance","data"]},246:function(e,t,n){"use strict";n.r(t);n(44);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,n,r,o){o.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const n=e.validateRdfUri(t);return o.$setValidity("searchStr",n),n?t:void 0}return o.$setValidity("searchStr",!0),t})),o.$formatters.unshift((function(t){return angular.isUndefined(t)||o.$setValidity("searchStr",e.validateRdfUri),t}))}}}])},333:function(e,t,n){"use strict";n.r(t);n(9),n(40),n(244),n(245),n(246),n(653),n(806),n(230),n(141);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext","graphdb.framework.core.directives.yasgui-component"])},650:function(e,t){},806:function(e,t){
|
|
2
2
|
/*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
|
|
3
3
|
!function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,n,r,o,i,a,s){function l(t,i,a,s){var l,c,u,d,p,g,f=i.find("input"),m=3,h=null,w="autocomplete-required",x=null,v=null,y=i[0].querySelector(".angucomplete-dropdown"),b=!1,S=null;function R(e,n){e&&("object"==typeof e?(t.uri=$(e),T({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),j(!0))}function I(e){S=null,t.hideResults(e),document.body.removeEventListener("click",I)}function C(e){return e.which?e.which:e.keyCode}function T(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,j(!!e)}function $(e){return t.titleField.split(",").map((function(t){return L(e,t)})).join(" ")}function L(e,t){var n,r;if(t){n=t.split("."),r=e;for(var o=0;o<n.length;o++)r=r[n[o]]}else r=e;return r}function O(e,n){var o,i,a;if(a=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),o=(i=e.match(a))?e.replace(a,'<span class="'+t.matchClass+'">'+i[0]+"</span>"):e,r.trustAsHtml(o)}function j(e){t.notEmpty=e,x=t.uri,t.fieldRequired&&s&&t.inputName&&s[t.inputName].$setValidity(w,e)}function E(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),o.cancel(h),k(),T({originalObject:t.uri}),t.clearSelected&&(t.uri=null),P())}function D(){return i[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function A(e){y.scrollTop=y.scrollTop+e}function U(){var e=t.results[t.currentIndex];if(t.matchClass){var n=$(e.originalObject);n=n.replace(/<b>|<\/b>/g,""),f.val(n)}else f.val(e.title)}function N(e){return function(n,r,o,i){r||o||i||!n.data||(n=n.data),t.searching=!1,B(L(c(n),t.remoteUrlDataField),e)}}function M(e,n,r,o){0!==n&&-1!==n&&(n||r||o||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,o):console&&console.error&&console.error("http error"))}function k(){v&&v.resolve()}function F(r){var o={},i=t.remoteUrl+encodeuriComponent(r);t.remoteUrlRequestFormatter&&(o={params:t.remoteUrlRequestFormatter(r)},i=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(o.withCredentials=!0),k(),v=e.defer(),o.timeout=v.promise,n.get(i,o).success(N(r)).error(M)}function X(n){k(),v=e.defer(),t.remoteApiHandler(n,v.promise).then(N(n)).catch(M)}function P(){t.showDropdown=!1,t.results=[],y&&(y.scrollTop=0)}function q(){t.showDropdown=d,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function J(e){!e||e.length<m||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e):function(e){var n,r,o,i,a=t.searchFields.split(","),s=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,o=0;o<a.length;o++)i=L(t.localData[n],a[o])||"",r=r||i.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(s[s.length]=t.localData[n])}return s}(e),t.searching=!1,B(n,e)})):t.remoteApiHandler?X(e):F(e))}function B(e,n){var r,o,i,a,s,l;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(a=s=$(e[r])),o="",t.descriptionField&&(o=l=L(e[r],t.descriptionField)),i="",t.imageField&&(i=L(e[r],t.imageField)),t.matchClass&&(s=O(a,n),l=O(o,n)),t.results[t.results.length]={title:s,description:l,image:i,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var o in n)if(n[o].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:a,desc:o||""},t.uri)?t.showDropdown=!1:0!==t.results.length||p?t.showDropdown=!0:t.showDropdown=!1}function _(){t.localData?B(t.localData,""):t.remoteApiHandler?X(""):F("")}i.on("mousedown",(function(e){e.target.id?(S=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",I):S=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,u=t.$watch("initialValue",(function(e){e&&(u(),R(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?x&&-1!==t.currentIndex?j(!0):j(!1):s[t.inputName].$setValidity(w,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.uri=null,T(),j(!1),P())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&R(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==m||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,_())},t.hideResults=function(){S&&(S===t.id+"_dropdown"||S.indexOf("angucomplete")>=0)?S=null:(l=o((function(){P(),t.$apply((function(){t.uri&&t.uri.length>0&&f.val(t.uri)}))}),200),k(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&E())},t.resetHideResults=function(){l&&o.cancel(l)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=$(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=L(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,T(e),P()},t.inputChangeHandler=function(e){return e.length<m?(k(),P()):0===e.length&&0===m&&(t.searching=!1,_()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(w=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(m=parseInt(t.minlength,10)),t.pause||(t.pause=500),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&s&&(t.initialValue?j(!0):j(!1)),t.inputType=a.type?a.type:"text",t.textSearching=a.textSearching?a.textSearching:"Searching...",t.textNoResults=a.textNoResults?a.textNoResults:"No results found",d="false"!==t.textSearching,p="false"!==t.textNoResults,t.maxlength=a.maxlength?a.maxlength:524288,f.on("keydown",(function(e){var n=C(e),r=null,o=null;13===n&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(E(e),P()),t.$apply()):40===n&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,U()})),b&&(r=D(),y.getBoundingClientRect().top+parseInt(getComputedStyle(y).maxHeight,10)<r.getBoundingClientRect().bottom&&A(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):38===n&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,U()})),b&&(o=D().getBoundingClientRect().top-(y.getBoundingClientRect().top+parseInt(getComputedStyle(y).paddingTop,10)))<0&&A(o-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,f.val(t.uri)}))):9===n?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?E():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&E():27===n&&e.preventDefault()})),f.on("keyup",(function(e){var n=C(e);if(37!==n&&39!==n)if(38===n||13===n)e.preventDefault();else if(40===n)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=m&&(q(),t.searching=!0,J(t.uri));else if(27===n)P(),t.$apply((function(){f.val(t.uri)}));else{if(0===m&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=m&&(q(),h&&o.cancel(h),t.searching=!0,h=o((function(){J(t.uri)}),t.pause)):t.showDropdown=!1,x&&x!==t.uri&&!t.clearSelected&&t.$apply((function(){T()}))}})),g="remoteUrlResponseFormatter",c=function(e){return t[g]?t[g](e):e},o((function(){var e=getComputedStyle(y);b=e.maxHeight&&"auto"===e.overflowY}))}return i.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=a.startSymbol(),n=a.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return l}}}])}(window.angular)}()},90:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[261],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[261],{126:function(e,E,c){"use strict";c.r(E),c.d(E,"SimilaritySearchType",(function(){return T}));const T={SEARCH_TERM:"searchTerm",SEARCH_ANALOGICAL:"searchAnalogical",SEARCH_ENTITY:"searchEntity",SEARCH_ENTITY_PREDICATE:"searchEntityPredicate",SEARCH_DOCUMENT:"searchDocumentID",isSearchTermType:e=>T.SEARCH_TERM===e,isSearchAnalogicalType:e=>T.SEARCH_ANALOGICAL===e,isSearchEntityType:e=>T.SEARCH_ENTITY===e,isSearchEntityPredicateType:e=>T.SEARCH_ENTITY_PREDICATE===e,isSearchDocumentType:e=>T.SEARCH_DOCUMENT===e}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[266],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[266],{132:function(n,o,r){"use strict";r.r(o),r.d(o,"VIEW_SPARQL_EDITOR",(function(){return c}));const c="graphdb-workbench-sparql-editor"}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[27,77,140,236,250,251,253,295,325],{123:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return o})),n.d(t,"ContextTypes",(function(){return r}));class o{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[r.ALL,r.EXPLICIT,r.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const r={ALL:new o("all","explore.explicit.implicit"),EXPLICIT:new o("explicit","explore.explicit"),IMPLICIT:new o("implicit","explore.implicit")}},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"}])},145:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return o}));class o{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}},174:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,o,r)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:o},headers:{Accept:r||"application/json"}}),getGraph:(t,n,o)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:o?"<"+o+">":""}}).then(e=>e.data)}}},175:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return s}));var o=n(145),r=n(123);class s{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=r.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new o.ResourceDetails,this.blanks=!0}}},176:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return o}));const o={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},245:function(e,t,n){"use strict";n.r(t);n(144),n(174);var o=n(549),r=n(0),s=n(175),a=n(123),i=n(176),c=n(90),l=n(19),u=n(645),p=n(128);function d(e,t,n,r,d,f,m,g,x,w,h,y,R,S){let T;e.ContextTypes=a.ContextTypes,e.contextTypes=a.ContextType.getAllType(),e.currentContextTypeId=a.ContextTypes.EXPLICIT.id,e.roles=[i.RoleType.SUBJECT,i.RoleType.PREDICATE,i.RoleType.OBJECT,i.RoleType.CONTEXT,i.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=w,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>d.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,m.getLocalName(e))}),t},e.getLocalName=e=>m.getLocalName(e);e.loadResource=()=>{S.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(y.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=r.context&&(e.resourceInfo.context=r.context),t.search("role",e.resourceInfo.role),t.replace(),O()},e.downloadExport=t=>{S.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(o.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),y.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){f.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,r,s){S.getGraph(e.resourceInfo,t.type,r).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(s.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,r),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,r),e=JSON.stringify(e);break;case"context":e=await u.context(e,r),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,r),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,r),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(o.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,y.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===i.RoleType.CONTEXT&&(e.resourceInfo.contextType=a.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{g.openCopyToClipboardModal(e)};const v=()=>{var n;e.resourceInfo||(e.resourceInfo=new s.ResourceInfo,n=e.resourceInfo,r.prefix&&r.localName&&T[r.prefix]?n.uri=T[r.prefix]+r.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=r.context&&(e.resourceInfo.context=r.context),e.resourceInfo.role=t.search().role?t.search().role:i.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},b=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:T,maxPersistentResponseSize:0,render:c.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:l.DISABLE_YASQE_BUTTONS_CONFIGURATION}),O=()=>{S.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||b(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(y.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},E=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===i.RoleType.CONTEXT?a.ContextTypes.ALL:a.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{N.forEach(e=>e())});const N=[];N.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([h.getPrincipal(),d.getPrefixes(d.getActiveRepository())]).then(([t,n])=>{v(),E(t),T=n,e.loadResource()}).catch(e=>{n.error(y.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function f(e,t,n,o,s,a,i,c,l,u,p,d){function f(){c.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(r.decodeHTML)(d.instant("explore.autocomplete.warning.msg"));i.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){i.error(d.instant("explore.error.autocomplete"))}))}function m(){p.getNamespaces(o.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);i.error(n,d.instant("common.error")),e.loader=!1}))}function g(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),o=/^<?[http|urn].*>?$/.test(e)&&(t||n);let r=!1;if(o)if(e.indexOf("http")>=0){const t=e.indexOf("//");r=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(r=e.substring(4).length>0);return o&&r}let x,w;function h(t){function o(t){a((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&g(t)?(o(!1),n.path("resource").search("uri",t)):(o(!0),t&&i.error(d.instant("explore.error.invalid.input")))}e.submit=h,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=l.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));w=n!==w?n:w,w&&$("#resources_finder_value").val(w)}let n;if(e.autocompleteEnabled){const e=t.replace(w,w+";");n=c.getAutocompleteSuggestions(e)}else n=s.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){x=document.getElementById("resources_finder_value").value,e.form.$dirty=!(x&&g(x))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},h(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(f(),m()),e.$on("repositoryIsSet",(function(){f(),m()}))}function m(e,t,n,o,r,s,a,i,c,l,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=c.getDatatypeOptions(),e.activeRepository=function(){return r.getActiveRepository()},e.getClassInstancesDetails=function(){l.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);o.error(n,u.instant("common.error")),e.loader=!1})),i.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){o.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),i.getGraph(e.uriParam).then((function(t){const n=c.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return i.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){s.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return c.transformToTrig(e.statements)}}})},e.save=function(){const r=e.newResource?"POST":"PUT";t({method:r,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:c.transformToTrig(e.statements)}).success((function(){o.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){o.error(getError(e))}))},e.$watch((function(){return r.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const o=t||"";if(-1===o.indexOf(":"))n=!1;else{const t=o.substring(0,o.indexOf(":"));if(""===i.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(o)&&(n=!1);const e=o.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{o.substring(o.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function g(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",f).controller("ExploreCtrl",d).controller("EditResourceCtrl",m).controller("ViewTrigCtrl",g),d.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],f.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],g.$inject=["$scope","$uibModalInstance","data"]},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,s=e.requestFileSystem||r||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},i=0,c=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},l=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){a(e)}}},u=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},p=function(t,a){t=u(t);var p,d,f,m=this,g=t.type,x=!1,w=function(){l(m,"writestart progress write writeend".split(" "))},h=function(){(!x&&p||(p=n().createObjectURL(t)),d)?d.location.href=p:null==e.open(p,"_blank")&&"undefined"!=typeof safari&&(e.location.href=p);m.readyState=m.DONE,w(),c(p)},y=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},R={create:!0,exclusive:!1};if(m.readyState=m.INIT,a||(a="download"),o)return p=n().createObjectURL(t),o.href=p,o.download=a,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),w(),c(p),m.readyState=m.DONE}));e.chrome&&g&&"application/octet-stream"!==g&&(f=t.slice||t.webkitSlice,t=f.call(t,0,t.size,"application/octet-stream"),x=!0),r&&"download"!==a&&(a+=".download"),("application/octet-stream"===g||r)&&(d=e),s?(i+=t.size,s(e.TEMPORARY,i,y((function(e){e.root.getDirectory("saved",R,y((function(e){var n=function(){e.getFile(a,R,y((function(e){e.createWriter(y((function(n){n.onwriteend=function(t){d.location.href=e.toURL(),m.readyState=m.DONE,l(m,"writeend",t),c(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&h()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=m["on"+e]})),n.write(t),m.abort=function(){n.abort(),m.readyState=m.DONE},m.readyState=m.WRITING})),h)})),h)};e.getFile(a,{create:!1},y((function(e){e.remove(),n()})),y((function(e){e.code===e.NOT_FOUND_ERR?n():h()})))})),h)})),h)):h()},d=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(u(e),t)}:(d.abort=function(){this.readyState=this.DONE,l(this,"abort")},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t){return new p(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[27,79,140,236,250,251,253,295,325],{124:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return o})),n.d(t,"ContextTypes",(function(){return r}));class o{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[r.ALL,r.EXPLICIT,r.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const r={ALL:new o("all","explore.explicit.implicit"),EXPLICIT:new o("explicit","explore.explicit"),IMPLICIT:new o("implicit","explore.implicit")}},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"}])},145:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return o}));class o{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}},174:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,o,r)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:o},headers:{Accept:r||"application/json"}}),getGraph:(t,n,o)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:o?"<"+o+">":""}}).then(e=>e.data)}}},175:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return s}));var o=n(145),r=n(124);class s{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=r.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new o.ResourceDetails,this.blanks=!0}}},176:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return o}));const o={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},245:function(e,t,n){"use strict";n.r(t);n(144),n(174);var o=n(549),r=n(0),s=n(175),a=n(124),i=n(176),c=n(90),l=n(19),u=n(645),p=n(129);function d(e,t,n,r,d,f,m,g,x,w,h,y,R,S){let T;e.ContextTypes=a.ContextTypes,e.contextTypes=a.ContextType.getAllType(),e.currentContextTypeId=a.ContextTypes.EXPLICIT.id,e.roles=[i.RoleType.SUBJECT,i.RoleType.PREDICATE,i.RoleType.OBJECT,i.RoleType.CONTEXT,i.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=w,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>d.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,m.getLocalName(e))}),t},e.getLocalName=e=>m.getLocalName(e);e.loadResource=()=>{S.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(y.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=r.context&&(e.resourceInfo.context=r.context),t.search("role",e.resourceInfo.role),t.replace(),O()},e.downloadExport=t=>{S.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(o.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),y.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){f.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,r,s){S.getGraph(e.resourceInfo,t.type,r).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(s.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,r),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,r),e=JSON.stringify(e);break;case"context":e=await u.context(e,r),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,r),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,r),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(o.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,y.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===i.RoleType.CONTEXT&&(e.resourceInfo.contextType=a.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{g.openCopyToClipboardModal(e)};const v=()=>{var n;e.resourceInfo||(e.resourceInfo=new s.ResourceInfo,n=e.resourceInfo,r.prefix&&r.localName&&T[r.prefix]?n.uri=T[r.prefix]+r.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=r.context&&(e.resourceInfo.context=r.context),e.resourceInfo.role=t.search().role?t.search().role:i.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},b=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:T,maxPersistentResponseSize:0,render:c.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:l.DISABLE_YASQE_BUTTONS_CONFIGURATION}),O=()=>{S.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||b(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(y.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},E=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===i.RoleType.CONTEXT?a.ContextTypes.ALL:a.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{N.forEach(e=>e())});const N=[];N.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([h.getPrincipal(),d.getPrefixes(d.getActiveRepository())]).then(([t,n])=>{v(),E(t),T=n,e.loadResource()}).catch(e=>{n.error(y.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function f(e,t,n,o,s,a,i,c,l,u,p,d){function f(){c.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(r.decodeHTML)(d.instant("explore.autocomplete.warning.msg"));i.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){i.error(d.instant("explore.error.autocomplete"))}))}function m(){p.getNamespaces(o.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);i.error(n,d.instant("common.error")),e.loader=!1}))}function g(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),o=/^<?[http|urn].*>?$/.test(e)&&(t||n);let r=!1;if(o)if(e.indexOf("http")>=0){const t=e.indexOf("//");r=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(r=e.substring(4).length>0);return o&&r}let x,w;function h(t){function o(t){a((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&g(t)?(o(!1),n.path("resource").search("uri",t)):(o(!0),t&&i.error(d.instant("explore.error.invalid.input")))}e.submit=h,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=l.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));w=n!==w?n:w,w&&$("#resources_finder_value").val(w)}let n;if(e.autocompleteEnabled){const e=t.replace(w,w+";");n=c.getAutocompleteSuggestions(e)}else n=s.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){x=document.getElementById("resources_finder_value").value,e.form.$dirty=!(x&&g(x))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},h(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(f(),m()),e.$on("repositoryIsSet",(function(){f(),m()}))}function m(e,t,n,o,r,s,a,i,c,l,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=c.getDatatypeOptions(),e.activeRepository=function(){return r.getActiveRepository()},e.getClassInstancesDetails=function(){l.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);o.error(n,u.instant("common.error")),e.loader=!1})),i.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){o.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),i.getGraph(e.uriParam).then((function(t){const n=c.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return i.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){s.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return c.transformToTrig(e.statements)}}})},e.save=function(){const r=e.newResource?"POST":"PUT";t({method:r,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:c.transformToTrig(e.statements)}).success((function(){o.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){o.error(getError(e))}))},e.$watch((function(){return r.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const o=t||"";if(-1===o.indexOf(":"))n=!1;else{const t=o.substring(0,o.indexOf(":"));if(""===i.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(o)&&(n=!1);const e=o.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{o.substring(o.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function g(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",f).controller("ExploreCtrl",d).controller("EditResourceCtrl",m).controller("ViewTrigCtrl",g),d.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],f.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],g.$inject=["$scope","$uibModalInstance","data"]},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,s=e.requestFileSystem||r||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},i=0,c=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},l=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){a(e)}}},u=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},p=function(t,a){t=u(t);var p,d,f,m=this,g=t.type,x=!1,w=function(){l(m,"writestart progress write writeend".split(" "))},h=function(){(!x&&p||(p=n().createObjectURL(t)),d)?d.location.href=p:null==e.open(p,"_blank")&&"undefined"!=typeof safari&&(e.location.href=p);m.readyState=m.DONE,w(),c(p)},y=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},R={create:!0,exclusive:!1};if(m.readyState=m.INIT,a||(a="download"),o)return p=n().createObjectURL(t),o.href=p,o.download=a,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),w(),c(p),m.readyState=m.DONE}));e.chrome&&g&&"application/octet-stream"!==g&&(f=t.slice||t.webkitSlice,t=f.call(t,0,t.size,"application/octet-stream"),x=!0),r&&"download"!==a&&(a+=".download"),("application/octet-stream"===g||r)&&(d=e),s?(i+=t.size,s(e.TEMPORARY,i,y((function(e){e.root.getDirectory("saved",R,y((function(e){var n=function(){e.getFile(a,R,y((function(e){e.createWriter(y((function(n){n.onwriteend=function(t){d.location.href=e.toURL(),m.readyState=m.DONE,l(m,"writeend",t),c(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&h()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=m["on"+e]})),n.write(t),m.abort=function(){n.abort(),m.readyState=m.DONE},m.readyState=m.WRITING})),h)})),h)};e.getFile(a,{create:!1},y((function(e){e.remove(),n()})),y((function(e){e.code===e.NOT_FOUND_ERR?n():h()})))})),h)})),h)):h()},d=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(u(e),t)}:(d.abort=function(){this.readyState=this.DONE,l(this,"abort")},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t){return new p(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")}},650:function(e,t){},90:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return o}));const o={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[271],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[271],{123:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatAnswerModel",(function(){return n})),s.d(e,"ContinueChatRun",(function(){return a}));class n{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class a{constructor(t,e){this._chatItem=t,this._runId=e}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[273,274],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[273,274],{133:function(e,t,r){"use strict";r.r(t),r.d(t,"ExplainResponseModel",(function(){return s})),r.d(t,"ExplainQueryMethodsListModel",(function(){return n})),r.d(t,"ExplainQueryMethodModel",(function(){return u})),r.d(t,"ExplainQueryType",(function(){return i}));class s{constructor(e={}){this._chatId=e.chatId,this._answerId=e.answerId,this._queryMethods=e.queryMethods,this._expanded=void 0===e.expanded||e.expanded}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get answerId(){return this._answerId}set answerId(e){this._answerId=e}get queryMethods(){return this._queryMethods}set queryMethods(e){this._queryMethods=e}get expanded(){return this._expanded}set expanded(e){this._expanded=e}}class n{constructor(e=[]){this._items=e}get items(){return this._items}set items(e){this._items=e}}class u{constructor(e={}){this._name=e.name,this._rawQuery=e.rawQuery,this._query=e.query,this._queryType=e.queryType,this._errorMessage=e.errorOutput}get name(){return this._name}set name(e){this._name=e}get rawQuery(){return this._rawQuery}set rawQuery(e){this._rawQuery=e}get query(){return this._query}set query(e){this._query=e}get queryType(){return this._queryType}set queryType(e){this._queryType=e}get errorMessage(){return this._errorMessage}set errorMessage(e){this._errorMessage=e}}const i={SPARQL:"sparql",JSON:"json",OTHER:"other"}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[274,273],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[274,273],{133:function(e,t,r){"use strict";r.r(t),r.d(t,"ExplainResponseModel",(function(){return s})),r.d(t,"ExplainQueryMethodsListModel",(function(){return n})),r.d(t,"ExplainQueryMethodModel",(function(){return u})),r.d(t,"ExplainQueryType",(function(){return i}));class s{constructor(e={}){this._chatId=e.chatId,this._answerId=e.answerId,this._queryMethods=e.queryMethods,this._expanded=void 0===e.expanded||e.expanded}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get answerId(){return this._answerId}set answerId(e){this._answerId=e}get queryMethods(){return this._queryMethods}set queryMethods(e){this._queryMethods=e}get expanded(){return this._expanded}set expanded(e){this._expanded=e}}class n{constructor(e=[]){this._items=e}get items(){return this._items}set items(e){this._items=e}}class u{constructor(e={}){this._name=e.name,this._rawQuery=e.rawQuery,this._query=e.query,this._queryType=e.queryType,this._errorMessage=e.errorOutput}get name(){return this._name}set name(e){this._name=e}get rawQuery(){return this._rawQuery}set rawQuery(e){this._rawQuery=e}get query(){return this._query}set query(e){this._query=e}get queryType(){return this._queryType}set queryType(e){this._queryType=e}get errorMessage(){return this._errorMessage}set errorMessage(e){this._errorMessage=e}}const i={SPARQL:"sparql",JSON:"json",OTHER:"other"}}}]);
|