graphdb-workbench 3.0.1 → 3.0.2-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/{1.4557dfdb926ba6471bb3.bundle.js → 1.39c8f2b09d3018e6a9cd.bundle.js} +1 -1
- package/dist/{10.8a76ef708b5c69241c68.bundle.js → 10.4f80be12b2cd899d4fc2.bundle.js} +1 -1
- package/dist/100.2daf71ab49c93a1c9d40.bundle.js +1 -0
- package/dist/{99.a745a27e01490b0d843d.bundle.js → 101.70d205b9691d74539dd7.bundle.js} +1 -1
- package/dist/{100.c4aaa3d10f570dba12a9.bundle.js → 102.8b6782cd3c24d47c87d2.bundle.js} +1 -1
- package/dist/{101.8f0b38c2e58132599194.bundle.js → 103.ff8e7dd53d94f93552bf.bundle.js} +1 -1
- package/dist/{103.96f2287dde7e4fc25c9d.bundle.js → 104.a1b5b2e868eb117b48ac.bundle.js} +1 -1
- package/dist/{104.ddeb2cb5758d1ed52b33.bundle.js → 105.0121f779d777d869ce4e.bundle.js} +1 -1
- package/dist/{105.e8302c421c3d7b516b4c.bundle.js → 106.55cf93dab531f6120a6e.bundle.js} +1 -1
- package/dist/{106.00a983e1594a051a5fe7.bundle.js → 107.c0d5d1b4a12c8a01745e.bundle.js} +1 -1
- package/dist/{107.7b548755171f42f06352.bundle.js → 108.9ca7ca14da8593ef91ba.bundle.js} +1 -1
- package/dist/{108.160515780d319edefb5c.bundle.js → 109.1c877e801581e1f60bf8.bundle.js} +1 -1
- package/dist/11.cc21bcbc41edfd865a48.bundle.js +1 -0
- package/dist/{109.1da75239f8e2a5d63b23.bundle.js → 110.3740001dabee596bbf71.bundle.js} +1 -1
- package/dist/{110.780a31b32e116f49a75f.bundle.js → 111.f0ae6a0107628aaeef02.bundle.js} +1 -1
- package/dist/{111.7e3057275034cb5dc5a6.bundle.js → 112.ed43d212e04e37907453.bundle.js} +1 -1
- package/dist/{112.22145690dd697aa9275d.bundle.js → 113.0b94d0e087a818cf9d4c.bundle.js} +1 -1
- package/dist/{113.c135232a9177d596406c.bundle.js → 114.88b6c5ce916e956cc2e5.bundle.js} +1 -1
- package/dist/{114.b2c0df64a560a8dd5ae0.bundle.js → 115.3a159adc54ebc83243cd.bundle.js} +1 -1
- package/dist/{115.543de06ecb5553155522.bundle.js → 116.b75b69c7fe15583deb8a.bundle.js} +1 -1
- package/dist/{116.79b9b3abc0b03e8b7924.bundle.js → 117.a3706ff54783c451de62.bundle.js} +1 -1
- package/dist/{117.ae87c77380fb7660d9ec.bundle.js → 118.e93de50f0149eb2931a4.bundle.js} +1 -1
- package/dist/{118.6756956bb51b3350690d.bundle.js → 119.e5733c827c71ba3106fc.bundle.js} +1 -1
- package/dist/12.5d075599ef637022c23c.bundle.js +1 -0
- package/dist/{119.c8e77171125b6497990a.bundle.js → 120.346f38c1b8fa9bb399aa.bundle.js} +1 -1
- package/dist/{120.1484bac063921edb7a2c.bundle.js → 121.0a271d2bfea3fc050225.bundle.js} +1 -1
- package/dist/{121.6a0ffc9dfc3ea14fd0d3.bundle.js → 122.6812fc0e3f6f60eec16d.bundle.js} +1 -1
- package/dist/{122.13363b4c4f89776fa1b5.bundle.js → 123.31d75efb53b4049f1b67.bundle.js} +1 -1
- package/dist/{123.616625d0908d7e6eab3d.bundle.js → 124.2e17f7bde4612462c957.bundle.js} +1 -1
- package/dist/{124.924dce24aad641d1dd23.bundle.js → 125.f74277a2a44949ca0b4c.bundle.js} +1 -1
- package/dist/{125.d86cff2a5cc679dc20d9.bundle.js → 126.63677abd348f7f462e66.bundle.js} +1 -1
- package/dist/{126.ff5a04a468a8a8d1a99a.bundle.js → 127.41cba8bf8e30ac29ab7e.bundle.js} +1 -1
- package/dist/{127.954cf8032872deba10e6.bundle.js → 128.2ec10c750cf6d0f151f4.bundle.js} +1 -1
- package/dist/{128.639a495883f611c4691e.bundle.js → 129.7b10d7005f33d6187a4b.bundle.js} +1 -1
- package/dist/{13.c904bbb863125c4ff6cc.bundle.js → 13.c1f8c588c7fc852bbe1d.bundle.js} +1 -1
- package/dist/{129.5d11264c418527e53342.bundle.js → 130.6eaf3aa6daac5859f7d7.bundle.js} +1 -1
- package/dist/{130.82fe31a14b953086bb45.bundle.js → 131.45ae15011beefb1ec398.bundle.js} +1 -1
- package/dist/{131.e4be75b25c9eb85db5a8.bundle.js → 132.f675fe2fd349527933b3.bundle.js} +1 -1
- package/dist/{132.364bb39217e31f46480f.bundle.js → 133.1efc1419d69e84db2b4b.bundle.js} +1 -1
- package/dist/{133.df86fdb8d83ca7237793.bundle.js → 134.01ec95b828ad09fcb1a9.bundle.js} +1 -1
- package/dist/{134.33804d658ebadcbc3b55.bundle.js → 135.7d15f409bdb1e8630623.bundle.js} +1 -1
- package/dist/{135.797fc168b7a948df2ccb.bundle.js → 136.1ff57ae90902aff352e4.bundle.js} +1 -1
- package/dist/{136.5ca50393ed4761535bfe.bundle.js → 137.044a888e82e4ac13cbed.bundle.js} +1 -1
- package/dist/{137.d8b48c06ecd279c12ca7.bundle.js → 138.f910e9be040100f08326.bundle.js} +1 -1
- package/dist/{138.3bb6b7be471eb2d04c6e.bundle.js → 139.7e7adea811551510d1d4.bundle.js} +1 -1
- package/dist/{14.d0ab3c83926b616e7354.bundle.js → 14.d0c7642a1a7041f50137.bundle.js} +1 -1
- package/dist/{139.ea151aec614a76870451.bundle.js → 140.3e12b1909d34b2b23d66.bundle.js} +1 -1
- package/dist/{140.6583cf41ab8e891ebbb6.bundle.js → 141.022a52911a1fba3e9273.bundle.js} +1 -1
- package/dist/{141.af39fc3a6dc1dafdb5ab.bundle.js → 142.9b8ed6c5c8e7a9f5de47.bundle.js} +1 -1
- package/dist/{142.c2392a48e4d3a2a16866.bundle.js → 143.81cfe46fdf48ae310839.bundle.js} +1 -1
- package/dist/{143.e4511e1698aca68814e3.bundle.js → 144.fbf7737acce465cf274d.bundle.js} +1 -1
- package/dist/{144.f58114954e257cb77bde.bundle.js → 145.72459692d3c167aee55e.bundle.js} +1 -1
- package/dist/{145.d558ac05737ca5ef00a4.bundle.js → 146.e435b2bdae83a56537f6.bundle.js} +1 -1
- package/dist/{146.de12b58d856c54decc0b.bundle.js → 147.f4e3eb741619b49bcc80.bundle.js} +1 -1
- package/dist/{147.6faf4e13462207010d38.bundle.js → 148.44ea646c66b6b0e8f996.bundle.js} +1 -1
- package/dist/{148.25167c5ae125b23811c9.bundle.js → 149.0c8405d83935b512abfb.bundle.js} +1 -1
- package/dist/{15.8ab8b6f8c611ec1dfddc.bundle.js → 15.79a075c0e170b3066b07.bundle.js} +1 -1
- package/dist/{149.9629d0dfe4f62aa15bba.bundle.js → 150.fb80c0c92d602a623c36.bundle.js} +1 -1
- package/dist/{150.c8bf724fbe76d0e0696d.bundle.js → 151.0b79280f2a959473ff16.bundle.js} +1 -1
- package/dist/{151.4970e08b91e9849ae5e3.bundle.js → 152.410c52dad18a5a3961f6.bundle.js} +1 -1
- package/dist/{152.8a1ea0a8d04e0873f67b.bundle.js → 153.cb649018e1db6b8c4f1c.bundle.js} +1 -1
- package/dist/{153.64e4e15ca8abeb5268e3.bundle.js → 154.a96812700b8b52d10e57.bundle.js} +1 -1
- package/dist/160.1e607beff0e4f8e426cf.bundle.js +1 -0
- package/dist/{161.228b61b39d936f8fca31.bundle.js → 161.2a41444b94b2db7dd638.bundle.js} +1 -1
- package/dist/{163.716d49313f3e196497dd.bundle.js → 163.9c8a1cb6d8692b5347a4.bundle.js} +1 -1
- package/dist/{166.31241e54608319e510e2.bundle.js → 166.c08c74fdaa7965adecbc.bundle.js} +1 -1
- package/dist/{17.019de109eebe6b7563fe.bundle.js → 17.e163dfcc19d77667295a.bundle.js} +1 -1
- package/dist/{173.425381e5433b54da911c.bundle.js → 173.4fb35b26d3b118d10626.bundle.js} +1 -1
- package/dist/{175.b94e42f1b1b7479f46ad.bundle.js → 175.ec71d7bdff18c571a78e.bundle.js} +1 -1
- package/dist/{179.63500ae70b7715467e79.bundle.js → 179.be20755cb9848e72b319.bundle.js} +1 -1
- package/dist/{18.6722328814b9fcee2f6e.bundle.js → 18.b2d04af2d60cc37a5ebe.bundle.js} +1 -1
- package/dist/{180.a91ac4fc484a71bd5ed8.bundle.js → 180.a82dac6c561436705ae7.bundle.js} +1 -1
- package/dist/{19.a0af0ec7c0e4eb7ab20c.bundle.js → 19.407c7beb11ea143e1f9e.bundle.js} +1 -1
- package/dist/{190.431c135250df34322375.bundle.js → 190.4969eb91b83aaa7cd263.bundle.js} +1 -1
- package/dist/{2.354e410d4fb45ab44420.bundle.js → 2.842d68f9e1fac66644aa.bundle.js} +1 -1
- package/dist/{20.b2e6e5248ede44286621.bundle.js → 20.d9c0a2300fac55616a64.bundle.js} +1 -1
- package/dist/{21.6de69abd52835f511f89.bundle.js → 21.db9a15c2ce6264384788.bundle.js} +1 -1
- package/dist/{22.035be7329fd099903c2b.bundle.js → 22.1408d06830b72a459d6a.bundle.js} +1 -1
- package/dist/{23.f499db643c1d187eefe1.bundle.js → 23.e6835ca70f33d8babcca.bundle.js} +1 -1
- package/dist/231.909faa919088245e9988.bundle.js +1 -1
- package/dist/{24.057be6f617f4e3f35691.bundle.js → 24.8fbf33e98e7c306e8ea8.bundle.js} +1 -1
- package/dist/{242.c2143bfd879222a393dc.bundle.js → 242.2aceac5a4d9f377f3553.bundle.js} +1 -1
- package/dist/{243.ed8bd30b9501bcb22fd3.bundle.js → 243.35701551c53ddd41d3e2.bundle.js} +1 -1
- package/dist/{248.35714eeadd519aa9dfcf.bundle.js → 248.b1fb4b93555c3f69bc46.bundle.js} +1 -1
- package/dist/{25.25d1fdcb1cbeafd51681.bundle.js → 25.6f945a6e26e6daa27763.bundle.js} +1 -1
- package/dist/{258.af0b3d78c0f9b4c4b483.bundle.js → 258.fc7172db37e5b0ca1279.bundle.js} +1 -1
- package/dist/{26.3aa8a6a7f10039840838.bundle.js → 26.76be6828c642933221c3.bundle.js} +1 -1
- package/dist/{264.c6d038d027b8f5579b62.bundle.js → 264.8e759dd1686c37c32b07.bundle.js} +1 -1
- package/dist/{287.4f8a30c6c6c72ebafedb.bundle.js → 287.a750fc40fa90418f3d6d.bundle.js} +1 -1
- package/dist/{29.33b92413c2f0a708b821.bundle.js → 29.5ec5948f2e30819e6dc8.bundle.js} +1 -1
- package/dist/{3.77b848d2eb7fdb2523b0.bundle.js → 3.33dccf88ff294b9ba7cf.bundle.js} +1 -1
- package/dist/{30.f818533689767fa3e2ca.bundle.js → 30.a60e3c2ac0de3b37e185.bundle.js} +1 -1
- package/dist/31.7452fe0f096c31a9a1f1.bundle.js +2 -0
- package/dist/{312.0e853d11527c8a2fc070.bundle.js → 312.c03a255fbafa0d4335b7.bundle.js} +1 -1
- package/dist/{32.e14fc108d80a26925f88.bundle.js → 32.14b30077e63f4b1b729a.bundle.js} +1 -1
- package/dist/{322.6524ee61a5bbcdc82bad.bundle.js → 322.34c7ffacecadc1dff436.bundle.js} +1 -1
- package/dist/{33.fec387c3be8b00368957.bundle.js → 33.da597e608351b4872771.bundle.js} +1 -1
- package/dist/{332.2db32da5af5ac8856a0c.bundle.js → 332.eb8ac0b7d982535eb48b.bundle.js} +1 -1
- package/dist/{334.2970372fd546db2cd792.bundle.js → 334.85e45ef3709738a8c800.bundle.js} +1 -1
- package/dist/{335.b445bf889c4bfaa20ded.bundle.js → 335.5a6a3768096f7e02a5a3.bundle.js} +1 -1
- package/dist/{34.61223a86d6cb125fc2c8.bundle.js → 34.51476f9015bca2457953.bundle.js} +1 -1
- package/dist/{348.a113e5a47d253a04ee81.bundle.js → 348.da14c1b3111036fe2e02.bundle.js} +1 -1
- package/dist/{35.1b457bfdeea08b897d25.bundle.js → 35.dec1963ba9e2a21fdbec.bundle.js} +1 -1
- package/dist/{353.8dbc0f6a10d578ed65d8.bundle.js → 353.5ca0dd499b0e4ec5a228.bundle.js} +1 -1
- package/dist/{36.54cce0e26c592b832258.bundle.js → 36.5bdd80f32426b30c458d.bundle.js} +1 -1
- package/dist/{363.7a3d9b6e636d736c57b1.bundle.js → 363.fe7a10fbfe3ad1a31725.bundle.js} +1 -1
- package/dist/{37.be47535106d4b3dbc077.bundle.js → 37.3e74a6a07640c4d8db96.bundle.js} +1 -1
- package/dist/{38.79bf8cac11760d2e69be.bundle.js → 38.8819c36a5204129f3dbc.bundle.js} +1 -1
- package/dist/{381.aea7ee474ca60accc01b.bundle.js → 381.7705312c8cedfe733a17.bundle.js} +1 -1
- package/dist/{382.c69f3647cc33ace74db4.bundle.js → 382.3b6533fe63bb7b89d2a6.bundle.js} +1 -1
- package/dist/{385.559499835625e3e755d3.bundle.js → 385.93498ab442f8c50fadbc.bundle.js} +1 -1
- package/dist/{39.051d67965709d49db0ab.bundle.js → 39.8be9b0247c3518abbf8b.bundle.js} +1 -1
- package/dist/{392.96254712f6158ac44044.bundle.js → 392.fd509c86891257f9777f.bundle.js} +1 -1
- package/dist/399.0a3aec07fe2383cc35ba.bundle.js +1 -0
- package/dist/{40.9208517ef50b6f8024c6.bundle.js → 40.2747ad0262dc133c782c.bundle.js} +1 -1
- package/dist/404.163e08fb2eeea2362f8a.bundle.js +1 -0
- package/dist/{41.0d8779a7af2eb26cf157.bundle.js → 41.c6545eb0ce13e63738d2.bundle.js} +1 -1
- package/dist/410.b74d59055b7cf830abe5.bundle.js +1 -0
- package/dist/416.68f6286f80654cdbe4e4.bundle.js +1 -1
- package/dist/417.70adf0a6f0571c394764.bundle.js +1 -1
- package/dist/42.baaa159c3b1e81422600.bundle.js +1 -0
- package/dist/423.6edb13ec0cf08388c947.bundle.js +1 -1
- package/dist/424.725b821051516e73783a.bundle.js +1 -1
- package/dist/425.03fcf969da1a4e92fec3.bundle.js +1 -1
- package/dist/426.aa6924f6f1192d037009.bundle.js +1 -1
- package/dist/427.5c7b72141707b841e8a3.bundle.js +1 -1
- package/dist/428.0d471ce7c68654947c04.bundle.js +1 -1
- package/dist/{43.96e8540045f061114280.bundle.js → 43.46cf7aa71531400f5ce3.bundle.js} +1 -1
- package/dist/{44.45a26f697588279fbc60.bundle.js → 44.ec337831549cfeaab224.bundle.js} +1 -1
- package/dist/443.969280af4067a22d1a8b.bundle.js +1 -1
- package/dist/444.a5971579184b091ed392.bundle.js +1 -1
- package/dist/445.2b20cb9e68a11879f6c4.bundle.js +1 -1
- package/dist/446.fe3cf3d6e288c8c4444b.bundle.js +1 -1
- package/dist/447.d1d078921f6f28e2fa38.bundle.js +1 -1
- package/dist/448.d6c9bed6d99b8b23619f.bundle.js +1 -1
- package/dist/{45.8c13732f2859713c90c4.bundle.js → 45.e79cfcb4606177c83d29.bundle.js} +1 -1
- package/dist/{46.f04ca39b752caadd9714.bundle.js → 46.db4b433aebdbb6965f9d.bundle.js} +1 -1
- package/dist/468.8e259940c62a68ef3055.bundle.js +1 -1
- package/dist/{47.5773e1581c385ba39851.bundle.js → 47.89ad9da6a07545789631.bundle.js} +1 -1
- package/dist/{48.06454bbe08df5938e67a.bundle.js → 48.8726b8de8055297cec7c.bundle.js} +1 -1
- package/dist/480.379bf3b338e0a3224a1f.bundle.js +1 -1
- package/dist/481.0387239b174f787e70ea.bundle.js +1 -1
- package/dist/483.c81275cb05dd78ce389f.bundle.js +1 -1
- package/dist/484.25a82c267c3a705d2a65.bundle.js +1 -1
- package/dist/485.91cbfbfd37eccde375c9.bundle.js +1 -1
- package/dist/488.a69dcce23066c0dafdf7.bundle.js +1 -1
- package/dist/489.a976085b601cccf438d4.bundle.js +1 -1
- package/dist/49.ec8921fc54aaae50ca52.bundle.js +1 -0
- package/dist/490.d3e0f3e499b5a24f6808.bundle.js +1 -1
- package/dist/491.62c185868f9d99dd5713.bundle.js +1 -1
- package/dist/5.163df03f5440d982d268.bundle.js +2 -0
- package/dist/50.4886e820614f9dadb147.bundle.js +1 -0
- package/dist/{51.676e3d8a0e328ad836ed.bundle.js → 51.014f0ee2c2a7ff9ce3ff.bundle.js} +1 -1
- package/dist/{52.cfdfa7095a554e758861.bundle.js → 52.85c3ec8030d92959e556.bundle.js} +1 -1
- package/dist/{54.c54ba6791e3926ebb553.bundle.js → 54.f1ed20f259011ef082b2.bundle.js} +1 -1
- package/dist/{55.fb160be660f713a3d6a1.bundle.js → 55.3262334c9d8a63b347ab.bundle.js} +1 -1
- package/dist/{56.a97521bde50d8e02ab1d.bundle.js → 56.f9d140f83b5462444e57.bundle.js} +1 -1
- package/dist/{57.ec17cacc850ae1904aeb.bundle.js → 57.fcd6814bee867f2345e7.bundle.js} +1 -1
- package/dist/{58.0c8ce6607800bf7ff0ac.bundle.js → 58.914f27e1a230e164d29b.bundle.js} +1 -1
- package/dist/{59.47183b72936629232e7f.bundle.js → 59.a7f0559fb46565813cf0.bundle.js} +1 -1
- package/dist/{6.33f8c6c7e324640238de.bundle.js → 6.0bfc114054ad3b233305.bundle.js} +1 -1
- package/dist/{60.046829a1be3f196bef1c.bundle.js → 60.6c9b4c93b093288c7649.bundle.js} +1 -1
- package/dist/{61.f625328fcc0d35aa07a4.bundle.js → 61.424616e10051d7cdbc93.bundle.js} +1 -1
- package/dist/{62.842d67b8758eed682f2c.bundle.js → 62.c335ec2480066d4422a9.bundle.js} +1 -1
- package/dist/63.e55beded50a778a97299.bundle.js +1 -0
- package/dist/{63.c3630cbfa8f6884a417d.bundle.js → 64.7a62b6f780380840f244.bundle.js} +1 -1
- package/dist/{64.91ba76d42905a3d9afbe.bundle.js → 65.8d5f1b79d228176db399.bundle.js} +1 -1
- package/dist/{65.198a4d69873309746593.bundle.js → 66.75d04ae3be915ecd5afe.bundle.js} +1 -1
- package/dist/{66.b7385a74d4f3287237ba.bundle.js → 67.dbc1e4410498f4ceae46.bundle.js} +1 -1
- package/dist/{67.3488f2543baf36d3c494.bundle.js → 68.aeae93de29be6d346977.bundle.js} +1 -1
- package/dist/{68.4e51b896e74fbd145701.bundle.js → 69.3024e70e93884b7138eb.bundle.js} +1 -1
- package/dist/{69.a2244fec1e7110f5aeec.bundle.js → 70.f982fe4a8c44d2ef72a6.bundle.js} +1 -1
- package/dist/{70.0b30be583854923aadc1.bundle.js → 71.8ffc1c2036362cf40526.bundle.js} +1 -1
- package/dist/{71.24d20933fd9614cf27af.bundle.js → 72.a47d3fdd3239098987a8.bundle.js} +1 -1
- package/dist/{72.5d2f018d17e995bc6455.bundle.js → 73.1d8cf985f584d6a29f1b.bundle.js} +1 -1
- package/dist/{73.3f407c010a17e4a109b9.bundle.js → 74.70762fed64c1503da986.bundle.js} +1 -1
- package/dist/{74.1d496e6a8dc0abfcbe04.bundle.js → 75.e464e055d7b66bf2fc93.bundle.js} +1 -1
- package/dist/76.fc1058890354a7ee6abe.bundle.js +1 -0
- package/dist/{76.9ca923a9265537ac7be4.bundle.js → 77.bf8560beda63d53b83c2.bundle.js} +1 -1
- package/dist/{77.f53fbf119a8b73148a25.bundle.js → 78.eecf35e4f25434df649e.bundle.js} +1 -1
- package/dist/{78.933cb90bda144ed95290.bundle.js → 79.074403a4200f684a0945.bundle.js} +1 -1
- package/dist/{8.3cf83e59a56858648ad9.bundle.js → 8.e3c3c3676785a030527d.bundle.js} +1 -1
- package/dist/{79.6e0224e241895965a9d3.bundle.js → 80.07a80c5fe69c039db15d.bundle.js} +1 -1
- package/dist/{80.f7d6d3108e6d18b96cd7.bundle.js → 81.234a3c0b3136c4a55730.bundle.js} +1 -1
- package/dist/{81.b79dd505cb205eb7eff0.bundle.js → 82.3e71f24921a2283967c3.bundle.js} +1 -1
- package/dist/{82.cd869e55416407b078e0.bundle.js → 83.cf2e3938d315b0470906.bundle.js} +1 -1
- package/dist/{83.b085735389d935aa6f42.bundle.js → 84.c1e18d720b266e35aec2.bundle.js} +1 -1
- package/dist/{84.7f9377fc605aff3f0d48.bundle.js → 85.7dc677e973a2dfcddfea.bundle.js} +1 -1
- package/dist/86.adb4b3504c93eb726fcd.bundle.js +1 -0
- package/dist/{85.8a74811c261c635235f7.bundle.js → 87.ddab9647e5ff9f432212.bundle.js} +1 -1
- package/dist/{86.c491436398aef8142dc3.bundle.js → 88.e04e9207f68a222a8a64.bundle.js} +1 -1
- package/dist/{87.cf9f719c3dd04bc64102.bundle.js → 89.51eac4bd9aa2668b96fb.bundle.js} +1 -1
- package/dist/{88.7d844f12b9d68b0be1d7.bundle.js → 90.ac1501d736615a2bc7f6.bundle.js} +1 -1
- package/dist/{89.2c1bcd6a70ba8769b6b9.bundle.js → 91.4c80dbc7c0af8d2d07f5.bundle.js} +1 -1
- package/dist/{90.b93a0ecac4f5bcfeed0f.bundle.js → 92.69c6a0625b9e94d1a9df.bundle.js} +1 -1
- package/dist/{91.44e1598ed46ac2197521.bundle.js → 93.4e0f1104ab14c3dfae71.bundle.js} +1 -1
- package/dist/{92.e81e734ef32fe8b56d78.bundle.js → 94.62f609daaeaf1e0b9f63.bundle.js} +1 -1
- package/dist/{93.6486890affff9e0f6ca8.bundle.js → 95.2c784e759051491850fb.bundle.js} +1 -1
- package/dist/{94.13212f8f2d50c66cb482.bundle.js → 96.22c66e3781a4afc22d1a.bundle.js} +1 -1
- package/dist/{95.6fe91e68bef2c41f2645.bundle.js → 97.856052734f379717d4cc.bundle.js} +1 -1
- package/dist/{96.4bd66eace72867bf76e1.bundle.js → 98.be86330473bf291530fa.bundle.js} +1 -1
- package/dist/{97.4cfafc4c6cedd50e973e.bundle.js → 99.6af4734887301734ebbe.bundle.js} +1 -1
- package/dist/{bundle.e7ff3a088b4fc9e2ec9e.bundle.js → bundle.fc37b3e514d7594f55be.bundle.js} +19 -19
- package/dist/css/autocomplete.css +5 -0
- package/dist/css/clustermanagement.css +10 -7
- package/dist/css/rdf-class-hierarchy.css +1 -1
- package/dist/i18n/locale-en.json +11 -1
- package/dist/i18n/locale-fr.json +11 -1
- package/dist/index.html +3 -3
- package/dist/js/angular/autocomplete/templates/modal/add-label.html +5 -2
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +16 -7
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.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/shuttle-multiselect/templates/shuttle-multiselect.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/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- 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 +2 -2
- 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 +4 -4
- 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 +9 -11
- 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 +2 -2
- package/dist/102.2b1c8399187ccefe5a4f.bundle.js +0 -1
- package/dist/11.7343b4e08a786f0a1eab.bundle.js +0 -1
- package/dist/12.3669f82ad6489ffeb12b.bundle.js +0 -1
- package/dist/154.89f16e758f1caaae814c.bundle.js +0 -1
- package/dist/160.90a42dd6a992307c602d.bundle.js +0 -1
- package/dist/31.721783158dcfdee0b882.bundle.js +0 -2
- package/dist/399.b13be7ef0c258335c762.bundle.js +0 -1
- package/dist/404.00ef41fe988cd9161359.bundle.js +0 -1
- package/dist/410.a86d6bdafde1b951e239.bundle.js +0 -1
- package/dist/42.0147219d61d3814c266c.bundle.js +0 -1
- package/dist/49.6b885bb67696745b1634.bundle.js +0 -1
- package/dist/5.045fbb4da4ea6659e905.bundle.js +0 -2
- package/dist/50.ee3ed147b2bc2382a0a2.bundle.js +0 -1
- package/dist/75.0e43af19262a978d6aab.bundle.js +0 -1
- package/dist/98.6586c3413d178a0cab8c.bundle.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[29,20,30,35,36,47,67,68,72,81,88,95,120,148,149,150,171,174,179,180,242,259,318,319,354,363,378,379,383,384,385],{102:function(t,e,n){"use strict";n.r(e),n.d(e,"TTYGEventName",(function(){return r}));var o=n(24);function i(t){var e=void 0,n=void 0,i=void 0,a=void 0,s={},c=void 0,u=!1,l=function(){return Object(o.cloneDeep)(e)},d=function(){return Object(o.cloneDeep)(n)},g=function(t){n=Object(o.cloneDeep)(t),T(r.CHAT_LIST_UPDATED,d())},f=function(){return Object(o.cloneDeep)(i)},p=function(){return Object(o.cloneDeep)(a)},m=function(){return Object(o.cloneDeep)(s)},h=function(t){return!!s[t]},y=function(){return u},T=function(e,n){t.emitSync(e,Object(o.cloneDeep)(n))},v=function(e,n){return t.subscribeSync(e,(function(t){return n(t)}))};return{resetContext:function(){e=void 0,n=void 0,i=void 0,a=void 0,s={},c=void 0,u=!1},emit:T,subscribe:v,getChats:d,updateChats:g,addChat:function(t){n.appendChat(t),g(n)},replaceChat:function(t,e){n.replaceChat(t,e),g(n)},onChatsListChanged:function(t){return n&&angular.isFunction(t)&&t(d()),v(r.CHAT_LIST_UPDATED,(function(e){return t(e)}))},getSelectedChat:f,selectChat:function(t){i&&i.id===t.id||(i=Object(o.cloneDeep)(t),T(r.SELECT_CHAT,f()))},deselectChat:function(){i=void 0,T(r.SELECT_CHAT,f())},deleteChat:function(t){n.deleteChat(t),g(n)},onSelectedChatChanged:function(t){return angular.isFunction(t)&&t(f()),v(r.SELECT_CHAT,(function(e){return t(e)}))},updateSelectedChat:function(t){i&&i.id&&t&&i.id!==t.id||(i=Object(o.cloneDeep)(t),T(r.SELECTED_CHAT_UPDATED,f()))},onSelectedChatUpdated:function(t){return i&&angular.isFunction(t)&&t(f()),v(r.SELECTED_CHAT_UPDATED,(function(e){return t(e)}))},onLastMessageReceived:function(t){return i&&angular.isFunction(t)&&t(f()),v(r.LAST_MESSAGE_RECEIVED,(function(e){return t(e)}))},updateAgents:function(t){e=Object(o.cloneDeep)(t),T(r.AGENT_LIST_UPDATED,l())},onAgentsListChanged:function(t){return e&&angular.isFunction(t)&&t(l()),v(r.AGENT_LIST_UPDATED,(function(e){return t(e)}))},getAgents:l,getAgent:function(t){if(e)return Object(o.cloneDeep)(e.getAgent(t))},selectAgent:function(t){a=Object(o.cloneDeep)(t),T(r.AGENT_SELECTED,p())},getSelectedAgent:p,onSelectedAgentChanged:function(t){return a&&angular.isFunction(t)&&t(p()),v(r.AGENT_SELECTED,(function(e){return t(e)}))},getDefaultAgent:function(){return Object(o.cloneDeep)(c)},setDefaultAgent:function(t){c=t},setCanModifyAgent:function(t){u=Object(o.cloneDeep)(t),T(r.CAN_MODIFY_AGENT_UPDATED,y())},getCanModifyAgent:y,onCanUpdateAgentUpdated:function(t){return angular.isFunction(t)&&t(y()),v(r.CAN_MODIFY_AGENT_UPDATED,(function(e){return t(e)}))},hasExplainResponse:h,toggleExplainResponse:function(t){h(t)&&(s[t].expanded=!s[t].expanded,T(r.EXPLAIN_RESPONSE_CACHE_UPDATED,m()))},getExplainResponse:function(t){return Object(o.cloneDeep)(s[t])},addExplainResponseCache:function(t){s[t.answerId]=Object(o.cloneDeep)(t),T(r.EXPLAIN_RESPONSE_CACHE_UPDATED,m())},onExplainResponseCacheUpdated:function(t){return angular.isFunction(t)&&t(m()),v(r.EXPLAIN_RESPONSE_CACHE_UPDATED,(function(e){return t(e)}))}}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",i),i.$inject=["EventEmitterService","TTYGService"];var r={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}},106:function(t,e,n){"use strict";n.r(e),n.d(e,"SimilarityIndexType",(function(){return o}));var o={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:function(t){return o.TEXT===t},isTextLiteralType:function(t){return o.TEXT_LITERAL===t},isPredicationType:function(t){return o.PREDICATION===t}}},107:function(t,e,n){"use strict";n.r(e),n.d(e,"SimilarityIndexStatus",(function(){return o}));var o={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:function(t){return o.CREATING===t},isBuildingStatus:function(t){return o.BUILDING===t},isBuiltStatus:function(t){return o.BUILT===t},isRebuildingStatus:function(t){return o.REBUILDING===t},isOutdatedStatus:function(t){return o.OUTDATED===t},isInterruptedStatus:function(t){return o.INTERRUPTED===t},isObsoleteStatus:function(t){return o.OBSOLETE===t},isFailedStatus:function(t){return o.FAILED===t}}},110:function(t,e,n){"use strict";n.r(e),n.d(e,"SimilarityIndex",(function(){return c}));var o=n(106),i=n(107);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,s(o.key),o)}}function s(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),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=""},(e=[{key:"isTextType",value:function(){return o.SimilarityIndexType.isTextType(this.type)}},{key:"isTextLiteralType",value:function(){return o.SimilarityIndexType.isTextLiteralType(this.type)}},{key:"isPredicationType",value:function(){return o.SimilarityIndexType.isPredicationType(this.type)}},{key:"isCreatingStatus",value:function(){return i.SimilarityIndexStatus.isCreatingStatus(this.status)}},{key:"isBuildingStatus",value:function(){return i.SimilarityIndexStatus.isBuildingStatus(this.status)}},{key:"isBuiltStatus",value:function(){return i.SimilarityIndexStatus.isBuiltStatus(this.status)}},{key:"isRebuildingStatus",value:function(){return i.SimilarityIndexStatus.isRebuildingStatus(this.status)}},{key:"isOutdatedStatus",value:function(){return i.SimilarityIndexStatus.isOutdatedStatus(this.status)}},{key:"isInterruptedStatus",value:function(){return i.SimilarityIndexStatus.isInterruptedStatus(this.status)}},{key:"isObsoleteStatus",value:function(){return i.SimilarityIndexStatus.isObsoleteStatus(this.status)}},{key:"isFailedStatus",value:function(){return i.SimilarityIndexStatus.isFailedStatus(this.status)}}])&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}()},111:function(t,e){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",n),n.$inject=["$http"];function n(t){return{getConnectors:function(e,n){if(e)return t.get("rest/connectors",{headers:{"X-GraphDB-Repository":e,"X-GraphDB-Repository-Location":n}});return t.get("rest/connectors")},initConnector:function(e){return t.get("".concat("rest/connectors","/options?prefix=").concat(e))},hasConnector:function(e,n,o){if(n)return t.get("".concat("rest/connectors","/existing?prefix=").concat(e),{headers:{"X-GraphDB-Repository":n,"X-GraphDB-Repository-Location":o}});return t.get("".concat("rest/connectors","/existing?prefix=").concat(e))},checkConnector:function(e){return t.post("".concat("rest/connectors","/check"),e,{headers:{"Content-Type":"text/plain"}})}}}},117:function(t,e,n){"use strict";n.r(e),n.d(e,"mapIndexesResponseToSimilarityIndex",(function(){return i}));var o=n(110),i=function(t){return t.map((function(t){var e=new o.SimilarityIndex;return e.type=t.type,e.stopList=t.stopList,e.status=t.status,e.selectQuery=t.selectQuery,e.searchQuery=t.searchQuery,e.sameAs=t.sameAs,e.options=t.options,e.name=t.name,e.infer=t.infer,e.analyzer=t.analyzer,e.analogicalQuery=t.analogicalQuery,e}))}},122:function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,s(o.key),o)}}function a(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}n.r(e),n.d(e,"ConnectorTypesListModel",(function(){return c})),n.d(e,"ConnectorTypeModel",(function(){return u})),n.d(e,"ConnectorListModel",(function(){return l})),n.d(e,"ConnectorModel",(function(){return d})),n.d(e,"ConnectorSettingsModel",(function(){return g}));var c=function(){return a((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this._connectors=e.connectors||[]}),[{key:"getConnectorByName",value:function(t){return this._connectors.find((function(e){return e.name===t}))}},{key:"connectors",get:function(){return this._connectors},set:function(t){this._connectors=t}}])}(),u=function(){return a((function t(e){i(this,t),this._name=e.name,this._prefix=e.prefix}),[{key:"name",get:function(){return this._name},set:function(t){this._name=t}},{key:"prefix",get:function(){return this._prefix},set:function(t){this._prefix=t}}])}(),l=function(){return a((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];i(this,t),this._connectors=e.connectors}),[{key:"connectors",get:function(){return this._connectors},set:function(t){this._connectors=t}}])}(),d=function(){return a((function t(e){i(this,t),this._name=e.name,this._settings=new g(e)}),[{key:"settings",get:function(){return this._settings},set:function(t){this._settings=t}},{key:"name",get:function(){return this._name},set:function(t){this._name=t}}])}(),g=function(){return a((function t(e){i(this,t),this._settings=e.values||{}}),[{key:"settings",get:function(){return this._settings},set:function(t){this._settings=t}}])}()},123:function(t,e){angular.module("graphdb.framework.rest.similarity.service",[]).factory("SimilarityRestService",n),n.$inject=["$http","$repositories"];function n(t){return{getIndexes:function(e,n){if(e)return t.get("rest/similarity",{headers:{"X-GraphDB-Repository":e,"X-GraphDB-Repository-Location":n}});return t.get("rest/similarity")},getSearchQueries:function(){return t.get("".concat("rest/similarity","/config"))},rebuildIndex:function(t){return e("PUT",t.name,t.options,t.selectQuery,t.searchQuery,t.analogicalQuery,t.stopList,t.infer,t.sameAs,t.type)},deleteIndex:function(e){return t.delete("".concat("rest/similarity","?name=").concat(e.name))},createIndex:e,getSamples:function(){return t.get("".concat("rest/similarity","/samples"))},getQuery:function(e){return t.get("rest/similarity/query",{params:{name:e.indexName,options:e.indexOptions,stopList:e.indexStopList,selectQuery:e.query,infer:e.queryInference,sameAs:e.querySameAs,type:e.viewType,analyzer:e.indexAnalyzer}})},saveSearchQuery:function(e){return t({method:"put",url:"rest/similarity/search-query",data:e})}};function e(e,n,o,i,r,a,s,c,u,l,d){return t({method:e,url:"".concat("rest/similarity"),noCancelOnRouteChange:!0,data:{name:n,options:o,selectQuery:i,stopList:s,infer:c,sameAs:u,type:l,analyzer:d,searchQuery:r,analogicalQuery:a}})}}},125:function(t,e,n){"use strict";n.r(e);n(111);var o=n(134),i=n(25);function r(t){var e=function(e,n){return t.getConnectors(e,n).then((function(t){return Object(o.connectorTypesListMapper)(t.data)}))},n=function(e,n,i){return t.hasConnector(encodeURIComponent(e),n,i).then((function(t){return Object(o.connectorsMapper)(t.data)}))};return{getConnectorTypes:e,getConnectorsByType:n,getConnectorPrefixByName:function(t,n,o){return e(n,o).then((function(e){var n=e.getConnectorByName(t);return n?n.prefix:null}))},getConnectorsByTypeAsSelectMenuOptions:function(t,e,o){return n(t,e,o).then((function(t){return t.connectors.map((function(t){return new i.SelectMenuOptionsModel({value:t.name,label:t.name})}))}))}}}angular.module("graphdb.framework.core.services.connectors",["graphdb.framework.rest.connectors.service"]).factory("ConnectorsService",r),r.$inject=["ConnectorsRestService"]},127:function(t,e,n){"use strict";n.r(e);n(123);var o=n(117),i=n(25);function r(t){var e=function(e,n){return t.getIndexes(e,n).then((function(t){return Object(o.mapIndexesResponseToSimilarityIndex)(t.data)}))};return{getIndexes:e,getIndexesAsMenuModel:function(t,n){return e(t,n).then((function(t){return t.map((function(t){return new i.SelectMenuOptionsModel({label:t.name,value:t.name})}))}))}}}angular.module("graphdb.framework.core.services.similarity",["graphdb.framework.rest.similarity.service"]).factory("SimilarityService",r),r.$inject=["SimilarityRestService"]},131:function(t,e,n){"use strict";n.r(e),n.d(e,"markdownCodeCopyPlugin",(function(){return r}));var o={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function i(t,e){return e=_.merge({},o,e),function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var r=o[0],a=o[1],s=r[a],c=r[a].content.replaceAll('"',""").replaceAll("'","'"),u=t.apply(void 0,o);return"fence"===s.type&&u.trim()?'<div style="position: relative">\n '.concat(u,'\n <copy-to-clipboard\n style="').concat(e.buttonStyle,'"\n class="').concat(e.buttonClass,'"\n tooltip-text="ttyg.chat_panel.btn.copy_sparql.tooltip"\n text-to-copy="').concat(c,'">\n </copy-to-clipboard>\n </div>'):u}}var r=function(t,e){t.renderer.rules.code_block=i(t.renderer.rules.code_block,e),t.renderer.rules.fence=i(t.renderer.rules.fence,e)}},132:function(t,e,n){"use strict";n.r(e),n.d(e,"markdownOpenInSparqlEditorPlugin",(function(){return r}));var o={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function i(t,e){return e=_.merge({},o,e),function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var r=o[0],a=o[1],s=r[a],c=r[a].content.replaceAll('"',""").replaceAll("'","'"),u=t.apply(void 0,o);return"fence"===s.type&&"sparql"===s.info&&u.trim()?'<div style="position: relative">\n '.concat(u,'\n <open-in-sparql-editor\n style="').concat(e.buttonStyle,'"\n class="').concat(e.buttonClass,'"\n execute-query="').concat(e.executeQuery,'"\n repository-id="').concat(e.repositoryId,'"\n query="').concat(c,'">\n </open-in-sparql-editor>\n </div>'):u}}var r=function(t,e){t.renderer.rules.code_block=i(t.renderer.rules.code_block,e),t.renderer.rules.fence=i(t.renderer.rules.fence,e)}},134:function(t,e,n){"use strict";n.r(e),n.d(e,"connectorTypesListMapper",(function(){return i})),n.d(e,"connectorsMapper",(function(){return r}));var o=n(122),i=function(t){var e=new o.ConnectorTypesListModel;return t?(e.connectors=Object.keys(t).map((function(e){return new o.ConnectorTypeModel({name:e,prefix:t[e]})})),e):e},r=function(t){var e=new o.ConnectorListModel;return t?(e.connectors=t.map((function(t){return new o.ConnectorModel(t)})),e):e}},138:function(t,e,n){"use strict";n.r(e),n.d(e,"getHumanReadableTimestamp",(function(){return o}));var o=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)return"";var i=new Date(n),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(a.getDate()-1);var c=new Date(i.getFullYear(),i.getMonth(),i.getDate()),u=o.timeFormat?e("date")(i,o.timeFormat):"";if(c.getTime()===a.getTime())return t.instant("common.dates.today")+u;if(c.getTime()===s.getTime())return t.instant("common.dates.yesterday")+u;var l=o.dateFormat||"yyyy-MM-dd";return e("date")(i,l)+u}},145:function(t,e,n){"use strict";n.r(e);var o=n(669),i=n(131),r=n(132),a={buttonStyle:"position: absolute; top: 0; right: 0; margin-right: 24px"};function s(t){var e=Object(o.a)().use(i.markdownCodeCopyPlugin).use(r.markdownOpenInSparqlEditorPlugin,a);return{renderMarkdown:function(n,s){try{return t.trustAsHtml(function(t){return t?Object(o.a)().use(i.markdownCodeCopyPlugin,t).use(r.markdownOpenInSparqlEditorPlugin,_.merge({},a,t)):e}(s).render(n))}catch(e){return console.error("Error rendering markdown:",e),t.trustAsHtml(n)}}}}angular.module("graphdb.framework.core.services.markdown-service",[]).service("MarkdownService",s),s.$inject=["$sce"]},164:function(t,e){function n(t){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(e,n){e.editableModel={};var o,i=[];e.onKeydown=function(t){"Enter"===t.key?(a(),e.editableModel.text!==e.text&&e.onSave({newText:e.editableModel.text,source:e.source})):"Escape"===t.key&&r()},e.onCancelEditing=function(){r()},e.onSelect=function(){o?(a(),e.onDblclick({source:e.source})):o=t((function(){e.onClick({source:e.source}),a()}),250)};var r=function(){a(),e.onCancel()},a=function(){t.cancel(o),o=void 0};i.push(e.$watch("isEditing",(function(o){o&&(e.editableModel.text=e.source[e.fieldName],t((function(){var t=n.find("input")[0];t.focus(),t.select()}),0))})));e.$on("$destroy",(function(){i.forEach((function(t){return t()})),a()}))}}}angular.module("graphdb.framework.core.directives.inline-editable-text",[]).directive("inlineEditableText",n),n.$inject=["$timeout"]},165:function(t,e,n){"use strict";n.r(e);n(145);function o(t,e){return{template:'<div class="markdown-content" ng-bind-html="markdownContent"></div>',restrict:"E",scope:{content:"@",options:"="},link:function(n,o){n.markdownContent=void 0;var i=function(){n.$evalAsync((function(){var e=o.find(".markdown-content");t(angular.element(e).contents())(n)}))};n.markdownContent=e.renderMarkdown(n.content,n.options),i()}}}angular.module("graphdb.framework.core.directives.markdown-content",["graphdb.framework.core.services.markdown-service"]).directive("markdownContent",o),o.$inject=["$compile","MarkdownService"]},166:function(t,e,n){"use strict";n.r(e);var o=n(1);function i(t,e,n,i){return{template:'\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class="btn btn-link btn-sm open-in-sparql-editor-btn" gdb-tooltip="{{\'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip\' | translate}}" ng-click="onGoToSparqlEditorView()" guide-selector="open-in-sparql-editor-btn">\n <i class="fa fa-bracket-curly"></i><i class="fa fa-ellipsis"></i><i class="fa fa-bracket-curly-right"></i>\n </button>\n ',restrict:"E",scope:{query:"@",repositoryId:"@",executeQuery:"@"},link:function(r,a){r.tooltipText="ttyg.chat_panel.btn.open_in_sparql_editor.tooltip";var s="true"===r.executeQuery;r.onGoToSparqlEditorView=function(){var i=t.getActiveRepository();i&&i===r.repositoryId?c(r.query):n.openConfirmationModal({title:e.instant("common.confirm"),message:Object(o.decodeHTML)(e.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:r.repositoryId})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},(function(){t.setRepository(t.getRepository(r.repositoryId)),c(r.query)}))};var c=function(t){i.open("/sparql?query=".concat(encodeURIComponent(t),"&execute=").concat(s),"_blank")}}}}angular.module("graphdb.framework.core.directives.open-in-sparql-editor",[]).directive("openInSparqlEditor",i),i.$inject=["$repositories","$translate","ModalService","$window"]},179:function(t,e,n){"use strict";n.r(e);n(127),n(125),n(140),n(26);function o(t,e,n,o,i){t.agentInstructionsExplain=i.agentInstructionsExplain,t.close=function(){e.dismiss({})},t.onCloseAgentInstructionsExplainModal=function(){e.dismiss({})};var r=[];t.$on("$destroy",(function(){r.forEach((function(t){return t()}))}))}angular.module("graphdb.framework.ttyg.controllers.agent-instructions-explain-modal",[]).controller("AgentInstructionsExplainModalController",o),o.$inject=["$scope","$uibModalInstance","ModalService","$translate","dialogModel"]},190:function(t,e,n){"use strict";n.r(e);n(165),n(166);var o=n(102),i=n(142),r=n(138);function a(t,e,n,a,s){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-item-detail.html",scope:{chatItemDetail:"=",showActions:"=",asking:"=",disabled:"=",onRegenerateQuestion:"&",onAskHowDeliveredAnswer:"&"},link:function(c,u,l){c.ExplainQueryType=i.ExplainQueryType,c.repositoryId=void 0,c.markdownContentOptions=void 0,c.agentNameByIdMap={},c.explainResponseModel={},c.loadingExplainResponse={},c.regenerateQuestion=function(){c.onRegenerateQuestion({chatItem:c.chatItemDetail})},c.explainResponse=function(o){n.hasExplainResponse(o)?n.toggleExplainResponse(o):(c.loadingExplainResponse[o]=!0,a.explainResponse(c.chatItemDetail,o).then((function(t){n.addExplainResponseCache(t)})).catch((function(){t.error(e.instant("ttyg.chat_panel.messages.explain_response_failure"))})).finally((function(){return c.loadingExplainResponse[o]=!1})))},c.onAskHowAnswerWasDerived=function(){c.onAskHowDeliveredAnswer()},c.onOpenInSparqlEditor=function(t){c.chatItemDetail.agentId&&n.emit(o.TTYGEventName.GO_TO_SPARQL_EDITOR,{query:t,repositoryId:c.repositoryId})},c.showRawQuery=function(t){var e=t.rawQuery.replace(/\s+/g,""),n=t.query.replace(/\s+/g,"");return e&&e!==n},c.getRepositoryId=function(t){var e=n.getAgent(c.chatItemDetail.agentId);return e?e.repositoryId:""},c.getHumanReadableQuestionTimestamp=function(t){return Object(r.getHumanReadableTimestamp)(e,s,t)};var d=function(){c.chatItemDetail.answers.forEach((function(t){c.explainResponseModel[t.id]=n.getExplainResponse(t.id)}))},g=[];g.push(n.onExplainResponseCacheUpdated((function(){d()}))),g.push(n.onAgentsListChanged((function(){c.agentNameByIdMap=n.getAgents().agentNameByIdMap}))),c.$on("$destroy",(function(){g.forEach((function(t){return t()}))})),c.repositoryId=c.getRepositoryId(),c.markdownContentOptions={repositoryId:c.repositoryId},d()}}}angular.module("graphdb.framework.ttyg.directives.chat-item-detail",["graphdb.framework.core.directives.open-in-sparql-editor","graphdb.framework.core.directives.markdown-content"]).directive("chatItemDetail",a),a.$inject=["toastr","$translate","TTYGContextService","TTYGService","$filter"]},231:function(t,e,n){"use strict";n.r(e),n.d(e,"status",(function(){return o}));var o={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,CONFLICT:409,INTERNAL_SERVER_ERROR:500,SERVICE_UNAVAILABLE:503}},239:function(t,e,n){"use strict";n.r(e);n(164);var o=n(102),i=n(138),r=n(1);function a(t,e,n,a){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-list.html",link:function(s){s.selectedChat=void 0,s.renamedChat=void 0,s.deletingChat=void 0,s.onSelectChatForRenaming=function(t){s.renamedChat=t},s.onSelectChat=function(e){if(!s.selectedChat||s.selectedChat.id!==e.id){var n=t.getChats().getNonPersistedChat();n&&t.deleteChat(n),t.selectChat(e),s.renamedChat=void 0}},s.onDeleteChat=function(i){var a=n.instant("ttyg.dialog.delete.title"),s=Object(r.decodeHTML)(n.instant("ttyg.dialog.delete.body",{chatName:i.name}));e.openConfirmation(a,s,(function(){return t.emit(o.TTYGEventName.DELETE_CHAT,i)}))},s.onRenameChat=function(e,n){n.name=e,s.renamedChat=void 0,t.emit(o.TTYGEventName.RENAME_CHAT,n)},s.onExportChat=function(e){t.emit(o.TTYGEventName.CHAT_EXPORT,e)},s.onCancelChatRenaming=function(){s.renamedChat=void 0},s.getHumanReadableChatGroupTimestamp=function(t){return Object(i.getHumanReadableTimestamp)(n,a,t)};var c=function(t){s.selectedChat=t},u=[];u.push(t.onSelectedChatChanged(c)),u.push(t.onSelectedChatUpdated(c)),u.push(t.onChatsListChanged((function(t){s.chatList=t}))),u.push(t.subscribe(o.TTYGEventName.DELETING_CHAT,(function(t){s.deletingChat=t}))),s.$on("$destroy",(function(){u.forEach((function(t){return t()}))}))}}}angular.module("graphdb.framework.ttyg.directives.chat-list",["graphdb.framework.core.directives.inline-editable-text"]).directive("chatList",a),a.$inject=["TTYGContextService","ModalService","$translate","$filter"]},240:function(t,e,n){"use strict";n.r(e);n(190);var o=n(102),i=n(108),r=n(112),a=n(24),s=n(1),c=n(135);function u(t,e,n,u){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-panel.html",link:function(t,u,l){t.chat=void 0,t.selectedAgent=void 0,t.chatItem=void 0,t.askingChatItem=void 0,t.waitingForLastMessage=!1,t.loadingChat=!0,t.ask=function(){t.chatItem.question.timestamp=Date.now(),t.askingChatItem=Object(a.cloneDeep)(t.chatItem),t.chatItem.chatId?g(t.chatItem):d(),t.chatItem=p(),h(),m()},t.regenerateQuestion=function(e){var n=p();n.setQuestionMessage(e.getQuestionMessage()),n.question.timestamp=Date.now(),t.askingChatItem=n,g(n),h()},t.onKeypressOnInput=function(e){t.askingChatItem||"Enter"!==e.key||e.shiftKey||e.ctrlKey||t.ask()},t.onAskHowDeliveredAnswer=function(){var n=p();n.setQuestionMessage(e.instant("ttyg.chat_panel.btn.derive_answer.label")),n.question.timestamp=Date.now(),t.askingChatItem=Object(a.cloneDeep)(n),g(n),h()},t.getAgentName=function(t){var o=n.getAgent(t);return o?o.name:Object(s.decodeHTML)(e.instant("ttyg.chat_panel.deleted_agent"))};var d=function(){t.waitingForLastMessage=!0,n.emit(o.TTYGEventName.CREATE_CHAT,t.chatItem)},g=function(e){t.waitingForLastMessage=!0,n.emit(o.TTYGEventName.ASK_QUESTION,e)},f=function(){t.chatItem=Object(a.cloneDeep)(t.askingChatItem),t.askingChatItem=void 0,t.waitingForLastMessage=!1},p=function(){var e=new r.ChatItemModel;return e.question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER}),t.chat&&(e.chatId=t.chat.id),t.selectedAgent&&(e.agentId=t.selectedAgent.id),e},m=function(){setTimeout((function(){var t=document.querySelector(".question-input");t&&t.focus()}))},h=function(){setTimeout((function(){var t=u.find(".chat-details")[0];t&&(t.scrollTop=t.scrollHeight)}))},y=function(){t.chat=c.ChatModel.getEmptyChat(),t.loadingChat=!1,t.chatItem=p(),t.askingChatItem=void 0,t.waitingForLastMessage=!1,m()},T=[];T.push(t.$watchCollection("chat.chatHistory.items",h)),T.push(n.onSelectedChatUpdated((function(e){if(t.chat=e,e&&(e.id||!t.askingChatItem)){t.loadingChat=!1;var o=t.chatItem.question.message;if(t.chatItem=p(),t.chatItem.question.message=o,t.askingChatItem=void 0,t.chat){var i=t.chat.chatHistory.getLast();i&&i.agentId&&n.selectAgent(n.getAgent(i.agentId))}m()}}))),T.push(n.onLastMessageReceived((function(){t.waitingForLastMessage=!1}))),T.push(n.onSelectedAgentChanged((function(e){t.selectedAgent=e,t.selectedAgent&&t.chatItem&&(t.chatItem.agentId=t.selectedAgent.id),m()}))),T.push(n.onSelectedChatChanged((function(e){e?(t.loadingChat=e&&e.id,t.chatItem=p(),m()):y()}))),T.push(n.subscribe(o.TTYGEventName.LOAD_CHAT_FAILURE,(function(){t.loadingChat=!1,t.chatItem=p(),m()}))),T.push(n.subscribe(o.TTYGEventName.ASK_QUESTION_FAILURE,f)),T.push(n.subscribe(o.TTYGEventName.CREATE_CHAT_FAILURE,f)),T.push(n.subscribe(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,(function(e){t.chat&&e.id===t.chat.id&&y()}))),t.$on("$destroy",(function(){T.forEach((function(t){return t()}))})),t.chat=c.ChatModel.getEmptyChat(),t.chatItem=p(),m()}}}angular.module("graphdb.framework.ttyg.directives.chat-panel",["graphdb.framework.ttyg.directives.chat-item-detail"]).directive("chatPanel",u),u.$inject=["toastr","$translate","TTYGContextService","$timeout"]},241:function(t,e,n){"use strict";n.r(e);var o=n(1),i=n(102);function r(t,e,n){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-list.html",scope:{agentList:"=",agentListFilterModel:"="},link:function(r,a,s){r.selectedAgent=void 0,r.selectedAgentsFilter=void 0,r.deletingAgent=void 0,r.onEditAgent=function(e){t.emit(i.TTYGEventName.EDIT_AGENT,e)},r.onCloneAgent=function(e){t.emit(i.TTYGEventName.CLONE_AGENT,e)},r.onDeleteAgent=function(r){var a=n.instant("ttyg.agent.delete_agent_modal.title"),s=Object(o.decodeHTML)(n.instant("ttyg.agent.delete_agent_modal.body",{agentName:r.name}));e.openConfirmation(a,s,(function(){return t.emit(i.TTYGEventName.DELETE_AGENT,r)}))},r.onAgentsFilterChange=function(t){r.selectedAgentsFilter=t,r.selectedAgentsFilter&&r.agentList.filterByRepository(r.selectedAgentsFilter.key)};var c=function(){var t=r.agentListFilterModel.find((function(t){return t.selected}));r.selectedAgentsFilter=t||r.agentListFilterModel[0],r.onAgentsFilterChange(r.selectedAgentsFilter)},u=[];u.push(r.$watch("agentListFilterModel",c)),u.push(t.subscribe(i.TTYGEventName.DELETING_AGENT,(function(t){r.deletingAgent=t}))),u.push(t.onSelectedAgentChanged((function(t){r.selectedAgent=t}))),r.$on("$destroy",(function(){u.forEach((function(t){return t()}))})),c()}}}angular.module("graphdb.framework.ttyg.directives.agent-list",[]).directive("agentList",r),r.$inject=["TTYGContextService","ModalService","$translate"]},242:function(t,e,n){"use strict";n.r(e);var o=n(25),i=n(102);function r(t,e,n,r){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:function(n){n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=function(o){if(a(o),n.selectedAgent=o,t.selectAgent(o),o.isRepositoryDeleted){var s=e.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),c=e.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");r.openConfirmation(s,c,(function(){return t.emit(i.TTYGEventName.EDIT_AGENT,o)}))}};var a=function(t){n.agentOptionsList.forEach((function(e){e.selected=e.data.agent===t}))},s=function(t){n.agentOptionsList=t.agents.map((function(t){return new o.SelectMenuOptionsModel({value:t.id,label:t.name,data:{agent:t}})}))},c=[];c.push(t.onAgentsListChanged((function(t){s(t)}))),c.push(t.subscribe(i.TTYGEventName.AGENT_DELETED,(function(e){n.selectedAgent&&n.selectedAgent.id===e.id&&(n.selectedAgent.isDeleted=!0,t.selectAgent(n.selectedAgent))}))),c.push(t.onSelectedAgentChanged((function(t){a(t),n.selectedAgent=t}))),n.$on("$destroy",(function(){c.forEach((function(t){return t()}))}))}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",r),r.$inject=["TTYGContextService","$translate","$sce","ModalService"]},243:function(t,e,n){"use strict";n.r(e);var o=n(102),i=n(17);function r(t,e){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/no-agents-view.html",scope:{},link:function(n){n.canModifyAgent=!1,n.talkToGraphDocumentationLink=i.DocumentationUrlResolver.getDocumentationUrl(e.productShortVersion,"talk-to-graph.html"),n.onCreateAgent=function(){t.emit(o.TTYGEventName.OPEN_AGENT_SETTINGS)};var r=[];r.push(t.onCanUpdateAgentUpdated((function(t){n.canModifyAgent=t}))),n.$on("$destroy",(function(){r.forEach((function(t){return t()}))}))}}}angular.module("graphdb.framework.ttyg.directives.no-agents-view",[]).directive("noAgentsView",r),r.$inject=["TTYGContextService","productInfo"]},244:function(t,e){angular.module("graphdb.framework.ttyg.directives.show-tooltip-on-overflow",[]).directive("showTooltipOnOverflow",(function(){return{link:function(t,e){setTimeout((function(){var n=e[0].querySelector(".editable-text-element");n&&(n.scrollWidth>n.clientWidth?e.attr("title",t.chat.name):e.removeAttr("title"))}),0)}}}))},245:function(t,e,n){"use strict";n.r(e);var o=n(1),i=n(141),r=(n(127),n(125),n(140),n(26),n(179),n(12)),a=n(102),s=n(128),c=n(37);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e,n,u,d,g,f,p,m,h,y,T,v,E,S,A,C){t.AGENT_OPERATION=s.AGENT_OPERATION,t.operation=T.operation,t.savingAgent=!1,t.agentFormModel=T.agentFormModel,t.activeRepositoryInfo=T.activeRepositoryInfo,t.extractionMethodLoaderFlags=l({},i.ExtractionMethod.SIMILARITY,!1),t.activeRepositoryList=T.activeRepositoryList,t.extractionMethods=i.ExtractionMethod,t.additionalExtractionMethods=i.AdditionalExtractionMethod,t.ExtractionMethodTemplates=S,t.showAdvancedSettings=!1,t.showHighTemperatureWarning=!1,t.showSystemInstructionWarning=!1,t.similarityIndexes=[],t.retrievalConnectors=[],t.ftsEnabled=!1,t.autocompleteSuggestions=[],t.toggleExtractionMethod=function(e){e.expanded=e.selected,t.agentSettingsForm.extractionMethods.$setTouched(),x(),G[e.method](e)},t.onExtractionMethodPanelToggle=function(t){t.toggleCollapse(),G[t.method](t)},t.toggleAdditionalExtractionMethod=function(e){e.expanded=e.selected,t.checkAutocompleteIndexEnabled(),k[e.method](e)},t.onAdditionalExtractionMethodPanelToggle=function(t){t.toggleCollapse(),k[t.method](t)},t.getModelHelpMessage=function(){var t=Object(o.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.form.model.hint"));return p.trustAsHtml(t)},t.getFTSDisabledHelpMessage=function(){var e=Object(o.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message",{repositoryEditPage:"#/repository/edit/"+t.agentFormModel.repositoryId}));return p.trustAsHtml(e)},t.getAutocompleteDisabledHelpMessage=function(){var t=Object(o.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.form.additional_query_methods.autocomplete_disabled_message",{autocompleteIndexPage:"#/autocomplete"}));return p.trustAsHtml(t)},t.goToCreateSimilarityView=function(){v.emit(a.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,{repositoryId:t.agentFormModel.repositoryId})},t.goToConnectorsView=function(){v.emit(a.TTYGEventName.GO_TO_CONNECTORS_VIEW,{repositoryId:t.agentFormModel.repositoryId})},t.ok=function(){var e=t.agentFormModel.toPayload();return b[t.operation](e)},t.cancel=function(){e.dismiss({})},t.close=function(){e.dismiss({})},t.updateSimilaritySearchPanel=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();n.selected&&(e&&(n.similarityIndex=null),L(n))},t.updateRetrievalConnectorPanel=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();n.selected&&(e&&(n.retrievalConnectorInstance=null),M(n))},t.checkIfFTSEnabled=function(){t.agentFormModel.repositoryId?t.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod().selected?(t.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!0,f.getRepositoryModel({id:t.agentFormModel.repositoryId}).then((function(e){t.ftsEnabled=e.getParamValue(r.REPOSITORY_PARAMS.enableFtsIndex)})).catch((function(t){w(t,"ttyg.agent.messages.error_repository_config_loading")})).finally((function(){t.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!1,t.agentSettingsForm.$setValidity("FTSDisabled",t.ftsEnabled)}))):t.agentSettingsForm.$setValidity("FTSDisabled",!0):t.agentSettingsForm.$setValidity("FTSDisabled",!1)},t.onRepositoryChange=function(){F(!0,!0)},t.checkAutocompleteIndexEnabled=function(){A.checkAutocompleteStatus().then((function(e){t.autocompleteEnabled=e})).catch((function(t){m.error(getError(t))}))},t.onRestoreDefaultSystemInstructions=function(){t.agentFormModel.instructions.systemInstruction=t.agentFormModel.instructions.systemInstructionCopy},t.onRestoreDefaultUserInstructions=function(){t.agentFormModel.instructions.userInstruction=t.agentFormModel.instructions.userInstructionCopy},t.onTemperatureChange=function(){t.showHighTemperatureWarning=t.agentFormModel.temperature.value>1},t.onSystemInstructionChange=function(){""===t.agentFormModel.instructions.systemInstruction||t.showSystemInstructionWarning||(t.showSystemInstructionWarning=!0,n.openModalAlert({title:y.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title"),message:y.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body")}).result.then((function(){}))),""===t.agentFormModel.instructions.systemInstruction&&(t.showSystemInstructionWarning=!1)},t.onExplainAgentSettings=function(){var e=t.agentFormModel.toPayload();E.explainAgentSettings(e).then((function(t){var e={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:t}}},size:"lg"};u.open(e).result.then((function(){}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))}))},t.getSuggestions=function(e){var n=e.target.value;C.getAutocompleteSuggestions(n).then(c.mapUriAsNtripleAutocompleteResponse).then((function(e){t.autocompleteSuggestions=e.map((function(t){return{text:t.value}}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))}))};var b=l(l(l({},s.AGENT_OPERATION.CREATE,(function(t){return _(t)})),s.AGENT_OPERATION.EDIT,(function(t){return I(t)})),s.AGENT_OPERATION.CLONE,(function(t){return R(t)})),_=function(n){return t.savingAgent=!0,E.createAgent(n).then((function(t){e.close(t),m.success(y.instant("ttyg.agent.messages.agent_save_successfully",{agentName:t.name}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))})).finally((function(){t.savingAgent=!1}))},I=function(n){return t.savingAgent=!0,E.editAgent(n).then((function(t){e.close(t),m.success(y.instant("ttyg.agent.messages.agent_save_successfully",{agentName:t.name}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))})).finally((function(){t.savingAgent=!1}))},R=function(n){return t.savingAgent=!0,E.createAgent(n).then((function(t){e.close(t),m.success(y.instant("ttyg.agent.messages.agent_save_successfully",{agentName:t.name}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))})).finally((function(){t.savingAgent=!1}))},w=function(t,e){console.error(t),m.error(y.instant(e))},x=function(){t.agentSettingsForm.extractionMethods.$setValidity("required",t.agentFormModel.hasExtractionMethodSelected())},O=function(){var e=t.activeRepositoryList.find((function(e){return e.value===t.agentFormModel.repositoryId}));return{repositoryId:e?e.data.repository.id:void 0,repositoryLocation:e?e.data.repository.location:void 0}},L=function(e){if(e.selected||t.agentSettingsForm.$setValidity("missingIndex",!0),e.expanded){t.extractionMethodLoaderFlags[e.method]=!0;var n=O();d.getIndexesAsMenuModel(n.repositoryId,n.repositoryLocation).then((function(n){t.similarityIndexes=n,t.agentSettingsForm.$setValidity("missingIndex",!e.selected||!(!n||!n.length)),N(t.similarityIndexes,e)})).catch((function(e){t.agentSettingsForm.$setValidity("missingIndex",!1),w(e,"ttyg.agent.messages.error_similarity_indexes_loading")})).finally((function(){t.extractionMethodLoaderFlags[e.method]=!1}))}},N=function(t,e){if(0!==t.length){var n=t.find((function(t){return t.value===e.similarityIndex}));e.similarityIndex=n?n.value:t[0].value}else e.similarityIndex=null},M=function(e){if(e.selected||t.agentSettingsForm.$setValidity("missingConnector",!0),e.expanded){t.extractionMethodLoaderFlags[e.method]=!0;var n=O();g.getConnectorPrefixByName("ChatGPT Retrieval",n.repositoryId,n.repositoryLocation).then((function(t){return g.getConnectorsByTypeAsSelectMenuOptions(t,n.repositoryId,n.repositoryLocation)})).then((function(n){t.retrievalConnectors=n,t.agentSettingsForm.$setValidity("missingConnector",!e.selected||!(!n||!n.length)),D(t.retrievalConnectors,e)})).catch((function(e){t.agentSettingsForm.$setValidity("missingConnector",!1),w(e,"ttyg.agent.messages.error_retrieval_connectors_loading")})).finally((function(){t.extractionMethodLoaderFlags[e.method]=!1}))}},D=function(t,e){if(0!==t.length){var n=t.find((function(t){return t.value===e.retrievalConnectorInstance}));e.retrievalConnectorInstance=n?n.value:t[0].value}else e.retrievalConnectorInstance=null},G=l(l(l(l({},i.ExtractionMethod.FTS_SEARCH,(function(e){t.checkIfFTSEnabled()})),i.ExtractionMethod.SPARQL,(function(t){})),i.ExtractionMethod.SIMILARITY,(function(t){return L(t)})),i.ExtractionMethod.RETRIEVAL,(function(t){return M(t)})),k=l(l({},i.AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH,(function(t){return $(t)})),i.AdditionalExtractionMethod.IRI_DISCOVERY_SEARCH,(function(){})),$=function(){t.checkAutocompleteIndexEnabled()},F=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.checkIfFTSEnabled(),t.updateSimilaritySearchPanel(e),t.updateRetrievalConnectorPanel(n),t.checkAutocompleteIndexEnabled()},U=function(){document.hidden||F()};document.addEventListener("visibilitychange",U),t.$on("$destroy",(function(){document.removeEventListener("visibilitychange",U)}));setTimeout(x,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","ngTagsInput"]).constant("ExtractionMethodTemplates",{iri_discovery_search:"iri-discovery-search"}).controller("AgentSettingsModalController",d),d.$inject=["$scope","$uibModalInstance","ModalService","$uibModal","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","toastr","UriUtils","$translate","dialogModel","TTYGContextService","TTYGService","ExtractionMethodTemplates","AutocompleteService","AutocompleteRestService"]},246:function(t,e){function n(t,e){var n={agent:{id:void 0},chat:{id:void 0}},o=function(){var o=t.get(e.TTYG);return o||(o=n),o.agent||(o.agent={}),o.chat||(o.chat={}),o};return{saveAgent:function(n){var i=o();i.agent.id=n?n.id:void 0,t.set(e.TTYG,i)},getAgentId:function(){var t=o();if(t.agent)return t.agent.id},saveChat:function(n){var i=o();i.chat.id=n?n.id:void 0,t.set(e.TTYG,i)},getChatId:function(){var t=o();if(t.chat)return t.chat.id}}}angular.module("graphdb.framework.ttyg.services.ttygstorage",[]).factory("TTYGStorageService",n),n.$inject=["LocalStorageAdapter","LSKeys"]},247:function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,a(o.key),o)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}n.r(e),n.d(e,"AgentSettingsModal",(function(){return s}));var s=r((function t(e,n,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeRepositoryInfo=e,this.activeRepositoryList=n,this.agentFormModel=o,this.operation=i}))},371:function(t,e,n){"use strict";n.r(e);n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(140);var o=n(102),i=(n(246),n(128)),r=n(141),a=n(135),s=n(214),c=n(25),u=n(38),l=n(639),d=n(247),g=n(1),f=n(231),p=n(148);function m(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function y(t,e,n,h,y,T,v,E,S,A,C,b,_,I,R){var w=[],x={filter_all:v.instant("ttyg.agent.btn.filter.all")};h.helpTemplateUrl="js/angular/ttyg/templates/chatInfo.html",h.isHelpVisible=!1,h.showChats=!0,h.showAgents=!1,h.chats=void 0,h.loadingChats=!1,h.loadingChat=!1,h.initialized=!1,h.agents=void 0,h.selectedAgent=void 0,h.loadingAgents=!1,h.reloadingAgents=!1,h.connectorID=void 0,h.canModifyAgent=!1,h.agentListFilterModel=[],h.activeRepositoryList=[],h.onopen=h.onclose=function(){return angular.noop()},h.startNewChat=function(){I.deselectChat()},h.toggleChatsListSidebar=function(){h.showChats=!h.showChats},h.toggleAgentsListSidebar=function(){h.showAgents=!h.showAgents},h.onToggleHelp=function(){h.isHelpVisible=!h.isHelpVisible},h.onExportSelectedChat=function(){$(I.getSelectedChat())};var O=function(){var t=I.getDefaultAgent();return t?Promise.resolve(t):_.getDefaultAgent().then((function(t){return I.setDefaultAgent(t),t}))};h.onOpenNewAgentSettings=function(){O().then((function(t){var e=Object(u.repositoryInfoMapper)(S.getActiveRepositoryObject());t.repositoryId=e.id;var n=Object(s.agentFormModelMapper)(new r.AgentModel({}),t,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 d.AgentSettingsModal(e,h.activeRepositoryList,n,i.AGENT_OPERATION.CREATE)}},size:"lg"}})).then((function(t){E.open(t).result.then(N)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))},h.onOpenAgentSettings=function(t){var e=t;e||(e=I.getSelectedAgent()),O().then((function(t){var n=Object(s.agentFormModelMapper)(e,t,i.AGENT_OPERATION.EDIT),o=Object(u.repositoryInfoMapper)(S.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 d.AgentSettingsModal(o,h.activeRepositoryList,n,i.AGENT_OPERATION.EDIT)}},size:"lg"}})).then((function(t){E.open(t).result.then((function(t){var e=I.getSelectedAgent();e&&t.id===e.id&&I.selectAgent(t),N()}))})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))},h.onOpenCloneAgentSettings=function(t){O().then((function(e){var n=Object(s.agentFormModelMapper)(t,e,i.AGENT_OPERATION.CLONE);n.name="clone-".concat(n.name);var o=Object(u.repositoryInfoMapper)(S.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 d.AgentSettingsModal(o,h.activeRepositoryList,n,i.AGENT_OPERATION.CLONE)}},size:"lg"}})).then((function(t){E.open(t).result.then((function(t){var e=I.getSelectedAgent();e&&t.id===e.id&&I.selectAgent(t),N()}))})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))};var L=function(){return h.loadingChats=!0,_.getConversations().then((function(t){return I.updateChats(t)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH)),k(new a.ChatsListModel)})).finally((function(){h.loadingChats=!1}))},N=function(){return h.reloadingAgents=!0,_.getAgents().then((function(t){return I.updateAgents(t)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))})).finally((function(){h.reloadingAgents=!1}))},M=function(){I.setCanModifyAgent(t.isRepoManager())},D=function(t,e,n){var i;if(t.timestamp=n.timestamp,e.answers=e.answers||[],(i=e.answers).push.apply(i,m(n.messages)),I.updateSelectedChat(t),n.continueRunId)I.emit(o.TTYGEventName.CONTINUE_CHAT_RUN,new p.ContinueChatRun(e,n.continueRunId));else{var r=I.getChats();r.updateChatTimestamp(t.id,n.timestamp),r.updateChatName(t.id,n.chatName),t.name=n.name,I.updateChats(r),I.emit(o.TTYGEventName.LAST_MESSAGE_RECEIVED,t)}},G=function(t,e,n){t.chatHistory.appendItem(e),D(t,e,n)},k=function(t){t.isEmpty()?h.showChats=!1:(h.showChats=!0,I.getSelectedChat()||R.getChatId()||I.selectChat(h.chats.getFirstChat()))},$=function(t){_.exportConversation(t.id).then((function(e){var n=e.data,i=e.filename;Object(l.saveAs)(n,i),I.emit(o.TTYGEventName.CHAT_EXPORT_SUCCESSFUL,t)})).catch((function(){I.emit(o.TTYGEventName.CHAT_EXPORT_FAILURE),A.error(v.instant("ttyg.chat.messages.export_failure"))}))},F=function(){var t=S.getActiveRepository(),e=S.getLocalReadableGraphdbRepositories().map((function(e){return new r.AgentListFilterModel(e.id,e.id,e.id===t)}));h.agentListFilterModel=[new r.AgentListFilterModel(i.AGENTS_FILTER_ALL_KEY,x.filter_all)].concat(m(e))},U=function(t){C.openModalAlert({title:v.instant("ttyg.chat.dialog.chat_is_missing.title"),message:v.instant("ttyg.chat.dialog.chat_is_missing.body")}).result.then((function(){I.deleteChat(t)}))},P=function(){e.open("/similarity/index/create","_blank")},H=function(){e.open("/connectors","_blank")},j=function(t){e.open("/sparql?query=".concat(encodeURIComponent(t),"&execute=true"),"_blank")},Y=function(){var t=R.getChatId(),e=I.getChats();t&&e.getChat(t)&&I.selectChat(I.getChats().getChat(t))};w.push(h.$watch(h.getActiveRepositoryObject,(function(t){t&&(h.activeRepositoryList=S.getLocalReadableGraphdbRepositories().map((function(t){return new c.SelectMenuOptionsModel({value:t.id,label:t.id,data:{repository:t}})})),function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return h.loadingAgents=t,_.getAgents().then((function(t){return I.updateAgents(t)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))})).finally((function(){h.loadingAgents=!1}))}().then((function(){return h.initialized=!0,F(),L()})).then(Y),M())}))),w.push(I.onSelectedChatChanged((function(t){t&&t.id?_.getConversation(t.id).then((function(e){I.updateSelectedChat(e),R.saveChat(t)})).catch((function(e){e.status===f.status.NOT_FOUND&&(U(t),I.emit(o.TTYGEventName.LOAD_CHAT_FAILURE,t))})):t&&I.updateSelectedChat(t)}))),w.push(I.onChatsListChanged((function(t){h.chats=t,k(t)}))),w.push(I.onCanUpdateAgentUpdated((function(t){h.canModifyAgent=t}))),w.push(I.subscribe(I.onAgentsListChanged((function(t){h.agents=t})))),w.push(I.subscribe(o.TTYGEventName.CREATE_CHAT,(function(t){var e=I.getChats().getNonPersistedChat();e||(e=a.ChatModel.getEmptyChat(),I.addChat(e)),I.selectChat(e),_.createConversation(t).then((function(e){I.emit(o.TTYGEventName.CREATE_CHAT_SUCCESSFUL);var n=I.getSelectedChat();if(n&&!n.id){n.id=e.chatId,t.chatId=e.chatId;var i=I.getChats().getNonPersistedChat();I.replaceChat(n,i),R.saveChat(n),G(n,t,e)}})).catch((function(t){I.emit(o.TTYGEventName.CREATE_CHAT_FAILURE),A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))}))),w.push(I.subscribe(o.TTYGEventName.RENAME_CHAT,(function(t){_.renameConversation(t).then((function(){I.emit(o.TTYGEventName.RENAME_CHAT_SUCCESSFUL),I.emit(o.TTYGEventName.LOAD_CHATS)})).catch((function(){I.emit(o.TTYGEventName.RENAME_CHAT_FAILURE),A.error(v.instant("ttyg.chat.messages.rename_failure"))}))}))),w.push(I.subscribe(o.TTYGEventName.DELETE_CHAT,(function(t){I.emit(o.TTYGEventName.DELETING_CHAT,{chatId:t.id,inProgress:!0}),_.deleteConversation(t.id).then((function(){I.emit(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,t);var e=I.getChats();e.deleteChat(t),I.updateChats(e)})).catch((function(){I.emit(o.TTYGEventName.DELETE_CHAT_FAILURE),A.error(v.instant("ttyg.chat.messages.delete_failure"))})).finally((function(){return I.emit(o.TTYGEventName.DELETING_CHAT,{chatId:t.id,inProgress:!1})}))}))),w.push(I.subscribe(o.TTYGEventName.CHAT_EXPORT,$)),w.push(I.subscribe(o.TTYGEventName.ASK_QUESTION,(function(t){_.askQuestion(t).then((function(e){var n=I.getSelectedChat();n&&n.id===t.chatId&&G(n,t,e)})).catch((function(t){I.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))}))),w.push(I.subscribe(o.TTYGEventName.CONTINUE_CHAT_RUN,(function(t){_.continueChatRun(t).then((function(e){var n=t.chatId,o=I.getSelectedChat();if(o&&o.id===n){var i=o.chatHistory.items,r=i[i.length-1];D(o,r,e)}})).catch((function(t){I.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))}))),w.push(I.subscribe(o.TTYGEventName.LOAD_CHATS,L)),w.push(I.subscribe(o.TTYGEventName.OPEN_AGENT_SETTINGS,h.onOpenNewAgentSettings)),w.push(I.subscribe(o.TTYGEventName.EDIT_AGENT,h.onOpenAgentSettings)),w.push(I.subscribe(o.TTYGEventName.CLONE_AGENT,h.onOpenCloneAgentSettings)),w.push(I.subscribe(o.TTYGEventName.DELETE_AGENT,(function(t){I.emit(o.TTYGEventName.DELETING_AGENT,{agentId:t.id,inProgress:!0}),_.deleteAgent(t.id).then((function(){return N()})).then((function(){I.emit(o.TTYGEventName.AGENT_DELETED,t),h.selectedAgent&&h.selectedAgent.id===t.id&&(h.selectedAgent=void 0)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))})).finally((function(){I.emit(o.TTYGEventName.DELETING_AGENT,{agentId:t.id,inProgress:!1})}))}))),w.push(I.subscribe(o.TTYGEventName.AGENT_SELECTED,(function(t){h.selectedAgent=t}))),w.push(I.subscribe(o.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,(function(t){if(t.repositoryId!==S.getActiveRepository()){var e=S.getRepository(t.repositoryId);e&&C.openConfirmationModal({title:v.instant("common.confirm"),message:Object(g.decodeHTML)(v.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_similarity.body",{repositoryId:e.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},(function(){S.setRepository(e),P()}))}else P()}))),w.push(I.subscribe(o.TTYGEventName.GO_TO_CONNECTORS_VIEW,(function(t){if(t.repositoryId!==S.getActiveRepository()){var e=S.getRepository(t.repositoryId);e&&C.openConfirmationModal({title:v.instant("common.confirm"),message:Object(g.decodeHTML)(v.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_connectors.body",{repositoryId:e.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},(function(){S.setRepository(e),H()}))}else H()}))),w.push(I.subscribe(o.TTYGEventName.GO_TO_SPARQL_EDITOR,(function(t){if(t.repositoryId!==S.getActiveRepository()){var e=S.getRepository(t.repositoryId);e&&C.openConfirmation(v.instant("common.confirm"),Object(g.decodeHTML)(v.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:t.repositoryId})),(function(){S.setRepository(e),j(t.query)}))}else j(t.query)}))),w.push(n.$on("$translateChangeSuccess",(function(){x.filter_all=v.instant("ttyg.agent.btn.filter.all"),F()}))),w.push(n.$on("securityInit",M)),h.$on("$destroy",(function(){w.forEach((function(t){return t()})),I.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",y),y.$inject=["$jwtAuth","$window","$rootScope","$scope","$http","$timeout","$translate","$uibModal","$repositories","toastr","ModalService","LocalStorageAdapter","TTYGService","TTYGContextService","TTYGStorageService"]},483:function(t,e,n){"use strict";n.r(e);n(371),n(659);angular.module("graphdb.framework.ttyg",["ngRoute","graphdb.framework.ttyg.controllers.ttyg-view"])},638:function(t,e){(function(e){t.exports=e}).call(this,{})},639:function(t,e,n){var o,i=i||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},o=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i=t.webkitRequestFileSystem,r=t.requestFileSystem||i||t.mozRequestFileSystem,a=function(e){(t.setImmediate||t.setTimeout)((function(){throw e}),0)},s=0,c=function(e){var o=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};t.chrome?o():setTimeout(o,500)},u=function(t,e,n){for(var o=(e=[].concat(e)).length;o--;){var i=t["on"+e[o]];if("function"==typeof i)try{i.call(t,n||t)}catch(t){a(t)}}},l=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t},d=function(e,a){e=l(e);var d,g,f,p=this,m=e.type,h=!1,y=function(){u(p,"writestart progress write writeend".split(" "))},T=function(){(!h&&d||(d=n().createObjectURL(e)),g)?g.location.href=d:null==t.open(d,"_blank")&&"undefined"!=typeof safari&&(t.location.href=d);p.readyState=p.DONE,y(),c(d)},v=function(t){return function(){if(p.readyState!==p.DONE)return t.apply(this,arguments)}},E={create:!0,exclusive:!1};if(p.readyState=p.INIT,a||(a="download"),o)return d=n().createObjectURL(e),o.href=d,o.download=a,void setTimeout((function(){var t,e;t=o,e=new MouseEvent("click"),t.dispatchEvent(e),y(),c(d),p.readyState=p.DONE}));t.chrome&&m&&"application/octet-stream"!==m&&(f=e.slice||e.webkitSlice,e=f.call(e,0,e.size,"application/octet-stream"),h=!0),i&&"download"!==a&&(a+=".download"),("application/octet-stream"===m||i)&&(g=t),r?(s+=e.size,r(t.TEMPORARY,s,v((function(t){t.root.getDirectory("saved",E,v((function(t){var n=function(){t.getFile(a,E,v((function(t){t.createWriter(v((function(n){n.onwriteend=function(e){g.location.href=t.toURL(),p.readyState=p.DONE,u(p,"writeend",e),c(t)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&T()},"writestart progress write abort".split(" ").forEach((function(t){n["on"+t]=p["on"+t]})),n.write(e),p.abort=function(){n.abort(),p.readyState=p.DONE},p.readyState=p.WRITING})),T)})),T)};t.getFile(a,{create:!1},v((function(t){t.remove(),n()})),v((function(t){t.code===t.NOT_FOUND_ERR?n():T()})))})),T)})),T)):T()},g=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e){return navigator.msSaveOrOpenBlob(l(t),e)}:(g.abort=function(){this.readyState=this.DONE,u(this,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,function(t,e){return new d(t,e)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[29,20,30,35,36,47,68,69,73,82,90,97,121,149,150,151,171,174,179,180,242,259,318,319,354,363,378,379,383,384,385],{102:function(t,e,n){"use strict";n.r(e),n.d(e,"TTYGEventName",(function(){return r}));var o=n(24);function i(t){var e=void 0,n=void 0,i=void 0,a=void 0,s={},c=void 0,u=!1,l=function(){return Object(o.cloneDeep)(e)},d=function(){return Object(o.cloneDeep)(n)},g=function(t){n=Object(o.cloneDeep)(t),T(r.CHAT_LIST_UPDATED,d())},f=function(){return Object(o.cloneDeep)(i)},p=function(){return Object(o.cloneDeep)(a)},m=function(){return Object(o.cloneDeep)(s)},h=function(t){return!!s[t]},y=function(){return u},T=function(e,n){t.emitSync(e,Object(o.cloneDeep)(n))},v=function(e,n){return t.subscribeSync(e,(function(t){return n(t)}))};return{resetContext:function(){e=void 0,n=void 0,i=void 0,a=void 0,s={},c=void 0,u=!1},emit:T,subscribe:v,getChats:d,updateChats:g,addChat:function(t){n.appendChat(t),g(n)},replaceChat:function(t,e){n.replaceChat(t,e),g(n)},onChatsListChanged:function(t){return n&&angular.isFunction(t)&&t(d()),v(r.CHAT_LIST_UPDATED,(function(e){return t(e)}))},getSelectedChat:f,selectChat:function(t){i&&i.id===t.id||(i=Object(o.cloneDeep)(t),T(r.SELECT_CHAT,f()))},deselectChat:function(){i=void 0,T(r.SELECT_CHAT,f())},deleteChat:function(t){n.deleteChat(t),g(n)},onSelectedChatChanged:function(t){return angular.isFunction(t)&&t(f()),v(r.SELECT_CHAT,(function(e){return t(e)}))},updateSelectedChat:function(t){i&&i.id&&t&&i.id!==t.id||(i=Object(o.cloneDeep)(t),T(r.SELECTED_CHAT_UPDATED,f()))},onSelectedChatUpdated:function(t){return i&&angular.isFunction(t)&&t(f()),v(r.SELECTED_CHAT_UPDATED,(function(e){return t(e)}))},onLastMessageReceived:function(t){return i&&angular.isFunction(t)&&t(f()),v(r.LAST_MESSAGE_RECEIVED,(function(e){return t(e)}))},updateAgents:function(t){e=Object(o.cloneDeep)(t),T(r.AGENT_LIST_UPDATED,l())},onAgentsListChanged:function(t){return e&&angular.isFunction(t)&&t(l()),v(r.AGENT_LIST_UPDATED,(function(e){return t(e)}))},getAgents:l,getAgent:function(t){if(e)return Object(o.cloneDeep)(e.getAgent(t))},selectAgent:function(t){a=Object(o.cloneDeep)(t),T(r.AGENT_SELECTED,p())},getSelectedAgent:p,onSelectedAgentChanged:function(t){return a&&angular.isFunction(t)&&t(p()),v(r.AGENT_SELECTED,(function(e){return t(e)}))},getDefaultAgent:function(){return Object(o.cloneDeep)(c)},setDefaultAgent:function(t){c=t},setCanModifyAgent:function(t){u=Object(o.cloneDeep)(t),T(r.CAN_MODIFY_AGENT_UPDATED,y())},getCanModifyAgent:y,onCanUpdateAgentUpdated:function(t){return angular.isFunction(t)&&t(y()),v(r.CAN_MODIFY_AGENT_UPDATED,(function(e){return t(e)}))},hasExplainResponse:h,toggleExplainResponse:function(t){h(t)&&(s[t].expanded=!s[t].expanded,T(r.EXPLAIN_RESPONSE_CACHE_UPDATED,m()))},getExplainResponse:function(t){return Object(o.cloneDeep)(s[t])},addExplainResponseCache:function(t){s[t.answerId]=Object(o.cloneDeep)(t),T(r.EXPLAIN_RESPONSE_CACHE_UPDATED,m())},onExplainResponseCacheUpdated:function(t){return angular.isFunction(t)&&t(m()),v(r.EXPLAIN_RESPONSE_CACHE_UPDATED,(function(e){return t(e)}))}}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",i),i.$inject=["EventEmitterService","TTYGService"];var r={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}},106:function(t,e,n){"use strict";n.r(e),n.d(e,"SimilarityIndexType",(function(){return o}));var o={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:function(t){return o.TEXT===t},isTextLiteralType:function(t){return o.TEXT_LITERAL===t},isPredicationType:function(t){return o.PREDICATION===t}}},107:function(t,e,n){"use strict";n.r(e),n.d(e,"SimilarityIndexStatus",(function(){return o}));var o={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:function(t){return o.CREATING===t},isBuildingStatus:function(t){return o.BUILDING===t},isBuiltStatus:function(t){return o.BUILT===t},isRebuildingStatus:function(t){return o.REBUILDING===t},isOutdatedStatus:function(t){return o.OUTDATED===t},isInterruptedStatus:function(t){return o.INTERRUPTED===t},isObsoleteStatus:function(t){return o.OBSOLETE===t},isFailedStatus:function(t){return o.FAILED===t}}},110:function(t,e,n){"use strict";n.r(e),n.d(e,"SimilarityIndex",(function(){return c}));var o=n(106),i=n(107);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,s(o.key),o)}}function s(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),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=""},(e=[{key:"isTextType",value:function(){return o.SimilarityIndexType.isTextType(this.type)}},{key:"isTextLiteralType",value:function(){return o.SimilarityIndexType.isTextLiteralType(this.type)}},{key:"isPredicationType",value:function(){return o.SimilarityIndexType.isPredicationType(this.type)}},{key:"isCreatingStatus",value:function(){return i.SimilarityIndexStatus.isCreatingStatus(this.status)}},{key:"isBuildingStatus",value:function(){return i.SimilarityIndexStatus.isBuildingStatus(this.status)}},{key:"isBuiltStatus",value:function(){return i.SimilarityIndexStatus.isBuiltStatus(this.status)}},{key:"isRebuildingStatus",value:function(){return i.SimilarityIndexStatus.isRebuildingStatus(this.status)}},{key:"isOutdatedStatus",value:function(){return i.SimilarityIndexStatus.isOutdatedStatus(this.status)}},{key:"isInterruptedStatus",value:function(){return i.SimilarityIndexStatus.isInterruptedStatus(this.status)}},{key:"isObsoleteStatus",value:function(){return i.SimilarityIndexStatus.isObsoleteStatus(this.status)}},{key:"isFailedStatus",value:function(){return i.SimilarityIndexStatus.isFailedStatus(this.status)}}])&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}()},111:function(t,e){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",n),n.$inject=["$http"];function n(t){return{getConnectors:function(e,n){if(e)return t.get("rest/connectors",{headers:{"X-GraphDB-Repository":e,"X-GraphDB-Repository-Location":n}});return t.get("rest/connectors")},initConnector:function(e){return t.get("".concat("rest/connectors","/options?prefix=").concat(e))},hasConnector:function(e,n,o){if(n)return t.get("".concat("rest/connectors","/existing?prefix=").concat(e),{headers:{"X-GraphDB-Repository":n,"X-GraphDB-Repository-Location":o}});return t.get("".concat("rest/connectors","/existing?prefix=").concat(e))},checkConnector:function(e){return t.post("".concat("rest/connectors","/check"),e,{headers:{"Content-Type":"text/plain"}})}}}},117:function(t,e,n){"use strict";n.r(e),n.d(e,"mapIndexesResponseToSimilarityIndex",(function(){return i}));var o=n(110),i=function(t){return t.map((function(t){var e=new o.SimilarityIndex;return e.type=t.type,e.stopList=t.stopList,e.status=t.status,e.selectQuery=t.selectQuery,e.searchQuery=t.searchQuery,e.sameAs=t.sameAs,e.options=t.options,e.name=t.name,e.infer=t.infer,e.analyzer=t.analyzer,e.analogicalQuery=t.analogicalQuery,e}))}},123:function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,s(o.key),o)}}function a(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}n.r(e),n.d(e,"ConnectorTypesListModel",(function(){return c})),n.d(e,"ConnectorTypeModel",(function(){return u})),n.d(e,"ConnectorListModel",(function(){return l})),n.d(e,"ConnectorModel",(function(){return d})),n.d(e,"ConnectorSettingsModel",(function(){return g}));var c=function(){return a((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this._connectors=e.connectors||[]}),[{key:"getConnectorByName",value:function(t){return this._connectors.find((function(e){return e.name===t}))}},{key:"connectors",get:function(){return this._connectors},set:function(t){this._connectors=t}}])}(),u=function(){return a((function t(e){i(this,t),this._name=e.name,this._prefix=e.prefix}),[{key:"name",get:function(){return this._name},set:function(t){this._name=t}},{key:"prefix",get:function(){return this._prefix},set:function(t){this._prefix=t}}])}(),l=function(){return a((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];i(this,t),this._connectors=e.connectors}),[{key:"connectors",get:function(){return this._connectors},set:function(t){this._connectors=t}}])}(),d=function(){return a((function t(e){i(this,t),this._name=e.name,this._settings=new g(e)}),[{key:"settings",get:function(){return this._settings},set:function(t){this._settings=t}},{key:"name",get:function(){return this._name},set:function(t){this._name=t}}])}(),g=function(){return a((function t(e){i(this,t),this._settings=e.values||{}}),[{key:"settings",get:function(){return this._settings},set:function(t){this._settings=t}}])}()},124:function(t,e){angular.module("graphdb.framework.rest.similarity.service",[]).factory("SimilarityRestService",n),n.$inject=["$http","$repositories"];function n(t){return{getIndexes:function(e,n){if(e)return t.get("rest/similarity",{headers:{"X-GraphDB-Repository":e,"X-GraphDB-Repository-Location":n}});return t.get("rest/similarity")},getSearchQueries:function(){return t.get("".concat("rest/similarity","/config"))},rebuildIndex:function(t){return e("PUT",t.name,t.options,t.selectQuery,t.searchQuery,t.analogicalQuery,t.stopList,t.infer,t.sameAs,t.type)},deleteIndex:function(e){return t.delete("".concat("rest/similarity","?name=").concat(e.name))},createIndex:e,getSamples:function(){return t.get("".concat("rest/similarity","/samples"))},getQuery:function(e){return t.get("rest/similarity/query",{params:{name:e.indexName,options:e.indexOptions,stopList:e.indexStopList,selectQuery:e.query,infer:e.queryInference,sameAs:e.querySameAs,type:e.viewType,analyzer:e.indexAnalyzer}})},saveSearchQuery:function(e){return t({method:"put",url:"rest/similarity/search-query",data:e})}};function e(e,n,o,i,r,a,s,c,u,l,d){return t({method:e,url:"".concat("rest/similarity"),noCancelOnRouteChange:!0,data:{name:n,options:o,selectQuery:i,stopList:s,infer:c,sameAs:u,type:l,analyzer:d,searchQuery:r,analogicalQuery:a}})}}},126:function(t,e,n){"use strict";n.r(e);n(111);var o=n(136),i=n(25);function r(t){var e=function(e,n){return t.getConnectors(e,n).then((function(t){return Object(o.connectorTypesListMapper)(t.data)}))},n=function(e,n,i){return t.hasConnector(encodeURIComponent(e),n,i).then((function(t){return Object(o.connectorsMapper)(t.data)}))};return{getConnectorTypes:e,getConnectorsByType:n,getConnectorPrefixByName:function(t,n,o){return e(n,o).then((function(e){var n=e.getConnectorByName(t);return n?n.prefix:null}))},getConnectorsByTypeAsSelectMenuOptions:function(t,e,o){return n(t,e,o).then((function(t){return t.connectors.map((function(t){return new i.SelectMenuOptionsModel({value:t.name,label:t.name})}))}))}}}angular.module("graphdb.framework.core.services.connectors",["graphdb.framework.rest.connectors.service"]).factory("ConnectorsService",r),r.$inject=["ConnectorsRestService"]},128:function(t,e,n){"use strict";n.r(e);n(124);var o=n(117),i=n(25);function r(t){var e=function(e,n){return t.getIndexes(e,n).then((function(t){return Object(o.mapIndexesResponseToSimilarityIndex)(t.data)}))};return{getIndexes:e,getIndexesAsMenuModel:function(t,n){return e(t,n).then((function(t){return t.map((function(t){return new i.SelectMenuOptionsModel({label:t.name,value:t.name})}))}))}}}angular.module("graphdb.framework.core.services.similarity",["graphdb.framework.rest.similarity.service"]).factory("SimilarityService",r),r.$inject=["SimilarityRestService"]},133:function(t,e,n){"use strict";n.r(e),n.d(e,"markdownCodeCopyPlugin",(function(){return r}));var o={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function i(t,e){return e=_.merge({},o,e),function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var r=o[0],a=o[1],s=r[a],c=r[a].content.replaceAll('"',""").replaceAll("'","'"),u=t.apply(void 0,o);return"fence"===s.type&&u.trim()?'<div style="position: relative">\n '.concat(u,'\n <copy-to-clipboard\n style="').concat(e.buttonStyle,'"\n class="').concat(e.buttonClass,'"\n tooltip-text="ttyg.chat_panel.btn.copy_sparql.tooltip"\n text-to-copy="').concat(c,'">\n </copy-to-clipboard>\n </div>'):u}}var r=function(t,e){t.renderer.rules.code_block=i(t.renderer.rules.code_block,e),t.renderer.rules.fence=i(t.renderer.rules.fence,e)}},134:function(t,e,n){"use strict";n.r(e),n.d(e,"markdownOpenInSparqlEditorPlugin",(function(){return r}));var o={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function i(t,e){return e=_.merge({},o,e),function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var r=o[0],a=o[1],s=r[a],c=r[a].content.replaceAll('"',""").replaceAll("'","'"),u=t.apply(void 0,o);return"fence"===s.type&&"sparql"===s.info&&u.trim()?'<div style="position: relative">\n '.concat(u,'\n <open-in-sparql-editor\n style="').concat(e.buttonStyle,'"\n class="').concat(e.buttonClass,'"\n execute-query="').concat(e.executeQuery,'"\n repository-id="').concat(e.repositoryId,'"\n query="').concat(c,'">\n </open-in-sparql-editor>\n </div>'):u}}var r=function(t,e){t.renderer.rules.code_block=i(t.renderer.rules.code_block,e),t.renderer.rules.fence=i(t.renderer.rules.fence,e)}},136:function(t,e,n){"use strict";n.r(e),n.d(e,"connectorTypesListMapper",(function(){return i})),n.d(e,"connectorsMapper",(function(){return r}));var o=n(123),i=function(t){var e=new o.ConnectorTypesListModel;return t?(e.connectors=Object.keys(t).map((function(e){return new o.ConnectorTypeModel({name:e,prefix:t[e]})})),e):e},r=function(t){var e=new o.ConnectorListModel;return t?(e.connectors=t.map((function(t){return new o.ConnectorModel(t)})),e):e}},140:function(t,e,n){"use strict";n.r(e),n.d(e,"getHumanReadableTimestamp",(function(){return o}));var o=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)return"";var i=new Date(n),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(a.getDate()-1);var c=new Date(i.getFullYear(),i.getMonth(),i.getDate()),u=o.timeFormat?e("date")(i,o.timeFormat):"";if(c.getTime()===a.getTime())return t.instant("common.dates.today")+u;if(c.getTime()===s.getTime())return t.instant("common.dates.yesterday")+u;var l=o.dateFormat||"yyyy-MM-dd";return e("date")(i,l)+u}},146:function(t,e,n){"use strict";n.r(e);var o=n(669),i=n(133),r=n(134),a={buttonStyle:"position: absolute; top: 0; right: 0; margin-right: 24px"};function s(t){var e=Object(o.a)().use(i.markdownCodeCopyPlugin).use(r.markdownOpenInSparqlEditorPlugin,a);return{renderMarkdown:function(n,s){try{return t.trustAsHtml(function(t){return t?Object(o.a)().use(i.markdownCodeCopyPlugin,t).use(r.markdownOpenInSparqlEditorPlugin,_.merge({},a,t)):e}(s).render(n))}catch(e){return console.error("Error rendering markdown:",e),t.trustAsHtml(n)}}}}angular.module("graphdb.framework.core.services.markdown-service",[]).service("MarkdownService",s),s.$inject=["$sce"]},164:function(t,e){function n(t){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(e,n){e.editableModel={};var o,i=[];e.onKeydown=function(t){"Enter"===t.key?(a(),e.editableModel.text!==e.text&&e.onSave({newText:e.editableModel.text,source:e.source})):"Escape"===t.key&&r()},e.onCancelEditing=function(){r()},e.onSelect=function(){o?(a(),e.onDblclick({source:e.source})):o=t((function(){e.onClick({source:e.source}),a()}),250)};var r=function(){a(),e.onCancel()},a=function(){t.cancel(o),o=void 0};i.push(e.$watch("isEditing",(function(o){o&&(e.editableModel.text=e.source[e.fieldName],t((function(){var t=n.find("input")[0];t.focus(),t.select()}),0))})));e.$on("$destroy",(function(){i.forEach((function(t){return t()})),a()}))}}}angular.module("graphdb.framework.core.directives.inline-editable-text",[]).directive("inlineEditableText",n),n.$inject=["$timeout"]},165:function(t,e,n){"use strict";n.r(e);n(146);function o(t,e){return{template:'<div class="markdown-content" ng-bind-html="markdownContent"></div>',restrict:"E",scope:{content:"@",options:"="},link:function(n,o){n.markdownContent=void 0;var i=function(){n.$evalAsync((function(){var e=o.find(".markdown-content");t(angular.element(e).contents())(n)}))};n.markdownContent=e.renderMarkdown(n.content,n.options),i()}}}angular.module("graphdb.framework.core.directives.markdown-content",["graphdb.framework.core.services.markdown-service"]).directive("markdownContent",o),o.$inject=["$compile","MarkdownService"]},166:function(t,e,n){"use strict";n.r(e);var o=n(1);function i(t,e,n,i){return{template:'\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class="btn btn-link btn-sm open-in-sparql-editor-btn" gdb-tooltip="{{\'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip\' | translate}}" ng-click="onGoToSparqlEditorView()" guide-selector="open-in-sparql-editor-btn">\n <i class="fa fa-bracket-curly"></i><i class="fa fa-ellipsis"></i><i class="fa fa-bracket-curly-right"></i>\n </button>\n ',restrict:"E",scope:{query:"@",repositoryId:"@",executeQuery:"@"},link:function(r,a){r.tooltipText="ttyg.chat_panel.btn.open_in_sparql_editor.tooltip";var s="true"===r.executeQuery;r.onGoToSparqlEditorView=function(){var i=t.getActiveRepository();i&&i===r.repositoryId?c(r.query):n.openConfirmationModal({title:e.instant("common.confirm"),message:Object(o.decodeHTML)(e.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:r.repositoryId})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},(function(){t.setRepository(t.getRepository(r.repositoryId)),c(r.query)}))};var c=function(t){i.open("/sparql?query=".concat(encodeURIComponent(t),"&execute=").concat(s),"_blank")}}}}angular.module("graphdb.framework.core.directives.open-in-sparql-editor",[]).directive("openInSparqlEditor",i),i.$inject=["$repositories","$translate","ModalService","$window"]},179:function(t,e,n){"use strict";n.r(e);n(128),n(126),n(142),n(26);function o(t,e,n,o,i){t.agentInstructionsExplain=i.agentInstructionsExplain,t.close=function(){e.dismiss({})},t.onCloseAgentInstructionsExplainModal=function(){e.dismiss({})};var r=[];t.$on("$destroy",(function(){r.forEach((function(t){return t()}))}))}angular.module("graphdb.framework.ttyg.controllers.agent-instructions-explain-modal",[]).controller("AgentInstructionsExplainModalController",o),o.$inject=["$scope","$uibModalInstance","ModalService","$translate","dialogModel"]},190:function(t,e,n){"use strict";n.r(e);n(165),n(166);var o=n(102),i=n(144),r=n(140);function a(t,e,n,a,s){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-item-detail.html",scope:{chatItemDetail:"=",showActions:"=",asking:"=",disabled:"=",onRegenerateQuestion:"&",onAskHowDeliveredAnswer:"&"},link:function(c,u,l){c.ExplainQueryType=i.ExplainQueryType,c.repositoryId=void 0,c.markdownContentOptions=void 0,c.agentNameByIdMap={},c.explainResponseModel={},c.loadingExplainResponse={},c.regenerateQuestion=function(){c.onRegenerateQuestion({chatItem:c.chatItemDetail})},c.explainResponse=function(o){n.hasExplainResponse(o)?n.toggleExplainResponse(o):(c.loadingExplainResponse[o]=!0,a.explainResponse(c.chatItemDetail,o).then((function(t){n.addExplainResponseCache(t)})).catch((function(){t.error(e.instant("ttyg.chat_panel.messages.explain_response_failure"))})).finally((function(){return c.loadingExplainResponse[o]=!1})))},c.onAskHowAnswerWasDerived=function(){c.onAskHowDeliveredAnswer()},c.onOpenInSparqlEditor=function(t){c.chatItemDetail.agentId&&n.emit(o.TTYGEventName.GO_TO_SPARQL_EDITOR,{query:t,repositoryId:c.repositoryId})},c.showRawQuery=function(t){var e=t.rawQuery.replace(/\s+/g,""),n=t.query.replace(/\s+/g,"");return e&&e!==n},c.getRepositoryId=function(t){var e=n.getAgent(c.chatItemDetail.agentId);return e?e.repositoryId:""},c.getHumanReadableQuestionTimestamp=function(t){return Object(r.getHumanReadableTimestamp)(e,s,t)};var d=function(){c.chatItemDetail.answers.forEach((function(t){c.explainResponseModel[t.id]=n.getExplainResponse(t.id)}))},g=[];g.push(n.onExplainResponseCacheUpdated((function(){d()}))),g.push(n.onAgentsListChanged((function(){c.agentNameByIdMap=n.getAgents().agentNameByIdMap}))),c.$on("$destroy",(function(){g.forEach((function(t){return t()}))})),c.repositoryId=c.getRepositoryId(),c.markdownContentOptions={repositoryId:c.repositoryId},d()}}}angular.module("graphdb.framework.ttyg.directives.chat-item-detail",["graphdb.framework.core.directives.open-in-sparql-editor","graphdb.framework.core.directives.markdown-content"]).directive("chatItemDetail",a),a.$inject=["toastr","$translate","TTYGContextService","TTYGService","$filter"]},231:function(t,e,n){"use strict";n.r(e),n.d(e,"status",(function(){return o}));var o={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,CONFLICT:409,INTERNAL_SERVER_ERROR:500,SERVICE_UNAVAILABLE:503}},239:function(t,e,n){"use strict";n.r(e);n(164);var o=n(102),i=n(140),r=n(1);function a(t,e,n,a){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-list.html",link:function(s){s.selectedChat=void 0,s.renamedChat=void 0,s.deletingChat=void 0,s.onSelectChatForRenaming=function(t){s.renamedChat=t},s.onSelectChat=function(e){if(!s.selectedChat||s.selectedChat.id!==e.id){var n=t.getChats().getNonPersistedChat();n&&t.deleteChat(n),t.selectChat(e),s.renamedChat=void 0}},s.onDeleteChat=function(i){var a=n.instant("ttyg.dialog.delete.title"),s=Object(r.decodeHTML)(n.instant("ttyg.dialog.delete.body",{chatName:i.name}));e.openConfirmation(a,s,(function(){return t.emit(o.TTYGEventName.DELETE_CHAT,i)}))},s.onRenameChat=function(e,n){n.name=e,s.renamedChat=void 0,t.emit(o.TTYGEventName.RENAME_CHAT,n)},s.onExportChat=function(e){t.emit(o.TTYGEventName.CHAT_EXPORT,e)},s.onCancelChatRenaming=function(){s.renamedChat=void 0},s.getHumanReadableChatGroupTimestamp=function(t){return Object(i.getHumanReadableTimestamp)(n,a,t)};var c=function(t){s.selectedChat=t},u=[];u.push(t.onSelectedChatChanged(c)),u.push(t.onSelectedChatUpdated(c)),u.push(t.onChatsListChanged((function(t){s.chatList=t}))),u.push(t.subscribe(o.TTYGEventName.DELETING_CHAT,(function(t){s.deletingChat=t}))),s.$on("$destroy",(function(){u.forEach((function(t){return t()}))}))}}}angular.module("graphdb.framework.ttyg.directives.chat-list",["graphdb.framework.core.directives.inline-editable-text"]).directive("chatList",a),a.$inject=["TTYGContextService","ModalService","$translate","$filter"]},240:function(t,e,n){"use strict";n.r(e);n(190);var o=n(102),i=n(108),r=n(112),a=n(24),s=n(1),c=n(137);function u(t,e,n,u){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-panel.html",link:function(t,u,l){t.chat=void 0,t.selectedAgent=void 0,t.chatItem=void 0,t.askingChatItem=void 0,t.waitingForLastMessage=!1,t.loadingChat=!0,t.ask=function(){t.chatItem.question.timestamp=Date.now(),t.askingChatItem=Object(a.cloneDeep)(t.chatItem),t.chatItem.chatId?g(t.chatItem):d(),t.chatItem=p(),h(),m()},t.regenerateQuestion=function(e){var n=p();n.setQuestionMessage(e.getQuestionMessage()),n.question.timestamp=Date.now(),t.askingChatItem=n,g(n),h()},t.onKeypressOnInput=function(e){t.askingChatItem||"Enter"!==e.key||e.shiftKey||e.ctrlKey||t.ask()},t.onAskHowDeliveredAnswer=function(){var n=p();n.setQuestionMessage(e.instant("ttyg.chat_panel.btn.derive_answer.label")),n.question.timestamp=Date.now(),t.askingChatItem=Object(a.cloneDeep)(n),g(n),h()},t.getAgentName=function(t){var o=n.getAgent(t);return o?o.name:Object(s.decodeHTML)(e.instant("ttyg.chat_panel.deleted_agent"))};var d=function(){t.waitingForLastMessage=!0,n.emit(o.TTYGEventName.CREATE_CHAT,t.chatItem)},g=function(e){t.waitingForLastMessage=!0,n.emit(o.TTYGEventName.ASK_QUESTION,e)},f=function(){t.chatItem=Object(a.cloneDeep)(t.askingChatItem),t.askingChatItem=void 0,t.waitingForLastMessage=!1},p=function(){var e=new r.ChatItemModel;return e.question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER}),t.chat&&(e.chatId=t.chat.id),t.selectedAgent&&(e.agentId=t.selectedAgent.id),e},m=function(){setTimeout((function(){var t=document.querySelector(".question-input");t&&t.focus()}))},h=function(){setTimeout((function(){var t=u.find(".chat-details")[0];t&&(t.scrollTop=t.scrollHeight)}))},y=function(){t.chat=c.ChatModel.getEmptyChat(),t.loadingChat=!1,t.chatItem=p(),t.askingChatItem=void 0,t.waitingForLastMessage=!1,m()},T=[];T.push(t.$watchCollection("chat.chatHistory.items",h)),T.push(n.onSelectedChatUpdated((function(e){if(t.chat=e,e&&(e.id||!t.askingChatItem)){t.loadingChat=!1;var o=t.chatItem.question.message;if(t.chatItem=p(),t.chatItem.question.message=o,t.askingChatItem=void 0,t.chat){var i=t.chat.chatHistory.getLast();i&&i.agentId&&n.selectAgent(n.getAgent(i.agentId))}m()}}))),T.push(n.onLastMessageReceived((function(){t.waitingForLastMessage=!1}))),T.push(n.onSelectedAgentChanged((function(e){t.selectedAgent=e,t.selectedAgent&&t.chatItem&&(t.chatItem.agentId=t.selectedAgent.id),m()}))),T.push(n.onSelectedChatChanged((function(e){e?(t.loadingChat=e&&e.id,t.chatItem=p(),m()):y()}))),T.push(n.subscribe(o.TTYGEventName.LOAD_CHAT_FAILURE,(function(){t.loadingChat=!1,t.chatItem=p(),m()}))),T.push(n.subscribe(o.TTYGEventName.ASK_QUESTION_FAILURE,f)),T.push(n.subscribe(o.TTYGEventName.CREATE_CHAT_FAILURE,f)),T.push(n.subscribe(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,(function(e){t.chat&&e.id===t.chat.id&&y()}))),t.$on("$destroy",(function(){T.forEach((function(t){return t()}))})),t.chat=c.ChatModel.getEmptyChat(),t.chatItem=p(),m()}}}angular.module("graphdb.framework.ttyg.directives.chat-panel",["graphdb.framework.ttyg.directives.chat-item-detail"]).directive("chatPanel",u),u.$inject=["toastr","$translate","TTYGContextService","$timeout"]},241:function(t,e,n){"use strict";n.r(e);var o=n(1),i=n(102);function r(t,e,n){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-list.html",scope:{agentList:"=",agentListFilterModel:"="},link:function(r,a,s){r.selectedAgent=void 0,r.selectedAgentsFilter=void 0,r.deletingAgent=void 0,r.onEditAgent=function(e){t.emit(i.TTYGEventName.EDIT_AGENT,e)},r.onCloneAgent=function(e){t.emit(i.TTYGEventName.CLONE_AGENT,e)},r.onDeleteAgent=function(r){var a=n.instant("ttyg.agent.delete_agent_modal.title"),s=Object(o.decodeHTML)(n.instant("ttyg.agent.delete_agent_modal.body",{agentName:r.name}));e.openConfirmation(a,s,(function(){return t.emit(i.TTYGEventName.DELETE_AGENT,r)}))},r.onAgentsFilterChange=function(t){r.selectedAgentsFilter=t,r.selectedAgentsFilter&&r.agentList.filterByRepository(r.selectedAgentsFilter.key)};var c=function(){var t=r.agentListFilterModel.find((function(t){return t.selected}));r.selectedAgentsFilter=t||r.agentListFilterModel[0],r.onAgentsFilterChange(r.selectedAgentsFilter)},u=[];u.push(r.$watch("agentListFilterModel",c)),u.push(t.subscribe(i.TTYGEventName.DELETING_AGENT,(function(t){r.deletingAgent=t}))),u.push(t.onSelectedAgentChanged((function(t){r.selectedAgent=t}))),r.$on("$destroy",(function(){u.forEach((function(t){return t()}))})),c()}}}angular.module("graphdb.framework.ttyg.directives.agent-list",[]).directive("agentList",r),r.$inject=["TTYGContextService","ModalService","$translate"]},242:function(t,e,n){"use strict";n.r(e);var o=n(25),i=n(102);function r(t,e,n,r){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:function(n){n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=function(o){if(a(o),n.selectedAgent=o,t.selectAgent(o),o.isRepositoryDeleted){var s=e.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),c=e.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");r.openConfirmation(s,c,(function(){return t.emit(i.TTYGEventName.EDIT_AGENT,o)}))}};var a=function(t){n.agentOptionsList.forEach((function(e){e.selected=e.data.agent===t}))},s=function(t){n.agentOptionsList=t.agents.map((function(t){return new o.SelectMenuOptionsModel({value:t.id,label:t.name,data:{agent:t}})}))},c=[];c.push(t.onAgentsListChanged((function(t){s(t)}))),c.push(t.subscribe(i.TTYGEventName.AGENT_DELETED,(function(e){n.selectedAgent&&n.selectedAgent.id===e.id&&(n.selectedAgent.isDeleted=!0,t.selectAgent(n.selectedAgent))}))),c.push(t.onSelectedAgentChanged((function(t){a(t),n.selectedAgent=t}))),n.$on("$destroy",(function(){c.forEach((function(t){return t()}))}))}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",r),r.$inject=["TTYGContextService","$translate","$sce","ModalService"]},243:function(t,e,n){"use strict";n.r(e);var o=n(102),i=n(17);function r(t,e){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/no-agents-view.html",scope:{},link:function(n){n.canModifyAgent=!1,n.talkToGraphDocumentationLink=i.DocumentationUrlResolver.getDocumentationUrl(e.productShortVersion,"talk-to-graph.html"),n.onCreateAgent=function(){t.emit(o.TTYGEventName.OPEN_AGENT_SETTINGS)};var r=[];r.push(t.onCanUpdateAgentUpdated((function(t){n.canModifyAgent=t}))),n.$on("$destroy",(function(){r.forEach((function(t){return t()}))}))}}}angular.module("graphdb.framework.ttyg.directives.no-agents-view",[]).directive("noAgentsView",r),r.$inject=["TTYGContextService","productInfo"]},244:function(t,e){angular.module("graphdb.framework.ttyg.directives.show-tooltip-on-overflow",[]).directive("showTooltipOnOverflow",(function(){return{link:function(t,e){setTimeout((function(){var n=e[0].querySelector(".editable-text-element");n&&(n.scrollWidth>n.clientWidth?e.attr("title",t.chat.name):e.removeAttr("title"))}),0)}}}))},245:function(t,e,n){"use strict";n.r(e);var o=n(1),i=n(143),r=(n(128),n(126),n(142),n(26),n(179),n(12)),a=n(102),s=n(129),c=n(37);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e,n,u,d,g,f,p,m,h,y,T,v,E,S,A,C){t.AGENT_OPERATION=s.AGENT_OPERATION,t.operation=T.operation,t.savingAgent=!1,t.agentFormModel=T.agentFormModel,t.activeRepositoryInfo=T.activeRepositoryInfo,t.extractionMethodLoaderFlags=l({},i.ExtractionMethod.SIMILARITY,!1),t.activeRepositoryList=T.activeRepositoryList,t.extractionMethods=i.ExtractionMethod,t.additionalExtractionMethods=i.AdditionalExtractionMethod,t.ExtractionMethodTemplates=S,t.showAdvancedSettings=!1,t.showHighTemperatureWarning=!1,t.showSystemInstructionWarning=!1,t.similarityIndexes=[],t.retrievalConnectors=[],t.ftsEnabled=!1,t.autocompleteSuggestions=[],t.toggleExtractionMethod=function(e){e.expanded=e.selected,t.agentSettingsForm.extractionMethods.$setTouched(),x(),G[e.method](e)},t.onExtractionMethodPanelToggle=function(t){t.toggleCollapse(),G[t.method](t)},t.toggleAdditionalExtractionMethod=function(e){e.expanded=e.selected,t.checkAutocompleteIndexEnabled(),k[e.method](e)},t.onAdditionalExtractionMethodPanelToggle=function(t){t.toggleCollapse(),k[t.method](t)},t.getModelHelpMessage=function(){var t=Object(o.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.form.model.hint"));return p.trustAsHtml(t)},t.getFTSDisabledHelpMessage=function(){var e=Object(o.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message",{repositoryEditPage:"#/repository/edit/"+t.agentFormModel.repositoryId}));return p.trustAsHtml(e)},t.getAutocompleteDisabledHelpMessage=function(){var t=Object(o.decodeHTML)(y.instant("ttyg.agent.create_agent_modal.form.additional_query_methods.autocomplete_disabled_message",{autocompleteIndexPage:"#/autocomplete"}));return p.trustAsHtml(t)},t.goToCreateSimilarityView=function(){v.emit(a.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,{repositoryId:t.agentFormModel.repositoryId})},t.goToConnectorsView=function(){v.emit(a.TTYGEventName.GO_TO_CONNECTORS_VIEW,{repositoryId:t.agentFormModel.repositoryId})},t.ok=function(){var e=t.agentFormModel.toPayload();return b[t.operation](e)},t.cancel=function(){e.dismiss({})},t.close=function(){e.dismiss({})},t.updateSimilaritySearchPanel=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();n.selected&&(e&&(n.similarityIndex=null),L(n))},t.updateRetrievalConnectorPanel=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();n.selected&&(e&&(n.retrievalConnectorInstance=null),M(n))},t.checkIfFTSEnabled=function(){t.agentFormModel.repositoryId?t.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod().selected?(t.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!0,f.getRepositoryModel({id:t.agentFormModel.repositoryId}).then((function(e){t.ftsEnabled=e.getParamValue(r.REPOSITORY_PARAMS.enableFtsIndex)})).catch((function(t){w(t,"ttyg.agent.messages.error_repository_config_loading")})).finally((function(){t.extractionMethodLoaderFlags[i.ExtractionMethod.FTS_SEARCH]=!1,t.agentSettingsForm.$setValidity("FTSDisabled",t.ftsEnabled)}))):t.agentSettingsForm.$setValidity("FTSDisabled",!0):t.agentSettingsForm.$setValidity("FTSDisabled",!1)},t.onRepositoryChange=function(){F(!0,!0)},t.checkAutocompleteIndexEnabled=function(){A.checkAutocompleteStatus().then((function(e){t.autocompleteEnabled=e})).catch((function(t){m.error(getError(t))}))},t.onRestoreDefaultSystemInstructions=function(){t.agentFormModel.instructions.systemInstruction=t.agentFormModel.instructions.systemInstructionCopy},t.onRestoreDefaultUserInstructions=function(){t.agentFormModel.instructions.userInstruction=t.agentFormModel.instructions.userInstructionCopy},t.onTemperatureChange=function(){t.showHighTemperatureWarning=t.agentFormModel.temperature.value>1},t.onSystemInstructionChange=function(){""===t.agentFormModel.instructions.systemInstruction||t.showSystemInstructionWarning||(t.showSystemInstructionWarning=!0,n.openModalAlert({title:y.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title"),message:y.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body")}).result.then((function(){}))),""===t.agentFormModel.instructions.systemInstruction&&(t.showSystemInstructionWarning=!1)},t.onExplainAgentSettings=function(){var e=t.agentFormModel.toPayload();E.explainAgentSettings(e).then((function(t){var e={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:t}}},size:"lg"};u.open(e).result.then((function(){}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))}))},t.getSuggestions=function(e){var n=e.target.value;C.getAutocompleteSuggestions(n).then(c.mapUriAsNtripleAutocompleteResponse).then((function(e){t.autocompleteSuggestions=e.map((function(t){return{text:t.value}}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))}))};var b=l(l(l({},s.AGENT_OPERATION.CREATE,(function(t){return _(t)})),s.AGENT_OPERATION.EDIT,(function(t){return I(t)})),s.AGENT_OPERATION.CLONE,(function(t){return R(t)})),_=function(n){return t.savingAgent=!0,E.createAgent(n).then((function(t){e.close(t),m.success(y.instant("ttyg.agent.messages.agent_save_successfully",{agentName:t.name}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))})).finally((function(){t.savingAgent=!1}))},I=function(n){return t.savingAgent=!0,E.editAgent(n).then((function(t){e.close(t),m.success(y.instant("ttyg.agent.messages.agent_save_successfully",{agentName:t.name}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))})).finally((function(){t.savingAgent=!1}))},R=function(n){return t.savingAgent=!0,E.createAgent(n).then((function(t){e.close(t),m.success(y.instant("ttyg.agent.messages.agent_save_successfully",{agentName:t.name}))})).catch((function(t){m.error(getError(t,0,s.TTYG_ERROR_MSG_LENGTH))})).finally((function(){t.savingAgent=!1}))},w=function(t,e){console.error(t),m.error(y.instant(e))},x=function(){t.agentSettingsForm.extractionMethods.$setValidity("required",t.agentFormModel.hasExtractionMethodSelected())},O=function(){var e=t.activeRepositoryList.find((function(e){return e.value===t.agentFormModel.repositoryId}));return{repositoryId:e?e.data.repository.id:void 0,repositoryLocation:e?e.data.repository.location:void 0}},L=function(e){if(e.selected||t.agentSettingsForm.$setValidity("missingIndex",!0),e.expanded){t.extractionMethodLoaderFlags[e.method]=!0;var n=O();d.getIndexesAsMenuModel(n.repositoryId,n.repositoryLocation).then((function(n){t.similarityIndexes=n,t.agentSettingsForm.$setValidity("missingIndex",!e.selected||!(!n||!n.length)),N(t.similarityIndexes,e)})).catch((function(e){t.agentSettingsForm.$setValidity("missingIndex",!1),w(e,"ttyg.agent.messages.error_similarity_indexes_loading")})).finally((function(){t.extractionMethodLoaderFlags[e.method]=!1}))}},N=function(t,e){if(0!==t.length){var n=t.find((function(t){return t.value===e.similarityIndex}));e.similarityIndex=n?n.value:t[0].value}else e.similarityIndex=null},M=function(e){if(e.selected||t.agentSettingsForm.$setValidity("missingConnector",!0),e.expanded){t.extractionMethodLoaderFlags[e.method]=!0;var n=O();g.getConnectorPrefixByName("ChatGPT Retrieval",n.repositoryId,n.repositoryLocation).then((function(t){return g.getConnectorsByTypeAsSelectMenuOptions(t,n.repositoryId,n.repositoryLocation)})).then((function(n){t.retrievalConnectors=n,t.agentSettingsForm.$setValidity("missingConnector",!e.selected||!(!n||!n.length)),D(t.retrievalConnectors,e)})).catch((function(e){t.agentSettingsForm.$setValidity("missingConnector",!1),w(e,"ttyg.agent.messages.error_retrieval_connectors_loading")})).finally((function(){t.extractionMethodLoaderFlags[e.method]=!1}))}},D=function(t,e){if(0!==t.length){var n=t.find((function(t){return t.value===e.retrievalConnectorInstance}));e.retrievalConnectorInstance=n?n.value:t[0].value}else e.retrievalConnectorInstance=null},G=l(l(l(l({},i.ExtractionMethod.FTS_SEARCH,(function(e){t.checkIfFTSEnabled()})),i.ExtractionMethod.SPARQL,(function(t){})),i.ExtractionMethod.SIMILARITY,(function(t){return L(t)})),i.ExtractionMethod.RETRIEVAL,(function(t){return M(t)})),k=l(l({},i.AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH,(function(t){return $(t)})),i.AdditionalExtractionMethod.IRI_DISCOVERY_SEARCH,(function(){})),$=function(){t.checkAutocompleteIndexEnabled()},F=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.checkIfFTSEnabled(),t.updateSimilaritySearchPanel(e),t.updateRetrievalConnectorPanel(n),t.checkAutocompleteIndexEnabled()},U=function(){document.hidden||F()};document.addEventListener("visibilitychange",U),t.$on("$destroy",(function(){document.removeEventListener("visibilitychange",U)}));setTimeout(x,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","ngTagsInput"]).constant("ExtractionMethodTemplates",{iri_discovery_search:"iri-discovery-search"}).controller("AgentSettingsModalController",d),d.$inject=["$scope","$uibModalInstance","ModalService","$uibModal","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","toastr","UriUtils","$translate","dialogModel","TTYGContextService","TTYGService","ExtractionMethodTemplates","AutocompleteService","AutocompleteRestService"]},246:function(t,e){function n(t,e){var n={agent:{id:void 0},chat:{id:void 0}},o=function(){var o=t.get(e.TTYG);return o||(o=n),o.agent||(o.agent={}),o.chat||(o.chat={}),o};return{saveAgent:function(n){var i=o();i.agent.id=n?n.id:void 0,t.set(e.TTYG,i)},getAgentId:function(){var t=o();if(t.agent)return t.agent.id},saveChat:function(n){var i=o();i.chat.id=n?n.id:void 0,t.set(e.TTYG,i)},getChatId:function(){var t=o();if(t.chat)return t.chat.id}}}angular.module("graphdb.framework.ttyg.services.ttygstorage",[]).factory("TTYGStorageService",n),n.$inject=["LocalStorageAdapter","LSKeys"]},247:function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,a(o.key),o)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}n.r(e),n.d(e,"AgentSettingsModal",(function(){return s}));var s=r((function t(e,n,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeRepositoryInfo=e,this.activeRepositoryList=n,this.agentFormModel=o,this.operation=i}))},371:function(t,e,n){"use strict";n.r(e);n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(142);var o=n(102),i=(n(246),n(129)),r=n(143),a=n(137),s=n(214),c=n(25),u=n(38),l=n(639),d=n(247),g=n(1),f=n(231),p=n(149);function m(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function y(t,e,n,h,y,T,v,E,S,A,C,b,_,I,R){var w=[],x={filter_all:v.instant("ttyg.agent.btn.filter.all")};h.helpTemplateUrl="js/angular/ttyg/templates/chatInfo.html",h.isHelpVisible=!1,h.showChats=!0,h.showAgents=!1,h.chats=void 0,h.loadingChats=!1,h.loadingChat=!1,h.initialized=!1,h.agents=void 0,h.selectedAgent=void 0,h.loadingAgents=!1,h.reloadingAgents=!1,h.connectorID=void 0,h.canModifyAgent=!1,h.agentListFilterModel=[],h.activeRepositoryList=[],h.onopen=h.onclose=function(){return angular.noop()},h.startNewChat=function(){I.deselectChat()},h.toggleChatsListSidebar=function(){h.showChats=!h.showChats},h.toggleAgentsListSidebar=function(){h.showAgents=!h.showAgents},h.onToggleHelp=function(){h.isHelpVisible=!h.isHelpVisible},h.onExportSelectedChat=function(){$(I.getSelectedChat())};var O=function(){var t=I.getDefaultAgent();return t?Promise.resolve(t):_.getDefaultAgent().then((function(t){return I.setDefaultAgent(t),t}))};h.onOpenNewAgentSettings=function(){O().then((function(t){var e=Object(u.repositoryInfoMapper)(S.getActiveRepositoryObject());t.repositoryId=e.id;var n=Object(s.agentFormModelMapper)(new r.AgentModel({}),t,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 d.AgentSettingsModal(e,h.activeRepositoryList,n,i.AGENT_OPERATION.CREATE)}},size:"lg"}})).then((function(t){E.open(t).result.then(N)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))},h.onOpenAgentSettings=function(t){var e=t;e||(e=I.getSelectedAgent()),O().then((function(t){var n=Object(s.agentFormModelMapper)(e,t,i.AGENT_OPERATION.EDIT),o=Object(u.repositoryInfoMapper)(S.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 d.AgentSettingsModal(o,h.activeRepositoryList,n,i.AGENT_OPERATION.EDIT)}},size:"lg"}})).then((function(t){E.open(t).result.then((function(t){var e=I.getSelectedAgent();e&&t.id===e.id&&I.selectAgent(t),N()}))})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))},h.onOpenCloneAgentSettings=function(t){O().then((function(e){var n=Object(s.agentFormModelMapper)(t,e,i.AGENT_OPERATION.CLONE);n.name="clone-".concat(n.name);var o=Object(u.repositoryInfoMapper)(S.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 d.AgentSettingsModal(o,h.activeRepositoryList,n,i.AGENT_OPERATION.CLONE)}},size:"lg"}})).then((function(t){E.open(t).result.then((function(t){var e=I.getSelectedAgent();e&&t.id===e.id&&I.selectAgent(t),N()}))})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))};var L=function(){return h.loadingChats=!0,_.getConversations().then((function(t){return I.updateChats(t)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH)),k(new a.ChatsListModel)})).finally((function(){h.loadingChats=!1}))},N=function(){return h.reloadingAgents=!0,_.getAgents().then((function(t){return I.updateAgents(t)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))})).finally((function(){h.reloadingAgents=!1}))},M=function(){I.setCanModifyAgent(t.isRepoManager())},D=function(t,e,n){var i;if(t.timestamp=n.timestamp,e.answers=e.answers||[],(i=e.answers).push.apply(i,m(n.messages)),I.updateSelectedChat(t),n.continueRunId)I.emit(o.TTYGEventName.CONTINUE_CHAT_RUN,new p.ContinueChatRun(e,n.continueRunId));else{var r=I.getChats();r.updateChatTimestamp(t.id,n.timestamp),r.updateChatName(t.id,n.chatName),t.name=n.name,I.updateChats(r),I.emit(o.TTYGEventName.LAST_MESSAGE_RECEIVED,t)}},G=function(t,e,n){t.chatHistory.appendItem(e),D(t,e,n)},k=function(t){t.isEmpty()?h.showChats=!1:(h.showChats=!0,I.getSelectedChat()||R.getChatId()||I.selectChat(h.chats.getFirstChat()))},$=function(t){_.exportConversation(t.id).then((function(e){var n=e.data,i=e.filename;Object(l.saveAs)(n,i),I.emit(o.TTYGEventName.CHAT_EXPORT_SUCCESSFUL,t)})).catch((function(){I.emit(o.TTYGEventName.CHAT_EXPORT_FAILURE),A.error(v.instant("ttyg.chat.messages.export_failure"))}))},F=function(){var t=S.getActiveRepository(),e=S.getLocalReadableGraphdbRepositories().map((function(e){return new r.AgentListFilterModel(e.id,e.id,e.id===t)}));h.agentListFilterModel=[new r.AgentListFilterModel(i.AGENTS_FILTER_ALL_KEY,x.filter_all)].concat(m(e))},U=function(t){C.openModalAlert({title:v.instant("ttyg.chat.dialog.chat_is_missing.title"),message:v.instant("ttyg.chat.dialog.chat_is_missing.body")}).result.then((function(){I.deleteChat(t)}))},P=function(){e.open("similarity/index/create","_blank")},H=function(){e.open("connectors","_blank")},j=function(t){e.open("/sparql?query=".concat(encodeURIComponent(t),"&execute=true"),"_blank")},Y=function(){var t=R.getChatId(),e=I.getChats();t&&e.getChat(t)&&I.selectChat(I.getChats().getChat(t))};w.push(h.$watch(h.getActiveRepositoryObject,(function(t){t&&(h.activeRepositoryList=S.getLocalReadableGraphdbRepositories().map((function(t){return new c.SelectMenuOptionsModel({value:t.id,label:t.id,data:{repository:t}})})),function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return h.loadingAgents=t,_.getAgents().then((function(t){return I.updateAgents(t)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))})).finally((function(){h.loadingAgents=!1}))}().then((function(){return h.initialized=!0,F(),L()})).then(Y),M())}))),w.push(I.onSelectedChatChanged((function(t){t&&t.id?_.getConversation(t.id).then((function(e){I.updateSelectedChat(e),R.saveChat(t)})).catch((function(e){e.status===f.status.NOT_FOUND&&(U(t),I.emit(o.TTYGEventName.LOAD_CHAT_FAILURE,t))})):t&&I.updateSelectedChat(t)}))),w.push(I.onChatsListChanged((function(t){h.chats=t,k(t)}))),w.push(I.onCanUpdateAgentUpdated((function(t){h.canModifyAgent=t}))),w.push(I.subscribe(I.onAgentsListChanged((function(t){h.agents=t})))),w.push(I.subscribe(o.TTYGEventName.CREATE_CHAT,(function(t){var e=I.getChats().getNonPersistedChat();e||(e=a.ChatModel.getEmptyChat(),I.addChat(e)),I.selectChat(e),_.createConversation(t).then((function(e){I.emit(o.TTYGEventName.CREATE_CHAT_SUCCESSFUL);var n=I.getSelectedChat();if(n&&!n.id){n.id=e.chatId,t.chatId=e.chatId;var i=I.getChats().getNonPersistedChat();I.replaceChat(n,i),R.saveChat(n),G(n,t,e)}})).catch((function(t){I.emit(o.TTYGEventName.CREATE_CHAT_FAILURE),A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))}))),w.push(I.subscribe(o.TTYGEventName.RENAME_CHAT,(function(t){_.renameConversation(t).then((function(){I.emit(o.TTYGEventName.RENAME_CHAT_SUCCESSFUL),I.emit(o.TTYGEventName.LOAD_CHATS)})).catch((function(){I.emit(o.TTYGEventName.RENAME_CHAT_FAILURE),A.error(v.instant("ttyg.chat.messages.rename_failure"))}))}))),w.push(I.subscribe(o.TTYGEventName.DELETE_CHAT,(function(t){I.emit(o.TTYGEventName.DELETING_CHAT,{chatId:t.id,inProgress:!0}),_.deleteConversation(t.id).then((function(){I.emit(o.TTYGEventName.DELETE_CHAT_SUCCESSFUL,t);var e=I.getChats();e.deleteChat(t),I.updateChats(e)})).catch((function(){I.emit(o.TTYGEventName.DELETE_CHAT_FAILURE),A.error(v.instant("ttyg.chat.messages.delete_failure"))})).finally((function(){return I.emit(o.TTYGEventName.DELETING_CHAT,{chatId:t.id,inProgress:!1})}))}))),w.push(I.subscribe(o.TTYGEventName.CHAT_EXPORT,$)),w.push(I.subscribe(o.TTYGEventName.ASK_QUESTION,(function(t){_.askQuestion(t).then((function(e){var n=I.getSelectedChat();n&&n.id===t.chatId&&G(n,t,e)})).catch((function(t){I.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))}))),w.push(I.subscribe(o.TTYGEventName.CONTINUE_CHAT_RUN,(function(t){_.continueChatRun(t).then((function(e){var n=t.chatId,o=I.getSelectedChat();if(o&&o.id===n){var i=o.chatHistory.items,r=i[i.length-1];D(o,r,e)}})).catch((function(t){I.emit(o.TTYGEventName.ASK_QUESTION_FAILURE),A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))}))}))),w.push(I.subscribe(o.TTYGEventName.LOAD_CHATS,L)),w.push(I.subscribe(o.TTYGEventName.OPEN_AGENT_SETTINGS,h.onOpenNewAgentSettings)),w.push(I.subscribe(o.TTYGEventName.EDIT_AGENT,h.onOpenAgentSettings)),w.push(I.subscribe(o.TTYGEventName.CLONE_AGENT,h.onOpenCloneAgentSettings)),w.push(I.subscribe(o.TTYGEventName.DELETE_AGENT,(function(t){I.emit(o.TTYGEventName.DELETING_AGENT,{agentId:t.id,inProgress:!0}),_.deleteAgent(t.id).then((function(){return N()})).then((function(){I.emit(o.TTYGEventName.AGENT_DELETED,t),h.selectedAgent&&h.selectedAgent.id===t.id&&(h.selectedAgent=void 0)})).catch((function(t){A.error(getError(t,0,i.TTYG_ERROR_MSG_LENGTH))})).finally((function(){I.emit(o.TTYGEventName.DELETING_AGENT,{agentId:t.id,inProgress:!1})}))}))),w.push(I.subscribe(o.TTYGEventName.AGENT_SELECTED,(function(t){h.selectedAgent=t}))),w.push(I.subscribe(o.TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW,(function(t){if(t.repositoryId!==S.getActiveRepository()){var e=S.getRepository(t.repositoryId);e&&C.openConfirmationModal({title:v.instant("common.confirm"),message:Object(g.decodeHTML)(v.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_similarity.body",{repositoryId:e.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},(function(){S.setRepository(e),P()}))}else P()}))),w.push(I.subscribe(o.TTYGEventName.GO_TO_CONNECTORS_VIEW,(function(t){if(t.repositoryId!==S.getActiveRepository()){var e=S.getRepository(t.repositoryId);e&&C.openConfirmationModal({title:v.instant("common.confirm"),message:Object(g.decodeHTML)(v.instant("ttyg.agent.create_agent_modal.dialog.confirm_repository_change_before_open_connectors.body",{repositoryId:e.id})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},(function(){S.setRepository(e),H()}))}else H()}))),w.push(I.subscribe(o.TTYGEventName.GO_TO_SPARQL_EDITOR,(function(t){if(t.repositoryId!==S.getActiveRepository()){var e=S.getRepository(t.repositoryId);e&&C.openConfirmation(v.instant("common.confirm"),Object(g.decodeHTML)(v.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:t.repositoryId})),(function(){S.setRepository(e),j(t.query)}))}else j(t.query)}))),w.push(n.$on("$translateChangeSuccess",(function(){x.filter_all=v.instant("ttyg.agent.btn.filter.all"),F()}))),w.push(n.$on("securityInit",M)),h.$on("$destroy",(function(){w.forEach((function(t){return t()})),I.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",y),y.$inject=["$jwtAuth","$window","$rootScope","$scope","$http","$timeout","$translate","$uibModal","$repositories","toastr","ModalService","LocalStorageAdapter","TTYGService","TTYGContextService","TTYGStorageService"]},483:function(t,e,n){"use strict";n.r(e);n(371),n(659);angular.module("graphdb.framework.ttyg",["ngRoute","graphdb.framework.ttyg.controllers.ttyg-view"])},638:function(t,e){(function(e){t.exports=e}).call(this,{})},639:function(t,e,n){var o,i=i||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},o=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i=t.webkitRequestFileSystem,r=t.requestFileSystem||i||t.mozRequestFileSystem,a=function(e){(t.setImmediate||t.setTimeout)((function(){throw e}),0)},s=0,c=function(e){var o=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};t.chrome?o():setTimeout(o,500)},u=function(t,e,n){for(var o=(e=[].concat(e)).length;o--;){var i=t["on"+e[o]];if("function"==typeof i)try{i.call(t,n||t)}catch(t){a(t)}}},l=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t},d=function(e,a){e=l(e);var d,g,f,p=this,m=e.type,h=!1,y=function(){u(p,"writestart progress write writeend".split(" "))},T=function(){(!h&&d||(d=n().createObjectURL(e)),g)?g.location.href=d:null==t.open(d,"_blank")&&"undefined"!=typeof safari&&(t.location.href=d);p.readyState=p.DONE,y(),c(d)},v=function(t){return function(){if(p.readyState!==p.DONE)return t.apply(this,arguments)}},E={create:!0,exclusive:!1};if(p.readyState=p.INIT,a||(a="download"),o)return d=n().createObjectURL(e),o.href=d,o.download=a,void setTimeout((function(){var t,e;t=o,e=new MouseEvent("click"),t.dispatchEvent(e),y(),c(d),p.readyState=p.DONE}));t.chrome&&m&&"application/octet-stream"!==m&&(f=e.slice||e.webkitSlice,e=f.call(e,0,e.size,"application/octet-stream"),h=!0),i&&"download"!==a&&(a+=".download"),("application/octet-stream"===m||i)&&(g=t),r?(s+=e.size,r(t.TEMPORARY,s,v((function(t){t.root.getDirectory("saved",E,v((function(t){var n=function(){t.getFile(a,E,v((function(t){t.createWriter(v((function(n){n.onwriteend=function(e){g.location.href=t.toURL(),p.readyState=p.DONE,u(p,"writeend",e),c(t)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&T()},"writestart progress write abort".split(" ").forEach((function(t){n["on"+t]=p["on"+t]})),n.write(e),p.abort=function(){n.abort(),p.readyState=p.DONE},p.readyState=p.WRITING})),T)})),T)};t.getFile(a,{create:!1},v((function(t){t.remove(),n()})),v((function(t){t.code===t.NOT_FOUND_ERR?n():T()})))})),T)})),T)):T()},g=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e){return navigator.msSaveOrOpenBlob(l(t),e)}:(g.abort=function(){this.readyState=this.DONE,u(this,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,function(t,e){return new d(t,e)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
2
2
|
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */t.exports?t.exports.saveAs=i:null!==n(645)&&null!=n(638)&&(void 0===(o=function(){return i}.apply(e,[]))||(t.exports=o))},645:function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},659:function(t,e){
|
|
3
3
|
/*! ngTagsInput v3.2.0 License: MIT */!function(){"use strict";var t=8,e=9,n=13,o=27,i=32,r=38,a=40,s=37,c=39,u=46,l=188,d=9007199254740991,g=["text","email","url"],f=angular.module("ngTagsInput",[]);f.directive("tagsInput",["$timeout","$document","$window","$q","tagsInputConfig","tiUtil",function(e,o,r,a,f,p){function m(t,e,n,o){var i,r,s,c,u={};return i=function(e){return p.safeToString(e[t.displayProperty])},r=function(e,n){e[t.displayProperty]=n},s=function(e){var o=i(e),r=o&&o.length>=t.minLength&&o.length<=t.maxLength&&t.allowedTagsPattern.test(o)&&!p.findInObjectArray(u.items,e,t.keyProperty||t.displayProperty);return a.when(r&&n({$tag:e})).then(p.promisifyValue)},c=function(t){return a.when(o({$tag:t})).then(p.promisifyValue)},u.items=[],u.addText=function(t){var e={};return r(e,t),u.add(e)},u.add=function(n){var o=i(n);return t.replaceSpacesWithDashes&&(o=p.replaceSpacesWithDashes(o)),r(n,o),s(n).then((function(){u.items.push(n),e.trigger("tag-added",{$tag:n})})).catch((function(){o&&e.trigger("invalid-tag",{$tag:n})}))},u.remove=function(t){var n=u.items[t];return c(n).then((function(){return u.items.splice(t,1),u.clearSelection(),e.trigger("tag-removed",{$tag:n}),n}))},u.select=function(t){0>t?t=u.items.length-1:t>=u.items.length&&(t=0),u.index=t,u.selected=u.items[t]},u.selectPrior=function(){u.select(--u.index)},u.selectNext=function(){u.select(++u.index)},u.removeSelected=function(){return u.remove(u.index)},u.clearSelection=function(){u.selected=null,u.index=-1},u.getItems=function(){return t.useStrings?u.items.map(i):u.items},u.clearSelection(),u}function h(t){return-1!==g.indexOf(t)}return{restrict:"E",require:"ngModel",scope:{tags:"=ngModel",text:"=?",templateScope:"=?",tagClass:"&",onTagAdding:"&",onTagAdded:"&",onInvalidTag:"&",onTagRemoving:"&",onTagRemoved:"&",onTagClicked:"&"},replace:!1,transclude:!0,templateUrl:"ngTagsInput/tags-input.html",controller:["$scope","$attrs","$element",function(t,e,n){t.events=p.simplePubSub(),f.load("tagsInput",t,e,{template:[String,"ngTagsInput/tag-item.html"],type:[String,"text",h],placeholder:[String,"Add a tag"],tabindex:[Number,null],removeTagSymbol:[String,String.fromCharCode(215)],replaceSpacesWithDashes:[Boolean,!0],minLength:[Number,3],maxLength:[Number,d],addOnEnter:[Boolean,!0],addOnSpace:[Boolean,!1],addOnComma:[Boolean,!0],addOnBlur:[Boolean,!0],addOnPaste:[Boolean,!1],pasteSplitPattern:[RegExp,/,/],allowedTagsPattern:[RegExp,/.+/],enableEditingLastTag:[Boolean,!1],minTags:[Number,0],maxTags:[Number,d],displayProperty:[String,"text"],keyProperty:[String,""],allowLeftoverText:[Boolean,!1],addFromAutocompleteOnly:[Boolean,!1],spellcheck:[Boolean,!0],useStrings:[Boolean,!1]}),t.tagList=new m(t.options,t.events,p.handleUndefinedResult(t.onTagAdding,!0),p.handleUndefinedResult(t.onTagRemoving,!0)),this.registerAutocomplete=function(){return n.find("input"),{addTag:function(e){return t.tagList.add(e)},getTags:function(){return t.tagList.items},getCurrentTagText:function(){return t.newTag.text()},getOptions:function(){return t.options},getTemplateScope:function(){return t.templateScope},on:function(e,n){return t.events.on(e,n,!0),this}}},this.registerTagItem=function(){return{getOptions:function(){return t.options},removeTag:function(e){t.disabled||t.tagList.remove(e)}}}}],link:function(a,d,g,f){var m,h,y=[n,l,i,t,u,s,c],T=a.tagList,v=a.events,E=a.options,S=d.find("input"),A=["minTags","maxTags","allowLeftoverText"];m=function(){f.$setValidity("maxTags",T.items.length<=E.maxTags),f.$setValidity("minTags",T.items.length>=E.minTags),f.$setValidity("leftoverText",!(!a.hasFocus&&!E.allowLeftoverText)||!a.newTag.text())},h=function(){e((function(){S[0].focus()}))},f.$isEmpty=function(t){return!t||!t.length},a.newTag={text:function(t){return angular.isDefined(t)?(a.text=t,void v.trigger("input-change",t)):a.text||""},invalid:null},a.track=function(t){return t[E.keyProperty||E.displayProperty]},a.getTagClass=function(t,e){var n=t===T.selected;return[a.tagClass({$tag:t,$index:e,$selected:n}),{selected:n}]},a.$watch("tags",(function(t){if(t){if(T.items=p.makeObjectArray(t,E.displayProperty),E.useStrings)return;a.tags=T.items}else T.items=[]})),a.$watch("tags.length",(function(){m(),f.$validate()})),g.$observe("disabled",(function(t){a.disabled=t})),a.eventHandlers={input:{keydown:function(t){v.trigger("input-keydown",t)},focus:function(){a.hasFocus||(a.hasFocus=!0,v.trigger("input-focus"))},blur:function(){e((function(){var t=o.prop("activeElement"),e=t===S[0],n=d[0].contains(t);(e||!n)&&(a.hasFocus=!1,v.trigger("input-blur"))}))},paste:function(t){t.getTextData=function(){var e=t.clipboardData||t.originalEvent&&t.originalEvent.clipboardData;return e?e.getData("text/plain"):r.clipboardData.getData("Text")},v.trigger("input-paste",t)}},host:{click:function(){a.disabled||h()}},tag:{click:function(t){v.trigger("tag-clicked",{$tag:t})}}},v.on("tag-added",a.onTagAdded).on("invalid-tag",a.onInvalidTag).on("tag-removed",a.onTagRemoved).on("tag-clicked",a.onTagClicked).on("tag-added",(function(){a.newTag.text("")})).on("tag-added tag-removed",(function(){a.tags=T.getItems(),f.$setDirty(),h()})).on("invalid-tag",(function(){a.newTag.invalid=!0})).on("option-change",(function(t){-1!==A.indexOf(t.name)&&m()})).on("input-change",(function(){T.clearSelection(),a.newTag.invalid=null})).on("input-focus",(function(){d.triggerHandler("focus"),f.$setValidity("leftoverText",!0)})).on("input-blur",(function(){E.addOnBlur&&!E.addFromAutocompleteOnly&&T.addText(a.newTag.text()),d.triggerHandler("blur"),m()})).on("input-keydown",(function(e){var o,r,d,g,f=e.keyCode,m={};p.isModifierOn(e)||-1===y.indexOf(f)||(m[n]=E.addOnEnter,m[l]=E.addOnComma,m[i]=E.addOnSpace,o=!E.addFromAutocompleteOnly&&m[f],r=(f===t||f===u)&&T.selected,g=f===t&&0===a.newTag.text().length&&E.enableEditingLastTag,d=(f===t||f===s||f===c)&&0===a.newTag.text().length&&!E.enableEditingLastTag,o?T.addText(a.newTag.text()):g?(T.selectPrior(),T.removeSelected().then((function(t){t&&a.newTag.text(t[E.displayProperty])}))):r?T.removeSelected():d&&(f===s||f===t?T.selectPrior():f===c&&T.selectNext()),(o||d||r||g)&&e.preventDefault())})).on("input-paste",(function(t){if(E.addOnPaste){var e=t.getTextData().split(E.pasteSplitPattern);e.length>1&&(e.forEach((function(t){T.addText(t)})),t.preventDefault())}}))}}}]),f.directive("tiTagItem",["tiUtil",function(t){return{restrict:"E",require:"^tagsInput",template:'<ng-include src="$$template"></ng-include>',scope:{$scope:"=scope",data:"="},link:function(e,n,o,i){var r=i.registerTagItem(),a=r.getOptions();e.$$template=a.template,e.$$removeTagSymbol=a.removeTagSymbol,e.$getDisplayText=function(){return t.safeToString(e.data[a.displayProperty])},e.$removeTag=function(){r.removeTag(e.$index)},e.$watch("$parent.$index",(function(t){e.$index=t}))}}}]),f.directive("autoComplete",["$document","$timeout","$sce","$q","tagsInputConfig","tiUtil",function(t,i,s,c,u,l){function d(t,e,n){var o,i,r,a={};return r=function(){return e.tagsInput.keyProperty||e.tagsInput.displayProperty},o=function(t,n){return t.filter((function(t){return!l.findInObjectArray(n,t,r(),(function(t,n){return e.tagsInput.replaceSpacesWithDashes&&(t=l.replaceSpacesWithDashes(t),n=l.replaceSpacesWithDashes(n)),l.defaultComparer(t,n)}))}))},a.reset=function(){i=null,a.items=[],a.visible=!1,a.index=-1,a.selected=null,a.query=null},a.show=function(){e.selectFirstMatch?a.select(0):a.selected=null,a.visible=!0},a.load=l.debounce((function(n,s){a.query=n;var u=c.when(t({$query:n}));i=u,u.then((function(t){u===i&&(t=l.makeObjectArray(t.data||t,r()),t=o(t,s),a.items=t.slice(0,e.maxResultsToShow),a.items.length>0?a.show():a.reset())}))}),e.debounceDelay),a.selectNext=function(){a.select(++a.index)},a.selectPrior=function(){a.select(--a.index)},a.select=function(t){0>t?t=a.items.length-1:t>=a.items.length&&(t=0),a.index=t,a.selected=a.items[t],n.trigger("suggestion-selected",t)},a.reset(),a}return{restrict:"E",require:"^tagsInput",scope:{source:"&",matchClass:"&"},templateUrl:"ngTagsInput/auto-complete.html",controller:["$scope","$element","$attrs",function(t,e,n){t.events=l.simplePubSub(),u.load("autoComplete",t,n,{template:[String,"ngTagsInput/auto-complete-match.html"],debounceDelay:[Number,100],minLength:[Number,3],highlightMatchedText:[Boolean,!0],maxResultsToShow:[Number,10],loadOnDownArrow:[Boolean,!1],loadOnEmpty:[Boolean,!1],loadOnFocus:[Boolean,!1],selectFirstMatch:[Boolean,!0],displayProperty:[String,""]}),t.suggestionList=new d(t.source,t.options,t.events),this.registerAutocompleteMatch=function(){return{getOptions:function(){return t.options},getQuery:function(){return t.suggestionList.query}}}}],link:function(t,i,s,c){var u,d=[n,e,o,r,a],g=t.suggestionList,f=c.registerAutocomplete(),p=t.options,m=t.events;p.tagsInput=f.getOptions(),u=function(t){return t&&t.length>=p.minLength||!t&&p.loadOnEmpty},t.templateScope=f.getTemplateScope(),t.addSuggestionByIndex=function(e){g.select(e),t.addSuggestion()},t.addSuggestion=function(){var t=!1;return g.selected&&(f.addTag(angular.copy(g.selected)),g.reset(),t=!0),t},t.track=function(t){return t[p.tagsInput.keyProperty||p.tagsInput.displayProperty]},t.getSuggestionClass=function(e,n){var o=e===g.selected;return[t.matchClass({$match:e,$index:n,$selected:o}),{selected:o}]},f.on("tag-added tag-removed invalid-tag input-blur",(function(){g.reset()})).on("input-change",(function(t){u(t)?g.load(t,f.getTags()):g.reset()})).on("input-focus",(function(){var t=f.getCurrentTagText();p.loadOnFocus&&u(t)&&g.load(t,f.getTags())})).on("input-keydown",(function(i){var s=i.keyCode,c=!1;if(!l.isModifierOn(i)&&-1!==d.indexOf(s))return g.visible?s===a?(g.selectNext(),c=!0):s===r?(g.selectPrior(),c=!0):s===o?(g.reset(),c=!0):(s===n||s===e)&&(c=t.addSuggestion()):s===a&&t.options.loadOnDownArrow&&(g.load(f.getCurrentTagText(),f.getTags()),c=!0),c?(i.preventDefault(),i.stopImmediatePropagation(),!1):void 0})),m.on("suggestion-selected",(function(t){!function(t,e){var n=t.find("li").eq(e),o=n.parent(),i=n.prop("offsetTop"),r=n.prop("offsetHeight"),a=o.prop("clientHeight"),s=o.prop("scrollTop");s>i?o.prop("scrollTop",i):i+r>a+s&&o.prop("scrollTop",i+r-a)}(i,t)}))}}}]),f.directive("tiAutocompleteMatch",["$sce","tiUtil",function(t,e){return{restrict:"E",require:"^autoComplete",template:'<ng-include src="$$template"></ng-include>',scope:{$scope:"=scope",data:"="},link:function(n,o,i,r){var a=r.registerAutocompleteMatch(),s=a.getOptions();n.$$template=s.template,n.$index=n.$parent.$index,n.$highlight=function(n){return s.highlightMatchedText&&(n=e.safeHighlight(n,a.getQuery())),t.trustAsHtml(n)},n.$getDisplayText=function(){return e.safeToString(n.data[s.displayProperty||s.tagsInput.displayProperty])}}}}]),f.directive("tiTranscludeAppend",(function(){return function(t,e,n,o,i){i((function(t){e.append(t)}))}})),f.directive("tiAutosize",["tagsInputConfig",function(t){return{restrict:"A",require:"ngModel",link:function(e,n,o,i){var r,a,s=t.getTextAutosizeThreshold();(r=angular.element('<span class="input"></span>')).css("display","none").css("visibility","hidden").css("width","auto").css("white-space","pre"),n.parent().append(r),a=function(t){var e,i=t;return angular.isString(i)&&0===i.length&&(i=o.placeholder),i&&(r.text(i),r.css("display",""),e=r.prop("offsetWidth"),r.css("display","none")),n.css("width",e?e+s+"px":""),t},i.$parsers.unshift(a),i.$formatters.unshift(a),o.$observe("placeholder",(function(t){i.$modelValue||a(t)}))}}}]),f.directive("tiBindAttrs",(function(){return function(t,e,n){t.$watch(n.tiBindAttrs,(function(t){angular.forEach(t,(function(t,e){n.$set(e,t)}))}),!0)}})),f.provider("tagsInputConfig",(function(){var t={},e={},n=3;this.setDefaults=function(e,n){return t[e]=n,this},this.setActiveInterpolation=function(t,n){return e[t]=n,this},this.setTextAutosizeThreshold=function(t){return n=t,this},this.$get=["$interpolate",function(o){var i={};return i[String]=function(t){return t},i[Number]=function(t){return parseInt(t,10)},i[Boolean]=function(t){return"true"===t.toLowerCase()},i[RegExp]=function(t){return new RegExp(t)},{load:function(n,r,a,s){var c=function(){return!0};r.options={},angular.forEach(s,(function(s,u){var l,d,g,f,p,m;l=s[0],d=s[1],g=s[2]||c,f=i[l],p=function(){var e=t[n]&&t[n][u];return angular.isDefined(e)?e:d},m=function(t){r.options[u]=t&&g(t)?f(t):p()},e[n]&&e[n][u]?a.$observe(u,(function(t){m(t),r.events.trigger("option-change",{name:u,newValue:t})})):m(a[u]&&o(a[u])(r.$parent))}))},getTextAutosizeThreshold:function(){return n}}}]})),f.factory("tiUtil",["$timeout","$q",function(t,e){var n={debounce:function(e,n){var o;return function(){var i=arguments;t.cancel(o),o=t((function(){e.apply(null,i)}),n)}},makeObjectArray:function(t,e){if(!angular.isArray(t)||0===t.length||angular.isObject(t[0]))return t;var n=[];return t.forEach((function(t){var o={};o[e]=t,n.push(o)})),n},findInObjectArray:function(t,e,o,i){var r=null;return i=i||n.defaultComparer,t.some((function(t){return i(t[o],e[o])?(r=t,!0):void 0})),r},defaultComparer:function(t,e){return n.safeToString(t).toLowerCase()===n.safeToString(e).toLowerCase()},safeHighlight:function(t,e){if(t=n.encodeHTML(t),!(e=n.encodeHTML(e)))return t;var o=new RegExp("&[^;]+;|"+function(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}(e),"gi");return t.replace(o,(function(t){return t.toLowerCase()===e.toLowerCase()?"<em>"+t+"</em>":t}))},safeToString:function(t){return angular.isUndefined(t)||null==t?"":t.toString().trim()},encodeHTML:function(t){return n.safeToString(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},handleUndefinedResult:function(t,e){return function(){var n=t.apply(null,arguments);return angular.isUndefined(n)?e:n}},replaceSpacesWithDashes:function(t){return n.safeToString(t).replace(/\s/g,"-")},isModifierOn:function(t){return t.shiftKey||t.ctrlKey||t.altKey||t.metaKey},promisifyValue:function(t){return t=!!angular.isUndefined(t)||t,e[t?"when":"reject"]()},simplePubSub:function(){var t={};return{on:function(e,n,o){return e.split(" ").forEach((function(e){t[e]||(t[e]=[]),(o?[].unshift:[].push).call(t[e],n)})),this},trigger:function(e,o){return(t[e]||[]).every((function(t){return n.handleUndefinedResult(t,!0)(o)})),this}}}};return n}]),f.run(["$templateCache",function(t){t.put("ngTagsInput/tags-input.html",'<div class="host" tabindex="-1" ng-click="eventHandlers.host.click()" ti-transclude-append><div class="tags" ng-class="{focused: hasFocus}"><ul class="tag-list"><li class="tag-item" ng-repeat="tag in tagList.items track by track(tag)" ng-class="getTagClass(tag, $index)" ng-click="eventHandlers.tag.click(tag)"><ti-tag-item scope="templateScope" data="::tag"></ti-tag-item></li></ul><input class="input" autocomplete="off" ng-model="newTag.text" ng-model-options="{getterSetter: true}" ng-keydown="eventHandlers.input.keydown($event)" ng-focus="eventHandlers.input.focus($event)" ng-blur="eventHandlers.input.blur($event)" ng-paste="eventHandlers.input.paste($event)" ng-trim="false" ng-class="{\'invalid-tag\': newTag.invalid}" ng-disabled="disabled" ti-bind-attrs="{type: options.type, placeholder: options.placeholder, tabindex: options.tabindex, spellcheck: options.spellcheck}" ti-autosize></div></div>'),t.put("ngTagsInput/tag-item.html",'<span ng-bind="$getDisplayText()"></span> <a class="remove-button" ng-click="$removeTag()" ng-bind="::$$removeTagSymbol"></a>'),t.put("ngTagsInput/auto-complete.html",'<div class="autocomplete" ng-if="suggestionList.visible"><ul class="suggestion-list"><li class="suggestion-item" ng-repeat="item in suggestionList.items track by track(item)" ng-class="getSuggestionClass(item, $index)" ng-click="addSuggestionByIndex($index)" ng-mouseenter="suggestionList.select($index)"><ti-autocomplete-match scope="templateScope" data="::item"></ti-autocomplete-match></li></ul></div>'),t.put("ngTagsInput/auto-complete-match.html",'<span ng-bind-html="$highlight($getDisplayText())"></span>')}])}()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{144:function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,u(i.key),i)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}n.r(e),n.d(e,"Location",(function(){return a})),n.d(e,"Node",(function(){return l})),n.d(e,"TopologyStatus",(function(){return c})),n.d(e,"Link",(function(){return d})),n.d(e,"ClusterModel",(function(){return h})),n.d(e,"ClusterViewModel",(function(){return f})),n.d(e,"ClusterItemViewModel",(function(){return _})),n.d(e,"ClusterConfiguration",(function(){return y}));var a=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o(this,t),this._endpoint=e,this._rpcAddress=n,this._error=i,this._isAvailable=r,this._isLocal=s}return s(t,[{key:"isLocal",get:function(){return this._isLocal},set:function(t){this._isLocal=t}},{key:"endpoint",get:function(){return this._endpoint},set:function(t){this._endpoint=t}},{key:"rpcAddress",get:function(){return this._rpcAddress},set:function(t){this._rpcAddress=t}},{key:"error",get:function(){return this._error},set:function(t){this._error=t}},{key:"isAvailable",get:function(){return this._isAvailable},set:function(t){this._isAvailable=t}}],[{key:"fromJSON",value:function(e){var n=e.endpoint,i=e.rpcAddress,o=e.error,r=void 0===o?null:o,s=e.isAvailable,u=void 0!==s&&s,a=e.isLocal;return new t(n,i,r,u,void 0!==a&&a)}}])}(),l=function(){function t(e,n,i,r,s,u,a,l,d){o(this,t),this._address=e,this._nodeState=n,this._term=i,this._syncStatus=r,this._lastLogTerm=s,this._lastLogIndex=u,this._endpoint=a,this._recoveryStatus=l,this._topologyStatus=c.fromJSON(d)}return s(t,[{key:"address",get:function(){return this._address},set:function(t){this._address=t}},{key:"nodeState",get:function(){return this._nodeState},set:function(t){this._nodeState=t}},{key:"term",get:function(){return this._term},set:function(t){this._term=t}},{key:"syncStatus",get:function(){return this._syncStatus},set:function(t){this._syncStatus=t}},{key:"lastLogTerm",get:function(){return this._lastLogTerm},set:function(t){this._lastLogTerm=t}},{key:"lastLogIndex",get:function(){return this._lastLogIndex},set:function(t){this._lastLogIndex=t}},{key:"endpoint",get:function(){return this._endpoint},set:function(t){this._endpoint=t}},{key:"recoveryStatus",get:function(){return this._recoveryStatus},set:function(t){this._recoveryStatus=t}},{key:"topologyStatus",get:function(){return this._topologyStatus},set:function(t){return this._topologyStatus=t}}],[{key:"fromJSON",value:function(e){return new t(e.address,e.nodeState,e.term,e.syncStatus,e.lastLogTerm,e.lastLogIndex,e.endpoint,e.recoveryStatus,e.topologyStatus)}}])}(),c=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;o(this,t),this._state=e,this._primaryTags=n,this._primaryIndex=i,this._primaryLeader=r}return s(t,[{key:"state",get:function(){return this._state}},{key:"primaryTags",get:function(){return this._primaryTags}},{key:"primaryIndex",get:function(){return this._primaryIndex}},{key:"primaryLeader",get:function(){return this._primaryLeader}}],[{key:"fromJSON",value:function(e){var n=e.state,i=e.primaryTags,o=void 0===i?{}:i,r=e.primaryIndex,s=e.primaryLeader;return new t(n,Object.entries(o),r,s)}}])}(),d=function(){function t(e,n,i,r){o(this,t),this._id=e,this._source=n,this._target=i,this._status=r}return s(t,null,[{key:"fromJSON",value:function(e){return new t(e.id,e.source,e.target,e.status)}}])}(),h=function(){function t(e,n,i,r){o(this,t),this._locations=e,this._hasCluster=n,this._nodes=i,this._links=r}return s(t,[{key:"locations",get:function(){return this._locations},set:function(t){this._locations=t}},{key:"hasCluster",get:function(){return this._hasCluster},set:function(t){this._hasCluster=t}},{key:"nodes",get:function(){return this._nodes},set:function(t){this._nodes=t}},{key:"links",get:function(){return this._links},set:function(t){this._links=t}}],[{key:"fromJSON",value:function(e){var n=e.locations.map(a.fromJSON),i=e.nodes.map(l.fromJSON),o=e.links.map(d.fromJSON);return new t(n,e.hasCluster,i,o)}}])}(),f=function(){return s((function t(e){o(this,t),this._clusterModel=h.fromJSON(e),this._addToCluster=new Map,this._deleteFromCluster=new Map,this._currentNodesCount=0,this._clusterConfiguration=new y,this._localNodeEndpoint=e.locations.find((function(t){return t.isLocal})).endpoint,this.MINIMUM_NODES_REQUIRED=2}),[{key:"getAttached",value:function(){var t=this,e=this._clusterModel.nodes.concat(Array.from(this._addToCluster.values()));return this._currentNodesCount=e.filter((function(e){return!t._deleteFromCluster.has(e.endpoint)})).length,e}},{key:"getViewModel",value:function(){var t=this,e=0;return this.getAttached().map((function(n){var i=new _(n);return t._deleteFromCluster.has(n.endpoint)?i.isDeleted=!0:i.index=e++,t._localNodeEndpoint===n.endpoint&&(i.isLocal=!0),i}))}},{key:"getAvailable",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._clusterModel.nodes,i=this._clusterModel.locations;return i.filter((function(i){var o=!t.isPresentInList(n,i.endpoint),r=i.isAvailable,s=!t._addToCluster.has(i.endpoint),u=!!e||!t._deleteFromCluster.has(i.endpoint);return o&&r&&u&&s}))}},{key:"getAvailableNodeEndpoints",value:function(){return this.getAvailable().map((function(t){return t.endpoint}))}},{key:"getLocalNode",value:function(){return this._clusterModel.locations.find((function(t){return t.isLocal}))}},{key:"addToCluster",value:function(t){var e=t.endpoint;t.endpoint&&this.addToLocations(t),this._deleteFromCluster.has(e)?this._deleteFromCluster.delete(e):this._addToCluster.set(e,t)}},{key:"addToLocations",value:function(t){var e=m.findIndexByEndpoint(this._clusterModel.locations,t.endpoint);-1===e?this._clusterModel.locations.push(t):this._clusterModel.locations.splice(e,1)}},{key:"deleteFromCluster",value:function(t){var e=t.endpoint;this._addToCluster.has(e)?this._addToCluster.delete(e):this._deleteFromCluster.set(e,t)}},{key:"getDeleteFromCluster",value:function(){return Array.from(this._deleteFromCluster.values())}},{key:"getUpdateActions",value:function(){var t=Array.from(this._addToCluster.values()).map((function(t){return t.endpoint})),e={addNodes:t,removeNodes:Array.from(this._deleteFromCluster.values()).map((function(t){return t.endpoint}))},n=this.updateClusterConfiguration(t);return n&&(e.clusterConfiguration=n),e}},{key:"updateClusterConfiguration",value:function(t){return this.hasCluster()?null:(this._clusterConfiguration.nodes=t,this._clusterConfiguration.toJSON())}},{key:"getClusterConfiguration",value:function(){return this._clusterConfiguration}},{key:"restoreFromDeletion",value:function(t){this._deleteFromCluster.delete(t.endpoint)}},{key:"isChanged",value:function(){return this._addToCluster.size>0||this._deleteFromCluster.size>0}},{key:"isPresentInList",value:function(t,e){return m.isPresentInList(t,e)}},{key:"findByEndpoint",value:function(t,e){return m.findByEndpoint(t,e)}},{key:"findIndexByEndpoint",value:function(t,e){return m.findIndexByEndpoint(t,e)}},{key:"hasValidNodesCount",value:function(){return this._currentNodesCount>=this.MINIMUM_NODES_REQUIRED}},{key:"canDeleteNode",value:function(){var t=Math.floor(this._clusterModel.nodes.length/2);return this._deleteFromCluster.size<t}},{key:"hasCluster",value:function(){return this._clusterModel.hasCluster}}])}(),_=function(){return s((function t(e){o(this,t),this._item=e,this._endpoint=e.endpoint,this._isDeleted=!1,this._index=void 0,this._isLocal=!1}),[{key:"getEndPoint",value:function(){return this._item.endpoint}},{key:"getAddress",value:function(){return void 0!==this._item._address?this._item._address:void 0!==this._item.rpcAddress?this._item.rpcAddress:null}},{key:"isNode",value:function(){return void 0!==this._item._address}},{key:"isLocation",value:function(){return void 0===this._item._address}},{key:"getNodeState",value:function(){return this.isNode()?this._item._nodeState:null}},{key:"getIsAvailable",value:function(){return this.isNode()?null:this._item.isAvailable}},{key:"getTerm",value:function(){return this.isNode()?this._item.term:null}},{key:"getSyncStatus",value:function(){return this.isNode()?this._item.syncStatus:null}},{key:"getIsLocal",value:function(){return this.isNode()?null:this._item.isLocal}},{key:"item",get:function(){return this._item}},{key:"endpoint",get:function(){return this._endpoint},set:function(t){return this._endpoint=t}},{key:"isDeleted",get:function(){return this._isDeleted},set:function(t){this._isDeleted=t}},{key:"index",get:function(){return this._index},set:function(t){this._index=t}},{key:"isLocal",get:function(){return this._isLocal},set:function(t){this._isLocal=t}}])}(),y=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.electionMinTimeout,i=void 0===n?8e3:n,r=e.electionRangeTimeout,s=void 0===r?6e3:r,u=e.heartbeatInterval,a=void 0===u?2e3:u,l=e.messageSizeKB,c=void 0===l?64:l,d=e.verificationTimeout,h=void 0===d?1500:d,f=e.transactionLogMaximumSizeGB,_=void 0===f?50:f,y=e.batchUpdateInterval,m=void 0===y?5e3:y,v=e.nodes,g=void 0===v?[]:v,p=e.secondaryTag,k=e.primaryNodes;o(this,t),this._electionMinTimeout=i,this._electionRangeTimeout=s,this._heartbeatInterval=a,this._messageSizeKB=c,this._verificationTimeout=h,this._transactionLogMaximumSizeGB=_,this._batchUpdateInterval=m,this._nodes=g,this._secondaryTag=p,this._primaryNodes=k}return s(t,[{key:"electionMinTimeout",get:function(){return this._electionMinTimeout},set:function(t){this._electionMinTimeout=t}},{key:"electionRangeTimeout",get:function(){return this._electionRangeTimeout},set:function(t){this._electionRangeTimeout=t}},{key:"heartbeatInterval",get:function(){return this._heartbeatInterval},set:function(t){this._heartbeatInterval=t}},{key:"messageSizeKB",get:function(){return this._messageSizeKB},set:function(t){this._messageSizeKB=t}},{key:"verificationTimeout",get:function(){return this._verificationTimeout},set:function(t){this._verificationTimeout=t}},{key:"transactionLogMaximumSizeGB",get:function(){return this._transactionLogMaximumSizeGB},set:function(t){this._transactionLogMaximumSizeGB=t}},{key:"nodes",get:function(){return this._nodes},set:function(t){this._nodes=t}},{key:"batchUpdateInterval",get:function(){return this._batchUpdateInterval},set:function(t){this._batchUpdateInterval=t}},{key:"secondaryTag",get:function(){return this._secondaryTag},set:function(t){this._secondaryTag=t}},{key:"primaryNodes",get:function(){return this._primaryNodes},set:function(t){this._primaryNodes=t}},{key:"toJSON",value:function(){var t={electionMinTimeout:this._electionMinTimeout,electionRangeTimeout:this._electionRangeTimeout,heartbeatInterval:this._heartbeatInterval,messageSizeKB:this._messageSizeKB,verificationTimeout:this._verificationTimeout,transactionLogMaximumSizeGB:this._transactionLogMaximumSizeGB,batchUpdateInterval:this._batchUpdateInterval,nodes:this._nodes};return void 0!==this._secondaryTag&&(t.secondaryTag=this._secondaryTag),void 0!==this._primaryNodes&&(t.primaryNodes=this._primaryNodes),t}}],[{key:"fromJSON",value:function(e){return new t(e)}}])}(),m=function(){return s((function t(){o(this,t)}),null,[{key:"isPresentInList",value:function(t,e){return t.some((function(t){return t.endpoint===e}))}},{key:"findByEndpoint",value:function(t,e){return t.find((function(t){return t.endpoint===e}))}},{key:"findIndexByEndpoint",value:function(t,e){return t.findIndex((function(t){return t.endpoint===e}))}}])}()}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{145:function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,u(i.key),i)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}n.r(e),n.d(e,"Location",(function(){return a})),n.d(e,"Node",(function(){return l})),n.d(e,"TopologyStatus",(function(){return c})),n.d(e,"Link",(function(){return d})),n.d(e,"ClusterModel",(function(){return h})),n.d(e,"ClusterViewModel",(function(){return f})),n.d(e,"ClusterItemViewModel",(function(){return _})),n.d(e,"ClusterConfiguration",(function(){return y}));var a=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o(this,t),this._endpoint=e,this._rpcAddress=n,this._error=i,this._isAvailable=r,this._isLocal=s}return s(t,[{key:"isLocal",get:function(){return this._isLocal},set:function(t){this._isLocal=t}},{key:"endpoint",get:function(){return this._endpoint},set:function(t){this._endpoint=t}},{key:"rpcAddress",get:function(){return this._rpcAddress},set:function(t){this._rpcAddress=t}},{key:"error",get:function(){return this._error},set:function(t){this._error=t}},{key:"isAvailable",get:function(){return this._isAvailable},set:function(t){this._isAvailable=t}}],[{key:"fromJSON",value:function(e){var n=e.endpoint,i=e.rpcAddress,o=e.error,r=void 0===o?null:o,s=e.isAvailable,u=void 0!==s&&s,a=e.isLocal;return new t(n,i,r,u,void 0!==a&&a)}}])}(),l=function(){function t(e,n,i,r,s,u,a,l,d){o(this,t),this._address=e,this._nodeState=n,this._term=i,this._syncStatus=r,this._lastLogTerm=s,this._lastLogIndex=u,this._endpoint=a,this._recoveryStatus=l,this._topologyStatus=c.fromJSON(d)}return s(t,[{key:"address",get:function(){return this._address},set:function(t){this._address=t}},{key:"nodeState",get:function(){return this._nodeState},set:function(t){this._nodeState=t}},{key:"term",get:function(){return this._term},set:function(t){this._term=t}},{key:"syncStatus",get:function(){return this._syncStatus},set:function(t){this._syncStatus=t}},{key:"lastLogTerm",get:function(){return this._lastLogTerm},set:function(t){this._lastLogTerm=t}},{key:"lastLogIndex",get:function(){return this._lastLogIndex},set:function(t){this._lastLogIndex=t}},{key:"endpoint",get:function(){return this._endpoint},set:function(t){this._endpoint=t}},{key:"recoveryStatus",get:function(){return this._recoveryStatus},set:function(t){this._recoveryStatus=t}},{key:"topologyStatus",get:function(){return this._topologyStatus},set:function(t){return this._topologyStatus=t}}],[{key:"fromJSON",value:function(e){return new t(e.address,e.nodeState,e.term,e.syncStatus,e.lastLogTerm,e.lastLogIndex,e.endpoint,e.recoveryStatus,e.topologyStatus)}}])}(),c=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;o(this,t),this._state=e,this._primaryTags=n,this._primaryIndex=i,this._primaryLeader=r}return s(t,[{key:"state",get:function(){return this._state}},{key:"primaryTags",get:function(){return this._primaryTags}},{key:"primaryIndex",get:function(){return this._primaryIndex}},{key:"primaryLeader",get:function(){return this._primaryLeader}}],[{key:"fromJSON",value:function(e){var n=e.state,i=e.primaryTags,o=void 0===i?{}:i,r=e.primaryIndex,s=e.primaryLeader;return new t(n,Object.entries(o),r,s)}}])}(),d=function(){function t(e,n,i,r){o(this,t),this._id=e,this._source=n,this._target=i,this._status=r}return s(t,null,[{key:"fromJSON",value:function(e){return new t(e.id,e.source,e.target,e.status)}}])}(),h=function(){function t(e,n,i,r){o(this,t),this._locations=e,this._hasCluster=n,this._nodes=i,this._links=r}return s(t,[{key:"locations",get:function(){return this._locations},set:function(t){this._locations=t}},{key:"hasCluster",get:function(){return this._hasCluster},set:function(t){this._hasCluster=t}},{key:"nodes",get:function(){return this._nodes},set:function(t){this._nodes=t}},{key:"links",get:function(){return this._links},set:function(t){this._links=t}}],[{key:"fromJSON",value:function(e){var n=e.locations.map(a.fromJSON),i=e.nodes.map(l.fromJSON),o=e.links.map(d.fromJSON);return new t(n,e.hasCluster,i,o)}}])}(),f=function(){return s((function t(e){o(this,t),this._clusterModel=h.fromJSON(e),this._addToCluster=new Map,this._deleteFromCluster=new Map,this._currentNodesCount=0,this._clusterConfiguration=new y,this._localNodeEndpoint=e.locations.find((function(t){return t.isLocal})).endpoint,this.MINIMUM_NODES_REQUIRED=2}),[{key:"getAttached",value:function(){var t=this,e=this._clusterModel.nodes.concat(Array.from(this._addToCluster.values()));return this._currentNodesCount=e.filter((function(e){return!t._deleteFromCluster.has(e.endpoint)})).length,e}},{key:"getViewModel",value:function(){var t=this,e=0;return this.getAttached().map((function(n){var i=new _(n);return t._deleteFromCluster.has(n.endpoint)?i.isDeleted=!0:i.index=e++,t._localNodeEndpoint===n.endpoint&&(i.isLocal=!0),i}))}},{key:"getAvailable",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._clusterModel.nodes,i=this._clusterModel.locations;return i.filter((function(i){var o=!t.isPresentInList(n,i.endpoint),r=i.isAvailable,s=!t._addToCluster.has(i.endpoint),u=!!e||!t._deleteFromCluster.has(i.endpoint);return o&&r&&u&&s}))}},{key:"getAvailableNodeEndpoints",value:function(){return this.getAvailable().map((function(t){return t.endpoint}))}},{key:"getLocalNode",value:function(){return this._clusterModel.locations.find((function(t){return t.isLocal}))}},{key:"addToCluster",value:function(t){var e=t.endpoint;t.endpoint&&this.addToLocations(t),this._deleteFromCluster.has(e)?this._deleteFromCluster.delete(e):this._addToCluster.set(e,t)}},{key:"addToLocations",value:function(t){var e=m.findIndexByEndpoint(this._clusterModel.locations,t.endpoint);-1===e?this._clusterModel.locations.push(t):this._clusterModel.locations.splice(e,1)}},{key:"deleteFromCluster",value:function(t){var e=t.endpoint;this._addToCluster.has(e)?this._addToCluster.delete(e):this._deleteFromCluster.set(e,t)}},{key:"getDeleteFromCluster",value:function(){return Array.from(this._deleteFromCluster.values())}},{key:"getUpdateActions",value:function(){var t=Array.from(this._addToCluster.values()).map((function(t){return t.endpoint})),e={addNodes:t,removeNodes:Array.from(this._deleteFromCluster.values()).map((function(t){return t.endpoint}))},n=this.updateClusterConfiguration(t);return n&&(e.clusterConfiguration=n),e}},{key:"updateClusterConfiguration",value:function(t){return this.hasCluster()?null:(this._clusterConfiguration.nodes=t,this._clusterConfiguration.toJSON())}},{key:"getClusterConfiguration",value:function(){return this._clusterConfiguration}},{key:"restoreFromDeletion",value:function(t){this._deleteFromCluster.delete(t.endpoint)}},{key:"isChanged",value:function(){return this._addToCluster.size>0||this._deleteFromCluster.size>0}},{key:"isPresentInList",value:function(t,e){return m.isPresentInList(t,e)}},{key:"findByEndpoint",value:function(t,e){return m.findByEndpoint(t,e)}},{key:"findIndexByEndpoint",value:function(t,e){return m.findIndexByEndpoint(t,e)}},{key:"hasValidNodesCount",value:function(){return this._currentNodesCount>=this.MINIMUM_NODES_REQUIRED}},{key:"canDeleteNode",value:function(){var t=Math.floor(this._clusterModel.nodes.length/2);return this._deleteFromCluster.size<t}},{key:"hasCluster",value:function(){return this._clusterModel.hasCluster}}])}(),_=function(){return s((function t(e){o(this,t),this._item=e,this._endpoint=e.endpoint,this._isDeleted=!1,this._index=void 0,this._isLocal=!1}),[{key:"getEndPoint",value:function(){return this._item.endpoint}},{key:"getAddress",value:function(){return void 0!==this._item._address?this._item._address:void 0!==this._item.rpcAddress?this._item.rpcAddress:null}},{key:"isNode",value:function(){return void 0!==this._item._address}},{key:"isLocation",value:function(){return void 0===this._item._address}},{key:"getNodeState",value:function(){return this.isNode()?this._item._nodeState:null}},{key:"getIsAvailable",value:function(){return this.isNode()?null:this._item.isAvailable}},{key:"getTerm",value:function(){return this.isNode()?this._item.term:null}},{key:"getSyncStatus",value:function(){return this.isNode()?this._item.syncStatus:null}},{key:"getIsLocal",value:function(){return this.isNode()?null:this._item.isLocal}},{key:"item",get:function(){return this._item}},{key:"endpoint",get:function(){return this._endpoint},set:function(t){return this._endpoint=t}},{key:"isDeleted",get:function(){return this._isDeleted},set:function(t){this._isDeleted=t}},{key:"index",get:function(){return this._index},set:function(t){this._index=t}},{key:"isLocal",get:function(){return this._isLocal},set:function(t){this._isLocal=t}}])}(),y=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.electionMinTimeout,i=void 0===n?8e3:n,r=e.electionRangeTimeout,s=void 0===r?6e3:r,u=e.heartbeatInterval,a=void 0===u?2e3:u,l=e.messageSizeKB,c=void 0===l?64:l,d=e.verificationTimeout,h=void 0===d?1500:d,f=e.transactionLogMaximumSizeGB,_=void 0===f?50:f,y=e.batchUpdateInterval,m=void 0===y?5e3:y,v=e.nodes,g=void 0===v?[]:v,p=e.secondaryTag,k=e.primaryNodes;o(this,t),this._electionMinTimeout=i,this._electionRangeTimeout=s,this._heartbeatInterval=a,this._messageSizeKB=c,this._verificationTimeout=h,this._transactionLogMaximumSizeGB=_,this._batchUpdateInterval=m,this._nodes=g,this._secondaryTag=p,this._primaryNodes=k}return s(t,[{key:"electionMinTimeout",get:function(){return this._electionMinTimeout},set:function(t){this._electionMinTimeout=t}},{key:"electionRangeTimeout",get:function(){return this._electionRangeTimeout},set:function(t){this._electionRangeTimeout=t}},{key:"heartbeatInterval",get:function(){return this._heartbeatInterval},set:function(t){this._heartbeatInterval=t}},{key:"messageSizeKB",get:function(){return this._messageSizeKB},set:function(t){this._messageSizeKB=t}},{key:"verificationTimeout",get:function(){return this._verificationTimeout},set:function(t){this._verificationTimeout=t}},{key:"transactionLogMaximumSizeGB",get:function(){return this._transactionLogMaximumSizeGB},set:function(t){this._transactionLogMaximumSizeGB=t}},{key:"nodes",get:function(){return this._nodes},set:function(t){this._nodes=t}},{key:"batchUpdateInterval",get:function(){return this._batchUpdateInterval},set:function(t){this._batchUpdateInterval=t}},{key:"secondaryTag",get:function(){return this._secondaryTag},set:function(t){this._secondaryTag=t}},{key:"primaryNodes",get:function(){return this._primaryNodes},set:function(t){this._primaryNodes=t}},{key:"toJSON",value:function(){var t={electionMinTimeout:this._electionMinTimeout,electionRangeTimeout:this._electionRangeTimeout,heartbeatInterval:this._heartbeatInterval,messageSizeKB:this._messageSizeKB,verificationTimeout:this._verificationTimeout,transactionLogMaximumSizeGB:this._transactionLogMaximumSizeGB,batchUpdateInterval:this._batchUpdateInterval,nodes:this._nodes};return void 0!==this._secondaryTag&&(t.secondaryTag=this._secondaryTag),void 0!==this._primaryNodes&&(t.primaryNodes=this._primaryNodes),t}}],[{key:"fromJSON",value:function(e){return new t(e)}}])}(),m=function(){return s((function t(){o(this,t)}),null,[{key:"isPresentInList",value:function(t,e){return t.some((function(t){return t.endpoint===e}))}},{key:"findByEndpoint",value:function(t,e){return t.find((function(t){return t.endpoint===e}))}},{key:"findIndexByEndpoint",value:function(t,e){return t.findIndex((function(t){return t.endpoint===e}))}}])}()}}]);
|