@sava-info-systems/api-maker-with-extensions 2.3.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/.dockerignore +5 -1
  2. package/Dockerfile +1 -35
  3. package/Dockerfile.base +22 -0
  4. package/Dockerfile.extended-base +44 -0
  5. package/dist/1025.5c34b11ab88519fd.js +1 -0
  6. package/dist/1097.3c5b2b4587cefa6e.js +1 -0
  7. package/dist/115.8d10b2b963e7d632.js +1 -0
  8. package/dist/148.f8f560a5f818328e.js +1 -0
  9. package/dist/1558.576af7585833e289.js +1 -0
  10. package/dist/1678.14f917ee37080d63.js +1 -0
  11. package/dist/1754.fc6d6e9f6c1e96d5.js +1 -0
  12. package/dist/1928.9c9375dd036b025a.js +1 -0
  13. package/dist/1957.b718aa368330b524.js +1 -0
  14. package/dist/2140.bb097d69bcb6a1e5.js +1 -0
  15. package/dist/2295.aa3514c8d1238cb2.js +1 -0
  16. package/dist/238.553f30dbe5124419.js +1 -0
  17. package/dist/2473.260a6b26a70eaa8d.js +1 -0
  18. package/dist/2579.b02fe6a8ba3a2e71.js +1 -0
  19. package/dist/2714.b41d14f7378785df.js +1 -0
  20. package/dist/2735.4046cae4c68ac75f.js +1 -0
  21. package/dist/292.bb85e0ea91dcc118.js +1 -0
  22. package/dist/3139.5dd9289cc24b4100.js +1 -0
  23. package/dist/3450.588aafa515b19133.js +1 -0
  24. package/dist/3664.ed1232e3c70195fc.js +1 -0
  25. package/dist/3752.d4e0a280a37c1426.js +1 -0
  26. package/dist/3rdpartylicenses.txt +1 -1
  27. package/dist/4110.b9ebfd9a7382c450.js +1 -0
  28. package/dist/4186.2fd0537d5bc6d882.js +1 -0
  29. package/dist/4211.b6b9f495b100e985.js +1 -0
  30. package/dist/4575.1fee055d10b57afc.js +1 -0
  31. package/dist/4842.ccf765ed3e9753a7.js +1 -0
  32. package/dist/485.7870367c9475fed8.js +1 -0
  33. package/dist/{4895.a54759704d1994b1.js → 4895.fa7b24d66157c531.js} +1 -1
  34. package/dist/5334.e0a2450fc295f659.js +1 -0
  35. package/dist/5421.2c2c0fbf926792db.js +1 -0
  36. package/dist/5434.0997994b319a866a.js +1 -0
  37. package/dist/5679.e362a3e10cb1b953.js +1 -0
  38. package/dist/5761.6c20b09245ac31ef.js +1 -0
  39. package/dist/5765.8d761aef1708e8a1.js +1 -0
  40. package/dist/6236.969b45cad747277c.js +1 -0
  41. package/dist/6393.1b7b097f17d75290.js +1 -0
  42. package/dist/6401.f18e3c98d6deaa22.js +1 -0
  43. package/dist/6650.05ea40acd68697c3.js +1 -0
  44. package/dist/7368.85d940d08fdca6e2.js +1 -0
  45. package/dist/7436.4a62f7ef13cffb21.js +1 -0
  46. package/dist/7470.d24359dc7a3ef75a.js +1 -0
  47. package/dist/7649.8e5ff8a951b474e0.js +1 -0
  48. package/dist/7975.d3d7064d527ac017.js +1 -0
  49. package/dist/7977.85b17bdb465e9a90.js +1 -0
  50. package/dist/7987.c1637bec96a9cc03.js +1 -0
  51. package/dist/8125.8390bc1b477ec6b9.js +1 -0
  52. package/dist/8266.0bf85311cf40ddff.js +1 -0
  53. package/dist/8296.fe54c3787977fad3.js +1 -0
  54. package/dist/885.7e1ec0f82adbdd6f.js +1 -0
  55. package/dist/891.fee03277c7f1c29d.js +1 -0
  56. package/dist/{913.4580b4ce4307a40f.js → 913.e49eb351997bc25c.js} +1 -1
  57. package/dist/9243.eaa2c312b42fc4b3.js +1 -0
  58. package/dist/9575.8404e98d640fd9f9.js +1 -0
  59. package/dist/9939.537c5e355804804b.js +1 -0
  60. package/dist/assets/images/icons/api-group-light.svg +11 -0
  61. package/dist/assets/images/icons/api-group.svg +5 -5
  62. package/dist/assets/images/icons/api-maker-deployment-light.svg +5 -0
  63. package/dist/assets/images/icons/api-maker-deployment.svg +3 -3
  64. package/dist/assets/images/icons/api-user-light.svg +12 -0
  65. package/dist/assets/images/icons/api-user.svg +2 -2
  66. package/dist/assets/images/icons/comparator-light.svg +61 -0
  67. package/dist/assets/images/icons/comparator.svg +2 -2
  68. package/dist/assets/images/icons/custom-light.svg +6 -0
  69. package/dist/assets/images/icons/custom.svg +5 -5
  70. package/dist/assets/images/icons/database-light.svg +29 -0
  71. package/dist/assets/images/icons/database.svg +6 -6
  72. package/dist/assets/images/icons/db-m-light.svg +10 -0
  73. package/dist/assets/images/icons/db-m.svg +4 -4
  74. package/dist/assets/images/icons/db-token-generator-light.svg +4 -0
  75. package/dist/assets/images/icons/db-token-generator.svg +4 -0
  76. package/dist/assets/images/icons/dev-light.svg +13 -0
  77. package/dist/assets/images/icons/dev.svg +4 -4
  78. package/dist/assets/images/icons/diagram-light.svg +28 -0
  79. package/dist/assets/images/icons/diagram.svg +9 -9
  80. package/dist/assets/images/icons/event-light.svg +16 -0
  81. package/dist/assets/images/icons/event.svg +4 -4
  82. package/dist/assets/images/icons/film-movies-icon.svg +3 -3
  83. package/dist/assets/images/icons/finder-light.svg +14 -0
  84. package/dist/assets/images/icons/finder.svg +3 -3
  85. package/dist/assets/images/icons/i18n-light.svg +11 -0
  86. package/dist/assets/images/icons/i18n.svg +6 -6
  87. package/dist/assets/images/icons/increment-light.svg +5 -0
  88. package/dist/assets/images/icons/increment.svg +2 -2
  89. package/dist/assets/images/icons/license-light.svg +6 -0
  90. package/dist/assets/images/icons/license.svg +4 -4
  91. package/dist/assets/images/icons/log-light.svg +17 -0
  92. package/dist/assets/images/icons/log-profile-light.svg +23 -0
  93. package/dist/assets/images/icons/log-profile.svg +7 -7
  94. package/dist/assets/images/icons/log.svg +6 -6
  95. package/dist/assets/images/icons/masters.svg +3 -3
  96. package/dist/assets/images/icons/native-process-logs-light.svg +13 -0
  97. package/dist/assets/images/icons/native-process-logs.svg +6 -6
  98. package/dist/assets/images/icons/nodes-light.svg +5 -0
  99. package/dist/assets/images/icons/nodes.svg +2 -2
  100. package/dist/assets/images/icons/notes-light.svg +16 -0
  101. package/dist/assets/images/icons/notes.svg +2 -2
  102. package/dist/assets/images/icons/process_initializers-light.svg +20 -0
  103. package/dist/assets/images/icons/process_initializers.svg +7 -7
  104. package/dist/assets/images/icons/rsa_encryption-light.svg +6 -0
  105. package/dist/assets/images/icons/rsa_encryption.svg +2 -2
  106. package/dist/assets/images/icons/sandbox-light.svg +11 -0
  107. package/dist/assets/images/icons/sandbox.svg +2 -2
  108. package/dist/assets/images/icons/scanning-period-light.svg +13 -0
  109. package/dist/assets/images/icons/scanning-period.svg +4 -4
  110. package/dist/assets/images/icons/schedulers-light.svg +8 -0
  111. package/dist/assets/images/icons/schedulers.svg +5 -5
  112. package/dist/assets/images/icons/secret-light.svg +15 -0
  113. package/dist/assets/images/icons/secret.svg +2 -2
  114. package/dist/assets/images/icons/swagger-logo-light.svg +9 -0
  115. package/dist/assets/images/icons/swagger-logo.svg +2 -2
  116. package/dist/assets/images/icons/systems-light.svg +8 -0
  117. package/dist/assets/images/icons/systems.svg +3 -3
  118. package/dist/assets/images/icons/testing-light.svg +12 -0
  119. package/dist/assets/images/icons/testing.svg +6 -6
  120. package/dist/assets/images/icons/third-party-light.svg +19 -0
  121. package/dist/assets/images/icons/third-party.svg +4 -4
  122. package/dist/assets/images/icons/typescript-light.svg +12 -0
  123. package/dist/assets/images/icons/typescript.svg +2 -2
  124. package/dist/assets/images/icons/ui-maker-light.svg +23 -0
  125. package/dist/assets/images/icons/ui-maker.svg +10 -10
  126. package/dist/assets/images/icons/utility-light.svg +19 -0
  127. package/dist/assets/images/icons/utility.svg +2 -2
  128. package/dist/assets/images/icons/vulnerability-light.svg +20 -0
  129. package/dist/assets/images/icons/vulnerability.svg +5 -5
  130. package/dist/assets/images/icons/web-light.svg +16 -0
  131. package/dist/assets/images/icons/web.svg +3 -3
  132. package/dist/assets/images/logo/api_maker_logo_dark.svg +29 -0
  133. package/dist/assets/images/logo/api_maker_logo_full_white.svg +29 -0
  134. package/dist/assets/images/logo/api_maker_logo_light.svg +22 -0
  135. package/dist/assets/images/logo/apple-touch-icon.png +0 -0
  136. package/dist/assets/images/logo/favicon-192x192.png +0 -0
  137. package/dist/assets/images/logo/favicon-32x32.png +0 -0
  138. package/dist/assets/images/logo/favicon-512x512.png +0 -0
  139. package/dist/assets/images/logo/logo_docs-light.svg +15 -0
  140. package/dist/assets/images/logo/logo_docs.svg +3 -3
  141. package/dist/assets/images/logo/logo_store-light.svg +17 -0
  142. package/dist/assets/images/logo/logo_store.svg +3 -3
  143. package/dist/assets/images/logo/store_logo-dark.svg +11 -0
  144. package/dist/assets/images/logo/store_logo-light.svg +11 -0
  145. package/dist/assets/images/logo/store_logo.svg +2 -2
  146. package/dist/assets/primeng-theme/primeng-theme-overrides.scss +1426 -31
  147. package/dist/assets/public/diagram-viewer/index.html +59 -20
  148. package/dist/assets/public/diagram-viewer/index.js +1 -1
  149. package/dist/assets/public/monaco-editor/index.html +105 -9
  150. package/dist/assets/public/monaco-editor/index.js +1 -1
  151. package/dist/assets/public/table-viewer/index.html +124 -38
  152. package/dist/assets/schema-types/InterfaceProps.ts +71 -13
  153. package/dist/assets/schema-types/store-types.ts +2 -0
  154. package/dist/assets/schema-types/types.ts +65 -17
  155. package/dist/assets/styles/bootstrap-overrides.scss +170 -7
  156. package/dist/assets/styles/colors-dark.scss +320 -33
  157. package/dist/assets/styles/colors-light.scss +453 -9
  158. package/dist/assets/styles/out/styles.css.map +1 -1
  159. package/dist/assets/styles/styles.scss +213 -24
  160. package/dist/assets/styles/variables.scss +2 -2
  161. package/dist/bootstrap-overrides.css +1 -0
  162. package/dist/colors-dark.css +1 -0
  163. package/dist/colors-light.css +1 -0
  164. package/dist/{common.912ad7a22e5de63a.js → common.86c514055f788290.js} +1 -1
  165. package/dist/index.html +111 -27
  166. package/dist/main.0ac98a72f1b9c1dd.js +1 -0
  167. package/dist/runtime.0e9fc303007ced09.js +1 -0
  168. package/dist/styles-global.css +1 -0
  169. package/dist/{styles.242217e145c3f7ab.css → styles.c1032bc4f4d7829b.css} +1 -1
  170. package/main.js +1 -1
  171. package/package-sandbox.json +1 -1
  172. package/package.json +9 -9
  173. package/pnpm-workspace.yaml +15 -0
  174. package/sandbox.js +1 -1
  175. package/src/assets/schema-types/store-types.ts +2 -0
  176. package/src/assets/schema-types/types.ts +65 -17
  177. package/src/schema-types/store-types.js +2 -0
  178. package/src/schema-types/types.js +1 -0
  179. package/src/tools/.github/copilot-instructions.md +17 -9
  180. package/src/tools/local-client.js +1 -1
  181. package/dist/1025.a0db9347453600d0.js +0 -1
  182. package/dist/1097.d0d6fd13031aa1f0.js +0 -1
  183. package/dist/148.1dc7d9e0cfe45510.js +0 -1
  184. package/dist/1558.0aae3e5c538d3815.js +0 -1
  185. package/dist/1678.ed1e4a269e0f42bc.js +0 -1
  186. package/dist/1754.691f142aa1eabe28.js +0 -1
  187. package/dist/1928.2b376f7cf66ed038.js +0 -1
  188. package/dist/1957.ab7fda21d9978597.js +0 -1
  189. package/dist/2140.1ce150285aebe3cc.js +0 -1
  190. package/dist/2295.4fa1d4b5ff482f3a.js +0 -1
  191. package/dist/238.891233aa670bdd2b.js +0 -1
  192. package/dist/2473.4b2bb1ad5b1cc99d.js +0 -1
  193. package/dist/2579.6558b67b2d98f116.js +0 -1
  194. package/dist/2714.0d6939336a02dd0a.js +0 -1
  195. package/dist/2735.86437a8639a0c1bb.js +0 -1
  196. package/dist/292.f6482cd1a572ba4b.js +0 -1
  197. package/dist/3139.0921102d181c220d.js +0 -1
  198. package/dist/3450.9b5cfc83039b02b5.js +0 -1
  199. package/dist/3664.4a1dd7f16f8b57fb.js +0 -1
  200. package/dist/4110.d108e786ecbdfd1b.js +0 -1
  201. package/dist/4186.ac3e8af0efeeac14.js +0 -1
  202. package/dist/4211.1bfe72ce0b7b2f76.js +0 -1
  203. package/dist/443.7e3946651373e09a.js +0 -1
  204. package/dist/4575.169008cbbbae66bb.js +0 -1
  205. package/dist/4842.e7649d81606ad80d.js +0 -1
  206. package/dist/485.b546656b466cb8a4.js +0 -1
  207. package/dist/5334.72c1c6d89fdf136e.js +0 -1
  208. package/dist/5421.2067001c10533303.js +0 -1
  209. package/dist/5679.4e22239895c7f520.js +0 -1
  210. package/dist/5761.331ca41ab64cca92.js +0 -1
  211. package/dist/5765.2b640be5d177d794.js +0 -1
  212. package/dist/6236.6c0fc469f0c96549.js +0 -1
  213. package/dist/6393.173ecdfc3b022973.js +0 -1
  214. package/dist/6401.374823002788afe7.js +0 -1
  215. package/dist/6650.1d18ee25901d68be.js +0 -1
  216. package/dist/7368.9ebf62d518f8ad7a.js +0 -1
  217. package/dist/7436.640bf5fe48814cbe.js +0 -1
  218. package/dist/7470.b1ce7eedb9cedb2d.js +0 -1
  219. package/dist/7649.ab4744cfe713eec0.js +0 -1
  220. package/dist/7975.578a00ebd1160a1e.js +0 -1
  221. package/dist/7977.afeded970bac8b66.js +0 -1
  222. package/dist/7987.5958ad5b81873058.js +0 -1
  223. package/dist/8125.b2f908096882ed45.js +0 -1
  224. package/dist/8266.aca59a0a04590ab1.js +0 -1
  225. package/dist/8296.a387c28f5702c5e8.js +0 -1
  226. package/dist/885.be44d92efca1aaf6.js +0 -1
  227. package/dist/891.5e08c81e5200413e.js +0 -1
  228. package/dist/9243.08630ad94e1fddba.js +0 -1
  229. package/dist/9575.30ac91b65602c0ca.js +0 -1
  230. package/dist/9939.a3389cc6764e3cbc.js +0 -1
  231. package/dist/assets/images/logo/API Maker Logo 2021 black.svg +0 -47
  232. package/dist/assets/images/logo/API Maker Logo 2021.svg +0 -49
  233. package/dist/assets/images/logo/logo.svg +0 -41
  234. package/dist/assets/styles/out/bootstrap-overrides.css +0 -2
  235. package/dist/assets/styles/out/colors-dark.css +0 -2
  236. package/dist/assets/styles/out/colors-light.css +0 -2
  237. package/dist/assets/styles/out/monaco-editor-overrides.css +0 -2
  238. package/dist/assets/styles/out/styles.css +0 -2
  239. package/dist/assets/styles/out/variables.css +0 -2
  240. package/dist/favicon.ico +0 -0
  241. package/dist/main.2046fb4b0dd1b8e0.js +0 -1
  242. package/dist/runtime.a86d5cd27767506e.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[115],{80115:(b,g,r)=>{r.r(g),r.d(g,{DBTokenGeneratorM:()=>re});var T=r(77664),G=r(63726),k=r(17017),p=r(15861),e=r(94946),f=r(33157),d=r(90328),C=r(6990),y=r(45085),l=r(27572),A=r(51162),_=r(99150),m=r(77240),Z=r(99961),D=r(95852),E=r(85219),w=r(96814),u=r(95431),P=r(97680),O=r(33259),I=r(81453),S=r(27104),N=r(44879);const R=["dbTokenGeneratorFormC"],U=["customTokenGeneratorFormC"];function B(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"span",25),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.edit())}),e._UZ(1,"i",26),e.qZA()}}function M(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"span",27),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.clone())}),e._UZ(1,"i",28),e.qZA()}}function F(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"span",29),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removePermanentDialog())}),e._UZ(1,"i",30),e.qZA()}}function J(n,s){1&n&&(e.TgZ(0,"tr")(1,"th",31),e._UZ(2,"p-tableHeaderCheckbox"),e.qZA(),e._UZ(3,"th",32),e.TgZ(4,"th"),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"th",33),e._uU(7,"Type"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Instance"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Database"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Collection / Table"),e.qZA(),e._UZ(14,"th",34),e.qZA())}function K(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"i",49),e.NdJ("click",function(o){e.CHM(t);const i=e.oxw().$implicit,c=e.oxw();return e.KtG(c.copyValue(o,i.name))}),e.qZA()}}function Q(n,s){1&n&&(e.TgZ(0,"span",50),e._uU(1,"Native"),e.qZA())}function L(n,s){1&n&&(e.TgZ(0,"span",51),e._uU(1,"Custom"),e.qZA())}function Y(n,s){1&n&&(e.TgZ(0,"span",52),e._uU(1,"AWS"),e.qZA())}function q(n,s){1&n&&(e.TgZ(0,"span",51),e._uU(1,"Azure"),e.qZA())}function W(n,s){1&n&&(e.TgZ(0,"span",53),e._uU(1,"Google"),e.qZA())}function H(n,s){1&n&&(e.TgZ(0,"span",54),e._uU(1,"DB"),e.qZA())}function $(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"i",55),e.NdJ("click",function(o){e.CHM(t);const i=e.oxw().$implicit,c=e.oxw();return e.KtG(c.copyValue(o,i.instance))}),e.qZA()}}function j(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"i",56),e.NdJ("click",function(o){e.CHM(t);const i=e.oxw().$implicit,c=e.oxw();return e.KtG(c.copyValue(o,i.database))}),e.qZA()}}function z(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"i",57),e.NdJ("click",function(o){e.CHM(t);const i=e.oxw().$implicit,c=e.oxw();return e.KtG(c.copyValue(o,i.collection||i.table))}),e.qZA()}if(2&n){const t=e.oxw().$implicit;e.Q6J("pTooltip",t.collection?"Copy collection":"Copy table")}}const V=function(){return["/api-info/api-testing/testing"]},X=function(n,s,t){return{at_category:n,at_user:s,at_api:t}};function ee(n,s){if(1&n&&(e.TgZ(0,"a",58),e.NdJ("click",function(a){return a.stopPropagation()}),e._UZ(1,"i",59),e.qZA()),2&n){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("routerLink",e.DdM(2,V))("queryParams",e.kEZ(3,X,a.EAPICategory.TOKEN_GENERATORS,a.authCS.getUserId(),t._id))}}function te(n,s){if(1&n&&(e.TgZ(0,"tr",35)(1,"td"),e._UZ(2,"p-tableCheckbox",36),e.qZA(),e.TgZ(3,"td",37)(4,"span"),e._uU(5),e.qZA()(),e.TgZ(6,"td")(7,"span",38)(8,"span"),e._uU(9),e.qZA(),e.YNc(10,K,1,0,"i",39),e.YNc(11,Q,2,0,"span",40),e.qZA()(),e.TgZ(12,"td"),e.YNc(13,L,2,0,"span",41),e.YNc(14,Y,2,0,"span",42),e.YNc(15,q,2,0,"span",41),e.YNc(16,W,2,0,"span",43),e.YNc(17,H,2,0,"span",44),e.qZA(),e.TgZ(18,"td")(19,"span",38)(20,"span"),e._uU(21),e.qZA(),e.YNc(22,$,1,0,"i",45),e.qZA()(),e.TgZ(23,"td")(24,"span",38)(25,"span"),e._uU(26),e.qZA(),e.YNc(27,j,1,0,"i",46),e.qZA()(),e.TgZ(28,"td")(29,"span",38)(30,"span"),e._uU(31),e.qZA(),e.YNc(32,z,1,1,"i",47),e.qZA()(),e.TgZ(33,"td")(34,"div",37),e.YNc(35,ee,2,7,"a",48),e.qZA()()()),2&n){const t=s.$implicit,a=s.rowIndex,o=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("value",t)("pSelectableRow",t),e.xp6(3),e.Oqu(a+1),e.xp6(4),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.name),e.xp6(1),e.Q6J("ngIf",t.runOnNativeProcess),e.xp6(2),e.Q6J("ngIf",t.generatorType===o.ETokenGeneratorType.CUSTOM_TOKEN_GENERATOR),e.xp6(1),e.Q6J("ngIf",t.generatorType===o.ETokenGeneratorType.AWS),e.xp6(1),e.Q6J("ngIf",t.generatorType===o.ETokenGeneratorType.AZURE),e.xp6(1),e.Q6J("ngIf",t.generatorType===o.ETokenGeneratorType.GOOGLE),e.xp6(1),e.Q6J("ngIf",!t.generatorType||t.generatorType===o.ETokenGeneratorType.DB_TOKEN_GENERATOR),e.xp6(4),e.Oqu(t.instance),e.xp6(1),e.Q6J("ngIf",t.instance),e.xp6(4),e.Oqu(t.database),e.xp6(1),e.Q6J("ngIf",t.database),e.xp6(4),e.Oqu(t.collection||t.table),e.xp6(1),e.Q6J("ngIf",t.collection||t.table),e.xp6(3),e.Q6J("ngIf",t.generatorType===o.ETokenGeneratorType.DB_TOKEN_GENERATOR||t.generatorType===o.ETokenGeneratorType.CUSTOM_TOKEN_GENERATOR)}}function oe(n,s){1&n&&e._UZ(0,"p-progressSpinner",60)}let v=(()=>{class n{dbTokenGeneratorS;generalS;notificationS;authCS;cd;confirmationService;loading={grid:!1};subscriptions=[];data={mode:d.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};selectedRows=[];gridKey=A.iH._id;ETokenGeneratorType=l.Z;EAPICategory=y.R;dbTokenGeneratorFormC;customTokenGeneratorFormC;constructor(t,a,o,i,c,h){this.dbTokenGeneratorS=t,this.generalS=a,this.notificationS=o,this.authCS=i,this.cd=c,this.confirmationService=h}ngOnInit(){this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{this.dbTokenGeneratorFormC.hideModal(),this.customTokenGeneratorFormC?.hideModal(),this.loadGridData()})),this.generalS.setNewTitle("Auth Providers")}getFormComponentForType(t){return t===l.Z.CUSTOM_TOKEN_GENERATOR?this.customTokenGeneratorFormC:this.dbTokenGeneratorFormC}loadGridData(){this.loading.grid=!0,this.subscriptions.push(this.dbTokenGeneratorS.queryOnlyActive().subscribe(t=>{t.success?(this.selectedRows=[],this.rows=t.data||[],this.rowsMap=C.keyBy(this.rows,A.iH._id)):(this.rows=[],this.rowsMap={},this.selectedRows=[]),this.loading.grid=!1,this.cd.detectChanges()}))}addDBTokenGenerator(){this.data.formData={generatorType:l.Z.DB_TOKEN_GENERATOR},this.data.mode=d.D.ADD,this.data.eventChannel.emit({action:f.F.OPEN_FORM_IN_ADD_MODE}),this.dbTokenGeneratorFormC.showModal()}addCustomTokenGenerator(){this.data.formData={generatorType:l.Z.CUSTOM_TOKEN_GENERATOR},this.data.mode=d.D.ADD,this.data.eventChannel.emit({action:f.F.OPEN_FORM_IN_ADD_MODE}),this.customTokenGeneratorFormC.showModal()}addThirdPartyTokenGenerator(t){this.data.formData={generatorType:t},this.data.mode=d.D.ADD,this.data.eventChannel.emit({action:f.F.OPEN_FORM_IN_ADD_MODE}),this.dbTokenGeneratorFormC.showModal()}addAWSTokenGenerator(){this.addThirdPartyTokenGenerator(l.Z.AWS)}addAzureTokenGenerator(){this.addThirdPartyTokenGenerator(l.Z.AZURE)}addGoogleTokenGenerator(){this.addThirdPartyTokenGenerator(l.Z.GOOGLE)}edit(){if(!this.getSelectedRowId())return;const t=this.rowsMap[this.getSelectedRowId()];this.data.formData=t,this.data.mode=d.D.EDIT,this.data.eventChannel.emit({action:f.F.OPEN_FORM_IN_EDIT_MODE}),this.getFormComponentForType(t.generatorType).showModal()}removePermanentDialog(){var a,t=this;this.confirmationService.confirm({message:'<p class="dialog-text">Do you want to <b class="text-danger">permanently remove this DB Token Generator</b>?</p>',header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,p.Z)(function*(){yield t.removePermanent()}),function(){return a.apply(this,arguments)})})}removePermanent(){var t=this;return(0,p.Z)(function*(){if(t.getSelectedRowId()){t.loading.grid=!0;try{const a=`${t.getSelectedRowGuid()}:${t.authCS.gUser._id}`,o=yield t.dbTokenGeneratorS.permanentDelete(a).toPromise();o.success?(t.notificationS.showSuccess("Deleted successfully."),t.selectedRows=[],t.loadGridData()):t.notificationS.showErrorFromResponse(o,"Unable to delete.")}catch{t.notificationS.showError("Unable to delete.")}t.loading.grid=!1}})()}clone(){var t=this;return(0,p.Z)(function*(){if(t.getSelectedRowId()){t.loading.grid=!0;try{const a=(yield t.dbTokenGeneratorS.getById(t.getSelectedRowId()).toPromise()).data,o=JSON.parse(JSON.stringify(a)),i=o.name;delete o._id,delete o.guid,delete o.createdAt,delete o.updatedAt;const c=`${i} Copy`;o.name=c,o.dbTokenGeneratorCode&&i&&(o.dbTokenGeneratorCode=o.dbTokenGeneratorCode.replace(`name: '${i}'`,`name: '${c}'`).replace(`name: "${i}"`,`name: '${c}'`));const h=yield t.dbTokenGeneratorS.post(o).toPromise();h.success?(t.notificationS.showSuccess("Cloned successfully."),t.selectedRows=[],t.loadGridData()):t.notificationS.showErrorFromResponse(h,"Unable to clone.")}catch(a){t.notificationS.showErrorMessageFromErrorObject(a)}t.loading.grid=!1}})()}dblClickGrid(){setTimeout(()=>this.edit(),10)}copyValue(t,a){var o=this;return(0,p.Z)(function*(){t.stopPropagation(),a&&((yield o.generalS.copyToClipboard(a))?o.notificationS.showSuccess(`Copied "${a}" to clipboard.`):o.notificationS.showError("Unable to copy to clipboard."))})()}getSelectedRowId(){return this.selectedRows?.[0]?._id}getSelectedRowGuid(){return this.selectedRows?.[0]?.guid}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||n)(e.Y36(_.T),e.Y36(m.b),e.Y36(Z.W),e.Y36(D.D),e.Y36(e.sBO),e.Y36(E.YP))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-db-token-generator-grid"]],viewQuery:function(a,o){if(1&a&&(e.Gf(R,5),e.Gf(U,5)),2&a){let i;e.iGM(i=e.CRH())&&(o.dbTokenGeneratorFormC=i.first),e.iGM(i=e.CRH())&&(o.customTokenGeneratorFormC=i.first)}},decls:39,vars:18,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Auth Providers",1,"fa-fw","mr-1",3,"src"],[1,"float-right","ml-3","dropdown"],["data-toggle","dropdown","tooltipPosition","left","pTooltip","Add",1,"cursor-pointer"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"fas","fa-caret-down","text-muted","fa-fw","small"],[1,"dropdown-menu","dropdown-menu-right"],["href","javascript:",1,"dropdown-item",3,"click"],["alt","",1,"fa-fw","mr-1",3,"src"],[1,"fas","fa-code","fa-fw","mr-1","text-success"],[1,"fab","fa-aws","fa-fw","mr-1","text-warning"],[1,"fab","fa-microsoft","fa-fw","mr-1","text-info"],[1,"fab","fa-google","fa-fw","mr-1","text-danger"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["dbTokenGeneratorFormC",""],["customTokenGeneratorFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[2,"width","45px"],[2,"width","80px"],[2,"width","120px"],[2,"width","60px"],[3,"pSelectableRow"],[3,"value","pSelectableRow"],[1,"text-center"],[1,"db-token-copy-cell"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted db-token-copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Running on native process. console.log will not be visible in logs, use g.logger.log instead.","class","ml-2 grid-pill-custom-api text-danger border",4,"ngIf"],["class","grid-pill-custom-api text-info border",4,"ngIf"],["class","grid-pill-custom-api text-warning border",4,"ngIf"],["class","grid-pill-custom-api text-danger border",4,"ngIf"],["class","grid-pill-custom-api text-success border",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted db-token-copy-icon","pTooltip","Copy instance","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted db-token-copy-icon","pTooltip","Copy database","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted db-token-copy-icon","tooltipPosition","top",3,"pTooltip","click",4,"ngIf"],["class","btn btn-xsm-custom","href","javascript:","pTooltip","Test","tooltipPosition","left",3,"routerLink","queryParams","click",4,"ngIf"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","db-token-copy-icon",3,"click"],["tooltipPosition","left","pTooltip","Running on native process. console.log will not be visible in logs, use g.logger.log instead.",1,"ml-2","grid-pill-custom-api","text-danger","border"],[1,"grid-pill-custom-api","text-info","border"],[1,"grid-pill-custom-api","text-warning","border"],[1,"grid-pill-custom-api","text-danger","border"],[1,"grid-pill-custom-api","text-success","border"],["pTooltip","Copy instance","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","db-token-copy-icon",3,"click"],["pTooltip","Copy database","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","db-token-copy-icon",3,"click"],["tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","db-token-copy-icon",3,"pTooltip","click"],["href","javascript:","pTooltip","Test","tooltipPosition","left",1,"btn","btn-xsm-custom",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Auth Providers"),e.qZA(),e.TgZ(6,"span",3)(7,"span",4),e._UZ(8,"i",5)(9,"i",6),e.qZA(),e.TgZ(10,"div",7)(11,"a",8),e.NdJ("click",function(){return o.addDBTokenGenerator()}),e._UZ(12,"img",9),e.ALo(13,"themeIcon"),e._uU(14," DB Token Generator "),e.qZA(),e.TgZ(15,"a",8),e.NdJ("click",function(){return o.addCustomTokenGenerator()}),e._UZ(16,"i",10),e._uU(17," Custom Token Generator "),e.qZA(),e.TgZ(18,"a",8),e.NdJ("click",function(){return o.addAWSTokenGenerator()}),e._UZ(19,"i",11),e._uU(20," AWS "),e.qZA(),e.TgZ(21,"a",8),e.NdJ("click",function(){return o.addAzureTokenGenerator()}),e._UZ(22,"i",12),e._uU(23," Azure AD "),e.qZA(),e.TgZ(24,"a",8),e.NdJ("click",function(){return o.addGoogleTokenGenerator()}),e._UZ(25,"i",13),e._uU(26," Google "),e.qZA()()(),e.YNc(27,B,2,0,"span",14),e.YNc(28,M,2,0,"span",15),e.YNc(29,F,2,0,"span",16),e.qZA(),e.TgZ(30,"div",17)(31,"p-table",18),e.NdJ("selectionChange",function(c){return o.selectedRows=c})("dblclick",function(){return o.dblClickGrid()}),e.YNc(32,J,15,0,"ng-template",19),e.YNc(33,te,36,19,"ng-template",20),e.qZA(),e.YNc(34,oe,1,0,"p-progressSpinner",21),e.qZA()(),e._UZ(35,"app-db-token-generator-form",22,23)(37,"app-custom-token-generator-form",22,24)),2&a&&(e.xp6(3),e.Q6J("src",e.lcZ(4,14,"/assets/images/icons/db-token-generator.svg"),e.LSH),e.xp6(9),e.Q6J("src",e.lcZ(13,16,"/assets/images/icons/db-token-generator.svg"),e.LSH),e.xp6(15),e.Q6J("ngIf",1===(null==o.selectedRows?null:o.selectedRows.length)),e.xp6(1),e.Q6J("ngIf",1===(null==o.selectedRows?null:o.selectedRows.length)),e.xp6(1),e.Q6J("ngIf",1===(null==o.selectedRows?null:o.selectedRows.length)),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",o.selectedRows)("dataKey",o.gridKey)("scrollable",!0)("value",o.rows),e.xp6(3),e.Q6J("ngIf",o.loading.grid),e.xp6(1),e.Q6J("data",o.data),e.xp6(2),e.Q6J("data",o.data))},dependencies:[T.rH,w.O5,u.iA,E.jx,u.Ei,u.UA,u.Mo,P.G,O.u,I.a,S.s,N.w],styles:[".db-token-copy-cell[_ngcontent-%COMP%] .db-token-copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.db-token-copy-cell[_ngcontent-%COMP%]:hover .db-token-copy-icon[_ngcontent-%COMP%]{opacity:1}.db-token-copy-cell[_ngcontent-%COMP%] .db-token-copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return n})(),x=(()=>{class n{static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-db-token-generator-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(a,o){1&a&&(e.TgZ(0,"div",0),e._UZ(1,"app-db-token-generator-grid"),e.qZA())},dependencies:[v],encapsulation:2})}return n})();var ne=r(25434);const ae=[{path:"layout",component:x,canActivate:[G.P]}];let re=(()=>{class n{static \u0275fac=function(a){return new(a||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[T.Bz.forChild(ae),k.u,ne.L]})}return n})()},99150:(b,g,r)=>{r.d(g,{T:()=>y});var T=r(20553),G=r(19394),k=r(46178),p=r(94946),e=r(69862),f=r(95852),d=r(99961),C=r(27414);let y=(()=>{class l extends k.g{http;authCS;ns;cs;constructor(_,m,Z,D){super(_,G.k4.TOKEN_GENERATORS),this.http=_,this.authCS=m,this.ns=Z,this.cs=D}getTokenGeneratorsAsAPI(_){const m=this.authCS.getUserPath();return this.http.post(T.N.BE_HOST_PORT_SITES+`${this.modelPath}/${m}/token-generators-api-list-arr`,{},{headers:_})}static \u0275fac=function(m){return new(m||l)(p.LFG(e.eN),p.LFG(f.D),p.LFG(d.W),p.LFG(C.L))};static \u0275prov=p.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[148],{40148:($e,I,a)=>{a.r(I),a.d(I,{LogProfileM:()=>Qe});var M=a(77664),b=a(17017),O=a(63726),F=a(81025),p=a(15861),v=a(45085),R=a(82452),e=a(94946),x=a(32915),Z=a(53429),C=a(27414),S=a(96814),h=a(85219),y=a(97680),U=a(55043),G=a(63885),J=a(559),Y=a(86937),Q=a(40356),k=a(79329),q=a(37595),K=a(53824),W=a(58651),V=a(86607),H=a(5305),B=a(72726),d=a(33157),g=a(90328),f=a(56212),m=a(6990),c=a(51162),j=a(96925),D=a(67031),w=a(77240),T=a(99961),X=a(92189),L=a(95852),z=a(13065),ee=a(67629),te=a(31042),ne=a(67145),oe=a(12559),se=a(10262),E=a(95431),ae=a(33259),u=a(60095),re=a(32660),ie=a(38057);function le(s,i){1&s&&(e.TgZ(0,"span"),e._UZ(1,"i",23),e._uU(2," Add Log Profile"),e.qZA())}function pe(s,i){1&s&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," View Log Profile"),e.qZA())}function ce(s,i){1&s&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," Edit Log Profile"),e.qZA())}function de(s,i){1&s&&(e.TgZ(0,"span"),e._uU(1,"Save Log Profile"),e.qZA())}function ge(s,i){1&s&&(e.TgZ(0,"span"),e._uU(1,"Update Log Profile"),e.qZA())}function ue(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",26),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.save())}),e._UZ(1,"i",27),e.YNc(2,de,2,0,"span",4),e.YNc(3,ge,2,0,"span",4),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function me(s,i){1&s&&e._UZ(0,"p-progressSpinner",28)}let _=(()=>{class s{fb;ns;logProfileS;generalS;authCS;constantsS;data;loading={form:!1};EFormMode=g.D;form;subscriptions=[];constructor(t,o,n,r,l,A){this.fb=t,this.ns=o,this.logProfileS=n,this.generalS=r,this.authCS=l,this.constantsS=A}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var o=(0,p.Z)(function*(n){if(n)if(t.form.enable(),n.action===d.F.OPEN_FORM_IN_EDIT_MODE){const r=yield t.logProfileS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(r.data)}else if(n.action===d.F.OPEN_FORM_IN_VIEW_MODE){const r=yield t.logProfileS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(r.data),t.form.disable()}else n.action===d.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.setDefaultValuesInForm())});return function(n){return o.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[u.kI.required]],isDefault:[!0,[]]})}setDefaultValuesInForm(){this.form.patchValue({isDefault:!0})}showModal(){$("#idLogProfileForm").modal("show")}hideModal(){$("#idLogProfileForm").modal("hide")}save(){var t=this;return(0,p.Z)(function*(){const o=t.form.getRawValue();o.user=t.authCS.getUserId();try{let n;t.loading.form=!0,t.data.mode===g.D.ADD?n=yield t.logProfileS.post(o).toPromise():t.data.mode===g.D.EDIT&&(n=yield t.logProfileS.put(t.data.formData._id,o,{select:c.iH._id}).toPromise()),t.ns.showSuccess(t.data.mode===g.D.ADD?t.constantsS.logProfile.addSuccess:t.constantsS.logProfile.editSuccess),t.data.eventChannel.emit({action:t.data.mode===g.D.ADD?d.F.SAVED:d.F.UPDATED}),t.loading.form=!1}catch(n){t.loading.form=!1,t.ns.showErrorFromResponse(n.error||n,"Unable to save log profile.")}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(o){return new(o||s)(e.Y36(u.qu),e.Y36(T.W),e.Y36(D.T),e.Y36(w.b),e.Y36(L.D),e.Y36(C.L))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-w-logProfiles-form"]],inputs:{data:"data"},decls:31,vars:7,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogProfileForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-8"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"col-4"],[1,"align-middle","mb-0","pt-1"],["formControlName","isDefault","inputId","idIsActive",3,"binary"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,n){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,le,3,0,"span",4),e.YNc(5,pe,3,0,"span",4),e.YNc(6,ce,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"div",11)(14,"div",12)(15,"label",13),e._uU(16,"Name"),e.qZA(),e.TgZ(17,"div",11),e._UZ(18,"input",14),e.qZA()()(),e.TgZ(19,"div",15)(20,"div",12)(21,"label",13),e._uU(22,"Active"),e.qZA(),e.TgZ(23,"label",16),e._UZ(24,"p-checkbox",17),e.qZA()()()()()(),e.TgZ(25,"div",18)(26,"button",19),e._UZ(27,"i",20),e._uU(28," Close"),e.qZA(),e.YNc(29,ue,4,3,"button",21),e.qZA(),e.YNc(30,me,1,0,"p-progressSpinner",22),e.qZA()()()),2&o&&(e.xp6(4),e.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",n.form),e.xp6(13),e.Q6J("binary",!0),e.xp6(5),e.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.loading.form))},dependencies:[u._Y,u.Fj,u.JJ,u.JL,u.sg,u.u,S.O5,re.y,y.G,ie.XZ],encapsulation:2})}return s})();var fe=a(44879);const ve=["logProfilesFormC"];function Ce(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"span",18),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.edit())}),e._UZ(1,"i",19),e.qZA()}}function Se(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"span",20),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.clone())}),e._UZ(1,"i",21),e.qZA()}}function he(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.removePermanentDialog())}),e._UZ(1,"i",23),e.qZA()}}function ye(s,i){1&s&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e._UZ(3,"th",24)(4,"th",24),e.qZA())}function Pe(s,i){1&s&&e._UZ(0,"i",28)}function Ae(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"i",29),e.NdJ("click",function(n){e.CHM(t);const r=e.oxw().$implicit,l=e.oxw();return e.KtG(l.saveLogProfilePermissions(n,r))}),e.qZA()}}function Ie(s,i){if(1&s&&(e.TgZ(0,"tr",25)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Pe,1,0,"i",26),e.qZA(),e.TgZ(5,"td"),e.YNc(6,Ae,1,0,"i",27),e.qZA()()),2&s){const t=i.$implicit,o=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",t.isDefault),e.xp6(2),e.Q6J("ngIf",(null==o.selectedRows||null==o.selectedRows[0]?null:o.selectedRows[0]._id)===t._id)}}function xe(s,i){1&s&&e._UZ(0,"p-progressSpinner",30)}let N=(()=>{class s{logProfileS;generalS;ns;navigationCS;authCS;constantsS;apiS;instanceS;functionS;schedulerS;amEventS;tpInstalledApisS;webSocketEventsS;confirmationService;eventCenterS;logProfilesFormC;loading={grid:!1};subscriptions=[];data={mode:g.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=c.iH._id;constructor(t,o,n,r,l,A,ke,qe,Ke,We,Ve,He,Be,je,Xe){this.logProfileS=t,this.generalS=o,this.ns=n,this.navigationCS=r,this.authCS=l,this.constantsS=A,this.apiS=ke,this.instanceS=qe,this.functionS=Ke,this.schedulerS=We,this.amEventS=Ve,this.tpInstalledApisS=He,this.webSocketEventsS=Be,this.confirmationService=je,this.eventCenterS=Xe}ngOnInit(){this.eventCenterS.group.selectedGroups.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===d.F.SAVED||t.action===d.F.UPDATED)&&(this.logProfilesFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("Log Profile")}loadGridData(){var t=this;this.loading.grid=!0;const o={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,active:1,isDefault:1},sort:{name:1}};this.showAll&&delete o.find.active,this.subscriptions.push(this.logProfileS.query(o).subscribe(function(){var n=(0,p.Z)(function*(r){r.success&&(t.selectedRows=[],t.rows=r.data,t.rowsMap=m.keyBy(t.rows,c.iH._id));let l=t.navigationCS.getQueryParam(f.p.log_profile);l?!t.rowsMap[l]&&t.rows.length&&(l=t.rows[0]._id):t.rows.length&&(l=t.rows[0]._id),t.rowsMap[l]&&(t.selectedRows=[t.rowsMap[l]],yield t.fillData()),t.generalS.setNewTitle("Log Profile"),t.loading.grid=!1});return function(r){return n.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=g.D.ADD,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_ADD_MODE}),this.logProfilesFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=g.D.VIEW,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_VIEW_MODE}),this.logProfilesFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=g.D.EDIT,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_EDIT_MODE}),this.logProfilesFormC.showModal()}clone(){var t=this;return(0,p.Z)(function*(){try{if(!t.selectedRows[0])return;const o=(yield t.logProfileS.getById(t.selectedRows[0]._id).toPromise()).data;delete o._id,delete o.guid,delete o.queryParamsMap,o.isDefault=!1,o.name=`${o.name}-clone`,(yield t.logProfileS.post(o).toPromise()).success?(t.ns.showSuccess(t.constantsS.logProfile.cloneSuccess),t.loadGridData()):t.ns.showSuccess(t.constantsS.logProfile.cloneSuccess)}catch{t.ns.showError(t.constantsS.logProfile.cloneError)}})()}removePermanentDialog(){var t=this;return(0,p.Z)(function*(){var o;t.confirmationService.confirm({message:t.constantsS.logProfile.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,p.Z)(function*(){yield t.removePermanent()}),function(){return o.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,p.Z)(function*(){t.loading.grid=!0;const o=yield t.logProfileS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,o.success?(t.ns.showSuccess(t.constantsS.logProfile.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.ns.showErrorFromResponse(o,t.constantsS.logProfile.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.group.selectedGroups.next([])}resetDependents(){var t=this;return(0,p.Z)(function*(){t.eventCenterS.group.selectedGroups.next([]),yield t.generalS.resetUrlParams([f.p.log_profile,f.p.api_category]),t.eventCenterS.apiCategory.selectedApiCategory.next([]),t.eventCenterS.group.instanceIds.next([]),t.eventCenterS.group.databaseNames.next([]),t.eventCenterS.group.collectionNames.next([]),t.eventCenterS.group.supportedApiIds.next([]),t.eventCenterS.group.customApiIds.next([]),t.eventCenterS.group.thirdPartyApiIds.next([]),t.eventCenterS.group.selectedSystemApis.next([]),t.eventCenterS.group.selectedFunctions.next([]),t.eventCenterS.group.selectedThirdPartyAPIs.next([]),t.eventCenterS.group.selectedSupportedAPIs.next([]),t.eventCenterS.group.selectedEvents.next([]),t.eventCenterS.group.selectedSchedulers.next([]),t.eventCenterS.group.selectedWebSocket.next([]),t.eventCenterS.group.apisRegex={}})()}logProfileSelected(){var t=this;return(0,p.Z)(function*(){t.resetDependents(),t.fillData()})()}fillData(){var t=this;return(0,p.Z)(function*(){if(!t.selectedRows.length)return void t.resetDependents();const o=(yield t.logProfileS.getById(t.selectedRows[0]._id).toPromise()).data;o&&o.queryParams&&(t.eventCenterS.group.instanceIds.next((yield t.apiS.getIdArrFromNames(o.queryParams.instanceNames,t.instanceS))||[]),t.eventCenterS.group.databaseNames.next(o.queryParams.databaseNames||[]),t.eventCenterS.group.collectionNames.next(o.queryParams.collectionNames||[]),t.eventCenterS.group.supportedApiIds.next(o.queryParams.supportedApiNames||[]),t.eventCenterS.group.customApiIds.next((yield t.apiS.getIdArrFromNames(o.queryParams.customApiNames,t.functionS))||[]),t.eventCenterS.group.systemApiIds.next(o.queryParams.systemApiNames||[]),t.eventCenterS.group.thirdPartyApiIds.next((yield t.apiS.getIdArrFromNames(o.queryParams.thirdPartyApiNames,t.tpInstalledApisS,v.R.THIRD_PARTY_APIS))||[]),t.eventCenterS.group.eventIds.next((yield t.apiS.getIdArrFromNames(o.queryParams.eventNames,t.amEventS))||[]),t.eventCenterS.group.schedulersIds.next((yield t.apiS.getIdArrFromNames(o.queryParams.schedulerNames,t.schedulerS))||[]),t.eventCenterS.group.webSocketIds.next(yield t.apiS.getIdArrFromNamesWebSocketEvents(o.queryParams.webSocketEventNames))),o&&(t.eventCenterS.group.selectedGroups.next([o]),t.eventCenterS.group.apisRegex=o.apisRegex,yield t.navigationCS.setQueryParam(f.p.log_profile,t.selectedRows[0]._id)),o?.queryParams||(yield t.resetDependents())})()}saveLogProfilePermissions(t,o){var n=this;return(0,p.Z)(function*(){t.stopImmediatePropagation();const r=JSON.parse(JSON.stringify(o));r.supportedApiLog=n.getApiLogObj(n.eventCenterS.group.selectedSupportedAPIs.value,c.qD._id),r.functionsLog=n.getApiLogObj(n.eventCenterS.group.selectedFunctions.value,c.qD.name),r.systemApisLog=n.getApiLogObj(n.eventCenterS.group.selectedSystemApis.value,c.qD._id),r.thirdPartyApisLog=n.getApiLogObj(n.eventCenterS.group.selectedThirdPartyAPIs.value,c.qD.nameId),r.eventLog=n.getApiLogObj(n.eventCenterS.group.selectedEvents.value,c.qD.name),r.schedulersLog=n.getApiLogObj(n.eventCenterS.group.selectedSchedulers.value,c.qD.name),r.webSocketEventsLog=n.getApiLogObj(n.eventCenterS.group.selectedWebSocket.value,c.qD.id),r.apisRegex=n.eventCenterS.group.apisRegex,r.queryParams={},r.user=n.authCS.getUserId(),r.queryParams.instanceNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.instanceIds.value,n.instanceS),r.queryParams.databaseNames=m.uniq(n.eventCenterS.group.databaseNames.value),r.queryParams.collectionNames=m.uniq(n.eventCenterS.group.collectionNames.value),r.queryParams.supportedApiNames=m.uniq(n.eventCenterS.group.supportedApiIds.value),r.queryParams.customApiNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.customApiIds.value,n.functionS),r.queryParams.systemApiNames=m.uniq(n.eventCenterS.group.systemApiIds.value),r.queryParams.thirdPartyApiNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.thirdPartyApiIds.value,n.tpInstalledApisS,v.R.THIRD_PARTY_APIS),r.queryParams.eventNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.eventIds.value,n.amEventS),r.queryParams.schedulerNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.schedulersIds.value,n.schedulerS),r.queryParams.webSocketEventNames=yield n.apiS.getNameArrFromIdsWebSocketEvents(n.eventCenterS.group.webSocketIds.value);try{const l=yield n.logProfileS.put(r._id,r,{select:c.iH._id}).toPromise();l&&l.success&&n.ns.showSuccess(n.constantsS.logProfile.editSuccess)}catch(l){n.ns.showErrorFromResponse(l.error||l,"Unable to save log profile.")}})()}getApiLogObj(t,o){const n={};for(const r of t)n[r[o]]={},r.saveResponseInLog&&(n[r[o]].saveResponseInLog=!0),m.isEmpty(n[r[o]])&&delete n[r[o]];return n}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickLogProfile(){this.selectedRows.length&&this.edit()}ERequestMethod=j.Yp;static \u0275fac=function(o){return new(o||s)(e.Y36(D.T),e.Y36(w.b),e.Y36(T.W),e.Y36(X.S),e.Y36(L.D),e.Y36(C.L),e.Y36(z.k),e.Y36(Z.E),e.Y36(ee.d),e.Y36(te.Z),e.Y36(ne.l),e.Y36(oe.d),e.Y36(se.a),e.Y36(h.YP),e.Y36(x.u))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-w-logProfiles"]],viewQuery:function(o,n){if(1&o&&e.Gf(ve,5),2&o){let r;e.iGM(r=e.CRH())&&(n.logProfilesFormC=r.first)}},decls:22,vars:17,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Log Profile",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-profile.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped log-profile-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["logProfilesFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[2,"width","40px"],[3,"pSelectableRow"],["class","fas fa-check fa-fw text-success","pTooltip","This log profile is active now",4,"ngIf"],["pTooltip","Save log profile settings","class","fas fa-save text-success fa-fw cursor-pointer",3,"click",4,"ngIf"],["pTooltip","This log profile is active now",1,"fas","fa-check","fa-fw","text-success"],["pTooltip","Save log profile settings",1,"fas","fa-save","text-success","fa-fw","cursor-pointer",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,n){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Log Profiles"),e.qZA(),e.TgZ(6,"div",3)(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA()(),e.TgZ(10,"span",6),e.NdJ("click",function(){return n.add()}),e._UZ(11,"i",7),e.qZA(),e.YNc(12,Ce,2,0,"span",8),e.YNc(13,Se,2,0,"span",9),e.YNc(14,he,2,0,"span",10),e.qZA(),e.TgZ(15,"div",11)(16,"p-table",12),e.NdJ("selectionChange",function(l){return n.selectedRows=l})("selectionChange",function(){return n.logProfileSelected()})("dblclick",function(){return n.dblClickLogProfile()}),e.YNc(17,ye,5,0,"ng-template",13),e.YNc(18,Ie,7,4,"ng-template",14),e.qZA(),e.YNc(19,xe,1,0,"p-progressSpinner",15),e.qZA()(),e._UZ(20,"app-w-logProfiles-form",16,17)),2&o&&(e.xp6(3),e.Q6J("src",e.lcZ(4,13,"/assets/images/icons/log-profile.svg"),e.LSH),e.xp6(5),e.Q6J("src",e.lcZ(9,15,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(4),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(3),e.Q6J("ngIf",n.loading.grid),e.xp6(1),e.Q6J("data",n.data))},dependencies:[S.O5,E.iA,h.jx,E.Ei,y.G,ae.u,_,fe.w]})}return s})();function Ze(s,i){if(1&s&&(e.TgZ(0,"div",4)(1,"span",5)(2,"h4",6),e._uU(3),e.qZA()()()),2&s){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function De(s,i){1&s&&(e.TgZ(0,"div",30),e._UZ(1,"app-w-instances",17),e.qZA()),2&s&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0))}function we(s,i){1&s&&(e.TgZ(0,"div",31),e._UZ(1,"app-w-databases",17),e.qZA()),2&s&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0))}const Te=function(){return[50,50]};function Le(s,i){if(1&s&&(e.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10),e._UZ(4,"app-w-logProfiles"),e.qZA()(),e.TgZ(5,"div",11)(6,"div",10),e._UZ(7,"app-w-api-categories",12),e.qZA()(),e.TgZ(8,"div",13)(9,"p-splitter",14),e.YNc(10,De,2,3,"ng-template",15),e.YNc(11,we,2,3,"ng-template",15),e.qZA()(),e.TgZ(12,"div",16)(13,"div",10),e._UZ(14,"app-w-collections",17),e.qZA()(),e.TgZ(15,"div",18)(16,"div",10),e._UZ(17,"app-w-supported-api",19),e.qZA()(),e.TgZ(18,"div",20)(19,"div",10),e._UZ(20,"app-w-supported-tp-api",21),e.qZA()(),e.TgZ(21,"div",22)(22,"div",10),e._UZ(23,"app-custom-api-grid",23),e.qZA()(),e.TgZ(24,"div",24)(25,"div",10),e._UZ(26,"app-system-api-w",23),e.qZA()(),e.TgZ(27,"div",25)(28,"div",10),e._UZ(29,"app-events-grid",23),e.qZA()(),e.TgZ(30,"div",26)(31,"div",10),e._UZ(32,"app-scheduler-man-w",27),e.qZA()(),e.TgZ(33,"div",28)(34,"div",10),e._UZ(35,"app-web-socket-events-grid",29),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(5),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length?"block":"none"),e.xp6(2),e.Q6J("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(52,Te)),e.xp6(3),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!0)("isDependentOnGroup",!0)("treeViewId","treeViewFromLogProfileLayout"),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("IsDependentOnGroup",!0)("isLPM",!0),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("isLPM",!0),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("isLPM",!0),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("isLPM",!0),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("IsDependentOnGroup",!0)("isLPM",!0),e.xp6(1),e.Udp("display",t.eventCenterS.group.selectedGroups.value.length&&(null==t.eventCenterS.apiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory||null==t.eventCenterS.apiCategory.selectedApiCategory.value||null==t.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:t.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===t.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("showCheckbox",!0)("isLPM",!0)}}function Ee(s,i){1&s&&e._UZ(0,"p-progressSpinner",32)}function _e(s,i){if(1&s&&(e.TgZ(0,"div"),e.YNc(1,Ze,4,1,"div",1),e.YNc(2,Le,36,53,"div",2),e.YNc(3,Ee,1,0,"p-progressSpinner",3),e.qZA()),2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.loading)}}let P=(()=>{class s{eventCenterS;instanceS;constantsS;isExternalLogsSetupDoneByRoot;loading;EAPICategory=v.R;constructor(t,o,n){this.eventCenterS=t,this.instanceS=o,this.constantsS=n}ngOnInit(){this.getExternalRedisSetupFromPackageJson()}getExternalRedisSetupFromPackageJson(){var t=this;return(0,p.Z)(function*(){t.loading=!0;try{const o=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,t.isExternalLogsSetupDoneByRoot=!0===o.isLogsSetupDone}catch{t.isExternalLogsSetupDoneByRoot=!1}})()}ngOnDestroy(){this.eventCenterS.group.apisRegex={}}EInstanceApiWidgetMode=R.a;static \u0275fac=function(o){return new(o||s)(e.Y36(x.u),e.Y36(Z.E),e.Y36(C.L))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-logProfile-layout"]],decls:1,vars:1,consts:[[4,"ngIf"],["class","overflow-hidden","style","height: calc(100vh - 46px);",4,"ngIf"],["class","pt-1 pl-1 pr-1 overflow-auto",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"overflow-hidden",2,"height","calc(100vh - 46px)"],[1,"text-center"],[1,"mt-5","pt-5"],[1,"pt-1","pl-1","pr-1","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-profiles"],[1,"vertical-height-max"],[1,"v-div","w-categories"],[3,"typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsDependentOnGroup"],[1,"v-div","w-ins-apis"],[3,"isLPM","isDependentOnGroup","treeViewId"],[1,"v-div","w-third-party"],[3,"IsDependentOnGroup","isLPM"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","IsDependentOnGroup","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","IsDependentOnGroup","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","IsReadOnly","IsDependentOnGroup","showCheckbox","isLPM"],[1,"vertical-height-instances","w-100"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,n){1&o&&e.YNc(0,_e,4,3,"div",0),2&o&&e.Q6J("ngIf",void 0!==n.isExternalLogsSetupDoneByRoot)},dependencies:[S.O5,h.jx,y.G,U.q,G.f,J.O,Y.n,Q.T,k.X,q.G,K.d,W.A,V.V,H.N,B.x,N],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 320px)}.vertical-height-max[_ngcontent-%COMP%]{height:calc(100vh - 66px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 62px);float:left}.w-profiles[_ngcontent-%COMP%]{width:20rem}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:25rem}.w-collection[_ngcontent-%COMP%]{width:28rem}.w-ins-apis[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%], .w-events[_ngcontent-%COMP%], .w-schedulers[_ngcontent-%COMP%]{width:calc(100vw - 37.5rem)}"]})}return s})();var Ne=a(2777),Me=a(84186),be=a(95765),Oe=a(57705),Fe=a(1678),Re=a(64211),Ue=a(21434),Ge=a(31558),Je=a(38125);const Ye=[{path:"main",component:P,canActivate:[O.P]}];let Qe=(()=>{class s{static \u0275fac=function(o){return new(o||s)};static \u0275mod=e.oAB({type:s});static \u0275inj=e.cJS({imports:[M.Bz.forChild(Ye),b.u,Fe.DashboardM,Re.DbCellM,Ue.B,Me.SystemApiM,be.FunctionManM,Ne.u,Oe.L,Ge.SchedulerManM,Je.AmEventsM,F.WebSocketEventsM]})}return s})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1558],{31558:(O,C,a)=>{a.r(C),a.d(C,{SchedulerManM:()=>E});var l=a(77664),e=a(17017),c=a(94946),f=a(86607);let m=(()=>{class _{constructor(){}ngOnInit(){}static \u0275fac=function(h){return new(h||_)};static \u0275cmp=c.Xpm({type:_,selectors:[["app-scheduler-man-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(h,I){1&h&&(c.TgZ(0,"div",0),c._UZ(1,"app-scheduler-man-w"),c.qZA())},dependencies:[f.V],encapsulation:2})}return _})();var p=a(63726),P=a(10885);const v=[{path:"scheduler-layout",component:m,canActivate:[p.P]}];let E=(()=>{class _{static \u0275fac=function(h){return new(h||_)};static \u0275mod=c.oAB({type:_});static \u0275inj=c.cJS({imports:[l.Bz.forChild(v),e.u,P.R]})}return _})()},86607:(O,C,a)=>{a.d(C,{V:()=>he});var l=a(15861),e=a(94946),c=a(33157),f=a(90328),m=a(56212),p=a(6990),v=a(51162),D=a(45085),E=a(60921),_=a(31042),R=a(77240),M=a(99961),h=a(85219),I=a(92189),A=a(95852),Z=a(27414),L=a(32915),w=a(77664),y=a(60095),W=a(96814),x=a(95431),U=a(97680),N=a(33259),b=a(38057),G=a(98479),K=a(44879);const F=["schedulerManFormC"];function J(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.edit())}),e._UZ(1,"i",18),e.qZA()}}function B(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.clone())}),e._UZ(1,"i",20),e.qZA()}}function Q(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"span",21),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.removePermanentDialog())}),e._UZ(1,"i",22),e.qZA()}if(2&s){const t=e.oxw(2);e.Q6J("pTooltip",t.selectedRows.length>1?"Permanent Delete ("+t.selectedRows.length+" selected)":"Permanent Delete")}}function k(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"span")(1,"span",12),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.add())}),e._UZ(2,"i",13),e.qZA(),e.YNc(3,J,2,0,"span",14),e.YNc(4,B,2,0,"span",15),e.YNc(5,Q,2,1,"span",16),e.qZA()}if(2&s){const t=e.oxw();e.xp6(3),e.Q6J("ngIf",t.selectedRows.length),e.xp6(1),e.Q6J("ngIf",t.selectedRows.length),e.xp6(1),e.Q6J("ngIf",t.selectedRows.length)}}function Y(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"span",23)(1,"p-checkbox",24),e.NdJ("ngModelChange",function(i){e.CHM(t);const r=e.oxw();return e.KtG(r.eventCenterS.group.apisRegex.allSchedulers=i)}),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.eventCenterS.group.apisRegex.allSchedulers)("binary",!0)}}function H(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"span",23)(1,"p-checkbox",24),e.NdJ("ngModelChange",function(i){e.CHM(t);const r=e.oxw();return e.KtG(r.eventCenterS.filterInLog.apisRegex.allSchedulers=i)}),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.eventCenterS.filterInLog.apisRegex.allSchedulers)("binary",!0)}}function $(s,o){if(1&s&&(e.TgZ(0,"div")(1,"div",25),e._uU(2),e.qZA()()),2&s){const t=e.oxw();e.xp6(2),e.Oqu(t.constantsS.group.allSchedulersPermitted)}}function V(s,o){1&s&&(e.TgZ(0,"th",33),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function j(s,o){1&s&&e._UZ(0,"th",35)}function q(s,o){1&s&&e._UZ(0,"th")}function X(s,o){1&s&&e._UZ(0,"th",36)}function z(s,o){if(1&s&&(e.TgZ(0,"tr"),e.YNc(1,V,2,0,"th",31),e.YNc(2,j,1,0,"th",32),e._UZ(3,"th",33),e.TgZ(4,"th"),e._uU(5,"Name"),e.qZA(),e.YNc(6,q,1,0,"th",6),e.YNc(7,X,1,0,"th",34),e.qZA()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.isMultiSelect||t.showCheckbox),e.xp6(1),e.Q6J("ngIf",!t.isDependentOnGroup&&!t.isLPM&&!t.isFilterLogTable),e.xp6(4),e.Q6J("ngIf",t.isLPM),e.xp6(1),e.Q6J("ngIf",!t.isDependentOnGroup&&!t.isLPM&&!t.isFilterLogTable)}}function ee(s,o){if(1&s&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",44),e.qZA()),2&s){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function te(s,o){if(1&s&&(e.TgZ(0,"td",45)(1,"span"),e._uU(2),e.qZA()()),2&s){const t=e.oxw().rowIndex;e.xp6(2),e.Oqu(t+1)}}function ne(s,o){1&s&&e._UZ(0,"i",46)}function se(s,o){1&s&&e._UZ(0,"i",47)}function ie(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"i",48),e.NdJ("click",function(i){e.CHM(t);const r=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.copyValue(i,r.name))}),e.qZA()}}function ae(s,o){1&s&&e._UZ(0,"i",49)}function oe(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"div")(1,"label",50)(2,"p-checkbox",51),e.NdJ("ngModelChange",function(i){e.CHM(t);const r=e.oxw(2).$implicit;return e.KtG(r.saveResponseInLog=i)})("click",function(i){e.CHM(t);const r=e.oxw(4);return e.KtG(r.generalS.stopPropagation(i))}),e.qZA()()()}if(2&s){const t=e.oxw(2).$implicit;e.xp6(2),e.Q6J("ngModel",t.saveResponseInLog)("binary",!0)}}function re(s,o){if(1&s&&(e.TgZ(0,"td"),e.YNc(1,oe,3,2,"div",6),e.qZA()),2&s){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",n.selectedRows.indexOf(t)>=0)}}const le=function(){return["/api-info/api-testing/testing"]},ce=function(s,o){return{at_category:"SCHEDULERS",at_user:s,at_api:o}};function _e(s,o){if(1&s&&(e.TgZ(0,"td")(1,"div",45)(2,"a",52),e.NdJ("click",function(n){return n.stopPropagation()}),e._UZ(3,"i",53),e.qZA()()()),2&s){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(2),e.Q6J("routerLink",e.DdM(2,le))("queryParams",e.WLB(3,ce,n.authCS.getUserId(),t._id))}}function de(s,o){if(1&s&&(e.TgZ(0,"tr",37),e.YNc(1,ee,2,2,"td",6),e.YNc(2,te,3,1,"td",38),e.TgZ(3,"td"),e.YNc(4,ne,1,0,"i",39),e.YNc(5,se,1,0,"i",40),e.qZA(),e.TgZ(6,"td")(7,"span",41)(8,"span"),e._uU(9),e.qZA(),e.YNc(10,ie,1,0,"i",42),e.qZA(),e.YNc(11,ae,1,0,"i",43),e.qZA(),e.YNc(12,re,2,1,"td",6),e.YNc(13,_e,4,6,"td",6),e.qZA()),2&s){const t=o.$implicit,n=e.oxw(2);e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",n.isMultiSelect||n.showCheckbox),e.xp6(1),e.Q6J("ngIf",!n.isDependentOnGroup&&!n.isLPM&&!n.isFilterLogTable),e.xp6(2),e.Q6J("ngIf",t.isActive),e.xp6(1),e.Q6J("ngIf",!t.isActive),e.xp6(4),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.name),e.xp6(1),e.Q6J("ngIf",t.runOnNativeProcess),e.xp6(1),e.Q6J("ngIf",n.isLPM),e.xp6(1),e.Q6J("ngIf",!n.isDependentOnGroup&&!n.isLPM&&!n.isFilterLogTable)}}function pe(s,o){1&s&&e._UZ(0,"p-progressSpinner",54)}function ue(s,o){if(1&s){const t=e.EpF();e.TgZ(0,"div",26)(1,"p-table",27),e.NdJ("selectionChange",function(i){e.CHM(t);const r=e.oxw();return e.KtG(r.selectedRows=i)})("selectionChange",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.selectionChange())})("dblclick",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.dblClickSchedulerList())}),e.YNc(2,z,8,4,"ng-template",28),e.YNc(3,de,14,10,"ng-template",29),e.qZA(),e.YNc(4,pe,1,0,"p-progressSpinner",30),e.qZA()}if(2&s){const t=e.oxw();e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",t.metaKeySelection)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows),e.xp6(3),e.Q6J("ngIf",t.loading.grid)}}let he=(()=>{class s{schedulerS;generalS;notificationS;confirmationService;navigationCS;authCS;constantsS;eventCenterS;cd;router;isReadOnly=!1;isMultiSelect=!1;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:f.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=v.iH._id;EUserType=E.d;schedulerManFormC;constructor(t,n,i,r,d,g,u,S,T,fe){this.schedulerS=t,this.generalS=n,this.notificationS=i,this.confirmationService=r,this.navigationCS=d,this.authCS=g,this.constantsS=u,this.eventCenterS=S,this.cd=T,this.router=fe}ngOnInit(){var t=this;this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(n=>{n.action===c.F.SAVED?(this.schedulerManFormC.hideModal(),this.loadGridData()):n.action===c.F.UPDATED&&(n.closeModal&&this.schedulerManFormC.hideModal(),this.loadGridData())})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var n=(0,l.Z)(function*(i){i.length&&t.loadGridData()});return function(i){return n.apply(this,arguments)}}())),(this.isFilterLogTable||this.isLPM)&&this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(n=>{n&&this.loadGridData()})),this.generalS.setNewTitle("Schedulers")}loadGridData(){var t=this;this.loading.grid=!0;const n={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,label:1,isActive:1,active:1,runOnNativeProcess:1},sort:{name:1}};this.showAll&&delete n.find.active,this.subscriptions.push(this.schedulerS.query(n).subscribe(function(){var i=(0,l.Z)(function*(r){r.success?(t.selectedRows=[],t.rows=r.data||[],t.rowsMap=p.keyBy(t.rows,v.iH._id),t.rowsMapName=p.keyBy(t.rows,v.qH.name)):t.resetGridAndUrl();const d=t.navigationCS.getQueryParam(m.p.am_scheduler)||(t.isFilterLogTable?t.eventCenterS.filterInLog.schedulersIds.value.join(","):t.eventCenterS.group.schedulersIds.value.join(","))||(t.isDependentOnGroup&&t.eventCenterS.group.selectedGroups.value[0]?.queryParams?.schedulerNames?t.eventCenterS.group.selectedGroups.value[0]?.queryParams.schedulerNames.join(","):"");if(d){const g=d.split(","),u=p.intersection(p.keys(t.rowsMap),g),S=[];for(const T of u)t.rowsMap[T]&&S.push(t.rowsMap[T]);t.selectedRows=S,t.eventCenterS.group.selectedSchedulers.next(S),t.eventCenterS.group.schedulersIds.next(u),t.eventCenterS.filterInLog.schedulersIds.next(u)}if(t.isLPM&&t.eventCenterS.group.selectedGroups.value[0]?.queryParams?.schedulerNames?.length){const g=t.eventCenterS.group.selectedGroups.value[0];for(const u of g?.queryParams?.schedulerNames)t.rowsMapName[u]&&(t.rowsMapName[u].saveResponseInLog=g.schedulersLog?.[u]?.saveResponseInLog||!1);t.setResDataInEventCenter()}t.loading.grid=!1,t.cd.detectChanges()});return function(r){return i.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=f.D.ADD,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_ADD_MODE}),this.schedulerManFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=f.D.VIEW,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_VIEW_MODE}),this.schedulerManFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=f.D.EDIT,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_EDIT_MODE}),this.schedulerManFormC.showModal()}clone(){var t=this;return(0,l.Z)(function*(){try{if(!t.selectedRows[0]||!t.selectedRows[0])return;const n=(yield t.schedulerS.getById(t.selectedRows[0]._id).toPromise()).data;delete n._id,delete n.guid,n.name=`${n.name}-clone`,(yield t.schedulerS.post(n).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.schedulers.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.schedulers.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.schedulers.cloneError)}})()}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.schedulersApis.next(this.selectedRows),this.eventCenterS.group.selectedSchedulers.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.schedulersApis.next(this.selectedRows)}removePermanentDialog(){var t=this;return(0,l.Z)(function*(){var n;t.selectedRows.length>1?t.removePermanentBulkDialog():t.confirmationService.confirm({message:t.constantsS.schedulers.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(n=(0,l.Z)(function*(){yield t.removePermanent()}),function(){return n.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,l.Z)(function*(){t.loading.grid=!0;const n=yield t.schedulerS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,n.success?(t.notificationS.showSuccess(t.constantsS.schedulers.removePermanent),t.resetGridAndUrl(),t.loadGridData()):t.notificationS.showErrorFromResponse(n,t.constantsS.schedulers.removePermanentError)})()}removePermanentBulkDialog(){var n,t=this;this.selectedRows.length<2||this.confirmationService.confirm({message:this.constantsS.schedulers.removePermanentBulkConfirm(this.selectedRows.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(n=(0,l.Z)(function*(){yield t.removePermanentBulk()}),function(){return n.apply(this,arguments)})})}removePermanentBulk(){var t=this;return(0,l.Z)(function*(){if(t.selectedRows.length<2)return;t.loading.grid=!0;const n=t.selectedRows;try{const r=(yield Promise.all(n.map(d=>t.schedulerS.permanentDelete(d._id).toPromise()))).filter(d=>!d.success).length;0===r?t.notificationS.showSuccess(t.constantsS.schedulers.removePermanentBulk(n.length)):t.notificationS.showError(r<n.length?`${n.length-r} of ${n.length} schedulers removed. ${r} failed.`:t.constantsS.schedulers.removePermanentBulkError),t.resetGridAndUrl(),t.loadGridData()}catch{t.notificationS.showError(t.constantsS.schedulers.removePermanentBulkError)}t.loading.grid=!1})()}resetDependents(){var t=this;return(0,l.Z)(function*(){yield t.navigationCS.setQueryParam(m.p.am_scheduler,null)})()}selectionChange(){var t=this;return(0,l.Z)(function*(){t.resetDependents().then(),t.fillData().then(),t.selectedRows?.[0]?t.generalS.setNewTitle(t.selectedRows[0].name,D.R.SCHEDULERS):t.generalS.setNewTitle("Schedulers")})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.rowsMapName={}}fillData(){var t=this;return(0,l.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(m.p.am_scheduler,""),t.eventCenterS.group.schedulersIds.next([]),t.eventCenterS.group.schedulersApis.next([]),t.eventCenterS.filterInLog.schedulersIds.next([]),void t.eventCenterS.filterInLog.schedulersApis.next([]);if(t.isDependentOnGroup||t.isFilterLogTable)t.eventCenterS.group.schedulersIds.next(p.map(t.selectedRows,"_id")),t.eventCenterS.group.schedulersApis.next(t.selectedRows),t.isFilterLogTable&&(t.eventCenterS.filterInLog.schedulersIds.next(p.map(t.selectedRows,"_id")),t.eventCenterS.filterInLog.schedulersApis.next(t.selectedRows));else{const n=(yield t.schedulerS.getById(t.selectedRows[0]._id).toPromise()).data;n._id?yield t.navigationCS.setQueryParam(m.p.am_scheduler,n._id):t.resetDependents()}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickSchedulerList(){this.selectedRows.length&&!this.isMultiSelect&&this.edit()}copyValue(t,n){t.stopPropagation(),this.generalS.copyToClipboard(n)?this.notificationS.showSuccess("Copied!"):this.notificationS.showError("Copy failed")}static \u0275fac=function(n){return new(n||s)(e.Y36(_.Z),e.Y36(R.b),e.Y36(M.W),e.Y36(h.YP),e.Y36(I.S),e.Y36(A.D),e.Y36(Z.L),e.Y36(L.u),e.Y36(e.sBO),e.Y36(w.F0))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-scheduler-man-w"]],viewQuery:function(n,i){if(1&n&&e.Gf(F,5),2&n){let r;e.iGM(r=e.CRH())&&(i.schedulerManFormC=r.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],isMultiSelect:["IsMultiSelect","isMultiSelect"],isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection",showCheckbox:"showCheckbox"},decls:18,vars:12,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Schedulers",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All Schedulers",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["schedulerManFormC",""],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3",3,"pTooltip","click",4,"ngIf"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],[1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All Schedulers",1,"float-right","cursor-pointer"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped schedulers-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 40px;",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","40px"],["style","width: 60px;",4,"ngIf"],[2,"width","80px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],["class","fas fa-circle fa-fw align-middle text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw align-middle text-muted text-v-small",4,"ngIf"],[1,"copy-cell"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],[1,"fas","fa-circle","fa-fw","align-middle","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","align-middle","text-muted","text-v-small"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange","click"],["href","javascript:","tooltipPosition","left","pTooltip","Test API",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Scheduler List"),e.qZA(),e.TgZ(6,"div",3)(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA()(),e.YNc(10,k,6,3,"span",6),e.YNc(11,Y,2,2,"span",7),e.YNc(12,H,2,2,"span",7),e.qZA(),e.TgZ(13,"div",8),e.YNc(14,$,3,1,"div",6),e.YNc(15,ue,5,7,"div",9),e.qZA()(),e._UZ(16,"app-w-scheduler-man-form",10,11)),2&n&&(e.xp6(3),e.Q6J("src",e.lcZ(4,8,"/assets/images/icons/schedulers.svg"),e.LSH),e.xp6(5),e.Q6J("src",e.lcZ(9,10,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(2),e.Q6J("ngIf",!i.isReadOnly),e.xp6(1),e.Q6J("ngIf",i.isDependentOnGroup),e.xp6(1),e.Q6J("ngIf",i.isFilterLogTable),e.xp6(2),e.Q6J("ngIf",i.eventCenterS.group.apisRegex.allSchedulers||i.eventCenterS.filterInLog.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(i.eventCenterS.group.apisRegex.allSchedulers||i.eventCenterS.filterInLog.apisRegex.allSchedulers)),e.xp6(1),e.Q6J("data",i.data))},dependencies:[w.rH,y.JJ,y.On,W.O5,x.iA,h.jx,x.Ei,x.UA,x.Mo,U.G,N.u,b.XZ,G.o,K.w],styles:["[_nghost-%COMP%] .copy-icon{opacity:0;transition:opacity .2s}[_nghost-%COMP%] tr:hover .copy-icon{opacity:1}[_nghost-%COMP%] .copy-icon:hover{color:#4fc3f7!important}[_nghost-%COMP%] .copy-cell{display:inline-flex;align-items:center}"]})}return s})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1678],{57747:(oe,M,o)=>{o.d(M,{o:()=>ee});var d=o(15861),e=o(60095),u=o(33157),g=o(90328),I=o(6990),S=o(87848),h=o(51162),n=o(94946),y=o(99961),P=o(53429),Z=o(77240),F=o(95852),b=o(81429),R=o(32915),L=o(60115),k=o(27414),N=o(96814),O=o(32660),A=o(97680),J=o(53965),x=o(38057);function K(_,C){1&_&&(n.TgZ(0,"span"),n._UZ(1,"i",32),n._uU(2," Add Instance"),n.qZA())}function B(_,C){1&_&&(n.TgZ(0,"span"),n._UZ(1,"i",33),n._uU(2," View Instance"),n.qZA())}function Q(_,C){1&_&&(n.TgZ(0,"span"),n._UZ(1,"i",34),n._uU(2," Edit Instance"),n.qZA())}function W(_,C){if(1&_&&(n.TgZ(0,"div")(1,"div",10)(2,"label",11),n._uU(3,"Username"),n.qZA(),n.TgZ(4,"div",12),n._UZ(5,"p-dropdown",35),n.qZA()(),n.TgZ(6,"div",10)(7,"label",11),n._uU(8,"Password"),n.qZA(),n.TgZ(9,"div",12),n._UZ(10,"p-dropdown",36),n.qZA()(),n.TgZ(11,"div",10)(12,"label",11),n._uU(13,"Privilege"),n.qZA(),n.TgZ(14,"div",12),n._UZ(15,"p-dropdown",37),n.qZA()()()),2&_){const s=n.oxw();n.xp6(5),n.Q6J("options",s.connectionStringSecrets)("filter",!0),n.xp6(5),n.Q6J("options",s.connectionStringSecrets)("filter",!0),n.xp6(5),n.Q6J("options",s.privileges)("filter",!0)}}function Y(_,C){if(1&_){const s=n.EpF();n.TgZ(0,"a",38),n.NdJ("click",function(){n.CHM(s);const c=n.oxw();return n.KtG(c.openSecret())}),n._UZ(1,"i",39),n._uU(2," Open Secret "),n.qZA()}}function G(_,C){if(1&_&&(n.TgZ(0,"div",10)(1,"label",11),n._uU(2,"Connection String Multi Tenant"),n.qZA(),n.TgZ(3,"div",12),n._UZ(4,"p-dropdown",40),n.qZA()()),2&_){const s=n.oxw();n.xp6(4),n.Q6J("options",s.connectionStringSecretsMultiTenant)("showClear",!0)("autoDisplayFirst",!1)("filter",!0)}}function V(_,C){1&_&&n._UZ(0,"i",41)}function H(_,C){1&_&&n._UZ(0,"i",42)}function j(_,C){1&_&&(n.TgZ(0,"span"),n._uU(1,"Save Instance"),n.qZA())}function q(_,C){1&_&&(n.TgZ(0,"span"),n._uU(1,"Update Instance"),n.qZA())}function X(_,C){if(1&_){const s=n.EpF();n.TgZ(0,"button",43),n.NdJ("click",function(){n.CHM(s);const c=n.oxw();return n.KtG(c.save())}),n._UZ(1,"i",44),n.YNc(2,j,2,0,"span",4),n.YNc(3,q,2,0,"span",4),n.qZA()}if(2&_){const s=n.oxw();n.Q6J("disabled",s.form.invalid||s.loading.form),n.xp6(2),n.Q6J("ngIf",s.data.mode===s.EFormMode.ADD),n.xp6(1),n.Q6J("ngIf",s.data.mode===s.EFormMode.EDIT)}}function z(_,C){1&_&&n._UZ(0,"p-progressSpinner",45)}let ee=(()=>{class _{fb;ns;instanceS;generalS;authCS;dataProviderS;eventCenterS;secretS;constantsS;data;loading={form:!1};EFormMode=g.D;EInstanceType=S.d;IInstanceProps=h.Il;form;subscriptions=[];instanceTypes=[];privileges=[];connectionStringSecrets=[];connectionStringSecretsMultiTenant=[];instanceTested;isFromMarkTested;constructor(s,l,c,m,v,D,te,ne,se){this.fb=s,this.ns=l,this.instanceS=c,this.generalS=m,this.authCS=v,this.dataProviderS=D,this.eventCenterS=te,this.secretS=ne,this.constantsS=se}ngOnInit(){var s=this;return(0,d.Z)(function*(){s.instanceTypes=s.dataProviderS.getInstanceTypes(),s.privileges=s.dataProviderS.getListOfOraclePrivilege(),s.createForm(),s.subscriptions.push(s.data.eventChannel.subscribe(function(){var l=(0,d.Z)(function*(c){if(c)if(s.form.enable(),yield s.loadConnectionStringFromSecret(),c.action===u.F.OPEN_FORM_IN_EDIT_MODE){const m=yield s.instanceS.getById(s.data.formData._id).toPromise();s.form.reset(),s.form.patchValue(m.data),s.instanceTested=!1,s.isFromMarkTested=!1}else if(c.action===u.F.OPEN_FORM_IN_VIEW_MODE){const m=yield s.instanceS.getById(s.data.formData._id).toPromise();s.form.reset(),s.form.patchValue(m.data),s.form.disable(),s.instanceTested=!1,s.isFromMarkTested=!1}else c.action===u.F.OPEN_FORM_IN_ADD_MODE&&(s.form.reset(),s.setDefaultValuesInForm(),s.instanceTested=!1,s.isFromMarkTested=!1)});return function(c){return l.apply(this,arguments)}}())),s.subscriptions.push(s.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(function(){var l=(0,d.Z)(function*(c){c&&c.action===u.F.UPDATED&&(s.eventCenterS.headerC.secManFormC.hideModal(),yield s.loadConnectionStringFromSecret())});return function(c){return l.apply(this,arguments)}}()))})()}showModal(){$("#idInstancesForm").modal("show")}hideModal(){$("#idInstancesForm").modal("hide")}createForm(){this.form=this.fb.group({type:[null,[e.kI.required]],name:[null,[e.kI.required]],connectionString:[null,[e.kI.required]],connectionStringSandbox:[null,[]],isMultiTenantStructureInstance:[!1,[]],connectionStringMultiTenant:[null,[]],username:[null,[]],password:[null,[]],privilege:[null,[]],maxPoolConnections:[null,[e.kI.required]]}),this.manageValidations()}manageValidations(){this.form.valueChanges.subscribe(()=>{this.instanceTested=!1,this.isFromMarkTested=!1});const s=this.form.get(h.Il.type),l=this.form.get(h.Il.username),c=this.form.get(h.Il.password),m=this.form.get(h.Il.privilege);s.valueChanges.subscribe(function(){var v=(0,d.Z)(function*(D){D&&(D===S.d.ORACLE_DB?(l.setValidators([e.kI.required]),c.setValidators([e.kI.required]),m.setValidators([e.kI.required])):(l.setValidators([]),c.setValidators([]),m.setValidators([])),l.updateValueAndValidity(),c.updateValueAndValidity(),m.updateValueAndValidity())});return function(D){return v.apply(this,arguments)}}())}setDefaultValuesInForm(){this.loading.form=!1,this.form.get(h.Il.type).setValue(this.instanceTypes[0].value),this.form.get(h.Il.maxPoolConnections).setValue(1e4),this.form.get(h.Il.connectionString).setValue(this.connectionStringSecrets[0])}testInstance(s){var l=this;return(0,d.Z)(function*(){l.loading.form=!0;const c=m=>{l.instanceTested=!1,l.isFromMarkTested=!1,l.ns.showError(I.get(m,"errors[0].message","Unable to connect to the instance.")),l.loading.form=!1};try{const m=l.form.value;m.user=l.authCS.gUser._id,m.isFromSaveInstance=s,l.data.mode===g.D.EDIT&&(m._id=l.data.formData._id);const v=yield l.instanceS.testInstance(m).toPromise();v.success&&v.data?l.instanceTested=!0:c(v),l.loading.form=!1}catch(m){c(m.error)}})()}markInstanceTested(){this.instanceTested=!0,this.isFromMarkTested=!0}save(){var s=this;return(0,d.Z)(function*(){if(!s.isFromMarkTested&&(yield s.testInstance(!0),!s.instanceTested))return;const l=s.form.getRawValue();l.user=s.authCS.getUserId(),l.type===S.d.MONGO_DB&&(l.maxPoolConnections=1e4);try{let c;if(s.loading.form=!0,s.data.mode===g.D.ADD)c=yield s.instanceS.post(l).toPromise();else if(s.data.mode===g.D.EDIT){const m=I.merge({},s.data.formData,l);c=yield s.instanceS.put(s.data.formData._id,m,{select:h.iH._id}).toPromise()}s.ns.showSuccess(`Instance ${s.data.mode===g.D.ADD?"added":"edited"} successfully.`),s.data.eventChannel.emit({action:s.data.mode===g.D.ADD?u.F.SAVED:u.F.UPDATED}),s.loading.form=!1}catch(c){s.loading.form=!1,s.ns.showErrorFromResponse(c.error||c,"Unable to save instance.")}})()}loadConnectionStringFromSecret(){var s=this;return(0,d.Z)(function*(){try{s.connectionStringSecrets=(yield s.instanceS.getConnectionStringSecret().toPromise())?.data,s.connectionStringSecretsMultiTenant=(yield s.instanceS.getConnectionStringSecretForMultiTenant().toPromise())?.data}catch(l){s.ns.showErrorFromResponse(l.error||l,"Unable to load connection string.")}})()}openSecret(){var s=this;return(0,d.Z)(function*(){s.eventCenterS.headerC.dataSecretForm.formData=yield s.getDefaultSecret(),s.eventCenterS.headerC.dataSecretForm.mode=g.D.EDIT,s.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),s.eventCenterS.headerC.secManFormC.showModal()})()}getDefaultSecret(){var s=this;return(0,d.Z)(function*(){const l={find:{user:s.authCS.getUserId(),active:!0,isDefault:!0}};return(yield s.secretS.query(l).toPromise()).data?.[0]})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(l){return new(l||_)(n.Y36(e.qu),n.Y36(y.W),n.Y36(P.E),n.Y36(Z.b),n.Y36(F.D),n.Y36(b.B),n.Y36(R.u),n.Y36(L.e),n.Y36(k.L))};static \u0275cmp=n.Xpm({type:_,selectors:[["app-w-instances-form"]],inputs:{data:"data"},decls:60,vars:23,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idInstancesForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",2,"z-index","1049"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","type","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide instance name",1,"form-control","form-control-sm"],["formControlName","connectionString","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-2","p-0"],["class","d-block mt-2 text-info","href","javascript:","sava-no-dbl-click","",3,"click",4,"ngIf"],["formControlName","connectionStringSandbox","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","showClear","autoDisplayFirst","filter"],[1,"form-group","row",3,"hidden"],["formControlName","maxPoolConnections","min","1","name","maxPoolConnections","spellcheck","false","type","number",1,"form-control","form-control-sm"],[1,"align-middle","mb-0","pt-1"],["formControlName","isMultiTenantStructureInstance",3,"binary"],["class","form-group row",4,"ngIf"],[1,"modal-footer","d-block"],["type","button",1,"btn","btn-sm","btn-secondary","float-left",3,"disabled","click"],["class","fas fa-check fa-fw text-success",4,"ngIf"],["class","fas fa-question fa-fw text-warning",4,"ngIf"],["class","btn btn-primary btn-sm float-right ml-2","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary","float-right",3,"disabled"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","username","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","password","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","privilege","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["href","javascript:","sava-no-dbl-click","",1,"d-block","mt-2","text-info",3,"click"],[1,"fas","fa-key","text-danger","fa-fw","mr-1"],["formControlName","connectionStringMultiTenant","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","showClear","autoDisplayFirst","filter"],[1,"fas","fa-check","fa-fw","text-success"],[1,"fas","fa-question","fa-fw","text-warning"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm","float-right","ml-2",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(l,c){1&l&&(n.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),n.YNc(4,K,3,0,"span",4),n.YNc(5,B,3,0,"span",4),n.YNc(6,Q,3,0,"span",4),n.TgZ(7,"button",5)(8,"span",6),n._UZ(9,"i",7),n.qZA()()(),n.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),n._uU(14,"Database Type"),n.qZA(),n.TgZ(15,"div",12),n._UZ(16,"p-dropdown",13),n.qZA()(),n.TgZ(17,"div",10)(18,"label",11),n._uU(19,"Instance Name"),n.qZA(),n.TgZ(20,"div",12),n._UZ(21,"input",14),n.qZA()(),n.YNc(22,W,16,6,"div",4),n.TgZ(23,"div")(24,"div",10)(25,"label",11),n._uU(26,"Connection String"),n.qZA(),n.TgZ(27,"div",12),n._UZ(28,"p-dropdown",15),n.qZA(),n.TgZ(29,"div",16),n.YNc(30,Y,3,0,"a",17),n.qZA()()(),n.TgZ(31,"div")(32,"div",10)(33,"label",11),n._uU(34,"Connection String Sandbox"),n.qZA(),n.TgZ(35,"div",12),n._UZ(36,"p-dropdown",18),n.qZA()()(),n.TgZ(37,"div",19)(38,"label",11),n._uU(39,"Max Pool Connections"),n.qZA(),n.TgZ(40,"div",12),n._UZ(41,"input",20),n.qZA()(),n.TgZ(42,"div",10)(43,"label",11),n._uU(44,"Is Multi Tenant Structure Instance"),n.qZA(),n.TgZ(45,"div",12)(46,"label",21),n._UZ(47,"p-checkbox",22),n.qZA()()(),n.YNc(48,G,5,4,"div",23),n.qZA()(),n.TgZ(49,"div",24)(50,"div")(51,"button",25),n.NdJ("click",function(){return c.testInstance()}),n.YNc(52,V,1,0,"i",26),n.YNc(53,H,1,0,"i",27),n._uU(54," Test Instance "),n.qZA(),n.YNc(55,X,4,3,"button",28),n.TgZ(56,"button",29),n._UZ(57,"i",30),n._uU(58," Close"),n.qZA()()(),n.YNc(59,z,1,0,"p-progressSpinner",31),n.qZA()()()),2&l&&(n.xp6(4),n.Q6J("ngIf",c.data.mode===c.EFormMode.ADD),n.xp6(1),n.Q6J("ngIf",c.data.mode===c.EFormMode.VIEW),n.xp6(1),n.Q6J("ngIf",c.data.mode===c.EFormMode.EDIT),n.xp6(5),n.Q6J("formGroup",c.form),n.xp6(5),n.Q6J("options",c.instanceTypes)("filter",!0),n.xp6(6),n.Q6J("ngIf",c.form.get("type").value===c.EInstanceType.ORACLE_DB),n.xp6(6),n.Q6J("options",c.connectionStringSecrets)("filter",!0),n.xp6(2),n.Q6J("ngIf",c.data.mode!==c.EFormMode.VIEW),n.xp6(6),n.Q6J("options",c.connectionStringSecrets)("showClear",!0)("autoDisplayFirst",!1)("filter",!0),n.xp6(1),n.Q6J("hidden",c.form.get("type").value===c.EInstanceType.MONGO_DB),n.xp6(10),n.Q6J("binary",!0),n.xp6(1),n.Q6J("ngIf",c.form.get("isMultiTenantStructureInstance").value),n.xp6(3),n.Q6J("disabled",c.form.invalid||c.loading.form),n.xp6(1),n.Q6J("ngIf",c.instanceTested),n.xp6(1),n.Q6J("ngIf",!c.instanceTested),n.xp6(2),n.Q6J("ngIf",c.data.mode!==c.EFormMode.VIEW),n.xp6(1),n.Q6J("disabled",c.loading.form),n.xp6(3),n.Q6J("ngIf",c.loading.form))},dependencies:[e._Y,e.Fj,e.wV,e.JJ,e.JL,e.qQ,e.sg,e.u,N.O5,O.y,A.G,J.Lt,x.XZ],encapsulation:2})}return _})()},63885:(oe,M,o)=>{o.d(M,{f:()=>ve});var d=o(15861),e=o(94946),u=o(33157),g=o(90328),I=o(56212),E=o(6990),h=o(51162),n=o(96925),y=o(87848),P=o(53429),Z=o(77240),F=o(99961),b=o(92189),R=o(95852),L=o(27414),k=o(77664),N=o(32915),O=o(85219),A=o(60095),J=o(96814),x=o(95431),K=o(97680),B=o(33259),Q=o(45609),W=o(38057),Y=o(36994),G=o(57747),V=o(44879);const H=["instancesFormC"],j=["hookViewerDialogC"];function q(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.edit())}),e._UZ(1,"i",23),e.qZA()}}function X(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",24),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.clone())}),e._UZ(1,"i",25),e.qZA()}}function z(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",26),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.active())}),e._UZ(1,"i",27),e.qZA()}}function ee(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",28),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.inactiveDialog())}),e._UZ(1,"i",29),e.qZA()}}function _(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",30),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.removePermanentDialog())}),e._UZ(1,"i",31),e.qZA()}}function C(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span")(1,"a",11),e._UZ(2,"img",12),e.ALo(3,"themeIcon"),e.qZA(),e.TgZ(4,"span",13)(5,"p-inputSwitch",14),e.NdJ("ngModelChange",function(a){e.CHM(t);const f=e.oxw();return e.KtG(f.showAll=a)})("onChange",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.showAllChanges())}),e.qZA()(),e.TgZ(6,"span",15),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.add())}),e._UZ(7,"i",16),e.qZA(),e.YNc(8,q,2,0,"span",17),e.YNc(9,X,2,0,"span",18),e.YNc(10,z,2,0,"span",19),e.YNc(11,ee,2,0,"span",20),e.YNc(12,_,2,0,"span",21),e.qZA()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("src",e.lcZ(3,7,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(3),e.Q6J("ngModel",t.showAll),e.xp6(3),e.Q6J("ngIf",t.selectedRows.length),e.xp6(1),e.Q6J("ngIf",t.selectedRows.length),e.xp6(1),e.Q6J("ngIf",t.selectedRows.length&&!1===t.selectedRows[0].active),e.xp6(1),e.Q6J("ngIf",t.selectedRows.length&&!0===t.selectedRows[0].active),e.xp6(1),e.Q6J("ngIf",t.selectedRows.length&&!1===t.selectedRows[0].active)}}function s(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",32)(1,"p-checkbox",33),e.NdJ("ngModelChange",function(a){e.CHM(t);const f=e.oxw();return e.KtG(f.eventCenterS.group.apisRegex.allInstances=a)}),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.eventCenterS.group.apisRegex.allInstances)("binary",!0)}}function l(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"span",32)(1,"p-checkbox",33),e.NdJ("ngModelChange",function(a){e.CHM(t);const f=e.oxw();return e.KtG(f.eventCenterS.filterInLog.apisRegex.allInstances=a)}),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.eventCenterS.filterInLog.apisRegex.allInstances)("binary",!0)}}function c(i,p){if(1&i&&(e.TgZ(0,"div")(1,"div",34),e._uU(2),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.Oqu(t.constantsS.group.allInstancesPermitted)}}function m(i,p){1&i&&(e.TgZ(0,"th",44),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function v(i,p){1&i&&e._UZ(0,"th",42)}function D(i,p){1&i&&(e.TgZ(0,"th",45),e._uU(1,"Pre"),e.qZA())}function te(i,p){1&i&&(e.TgZ(0,"th",45),e._uU(1,"Post"),e.qZA())}function ne(i,p){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,m,2,0,"th",40),e.YNc(2,v,1,0,"th",41),e._UZ(3,"th",42),e.TgZ(4,"th"),e._uU(5,"Instance Name"),e.qZA(),e.YNc(6,D,2,0,"th",43),e.YNc(7,te,2,0,"th",43),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.showCheckbox),e.xp6(1),e.Q6J("ngIf",t.showAll),e.xp6(4),e.Q6J("ngIf",t.showHooksCount),e.xp6(1),e.Q6J("ngIf",t.showHooksCount)}}function se(i,p){if(1&i&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",54),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function ie(i,p){1&i&&e._UZ(0,"i",57)}function re(i,p){1&i&&e._UZ(0,"i",58)}function ce(i,p){if(1&i&&(e.TgZ(0,"td"),e.YNc(1,ie,1,0,"i",55),e.YNc(2,re,1,0,"i",56),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active)}}function le(i,p){1&i&&e._UZ(0,"i",59)}function _e(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"i",60),e.NdJ("click",function(a){e.CHM(t);const f=e.oxw().$implicit,T=e.oxw(2);return e.KtG(T.copyValue(a,f.name))}),e.qZA()}}function de(i,p){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(1),e.Oqu(t.preHookCount)}}function pe(i,p){1&i&&e._UZ(0,"i",63)}function fe(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"td",61),e.NdJ("click",function(a){e.CHM(t);const f=e.oxw().$implicit,T=e.oxw(2);return a.stopPropagation(),e.KtG(T.openHookViewer(f,"pre"))}),e.YNc(1,de,2,1,"span",3),e.YNc(2,pe,1,0,"i",62),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.Q6J("pTooltip",t.preHookCount?"View pre hooks":"Add pre hook"),e.xp6(1),e.Q6J("ngIf",t.preHookCount),e.xp6(1),e.Q6J("ngIf",!t.preHookCount)}}function me(i,p){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(1),e.Oqu(t.postHookCount)}}function ue(i,p){1&i&&e._UZ(0,"i",63)}function ge(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"td",61),e.NdJ("click",function(a){e.CHM(t);const f=e.oxw().$implicit,T=e.oxw(2);return a.stopPropagation(),e.KtG(T.openHookViewer(f,"post"))}),e.YNc(1,me,2,1,"span",3),e.YNc(2,ue,1,0,"i",62),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.Q6J("pTooltip",t.postHookCount?"View post hooks":"Add post hook"),e.xp6(1),e.Q6J("ngIf",t.postHookCount),e.xp6(1),e.Q6J("ngIf",!t.postHookCount)}}function he(i,p){if(1&i&&(e.TgZ(0,"tr",46),e.YNc(1,se,2,2,"td",3),e.YNc(2,ce,3,2,"td",3),e.TgZ(3,"td",47),e._UZ(4,"img",48),e.qZA(),e.TgZ(5,"td",49)(6,"span",50),e.YNc(7,le,1,0,"i",51),e.TgZ(8,"span"),e._uU(9),e.qZA(),e.YNc(10,_e,1,0,"i",52),e.qZA()(),e.YNc(11,fe,3,3,"td",53),e.YNc(12,ge,3,3,"td",53),e.qZA()),2&i){const t=p.$implicit,r=e.oxw(2);e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",r.showCheckbox),e.xp6(1),e.Q6J("ngIf",r.showAll),e.xp6(2),e.Akn("MONGO_DB"==t.type?"width:0.5rem":"width:1rem"),e.s9C("src",r.getInstanceIconUrl(t.type),e.LSH),e.s9C("alt",t.type),e.xp6(3),e.Q6J("ngIf",t.isMultiTenantStructureInstance),e.xp6(2),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.name),e.xp6(1),e.Q6J("ngIf",r.showHooksCount),e.xp6(1),e.Q6J("ngIf",r.showHooksCount)}}function Ie(i,p){1&i&&e._UZ(0,"p-progressSpinner",64)}function Ce(i,p){if(1&i){const t=e.EpF();e.TgZ(0,"div",35)(1,"p-table",36),e.NdJ("selectionChange",function(a){e.CHM(t);const f=e.oxw();return e.KtG(f.selectedRows=a)})("selectionChange",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.instanceSelected())})("dblclick",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.dblClickInstance())}),e.YNc(2,ne,8,4,"ng-template",37),e.YNc(3,he,13,12,"ng-template",38),e.qZA(),e.YNc(4,Ie,1,0,"p-progressSpinner",39),e.qZA()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",t.metaKeySelection)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows),e.xp6(3),e.Q6J("ngIf",t.loading.grid)}}let ve=(()=>{class i{instanceS;generalS;notificationS;navigationCS;authCS;constantsS;router;cd;eventCenterS;confirmationService;isReadOnly=!1;showCheckbox=!0;showHooksCount=!1;isDependentOnGroup=!1;isFilterLogTable=!1;metaKeySelection=!0;groupFilter;instancesFormC;hookViewerDialogC;loading={grid:!1};subscriptions=[];data={mode:g.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;gridKey=h.iH._id;selectedRows=[];instanceIdsSkipSubscription=!1;EInstanceType=y.d;constructor(t,r,a,f,T,w,U,ae,Te,Ee){this.instanceS=t,this.generalS=r,this.notificationS=a,this.navigationCS=f,this.authCS=T,this.constantsS=w,this.router=U,this.cd=ae,this.eventCenterS=Te,this.confirmationService=Ee}ngOnInit(){var t=this;return(0,d.Z)(function*(){t.eventCenterS.instance.selectedInstances.next([]),!t.isDependentOnGroup&&!t.isFilterLogTable&&(yield t.loadGridData()),t.isDependentOnGroup&&t.subscriptions.push(t.eventCenterS.group.selectedGroups.subscribe(function(){var r=(0,d.Z)(function*(a){a.length&&(yield t.loadGridData())});return function(a){return r.apply(this,arguments)}}())),t.isFilterLogTable&&t.subscriptions.push(t.eventCenterS.filterInLog.refreshGrid.subscribe((0,d.Z)(function*(){t.instanceIdsSkipSubscription||t.loadGridData()}))),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var r=(0,d.Z)(function*(a){(a.action===u.F.SAVED||a.action===u.F.UPDATED)&&(t.instancesFormC.hideModal(),t.loadGridData())});return function(a){return r.apply(this,arguments)}}())),t.generalS.setNewTitle("Instances")})()}loadGridData(){var t=this;return(0,d.Z)(function*(){if(t.resetGridAndUrl(),t.isDependentOnGroup&&(!t.eventCenterS.group.selectedGroups.value||!t.eventCenterS.group.selectedGroups.value.length))return;t.loading.grid=!0;const r={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,type:1,isMultiTenantStructureInstance:1},sort:{name:1}};t.showAll&&delete r.find.active;try{const a=yield t.instanceS.query(r).toPromise();a.success?(t.selectedRows=[],t.rows=a.data,t.rowsMap=E.keyBy(t.rows,h.iH._id)):t.resetGridAndUrl(),t.showHooksCount&&(yield t.instanceS.setHooksCountInInstanceArr(t.rows,t.groupFilter));const f=t.navigationCS.getQueryParam(I.p.instance);f&&(t.selectedRows=t.getObjectsFromIdArray(f.split(",")),t.eventCenterS.instance.selectedInstances.next(t.selectedRows)),t.isDependentOnGroup&&(t.selectedRows=t.getObjectsFromIdArray(t.eventCenterS.group.instanceIds.value)),t.isFilterLogTable&&(t.selectedRows=t.getObjectsFromIdArray(t.eventCenterS.filterInLog.instanceIds.value))}catch(a){console.log(a)}t.loading.grid=!1,t.cd.detectChanges()})()}getObjectsFromIdArray(t){const r=[];for(const a of t)this.rowsMap[a]&&r.push(this.rowsMap[a]);return r}resetGridAndUrl(){var t=this;return(0,d.Z)(function*(){t.rows=[],t.rowsMap={},t.selectedRows=[],t.eventCenterS.instance.selectedInstances.next([])})()}showAllChanges(){var t=this;return(0,d.Z)(function*(){yield t.resetSelectedRows(),yield t.loadGridData()})()}add(){this.data.formData=void 0,this.data.mode=g.D.ADD,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_ADD_MODE}),this.instancesFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=g.D.VIEW,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_VIEW_MODE}),this.instancesFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=g.D.EDIT,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),this.instancesFormC.showModal()}clone(){var t=this;return(0,d.Z)(function*(){try{if(!t.selectedRows[0])return;const r=(yield t.instanceS.getById(t.selectedRows[0]._id).toPromise()).data;delete r._id,delete r.guid,r.name=`${r.name}-clone`,(yield t.instanceS.post(r).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.instance.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.instance.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.instance.cloneError)}})()}inactiveDialog(){var t=this;return(0,d.Z)(function*(){var r;t.confirmationService.confirm({message:t.constantsS.instance.inactiveConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(r=(0,d.Z)(function*(){yield t.inactive()}),function(){return r.apply(this,arguments)})})})()}removePermanentDialog(){var t=this;return(0,d.Z)(function*(){var r;t.confirmationService.confirm({message:t.constantsS.instance.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(r=(0,d.Z)(function*(){yield t.removePermanent()}),function(){return r.apply(this,arguments)})})})()}active(){var t=this;return(0,d.Z)(function*(){t.loading.grid=!0;const r=yield t.instanceS.makeActive(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,r.success?(t.notificationS.showSuccess(t.constantsS.instance.active),t.loadGridData()):t.notificationS.showErrorFromResponse(r,t.constantsS.instance.activeError)})()}inactive(){var t=this;return(0,d.Z)(function*(){t.loading.grid=!0;try{yield t.instanceS.softDelete(t.selectedRows[0]._id).toPromise(),t.notificationS.showSuccess(t.constantsS.instance.inactive),yield t.resetSelectedRows(),t.loadGridData()}catch(r){const a=r?.error?.errors?.[0]?.message;t.notificationS.showError(a||t.constantsS.instance.inactiveError)}t.loading.grid=!1})()}removePermanent(){var t=this;return(0,d.Z)(function*(){t.loading.grid=!0;const r=yield t.instanceS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,r.success?(t.notificationS.showSuccess(t.constantsS.instance.removePermanent),yield t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(r,t.constantsS.instance.removePermanentError)})()}resetSelectedRows(){var t=this;return(0,d.Z)(function*(){t.selectedRows.length=0,t.eventCenterS.instance.selectedInstances.next([]),yield t.navigationCS.setQueryParam(I.p.instance,null)})()}instanceSelected(){var t=this;return(0,d.Z)(function*(){t.eventCenterS.instance.selectedInstances.next(t.selectedRows),t.isDependentOnGroup||t.isFilterLogTable?t.setInstanceIds():(yield t.navigationCS.setQueryParam(I.p.instance,E.map(t.selectedRows,"_id").join(",")||null),yield t.generalS.resetUrlParams([I.p.database,I.p.collection,I.p.collection_api]))})()}dblClickInstance(){this.selectedRows.length&&!this.isDependentOnGroup&&!this.isFilterLogTable&&this.edit()}openHookViewer(t,r){var a=this;return(0,d.Z)(function*(){try{const f=yield a.instanceS.getInstanceHooksDetail(t.name,r);a.hookViewerDialogC.showModal({title:`${t.name} \u2014 ${"pre"===r?"Pre":"Post"} Hooks`,hookType:r,hooks:f,groupFilter:a.groupFilter,saveFn:(T=(0,d.Z)(function*(w,U){yield a.instanceS.saveInstanceHooks(t.name,r,w),U&&a.notificationS.showSuccess("Instance hooks saved."),a.showHooksCount&&(yield a.instanceS.setHooksCountInInstanceArr(a.rows,a.groupFilter)),a.cd.detectChanges()}),function(U,ae){return T.apply(this,arguments)})})}catch{a.notificationS.showError("Unable to load hook details.")}var T})()}copyValue(t,r){var a=this;return(0,d.Z)(function*(){t.stopPropagation(),r&&((yield a.generalS.copyToClipboard(r))?a.notificationS.showSuccess(`Copied "${r}" to clipboard.`):a.notificationS.showError("Unable to copy to clipboard."))})()}setInstanceIds(){this.instanceIdsSkipSubscription=!0,this.eventCenterS.filterInLog.instanceIds.next(E.map(this.selectedRows,"_id")),this.eventCenterS.group.instanceIds.next(E.map(this.selectedRows,"_id")),this.instanceIdsSkipSubscription=!1}getInstanceIconUrl(t){return t===y.d.SQL_SERVER_DB?"./assets/images/svg/Microsoft_SQL_Server_DB_No_Logo.svg":t===y.d.ORACLE_DB?"./assets/images/svg/Oracle_DB_No_Logo.svg":`./assets/images/svg/${t}.svg`}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=n.Yp;static \u0275fac=function(r){return new(r||i)(e.Y36(P.E),e.Y36(Z.b),e.Y36(F.W),e.Y36(b.S),e.Y36(R.D),e.Y36(L.L),e.Y36(k.F0),e.Y36(e.sBO),e.Y36(N.u),e.Y36(O.YP))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-w-instances"]],viewQuery:function(r,a){if(1&r&&(e.Gf(H,5),e.Gf(j,5)),2&r){let f;e.iGM(f=e.CRH())&&(a.instancesFormC=f.first),e.iGM(f=e.CRH())&&(a.hookViewerDialogC=f.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],showCheckbox:"showCheckbox",showHooksCount:"showHooksCount",isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isFilterLogTable:["IsFilterLogTable","isFilterLogTable"],metaKeySelection:"metaKeySelection",groupFilter:"groupFilter"},decls:15,vars:6,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-link","text-yellow","fa-fw","mr-1"],[4,"ngIf"],["class","float-right cursor-pointer","pTooltip","All Instances",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["instancesFormC",""],["modalId","hookViewerDialogInstances"],["hookViewerDialogC",""],["href","https://docs.apimaker.dev/v1/docs/pages/instance-database-collection-apis-page.html","target","_blank"],[1,"float-right","fa-fw","ml-3",2,"font-size","25px",3,"src"],[1,"float-right","position-relative"],["styleClass","ml-3 mt-2px","tooltipPosition","right","pTooltip","Show All",3,"ngModel","ngModelChange","onChange"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Make Active",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Make Inactive",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanently Delete",3,"click",4,"ngIf"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["pTooltip","Make Active",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","text-success","fa-fw"],["pTooltip","Make Inactive",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw"],["pTooltip","Permanently Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","align-middle","text-danger"],["pTooltip","All Instances",1,"float-right","cursor-pointer"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped instance-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 45px;",4,"ngIf"],["style","width: 40px;",4,"ngIf"],[2,"width","40px"],["class","text-center","style","width: 40px;",4,"ngIf"],[2,"width","45px"],[1,"text-center",2,"width","40px"],[3,"pSelectableRow"],[1,"text-center"],[3,"src","alt"],[1,"word-break-all"],[1,"copy-cell"],["pTooltip","Multi tenant instance","class","fas fa-user-friends text-yellow fa-fw mr-2",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["class","text-center hook-count-cell cursor-pointer","tooltipPosition","top",3,"pTooltip","click",4,"ngIf"],[3,"value","pSelectableRow"],["class","fas fa-circle fa-fw align-middle text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw align-middle text-muted text-v-small",4,"ngIf"],[1,"fas","fa-circle","fa-fw","align-middle","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","align-middle","text-muted","text-v-small"],["pTooltip","Multi tenant instance",1,"fas","fa-user-friends","text-yellow","fa-fw","mr-2"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["tooltipPosition","top",1,"text-center","hook-count-cell","cursor-pointer",3,"pTooltip","click"],["class","fas fa-plus hook-add-icon text-muted",4,"ngIf"],[1,"fas","fa-plus","hook-add-icon","text-muted"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,a){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Instances"),e.qZA(),e.YNc(5,C,13,9,"span",3),e.YNc(6,s,2,2,"span",4),e.YNc(7,l,2,2,"span",4),e.qZA(),e.TgZ(8,"div",5),e.YNc(9,c,3,1,"div",3),e.YNc(10,Ce,5,7,"div",6),e.qZA()(),e._UZ(11,"app-w-instances-form",7,8)(13,"app-hook-viewer-dialog",9,10)),2&r&&(e.xp6(5),e.Q6J("ngIf",!a.isReadOnly),e.xp6(1),e.Q6J("ngIf",a.isDependentOnGroup),e.xp6(1),e.Q6J("ngIf",a.isFilterLogTable),e.xp6(2),e.Q6J("ngIf",a.eventCenterS.group.apisRegex.allInstances||a.eventCenterS.filterInLog.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(a.eventCenterS.group.apisRegex.allInstances||a.eventCenterS.filterInLog.apisRegex.allInstances)),e.xp6(1),e.Q6J("data",a.data))},dependencies:[A.JJ,A.On,J.O5,x.iA,O.jx,x.Ei,x.UA,x.Mo,K.G,B.u,Q.Ql,W.XZ,Y.n,G.o,V.w],styles:[".copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.copy-cell[_ngcontent-%COMP%]:hover .copy-icon[_ngcontent-%COMP%]{opacity:1}.copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return i})()},1678:(oe,M,o)=>{o.r(M),o.d(M,{DashboardM:()=>h});var d=o(77664),e=o(17017),I=(o(63885),o(57747),o(94946));const E=[{path:"root",loadChildren:()=>o.e(891).then(o.bind(o,80891)).then(n=>n.DashRootM)},{path:"redis-dashboard",loadChildren:()=>o.e(4110).then(o.bind(o,4110)).then(n=>n.RedisDashboardM)},{path:"summary-dashboard",loadChildren:()=>Promise.all([o.e(9575),o.e(7977)]).then(o.bind(o,77977)).then(n=>n.DashSummaryM)},{path:"developer",loadChildren:()=>o.e(3450).then(o.bind(o,73450)).then(n=>n.DashDevM)},{path:"welcome",loadChildren:()=>o.e(5334).then(o.bind(o,35334)).then(n=>n.AmWelcomeM)},{path:"ext-licenses",loadChildren:()=>o.e(7436).then(o.bind(o,17436)).then(n=>n.ExtLicensesM)}];let h=(()=>{class n{static \u0275fac=function(Z){return new(Z||n)};static \u0275mod=I.oAB({type:n});static \u0275inj=I.cJS({imports:[d.Bz.forChild(E),e.u]})}return n})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1754],{91754:(ht,g,i)=>{i.r(g),i.d(g,{VulnerabilityM:()=>lt});var v=i(77664),m=i(44480),O=i(17017),P=i(63726),t=i(94946),r=i(15861),M=i(6990),h=i(33157),x=i(90328),d=i(56212),f=i(51162),A=i(45085),w=i(60921),U=i(77240),b=i(99961),I=i(92189),L=i(95852),_=i(27414),q=i(32915),S=i(33835),V=i(53429),C=i(85219),H=i(81429),T=i(60095),p=i(96814),u=i(95431),G=i(97680),J=i(40707),Y=i(33259),D=i(53965),Q=i(44879);function N(e,l){if(1&e){const n=t.EpF();t.TgZ(0,"span",11),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.compress())}),t._UZ(1,"i",12),t.qZA()}}function R(e,l){if(1&e){const n=t.EpF();t.TgZ(0,"span",11),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.expand())}),t._UZ(1,"i",13),t.qZA()}}function k(e,l){if(1&e){const n=t.EpF();t.TgZ(0,"span",11),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.print())}),t._UZ(1,"i",14),t.qZA()}}const E=function(e){return{"text-danger font-weight-bold":e}},F=function(e){return{"text-warning font-weight-bold":e}};function K(e,l){if(1&e&&(t.TgZ(0,"div",15)(1,"div",16)(2,"div",17)(3,"table",18)(4,"tr")(5,"th",19),t._uU(6,"Vulnerability Summary"),t.qZA()(),t.TgZ(7,"tr")(8,"td",20),t._uU(9,"Critical"),t.qZA(),t.TgZ(10,"td",21),t._uU(11),t.qZA()(),t.TgZ(12,"tr")(13,"td",22),t._uU(14,"High"),t.qZA(),t.TgZ(15,"td",21),t._uU(16),t.qZA()(),t.TgZ(17,"tr")(18,"td",22),t._uU(19,"Moderate"),t.qZA(),t.TgZ(20,"td"),t._uU(21),t.qZA()(),t.TgZ(22,"tr")(23,"td",22),t._uU(24,"Info"),t.qZA(),t.TgZ(25,"td"),t._uU(26),t.qZA()(),t.TgZ(27,"tr")(28,"td",22),t._uU(29,"Low"),t.qZA(),t.TgZ(30,"td"),t._uU(31),t.qZA()(),t.TgZ(32,"tr")(33,"td",22),t._uU(34,"Total"),t.qZA(),t.TgZ(35,"td"),t._uU(36),t.qZA()()()(),t.TgZ(37,"div",17)(38,"table",18)(39,"tr")(40,"th",19),t._uU(41,"Dependency Summary"),t.qZA()(),t.TgZ(42,"tr")(43,"td",20),t._uU(44,"Prod"),t.qZA(),t.TgZ(45,"td"),t._uU(46),t.qZA()(),t.TgZ(47,"tr")(48,"td",22),t._uU(49,"Dev"),t.qZA(),t.TgZ(50,"td"),t._uU(51),t.qZA()(),t.TgZ(52,"tr")(53,"td",22),t._uU(54,"Optional"),t.qZA(),t.TgZ(55,"td"),t._uU(56),t.qZA()(),t.TgZ(57,"tr")(58,"td",22),t._uU(59,"Peer"),t.qZA(),t.TgZ(60,"td"),t._uU(61),t.qZA()(),t.TgZ(62,"tr")(63,"td",22),t._uU(64,"Peer Optional"),t.qZA(),t.TgZ(65,"td"),t._uU(66),t.qZA()(),t.TgZ(67,"tr")(68,"td",22),t._uU(69,"Total"),t.qZA(),t.TgZ(70,"td"),t._uU(71),t.qZA()()()()()()),2&e){const n=t.oxw();t.xp6(10),t.Q6J("ngClass",t.VKq(14,E,n.metadata.vulnerabilities.critical)),t.xp6(1),t.hij(" ",n.metadata.vulnerabilities.critical||""," "),t.xp6(4),t.Q6J("ngClass",t.VKq(16,F,n.metadata.vulnerabilities.high)),t.xp6(1),t.hij(" ",n.metadata.vulnerabilities.high||""," "),t.xp6(5),t.Oqu(n.metadata.vulnerabilities.moderate||""),t.xp6(5),t.Oqu(n.metadata.vulnerabilities.info||""),t.xp6(5),t.Oqu(n.metadata.vulnerabilities.low||""),t.xp6(5),t.Oqu(n.metadata.vulnerabilities.total||""),t.xp6(10),t.Oqu(n.metadata.dependencies.prod||""),t.xp6(5),t.Oqu(n.metadata.dependencies.dev||""),t.xp6(5),t.Oqu(n.metadata.dependencies.optional||""),t.xp6(5),t.Oqu(n.metadata.dependencies.peer||""),t.xp6(5),t.Oqu(n.metadata.dependencies.peerOptional||""),t.xp6(5),t.Oqu(n.metadata.dependencies.total||"")}}function B(e,l){1&e&&(t.TgZ(0,"tr"),t._UZ(1,"th",23)(2,"th",24),t.TgZ(3,"th",25),t._uU(4,"Direct"),t.qZA(),t.TgZ(5,"th",26),t._uU(6,"Severity"),t.qZA(),t.TgZ(7,"th",27),t._uU(8,"Version"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Package Name"),t.qZA(),t.TgZ(11,"th",27),t._uU(12,"Fix"),t.qZA()())}function $(e,l){if(1&e){const n=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(){t.CHM(n);const a=t.oxw().$implicit;return t.KtG(a.expanded=!a.expanded)}),t.qZA()}if(2&e){const n=t.oxw().$implicit;t.Q6J("pRowToggler",n)("icon",n.expanded?"pi pi-chevron-down":"pi pi-chevron-right")}}function j(e,l){1&e&&t._UZ(0,"i",35)}function W(e,l){if(1&e&&(t.TgZ(0,"span")(1,"span",36),t._uU(2),t.qZA(),t.TgZ(3,"span"),t._uU(4," \u2192 "),t.qZA()()),2&e){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("pTooltip",n.currentVersion+" = Current version"),t.xp6(1),t.Oqu(n.currentVersion)}}function z(e,l){if(1&e&&(t.TgZ(0,"span"),t.YNc(1,W,5,2,"span",33),t.TgZ(2,"span",36),t._uU(3),t.qZA()()),2&e){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",n.currentVersion),t.xp6(1),t.Q6J("pTooltip",n.fixAvailable.version+" = Update to version"),t.xp6(1),t.Oqu(n.fixAvailable.version)}}function X(e,l){if(1&e&&(t.TgZ(0,"a",47),t._UZ(1,"i",48),t.qZA()),2&e){const n=t.oxw().$implicit;t.Q6J("href",n.url,t.LSH)}}const tt=function(){return[]};function nt(e,l){if(1&e&&(t.TgZ(0,"tr")(1,"th",45),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"span",32),t._uU(5),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.TgZ(12,"td",30),t.YNc(13,X,2,1,"a",46),t.qZA()()),2&e){const n=l.$implicit,o=l.index;t.xp6(2),t.Oqu(o+1),t.xp6(2),t.uIk("data-sev",(n.severity||"").toLowerCase()),t.xp6(1),t.Oqu(n.severity),t.xp6(2),t.Oqu(n.range),t.xp6(2),t.Oqu((n.cwe||t.DdM(7,tt)).join(",")),t.xp6(2),t.Oqu(n.title),t.xp6(2),t.Q6J("ngIf",n.url)}}function et(e,l){if(1&e&&(t.TgZ(0,"tr")(1,"td",37)(2,"table",38)(3,"thead")(4,"tr")(5,"th",39),t._uU(6,"#"),t.qZA(),t.TgZ(7,"th",40),t._uU(8,"Severity"),t.qZA(),t.TgZ(9,"th",41),t._uU(10,"Range"),t.qZA(),t.TgZ(11,"th",41),t._uU(12,"CWE"),t.qZA(),t.TgZ(13,"th",42),t._uU(14,"Title"),t.qZA(),t._UZ(15,"th",43),t.qZA()(),t.TgZ(16,"tbody"),t.YNc(17,nt,14,8,"tr",44),t.qZA()()()()),2&e){const n=t.oxw().$implicit;t.xp6(17),t.Q6J("ngForOf",n.via)}}function at(e,l){if(1&e&&(t.TgZ(0,"tr",28)(1,"td"),t.YNc(2,$,1,2,"button",29),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",30),t.YNc(6,j,1,0,"i",31),t.qZA(),t.TgZ(7,"td")(8,"span",32),t._uU(9),t.qZA()(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.TgZ(12,"td"),t._uU(13),t.qZA(),t.TgZ(14,"td"),t.YNc(15,z,4,3,"span",33),t.qZA()(),t.YNc(16,et,18,1,"tr",33)),2&e){const n=l.$implicit,o=l.rowIndex;t.Q6J("pSelectableRow",n),t.xp6(2),t.Q6J("ngIf",null==n.via?null:n.via.length),t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Q6J("ngIf",n.isDirect),t.xp6(2),t.uIk("data-sev",(n.severity||"").toLowerCase()),t.xp6(1),t.Oqu(n.severity),t.xp6(2),t.Oqu(n.range),t.xp6(2),t.Oqu(n.name),t.xp6(2),t.Q6J("ngIf",n.fixAvailable),t.xp6(1),t.Q6J("ngIf",n.expanded)}}function it(e,l){1&e&&t._UZ(0,"p-progressSpinner",49)}let Z=(()=>{class e{generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;dataProviderService;cd;showCheckbox=!1;loading={grid:!1};subscriptions=[];data={mode:x.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];metadata;rowsMap={};showAll=!1;EUserType=w.d;gridKey=f.iH._id;EAPICategory=A.R;selectedRows=[];vulnerabilityCategories;model={vulnerabilitiesType:null};constructor(n,o,a,s,c,rt,st,ct,dt,pt,ut,gt,vt,mt){this.generalS=n,this.notificationS=o,this.navigationCS=a,this.authCS=s,this.constantsS=c,this.eventCenterS=rt,this.router=st,this.userS=ct,this.instanceS=dt,this.ns=pt,this.cs=ut,this.confirmationService=gt,this.dataProviderService=vt,this.cd=mt}ngOnInit(){var n=this;return(0,r.Z)(function*(){n.vulnerabilityCategories=n.dataProviderService.getVulnerabilityCategories(),n.model.vulnerabilitiesType=n.vulnerabilityCategories[0],n.eventCenterS.vulnerabilities.selectedVulnerability.next(void 0),yield n.loadGridData(),n.subscriptions.push(n.data.eventChannel.subscribe(function(){var o=(0,r.Z)(function*(a){(a.action===h.F.SAVED||a.action===h.F.UPDATED)&&(yield n.loadGridData())});return function(a){return o.apply(this,arguments)}}())),n.generalS.setNewTitle("Vulnerabilities Report")})()}typeChanged(){var n=this;return(0,r.Z)(function*(){yield n.loadGridData()})()}loadGridData(){var n=this;return(0,r.Z)(function*(){n.loading.grid=!0;try{const o=yield n.instanceS.getVulnerabilities({type:n.model.vulnerabilitiesType.name});if(o){n.selectedRows=[];const a=o.data;n.rows=a.list||[];for(const s of n.rows)s._id=n.generalS.getRandomString(8);n.metadata=a.metadata,n.rowsMap=M.keyBy(n.rows,f.iH._id)}}catch(o){n.ns.showErrorFromResponse(o.error||o,"Unable to load vulnerabilities.")}n.loading.grid=!1,n.cd.detectChanges()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.vulnerabilities.selectedVulnerability.next(void 0)}resetThisUrl(){var n=this;return(0,r.Z)(function*(){n.eventCenterS.vulnerabilities.selectedVulnerability.next(void 0),yield n.navigationCS.setQueryParam(d.p.am_vulnerability,null)})()}itemSelected(){var n=this;return(0,r.Z)(function*(){yield n.resetThisUrl(),setTimeout(n.fillData.bind(n))})()}fillData(){var n=this;return(0,r.Z)(function*(){if(!n.selectedRows.length)return yield n.navigationCS.setQueryParam(d.p.am_vulnerability,""),void n.eventCenterS.vulnerabilities.selectedVulnerability.next(null);const o=n.selectedRows[0];o?(yield n.navigationCS.setQueryParam(d.p.am_vulnerability,o._id),n.eventCenterS.vulnerabilities.selectedVulnerability.next(o)):yield n.resetThisUrl()})()}print(){window.print()}expand(){for(const n of this.rows)n.via?.length&&(n.expanded=!0)}compress(){for(const n of this.rows)n.via?.length&&(n.expanded=!1)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(o){return new(o||e)(t.Y36(U.b),t.Y36(b.W),t.Y36(I.S),t.Y36(L.D),t.Y36(_.L),t.Y36(q.u),t.Y36(v.F0),t.Y36(S.K),t.Y36(V.E),t.Y36(b.W),t.Y36(_.L),t.Y36(C.YP),t.Y36(H.B),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-vulnerability-list"]],inputs:{showCheckbox:"showCheckbox"},decls:17,vars:17,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["alt","Vulnerabilities",1,"fa-fw","mr-1",3,"src"],["optionLabel","name","filterBy","name","appendTo","body","styleClass","p-input-filled width-300 p-input-small-dropdown ml-4",3,"options","ngModel","filter","onChange"],["class","float-right cursor-pointer ml-3 d-print-none",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","p-2",4,"ngIf"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 336px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"float-right","cursor-pointer","ml-3","d-print-none",3,"click"],["pTooltip","Collapse all rows","tooltipPosition","left",1,"fas","fa-compress-alt","fa-fw"],["pTooltip","Expand all rows","tooltipPosition","left",1,"fas","fa-expand-alt","fa-fw"],["pTooltip","Print report","tooltipPosition","left",1,"fas","fa-print","fa-fw"],[1,"p-2"],[1,"row"],[1,"col-6"],[1,"table","table-bordered","table-striped","table-sm","mb-0","vuln-summary-table"],["colspan","2",1,"text-center","vuln-th"],[1,"text-right",2,"width","50%"],[3,"ngClass"],[1,"text-right"],[2,"width","45px"],[2,"width","55px"],[2,"width","70px"],[2,"width","90px"],[2,"width","170px"],[3,"pSelectableRow"],["type","button","pButton","","pRipple","","class","p-button-text p-button-rounded p-button-plain mr-2",3,"pRowToggler","icon","click",4,"ngIf"],[1,"text-center"],["pTooltip","Direct dependency","class","far fa-solid fa-dot-circle fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"vuln-sev"],[4,"ngIf"],["type","button","pButton","","pRipple","",1,"p-button-text","p-button-rounded","p-button-plain","mr-2",3,"pRowToggler","icon","click"],["pTooltip","Direct dependency",1,"far","fa-solid","fa-dot-circle","fa-fw","align-middle","text-success","text-v-small","pr-1"],["tooltipPosition","left",3,"pTooltip"],["colspan","7",1,"pl-5"],[1,"table","table-bordered","table-striped","table-hover","table-sm","vuln-via-table"],["scope","col",1,"text-center","vuln-th",2,"width","50px"],["scope","col",1,"vuln-th",2,"width","90px"],["scope","col",1,"vuln-th",2,"width","170px"],["scope","col",1,"vuln-th"],["scope","col",1,"vuln-th",2,"width","70px"],[4,"ngFor","ngForOf"],["scope","row",1,"text-center","px-0"],["class","btn btn-xsm-custom d-print-none","target","_blank","pTooltip","View details","tooltipPosition","left",3,"href",4,"ngIf"],["target","_blank","pTooltip","View details","tooltipPosition","left",1,"btn","btn-xsm-custom","d-print-none",3,"href"],[1,"fas","fa-external-link-alt","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,a){1&o&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t.ALo(4,"themeIcon"),t._uU(5," Vulnerabilities"),t.qZA(),t.TgZ(6,"span")(7,"p-dropdown",3),t.NdJ("onChange",function(c){return a.model.vulnerabilitiesType=c.value,a.typeChanged()}),t.qZA()(),t.YNc(8,N,2,0,"span",4),t.YNc(9,R,2,0,"span",4),t.YNc(10,k,2,0,"span",4),t.qZA(),t.TgZ(11,"div",5),t.YNc(12,K,72,18,"div",6),t.TgZ(13,"p-table",7),t.NdJ("selectionChange",function(c){return a.selectedRows=c})("selectionChange",function(){return a.itemSelected()}),t.YNc(14,B,13,0,"ng-template",8),t.YNc(15,at,17,10,"ng-template",9),t.qZA(),t.YNc(16,it,1,0,"p-progressSpinner",10),t.qZA()()),2&o&&(t.xp6(3),t.Q6J("src",t.lcZ(4,15,"/assets/images/icons/vulnerability.svg"),t.LSH),t.xp6(4),t.Q6J("options",a.vulnerabilityCategories)("ngModel",a.model.vulnerabilitiesType)("filter",!0),t.xp6(1),t.Q6J("ngIf",a.rows.length),t.xp6(1),t.Q6J("ngIf",a.rows.length),t.xp6(1),t.Q6J("ngIf",a.rows.length),t.xp6(2),t.Q6J("ngIf",null==a.metadata||null==a.metadata.vulnerabilities?null:a.metadata.vulnerabilities.total),t.xp6(1),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),t.xp6(3),t.Q6J("ngIf",a.loading.grid))},dependencies:[T.JJ,T.On,p.mk,p.sg,p.O5,u.iA,C.jx,u.Ei,u.jB,G.G,J.Hq,Y.u,D.Lt,m.H,Q.w],styles:[".vuln-th[_ngcontent-%COMP%]{background-color:#1b2636!important;background-image:linear-gradient(90deg,rgba(12,83,164,.45) 0%,rgba(0,137,63,.28) 100%)!important;color:#fff!important;border-color:#61afef4d!important;font-weight:600}.vuln-summary-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .vuln-via-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .vuln-via-table[_ngcontent-%COMP%] th[scope=row][_ngcontent-%COMP%]{border-color:#61afef24!important}.vuln-summary-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .vuln-via-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#d7dae0}.vuln-summary-table.table-striped[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-of-type(2n) td[_ngcontent-%COMP%], .vuln-via-table.table-striped[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-of-type(2n) td[_ngcontent-%COMP%]{background-color:#61afef0f}.vuln-via-table.table-hover[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background-color:#0c53a42e!important;color:#fff!important}.vuln-sev[_ngcontent-%COMP%]{display:inline-block;padding:1px 8px;border-radius:10px;font-size:.78rem;font-weight:600;text-transform:capitalize;border:1px solid transparent}.vuln-sev[data-sev=critical][_ngcontent-%COMP%]{color:#ff6b6b;background:rgba(220,38,38,.16);border-color:#dc262666}.vuln-sev[data-sev=high][_ngcontent-%COMP%]{color:#ffb454;background:rgba(217,154,7,.16);border-color:#d99a0766}.vuln-sev[data-sev=moderate][_ngcontent-%COMP%]{color:#ffd166;background:rgba(217,154,7,.1);border-color:#d99a0747}.vuln-sev[data-sev=low][_ngcontent-%COMP%]{color:#61afef;background:rgba(12,83,164,.16);border-color:#61afef59}.vuln-sev[data-sev=info][_ngcontent-%COMP%]{color:#9aa6b5;background:rgba(154,166,181,.12);border-color:#9aa6b54d}html.LIGHT[_nghost-%COMP%] .vuln-th[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-th[_ngcontent-%COMP%]{background-color:#eef3fa!important;background-image:linear-gradient(90deg,rgba(12,83,164,.16) 0%,rgba(0,137,63,.1) 100%)!important;color:#14233a!important;border-color:#0c53a42e!important}html.LIGHT[_nghost-%COMP%] .vuln-summary-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-summary-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], html.LIGHT[_nghost-%COMP%] .vuln-via-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-via-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], html.LIGHT[_nghost-%COMP%] .vuln-via-table[_ngcontent-%COMP%] th[scope=row][_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-via-table[_ngcontent-%COMP%] th[scope=row][_ngcontent-%COMP%]{border-color:#0c53a41f!important;color:#2b3340}html.LIGHT[_nghost-%COMP%] .vuln-summary-table.table-striped[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-of-type(2n) td[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-summary-table.table-striped[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-of-type(2n) td[_ngcontent-%COMP%], html.LIGHT[_nghost-%COMP%] .vuln-via-table.table-striped[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-of-type(2n) td[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-via-table.table-striped[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-of-type(2n) td[_ngcontent-%COMP%]{background-color:#0c53a40d}html.LIGHT[_nghost-%COMP%] .vuln-via-table.table-hover[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-via-table.table-hover[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background-color:#0c53a414!important;color:#14233a!important}html.LIGHT[_nghost-%COMP%] .vuln-sev[data-sev=critical][_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-sev[data-sev=critical][_ngcontent-%COMP%]{color:#c0392b;background:rgba(220,38,38,.1)}html.LIGHT[_nghost-%COMP%] .vuln-sev[data-sev=high][_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-sev[data-sev=high][_ngcontent-%COMP%]{color:#b06a00;background:rgba(217,154,7,.12)}html.LIGHT[_nghost-%COMP%] .vuln-sev[data-sev=moderate][_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-sev[data-sev=moderate][_ngcontent-%COMP%]{color:#8a6d00;background:rgba(217,154,7,.1)}html.LIGHT[_nghost-%COMP%] .vuln-sev[data-sev=low][_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-sev[data-sev=low][_ngcontent-%COMP%]{color:#0c53a4;background:rgba(12,83,164,.1)}html.LIGHT[_nghost-%COMP%] .vuln-sev[data-sev=info][_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .vuln-sev[data-sev=info][_ngcontent-%COMP%]{color:#5a6a82;background:rgba(90,106,130,.1)}"],changeDetection:0})}return e})();const ot=[{path:"layout",component:(()=>{class e{constructor(){}ngOnInit(){}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.Xpm({type:e,selectors:[["app-vulnerability-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(o,a){1&o&&(t.TgZ(0,"div",0),t._UZ(1,"app-vulnerability-list"),t.qZA())},dependencies:[Z],encapsulation:2})}return e})(),canActivate:[P.P]}];let lt=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=t.oAB({type:e});static \u0275inj=t.cJS({imports:[v.Bz.forChild(ot),O.u,m.T]})}return e})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1928],{71928:(ft,d,o)=>{o.r(d),o.d(d,{TpApiM:()=>nt});var h=o(77664),T=o(17017),A=o(63726),t=o(94946),c=o(85219),I=o(55043),C=o(58651),r=o(15861),x=o(27672),l=o(51162),E=o(20553),m=o(45085),y=o(19394),_=o(91601),P=o(78883),O=o(15561),g=o(99961),M=o(95852),Z=o(32915),N=o(45809),F=o(53429),G=o(27414),D=o(77240),B=o(61252),J=o(12559),Y=o(96814),H=o(756),L=o(97680),f=o(14844),U=o(33259),R=o(25025),b=o(44879);const V=["monacoEditorModalC"];function Q(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"span",12),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.save())}),t._UZ(1,"i",13),t.qZA()}}function w(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"span",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.removePermanentDialog())}),t._UZ(1,"i",15),t.qZA()}}function K(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"a",16),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.viewError())}),t._uU(1,"View error"),t.qZA()}}function j(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"div")(1,"div",24)(2,"app-monaco-editor",27),t.NdJ("editorGenerated",function(n){t.CHM(e);const s=t.oxw(2);return t.KtG(s.editorGeneratedBasicInfo(n))}),t.qZA()()()}if(2&a){const e=t.oxw(2);t.xp6(2),t.Q6J("isSchemaEditor",!0)("editorOptions",e.editorOptionsBasicInfo)}}function z(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"div",28)(1,"button",29),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.save())}),t._UZ(2,"i",30),t._uU(3," Add Third Party API Settings "),t.qZA()()}}function W(a,p){1&a&&t._UZ(0,"p-progressSpinner",31)}function X(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"div",17)(1,"div",18)(2,"p-tabView",19),t.NdJ("activeIndexChange",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.activeIndex=n)})("activeIndexChange",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.tabSelected())}),t.TgZ(3,"p-tabPanel",20),t.YNc(4,j,3,2,"div",21),t.qZA(),t.TgZ(5,"p-tabPanel",22),t.YNc(6,z,4,0,"div",23),t.TgZ(7,"div",24)(8,"app-monaco-editor",25),t.NdJ("editorGenerated",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.editorGenerated(n))}),t.qZA()()()()(),t.YNc(9,W,1,0,"p-progressSpinner",26),t.qZA()}if(2&a){const e=t.oxw();t.xp6(2),t.Q6J("activeIndex",e.activeIndex),t.xp6(2),t.Q6J("ngIf",null==e.data.selectedTreeItem?null:e.data.selectedTreeItem.apiName),t.xp6(2),t.Q6J("ngIf",!e.tpApiSetting._id),t.xp6(2),t.Q6J("hidden",!e.tpApiSetting._id)("isSchemaEditor",!0)("editorOptions",e.editorOptionsTpApiSetting),t.xp6(1),t.Q6J("ngIf",e.loading.form)}}let S=(()=>{class a{groupS;navigationS;ns;authCS;eventCenterS;monacoS;instanceS;constantsS;generalCS;tpApiSettingsS;tpInstalledApisS;notificationS;confirmationService;cd;loading={form:!1};subscriptions=[];data={};EAPIAccessType=x.di;editorTpApiSettingCode;editorOptionsTpApiSetting={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};monacoDecorations=[];tab;BE_HOST_PORT=E.N.BE_HOST_PORT;tpApiSetting={};saveMode;editorTpApiSettingBasicInfo;editorOptionsBasicInfo={readOnly:!1,language:"typescript",contextmenu:!0};tpInstallApi={};selectedTabTitle="Basic Info";treeItemApiId;activeIndex=0;viewDockerfileModelC;constructor(e,i,n,s,ot,at,st,rt,pt,dt,ct,lt,mt,gt){this.groupS=e,this.navigationS=i,this.ns=n,this.authCS=s,this.eventCenterS=ot,this.monacoS=at,this.instanceS=st,this.constantsS=rt,this.generalCS=pt,this.tpApiSettingsS=dt,this.tpInstalledApisS=ct,this.notificationS=lt,this.confirmationService=mt,this.cd=gt}ngOnInit(){this.monacoS.loadSchemaEditorSettings(this.BE_HOST_PORT,this.authCS.getUserId(),null).then(),this.subscriptions.push(this.eventCenterS.tpApiSettings.apiSelected.subscribe(e=>{e&&(this.saveMode=e.apiName?"TABLE":"COLLECTION",this.setDataInForm(this.data.selectedTreeItem=e),this.cd.detectChanges())}))}editorGenerated(e){var i=this;return(0,r.Z)(function*(){i.editorTpApiSettingCode=e,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(e,n=>{i.tpApiSetting._id&&i.save()})})()}setDataInForm(e){var i=this;return(0,r.Z)(function*(){i.loading.form=!0,i.lastError=void 0;const n=i.authCS.getUserId();if(i.tpApiSetting=(yield i.tpApiSettingsS.getApiSettings(n,e.bundleName,e.apiVersion,e.apiName))||{},e.apiName){i.treeItemApiId=e._id;const s=`${e.guid}:${i.authCS.gUser._id}`;i.tpInstallApi=(yield i.tpInstalledApisS.getById(s).toPromise()).data,i.cd.detectChanges()}i.setDataInFormCommonCode(),i.loading.form=!1})()}setDataInFormCommonCode(){var e=this;return(0,r.Z)(function*(){if(e.tpApiSetting._id)e.generalCS.setValueInEditor(e,"editorTpApiSettingCode",e.tpApiSetting.thirdPartyApiSettingsCode);else if(!e.tpApiSetting._id)if("COLLECTION"===e.saveMode){const i=yield e.instanceS.getDefaultContent(e.BE_HOST_PORT,m.R.THIRD_PARTY_API_VERSION_SETTINGS_JSON).toPromise();e.generalCS.setValueInEditor(e,"editorTpApiSettingCode",i.data)}else if("TABLE"===e.saveMode){const i=yield e.instanceS.getDefaultContent(e.BE_HOST_PORT,m.R.THIRD_PARTY_API_SETTINGS_JSON).toPromise();e.generalCS.setValueInEditor(e,"editorTpApiSettingCode",i.data)}e.tpInstallApi?.apiJsonStr&&e.generalCS.setValueInEditor(e,"editorTpApiSettingBasicInfo",e.tpInstallApi?.apiJsonStr),e.cd.detectChanges()})()}save(){var e=this;return(0,r.Z)(function*(){if("Basic Info"===e.selectedTabTitle)try{const i={};i.apiJsonStr=e.editorTpApiSettingBasicInfo.getValue(),yield e.tpInstalledApisS.put(e.treeItemApiId,i,{select:l.iH._id}).toPromise(),e.notificationS.showSuccess("Basic Info saved successfully."),e.eventCenterS.filterInLog.refreshGrid.next(Math.random())}catch(i){e.notificationS.showErrorMessageFromErrorObject(i)}else{let i={};const n=e.eventCenterS.tpApiSettings.apiSelected.value;if(!n||!n.bundleName||!n.apiVersion)return;i.bundleName=n.bundleName,i.apiVersion=n.apiVersion,i.apiName=n.apiName||y.pj.__THIRD_PARTY_API_SETTINGS__,i.user=e.authCS.getUserId(),i.thirdPartyApiSettingsCode=e.editorTpApiSettingCode.getValue(),i=Object.assign({},e.tpApiSetting||{},i);try{let s;e.loading.form=!0,e.lastError=void 0,e.monacoS.clearEditorDecorations(e.editorTpApiSettingCode,e.monacoDecorations),e.tpApiSetting._id?e.tpApiSetting._id&&(s=yield e.tpApiSettingsS.replace(e.tpApiSetting._id,i,{select:l.iH._id}).toPromise()):(s=yield e.tpApiSettingsS.post(i).toPromise(),e.tpApiSetting=s.data),e.ns.showSuccess(e.constantsS.tpApiSettings.addOrUpdateSuccess),e.eventCenterS.filterInLog.refreshGrid.next(Math.random()),e.loading.form=!1}catch(s){e.loading.form=!1,e.ns.showErrorFromResponse(s.error||s,"Unable to save third party API."),e.lastError=s.error,e.tab=e.tab||{},e.tab.axiosResponse={data:s.error},e.monacoS.highlightErrorInMonacoEditor(e.editorTpApiSettingCode,e.tab,"MainSandbox.ts",e.monacoDecorations)}}})()}removePermanentDialog(){var e=this;return(0,r.Z)(function*(){var i;e.confirmationService.confirm({message:e.constantsS.tpApiSettings.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield e.removePermanent()}),function(){return i.apply(this,arguments)})})})()}removePermanent(){var e=this;return(0,r.Z)(function*(){e.loading.form=!0;const i=yield e.tpApiSettingsS.permanentDelete(e.tpApiSetting._id).toPromise();e.loading.form=!1,i?(e.ns.showSuccess(e.constantsS.tpApiSettings.removePermanent),e.tpApiSetting={},e.cd.detectChanges(),e.eventCenterS.filterInLog.refreshGrid.next(Math.random())):e.ns.showErrorFromResponse(i,e.constantsS.tpApiSettings.removePermanentError)})()}viewError(){this.viewDockerfileModelC.showModal(this.generalCS.stringify(this.lastError),_.d.json)}tabSelected(){0===this.activeIndex?this.selectedTabTitle="Basic Info":1===this.activeIndex&&(this.selectedTabTitle="API Settings")}editorGeneratedBasicInfo(e){var i=this;return(0,r.Z)(function*(){i.editorTpApiSettingBasicInfo=e,i.monacoS.addSaveCodeKeyBinding(e,n=>{"Basic Info"===i.selectedTabTitle&&i.save()})})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(t.Y36(P.e),t.Y36(O.X),t.Y36(g.W),t.Y36(M.D),t.Y36(Z.u),t.Y36(N.b),t.Y36(F.E),t.Y36(G.L),t.Y36(D.b),t.Y36(B.G),t.Y36(J.d),t.Y36(g.W),t.Y36(c.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:a,selectors:[["app-w-tp-api-form"]],viewQuery:function(i,n){if(1&i&&t.Gf(V,5),2&i){let s;t.iGM(s=t.CRH())&&(n.viewDockerfileModelC=s.first)}},decls:15,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-cog","fa-fw","text-danger","mr-1"],["href","https://docs.apimaker.dev/v1/docs/settings/thirdPartyApiSettings.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],["class","float-right cursor-pointer ml-3","pTooltip","Save",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Delete API Settings",3,"click",4,"ngIf"],["href","javascript:;","class","text-danger float-right",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","position-relative border-top h-100",4,"ngIf"],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],["pTooltip","Save",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-save","fa-fw","text-success"],["pTooltip","Delete API Settings",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["href","javascript:;",1,"text-danger","float-right",3,"click"],[1,"position-relative","border-top","h-100"],[1,"modal-body","overflow-auto"],[3,"activeIndex","activeIndexChange"],["header","Basic Info"],[4,"ngIf"],["header","API Settings"],["class","p-1 text-center",4,"ngIf"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 124px)"],[3,"hidden","isSchemaEditor","editorOptions","editorGenerated"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[1,"p-1","text-center"],["type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-plus","text-success","fa-fw","align-middle","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"i",2),t._uU(4," Third Party API Settings"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.ALo(7,"themeIcon"),t.qZA(),t.YNc(8,Q,2,0,"span",5),t.YNc(9,w,2,0,"span",6),t.YNc(10,K,2,0,"a",7),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,X,10,7,"div",9),t.qZA()(),t._UZ(13,"app-monaco-editor-modal",10,11)),2&i&&(t.xp6(6),t.Q6J("src",t.lcZ(7,8,"/assets/images/logo/logo_docs.svg"),t.LSH),t.xp6(2),t.Q6J("ngIf",n.data.selectedTreeItem&&n.data.selectedTreeItem.bundleName&&n.data.selectedTreeItem.apiVersion&&(null==n.data.selectedTreeItem?null:n.data.selectedTreeItem.apiName)),t.xp6(1),t.Q6J("ngIf","API Settings"===n.selectedTabTitle&&n.data.selectedTreeItem&&n.data.selectedTreeItem.bundleName&&n.data.selectedTreeItem.apiVersion&&n.tpApiSetting._id),t.xp6(1),t.Q6J("ngIf",n.lastError),t.xp6(2),t.Q6J("ngIf",n.data.selectedTreeItem&&n.data.selectedTreeItem.bundleName&&n.data.selectedTreeItem.apiVersion),t.xp6(1),t.Q6J("modalId","idMonacoEditorModalInTpAPISettings")("editorOptionsMonacoEditorModal",n.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[Y.O5,H.O,L.G,f.xf,f.x4,U.u,R.A,b.w],encapsulation:2})}return a})();function $(a,p){1&a&&t._UZ(0,"app-w-supported-tp-api",3),2&a&&t.Q6J("IsDependentOnGroup",!1)("isLPM",!1)}function k(a,p){1&a&&t._UZ(0,"app-w-tp-api-form",4)}const u=function(){return[40,60]};let v=(()=>{class a{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=t.Xpm({type:a,selectors:[["app-tp-api-layout"]],decls:4,vars:4,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body",3,"panelSizes","minSizes"],["pTemplate",""],[1,"w-100",3,"IsDependentOnGroup","isLPM"],[1,"w-100"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0)(1,"p-splitter",1),t.YNc(2,$,1,2,"ng-template",2),t.YNc(3,k,1,0,"ng-template",2),t.qZA()()),2&i&&(t.xp6(1),t.Q6J("panelSizes",t.DdM(2,u))("minSizes",t.DdM(3,u)))},dependencies:[c.jx,I.q,C.A,S],encapsulation:2})}return a})();var q=o(36401),tt=o(57705),et=o(44950);const it=[{path:"tp-layout",component:v,canActivate:[A.P]}];let nt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=t.oAB({type:a});static \u0275inj=t.cJS({imports:[h.Bz.forChild(it),T.u,q.GroupM,tt.L,et.A]})}return a})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1957],{41957:(T,i,e)=>{e.r(i),e.d(i,{NotesM:()=>y});var d=e(77664),l=e(17017),p=e(63726),t=e(94946),h=e(20553),v=e(25405),C=e(77240),g=e(56750),f=e(70621);const u=["notesGridId"];const m=[{path:"main",component:(()=>{class o{eventCenterCS;generalS;detectChanges=new t.vpe;notesListC;loading={form:!1,response:!1};BE_HOST_PORT=h.N.BE_HOST_PORT;constructor(a,n){this.eventCenterCS=a,this.generalS=n}ngOnInit(){this.generalS.setNewTitle("Notes"),this.eventCenterCS.hideShowNotesIcon=!0}ngOnDestroy(){this.eventCenterCS.hideShowNotesIcon=!1}static \u0275fac=function(n){return new(n||o)(t.Y36(v.M),t.Y36(C.b))};static \u0275cmp=t.Xpm({type:o,selectors:[["app-notes-layout"]],viewQuery:function(n,s){if(1&n&&t.Gf(u,7),2&n){let c;t.iGM(c=t.CRH())&&(s.notesListC=c.first)}},inputs:{detectChanges:"detectChanges"},decls:7,vars:10,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"],[1,"row","m-0",2,"height","calc(100vh - 52px)"],[1,"col-3","p-0"],[1,"w-100",3,"projectType","hostAndPort"],["notesGridId",""],[1,"col-9","p-0"],[1,"w-100",3,"data","loading","projectType","hostAndPort","isPageHeight","detectChanges"]],template:function(n,s){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"app-notes-list",3,4),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"app-notes-form",6),t.qZA()()()),2&n&&(t.xp6(3),t.Q6J("projectType","AM")("hostAndPort",s.BE_HOST_PORT),t.xp6(2),t.Udp("display",s.eventCenterCS.addEditNotes?"block":"none"),t.xp6(1),t.Q6J("data",s.notesListC.data)("loading",s.loading)("projectType","AM")("hostAndPort",s.BE_HOST_PORT)("isPageHeight",!0)("detectChanges",s.detectChanges))},dependencies:[g.o,f.X],encapsulation:2})}return o})(),canActivate:[p.P]}];let y=(()=>{class o{static \u0275fac=function(n){return new(n||o)};static \u0275mod=t.oAB({type:o});static \u0275inj=t.cJS({imports:[d.Bz.forChild(m),l.u]})}return o})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2140],{2140:(u,r,n)=>{n.r(r),n.d(r,{MonitoringM:()=>m});var s=n(77664),e=n(17017),c=n(63726),o=n(94946),l=n(77240);const g=[{path:"main",component:(()=>{class t{generalS;constructor(i){this.generalS=i}ngOnInit(){this.generalS.setNewTitle("Monitoring")}static \u0275fac=function(a){return new(a||t)(o.Y36(l.b))};static \u0275cmp=o.Xpm({type:t,selectors:[["app-monitoring-c"]],decls:2,vars:0,template:function(a,f){1&a&&(o.TgZ(0,"h1"),o._uU(1,"Monitoring"),o.qZA())},encapsulation:2})}return t})(),canActivate:[c.P]}];let m=(()=>{class t{static \u0275fac=function(a){return new(a||t)};static \u0275mod=o.oAB({type:t});static \u0275inj=o.cJS({imports:[s.Bz.forChild(g),e.u]})}return t})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2295],{12295:(ne,h,r)=>{r.r(h),r.d(h,{DevAccM:()=>te});var C=r(77664),I=r(17017),e=r(94946),p=r(15861),l=r(33157),m=r(90328),g=r(56212),w=r(6990),P=r(60921),v=r(51162),x=r(33835),M=r(77240),b=r(99961),S=r(92189),y=r(90204),T=r(95852),A=r(32915),F=r(85219),_=r(96814),D=r(97680),E=r(33259),c=r(60095),k=r(20553),G=r(32660);function L(n,d){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Add Developer User"),e.qZA())}function H(n,d){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," View Developer User"),e.qZA())}function N(n,d){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," Edit Developer User"),e.qZA())}function Y(n,d){1&n&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",27),e.qZA()())}function J(n,d){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function Q(n,d){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function q(n,d){if(1&n){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.save())}),e._UZ(1,"i",29),e.YNc(2,J,2,0,"span",4),e.YNc(3,Q,2,0,"span",4),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function V(n,d){1&n&&e._UZ(0,"p-progressSpinner",30)}let O=(()=>{class n{fb;ns;userS;generalS;constantsCS;authCS;cd;data;loading={form:!1};EFormMode=m.D;form;subscriptions=[];constructor(t,o,a,s,i,f,u){this.fb=t,this.ns=o,this.userS=a,this.generalS=s,this.constantsCS=i,this.authCS=f,this.cd=u}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var o=(0,p.Z)(function*(a){if(a){if(t.form.enable(),a.action===l.F.OPEN_FORM_IN_EDIT_MODE){const s=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(s.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(a.action===l.F.OPEN_FORM_IN_VIEW_MODE){const s=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(s.data),t.form.disable()}else a.action===l.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("password").setValidators([c.kI.required,c.kI.minLength(4),c.kI.maxLength(40)]),t.form.get("password").updateValueAndValidity());t.cd.detectChanges()}});return function(a){return o.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[c.kI.required]],email:[null,[c.kI.required,c.kI.email]],apiPath:[null,[c.kI.required,c.kI.minLength(3),c.kI.maxLength(45),c.kI.pattern("[a-zA-Z0-9_]*$")]],password:[null,[]]})}showModal(){$("#idAMDevUsersForm").modal("show")}hideModal(){$("#idAMDevUsersForm").modal("hide")}save(){var t=this;return(0,p.Z)(function*(){const o=t.form.getRawValue();o.user=t.authCS.getUserId(),o.userType=P.d.DEVELOPER,o.password=t.generalS.getEncryptedString(o.password,k.N.crypto.passCommunication);try{let a;t.loading.form=!0,t.data.mode===m.D.ADD?a=yield t.userS.post(o).toPromise():t.data.mode===m.D.EDIT&&(t.data.formData._id&&(t.form.get("password").value||delete o.password),a=yield t.userS.put(t.data.formData._id,o,{select:v.iH._id}).toPromise()),t.ns.showSuccess(t.data.mode===m.D.ADD?t.constantsCS.user.addSuccess:t.constantsCS.user.editSuccess),t.data.eventChannel.emit({action:t.data.mode===m.D.ADD?l.F.SAVED:l.F.UPDATED}),t.loading.form=!1}catch(a){t.loading.form=!1,t.ns.showErrorFromResponse(a.error||a,"Unable to save dev user.")}t.cd.detectChanges()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(o){return new(o||n)(e.Y36(c.qu),e.Y36(b.W),e.Y36(x.K),e.Y36(M.b),e.Y36(y.s),e.Y36(T.D),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-dev-user-form"]],inputs:{data:"data"},decls:39,vars:7,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idAMDevUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","email","name","email","spellcheck","false","type","text","placeholder","Please provide email",1,"form-control","form-control-sm"],["class","form-group row",4,"ngIf"],[1,"form-group","row",2,"margin-bottom","0 !important"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide API path",1,"form-control","text-lowercase","form-control-sm"],[1,"col-form-label","col-form-label-sm","text-info","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,L,3,0,"span",4),e.YNc(5,H,3,0,"span",4),e.YNc(6,N,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Email"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.YNc(22,Y,5,0,"div",15),e.TgZ(23,"div",16)(24,"label",11),e._uU(25,"API Path"),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",17),e.qZA()(),e.TgZ(28,"div",10),e._UZ(29,"label",11),e.TgZ(30,"div",12)(31,"label",18),e._uU(32,"[a-z,_] (Ex: user_path)"),e.qZA()()()()(),e.TgZ(33,"div",19)(34,"button",20),e._UZ(35,"i",21),e._uU(36," Close"),e.qZA(),e.YNc(37,q,4,3,"button",22),e.qZA(),e.YNc(38,V,1,0,"p-progressSpinner",23),e.qZA()()()),2&o&&(e.xp6(4),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",a.form),e.xp6(11),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(15),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.loading.form))},dependencies:[c._Y,c.Fj,c.JJ,c.JL,c.sg,c.u,_.O5,G.y,D.G],encapsulation:2,changeDetection:0})}return n})();var R=r(44879);const z=["devUserFormC"];function W(n,d){1&n&&(e.TgZ(0,"div",14),e._UZ(1,"i",15),e.TgZ(2,"div"),e._uU(3,"No developer users yet. Use "),e._UZ(4,"i",16),e._uU(5," above to add one."),e.qZA()())}function K(n,d){if(1&n){const t=e.EpF();e.TgZ(0,"span",34),e.NdJ("click",function(a){e.CHM(t);const s=e.oxw().$implicit,i=e.oxw();return a.stopPropagation(),e.KtG(i.copyApiPath(s))}),e._UZ(1,"i",31),e.qZA()}}function j(n,d){if(1&n){const t=e.EpF();e.TgZ(0,"div",17),e.NdJ("click",function(){const s=e.CHM(t).$implicit,i=e.oxw();return e.KtG(i.devUserSelected(s))})("dblclick",function(){const s=e.CHM(t).$implicit,i=e.oxw();return e.KtG(i.edit(s))}),e.TgZ(1,"div",18),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(2,"span",19),e.NdJ("click",function(){const s=e.CHM(t).$implicit,i=e.oxw();return e.KtG(i.edit(s))}),e._UZ(3,"i",20),e.qZA(),e.TgZ(4,"span",21),e.NdJ("click",function(){const s=e.CHM(t).$implicit,i=e.oxw();return e.KtG(i.removePermanentDialog(s))}),e._UZ(5,"i",22),e.qZA()(),e.TgZ(6,"div",23)(7,"span",24),e._UZ(8,"i",25),e.qZA(),e.TgZ(9,"span",26),e._uU(10),e.qZA()(),e.TgZ(11,"div",27)(12,"span",28),e._uU(13,"Email"),e.qZA(),e.TgZ(14,"span",29),e._uU(15),e.qZA(),e.TgZ(16,"span",30),e.NdJ("click",function(a){const i=e.CHM(t).$implicit,f=e.oxw();return a.stopPropagation(),e.KtG(f.copyEmail(i))}),e._UZ(17,"i",31),e.qZA()(),e.TgZ(18,"div",27)(19,"span",28),e._uU(20,"API Path"),e.qZA(),e.TgZ(21,"span",32),e._uU(22),e.qZA(),e.YNc(23,K,2,0,"span",33),e.qZA()()}if(2&n){const t=d.$implicit,o=e.oxw();e.ekj("dev-card--selected",o.selectedId===t._id),e.xp6(9),e.Q6J("pTooltip",t.name),e.xp6(1),e.Oqu(t.name),e.xp6(4),e.Q6J("pTooltip",t.email),e.xp6(1),e.Oqu(t.email),e.xp6(6),e.Q6J("pTooltip",t.apiPath),e.xp6(1),e.Oqu(t.apiPath||"\u2014"),e.xp6(1),e.Q6J("ngIf",t.apiPath)}}function B(n,d){1&n&&e._UZ(0,"p-progressSpinner",35)}let U=(()=>{class n{userS;generalS;notificationS;navigationCS;constantsCS;authCS;eventCenterS;confirmationService;router;loading={grid:!1};subscriptions=[];data={mode:m.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedId=null;gridKey=v.iH._id;devUserFormC;constructor(t,o,a,s,i,f,u,oe,ae){this.userS=t,this.generalS=o,this.notificationS=a,this.navigationCS=s,this.constantsCS=i,this.authCS=f,this.eventCenterS=u,this.confirmationService=oe,this.router=ae}ngOnInit(){this.eventCenterS.user.selectedUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===l.F.SAVED||t.action===l.F.UPDATED)&&(this.devUserFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("Developer Accounts")}loadGridData(){var t=this;this.loading.grid=!0;const o={find:{active:!0,userType:P.d.DEVELOPER,user:this.authCS.getUserId()},select:{name:1,email:1,apiPath:1,active:1,userType:1},sort:{name:1}};this.showAll&&delete o.find.active,this.subscriptions.push(this.userS.query(o).subscribe(function(){var a=(0,p.Z)(function*(s){s.success&&(t.rows=s.data,t.rowsMap=w.keyBy(t.rows,v.iH._id),t.selectedId&&!t.rowsMap[t.selectedId]&&(t.selectedId=null));const i=t.navigationCS.getQueryParam(g.p.user);t.rowsMap[i]&&(t.selectedId=i,t.eventCenterS.user.selectedUsers.next([t.rowsMap[i]]),yield t.fillData()),t.loading.grid=!1});return function(s){return a.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=m.D.ADD,this.data.eventChannel.emit({action:l.F.OPEN_FORM_IN_ADD_MODE}),this.devUserFormC.showModal()}view(t){this.data.formData=t,this.data.mode=m.D.VIEW,this.data.eventChannel.emit({action:l.F.OPEN_FORM_IN_VIEW_MODE}),this.devUserFormC.showModal()}edit(t){this.data.formData=t,this.data.mode=m.D.EDIT,this.data.eventChannel.emit({action:l.F.OPEN_FORM_IN_EDIT_MODE}),this.devUserFormC.showModal()}removePermanentDialog(t){var o=this;return(0,p.Z)(function*(){var a;o.confirmationService.confirm({message:o.constantsCS.user.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,p.Z)(function*(){yield o.removePermanent(t)}),function(){return a.apply(this,arguments)})})})()}removePermanent(t){var o=this;return(0,p.Z)(function*(){o.loading.grid=!0;const a=yield o.userS.permanentDelete(t._id).toPromise();o.loading.grid=!1,a.success?(o.notificationS.showSuccess(o.constantsCS.user.removePermanent),o.selectedId===t._id&&(o.selectedId=null),o.resetDependents(),o.loadGridData()):o.notificationS.showErrorFromResponse(a,o.constantsCS.user.removePermanentError)})()}resetDependents(){var t=this;return(0,p.Z)(function*(){t.eventCenterS.user.selectedUsers.next([]),yield t.navigationCS.setQueryParam(g.p.user,null)})()}devUserSelected(t){var o=this;return(0,p.Z)(function*(){o.selectedId=o.selectedId===t._id?null:t._id,yield o.resetDependents(),yield o.fillData()})()}fillData(){var t=this;return(0,p.Z)(function*(){if(!t.selectedId)return yield t.navigationCS.setQueryParam(g.p.user,""),void t.eventCenterS.user.selectedUsers.next([]);const o=(yield t.userS.getById(t.selectedId).toPromise()).data;o._id?(yield t.navigationCS.setQueryParam(g.p.user,o._id),t.eventCenterS.user.selectedUsers.next([o])):t.resetDependents()})()}copyEmail(t){try{navigator.clipboard.writeText(t.email),this.notificationS.showSuccess("Email copied to clipboard.")}catch{this.notificationS.showError("Unable to copy email.")}}copyApiPath(t){try{navigator.clipboard.writeText(t.apiPath),this.notificationS.showSuccess("API Path copied to clipboard.")}catch{this.notificationS.showError("Unable to copy API Path.")}}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(o){return new(o||n)(e.Y36(x.K),e.Y36(M.b),e.Y36(b.W),e.Y36(S.S),e.Y36(y.s),e.Y36(T.D),e.Y36(A.u),e.Y36(F.YP),e.Y36(C.F0))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-dev-users"]],viewQuery:function(o,a){if(1&o&&e.Gf(z,5),2&o){let s;e.iGM(s=e.CRH())&&(a.devUserFormC=s.first)}},decls:18,vars:10,consts:[[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["alt","Dev Accounts",1,"fa-fw","mr-1",3,"src"],["href","https://docs.apimaker.dev/v1/docs/dev-accounts/dev-accounts.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","h-100","overflow-hidden","position-relative"],["class","dev-empty",4,"ngIf"],[1,"dev-grid"],["class","dev-card",3,"dev-card--selected","click","dblclick",4,"ngFor","ngForOf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["devUserFormC",""],[1,"dev-empty"],[1,"fas","fa-user-cog","fa-fw","mb-2"],[1,"fas","fa-plus","text-success"],[1,"dev-card",3,"click","dblclick"],[1,"dev-card__actions",3,"click"],["pTooltip","Edit","tooltipPosition","top",1,"dev-card__act","dev-card__act--edit",3,"click"],[1,"fas","fa-pencil-alt","fa-fw"],["pTooltip","Permanent Delete","tooltipPosition","top",1,"dev-card__act","dev-card__act--delete",3,"click"],[1,"far","fa-trash-alt","fa-fw"],[1,"dev-card__title"],[1,"dev-card__icon"],[1,"fas","fa-user","fa-fw"],["tooltipPosition","top",1,"dev-card__name",3,"pTooltip"],[1,"dev-card__meta"],[1,"dev-card__meta-label"],["tooltipPosition","bottom",1,"dev-card__meta-value",3,"pTooltip"],["pTooltip","Copy Email","tooltipPosition","top",1,"dev-card__copy",3,"click"],[1,"far","fa-copy","fa-fw"],["tooltipPosition","bottom",1,"dev-card__meta-value","dev-card__meta-value--mono",3,"pTooltip"],["class","dev-card__copy","pTooltip","Copy API Path","tooltipPosition","top",3,"click",4,"ngIf"],["pTooltip","Copy API Path","tooltipPosition","top",1,"dev-card__copy",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Developer Users"),e.qZA(),e.TgZ(6,"a",3),e._UZ(7,"img",4),e.ALo(8,"themeIcon"),e.qZA(),e.TgZ(9,"span",5),e.NdJ("click",function(){return a.add()}),e._UZ(10,"i",6),e.qZA()(),e.TgZ(11,"div",7),e.YNc(12,W,6,0,"div",8),e.TgZ(13,"div",9),e.YNc(14,j,24,9,"div",10),e.qZA(),e.YNc(15,B,1,0,"p-progressSpinner",11),e.qZA()(),e._UZ(16,"app-w-dev-user-form",12,13)),2&o&&(e.xp6(3),e.Q6J("src",e.lcZ(4,6,"/assets/images/icons/dev.svg"),e.LSH),e.xp6(4),e.Q6J("src",e.lcZ(8,8,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(5),e.Q6J("ngIf",!a.loading.grid&&!a.rows.length),e.xp6(2),e.Q6J("ngForOf",a.rows),e.xp6(1),e.Q6J("ngIf",a.loading.grid),e.xp6(1),e.Q6J("data",a.data))},dependencies:[_.sg,_.O5,D.G,E.u,O,R.w],styles:['@charset "UTF-8";.dev-grid[_ngcontent-%COMP%]{height:100%;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;padding:14px;align-content:start}.dev-card[_ngcontent-%COMP%]{position:relative;background-color:#141c29;border:1px solid rgba(97,175,239,.18);border-radius:10px;padding:12px 14px;cursor:pointer;overflow:hidden;box-shadow:0 2px 10px #0003;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background-color .15s ease}.dev-card[_ngcontent-%COMP%]:hover{border-color:#61afef73;box-shadow:0 6px 18px #0000004d;transform:translateY(-2px)}.dev-card--selected[_ngcontent-%COMP%]{border-color:#61afef;background-image:linear-gradient(90deg,rgba(12,83,164,.22) 0%,rgba(0,137,63,.14) 100%);box-shadow:0 0 0 1px #61afef8c,0 6px 18px #0000004d}.dev-card__title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding-right:56px;min-height:26px}.dev-card__icon[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;background-color:#61afef1f;color:#61afef;font-size:.82rem}.dev-card__name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;color:#eaf2fb;font-weight:600;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-card__meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:8px}.dev-card__meta[_ngcontent-%COMP%]:first-of-type{margin-top:10px;padding-top:8px;border-top:1px solid rgba(97,175,239,.1)}.dev-card__meta-label[_ngcontent-%COMP%]{flex:0 0 auto;width:66px;height:18px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#8cc6ff;background-color:#61afef1a;border-radius:4px}.dev-card__meta-value[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;font-size:.78rem;color:#9fb3cc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-card__meta-value--mono[_ngcontent-%COMP%]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.76rem}.dev-card__copy[_ngcontent-%COMP%]{flex:0 0 auto;cursor:pointer;color:#6f8095;font-size:.78rem;padding:2px;border-radius:5px;transition:color .12s ease,background-color .12s ease}.dev-card__copy[_ngcontent-%COMP%]:hover{color:#61afef;background-color:#61afef1f}.dev-card__actions[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;display:flex;gap:4px;opacity:0;transform:translateY(-2px);transition:opacity .12s ease,transform .12s ease}.dev-card[_ngcontent-%COMP%]:hover .dev-card__actions[_ngcontent-%COMP%], .dev-card--selected[_ngcontent-%COMP%] .dev-card__actions[_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.dev-card__act[_ngcontent-%COMP%]{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;cursor:pointer;font-size:.74rem;color:#9fb3cc;background-color:#0f1622b8;border:1px solid rgba(97,175,239,.18);transition:color .12s ease,background-color .12s ease,border-color .12s ease}.dev-card__act--edit[_ngcontent-%COMP%]:hover{color:#eaf2fb;border-color:#61afef8c;background-color:#0c53a466}.dev-card__act--delete[_ngcontent-%COMP%]:hover{color:#ff6b6b;border-color:#ff6b6b8c;background-color:#781e1e59}.dev-empty[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#6f8095;font-size:.9rem;padding:20px}.dev-empty[_ngcontent-%COMP%] i.fa-user-cog[_ngcontent-%COMP%]{font-size:1.8rem;color:#61afef8c}html.LIGHT[_nghost-%COMP%] .dev-card[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card[_ngcontent-%COMP%]{background-color:#fff;border-color:#0c53a429;box-shadow:0 2px 10px #0c1e3c0f}html.LIGHT[_nghost-%COMP%] .dev-card[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .dev-card[_ngcontent-%COMP%]:hover{border-color:#0c53a466;box-shadow:0 6px 18px #0c1e3c1f}html.LIGHT[_nghost-%COMP%] .dev-card--selected[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card--selected[_ngcontent-%COMP%]{border-color:#0c53a4;background-image:linear-gradient(90deg,rgba(12,83,164,.08) 0%,rgba(0,137,63,.05) 100%);box-shadow:0 0 0 1px #0c53a473,0 6px 18px #0c1e3c1f}html.LIGHT[_nghost-%COMP%] .dev-card__icon[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card__icon[_ngcontent-%COMP%]{background-color:#0c53a41a;color:#0c53a4}html.LIGHT[_nghost-%COMP%] .dev-card__name[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card__name[_ngcontent-%COMP%]{color:#14233a}html.LIGHT[_nghost-%COMP%] .dev-card__meta[_ngcontent-%COMP%]:first-of-type, html.LIGHT [_nghost-%COMP%] .dev-card__meta[_ngcontent-%COMP%]:first-of-type{border-top-color:#0c53a41a}html.LIGHT[_nghost-%COMP%] .dev-card__meta-label[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card__meta-label[_ngcontent-%COMP%]{color:#0c53a4;background-color:#0c53a414}html.LIGHT[_nghost-%COMP%] .dev-card__meta-value[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card__meta-value[_ngcontent-%COMP%]{color:#5a6a82}html.LIGHT[_nghost-%COMP%] .dev-card__copy[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card__copy[_ngcontent-%COMP%]{color:#8a99ad}html.LIGHT[_nghost-%COMP%] .dev-card__copy[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .dev-card__copy[_ngcontent-%COMP%]:hover{color:#0c53a4;background-color:#0c53a41a}html.LIGHT[_nghost-%COMP%] .dev-card__act[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-card__act[_ngcontent-%COMP%]{color:#5a6a82;background-color:#f4f7fbeb;border-color:#0c53a42e}html.LIGHT[_nghost-%COMP%] .dev-card__act--edit[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .dev-card__act--edit[_ngcontent-%COMP%]:hover{color:#14233a;border-color:#0c53a48c;background-color:#0c53a41f}html.LIGHT[_nghost-%COMP%] .dev-card__act--delete[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .dev-card__act--delete[_ngcontent-%COMP%]:hover{color:#d9363e;border-color:#d9363e8c;background-color:#d9363e1a}html.LIGHT[_nghost-%COMP%] .dev-empty[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-empty[_ngcontent-%COMP%]{color:#8a99ad}html.LIGHT[_nghost-%COMP%] .dev-empty[_ngcontent-%COMP%] i.fa-user-cog[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dev-empty[_ngcontent-%COMP%] i.fa-user-cog[_ngcontent-%COMP%]{color:#0c53a473}']})}return n})();const ee=[{path:"",component:(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-dev-acc-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0),e._UZ(1,"app-w-dev-users"),e.qZA())},dependencies:[U],encapsulation:2})}return n})(),canActivate:[r(63726).P]}];let te=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[C.Bz.forChild(ee),I.u]})}return n})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[238],{60238:(A,d,t)=>{t.r(d),t.d(d,{CodeComparatorModelM:()=>M});var c=t(77664),l=t(17017),i=t(15861),e=t(94946),m=t(77240),p=t(96814),f=t(756),u=t(97680),C=t(44879);const h=["editorSchemaNative"];function g(a,O){1&a&&e._UZ(0,"p-progressSpinner",7)}const S=[{path:"",component:(()=>{class a{cd;generalS;loading={form:!1};editorOptionsAnalysis={readOnly:!1,language:"typescript",contextmenu:!1};rows=[];rowsMap={};editorSchemaNative;editorAnalysis;constructor(o,r){this.cd=o,this.generalS=r}ngOnInit(){var o=this;return(0,i.Z)(function*(){o.generalS.setNewTitle("Code Comparator"),setTimeout((0,i.Z)(function*(){yield o.compareData()}),500)})()}compareData(){var o=this;return(0,i.Z)(function*(){o.loading.form=!0,o.editorSchemaNative.initDiffEditor("","","typescript",!0,!1),o.loading.form=!1,o.cd.detectChanges()})()}static \u0275fac=function(r){return new(r||a)(e.Y36(e.sBO),e.Y36(m.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-code-comparator-model"]],viewQuery:function(r,n){if(1&r&&e.Gf(h,5),2&r){let s;e.iGM(s=e.CRH())&&(n.editorSchemaNative=s.first)}},decls:10,vars:6,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Code Comparator",1,"fa-fw","mr-1",3,"src"],[1,"full-body","p-0","overflow-hidden"],[3,"shouldReplaceValueFunction","editorOptions","editorGenerated"],["editorSchemaNative",""],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,n){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Code Comparator"),e.qZA()(),e.TgZ(6,"div",3)(7,"app-monaco-editor",4,5),e.NdJ("editorGenerated",function(Z){return n.editorAnalysis=Z}),e.qZA(),e.YNc(9,g,1,0,"p-progressSpinner",6),e.qZA()()),2&r&&(e.xp6(3),e.Q6J("src",e.lcZ(4,4,"/assets/images/icons/comparator.svg"),e.LSH),e.xp6(4),e.Q6J("shouldReplaceValueFunction",!1)("editorOptions",n.editorOptionsAnalysis),e.xp6(2),e.Q6J("ngIf",n.loading.form))},dependencies:[p.O5,f.O,u.G,C.w],encapsulation:2})}return a})(),canActivate:[t(63726).P]}];let M=(()=>{class a{static \u0275fac=function(r){return new(r||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[c.Bz.forChild(S),l.u]})}return a})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2473],{42473:(Ee,D,n)=>{n.r(D),n.d(D,{ApiUserM:()=>Ie});var k=n(77664),Y=n(17017),G=n(63726),e=n(94946),v=n(85219),O=n(55043),c=n(15861),p=n(33157),d=n(90328),S=n(56212),C=n(6990),u=n(51162),U=n(45312),y=n(77240),A=n(99961),Q=n(92189),w=n(95852),Z=n(27414),T=n(32915),b=n(96814),g=n(95431),x=n(97680),P=n(33259),m=n(60095),L=n(27672),I=n(20553),q=n(19394),V=n(53429),K=n(60115),H=n(32660),W=n(53965),B=n(38057);function j(i,r){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Add API User"),e.qZA())}function z(i,r){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," View API User"),e.qZA())}function X(i,r){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," Edit API User"),e.qZA())}function ee(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"a",30),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.openSecret())}),e._UZ(1,"i",31),e._uU(2," Open Secret "),e.qZA()}}function te(i,r){if(1&i&&(e.TgZ(0,"div")(1,"div",10)(2,"label",11),e._uU(3,"Password Path"),e.qZA(),e.TgZ(4,"div",12),e._UZ(5,"p-dropdown",27),e.qZA(),e.TgZ(6,"div",28),e.YNc(7,ee,3,0,"a",29),e.qZA()()()),2&i){const t=e.oxw();e.xp6(5),e.Q6J("options",t.connectionStringSecrets)("filter",!0),e.xp6(2),e.Q6J("ngIf",t.data.mode!==t.EFormMode.VIEW)}}function se(i,r){1&i&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",32),e.qZA()())}function ae(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Swagger Token"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",33),e.qZA(),e.TgZ(5,"div",34)(6,"button",35),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.generateRandomStringForSwaggerURLPart())}),e._UZ(7,"i",36),e.qZA()()()}}function ie(i,r){if(1&i&&(e.TgZ(0,"div",10),e._UZ(1,"label",11),e.TgZ(2,"div",12)(3,"a",37),e._uU(4,"View Swagger JSON"),e.qZA()()()),2&i){const t=e.oxw();e.xp6(3),e.cQ8("href","",t.environment.BE_HOST_PORT+t.EApiPaths.API+t.EApiPaths.SITES+t.EModelApiPaths.INSTANCE,"/",t.authCS.gUser.apiPath,"/get-swagger-docs/",t.form.getRawValue().swaggerURLRandomPart,"",e.LSH)}}function ne(i,r){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function oe(i,r){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function re(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.save())}),e._UZ(1,"i",39),e.YNc(2,ne,2,0,"span",4),e.YNc(3,oe,2,0,"span",4),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function le(i,r){1&i&&e._UZ(0,"p-progressSpinner",40)}let F=(()=>{class i{fb;ns;apiUserS;generalS;instanceS;eventCenterS;secretS;constantsS;authCS;data;loading={form:!1};EFormMode=d.D;form;subscriptions=[];environment=I.N;connectionStringSecrets=[];constructor(t,a,s,o,l,f,h,_,Fe){this.fb=t,this.ns=a,this.apiUserS=s,this.generalS=o,this.instanceS=l,this.eventCenterS=f,this.secretS=h,this.constantsS=_,this.authCS=Fe}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,c.Z)(function*(s){if(s)if(t.form.enable(),yield t.loadConnectionStringFromSecret(),s.action===p.F.OPEN_FORM_IN_EDIT_MODE){const o=yield t.apiUserS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(o.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(s.action===p.F.OPEN_FORM_IN_VIEW_MODE){const o=yield t.apiUserS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(o.data),t.form.disable()}else s.action===p.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("enablePasswordPath").setValue(!0))});return function(s){return a.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(function(){var a=(0,c.Z)(function*(s){s&&s.action===p.F.UPDATED&&(t.eventCenterS.headerC.secManFormC.hideModal(),yield t.loadConnectionStringFromSecret())});return function(s){return a.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[m.kI.required]],username:[null,[m.kI.required]],password:[null,[]],enablePasswordPath:[!1,[]],apiUserPasswordPath:[null,[]],swaggerURLRandomPart:[null,[]],enableSwaggerDocs:[!1,[]]})}showModal(){$("#idApiUsersForm").modal("show")}hideModal(){$("#idApiUsersForm").modal("hide")}openSecret(){var t=this;return(0,c.Z)(function*(){t.eventCenterS.headerC.dataSecretForm.formData=yield t.getDefaultSecret(),t.eventCenterS.headerC.dataSecretForm.mode=d.D.EDIT,t.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),t.eventCenterS.headerC.secManFormC.showModal(),t.eventCenterS.headerC.secManFormC.zIndex=1051})()}loadConnectionStringFromSecret(){var t=this;return(0,c.Z)(function*(){try{const a=(yield t.instanceS.getConnectionStringSecret().toPromise())?.data;t.connectionStringSecrets=a}catch(a){t.ns.showErrorFromResponse(a.error||a,"Unable to load connection string.")}})()}getDefaultSecret(){var t=this;return(0,c.Z)(function*(){const a={find:{user:t.authCS.getUserId(),active:!0,isDefault:!0}};return(yield t.secretS.query(a).toPromise()).data?.[0]})()}save(){var t=this;return(0,c.Z)(function*(){const a=t.form.getRawValue();a.user=t.authCS.getUserId();try{let s;if(t.loading.form=!0,t.data.mode===d.D.ADD){if(!a.password&&!a.apiUserPasswordPath)return t.loading.form=!1,t.ns.showError(t.constantsS.apiUser.passwordError);t.processDataBeforeSaveOrUpdate(a),s=yield t.apiUserS.post(a).toPromise()}else t.data.mode===d.D.EDIT&&(a.password||delete a.password,t.processDataBeforeSaveOrUpdate(a),s=yield t.apiUserS.put(t.data.formData._id,a,{select:u.iH._id}).toPromise());t.ns.showSuccess(t.data.mode===d.D.ADD?t.constantsS.apiUser.addSuccess:t.constantsS.apiUser.editSuccess),t.data.eventChannel.emit({action:t.data.mode===d.D.ADD?p.F.SAVED:p.F.UPDATED}),t.loading.form=!1}catch(s){t.loading.form=!1,t.ns.showErrorFromResponse(s.error||s,"Unable to save user info.")}})()}processDataBeforeSaveOrUpdate(t){t.password&&(t.password=this.generalS.getEncryptedString(t.password,I.N.crypto.passCommunication))}generateRandomStringForSwaggerURLPart(){this.form.patchValue({swaggerURLRandomPart:this.generalS.getRandomStringWithCapitals(32)})}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EApiPaths=L.k$;EModelApiPaths=q.k4;static \u0275fac=function(a){return new(a||i)(e.Y36(m.qu),e.Y36(A.W),e.Y36(U.q),e.Y36(y.b),e.Y36(V.E),e.Y36(T.u),e.Y36(K.e),e.Y36(Z.L),e.Y36(w.D))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-w-api-user-form"]],inputs:{data:"data"},decls:42,vars:12,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idApiUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","username","name","username","spellcheck","false","type","text","placeholder","Please provide username",1,"form-control","form-control-sm"],[1,"align-middle","mb-0","pt-1"],["formControlName","enablePasswordPath","label","Enable Password From Secret Path",3,"binary"],["class","form-group row",4,"ngIf"],["formControlName","enableSwaggerDocs","label","Enable Swagger Docs",3,"binary"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","apiUserPasswordPath","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-2","p-0"],["class","d-block mt-2 text-info","href","javascript:","sava-no-dbl-click","",3,"click",4,"ngIf"],["href","javascript:","sava-no-dbl-click","",1,"d-block","mt-2","text-info",3,"click"],[1,"fas","fa-key","text-danger","fa-fw","mr-1"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["formControlName","swaggerURLRandomPart","name","swaggerURLRandomPart","spellcheck","false","type","text","placeholder","Please generate random URL",1,"form-control","form-control-sm"],[1,"col-2","pl-0"],["pTooltip","Generate random swagger token","type","button",1,"btn","btn-sm","btn-outline-info",3,"click"],[1,"fas","fa-star-of-life","text-info","fa-fw"],["target","_blank",3,"href"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,j,3,0,"span",4),e.YNc(5,z,3,0,"span",4),e.YNc(6,X,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Username"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.TgZ(22,"div",10),e._UZ(23,"label",11),e.TgZ(24,"div",12)(25,"label",15),e._UZ(26,"p-checkbox",16),e.qZA()()(),e.YNc(27,te,8,3,"div",4),e.YNc(28,se,5,0,"div",17),e.TgZ(29,"div",10),e._UZ(30,"label",11),e.TgZ(31,"div",12)(32,"label",15),e._UZ(33,"p-checkbox",18),e.qZA()()(),e.YNc(34,ae,8,0,"div",17),e.YNc(35,ie,5,3,"div",17),e.qZA()(),e.TgZ(36,"div",19)(37,"button",20),e._UZ(38,"i",21),e._uU(39," Close"),e.qZA(),e.YNc(40,re,4,3,"button",22),e.qZA(),e.YNc(41,le,1,0,"p-progressSpinner",23),e.qZA()()()),2&a&&(e.xp6(4),e.Q6J("ngIf",s.data.mode===s.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",s.data.mode===s.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",s.data.mode===s.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",s.form),e.xp6(15),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",!0===s.form.get("enablePasswordPath").value),e.xp6(1),e.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW&&!s.form.get("enablePasswordPath").value),e.xp6(5),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",s.form.getRawValue().enableSwaggerDocs),e.xp6(1),e.Q6J("ngIf",s.form.getRawValue().enableSwaggerDocs&&s.form.getRawValue().swaggerURLRandomPart),e.xp6(5),e.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",s.loading.form))},dependencies:[m._Y,m.Fj,m.JJ,m.JL,m.sg,m.u,b.O5,H.y,x.G,P.u,W.Lt,B.XZ],encapsulation:2})}return i})();var E=n(44879);const ce=["apiUserFormC"];function pe(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.edit())}),e._UZ(1,"i",18),e.qZA()}}function de(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.removePermanentDialog())}),e._UZ(1,"i",20),e.qZA()}}function me(i,r){1&i&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Username"),e.qZA()())}function fe(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"i",25),e.NdJ("click",function(s){e.CHM(t);const o=e.oxw().$implicit,l=e.oxw();return e.KtG(l.copyValue(s,o.name))}),e.qZA()}}function ue(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"i",26),e.NdJ("click",function(s){e.CHM(t);const o=e.oxw().$implicit,l=e.oxw();return e.KtG(l.copyValue(s,o.username))}),e.qZA()}}function ge(i,r){if(1&i&&(e.TgZ(0,"tr",21)(1,"td")(2,"span",22)(3,"span"),e._uU(4),e.qZA(),e.YNc(5,fe,1,0,"i",23),e.qZA()(),e.TgZ(6,"td")(7,"span",22)(8,"span"),e._uU(9),e.qZA(),e.YNc(10,ue,1,0,"i",24),e.qZA()()()),2&i){const t=r.$implicit;e.Q6J("pSelectableRow",t),e.xp6(4),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.name),e.xp6(4),e.Oqu(t.username),e.xp6(1),e.Q6J("ngIf",t.username)}}function he(i,r){1&i&&e._UZ(0,"p-progressSpinner",27)}let M=(()=>{class i{apiUserS;generalS;notificationS;navigationCS;authCS;constantsS;confirmationService;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:d.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=u.iH._id;apiUserFormC;constructor(t,a,s,o,l,f,h,_){this.apiUserS=t,this.generalS=a,this.notificationS=s,this.navigationCS=o,this.authCS=l,this.constantsS=f,this.confirmationService=h,this.eventCenterS=_}ngOnInit(){this.eventCenterS.apiUser.selectedApiUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===p.F.SAVED||t.action===p.F.UPDATED)&&(this.apiUserFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Users")}loadGridData(){var t=this;this.loading.grid=!0;const a={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,username:1,active:1},sort:{name:1}};this.showAll&&delete a.find.active,this.subscriptions.push(this.apiUserS.query(a).subscribe(function(){var s=(0,c.Z)(function*(o){if(o.success&&(t.selectedRows=[],t.rows=o.data,t.rowsMap=C.keyBy(t.rows,u.iH._id),t.rows[0]?._id)){const l=(yield t.apiUserS.getById(t.rows[0]._id).toPromise()).data;l._id&&(yield t.navigationCS.setQueryParam(S.p.api_user,l._id),t.eventCenterS.apiUser.selectedApiUsers.next([l]),t.selectedRows=[l],yield t.fillData())}t.generalS.setNewTitle("API Users"),t.loading.grid=!1});return function(o){return s.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=d.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE}),this.apiUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=d.D.VIEW,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_VIEW_MODE}),this.apiUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=d.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.apiUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,c.Z)(function*(){var a;t.confirmationService.confirm({message:t.constantsS.apiUser.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,c.Z)(function*(){yield t.removePermanent()}),function(){return a.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,c.Z)(function*(){t.loading.grid=!0;const a=yield t.apiUserS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,a.success?(t.notificationS.showSuccess(t.constantsS.apiUser.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(a,t.constantsS.apiUser.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.apiUser.selectedApiUsers.next([])}resetDependents(){var t=this;return(0,c.Z)(function*(){t.eventCenterS.apiUser.selectedApiUsers.next([]),yield t.navigationCS.setQueryParam(S.p.api_user,null)})()}apiUserSelected(){var t=this;return(0,c.Z)(function*(){yield t.resetDependents(),yield t.fillData()})()}fillData(){var t=this;return(0,c.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(S.p.api_user,""),void t.eventCenterS.apiUser.selectedApiUsers.next([]);const a=(yield t.apiUserS.getById(t.selectedRows[0]._id).toPromise()).data;a._id?(yield t.navigationCS.setQueryParam(S.p.api_user,a._id),t.eventCenterS.apiUser.selectedApiUsers.next([a])):t.resetDependents().then()})()}copyValue(t,a){var s=this;return(0,c.Z)(function*(){t.stopPropagation(),a&&((yield s.generalS.copyToClipboard(a))?s.notificationS.showSuccess(`Copied "${a}" to clipboard.`):s.notificationS.showError("Unable to copy to clipboard."))})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(a){return new(a||i)(e.Y36(U.q),e.Y36(y.b),e.Y36(A.W),e.Y36(Q.S),e.Y36(w.D),e.Y36(Z.L),e.Y36(v.YP),e.Y36(T.u))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-w-api-users"]],viewQuery:function(a,s){if(1&a&&e.Gf(ce,5),2&a){let o;e.iGM(o=e.CRH())&&(s.apiUserFormC=o.first)}},decls:21,vars:16,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","API Group Permissions",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-user-permission.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["apiUserFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],[1,"copy-cell"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy username","tooltipPosition","top",3,"click",4,"ngIf"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["pTooltip","Copy username","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," API Users"),e.qZA(),e.TgZ(6,"div",3)(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA()(),e.TgZ(10,"span",6),e.NdJ("click",function(){return s.add()}),e._UZ(11,"i",7),e.qZA(),e.YNc(12,pe,2,0,"span",8),e.YNc(13,de,2,0,"span",9),e.qZA(),e.TgZ(14,"div",10)(15,"p-table",11),e.NdJ("selectionChange",function(l){return s.selectedRows=l})("dblclick",function(){return s.dblClickUsers()})("selectionChange",function(){return s.apiUserSelected()}),e.YNc(16,me,5,0,"ng-template",12),e.YNc(17,ge,11,5,"ng-template",13),e.qZA(),e.YNc(18,he,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(19,"app-w-api-user-form",15,16)),2&a&&(e.xp6(3),e.Q6J("src",e.lcZ(4,12,"/assets/images/icons/api-user.svg"),e.LSH),e.xp6(5),e.Q6J("src",e.lcZ(9,14,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(4),e.Q6J("ngIf",s.selectedRows.length),e.xp6(1),e.Q6J("ngIf",s.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",s.selectedRows)("dataKey",s.gridKey)("scrollable",!0)("value",s.rows),e.xp6(3),e.Q6J("ngIf",s.loading.grid),e.xp6(1),e.Q6J("data",s.data))},dependencies:[b.O5,g.iA,v.jx,g.Ei,x.G,P.u,F,E.w],styles:[".copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.copy-cell[_ngcontent-%COMP%]:hover .copy-icon[_ngcontent-%COMP%]{opacity:1}.copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return i})();var _e=n(83620),ve=n(78883),Se=n(15561);function Ce(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"span",10),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.saveUserPermissions())}),e._UZ(1,"i",11),e._uU(2," Save"),e.qZA()}}function Ue(i,r){1&i&&(e.TgZ(0,"tr"),e._UZ(1,"th",15),e.TgZ(2,"th"),e._uU(3,"Name"),e.qZA()())}function ye(i,r){if(1&i&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",20),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function Ae(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"i",21),e.NdJ("click",function(s){e.CHM(t);const o=e.oxw().$implicit,l=e.oxw(2);return e.KtG(l.copyValue(s,o.name))}),e.qZA()}}function we(i,r){if(1&i&&(e.TgZ(0,"tr",16),e.YNc(1,ye,2,2,"td",17),e.TgZ(2,"td")(3,"span",18)(4,"span"),e._uU(5),e.qZA(),e.YNc(6,Ae,1,0,"i",19),e.qZA()()()),2&i){const t=r.$implicit,a=e.oxw(2);e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",a.showCheckbox),e.xp6(4),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.name)}}function Ze(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"p-table",12),e.NdJ("selectionChange",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRows=s)})("selectionChange",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.apiGroupSelected())}),e.YNc(1,Ue,4,0,"ng-template",13),e.YNc(2,we,7,4,"ng-template",14),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("selectionMode","multiple")("metaKeySelection",!1)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows)}}function Te(i,r){1&i&&e._UZ(0,"p-progressSpinner",22)}let N=(()=>{class i{groupS;generalS;notificationS;navigationS;authCS;apiUserS;constantsS;eventCenterS;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={eventChannel:new e.vpe};rows=[];rowsMap={};selectedRows=[];gridKey=u.IF.name;constructor(t,a,s,o,l,f,h,_){this.groupS=t,this.generalS=a,this.notificationS=s,this.navigationS=o,this.authCS=l,this.apiUserS=f,this.constantsS=h,this.eventCenterS=_}ngOnInit(){var t=this;this.eventCenterS.apiUser.selectedGroups.next([]),this.subscriptions.push(this.eventCenterS.apiUser.selectedApiUsers.pipe((0,_e.b)(10)).subscribe(function(){var a=(0,c.Z)(function*(s){s.length?yield t.loadGridData():t.resetList()});return function(s){return a.apply(this,arguments)}}()))}loadGridData(){var t=this;return(0,c.Z)(function*(){t.loading.grid=!0;const a={find:{user:t.authCS.getUserId(),active:!0},select:{name:1},sort:{name:1}},s=yield t.groupS.query(a).toPromise();if(s.success){t.selectedRows=[],t.rows=s.data,t.rowsMap=C.keyBy(t.rows,"name");const o=t.eventCenterS.apiUser.selectedApiUsers.value[0].groupNames||[],l=[];for(const f of o)t.rowsMap[f]&&l.push(t.rowsMap[f]);t.selectedRows=l,t.eventCenterS.apiUser.selectedGroups.next(C.map(t.selectedRows,"_id"))}t.loading.grid=!1})()}resetList(){var t=this;return(0,c.Z)(function*(){t.rows=[],t.rowsMap={},t.selectedRows.length=0,t.eventCenterS.apiUser.selectedGroups.next([])})()}apiGroupSelected(){var t=this;return(0,c.Z)(function*(){t.eventCenterS.apiUser.selectedGroups.next(C.map(t.selectedRows,t.gridKey))})()}saveUserPermissions(){var t=this;return(0,c.Z)(function*(){const a=JSON.parse(JSON.stringify(t.eventCenterS.apiUser.selectedApiUsers.value[0]));a.user=t.authCS.getUserId(),a.groupNames=t.eventCenterS.apiUser.selectedGroups.value||[],t.loading.grid=!0;const s=yield t.apiUserS.put(a._id,a,{select:u.iH._id}).toPromise();s&&s.success&&t.notificationS.showSuccess("User updated successfully."),t.loading.grid=!1})()}copyValue(t,a){t.stopPropagation(),this.generalS.copyToClipboard(a)?this.notificationS.showSuccess("Copied!"):this.notificationS.showError("Copy failed")}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||i)(e.Y36(ve.e),e.Y36(y.b),e.Y36(A.W),e.Y36(Se.X),e.Y36(w.D),e.Y36(U.q),e.Y36(Z.L),e.Y36(T.u))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-w-api-group-list"]],inputs:{showCheckbox:"showCheckbox"},decls:14,vars:9,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","API Group Permissions",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-group-permission.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],["class","float-right cursor-pointer ml-3","pTooltip","Save",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["pTooltip","Save",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-save","fa-fw","text-success"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],[2,"width","40px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"copy-cell"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],[3,"value","pSelectableRow"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Groups"),e.qZA(),e.TgZ(6,"div",3)(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA()(),e.YNc(10,Ce,3,0,"span",6),e.qZA(),e.TgZ(11,"div",7),e.YNc(12,Ze,3,6,"p-table",8),e.YNc(13,Te,1,0,"p-progressSpinner",9),e.qZA()()),2&a&&(e.xp6(3),e.Q6J("src",e.lcZ(4,5,"/assets/images/icons/api-group.svg"),e.LSH),e.xp6(5),e.Q6J("src",e.lcZ(9,7,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(2),e.Q6J("ngIf",s.eventCenterS.apiUser.selectedApiUsers.value.length),e.xp6(2),e.Q6J("ngIf",s.eventCenterS.apiUser.selectedApiUsers.value.length),e.xp6(1),e.Q6J("ngIf",s.loading.grid))},dependencies:[b.O5,g.iA,v.jx,g.Ei,g.UA,x.G,P.u,E.w],styles:["[_nghost-%COMP%] .copy-icon{opacity:0;transition:opacity .2s}[_nghost-%COMP%] tr:hover .copy-icon{opacity:1}[_nghost-%COMP%] .copy-icon:hover{color:#4fc3f7!important}[_nghost-%COMP%] .copy-cell{display:inline-flex;align-items:center}"]})}return i})();function be(i,r){1&i&&(e.TgZ(0,"div",3),e._UZ(1,"app-w-api-users"),e.qZA())}function xe(i,r){1&i&&(e.TgZ(0,"div",4),e._UZ(1,"app-w-api-group-list"),e.qZA())}const Pe=function(){return{height:"calc(100% - 100px);"}},R=function(){return[50,50]};const De=[{path:"layout",component:(()=>{class i{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.Xpm({type:i,selectors:[["app-api-user-layout"]],decls:4,vars:7,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body border-0 shadow-sm mb-5","orientation","horizontal",3,"panelSizes","minSizes"],["pTemplate",""],[1,"col","flex","align-items-center","justify-content-center","pl-0","pr-1"],[1,"col","flex","align-items-center","justify-content-center","pl-1","pr-0"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"p-splitter",1),e.YNc(2,be,2,0,"ng-template",2),e.YNc(3,xe,2,0,"ng-template",2),e.qZA()()),2&a&&(e.xp6(1),e.Akn(e.DdM(4,Pe)),e.Q6J("panelSizes",e.DdM(5,R))("minSizes",e.DdM(6,R)))},dependencies:[v.jx,O.q,M,N],encapsulation:2})}return i})(),canActivate:[G.P]}];let Ie=(()=>{class i{static \u0275fac=function(a){return new(a||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[k.Bz.forChild(De),Y.u]})}return i})()}}]);